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

/***/ "./assets/blocks/0-adv-components/api-version-deprecations.jsx"
/*!*********************************************************************!*\
  !*** ./assets/blocks/0-adv-components/api-version-deprecations.jsx ***!
  \*********************************************************************/
() {

function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _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 _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
var addFilter = wp.hooks.addFilter;
addFilter('blocks.registerBlockType', 'advgb/addApiV1Deprecations', function (settings, name) {
  var blockName = settings ? name || settings.name : name;
  if (!settings || typeof blockName !== 'string' || blockName.indexOf('advgb/') !== 0) {
    return settings;
  }
  if (settings.apiVersion !== 3 || typeof settings.save !== 'function') {
    return settings;
  }
  var deprecated = Array.isArray(settings.deprecated) ? settings.deprecated.map(function (deprecation) {
    return _objectSpread(_objectSpread({}, deprecation), {}, {
      apiVersion: deprecation.apiVersion || 1
    });
  }) : [];
  settings.deprecated = [{
    apiVersion: 1,
    attributes: settings.attributes,
    supports: settings.supports,
    save: settings.save
  }].concat(_toConsumableArray(deprecated));
  return settings;
});

/***/ },

/***/ "./assets/blocks/0-adv-components/components.jsx"
/*!*******************************************************!*\
  !*** ./assets/blocks/0-adv-components/components.jsx ***!
  \*******************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   AdvColorControl: () => (/* binding */ AdvColorControl)
/* harmony export */ });
function AdvColorControl(props) {
  var _wp$components = wp.components,
    ColorIndicator = _wp$components.ColorIndicator,
    BaseControl = _wp$components.BaseControl;
  var _ref = wp.blockEditor || wp.editor,
    ColorPalette = _ref.ColorPalette;
  var BaseLabel = BaseControl.VisualLabel ? BaseControl.VisualLabel : "span";
  var label = props.label,
    value = props.value,
    onChange = props.onChange;
  return /*#__PURE__*/React.createElement(BaseControl, {
    className: "editor-color-palette-control block-editor-color-palette-control"
  }, /*#__PURE__*/React.createElement(BaseLabel, {
    className: "components-base-control__label"
  }, label, value && /*#__PURE__*/React.createElement(ColorIndicator, {
    colorValue: value
  })), /*#__PURE__*/React.createElement(ColorPalette, {
    className: "editor-color-palette-control__color-palette block-editor-color-palette-control__color-palette",
    value: value,
    onChange: onChange
  }));
}

/***/ },

/***/ "./assets/blocks/0-adv-components/datetime.jsx"
/*!*****************************************************!*\
  !*** ./assets/blocks/0-adv-components/datetime.jsx ***!
  \*****************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   AdvDateTimeControl: () => (/* binding */ AdvDateTimeControl),
/* harmony export */   AdvDaysControl: () => (/* binding */ AdvDaysControl),
/* harmony export */   AdvTimeControl: () => (/* binding */ AdvTimeControl),
/* harmony export */   AdvTimezoneControl: () => (/* binding */ AdvTimezoneControl),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var hour_convert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! hour-convert */ "./node_modules/hour-convert/index.js");
/* harmony import */ var hour_convert__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(hour_convert__WEBPACK_IMPORTED_MODULE_0__);
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _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(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _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(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }

var _wp$components = wp.components,
  ButtonGroup = _wp$components.ButtonGroup,
  Button = _wp$components.Button,
  DateTimePicker = _wp$components.DateTimePicker,
  TextControl = _wp$components.TextControl,
  CheckboxControl = _wp$components.CheckboxControl,
  Popover = _wp$components.Popover,
  Tooltip = _wp$components.Tooltip,
  SelectControl = _wp$components.SelectControl,
  Icon = _wp$components.Icon;
var _wp$element = wp.element,
  Component = _wp$element.Component,
  Fragment = _wp$element.Fragment,
  useState = _wp$element.useState;
var _wp$i18n = wp.i18n,
  __ = _wp$i18n.__,
  _x = _wp$i18n._x;
var applyFilters = wp.hooks.applyFilters;
function AdvDateTimeControl(props) {
  var _useState = useState(false),
    _useState2 = _slicedToArray(_useState, 2),
    popupState = _useState2[0],
    setPopupState = _useState2[1];
  var togglePopup = function togglePopup() {
    setPopupState(!popupState);
  };
  var buttonLabel = props.buttonLabel,
    dateLabel = props.dateLabel,
    date = props.date,
    onChangeDate = props.onChangeDate,
    onDateClear = props.onDateClear,
    onInvalidDate = props.onInvalidDate,
    placement = props.placement,
    offset = props.offset;
  return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
    className: "advgb-advcalendar-control"
  }, /*#__PURE__*/React.createElement("label", null, dateLabel), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
    isLink: true,
    icon: "calendar",
    onClick: togglePopup
  }, /*#__PURE__*/React.createElement(Tooltip, {
    text: __('Change date', 'advanced-gutenberg')
  }, /*#__PURE__*/React.createElement("span", null, date ? moment(date).format("MMMM DD YYYY, h:mm a") : buttonLabel))), date && /*#__PURE__*/React.createElement(Button, {
    icon: "no-alt",
    className: "advgb-advcalendar-remove-icon",
    onClick: function onClick() {
      return onDateClear();
    }
  }))), popupState && /*#__PURE__*/React.createElement(Popover, {
    className: "advgb-advcalendar-popover",
    onClose: setPopupState.bind(null, false),
    resize: false,
    placement: placement,
    offset: offset
  }, /*#__PURE__*/React.createElement("label", {
    className: "advgb-advcalendar-popover-label"
  }, dateLabel, /*#__PURE__*/React.createElement(Button, {
    icon: "no-alt",
    className: "advgb-advcalendar-remove-icon",
    onClick: togglePopup
  })), /*#__PURE__*/React.createElement(DateTimePicker, {
    currentDate: date,
    onChange: onChangeDate,
    is12Hour: true,
    isInvalidDate: onInvalidDate
  })));
}
AdvDateTimeControl.defaultProps = {
  placement: 'left',
  offset: 40
};
function AdvDaysControl(props) {
  var allDays = [{
    slug: 0,
    label: _x('S', 'Sunday first letter', 'advanced-gutenberg')
  }, {
    slug: 1,
    label: __('M', 'advanced-gutenberg')
  }, {
    slug: 2,
    label: _x('T', 'Tuesday first letter', 'advanced-gutenberg')
  }, {
    slug: 3,
    label: __('W', 'advanced-gutenberg')
  }, {
    slug: 4,
    label: _x('T', 'Thursday first letter', 'advanced-gutenberg')
  }, {
    slug: 5,
    label: __('F', 'advanced-gutenberg')
  }, {
    slug: 6,
    label: _x('S', 'Saturday first letter', 'advanced-gutenberg')
  }];
  var label = props.label,
    _props$days = props.days,
    days = _props$days === void 0 ? [] : _props$days,
    onChangeDays = props.onChangeDays;

  // Use a single state variable to store the selected days
  var _useState3 = useState(Array.isArray(days) ? days : []),
    _useState4 = _slicedToArray(_useState3, 2),
    selectedDays = _useState4[0],
    setSelectedDays = _useState4[1];

  /**
  * Check if the day is selected or not
  *
  * @since 3.1.2
  *
  * @param {string} Day slug e.g. 'u' for Sunday, 't' for Tuesday
  *
  * @return {bool}
  */
  function isDaySelected(slug) {
    return selectedDays.some(function (el) {
      return el === slug;
    });
  }

  /**
  * Update the selected days state when a checkbox is changed
  *
  * @since 3.1.2
  *
  * @param {string} Day slug e.g. 'u' for Sunday, 't' for Tuesday
  *
  * @return {void}
  */
  function onChangeDay(slug) {
    // Check if the day is already selected
    var isSelected = isDaySelected(slug);

    // Create a new array with the updated selection
    var updatedDays;
    if (isSelected) {
      // Remove the day from the selected days
      updatedDays = selectedDays.filter(function (el) {
        return el !== slug;
      });
    } else {
      // Add the day to the selected days
      var findDay = allDays.find(function (el) {
        return el.slug === slug;
      });
      updatedDays = [].concat(_toConsumableArray(selectedDays), [findDay.slug]);
    }

    // Remove duplicates
    var uniqueDays = _toConsumableArray(new Set(updatedDays));

    // Update the selected days state
    setSelectedDays(uniqueDays);

    // Call the onChangeDays prop to notify the parent component of the change
    if (onChangeDays) {
      onChangeDays(updatedDays);
    }
  }
  return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
    className: "advgb-checkbox-wrapper"
  }, /*#__PURE__*/React.createElement("label", null, label), /*#__PURE__*/React.createElement("div", {
    className: "advgb-checkbox-inline"
  }, allDays.map(function (day) {
    return /*#__PURE__*/React.createElement(CheckboxControl, {
      label: day.label,
      checked: isDaySelected(day.slug),
      onChange: function onChange() {
        return onChangeDay(day.slug);
      }
    });
  }))));
}
var AdvTimeClass = /*#__PURE__*/function (_Component) {
  function AdvTimeClass(props) {
    var _this;
    _classCallCheck(this, AdvTimeClass);
    _this = _callSuper(this, AdvTimeClass, [props]);
    _this.state = {
      onChangeTime: null,
      currentTime: _this.props.currentTime || null,
      hours: null,
      minutes: null,
      meridian: 'am',
      onInit: true
    };
    return _this;
  }
  _inherits(AdvTimeClass, _Component);
  return _createClass(AdvTimeClass, [{
    key: "componentWillMount",
    value: function componentWillMount() {
      var _this$state = this.state,
        onChangeTime = _this$state.onChangeTime,
        currentTime = _this$state.currentTime,
        onInit = _this$state.onInit;
      if (this.props.onChangeTime !== onChangeTime) {
        this.setState({
          onChangeTime: this.props.onChangeTime
        });
      }
      if (this.props.currentTime !== currentTime) {
        this.setState({
          currentTime: this.props.currentTime
        });
      }

      // Init
      if (currentTime && currentTime.includes(':') && onInit) {
        this.setState({
          hours: currentTime.split(':')[0],
          minutes: currentTime.split(':')[1],
          meridian: parseInt(currentTime.split(':')[0]) > 11 ? 'pm' : 'am',
          // We set > 11 because PM starts from 12:00:00
          onInit: false
        });
      }
    }
  }, {
    key: "componentDidUpdate",
    value: function componentDidUpdate(prevProps, prevState) {
      var _this$props = this.props,
        onChangeTime = _this$props.onChangeTime,
        currentTime = _this$props.currentTime;
      var _this$state2 = this.state,
        hours = _this$state2.hours,
        minutes = _this$state2.minutes,
        meridian = _this$state2.meridian;
      var prevHours = prevState.hours,
        prevMinutes = prevState.minutes,
        prevMeridian = prevState.meridian;
      if (hours !== prevHours || minutes !== prevMinutes || meridian !== prevMeridian) {
        // When clearing time
        if (!hours && !minutes) {
          return;
        }

        // Default minutes when hours selected
        if (hours && !minutes) {
          this.setState({
            minutes: '00'
          });
        }

        // Default hours when minutes selected
        if (minutes && !hours) {
          this.setState({
            hours: '01'
          });
        }

        /* Convert 12-hours to 24-hours.
         * e.g. 12:00 AM becomes 00:00:00
         *      12:00 PM becomes 12:00:00
         *      01:00 PM becomes 13:00:00
         */
        var savedTime = "".concat(this.appendZero(hour_convert__WEBPACK_IMPORTED_MODULE_0___default().to24Hour({
          hour: parseInt(hours),
          meridiem: meridian
        })), ":").concat(minutes, ":00");

        // Value saved in source/attribute
        this.props.onChangeTime(savedTime);
      }
    }

    /**
     * Append zero to one digit numbers. e.g. 9 becomes '09'
     *
     * @since 3.1.2
     *
     * @param {string value Hours or minutes
     *
     * @return {string}
     */
  }, {
    key: "appendZero",
    value: function appendZero(value) {
      if (isNaN(value)) {
        return;
      }
      var res = parseInt(value);
      return res > 9 ? res : "0".concat(res);
    }
  }, {
    key: "render",
    value: function render() {
      var _this2 = this;
      var _this$state3 = this.state,
        onChangeTime = _this$state3.onChangeTime,
        currentTime = _this$state3.currentTime,
        hours = _this$state3.hours,
        minutes = _this$state3.minutes,
        meridian = _this$state3.meridian;

      // Make sure hours are valid. 01: min, 12: max
      var handleChangeHours = function handleChangeHours(event) {
        var value = Math.max(1, Math.min(12, Number(event.target.value)));
        _this2.setState({
          hours: _this2.appendZero(value)
        });
      };

      // Allow to use up/down keys for hours
      var handleKeyDownHours = function handleKeyDownHours(event) {
        var value = Number(event.target.value);
        if (event.key === 'ArrowUp' && value < 12) {
          _this2.setState({
            hours: _this2.appendZero(value + 1)
          });
        } else if (event.key === 'ArrowDown' && value > 1) {
          _this2.setState({
            hours: _this2.appendZero(value - 1)
          });
        }
      };

      // Make sure minutes are valid. 01: min, 59: max
      var handleChangeMinutes = function handleChangeMinutes(event) {
        var value = Math.max(0, Math.min(59, Number(event.target.value)));
        _this2.setState({
          minutes: _this2.appendZero(value)
        });
      };

      // Allow to use up/down keys for minutes
      var handleKeyDownMinutes = function handleKeyDownMinutes(event) {
        var value = Number(event.target.value);
        if (event.key === 'ArrowUp' && value < 59) {
          _this2.setState({
            minutes: _this2.appendZero(value + 1)
          });
        } else if (event.key === 'ArrowDown' && value > 0) {
          _this2.setState({
            minutes: _this2.appendZero(value - 1)
          });
        }
      };
      return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
        className: "advgb-advtime-control"
      }, /*#__PURE__*/React.createElement("label", null, this.props.label), /*#__PURE__*/React.createElement("div", {
        className: "advgb-advtime-hours-minutes"
      }, /*#__PURE__*/React.createElement("input", {
        type: "text",
        value: hours ? this.appendZero(hour_convert__WEBPACK_IMPORTED_MODULE_0___default().to12Hour(parseInt(hours)).hour) : '',
        onChange: handleChangeHours,
        onKeyDown: handleKeyDownHours,
        placeholder: "--"
      }), /*#__PURE__*/React.createElement("span", null, ":"), /*#__PURE__*/React.createElement("input", {
        type: "text",
        value: minutes ? minutes : '',
        onChange: handleChangeMinutes,
        onKeyDown: handleKeyDownMinutes,
        placeholder: "--"
      })), /*#__PURE__*/React.createElement(ButtonGroup, {
        className: "advgb-advtime-meridian"
      }, /*#__PURE__*/React.createElement(Button, {
        variant: meridian === null || meridian === 'am' ? 'primary' : 'secondary',
        onClick: function onClick() {
          _this2.setState({
            meridian: 'am'
          });
        },
        disabled: hours && minutes ? false : true
      }, __('AM', 'advanced-gutenberg')), /*#__PURE__*/React.createElement(Button, {
        variant: meridian === 'pm' ? 'primary' : 'secondary',
        onClick: function onClick() {
          _this2.setState({
            meridian: 'pm'
          });
        },
        disabled: hours && minutes ? false : true
      }, __('PM', 'advanced-gutenberg'))), hours && minutes && /*#__PURE__*/React.createElement(Button, {
        className: "advgb-advtime-remove-icon",
        icon: "no-alt",
        onClick: function onClick() {
          _this2.props.onTimeClear();
          _this2.setState({
            hours: null,
            minutes: null,
            meridian: 'am'
          });
        }
      })));
    }
  }]);
}(Component);
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AdvTimeClass);
function AdvTimeControl(props) {
  var label = props.label,
    currentTime = props.currentTime,
    onChangeTime = props.onChangeTime,
    onTimeClear = props.onTimeClear;
  return /*#__PURE__*/React.createElement(AdvTimeClass, {
    label: label,
    currentTime: currentTime,
    onChangeTime: onChangeTime,
    onTimeClear: onTimeClear
  });
}
function AdvTimezoneControl(props) {
  var label = props.label,
    defaultTimezone = props.defaultTimezone;
  return /*#__PURE__*/React.createElement(Fragment, null, applyFilters('advgb.timezoneControl', /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
    className: "advgb-promo-overlay-area"
  }, /*#__PURE__*/React.createElement("div", {
    className: "advgb-blur"
  }, label, /*#__PURE__*/React.createElement(SelectControl, {
    value: defaultTimezone,
    options: [{
      label: defaultTimezone,
      value: defaultTimezone
    }],
    disabled: true
  })), /*#__PURE__*/React.createElement("div", {
    class: "advgb-pro-overlay-wrap"
  }, /*#__PURE__*/React.createElement("div", {
    class: "advgb-pro-small-overlay-text advgb-tooltips ppb-tooltips-library click",
    "data-toggle": "ppbtooltip",
    "data-placement": "top"
  }, /*#__PURE__*/React.createElement("span", {
    class: "advgb-promo-text"
  }, /*#__PURE__*/React.createElement("span", {
    class: "dashicons dashicons-lock",
    style: {
      color: 'initial'
    }
  }), " ", __('Pro feature', 'advanced-gutenberg')), /*#__PURE__*/React.createElement("span", {
    class: "tooltip-text"
  }, /*#__PURE__*/React.createElement("p", null, __('PublishPress Blocks Pro supports Timezone configuration.', 'advanced-gutenberg')), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("a", {
    class: "clickable",
    href: "https://publishpress.com/links/blocks",
    target: "_blank"
  }, __('Upgrade to Pro', 'advanced-gutenberg'))), /*#__PURE__*/React.createElement("i", null))))), /*#__PURE__*/React.createElement(React.Fragment, null)), props));
}

/***/ },

/***/ "./assets/blocks/0-adv-components/icon-class.jsx"
/*!*******************************************************!*\
  !*** ./assets/blocks/0-adv-components/icon-class.jsx ***!
  \*******************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   IconListPopupHook: () => (/* binding */ IconListPopupHook),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
var __ = wp.i18n.__;
var _wp$element = wp.element,
  Component = _wp$element.Component,
  Fragment = _wp$element.Fragment;
var _wp$components = wp.components,
  SelectControl = _wp$components.SelectControl,
  TextControl = _wp$components.TextControl;
var IconListPopup = /*#__PURE__*/function (_Component) {
  function IconListPopup(props) {
    var _this;
    _classCallCheck(this, IconListPopup);
    _this = _callSuper(this, IconListPopup, [props]);
    _this.handleClick = _this.handleClick.bind(_this);
    _this.state = {
      searchedText: '',
      selectedIcon: '',
      selectedIconTheme: 'outlined'
    };
    return _this;
  }
  _inherits(IconListPopup, _Component);
  return _createClass(IconListPopup, [{
    key: "componentWillMount",
    value: function componentWillMount() {
      var _this$state = this.state,
        searchedText = _this$state.searchedText,
        selectedIconTheme = _this$state.selectedIconTheme;
      if (this.props.selectedIcon !== searchedText) {
        this.setState({
          selectedIcon: this.props.selectedIcon
        });
      }
      if (this.props.selectedIconTheme !== selectedIconTheme) {
        this.setState({
          selectedIconTheme: this.props.selectedIconTheme
        });
      }
      document.addEventListener('click', this.handleClick);
    }
  }, {
    key: "componentWillUnmount",
    value: function componentWillUnmount() {
      // important
      document.removeEventListener('click', this.handleClick);
    }
  }, {
    key: "handleClick",
    value: function handleClick(e) {
      // ignore clicks inside the popup and the click that launched the popup
      if (this.node.contains(e.target) || e.target.className.includes('advgb-browse-image-btn') || e.target.className.includes('advgb-browse-icon-btn')) {
        return;
      }
      this.props.closePopup();
    }
  }, {
    key: "render",
    value: function render() {
      var _this2 = this;
      var _this$state2 = this.state,
        searchedText = _this$state2.searchedText,
        selectedIcon = _this$state2.selectedIcon,
        selectedIconTheme = _this$state2.selectedIconTheme;
      var popUpTitle = __('Icon List', 'advanced-gutenberg');
      var iconType = 'material';
      var applyIconButtonClass = ['apply-btn', 'components-button', 'button button-large', 'advgb-icon-apply-btn', 'is-primary'].filter(Boolean).join(' ');
      var closeButtonClass = ['close-btn'].filter(Boolean).join(' ');
      return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
        className: "advgb-icon-popup"
      }, /*#__PURE__*/React.createElement("div", {
        className: "popup-inner",
        ref: function ref(node) {
          _this2.node = node;
        }
      }, /*#__PURE__*/React.createElement("div", {
        className: "popup-content"
      }, /*#__PURE__*/React.createElement("div", {
        className: "popup-header"
      }, /*#__PURE__*/React.createElement("h3", null, popUpTitle), /*#__PURE__*/React.createElement("button", {
        className: closeButtonClass,
        onClick: this.props.closePopup
      }, /*#__PURE__*/React.createElement("i", {
        className: "material-icons"
      }, "close"))), /*#__PURE__*/React.createElement("div", {
        className: "popup-body"
      }, /*#__PURE__*/React.createElement(TextControl, {
        placeholder: __('Search icons', 'advanced-gutenberg'),
        value: searchedText,
        onChange: function onChange(value) {
          return _this2.setState({
            searchedText: value
          });
        }
      }), /*#__PURE__*/React.createElement(SelectControl, {
        label: __('Style', 'advanced-gutenberg'),
        value: selectedIconTheme,
        className: "advgb-icon-style-select",
        options: [{
          label: __('Filled', 'advanced-gutenberg'),
          value: ''
        }, {
          label: __('Outlined', 'advanced-gutenberg'),
          value: 'outlined'
        }, {
          label: __('Rounded', 'advanced-gutenberg'),
          value: 'round'
        }, {
          label: __('Two-Tone', 'advanced-gutenberg'),
          value: 'two-tone'
        }, {
          label: __('Sharp', 'advanced-gutenberg'),
          value: 'sharp'
        }],
        onChange: function onChange(value) {
          _this2.setState({
            selectedIconTheme: value
          });
        }
      }), /*#__PURE__*/React.createElement("div", {
        className: "advgb-icon-items-wrapper button-icons-list",
        style: {
          maxHeight: 300,
          overflowY: 'auto',
          overflowX: 'hidden'
        }
      }, Object.keys(advgbBlocks.iconList[iconType]).filter(function (icon) {
        return icon.indexOf(searchedText.trim().split(' ').join('_')) > -1;
      }).map(function (icon, index) {
        var iconClass = [iconType === 'material' && 'material-icons', selectedIconTheme !== '' && "-".concat(selectedIconTheme)].filter(Boolean).join('');
        return /*#__PURE__*/React.createElement("div", {
          className: "advgb-icon-item",
          key: index
        }, /*#__PURE__*/React.createElement("span", {
          onClick: function onClick() {
            _this2.setState({
              selectedIcon: icon
            });
          },
          className: icon === selectedIcon && 'active',
          title: icon
        }, /*#__PURE__*/React.createElement("i", {
          className: iconClass
        }, icon)));
      }))), /*#__PURE__*/React.createElement("div", {
        className: "popup-footer"
      }, /*#__PURE__*/React.createElement("button", {
        disabled: selectedIcon === '',
        className: applyIconButtonClass,
        onClick: function onClick() {
          _this2.props.onSelectIcon(selectedIcon);
          _this2.props.onSelectIconTheme(selectedIconTheme);
          _this2.props.closePopup();
        }
      }, __('Apply', 'advanced-gutenberg')))))));
    }
  }]);
}(Component);
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (IconListPopup);
function IconListPopupHook(props) {
  var closePopup = props.closePopup,
    onSelectIcon = props.onSelectIcon,
    onSelectIconTheme = props.onSelectIconTheme,
    selectedIcon = props.selectedIcon,
    selectedIconTheme = props.selectedIconTheme;
  return /*#__PURE__*/React.createElement(IconListPopup, {
    closePopup: closePopup,
    onSelectIcon: onSelectIcon,
    onSelectIconTheme: onSelectIconTheme,
    selectedIcon: selectedIcon,
    selectedIconTheme: selectedIconTheme
  });
}

/***/ },

/***/ "./assets/blocks/0-adv-components/utils.jsx"
/*!**************************************************!*\
  !*** ./assets/blocks/0-adv-components/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 */   getOptionSlugs: () => (/* binding */ getOptionSlugs),
/* harmony export */   getOptionSuggestions: () => (/* binding */ getOptionSuggestions),
/* harmony export */   getOptionTitles: () => (/* binding */ getOptionTitles)
/* harmony export */ });
/**
 * Generate option title suggestions
 *
 * @since 3.1.1
 * @param options Available options as objects with slug and title. e.g. [{slug: 'subscriber', title: 'Subscriber'}, {slug: 'new_customer', title: 'New Customer'}]
 *
 * @return {array}  Option slugs. e.g. ['subscriber','new_customer']
 */
var getOptionSuggestions = function getOptionSuggestions(options) {
  return options.map(function (item) {
    return item.title;
  });
};

/**
 * Match option slugs with its option titles
 * to display as field value (but NOT saved!).
 *
 * @since 3.1.1
 * @param slugs     Option slugs. e.g. ['subscriber','new_customer'] or [82, 92]
 * @param options   Available options as objects with slug and title. e.g. [{slug: 'subscriber', title: 'Subscriber'}, {slug: 'new_customer', title: 'New Customer'}]
 *
 * @return {array}  Option titles. e.g. ['Subscriber','New Customer']
 */
var getOptionTitles = function getOptionTitles(slugs, options) {
  var field_value = [];
  if (options !== null) {
    field_value = slugs.map(function (option_slug) {
      var find_option = options.find(function (item) {
        return item.slug === option_slug;
      });
      if (find_option === undefined || !find_option) {
        return option_slug; // It should return false but creates empty selections
      }
      return find_option.title;
    });
  }
  return field_value;
};

/**
 * Match option titles with its slugs, and save slugs
 *
 * @since 3.1.1
 * @param slugs     Option slugs. e.g. ['subscriber','new_customer']
 * @param options   Available options as objects with slug and title. e.g. [{slug: 'subscriber', title: 'Subscriber'}, {slug: 'new_customer', title: 'New Customer'}]
 *
 * @return {array}  Option slugs. e.g. ['subscriber','new_customer']
 */
var getOptionSlugs = function getOptionSlugs(slugs, options) {
  var slugs_array = [];
  slugs.map(function (option_title) {
    var matching_slug = options.find(function (item) {
      return item.title === option_title;
    });
    if (matching_slug !== undefined) {
      slugs_array.push(matching_slug.slug);
    }
  });
  return slugs_array;
};

/***/ },

/***/ "./assets/blocks/accordion/block.jsx"
/*!*******************************************!*\
  !*** ./assets/blocks/accordion/block.jsx ***!
  \*******************************************/
() {

function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
(function (wpI18n, wpBlocks, wpElement, wpBlockEditor, wpComponents) {
  wpBlockEditor = wp.blockEditor || wp.editor;
  var __ = wpI18n.__;
  var Component = wpElement.Component,
    Fragment = wpElement.Fragment;
  var registerBlockType = wpBlocks.registerBlockType,
    createBlock = wpBlocks.createBlock;
  var _wpBlockEditor = wpBlockEditor,
    InspectorControls = _wpBlockEditor.InspectorControls,
    RichText = _wpBlockEditor.RichText,
    PanelColorSettings = _wpBlockEditor.PanelColorSettings,
    InnerBlocks = _wpBlockEditor.InnerBlocks;
  var RangeControl = wpComponents.RangeControl,
    PanelBody = wpComponents.PanelBody,
    BaseControl = wpComponents.BaseControl,
    SelectControl = wpComponents.SelectControl,
    ToggleControl = wpComponents.ToggleControl;
  var HEADER_ICONS = {
    plus: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("path", {
      fill: "none",
      d: "M0,0h24v24H0V0z"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6V13z"
    })),
    plusCircle: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("path", {
      fill: "none",
      d: "M0,0h24v24H0V0z"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M12,2C6.48,2,2,6.48,2,12s4.48,10,10,10s10-4.48,10-10S17.52,2,12,2z M17,13h-4v4h-2v-4H7v-2h4V7h2v4h4V13z"
    })),
    plusCircleOutline: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("path", {
      fill: "none",
      d: "M0,0h24v24H0V0z"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M13,7h-2v4H7v2h4v4h2v-4h4v-2h-4V7z M12,2C6.48,2,2,6.48,2,12s4.48,10,10,10s10-4.48,10-10S17.52,2,12,2z M12,20 c-4.41,0-8-3.59-8-8s3.59-8,8-8s8,3.59,8,8S16.41,20,12,20z"
    })),
    plusBox: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("path", {
      fill: "none",
      d: "M0,0h24v24H0V0z"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M19,3H5C3.89,3,3,3.9,3,5v14c0,1.1,0.89,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M19,19H5V5h14V19z"
    }), /*#__PURE__*/React.createElement("polygon", {
      points: "11,17 13,17 13,13 17,13 17,11 13,11 13,7 11,7 11,11 7,11 7,13 11,13"
    })),
    unfold: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("path", {
      fill: "none",
      d: "M0,0h24v24H0V0z"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M12,5.83L15.17,9l1.41-1.41L12,3L7.41,7.59L8.83,9L12,5.83z M12,18.17L8.83,15l-1.41,1.41L12,21l4.59-4.59L15.17,15 L12,18.17z"
    })),
    threeDots: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("path", {
      fill: "none",
      d: "M0,0h24v24H0V0z"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M6,10c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S7.1,10,6,10z M18,10c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S19.1,10,18,10z M12,10c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S13.1,10,12,10z"
    })),
    arrowDown: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("path", {
      opacity: "0.87",
      fill: "none",
      d: "M24,24H0L0,0l24,0V24z"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M16.59,8.59L12,13.17L7.41,8.59L6,10l6,6l6-6L16.59,8.59z"
    }))
  };
  var AdvAccordion = /*#__PURE__*/function (_Component) {
    function AdvAccordion() {
      var _this;
      _classCallCheck(this, AdvAccordion);
      _this = _callSuper(this, AdvAccordion, arguments);
      _this.state = {
        currentAccordion: null
      };
      return _this;
    }
    _inherits(AdvAccordion, _Component);
    return _createClass(AdvAccordion, [{
      key: "componentWillMount",
      value: function componentWillMount() {
        var _this$props = this.props,
          attributes = _this$props.attributes,
          setAttributes = _this$props.setAttributes;
        var currentBlockConfig = advgbDefaultConfig['advgb-accordion'];

        // No override attributes of blocks inserted before
        if (attributes.changed !== true) {
          if (_typeof(currentBlockConfig) === 'object' && currentBlockConfig !== null) {
            Object.keys(currentBlockConfig).map(function (attribute) {
              if (typeof attributes[attribute] === 'boolean') {
                attributes[attribute] = !!currentBlockConfig[attribute];
              } else {
                attributes[attribute] = currentBlockConfig[attribute];
              }
            });
          }

          // Finally set changed attribute to true, so we don't modify anything again
          setAttributes({
            changed: true
          });
        }
      }
    }, {
      key: "render",
      value: function render() {
        var _this$props2 = this.props,
          attributes = _this$props2.attributes,
          setAttributes = _this$props2.setAttributes;
        var header = attributes.header,
          headerBgColor = attributes.headerBgColor,
          headerTextColor = attributes.headerTextColor,
          headerIcon = attributes.headerIcon,
          headerIconColor = attributes.headerIconColor,
          bodyBgColor = attributes.bodyBgColor,
          bodyTextColor = attributes.bodyTextColor,
          borderStyle = attributes.borderStyle,
          borderWidth = attributes.borderWidth,
          borderColor = attributes.borderColor,
          borderRadius = attributes.borderRadius,
          marginBottom = attributes.marginBottom,
          collapsedAll = attributes.collapsedAll;
        return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(InspectorControls, null, /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Notice', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement("p", {
          style: {
            color: '#ff0000',
            fontStyle: 'italic'
          }
        }, __("This accordion block has been replaced by a new and better one.\n                                 This block will be removed in a future version.\n                                 Please transform this to an Accordion Item block\n                                 and drag them into new Adv. Accordion block as soon as possible.", 'advanced-gutenberg'))), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Accordion Settings', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Bottom spacing', 'advanced-gutenberg'),
          value: marginBottom,
          help: __('Define space to next block. This will override Block spacing option (Frontend view only)', 'advanced-gutenberg'),
          min: 0,
          max: 50,
          onChange: function onChange(value) {
            return setAttributes({
              marginBottom: value
            });
          }
        })), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Header Settings', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(BaseControl, {
          label: __('Header Icon Style', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-icon-items-wrapper"
        }, Object.keys(HEADER_ICONS).map(function (key, index) {
          return /*#__PURE__*/React.createElement("div", {
            className: "advgb-icon-item",
            key: index
          }, /*#__PURE__*/React.createElement("span", {
            className: key === headerIcon ? 'active' : '',
            onClick: function onClick() {
              return setAttributes({
                headerIcon: key
              });
            }
          }, /*#__PURE__*/React.createElement("svg", {
            xmlns: "http://www.w3.org/2000/svg",
            width: "24",
            height: "24",
            viewBox: "0 0 24 24"
          }, HEADER_ICONS[key])));
        }))), /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Color Settings', 'advanced-gutenberg'),
          initialOpen: false,
          colorSettings: [{
            label: __('Background Color', 'advanced-gutenberg'),
            value: headerBgColor,
            onChange: function onChange(value) {
              return setAttributes({
                headerBgColor: value === undefined ? '#000' : value
              });
            }
          }, {
            label: __('Text Color', 'advanced-gutenberg'),
            value: headerTextColor,
            onChange: function onChange(value) {
              return setAttributes({
                headerTextColor: value === undefined ? '#eee' : value
              });
            }
          }, {
            label: __('Icon Color', 'advanced-gutenberg'),
            value: headerIconColor,
            onChange: function onChange(value) {
              return setAttributes({
                headerIconColor: value === undefined ? '#fff' : value
              });
            }
          }]
        })), /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Body Color Settings', 'advanced-gutenberg'),
          initialOpen: false,
          colorSettings: [{
            label: __('Background Color', 'advanced-gutenberg'),
            value: bodyBgColor,
            onChange: function onChange(value) {
              return setAttributes({
                bodyBgColor: value
              });
            }
          }, {
            label: __('Text Color', 'advanced-gutenberg'),
            value: bodyTextColor,
            onChange: function onChange(value) {
              return setAttributes({
                bodyTextColor: value
              });
            }
          }]
        }), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Border Settings', 'advanced-gutenberg'),
          initialOpen: false
        }, /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Border Style', 'advanced-gutenberg'),
          value: borderStyle,
          options: [{
            label: __('Solid', 'advanced-gutenberg'),
            value: 'solid'
          }, {
            label: __('Dashed', 'advanced-gutenberg'),
            value: 'dashed'
          }, {
            label: __('Dotted', 'advanced-gutenberg'),
            value: 'dotted'
          }],
          onChange: function onChange(value) {
            return setAttributes({
              borderStyle: value
            });
          }
        }), /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Color Settings', 'advanced-gutenberg'),
          initialOpen: false,
          colorSettings: [{
            label: __('Border Color', 'advanced-gutenberg'),
            value: borderColor,
            onChange: function onChange(value) {
              return setAttributes({
                borderColor: value
              });
            }
          }]
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Border width', 'advanced-gutenberg'),
          value: borderWidth,
          min: 0,
          max: 10,
          onChange: function onChange(value) {
            return setAttributes({
              borderWidth: value
            });
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Border radius', 'advanced-gutenberg'),
          value: borderRadius,
          min: 0,
          max: 100,
          onChange: function onChange(value) {
            return setAttributes({
              borderRadius: value
            });
          }
        })), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Accordions State', 'advanced-gutenberg'),
          initialOpen: false
        }, /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Initial Collapsed', 'advanced-gutenberg'),
          help: __('Make all accordions collapsed by default, enable this setting to apply to all accordions.', 'advanced-gutenberg'),
          checked: collapsedAll,
          onChange: function onChange() {
            return setAttributes({
              collapsedAll: !collapsedAll
            });
          }
        }))), /*#__PURE__*/React.createElement("div", {
          className: "advgb-accordion-block"
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-accordion-header",
          style: {
            backgroundColor: headerBgColor,
            color: headerTextColor,
            borderStyle: borderStyle,
            borderWidth: borderWidth + 'px',
            borderColor: borderColor,
            borderRadius: borderRadius + 'px'
          }
        }, /*#__PURE__*/React.createElement("span", {
          className: "advgb-accordion-header-icon"
        }, /*#__PURE__*/React.createElement("svg", {
          fill: headerIconColor,
          xmlns: "http://www.w3.org/2000/svg",
          width: "24",
          height: "24",
          viewBox: "0 0 24 24"
        }, HEADER_ICONS[headerIcon])), /*#__PURE__*/React.createElement(RichText, {
          tagName: "h4",
          value: header,
          onChange: function onChange(value) {
            return setAttributes({
              header: value
            });
          },
          unstableOnSplit: function unstableOnSplit() {
            return null;
          },
          className: "advgb-accordion-header-title",
          placeholder: __('Enter header…', 'advanced-gutenberg')
        })), /*#__PURE__*/React.createElement("div", {
          className: "advgb-accordion-body",
          style: {
            backgroundColor: bodyBgColor,
            color: bodyTextColor,
            borderStyle: borderStyle,
            borderWidth: borderWidth + 'px',
            borderColor: borderColor,
            borderRadius: borderRadius + 'px'
          }
        }, /*#__PURE__*/React.createElement(InnerBlocks, null))));
      }
    }]);
  }(Component);
  var accordionBlockIcon = /*#__PURE__*/React.createElement("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    width: "20",
    height: "20",
    viewBox: "2 2 22 22"
  }, /*#__PURE__*/React.createElement("path", {
    fill: "none",
    d: "M0,0h24v24H0V0z"
  }), /*#__PURE__*/React.createElement("rect", {
    x: "3",
    y: "17",
    width: "18",
    height: "2"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M19,12v1H5v-1H19 M21,10H3v5h18V10L21,10z"
  }), /*#__PURE__*/React.createElement("rect", {
    x: "3",
    y: "6",
    width: "18",
    height: "2"
  }));
  var accordionAttrs = {
    header: {
      type: 'string',
      default: 'Header text'
    },
    headerBgColor: {
      type: 'string',
      default: '#000'
    },
    headerTextColor: {
      type: 'string',
      default: '#eee'
    },
    headerIcon: {
      type: 'string',
      default: 'unfold'
    },
    headerIconColor: {
      type: 'string',
      default: '#fff'
    },
    bodyBgColor: {
      type: 'string'
    },
    bodyTextColor: {
      type: 'string'
    },
    borderStyle: {
      type: 'string',
      default: 'solid'
    },
    borderWidth: {
      type: 'number',
      default: 1
    },
    borderColor: {
      type: 'string'
    },
    borderRadius: {
      type: 'number',
      default: 2
    },
    marginBottom: {
      type: 'number',
      default: 15
    },
    collapsedAll: {
      type: 'boolean',
      default: false
    },
    changed: {
      type: 'boolean',
      default: false
    }
  };
  registerBlockType('advgb/accordion', {
    apiVersion: 3,
    title: __('Accordion (deprecated) - PublishPress', 'advanced-gutenberg'),
    description: __('Create a sliding accordion display for your content.', 'advanced-gutenberg'),
    icon: {
      src: accordionBlockIcon,
      foreground: typeof advgbBlocks !== 'undefined' ? advgbBlocks.color : undefined
    },
    category: 'advgb-category',
    keywords: [__('accordion', 'advanced-gutenberg'), __('list', 'advanced-gutenberg'), __('faq', 'advanced-gutenberg')],
    attributes: accordionAttrs,
    supports: {
      inserter: false
    },
    edit: AdvAccordion,
    save: function save(_ref) {
      var attributes = _ref.attributes;
      var header = attributes.header,
        headerBgColor = attributes.headerBgColor,
        headerTextColor = attributes.headerTextColor,
        headerIcon = attributes.headerIcon,
        headerIconColor = attributes.headerIconColor,
        bodyBgColor = attributes.bodyBgColor,
        bodyTextColor = attributes.bodyTextColor,
        borderStyle = attributes.borderStyle,
        borderWidth = attributes.borderWidth,
        borderColor = attributes.borderColor,
        borderRadius = attributes.borderRadius,
        marginBottom = attributes.marginBottom,
        collapsedAll = attributes.collapsedAll;
      return /*#__PURE__*/React.createElement("div", {
        className: "advgb-accordion-block",
        style: {
          marginBottom: marginBottom
        },
        "data-collapsed": collapsedAll ? collapsedAll : undefined
      }, /*#__PURE__*/React.createElement("div", {
        className: "advgb-accordion-header",
        style: {
          backgroundColor: headerBgColor,
          color: headerTextColor,
          borderStyle: borderStyle,
          borderWidth: borderWidth + 'px',
          borderColor: borderColor,
          borderRadius: borderRadius + 'px'
        }
      }, /*#__PURE__*/React.createElement("span", {
        className: "advgb-accordion-header-icon"
      }, /*#__PURE__*/React.createElement("svg", {
        fill: headerIconColor,
        xmlns: "http://www.w3.org/2000/svg",
        width: "24",
        height: "24",
        viewBox: "0 0 24 24"
      }, HEADER_ICONS[headerIcon])), /*#__PURE__*/React.createElement("h4", {
        className: "advgb-accordion-header-title"
      }, header)), /*#__PURE__*/React.createElement("div", {
        className: "advgb-accordion-body",
        style: {
          backgroundColor: bodyBgColor,
          color: bodyTextColor,
          borderStyle: borderStyle,
          borderWidth: borderWidth + 'px',
          borderColor: borderColor,
          borderRadius: borderRadius + 'px'
        }
      }, /*#__PURE__*/React.createElement(InnerBlocks.Content, null)));
    },
    deprecated: [{
      attributes: _objectSpread(_objectSpread({}, accordionAttrs), {}, {
        borderWidth: {
          type: 'number',
          default: 0
        }
      }),
      save: function save(_ref2) {
        var attributes = _ref2.attributes;
        var header = attributes.header,
          headerBgColor = attributes.headerBgColor,
          headerTextColor = attributes.headerTextColor,
          headerIcon = attributes.headerIcon,
          headerIconColor = attributes.headerIconColor,
          bodyBgColor = attributes.bodyBgColor,
          bodyTextColor = attributes.bodyTextColor,
          borderStyle = attributes.borderStyle,
          borderWidth = attributes.borderWidth,
          borderColor = attributes.borderColor,
          borderRadius = attributes.borderRadius,
          marginBottom = attributes.marginBottom,
          collapsedAll = attributes.collapsedAll;
        return /*#__PURE__*/React.createElement("div", {
          className: "advgb-accordion-block",
          style: {
            marginBottom: marginBottom
          },
          "data-collapsed": collapsedAll ? collapsedAll : undefined
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-accordion-header",
          style: {
            backgroundColor: headerBgColor,
            color: headerTextColor,
            borderStyle: borderStyle,
            borderWidth: borderWidth + 'px',
            borderColor: borderColor,
            borderRadius: borderRadius + 'px'
          }
        }, /*#__PURE__*/React.createElement("span", {
          className: "advgb-accordion-header-icon"
        }, /*#__PURE__*/React.createElement("svg", {
          fill: headerIconColor,
          xmlns: "http://www.w3.org/2000/svg",
          width: "24",
          height: "24",
          viewBox: "0 0 24 24"
        }, HEADER_ICONS[headerIcon])), /*#__PURE__*/React.createElement("h4", {
          className: "advgb-accordion-header-title"
        }, header)), /*#__PURE__*/React.createElement("div", {
          className: "advgb-accordion-body",
          style: {
            backgroundColor: bodyBgColor,
            color: bodyTextColor,
            borderStyle: borderStyle,
            borderWidth: borderWidth + 'px',
            borderColor: borderColor,
            borderRadius: borderRadius + 'px'
          }
        }, /*#__PURE__*/React.createElement(InnerBlocks.Content, null)));
      },
      supports: {
        inserter: false
      }
    }],
    transforms: {
      to: [{
        type: 'block',
        blocks: ['advgb/accordions'],
        transform: function transform(attributes, innerBlocks) {
          var accordion = createBlock('advgb/accordion-item', _objectSpread(_objectSpread({}, attributes), {}, {
            changed: false
          }), innerBlocks);
          return createBlock('advgb/accordions', _objectSpread(_objectSpread({}, attributes), {}, {
            header: undefined,
            needUpdate: false
          }), [accordion]);
        }
      }]
    }
  });
})(wp.i18n, wp.blocks, wp.element, wp.blockEditor, wp.components);

/***/ },

/***/ "./assets/blocks/advaccordion/accordion.jsx"
/*!**************************************************!*\
  !*** ./assets/blocks/advaccordion/accordion.jsx ***!
  \**************************************************/
() {

function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
(function (wpI18n, wpBlocks, wpElement, wpBlockEditor, wpComponents, wpCompose, lodash) {
  wpBlockEditor = wp.blockEditor || wp.editor;
  var __ = wpI18n.__;
  var Fragment = wpElement.Fragment,
    Component = wpElement.Component;
  var registerBlockType = wpBlocks.registerBlockType;
  var _wpBlockEditor = wpBlockEditor,
    RichText = _wpBlockEditor.RichText,
    InnerBlocks = _wpBlockEditor.InnerBlocks,
    InspectorControls = _wpBlockEditor.InspectorControls,
    PanelColorSettings = _wpBlockEditor.PanelColorSettings;
  var RangeControl = wpComponents.RangeControl,
    PanelBody = wpComponents.PanelBody,
    BaseControl = wpComponents.BaseControl,
    SelectControl = wpComponents.SelectControl,
    ToggleControl = wpComponents.ToggleControl;
  var _wp$data = wp.data,
    withDispatch = _wp$data.withDispatch,
    select = _wp$data.select;
  var compose = wpCompose.compose;
  var times = lodash.times;
  var HEADER_ICONS = {
    plus: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("path", {
      fill: "none",
      d: "M0,0h24v24H0V0z"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6V13z"
    })),
    plusCircle: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("path", {
      fill: "none",
      d: "M0,0h24v24H0V0z"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M12,2C6.48,2,2,6.48,2,12s4.48,10,10,10s10-4.48,10-10S17.52,2,12,2z M17,13h-4v4h-2v-4H7v-2h4V7h2v4h4V13z"
    })),
    plusCircleOutline: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("path", {
      fill: "none",
      d: "M0,0h24v24H0V0z"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M13,7h-2v4H7v2h4v4h2v-4h4v-2h-4V7z M12,2C6.48,2,2,6.48,2,12s4.48,10,10,10s10-4.48,10-10S17.52,2,12,2z M12,20 c-4.41,0-8-3.59-8-8s3.59-8,8-8s8,3.59,8,8S16.41,20,12,20z"
    })),
    plusBox: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("path", {
      fill: "none",
      d: "M0,0h24v24H0V0z"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M19,3H5C3.89,3,3,3.9,3,5v14c0,1.1,0.89,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M19,19H5V5h14V19z"
    }), /*#__PURE__*/React.createElement("polygon", {
      points: "11,17 13,17 13,13 17,13 17,11 13,11 13,7 11,7 11,11 7,11 7,13 11,13"
    })),
    unfold: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("path", {
      fill: "none",
      d: "M0,0h24v24H0V0z"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M12,5.83L15.17,9l1.41-1.41L12,3L7.41,7.59L8.83,9L12,5.83z M12,18.17L8.83,15l-1.41,1.41L12,21l4.59-4.59L15.17,15 L12,18.17z"
    })),
    threeDots: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("path", {
      fill: "none",
      d: "M0,0h24v24H0V0z"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M6,10c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S7.1,10,6,10z M18,10c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S19.1,10,18,10z M12,10c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S13.1,10,12,10z"
    })),
    arrowDown: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("path", {
      opacity: "0.87",
      fill: "none",
      d: "M24,24H0L0,0l24,0V24z"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M16.59,8.59L12,13.17L7.41,8.59L6,10l6,6l6-6L16.59,8.59z"
    }))
  };
  var HEADER_ICONS_OPENED = {
    plus: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("path", {
      fill: "none",
      d: "M0,0h24v24H0V0z"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M19,13H5v-2h14V13z"
    })),
    plusCircle: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("path", {
      fill: "none",
      d: "M0,0h24v24H0V0z"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M12,2C6.48,2,2,6.48,2,12s4.48,10,10,10s10-4.48,10-10S17.52,2,12,2z M17,13H7v-2h10V13z"
    })),
    plusCircleOutline: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("path", {
      fill: "none",
      d: "M0,0h24v24H0V0z"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M7,11v2h10v-2H7z M12,2C6.48,2,2,6.48,2,12s4.48,10,10,10s10-4.48,10-10S17.52,2,12,2z M12,20 c-4.41,0-8-3.59-8-8s3.59-8,8-8s8,3.59,8,8S16.41,20,12,20z"
    })),
    plusBox: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("path", {
      fill: "none",
      d: "M0,0h24v24H0V0z"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M19,3H5C3.89,3,3,3.9,3,5v14c0,1.1,0.89,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M19,19H5V5h14V19z"
    }), /*#__PURE__*/React.createElement("polygon", {
      points: "17,11 7,11 7,13 17,13"
    })),
    unfold: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("path", {
      fill: "none",
      d: "M0,0h24v24H0V0z"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M7.41,18.59L8.83,20L12,16.83L15.17,20l1.41-1.41L12,14L7.41,18.59z M16.59,5.41L15.17,4L12,7.17L8.83,4L7.41,5.41L12,10L16.59,5.41z"
    })),
    threeDots: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("path", {
      fill: "none",
      d: "M0,0h24v24H0V0z"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M6,10c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S7.1,10,6,10z M18,10c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S19.1,10,18,10z M12,10c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S13.1,10,12,10z"
    })),
    arrowDown: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("path", {
      opacity: "0.87",
      fill: "none",
      d: "M24,24H0L0,0l24,0V24z"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M7.41,15.41L12,10.83l4.59,4.58L18,14l-6-6l-6,6L7.41,15.41z"
    }))
  };
  var AccordionItemEdit = /*#__PURE__*/function (_Component) {
    function AccordionItemEdit() {
      _classCallCheck(this, AccordionItemEdit);
      return _callSuper(this, AccordionItemEdit, arguments);
    }
    _inherits(AccordionItemEdit, _Component);
    return _createClass(AccordionItemEdit, [{
      key: "componentWillMount",
      value: function componentWillMount() {
        var _this$props = this.props,
          attributes = _this$props.attributes,
          setAttributes = _this$props.setAttributes,
          clientId = _this$props.clientId;

        // Apply parent style if newly inserted
        if (attributes.changed !== true) {
          var _ref = !wp.blockEditor ? select('core/editor') : select('core/block-editor'),
            getBlockRootClientId = _ref.getBlockRootClientId,
            getBlockAttributes = _ref.getBlockAttributes;
          var rootBlockId = getBlockRootClientId(clientId);
          var rootBlockAttrs = getBlockAttributes(rootBlockId);
          if (rootBlockAttrs !== null && rootBlockAttrs.needUpdate !== false) {
            Object.keys(rootBlockAttrs).map(function (attribute) {
              attributes[attribute] = rootBlockAttrs[attribute];
            });

            // Done applied, we will not do this again
            setAttributes({
              changed: true
            });
          }
        }
      }
    }, {
      key: "render",
      value: function render() {
        var _this = this;
        var _this$props2 = this.props,
          attributes = _this$props2.attributes,
          setAttributes = _this$props2.setAttributes;
        var header = attributes.header,
          headerBgColor = attributes.headerBgColor,
          headerTextColor = attributes.headerTextColor,
          headerIcon = attributes.headerIcon,
          headerIconColor = attributes.headerIconColor,
          bodyBgColor = attributes.bodyBgColor,
          bodyTextColor = attributes.bodyTextColor,
          borderStyle = attributes.borderStyle,
          borderWidth = attributes.borderWidth,
          borderColor = attributes.borderColor,
          borderRadius = attributes.borderRadius,
          marginBottom = attributes.marginBottom,
          collapsedAll = attributes.collapsedAll,
          expandAll = attributes.expandAll,
          headerTag = attributes.headerTag;
        var htmlTags = [{
          label: 'h1',
          value: 'h1'
        }, {
          label: 'h2',
          value: 'h2'
        }, {
          label: 'h3',
          value: 'h3'
        }, {
          label: 'h4',
          value: 'h4'
        }, {
          label: 'h5',
          value: 'h5'
        }, {
          label: 'h6',
          value: 'h6'
        }];
        return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(InspectorControls, null, /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Accordion Settings', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Bottom spacing', 'advanced-gutenberg'),
          value: marginBottom,
          help: __('Define space between each accordion (Frontend view only)', 'advanced-gutenberg'),
          min: 0,
          max: 50,
          onChange: function onChange(value) {
            return _this.props.updateRootBlockAttrs({
              marginBottom: value
            });
          }
        }), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Initial Collapsed', 'advanced-gutenberg'),
          help: __('Make all accordions collapsed by default.', 'advanced-gutenberg'),
          checked: collapsedAll,
          onChange: function onChange() {
            var newCollapsedAll = !collapsedAll;
            _this.props.updateRootBlockAttrs({
              collapsedAll: newCollapsedAll,
              expandAll: newCollapsedAll ? false : expandAll
            });
          }
        }), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Expand All', 'advanced-gutenberg'),
          help: __('Make all accordions expanded by default.', 'advanced-gutenberg'),
          checked: expandAll,
          onChange: function onChange() {
            var newExpandAll = !expandAll;
            _this.props.updateRootBlockAttrs({
              expandAll: newExpandAll,
              collapsedAll: newExpandAll ? false : collapsedAll
            });
          }
        }), /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Header Tag', 'advanced-gutenberg'),
          value: headerTag,
          options: htmlTags,
          onChange: function onChange(value) {
            return setAttributes({
              headerTag: value
            });
          }
        })), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Header Settings', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(BaseControl, {
          label: __('Header Icon Style', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-icon-items-wrapper"
        }, Object.keys(HEADER_ICONS).map(function (key, index) {
          return /*#__PURE__*/React.createElement("div", {
            className: "advgb-icon-item",
            key: index
          }, /*#__PURE__*/React.createElement("span", {
            className: key === headerIcon ? 'active' : '',
            onClick: function onClick() {
              return _this.props.updateRootBlockAttrs({
                headerIcon: key
              });
            }
          }, /*#__PURE__*/React.createElement("svg", {
            xmlns: "http://www.w3.org/2000/svg",
            width: "24",
            height: "24",
            viewBox: "0 0 24 24"
          }, HEADER_ICONS[key]), /*#__PURE__*/React.createElement("svg", {
            xmlns: "http://www.w3.org/2000/svg",
            width: "24",
            height: "24",
            viewBox: "0 0 24 24"
          }, HEADER_ICONS_OPENED[key])));
        }))), /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Color Settings', 'advanced-gutenberg'),
          initialOpen: false,
          colorSettings: [{
            label: __('Background Color', 'advanced-gutenberg'),
            value: headerBgColor,
            onChange: function onChange(value) {
              return _this.props.updateRootBlockAttrs({
                headerBgColor: value === undefined ? '#000' : value
              });
            }
          }, {
            label: __('Text Color', 'advanced-gutenberg'),
            value: headerTextColor,
            onChange: function onChange(value) {
              return _this.props.updateRootBlockAttrs({
                headerTextColor: value === undefined ? '#eee' : value
              });
            }
          }, {
            label: __('Icon Color', 'advanced-gutenberg'),
            value: headerIconColor,
            onChange: function onChange(value) {
              return _this.props.updateRootBlockAttrs({
                headerIconColor: value === undefined ? '#fff' : value
              });
            }
          }]
        })), /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Body Color Settings', 'advanced-gutenberg'),
          initialOpen: false,
          colorSettings: [{
            label: __('Background Color', 'advanced-gutenberg'),
            value: bodyBgColor,
            onChange: function onChange(value) {
              return _this.props.updateRootBlockAttrs({
                bodyBgColor: value
              });
            }
          }, {
            label: __('Text Color', 'advanced-gutenberg'),
            value: bodyTextColor,
            onChange: function onChange(value) {
              return _this.props.updateRootBlockAttrs({
                bodyTextColor: value
              });
            }
          }]
        }), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Border Settings', 'advanced-gutenberg'),
          initialOpen: false
        }, /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Border Style', 'advanced-gutenberg'),
          value: borderStyle,
          options: [{
            label: __('Solid', 'advanced-gutenberg'),
            value: 'solid'
          }, {
            label: __('Dashed', 'advanced-gutenberg'),
            value: 'dashed'
          }, {
            label: __('Dotted', 'advanced-gutenberg'),
            value: 'dotted'
          }],
          onChange: function onChange(value) {
            return _this.props.updateRootBlockAttrs({
              borderStyle: value
            });
          }
        }), /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Color Settings', 'advanced-gutenberg'),
          initialOpen: false,
          colorSettings: [{
            label: __('Border Color', 'advanced-gutenberg'),
            value: borderColor,
            onChange: function onChange(value) {
              return _this.props.updateRootBlockAttrs({
                borderColor: value
              });
            }
          }]
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Border width', 'advanced-gutenberg'),
          value: borderWidth,
          min: 0,
          max: 10,
          onChange: function onChange(value) {
            return _this.props.updateRootBlockAttrs({
              borderWidth: value
            });
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Border radius', 'advanced-gutenberg'),
          value: borderRadius,
          min: 0,
          max: 100,
          onChange: function onChange(value) {
            return _this.props.updateRootBlockAttrs({
              borderRadius: value
            });
          }
        }))), /*#__PURE__*/React.createElement("div", {
          className: "advgb-accordion-item"
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-accordion-header",
          style: {
            backgroundColor: headerBgColor,
            color: headerTextColor,
            borderStyle: borderStyle,
            borderWidth: borderWidth + 'px',
            borderColor: borderColor,
            borderRadius: borderRadius + 'px'
          }
        }, /*#__PURE__*/React.createElement("span", {
          className: "advgb-accordion-header-icon accordion-state"
        }, /*#__PURE__*/React.createElement("svg", {
          className: "advgb-icon-closed",
          fill: headerIconColor,
          xmlns: "http://www.w3.org/2000/svg",
          width: "24",
          height: "24",
          viewBox: "0 0 24 24"
        }, HEADER_ICONS[headerIcon]), /*#__PURE__*/React.createElement("svg", {
          className: "advgb-icon-opened",
          fill: headerIconColor,
          xmlns: "http://www.w3.org/2000/svg",
          width: "24",
          height: "24",
          viewBox: "0 0 24 24"
        }, HEADER_ICONS_OPENED[headerIcon])), /*#__PURE__*/React.createElement(RichText, {
          tagName: headerTag,
          value: header,
          onChange: function onChange(value) {
            return setAttributes({
              header: value
            });
          },
          unstableOnSplit: function unstableOnSplit() {
            return null;
          },
          className: "advgb-accordion-header-title",
          placeholder: __('Enter header…', 'advanced-gutenberg'),
          style: {
            color: 'inherit'
          },
          allowedFormats: ['core/bold', 'core/italic', 'core/image', 'core/strikethrough', 'core/text-color']
        })), /*#__PURE__*/React.createElement("div", {
          className: "advgb-accordion-body",
          style: {
            backgroundColor: bodyBgColor,
            color: bodyTextColor,
            borderStyle: borderStyle,
            borderWidth: borderWidth + 'px',
            borderColor: borderColor,
            borderRadius: borderRadius + 'px'
          }
        }, /*#__PURE__*/React.createElement(InnerBlocks, null))));
      }
    }]);
  }(Component);
  var accordionBlockIcon = /*#__PURE__*/React.createElement("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    width: "20",
    height: "20",
    viewBox: "2 2 22 22"
  }, /*#__PURE__*/React.createElement("path", {
    fill: "none",
    d: "M0,0h24v24H0V0z"
  }), /*#__PURE__*/React.createElement("rect", {
    x: "3",
    y: "17",
    width: "18",
    height: "2"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M19,12v1H5v-1H19 M21,10H3v5h18V10L21,10z"
  }), /*#__PURE__*/React.createElement("rect", {
    x: "3",
    y: "6",
    width: "18",
    height: "2"
  }));
  registerBlockType('advgb/accordion-item', {
    apiVersion: 3,
    title: __('Accordion Item - PublishPress', 'advanced-gutenberg'),
    description: __('Create a sliding accordion display for your content.', 'advanced-gutenberg'),
    icon: {
      src: accordionBlockIcon,
      foreground: typeof advgbBlocks !== 'undefined' ? advgbBlocks.color : undefined
    },
    parent: ['advgb/accordions'],
    category: 'advgb-category',
    keywords: [__('accordion', 'advanced-gutenberg'), __('list', 'advanced-gutenberg'), __('faq', 'advanced-gutenberg')],
    attributes: {
      header: {
        type: 'string',
        default: __('Header text', 'advanced-gutenberg')
      },
      headerBgColor: {
        type: 'string',
        default: '#000'
      },
      headerTextColor: {
        type: 'string',
        default: '#eee'
      },
      headerIcon: {
        type: 'string',
        default: 'plusCircle'
      },
      headerIconColor: {
        type: 'string',
        default: '#fff'
      },
      bodyBgColor: {
        type: 'string'
      },
      bodyTextColor: {
        type: 'string'
      },
      borderStyle: {
        type: 'string',
        default: 'solid'
      },
      borderWidth: {
        type: 'number',
        default: 1
      },
      borderColor: {
        type: 'string'
      },
      borderRadius: {
        type: 'number',
        default: 2
      },
      marginBottom: {
        type: 'number',
        default: 15
      },
      collapsedAll: {
        type: 'boolean',
        default: false
      },
      expandAll: {
        type: 'boolean',
        default: false
      },
      headerTag: {
        type: 'string',
        default: 'h4'
      },
      changed: {
        type: 'boolean',
        default: false
      },
      rootBlockId: {
        type: 'string',
        default: ''
      }
    },
    supports: {
      anchor: true
    },
    edit: compose([withDispatch(function (dispatch, _ref2, _ref3) {
      var clientId = _ref2.clientId;
      var select = _ref3.select;
      var _select = select('core/block-editor'),
        getBlockRootClientId = _select.getBlockRootClientId,
        getBlocksByClientId = _select.getBlocksByClientId;
      var _dispatch = dispatch('core/block-editor'),
        updateBlockAttributes = _dispatch.updateBlockAttributes;
      var rootID = getBlockRootClientId(clientId);
      var accordionBlock = getBlocksByClientId(rootID);
      return {
        updateRootBlockAttrs: function updateRootBlockAttrs(attrs) {
          updateBlockAttributes(rootID, attrs);
          times(accordionBlock[0].innerBlocks.length, function (n) {
            updateBlockAttributes(accordionBlock[0].innerBlocks[n].clientId, attrs);
          });
        }
      };
    })])(AccordionItemEdit),
    save: function save(_ref4) {
      var attributes = _ref4.attributes;
      var header = attributes.header,
        headerBgColor = attributes.headerBgColor,
        headerTextColor = attributes.headerTextColor,
        headerIcon = attributes.headerIcon,
        headerIconColor = attributes.headerIconColor,
        bodyBgColor = attributes.bodyBgColor,
        bodyTextColor = attributes.bodyTextColor,
        borderStyle = attributes.borderStyle,
        borderWidth = attributes.borderWidth,
        borderColor = attributes.borderColor,
        borderRadius = attributes.borderRadius,
        marginBottom = attributes.marginBottom,
        headerTag = attributes.headerTag;
      return /*#__PURE__*/React.createElement("div", {
        className: "advgb-accordion-item",
        style: {
          marginBottom: marginBottom
        }
      }, /*#__PURE__*/React.createElement("div", {
        className: "advgb-accordion-header",
        style: {
          backgroundColor: headerBgColor,
          color: headerTextColor,
          borderStyle: borderStyle,
          borderWidth: borderWidth + 'px',
          borderColor: borderColor,
          borderRadius: !!borderRadius ? borderRadius + 'px' : undefined
        }
      }, /*#__PURE__*/React.createElement("span", {
        className: "advgb-accordion-header-icon accordion-state"
      }, /*#__PURE__*/React.createElement("svg", {
        className: "advgb-icon-closed",
        fill: headerIconColor,
        xmlns: "http://www.w3.org/2000/svg",
        width: "24",
        height: "24",
        viewBox: "0 0 24 24"
      }, HEADER_ICONS[headerIcon]), /*#__PURE__*/React.createElement("svg", {
        className: "advgb-icon-opened",
        fill: headerIconColor,
        xmlns: "http://www.w3.org/2000/svg",
        width: "24",
        height: "24",
        viewBox: "0 0 24 24"
      }, HEADER_ICONS_OPENED[headerIcon])), /*#__PURE__*/React.createElement(RichText.Content, {
        tagName: headerTag,
        className: "advgb-accordion-header-title",
        style: {
          color: 'inherit'
        },
        value: header
      })), /*#__PURE__*/React.createElement("div", {
        className: "advgb-accordion-body",
        style: {
          backgroundColor: bodyBgColor,
          color: bodyTextColor,
          borderStyle: borderStyle + ' !important',
          borderWidth: borderWidth + 'px !important',
          borderColor: borderColor + ' !important',
          borderTop: 'none !important',
          borderRadius: !!borderRadius ? borderRadius + 'px !important' : undefined
        }
      }, /*#__PURE__*/React.createElement(InnerBlocks.Content, null)));
    },
    deprecated: [{
      attributes: {
        header: {
          type: 'string',
          default: __('Header text', 'advanced-gutenberg')
        },
        headerBgColor: {
          type: 'string',
          default: '#000'
        },
        headerTextColor: {
          type: 'string',
          default: '#eee'
        },
        headerIcon: {
          type: 'string',
          default: 'unfold'
        },
        headerIconColor: {
          type: 'string',
          default: '#fff'
        },
        bodyBgColor: {
          type: 'string'
        },
        bodyTextColor: {
          type: 'string'
        },
        borderStyle: {
          type: 'string',
          default: 'solid'
        },
        borderWidth: {
          type: 'number',
          default: 1
        },
        borderColor: {
          type: 'string'
        },
        borderRadius: {
          type: 'number',
          default: 2
        },
        marginBottom: {
          type: 'number',
          default: 15
        },
        collapsedAll: {
          type: 'boolean',
          default: false
        },
        headerTag: {
          type: 'string',
          default: 'h4'
        },
        changed: {
          type: 'boolean',
          default: false
        },
        rootBlockId: {
          type: 'string',
          default: ''
        }
      },
      save: function save(_ref5) {
        var attributes = _ref5.attributes;
        var header = attributes.header,
          headerBgColor = attributes.headerBgColor,
          headerTextColor = attributes.headerTextColor,
          headerIcon = attributes.headerIcon,
          headerIconColor = attributes.headerIconColor,
          bodyBgColor = attributes.bodyBgColor,
          bodyTextColor = attributes.bodyTextColor,
          borderStyle = attributes.borderStyle,
          borderWidth = attributes.borderWidth,
          borderColor = attributes.borderColor,
          borderRadius = attributes.borderRadius,
          marginBottom = attributes.marginBottom,
          headerTag = attributes.headerTag;
        return /*#__PURE__*/React.createElement("div", {
          className: "advgb-accordion-item",
          style: {
            marginBottom: marginBottom
          }
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-accordion-header",
          style: {
            backgroundColor: headerBgColor,
            color: headerTextColor,
            borderStyle: borderStyle,
            borderWidth: borderWidth + 'px',
            borderColor: borderColor,
            borderRadius: !!borderRadius ? borderRadius + 'px' : undefined
          }
        }, /*#__PURE__*/React.createElement("span", {
          className: "advgb-accordion-header-icon"
        }, /*#__PURE__*/React.createElement("svg", {
          fill: headerIconColor,
          xmlns: "http://www.w3.org/2000/svg",
          width: "24",
          height: "24",
          viewBox: "0 0 24 24"
        }, HEADER_ICONS[headerIcon])), /*#__PURE__*/React.createElement(RichText.Content, {
          tagName: headerTag,
          className: "advgb-accordion-header-title",
          style: {
            color: 'inherit'
          },
          value: header
        })), /*#__PURE__*/React.createElement("div", {
          className: "advgb-accordion-body",
          style: {
            backgroundColor: bodyBgColor,
            color: bodyTextColor,
            borderStyle: borderStyle + ' !important',
            borderWidth: borderWidth + 'px !important',
            borderColor: borderColor + ' !important',
            borderTop: 'none !important',
            borderRadius: !!borderRadius ? borderRadius + 'px !important' : undefined
          }
        }, /*#__PURE__*/React.createElement(InnerBlocks.Content, null)));
      },
      supports: {
        anchor: true
      }
    }, {
      attributes: {
        header: {
          type: 'string',
          default: 'Header text'
        },
        headerBgColor: {
          type: 'string',
          default: '#000'
        },
        headerTextColor: {
          type: 'string',
          default: '#eee'
        },
        headerIcon: {
          type: 'string',
          default: 'unfold'
        },
        headerIconColor: {
          type: 'string',
          default: '#fff'
        },
        bodyBgColor: {
          type: 'string'
        },
        bodyTextColor: {
          type: 'string'
        },
        borderStyle: {
          type: 'string',
          default: 'solid'
        },
        borderWidth: {
          type: 'number',
          default: 0
        },
        borderColor: {
          type: 'string'
        },
        borderRadius: {
          type: 'number',
          default: 2
        },
        marginBottom: {
          type: 'number',
          default: 15
        },
        collapsedAll: {
          type: 'boolean',
          default: false
        },
        changed: {
          type: 'boolean',
          default: false
        },
        rootBlockId: {
          type: 'string',
          default: ''
        }
      },
      save: function save(_ref6) {
        var attributes = _ref6.attributes;
        var header = attributes.header,
          headerBgColor = attributes.headerBgColor,
          headerTextColor = attributes.headerTextColor,
          headerIcon = attributes.headerIcon,
          headerIconColor = attributes.headerIconColor,
          bodyBgColor = attributes.bodyBgColor,
          bodyTextColor = attributes.bodyTextColor,
          borderStyle = attributes.borderStyle,
          borderWidth = attributes.borderWidth,
          borderColor = attributes.borderColor,
          borderRadius = attributes.borderRadius,
          marginBottom = attributes.marginBottom;
        return /*#__PURE__*/React.createElement("div", {
          className: "advgb-accordion-item",
          style: {
            marginBottom: marginBottom
          }
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-accordion-header",
          style: {
            backgroundColor: headerBgColor,
            color: headerTextColor,
            borderStyle: borderStyle,
            borderWidth: !!borderWidth ? borderWidth + 'px' : undefined,
            borderColor: borderColor,
            borderRadius: !!borderRadius ? borderRadius + 'px' : undefined
          }
        }, /*#__PURE__*/React.createElement("span", {
          className: "advgb-accordion-header-icon"
        }, /*#__PURE__*/React.createElement("svg", {
          fill: headerIconColor,
          xmlns: "http://www.w3.org/2000/svg",
          width: "24",
          height: "24",
          viewBox: "0 0 24 24"
        }, HEADER_ICONS[headerIcon])), /*#__PURE__*/React.createElement("h4", {
          className: "advgb-accordion-header-title",
          style: {
            color: 'inherit'
          }
        }, header)), /*#__PURE__*/React.createElement("div", {
          className: "advgb-accordion-body",
          style: {
            backgroundColor: bodyBgColor,
            color: bodyTextColor,
            borderStyle: borderStyle + ' !important',
            borderWidth: !!borderWidth ? borderWidth + 'px !important' : undefined,
            borderColor: borderColor + ' !important',
            borderTop: 'none !important',
            borderRadius: !!borderRadius ? borderRadius + 'px !important' : undefined
          }
        }, /*#__PURE__*/React.createElement(InnerBlocks.Content, null)));
      },
      supports: {
        anchor: true
      }
    }, {
      attributes: {
        header: {
          type: 'string',
          default: 'Header text'
        },
        headerBgColor: {
          type: 'string',
          default: '#000'
        },
        headerTextColor: {
          type: 'string',
          default: '#eee'
        },
        headerIcon: {
          type: 'string',
          default: 'unfold'
        },
        headerIconColor: {
          type: 'string',
          default: '#fff'
        },
        bodyBgColor: {
          type: 'string'
        },
        bodyTextColor: {
          type: 'string'
        },
        borderStyle: {
          type: 'string',
          default: 'solid'
        },
        borderWidth: {
          type: 'number',
          default: 0
        },
        borderColor: {
          type: 'string'
        },
        borderRadius: {
          type: 'number',
          default: 2
        },
        marginBottom: {
          type: 'number',
          default: 15
        },
        collapsedAll: {
          type: 'boolean',
          default: false
        },
        changed: {
          type: 'boolean',
          default: false
        },
        rootBlockId: {
          type: 'string',
          default: ''
        }
      },
      save: function save(_ref7) {
        var attributes = _ref7.attributes;
        var header = attributes.header,
          headerBgColor = attributes.headerBgColor,
          headerTextColor = attributes.headerTextColor,
          headerIcon = attributes.headerIcon,
          headerIconColor = attributes.headerIconColor,
          bodyBgColor = attributes.bodyBgColor,
          bodyTextColor = attributes.bodyTextColor,
          borderStyle = attributes.borderStyle,
          borderWidth = attributes.borderWidth,
          borderColor = attributes.borderColor,
          borderRadius = attributes.borderRadius,
          marginBottom = attributes.marginBottom;
        return /*#__PURE__*/React.createElement("div", {
          className: "advgb-accordion-item",
          style: {
            marginBottom: marginBottom
          }
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-accordion-header",
          style: {
            backgroundColor: headerBgColor,
            color: headerTextColor,
            borderStyle: borderStyle,
            borderWidth: !!borderWidth ? borderWidth + 'px' : undefined,
            borderColor: borderColor,
            borderRadius: !!borderRadius ? borderRadius + 'px' : undefined
          }
        }, /*#__PURE__*/React.createElement("span", {
          className: "advgb-accordion-header-icon"
        }, /*#__PURE__*/React.createElement("svg", {
          fill: headerIconColor,
          xmlns: "http://www.w3.org/2000/svg",
          width: "24",
          height: "24",
          viewBox: "0 0 24 24"
        }, HEADER_ICONS[headerIcon])), /*#__PURE__*/React.createElement("h4", {
          className: "advgb-accordion-header-title",
          style: {
            color: 'inherit'
          }
        }, header)), /*#__PURE__*/React.createElement("div", {
          className: "advgb-accordion-body",
          style: {
            backgroundColor: bodyBgColor,
            color: bodyTextColor,
            borderStyle: borderStyle,
            borderWidth: !!borderWidth ? borderWidth + 'px' : undefined,
            borderColor: borderColor,
            borderRadius: !!borderRadius ? borderRadius + 'px' : undefined
          }
        }, /*#__PURE__*/React.createElement(InnerBlocks.Content, null)));
      }
    }]
  });
})(wp.i18n, wp.blocks, wp.element, wp.blockEditor, wp.components, wp.compose, lodash);

/***/ },

/***/ "./assets/blocks/advaccordion/block.jsx"
/*!**********************************************!*\
  !*** ./assets/blocks/advaccordion/block.jsx ***!
  \**********************************************/
() {

function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
(function (wpI18n, wpBlocks, wpElement, wpBlockEditor, wpComponents, wpCompose, lodash) {
  wpBlockEditor = wp.blockEditor || wp.editor;
  var __ = wpI18n.__;
  var Component = wpElement.Component,
    Fragment = wpElement.Fragment;
  var registerBlockType = wpBlocks.registerBlockType;
  var _wpBlockEditor = wpBlockEditor,
    InspectorControls = _wpBlockEditor.InspectorControls,
    BlockControls = _wpBlockEditor.BlockControls,
    PanelColorSettings = _wpBlockEditor.PanelColorSettings,
    InnerBlocks = _wpBlockEditor.InnerBlocks;
  var RangeControl = wpComponents.RangeControl,
    PanelBody = wpComponents.PanelBody,
    BaseControl = wpComponents.BaseControl,
    SelectControl = wpComponents.SelectControl,
    ToggleControl = wpComponents.ToggleControl,
    ToolbarGroup = wpComponents.ToolbarGroup,
    ToolbarButton = wpComponents.ToolbarButton;
  var _wp$data = wp.data,
    withDispatch = _wp$data.withDispatch,
    select = _wp$data.select,
    dispatch = _wp$data.dispatch;
  var compose = wpCompose.compose;
  var times = lodash.times;
  var HEADER_ICONS = {
    plus: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("path", {
      fill: "none",
      d: "M0,0h24v24H0V0z"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6V13z"
    })),
    plusCircle: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("path", {
      fill: "none",
      d: "M0,0h24v24H0V0z"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M12,2C6.48,2,2,6.48,2,12s4.48,10,10,10s10-4.48,10-10S17.52,2,12,2z M17,13h-4v4h-2v-4H7v-2h4V7h2v4h4V13z"
    })),
    plusCircleOutline: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("path", {
      fill: "none",
      d: "M0,0h24v24H0V0z"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M13,7h-2v4H7v2h4v4h2v-4h4v-2h-4V7z M12,2C6.48,2,2,6.48,2,12s4.48,10,10,10s10-4.48,10-10S17.52,2,12,2z M12,20 c-4.41,0-8-3.59-8-8s3.59-8,8-8s8,3.59,8,8S16.41,20,12,20z"
    })),
    plusBox: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("path", {
      fill: "none",
      d: "M0,0h24v24H0V0z"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M19,3H5C3.89,3,3,3.9,3,5v14c0,1.1,0.89,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M19,19H5V5h14V19z"
    }), /*#__PURE__*/React.createElement("polygon", {
      points: "11,17 13,17 13,13 17,13 17,11 13,11 13,7 11,7 11,11 7,11 7,13 11,13"
    })),
    unfold: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("path", {
      fill: "none",
      d: "M0,0h24v24H0V0z"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M12,5.83L15.17,9l1.41-1.41L12,3L7.41,7.59L8.83,9L12,5.83z M12,18.17L8.83,15l-1.41,1.41L12,21l4.59-4.59L15.17,15 L12,18.17z"
    })),
    threeDots: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("path", {
      fill: "none",
      d: "M0,0h24v24H0V0z"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M6,10c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S7.1,10,6,10z M18,10c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S19.1,10,18,10z M12,10c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S13.1,10,12,10z"
    })),
    arrowDown: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("path", {
      opacity: "0.87",
      fill: "none",
      d: "M24,24H0L0,0l24,0V24z"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M16.59,8.59L12,13.17L7.41,8.59L6,10l6,6l6-6L16.59,8.59z"
    }))
  };
  var HEADER_ICONS_OPENED = {
    plus: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("path", {
      fill: "none",
      d: "M0,0h24v24H0V0z"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M19,13H5v-2h14V13z"
    })),
    plusCircle: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("path", {
      fill: "none",
      d: "M0,0h24v24H0V0z"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M12,2C6.48,2,2,6.48,2,12s4.48,10,10,10s10-4.48,10-10S17.52,2,12,2z M17,13H7v-2h10V13z"
    })),
    plusCircleOutline: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("path", {
      fill: "none",
      d: "M0,0h24v24H0V0z"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M7,11v2h10v-2H7z M12,2C6.48,2,2,6.48,2,12s4.48,10,10,10s10-4.48,10-10S17.52,2,12,2z M12,20 c-4.41,0-8-3.59-8-8s3.59-8,8-8s8,3.59,8,8S16.41,20,12,20z"
    })),
    plusBox: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("path", {
      fill: "none",
      d: "M0,0h24v24H0V0z"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M19,3H5C3.89,3,3,3.9,3,5v14c0,1.1,0.89,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M19,19H5V5h14V19z"
    }), /*#__PURE__*/React.createElement("polygon", {
      points: "17,11 7,11 7,13 17,13"
    })),
    unfold: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("path", {
      fill: "none",
      d: "M0,0h24v24H0V0z"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M7.41,18.59L8.83,20L12,16.83L15.17,20l1.41-1.41L12,14L7.41,18.59z M16.59,5.41L15.17,4L12,7.17L8.83,4L7.41,5.41L12,10L16.59,5.41z"
    })),
    threeDots: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("path", {
      fill: "none",
      d: "M0,0h24v24H0V0z"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M6,10c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S7.1,10,6,10z M18,10c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S19.1,10,18,10z M12,10c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S13.1,10,12,10z"
    })),
    arrowDown: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("path", {
      opacity: "0.87",
      fill: "none",
      d: "M24,24H0L0,0l24,0V24z"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M7.41,15.41L12,10.83l4.59,4.58L18,14l-6-6l-6,6L7.41,15.41z"
    }))
  };
  var previewImageData = 'data:image/png;base64, ';
  var AccordionsEdit = /*#__PURE__*/function (_Component) {
    function AccordionsEdit() {
      var _this;
      _classCallCheck(this, AccordionsEdit);
      _this = _callSuper(this, AccordionsEdit, arguments);
      _this.state = {
        isBlockIdSet: false // @since 3.2.3
      };
      _this.updateAccordionAttrs = _this.updateAccordionAttrs.bind(_this);
      return _this;
    }
    _inherits(AccordionsEdit, _Component);
    return _createClass(AccordionsEdit, [{
      key: "componentWillMount",
      value: function componentWillMount() {
        var _this$props = this.props,
          attributes = _this$props.attributes,
          setAttributes = _this$props.setAttributes;
        var currentBlockConfig = advgbDefaultConfig['advgb-accordions'];

        // No override attributes of blocks inserted before
        if (attributes.changed !== true) {
          if (_typeof(currentBlockConfig) === 'object' && currentBlockConfig !== null) {
            Object.keys(currentBlockConfig).map(function (attribute) {
              if (typeof attributes[attribute] === 'boolean') {
                attributes[attribute] = !!currentBlockConfig[attribute];
              } else {
                attributes[attribute] = currentBlockConfig[attribute];
              }
            });
          }

          // Finally set changed attribute to true, so we don't modify anything again
          setAttributes({
            changed: true
          });
        }
      }
    }, {
      key: "componentDidMount",
      value: function componentDidMount() {}
    }, {
      key: "componentDidUpdate",
      value: function componentDidUpdate() {
        var _this$props2 = this.props,
          setAttributes = _this$props2.setAttributes,
          clientId = _this$props2.clientId;
        var _ref = !wp.blockEditor ? dispatch('core/editor') : dispatch('core/block-editor'),
          removeBlock = _ref.removeBlock;
        var _ref2 = !wp.blockEditor ? select('core/editor') : select('core/block-editor'),
          getBlockOrder = _ref2.getBlockOrder;
        var childBlocks = getBlockOrder(clientId);

        // @since 3.2.3 - https://github.com/publishpress/PublishPress-Blocks/issues/1389
        if (!this.state.isBlockIdSet) {
          setAttributes({
            rootBlockId: clientId,
            id: 'advgb-accordions-' + clientId
          });
          this.props.updateAccordionAttributes({
            rootBlockId: clientId
          });
          this.setState({
            isBlockIdSet: true
          });
        }
        if (childBlocks.length < 1) {
          // No accordion left, we will remove this block
          // removeBlock(clientId);
        }
      }
    }, {
      key: "updateAccordionAttrs",
      value: function updateAccordionAttrs(attrs) {
        var _this$props3 = this.props,
          setAttributes = _this$props3.setAttributes,
          clientId = _this$props3.clientId;
        var _ref3 = !wp.blockEditor ? dispatch('core/editor') : dispatch('core/block-editor'),
          updateBlockAttributes = _ref3.updateBlockAttributes;
        var _ref4 = !wp.blockEditor ? select('core/editor') : select('core/block-editor'),
          getBlockOrder = _ref4.getBlockOrder;
        var childBlocks = getBlockOrder(clientId);
        setAttributes(attrs);
        childBlocks.forEach(function (childBlockId) {
          return updateBlockAttributes(childBlockId, attrs);
        });
      }
    }, {
      key: "resyncAccordions",
      value: function resyncAccordions() {
        var _this$props4 = this.props,
          attributes = _this$props4.attributes,
          clientId = _this$props4.clientId;
        var _ref5 = !wp.blockEditor ? dispatch('core/editor') : dispatch('core/block-editor'),
          updateBlockAttributes = _ref5.updateBlockAttributes;
        var _ref6 = !wp.blockEditor ? select('core/editor') : select('core/block-editor'),
          getBlockOrder = _ref6.getBlockOrder;
        var childBlocks = getBlockOrder(clientId);
        childBlocks.forEach(function (childBlockId) {
          return updateBlockAttributes(childBlockId, attributes);
        });
      }
    }, {
      key: "render",
      value: function render() {
        var _this2 = this;
        var _this$props5 = this.props,
          attributes = _this$props5.attributes,
          setAttributes = _this$props5.setAttributes;
        var id = attributes.id,
          headerBgColor = attributes.headerBgColor,
          headerTextColor = attributes.headerTextColor,
          headerIcon = attributes.headerIcon,
          headerIconColor = attributes.headerIconColor,
          bodyBgColor = attributes.bodyBgColor,
          bodyTextColor = attributes.bodyTextColor,
          borderStyle = attributes.borderStyle,
          borderWidth = attributes.borderWidth,
          borderColor = attributes.borderColor,
          borderRadius = attributes.borderRadius,
          marginBottom = attributes.marginBottom,
          collapsedAll = attributes.collapsedAll,
          expandAll = attributes.expandAll,
          isPreview = attributes.isPreview;
        var accordionsClassName = [id, 'advgb-accordions-wrapper'].filter(Boolean).join(' ');
        return isPreview ? /*#__PURE__*/React.createElement("img", {
          alt: __('Advanced Accordion', 'advanced-gutenberg'),
          width: "100%",
          src: previewImageData
        }) : /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(BlockControls, null, /*#__PURE__*/React.createElement(ToolbarGroup, null, /*#__PURE__*/React.createElement(ToolbarButton, {
          icon: "update",
          onClick: function onClick() {
            return _this2.resyncAccordions();
          },
          label: __('Refresh', 'advanced-gutenberg')
        }))), /*#__PURE__*/React.createElement(InspectorControls, null, /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Accordion Settings', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Bottom spacing', 'advanced-gutenberg'),
          value: marginBottom,
          help: __('Define space between each accordion (Frontend view only)', 'advanced-gutenberg'),
          min: 0,
          max: 50,
          onChange: function onChange(value) {
            return _this2.updateAccordionAttrs({
              marginBottom: value
            });
          }
        }), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Initial Collapsed', 'advanced-gutenberg'),
          help: __('Make all accordions collapsed by default.', 'advanced-gutenberg'),
          checked: collapsedAll,
          onChange: function onChange() {
            var newCollapsedAll = !collapsedAll;
            var attrs = {
              collapsedAll: newCollapsedAll,
              expandAll: newCollapsedAll ? false : expandAll
            };
            setAttributes(attrs);
            _this2.props.updateAccordionAttributes(attrs);
          }
        }), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Expand All', 'advanced-gutenberg'),
          help: __('Make all accordions expanded by default.', 'advanced-gutenberg'),
          checked: expandAll,
          onChange: function onChange() {
            var newExpandAll = !expandAll;
            var attrs = {
              expandAll: newExpandAll,
              collapsedAll: newExpandAll ? false : collapsedAll
            };
            setAttributes(attrs);
            _this2.props.updateAccordionAttributes(attrs);
          }
        })), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Header Settings', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(BaseControl, {
          label: __('Header Icon Style', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-icon-items-wrapper"
        }, Object.keys(HEADER_ICONS).map(function (key, index) {
          return /*#__PURE__*/React.createElement("div", {
            className: "advgb-icon-item",
            key: index
          }, /*#__PURE__*/React.createElement("span", {
            className: key === headerIcon ? 'active' : '',
            onClick: function onClick() {
              return _this2.updateAccordionAttrs({
                headerIcon: key
              });
            }
          }, /*#__PURE__*/React.createElement("svg", {
            xmlns: "http://www.w3.org/2000/svg",
            width: "24",
            height: "24",
            viewBox: "0 0 24 24"
          }, HEADER_ICONS[key]), /*#__PURE__*/React.createElement("svg", {
            xmlns: "http://www.w3.org/2000/svg",
            width: "24",
            height: "24",
            viewBox: "0 0 24 24"
          }, HEADER_ICONS_OPENED[key])));
        }))), /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Color Settings', 'advanced-gutenberg'),
          initialOpen: false,
          colorSettings: [{
            label: __('Background Color', 'advanced-gutenberg'),
            value: headerBgColor,
            onChange: function onChange(value) {
              return _this2.updateAccordionAttrs({
                headerBgColor: value === undefined ? '#000' : value
              });
            }
          }, {
            label: __('Text Color', 'advanced-gutenberg'),
            value: headerTextColor,
            onChange: function onChange(value) {
              return _this2.updateAccordionAttrs({
                headerTextColor: value === undefined ? '#eee' : value
              });
            }
          }, {
            label: __('Icon Color', 'advanced-gutenberg'),
            value: headerIconColor,
            onChange: function onChange(value) {
              return _this2.updateAccordionAttrs({
                headerIconColor: value === undefined ? '#fff' : value
              });
            }
          }]
        })), /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Body Color Settings', 'advanced-gutenberg'),
          initialOpen: false,
          colorSettings: [{
            label: __('Background Color', 'advanced-gutenberg'),
            value: bodyBgColor,
            onChange: function onChange(value) {
              return _this2.updateAccordionAttrs({
                bodyBgColor: value
              });
            }
          }, {
            label: __('Text Color', 'advanced-gutenberg'),
            value: bodyTextColor,
            onChange: function onChange(value) {
              return _this2.updateAccordionAttrs({
                bodyTextColor: value
              });
            }
          }]
        }), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Border Settings', 'advanced-gutenberg'),
          initialOpen: false
        }, /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Border Style', 'advanced-gutenberg'),
          value: borderStyle,
          options: [{
            label: __('Solid', 'advanced-gutenberg'),
            value: 'solid'
          }, {
            label: __('Dashed', 'advanced-gutenberg'),
            value: 'dashed'
          }, {
            label: __('Dotted', 'advanced-gutenberg'),
            value: 'dotted'
          }],
          onChange: function onChange(value) {
            return _this2.updateAccordionAttrs({
              borderStyle: value
            });
          }
        }), /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Color Settings', 'advanced-gutenberg'),
          initialOpen: false,
          colorSettings: [{
            label: __('Border Color', 'advanced-gutenberg'),
            value: borderColor,
            onChange: function onChange(value) {
              return _this2.updateAccordionAttrs({
                borderColor: value
              });
            }
          }]
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Border width', 'advanced-gutenberg'),
          value: borderWidth,
          min: 0,
          max: 10,
          onChange: function onChange(value) {
            return _this2.updateAccordionAttrs({
              borderWidth: value
            });
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Border radius', 'advanced-gutenberg'),
          value: borderRadius,
          min: 0,
          max: 100,
          onChange: function onChange(value) {
            return _this2.updateAccordionAttrs({
              borderRadius: value
            });
          }
        }))), /*#__PURE__*/React.createElement("div", {
          className: accordionsClassName
        }, /*#__PURE__*/React.createElement(InnerBlocks, {
          template: [['advgb/accordion-item']],
          templateLock: false,
          allowedBlocks: ['advgb/accordion-item']
        })));
      }
    }]);
  }(Component);
  var accordionBlockIcon = /*#__PURE__*/React.createElement("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    width: "20",
    height: "20",
    viewBox: "2 2 22 22"
  }, /*#__PURE__*/React.createElement("path", {
    d: "M0 0h24v24H0z",
    fill: "none"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M2 20h20v-4H2v4zm2-3h2v2H4v-2zM2 4v4h20V4H2zm4 3H4V5h2v2zm-4 7h20v-4H2v4zm2-3h2v2H4v-2z"
  }));
  var blockAttrs = {
    id: {
      type: 'string'
    },
    headerBgColor: {
      type: 'string',
      default: '#000'
    },
    headerTextColor: {
      type: 'string',
      default: '#eee'
    },
    headerIcon: {
      type: 'string',
      default: 'plusCircle'
    },
    headerIconColor: {
      type: 'string',
      default: '#fff'
    },
    bodyBgColor: {
      type: 'string'
    },
    bodyTextColor: {
      type: 'string'
    },
    borderStyle: {
      type: 'string',
      default: 'solid'
    },
    borderWidth: {
      type: 'number',
      default: 1
    },
    borderColor: {
      type: 'string'
    },
    borderRadius: {
      type: 'number',
      default: 2
    },
    marginBottom: {
      type: 'number',
      default: 15
    },
    collapsedAll: {
      type: 'boolean',
      default: false
    },
    expandAll: {
      type: 'boolean',
      default: false
    },
    changed: {
      type: 'boolean',
      default: false
    },
    needUpdate: {
      type: 'boolean',
      default: true
    },
    isPreview: {
      type: 'boolean',
      default: false
    },
    rootBlockId: {
      type: 'string',
      default: ''
    }
  };
  var deprecatedBlockAttrs = _objectSpread({}, blockAttrs);
  delete deprecatedBlockAttrs.expandAll;
  registerBlockType('advgb/accordions', {
    apiVersion: 3,
    title: __('Accordion - PublishPress', 'advanced-gutenberg'),
    description: __('Create a sliding accordion display for your content.', 'advanced-gutenberg'),
    icon: {
      src: accordionBlockIcon,
      foreground: typeof advgbBlocks !== 'undefined' ? advgbBlocks.color : undefined
    },
    category: 'advgb-category',
    keywords: [__('accordion', 'advanced-gutenberg'), __('advanced accordion', 'advanced-gutenberg'), __('list', 'advanced-gutenberg'), __('faq', 'advanced-gutenberg')],
    attributes: blockAttrs,
    example: {
      attributes: {
        isPreview: true
      }
    },
    edit: compose(withDispatch(function (dispatch, _ref7, _ref8) {
      var clientId = _ref7.clientId;
      var select = _ref8.select;
      var _select = select('core/block-editor'),
        getBlock = _select.getBlock;
      var _dispatch = dispatch('core/block-editor'),
        updateBlockAttributes = _dispatch.updateBlockAttributes;
      var block = getBlock(clientId);
      return {
        updateAccordionAttributes: function updateAccordionAttributes(attrs) {
          times(block.innerBlocks.length, function (n) {
            updateBlockAttributes(block.innerBlocks[n].clientId, attrs);
          });
        }
      };
    }))(AccordionsEdit),
    save: function save(_ref9) {
      var attributes = _ref9.attributes;
      var collapsedAll = attributes.collapsedAll,
        expandAll = attributes.expandAll,
        id = attributes.id;
      var accordionsClassName = [id, 'advgb-accordion-wrapper'].filter(Boolean).join(' ');
      return /*#__PURE__*/React.createElement("div", {
        className: accordionsClassName,
        "data-collapsed": collapsedAll ? collapsedAll : undefined,
        "data-expand-all": expandAll ? expandAll : undefined
      }, /*#__PURE__*/React.createElement(InnerBlocks.Content, null));
    },
    deprecated: [{
      attributes: deprecatedBlockAttrs,
      save: function save(_ref10) {
        var attributes = _ref10.attributes;
        var collapsedAll = attributes.collapsedAll,
          id = attributes.id;
        var accordionsClassName = [id, 'advgb-accordion-wrapper'].filter(Boolean).join(' ');
        return /*#__PURE__*/React.createElement("div", {
          className: accordionsClassName,
          "data-collapsed": collapsedAll ? collapsedAll : undefined
        }, /*#__PURE__*/React.createElement(InnerBlocks.Content, null));
      }
    }, {
      attributes: {
        headerBgColor: {
          type: 'string',
          default: '#000'
        },
        headerTextColor: {
          type: 'string',
          default: '#eee'
        },
        headerIcon: {
          type: 'string',
          default: 'unfold'
        },
        headerIconColor: {
          type: 'string',
          default: '#fff'
        },
        bodyBgColor: {
          type: 'string'
        },
        bodyTextColor: {
          type: 'string'
        },
        borderStyle: {
          type: 'string',
          default: 'solid'
        },
        borderWidth: {
          type: 'number',
          default: 1
        },
        borderColor: {
          type: 'string'
        },
        borderRadius: {
          type: 'number',
          default: 2
        },
        marginBottom: {
          type: 'number',
          default: 15
        },
        collapsedAll: {
          type: 'boolean',
          default: false
        },
        changed: {
          type: 'boolean',
          default: false
        },
        needUpdate: {
          type: 'boolean',
          default: true
        },
        isPreview: {
          type: 'boolean',
          default: false
        },
        rootBlockId: {
          type: 'string',
          default: ''
        }
      },
      save: function save(_ref11) {
        var attributes = _ref11.attributes;
        var collapsedAll = attributes.collapsedAll;
        return /*#__PURE__*/React.createElement("div", {
          className: "advgb-accordion-wrapper",
          "data-collapsed": collapsedAll ? collapsedAll : undefined
        }, /*#__PURE__*/React.createElement(InnerBlocks.Content, null));
      }
    }, {
      attributes: _objectSpread(_objectSpread({}, blockAttrs), {}, {
        borderWidth: {
          type: 'number',
          default: 0
        }
      }),
      save: function save(_ref12) {
        var attributes = _ref12.attributes;
        var collapsedAll = attributes.collapsedAll;
        return /*#__PURE__*/React.createElement("div", {
          className: "advgb-accordion-wrapper",
          "data-collapsed": collapsedAll ? collapsedAll : undefined
        }, /*#__PURE__*/React.createElement(InnerBlocks.Content, null));
      }
    }, {
      attributes: _objectSpread(_objectSpread({}, blockAttrs), {}, {
        rootBlockId: {
          type: 'string',
          default: ''
        }
      }),
      save: function save(_ref13) {
        var attributes = _ref13.attributes;
        var collapsedAll = attributes.collapsedAll;
        return /*#__PURE__*/React.createElement("div", {
          className: "advgb-accordion-wrapper",
          "data-collapsed": collapsedAll ? collapsedAll : undefined
        }, /*#__PURE__*/React.createElement(InnerBlocks.Content, null));
      }
    }]
  });
})(wp.i18n, wp.blocks, wp.element, wp.blockEditor, wp.components, wp.compose, lodash);

/***/ },

/***/ "./assets/blocks/advbutton/block.jsx"
/*!*******************************************!*\
  !*** ./assets/blocks/advbutton/block.jsx ***!
  \*******************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _0_adv_components_components_jsx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../0-adv-components/components.jsx */ "./assets/blocks/0-adv-components/components.jsx");
/* harmony import */ var _0_adv_components_icon_class_jsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../0-adv-components/icon-class.jsx */ "./assets/blocks/0-adv-components/icon-class.jsx");
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }


(function (wpI18n, wpBlocks, wpElement, wpBlockEditor, wpComponents) {
  wpBlockEditor = wp.blockEditor || wp.editor;
  var __ = wpI18n.__;
  var Component = wpElement.Component,
    Fragment = wpElement.Fragment;
  var registerBlockType = wpBlocks.registerBlockType,
    createBlock = wpBlocks.createBlock;
  var _wpBlockEditor = wpBlockEditor,
    InspectorControls = _wpBlockEditor.InspectorControls,
    RichText = _wpBlockEditor.RichText,
    PanelColorSettings = _wpBlockEditor.PanelColorSettings,
    URLInput = _wpBlockEditor.URLInput;
  var BaseControl = wpComponents.BaseControl,
    RangeControl = wpComponents.RangeControl,
    PanelBody = wpComponents.PanelBody,
    ToggleControl = wpComponents.ToggleControl,
    SelectControl = wpComponents.SelectControl,
    Button = wpComponents.Button;

  // Preview style images
  var previewImageData = '';
  var previewImageDataDefault = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAABoCAYAAADYQu11AAAJXUlEQVR4nO3dW4gVdRwH8K/t5obm4hWvaGhuLrgUeuxJ66kLBt0eukBB9Va9FNlLl5eCHoqoHuyxpB66PWhBgr4l9lJrUBqaoqR4RVNxU3JbKb7L/8jZ8X88M7u//8x/Zr4fOCC77tzO/zvzv80MRERERERERERERERERERERERERERERERERERERERERESkniZZ7vXg4GDog9gNYA2AVQD6AfQBuAXALAC97vcilkYAXADwF4A/AewHsBfALwB+dr8PptFomAUndjMBPAFgPYC7AExTMZYcdbsyyM9yAPe0rHoIwA4AWwF8CeBsrF/MDRFsQzv3AtgM4DiAjQAeUMglMtNcudzoyulmV26jE1vQ2ZR4GMBPALa5f/dEsF0infS48rrNVekftm4aT0RMQR9w1aDNrh0uUlYNV453uHJduBiCzjPhe65zY20E2yNiZa0r1+8WXTMtOui3AtgJYIN6zKWiWK5fdeX81qJ2scigsxNjl6vmiFRdw5X3B4rYz6KC/gyALW7sW6Quel25fybv/S0i6C8D+ERVdampblf+X85z9/MO+lMA3o9p2EGkAJNcDp7Oa9V5Bv1BAJsUcpFRzMGnLhfB5RX0FQA+B9Cl71jkqi6Xi/7QhySPoN8E4Bt1vIl4MRdfu5wEk0fQ3wKwUt+xSFvMx9shD0/ooA/k3bsoUlIvhZwuGzLok9xdPRpGE+mMOfk4VGd1yKCzN3FdwOWLVM1ad9ebuZBBf13FUCSz10IcslBBv0e3moqMSyPEwytCBf35QMsVqQPz/IQI+qyi7tARqYj17hl1ZkIE/XEAk1XiRMZtssuRmRBBf0jfr8iEmfa+W49xcxrf3cbLDG716tWpVnHlyhWcOnUKly9fxtmz7Z/s29fXh2nTxj6w9sCBA7hw4ULbv5k/fz4WLFgw5mfHjx/HiRMnRv/d09ODlSsnNsFwaGgI+/fvx5IlSzB79uwJLavT/vT29mLq1Kmj65k8eWwF7/z587h06RJOnz6NkZF0j0Vv/Y6Gh4dH94PfQycDAwNj1t96TCN3t8vTPxabaR30RpWf2trV1XU1jHPnzsWhQ4dSFbY6YcAXLlyIKVOmtN3r6dOnj354LM+cOYNjx46lDjwxuEuXLsXevXurfGR7XJ52WizMuup+h/HyosWCzCt3d7cm/jUtWrQIy5cvv27Ik3jFZ02FJ4gsuI5ly5bltWtFud1qvdaldIXx8gqza9euMatmNXTx4sVjCjGvLHPmzClLVTCoiTQHWFPiCWLfvn24ePFi6r9jrYBNngoff7M8WQe9z3h50WABZBWTBbIVC1seBY1NhOTJB23a7s22eDuHDx8e/ST5wtqpLU482flCznY42+Otx4fbO3PmzGv6I4jHds+ePZmq8VwOty/LCaJEbrPaVOuq+y3Gy4uKr8DXverO/WebPIltb7ahkydBnrD4M1692anWild237I64QmCJ5AKWmy1S9ZBn2W8vOhlufpUEa/mDGgrBthXY2jFK7Dv/7BmkPXkyfWzc66CzN41aB30Sr8E0ddhxGpynbHpknTy5MlUR4Q1JN/xmzFjRse/5VBnK/adsDOwYqIN+o3Gy4sG25Vsw7bilSttoa4qXw/7uXPnUu+tL+hpeu05nyEZdg55snOuQsyCbt3A/LcqYe80iYadTKx61rnq7msX8+SX5Zj4OtHStLe5DnYUrlgxtmO6Yp1zZtVF6yt6LeqxzZlddW+fF41h5ky3JLbXK9JJGm3Q/zJeXpSas7o4vbKivb2lwR58nnhbcX5Dchi0pMyCbn3a+5OjHcbLLIRvzDo5H50FirPjdu/eXYVdzsw3/ZfHhFfTtLUdTkRKyjqt+ODBg+jv7x/Ttm92znFZybn2JXLEalOtr+jtZ2lUQLurBzvqWvkKaqeqZHKICiUZumMTJilNr3lT8uafdsvshPcd+DrnskzHjdAfVptkHfR9xsuLjq8Q+saRkzoVOKsCn7fkiY/mzZuXais4XOnb7yy99k08uR45cu0F0HcCLRGzPFkH/Vfj5ZWSbwYdJ4K0a8+zSZA8EfDqVIaeY95qmrySspaTHIpM4rHw/R/OqBtvTYa3Dvs650rMLE/WQf+ZJ1fjZUYlzZWXAU2OD/PKwnYkZ5I1sTrPdqRv3jfHicuAoeQ9AEk8sXF/k+PaDDh/xvn5ybYzTxi+ZWXha16VFHM0aLXp1p1xvEn+hxBPsSxac053MugMtO/KywKbHONl2HkHHD/Xw6o/r5RlwW1ljSR5Ywt/xo/vRObDcXGLfgnOb+B6S9wJB5cjk4dOINBbVL6tQtDTPHWGV6B2c7oZfrYZO4U6qfn0lLKN0fM48HiwAywr/h0706yaKjx2XB6H2ErcRt9iubAQz4z7iuU1wHKjwuo678663lAQr3S8Svk653xY5Uz7iKQYHT16dHR/s3Qisk3OW1M73QqbVfNEW1LD7g2rZkJc0TlpZmuoV8sUjZ09nZ4Z14oFmOPsbJuzfZq84jWfQ1eVaZvcD36snxk3HvyOeMzTNh0istV68pnpC90GB6/2HbDqvs1y2SI1ch+A7dzdRqNhsteh3tSy3bLHUKRGBpshtxTyJYvvqHSKZBYkNyGDvsXqUbUiNbHTure9KWTQ/wPwAkc7Aq5DpCqYkxddbsyFDDrxtq4PVRRFOvoIwG+hDlPooNObAPbksB6RsmI+3gi57XkEndP4HuMQaw7rEimbIZcPs+muPnkEnfiSrKc5PySn9YmUAfPwlMtHUHkFnb4D8GyozgaRkmEOnnO5CC7PoNPnAF5R2KXm/nM5+Cyvw5B30OkDdybTsJvU0Ygr/x/kue9FBJ02uZte6v2aE6mbIVfuN+W930UFnb4HcCeA3wvcBpG8/O7K+/dFHPEigw738DvenvO+qvJSUSOufDeKfHhq0UGHGz/cwIe6APgxgu0RsfKjK9cbQo+TdxJD0Js4/W8dgEf4/oQ4NklkXFh+H3XlOdi01ixiCjrcsMMWV825zz1/rvKPpZJKGHbl9X5XfjfHNIwc85votrsPX4PyJID1AO4CcHME2yZCfwPY4R799AWfXhXrUSnDKyd58Da6D7d3DYBVAPoB3AaAbwGYxTcBWT8aS8QNif3tPofda5I4ZfUX9x4DdSKLiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIjUG4D/AWML67DzayWbAAAAAElFTkSuQmCC';
  var previewImageDataOutlined = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAABoCAYAAADYQu11AAAKkElEQVR4nO2de4wdVR3Hv2trFR+ktyVgSUS6QimJBMJd6gvwD7tKSyJIUpQIWpq4hYJParYUTQ1KH2J9JRTYP2ojUXQ30cVojd39p7UkSrnE+kgL0qViUiKRLuligAquOfodM0zO7Ny5e87MmbnfTzI5d++dOXPm7O8755zfeUEIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCdCc9Lp+62Wz6zsS5AC4BcDGA8wEsAXA2gIUATuXvQrjkFQAnADwH4CiAJwAcAvAYgAP83RutVsuZcEJnAYCPA1gJ4HIAb5UZiwKZSxs0x7kA+mO3ngKwD8BuAD8GcDzUf0zIQv8QgJsBrADwhtj3jwPYC+AggCcBPA3gHwAmAbxaYnpFPZkDoAHgNABnATgHwIUsdJYCuJLHtwD8CsC9APaElhOhVd1Neq4CsJFVdFC843xjmgw8NvuUCuGEM1kgfYwl/RxG+iiAuwA8BGB6NjdyVXV/nZNY3HABq0E/o8iPUfDmLXoFgF0SuQiMY7TLFbTT2/ldH+14H+26dEIQuqmW303nxqUAngVwK4DFALZI3KIiGDvdSru9lXZ8Ke36G4nmZ+GULXTT3tkPYD3TYto35wG4B8DJktMmRCecpP0aO95Bu/4S7fycsnK0TKEbB0aL1ZynALwPwDoAz5eYJiFcYez4FgDvpX330d6vLCOHyxL6agCj7PseZb/470pKixA+eYT2Hbf31UXneBlC/wKAnezauxPANSrFRc15nnZ+Jz3zO6mDwiha6NcD2M7Ppo9802y7H4SoCNO093VMrtHBDUUlvUihf4RdET18m91X4L2FCAVj91+kDr5PXXinKKGbEUQPsNpiuiC+K7MTXcx3qIM51MX5vrOiCKG/EcBIzBGxsYB7ChE6G2O6GKZOvFGE0I0D4l2c+XOj2uRC/BejgzWcDWf08TWf2eJb6BewPW7Gq18n77oQr+EFAJ+kPj7vc7isT6H3cISQ6UYbAvBbj/cSoqqY8SP3Uyc7XE80i/ApdONNvIxjftUuFyKdO2Jj46/2kU8+hX4Hwy2qsgsxI0Yfm3mCl0LRl9D7OdX0WVZLhBAzM0S99HGOu1N8Cf1mhqa//EX9g4XI5EX2ryOmH2f4EPpCztB5lSN/hBDtsYu6Wck16oIWullWZx6AMQDPeIhfiLryDHUzjzpyhg+hX8XwQZmjELn5IS9w6n13LXQzjO8D/DzuOG6fTLd5mOV8BwGsykjLmCW+5RnXDFquGYz93psjnWnHGOO630FcWc+znOk/Yrl2mL81cvxP49cfYX60Q/L+g21eVxZmAdR/U0fOhsW6Fnof18Y6XNO13hqcjDDMlT7bNbZuYjnzZox5ZcujVfztOF86eQQPxjlc0zw1nvc/UUd9riJ1LfSLGO53HG+INGnMeY20zmxlnuRZ93uApW5WDSFJs8Zif4Thha4idC30pQwPOY63DHoSR7TmV5xeGqr4X8ncabW40cELAqwZhF4V74RIP0tdReha6EsYPu443hAwIt9gSUdWe90VE5aXjzneaYl/POXcaDuhtSm/D1ni6k85N+6DGUh54UV5lkyvLR/RYQ1pawcviNCJ9HOeq3S6FvrZDJ90HG8o2ByM3V51j/wWSYZYC9qW+H6C3/XxcztxZTFWM3/JEYZnuYrQtdAXMnzOcbwhM9lFz2pjwPKym2CtYSZaKefY4suiUbP2+gmGzjYUdS30KGEnMs6rKjaHUZW6EX1ga7okS/E0xlPyr53mUPIF2+ywNhAiU0xTsEJ/PcM67rKyyjJBZyKHUdcVW/t4JMez2oTeTpt7m0XsgzVxzgUv9H8xnOc43jKwDfKItwNH2M7s5qq7rV08kTNPbNuFttPenkzsVR5RB+dcJPCpjPPaxrXQo4Sd6jje0BihgXZ7+7xs0npChivuJA1e6JETbmHGeVUnGtmVZyim8MM2S1OhNzbct4pEBWWwQj/KsLRdIx1i6ztOlh5VN6jZkuweA/MkT2lqq2bb4p2Jay1NgMg5lzeuEIgKj6ddpcW10J9g6KyjPzDSSo+kl9hmXFnGb/u9Ck0DWxs7zyAiW0+GLc4srk1xzlWxvR6NiHM28My10A8z9L7zRInYjNDWj5wky+BcGXzR2Dzs7Xq+l6c8dx6vfURa330V2+qR0A9nnNc2roV+kOH7HcdbNWxdRgMztOdtJc9kRYQ+ZClJe9tYKzDtHFt87TIyw/DaKvFupvWgqzS7FvoBAC+zRD/Tcdyh0E7J27KIvcHpmwOJ77amDPSoSv/8ZIq4Bvi8ydK9NzZPPfniS4srD7bmVZU4jTu3vMz8c4Jrob8EYC8/f7DCmW2jwRIoKfTxlJLXZrCNxKIPx1OquRMpE0xCZSglvZFDLLloRNoItn5Hfom1FXXCGa6gLvdST07wsZTUQwyv8xB3kSQHzBy3zNCanGFMd9pY7iwmHBp8kaydRS0kGvziqqkymeKcqwKfYBpHXabVh9B/wiGwZm3qRR7iD4VWygysOEM04HZLl5Gc54fGhg4EO8Spq67nDHT6oi2TtzH/TrqepOND6GbQzG7u/bzaQ/xls4GlRZbII8ZpyGklXtQu7WO8VRV5xDifpZ/PZXueyGm2gPniq+StmnPuRupmt+sZoE43dGs2/+84NqX5rwH8HcBibeIgRCanAHgKwBkAPsxFItFquWnN+NqpZQ89hmdoqSUh2uLT1Mujkchd4nOTxWjTuNsBzNf/WohU5sc2V9zsI5t8Cn2Uq8Gat9RdHu8jRNX5OnWy37W3PcKn0E2X1DoAr9Dh8h6P9xKiqiwDcBN1cgt14xyfQjf8kTtEGk/ij1SFF+I1vBnAA9SH2Xn4D76yx7fQDV/hzhPG+77TtadfiIrSw92Gl1AfX/b5GEUI/SX2D5sFIz/qy9kgRMXYzOm8U9SHs+GuNooQOrjzxA3c+9kMYPhsQfcVIkQ+Rx0YPVxfxM5GRQnd8HOO/Jlmu/2mAu8tRCgYu/82dbCGuvBOkUIHHQ+38fMOAF9Vm110CT209x18XKODHxT16EULHXybrWG1ZROAn8obL2rOfNr5Jtr9GuqgMMoQumEXgKvpiDDhY+xPFKJuLKN9x+19V9HPWJbQDb9kJvyZXW8PA/gmgLeUmCYhXGHs+G7a9WLa+TLafeGUKXRw8TszpXE7/76NK8l+BsCbSk6bEJ1wCu3X2PF6Xr+ddu5ssce8lC10sP9wPZcdepiLVXyPU/Y21HjtOVEvFtFej9J+F9Gem7Rvr/3kWYQg9Agz/O8yDqoxk3BPB7CFi9ibififqvmKNaJ6LKJdmur432ivp9N+r6E9exvWmoe5gWXtNGfvjHLxCjMpZkXsAAcX/AbA7wH8hRlsRt39s8bbNYvymEOvuVmd9e0AzgVwEUUc37/ALP/0CwD3ctGVoAhN6HH28FjAhSZXAricmVvnDSJEdXgBwD7WOB/kAqJBErLQI0zm3cPDpPcSABdT7Gbrp3dwU8eGBt8ID0xR0Ob4K7dJOsQuswOcXiqEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQonsB8B+hLjoFK98OlAAAAABJRU5ErkJggg==';
  var previewImageDataSquaredOutline = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAABoCAYAAADYQu11AAAE1ElEQVR4nO3d4VHrOhCG4T13bgO0EErYlHAoIZSQlEBKgBJICaSEnBJQCaSFlHDPiLuZ8YhVbDkOTLLvM8OfYBJs9FnSWjYCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAmH5Nudeq+h/tCJhOSmmSjP7D3wS4ff9eaA8nHSkAAU06OqZHBwIg6EAABB0IgKADARB0IACCDgRA0IEACDoQAEEHAiDoQAAEHQiAoAMBEHQgAIIOBEDQgQAIOhAAQQcCIOhAAAQdCICgAwEQdCCASz0F9toMfeLmQUReRGSfUtrWNlLVnYj8Ll5+SCn9OfEzTyLyXLy8Tim92PdnIvJx5nH9k1J6UNVXEVme+V59+5P3X+1zZsW387FLIrJJKR2GfFjxPwP29vn7YhvvR/Mx637+2v6GoRD0NnfHMKpqbqiPZWOLzgL+bCGvWdjXs6pu7IQ2KPAmB/dNRObRj/dQDN3Hyw15p6p317oDU1PVHPBdT8hLucf/sBNEC1XVt2s6Pj+JoFfkf4XT/bLeIxVbzyYYAt8Emw48jdyXOztptpwgsoVNedCDoftAKaWkqmvrsboW3zHnsynCl/+AU5m7f87FT7zXSkRWznt5c/eTc3H7uWXlhJdPjNtjnaHz+y6ceoRY2O8bh/F5+J/3tzwJo4MevUGlwYceutvUxQttLrTNuyEXO2HZa3MrqnXV3qvPzk4gqCDo52vpfW7R0jnZ7W3UUGU9sLfNckTd486Kc6gg6A0qBaOTw9oAFs4uDprK2AjJO37ee5bKE6yOHA2EQNAHUtXc+F6LrfcRr8kWvAJadY2Bwwv6kKLcixP2pzMKgjeNYlxFsUDDkxvzqrFwdFMq8+J94zHximhD5tv5M3LB8b14/dlOHhTnOujRx9naNDP6/PxH2Tx/7fwOb9GLpCWCPs5xVdcH1d6fZRX8cqowcy6DhkbQK8oFM7Zopuw9QjeoyvLfWWPV3JuPNy0rTik9OkP1Y3Eu/BJlIehtar2HFeq6vMbV1/i971/D1MCbCw+pmh95VzLGzK8fK8W51tV2N4mgt/Ma4ZfryM42fQ1uqgb/3bwK+6DKt12u9Pa7pWr/yUYX3nX58HN1IegX410yWtbm87ZeuzwRHK5kWefG6Ulntpy2yo6Ft83gW1cd20pxLjyC3q6357WAlmHPPcu7rQv/lOeydseXt9DjKq7PWyi9cOUT23t500kOuL1W3icudsI4N6je9Co8rqMP1FnTXQa9dkPF2rnGm9/jta+3s6H/5uI7NZGU0sbuPCtvbFG7nXToirWHiS5ZruyzuSJiCHrFgAUzYj2Qu6bb7nZbVYanp+wnbPDfJq9tV9XDyJVpB3uIx1RTlYMV53bM0f/H0H283Cjnp54wk3s6W7019BLP1ntE0rVIKa1tf1sCm4/Rfd+tsCPUbpoJiR693brvmXFd1oDvbW4+c3q843PobuKeatvf+dTPjBvpWJwLf7PLlwcZnKMz3J30fYGAPrNkC7XOxtAdCICgAwEQdCAAgg4EQNCBAAg6EABBBwIg6EAABB0IgKADARB0IACCDgRA0IEACDoQAEEHAiDoQAAEHQjgUo+SGvJgRQDfhB4dAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgPBH5CxnLf2zPqO7iAAAAAElFTkSuQmCC';
  var previewImageDataSquared = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAABoCAYAAADYQu11AAAFXklEQVR4nO3c6ytsURzG8XUOUUSIXCNEFK/M//8XjFcUEUWuESKKyOmZ0z5nz7L22WuNfWjm9/3UlMbc9p71rPtsBwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJt+VHnU9Xr9nXIEVKdWq1WS0Z98J0DnI+iAAQQdMICgAwYQdMAAgg4YQNABAwg6YABBBwwg6IABBB0wgKADBhB0wACCDhhA0AEDCDpgAEEHDCDogAEEHTCAoAMGEHTAAIIOGEDQAQO6+ZKd29jYiHrc29ubu7y8dM/Pz+7m5qbwccvLy25gYKDpvv39fXd/f1/4nMnJSTc1NdV039nZmTs/P2/83dvb69bW1qI+Z5GHhwe3t7fn5ubm3Ojo6Kdeq+x4BgcHXX9/f+N9enp6mv53d3fnnp6e3NXVlXt9fY16v/x39PLy0jgOfQ9l1tfXm94/f04tIegJurq6/oRxfHzcHR4eRhU2SxTw6elp19fXV3jUQ0NDjZvO5fX1tTs9PY0OvCi4CwsLbmdnx/rpjkbXvUUqyGq5u7upKzMzMzNuaWnpnyH3qcVXT0UVRAq9x+Li4lcdWtujlBbY3Nxs+oe6obOzs02FWC3L2NiYya6g7zPDAfWUVEHs7u66x8fH6OepV6AhD+e/HEGPpAKoLqYKZJ4K21cUNA0R/MrHFYzds7F4kaOjo8bNFwpr2VhcVNmFQq5xuMbj+fOjzzsyMvJhPkJ0bre3t5O68Xodfb6UCsIiuu4JQgXeetddx68xuU9jb42h/UpQFZbuU+utSbU8teyh1yqjCkIVCIoR9E9KaX06kVpzBTRPAQ71GPLUAoceo55BauWp99fkHIoR9AShCSN1ky3T0MV3cXERdUbUQwqdv+Hh4dLnaqkzT3MnmgxEGEGPpHGlxrB5arliC3WnCs2w397eRh9tKOgxs/baz+CHXUuempzDR0zGFSjbRKNJJnU9LXfdQ+NiVX4p5yQ0iRYz3tZ7aKJwZWWl6X4m58Jo0VuQ7eyyPj7/bgqzdrr5NF63PknqI+gtyHZ1aXsls73fSzP4qnjztL/BXwa1jmqvQGjN2t+PrgKl3XFbW1vf/nm/Q2j7r86JWtPY3o42IvlStxUfHBy41dXVprF9Njmn1/L32ltEi56gqPXQRF1eqKCWdSX9JSrXJkt3GsL4YmbNM/6Pf4pes4x+dxCanEvZjtvJCHqiUCEMrSP7ygpcVQX+q/kVn0xMTER9Ci1Xho47ZdY+o8r1+Pj4w/2hCtQigv4fhHbQaSNI0XheQwK/IlDr1A4zx/qpqd+SqpfjL0X6dC5Cj9GOulZ7MvrpcGhyDgQ9WUzLq4D668NqWTSO1E6yjLrzGkeG9n1rnbgdKJT6DYBPFZuO11/XVsB1n/bn+2NnVRih10oRGl6Bybho2Z5uP+gKdKjlVYH113gVdv0CTrd/UddfLWW70GdVj8T/YYvu0y1UkYVoXbyKeQntb9D7Mgn3F0EvEHPVGbVARXu6FX6NGctC7cuuntJua/Q6DzofmgBLpedpMq2qoYrOnV5PS2yM0X8j6C1Sd73sCjNq6fR/jUVjWhd1OU9OTtr2qjX67JqfKLvCTF4rV5iJkVW08/Pzlb5uuyLoiTTZU3bNuDwVfK2za2yu8anf4mXXoeuUbZs6Dt2qvmZcK/Qd6ZzHDh062Y8qj61er79bP6FAlWq1WiUZZdYdMICgAwYQdMAAgg4YQNABAwg6YABBBwwg6IABBB0wgKADBhB0wACCDhhA0AEDCDpgAEEHDCDogAEEHTCAoAMGEHQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIDWOed+AS3cOPlbAUbbAAAAAElFTkSuQmCC';
  function advgb_relAttribute(attributes) {
    var values = [attributes.noreferrer ? 'noreferrer' : '', attributes.nofollow ? 'nofollow' : ''].filter(Boolean).join(' ');
    return values;
  }
  var AdvButton = /*#__PURE__*/function (_Component) {
    function AdvButton() {
      var _this;
      _classCallCheck(this, AdvButton);
      _this = _callSuper(this, AdvButton, arguments);
      _this.state = {
        showPopup: false,
        iconSelected: '',
        selectedIcon: false,
        iconThemeSelected: 'outlined',
        selectedIconTheme: false,
        isBlockIdSet: false // @since 3.2.3
      };
      _this.togglePopup = _this.togglePopup.bind(_this);
      _this.handleIcon = _this.handleIcon.bind(_this);
      _this.handleIconTheme = _this.handleIconTheme.bind(_this);
      return _this;
    }
    _inherits(AdvButton, _Component);
    return _createClass(AdvButton, [{
      key: "componentWillMount",
      value: function componentWillMount() {
        var _this$props = this.props,
          attributes = _this$props.attributes,
          setAttributes = _this$props.setAttributes;
        var currentBlockConfig = advgbDefaultConfig['advgb-button'];

        // No override attributes of blocks inserted before
        if (attributes.changed !== true) {
          if (_typeof(currentBlockConfig) === 'object' && currentBlockConfig !== null) {
            Object.keys(currentBlockConfig).map(function (attribute) {
              if (typeof attributes[attribute] === 'boolean') {
                attributes[attribute] = !!currentBlockConfig[attribute];
              } else {
                attributes[attribute] = currentBlockConfig[attribute];
              }
            });
          }

          // Finally set changed attribute to true, so we don't modify anything again
          setAttributes({
            changed: true
          });
        }
      }
    }, {
      key: "componentDidMount",
      value: function componentDidMount() {
        var setAttributes = this.props.setAttributes;

        // Reset attributes when Pro is not available
        if (advgbBlocks.advgb_pro !== 'undefined' && advgbBlocks.advgb_pro !== '1') {
          setAttributes({
            noreferrer: true,
            nofollow: false
          });
        }
      }
    }, {
      key: "componentDidUpdate",
      value: function componentDidUpdate() {
        var _this$state = this.state,
          iconSelected = _this$state.iconSelected,
          selectedIcon = _this$state.selectedIcon,
          iconThemeSelected = _this$state.iconThemeSelected,
          selectedIconTheme = _this$state.selectedIconTheme;
        var _this$props2 = this.props,
          setAttributes = _this$props2.setAttributes,
          clientId = _this$props2.clientId;

        // @since 3.2.3 - https://github.com/publishpress/PublishPress-Blocks/issues/1389
        if (!this.state.isBlockIdSet) {
          setAttributes({
            id: 'advgbbtn-' + clientId
          });
          this.setState({
            isBlockIdSet: true
          });
        }
        if (selectedIcon) {
          this.setState({
            selectedIcon: false
          });
          setAttributes({
            icon: iconSelected,
            iconTheme: iconThemeSelected
          });
        }
        if (selectedIconTheme) {
          this.setState({
            selectedIconTheme: false
          });
          setAttributes({
            iconTheme: iconThemeSelected
          });
        }
      }
    }, {
      key: "togglePopup",
      value: function togglePopup() {
        var showPopup = this.state.showPopup;
        this.setState({
          showPopup: !showPopup
        });
      }
    }, {
      key: "handleIcon",
      value: function handleIcon(iconValue) {
        this.setState({
          iconSelected: iconValue,
          selectedIcon: true
        });
      }
    }, {
      key: "handleIconTheme",
      value: function handleIconTheme(iconThemeValue) {
        this.setState({
          iconThemeSelected: iconThemeValue,
          selectedIconTheme: true
        });
      }
    }, {
      key: "render",
      value: function render() {
        var _this2 = this;
        var listBorderStyles = [{
          label: __('None', 'advanced-gutenberg'),
          value: 'none'
        }, {
          label: __('Solid', 'advanced-gutenberg'),
          value: 'solid'
        }, {
          label: __('Dotted', 'advanced-gutenberg'),
          value: 'dotted'
        }, {
          label: __('Dashed', 'advanced-gutenberg'),
          value: 'dashed'
        }, {
          label: __('Double', 'advanced-gutenberg'),
          value: 'double'
        }, {
          label: __('Groove', 'advanced-gutenberg'),
          value: 'groove'
        }, {
          label: __('Ridge', 'advanced-gutenberg'),
          value: 'ridge'
        }, {
          label: __('Inset', 'advanced-gutenberg'),
          value: 'inset'
        }, {
          label: __('Outset', 'advanced-gutenberg'),
          value: 'outset'
        }];
        var _this$props3 = this.props,
          attributes = _this$props3.attributes,
          setAttributes = _this$props3.setAttributes,
          isSelected = _this$props3.isSelected,
          className = _this$props3.className,
          blockID = _this$props3.clientId;
        var showPopup = this.state.showPopup;
        var id = attributes.id,
          align = attributes.align,
          url = attributes.url,
          urlOpenNewTab = attributes.urlOpenNewTab,
          title = attributes.title,
          text = attributes.text,
          bgColor = attributes.bgColor,
          textColor = attributes.textColor,
          textSize = attributes.textSize,
          marginTop = attributes.marginTop,
          marginRight = attributes.marginRight,
          marginBottom = attributes.marginBottom,
          marginLeft = attributes.marginLeft,
          paddingTop = attributes.paddingTop,
          paddingRight = attributes.paddingRight,
          paddingBottom = attributes.paddingBottom,
          paddingLeft = attributes.paddingLeft,
          borderWidth = attributes.borderWidth,
          borderColor = attributes.borderColor,
          borderRadius = attributes.borderRadius,
          borderStyle = attributes.borderStyle,
          hoverTextColor = attributes.hoverTextColor,
          hoverBgColor = attributes.hoverBgColor,
          hoverShadowColor = attributes.hoverShadowColor,
          hoverShadowH = attributes.hoverShadowH,
          hoverShadowV = attributes.hoverShadowV,
          hoverShadowBlur = attributes.hoverShadowBlur,
          hoverShadowSpread = attributes.hoverShadowSpread,
          hoverOpacity = attributes.hoverOpacity,
          transitionSpeed = attributes.transitionSpeed,
          iconDisplay = attributes.iconDisplay,
          icon = attributes.icon,
          iconSize = attributes.iconSize,
          iconColor = attributes.iconColor,
          iconTheme = attributes.iconTheme,
          iconPosition = attributes.iconPosition,
          iconSpacing = attributes.iconSpacing,
          noreferrer = attributes.noreferrer,
          nofollow = attributes.nofollow,
          isPreview = attributes.isPreview;
        var isStyleSquared = className.indexOf('-squared') > -1;
        var isStyleOutlined = className.indexOf('-outlined') > -1;
        var isStyleSquaredOutline = className.indexOf('-squared-outline') > -1;
        var hoverColorSettings = [{
          label: __('Background Color', 'advanced-gutenberg'),
          value: hoverBgColor,
          onChange: function onChange(value) {
            return setAttributes({
              hoverBgColor: value === undefined ? '#2196f3' : value
            });
          }
        }, {
          label: __('Text Color', 'advanced-gutenberg'),
          value: hoverTextColor,
          onChange: function onChange(value) {
            return setAttributes({
              hoverTextColor: value === undefined ? '#fff' : value
            });
          }
        }, {
          label: __('Shadow Color', 'advanced-gutenberg'),
          value: hoverShadowColor,
          onChange: function onChange(value) {
            return setAttributes({
              hoverShadowColor: value === undefined ? '#ccc' : value
            });
          }
        }];
        if (isStyleSquaredOutline) {
          hoverColorSettings.shift();
          previewImageData = previewImageDataSquaredOutline;
        } else if (isStyleOutlined) {
          hoverColorSettings.shift();
          previewImageData = previewImageDataOutlined;
        } else if (isStyleSquared) {
          previewImageData = previewImageDataSquared;
        } else {
          previewImageData = previewImageDataDefault;
        }
        var iconClass = ['material-icons', iconTheme !== '' && "-".concat(iconTheme)].filter(Boolean).join('');
        return isPreview ? /*#__PURE__*/React.createElement("img", {
          alt: __('Advanced Button', 'advanced-gutenberg'),
          width: "100%",
          src: previewImageData
        }) : /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("span", {
          className: "".concat(className, " align").concat(align),
          style: {
            display: 'inline-block'
          }
        }, /*#__PURE__*/React.createElement("span", {
          className: "wp-block-advgb-button_link ".concat(id),
          rel: advgb_relAttribute(attributes)
        }, iconDisplay && /*#__PURE__*/React.createElement("i", {
          className: iconClass
        }, icon), /*#__PURE__*/React.createElement(RichText, {
          tagName: "span",
          placeholder: __('Add text…', 'advanced-gutenberg'),
          value: text,
          onChange: function onChange(value) {
            return setAttributes({
              text: value
            });
          },
          allowedFormats: ['core/bold', 'core/italic', 'core/strikethrough'],
          isSelected: isSelected,
          keepPlaceholderOnFocus: true
        }))), /*#__PURE__*/React.createElement("style", null, ".".concat(id, " {\n                        font-size: ").concat(textSize, "px;\n                        color: ").concat(textColor, " !important;\n                        background-color: ").concat(bgColor, " !important;\n                        margin: ").concat(marginTop, "px ").concat(marginRight, "px ").concat(marginBottom, "px ").concat(marginLeft, "px;\n                        padding: ").concat(paddingTop, "px ").concat(paddingRight, "px ").concat(paddingBottom, "px ").concat(paddingLeft, "px;\n                        border-width: ").concat(borderWidth, "px !important;\n                        border-color: ").concat(borderColor, " !important;\n                        border-radius: ").concat(borderRadius, "px !important;\n                        border-style: ").concat(borderStyle, " ").concat(borderStyle !== 'none' && '!important', ";\n                    }\n                    .").concat(id, ":hover {\n                        color: ").concat(hoverTextColor, " !important;\n                        background-color: ").concat(hoverBgColor, " !important;\n                        box-shadow: ").concat(hoverShadowH, "px ").concat(hoverShadowV, "px ").concat(hoverShadowBlur, "px ").concat(hoverShadowSpread, "px ").concat(hoverShadowColor, ";\n                        transition: all ").concat(transitionSpeed, "s ease;\n                        opacity: ").concat(hoverOpacity / 100, "\n                    }\n                    .").concat(id, " i {\n                        font-size: ").concat(iconSize, "px;\n                        float: ").concat(iconPosition, ";\n                    }"), iconColor && ".".concat(id, " i {\n                            color: ").concat(iconColor, ";\n                        }"), iconPosition === 'left' && ".".concat(id, " i {\n                            margin-right: ").concat(iconSpacing, "px;\n                        }"), iconPosition === 'right' && ".".concat(id, " i {\n                            margin-left: ").concat(iconSpacing, "px;\n                        }"), advgbBlocks.advgb_pro !== '1' && ".".concat(id, " i {\n                            display: none !important;\n                        }")), showPopup ? /*#__PURE__*/React.createElement(_0_adv_components_icon_class_jsx__WEBPACK_IMPORTED_MODULE_1__.IconListPopupHook, {
          content: "iconpopup",
          closePopup: function closePopup() {
            if (showPopup) {
              _this2.togglePopup();
            }
          },
          onSelectIcon: this.handleIcon,
          onSelectIconTheme: this.handleIconTheme,
          selectedIcon: icon,
          selectedIconTheme: iconTheme
        }) : null, /*#__PURE__*/React.createElement(InspectorControls, null, /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Button link', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(BaseControl, {
          label: [__('Link URL', 'advanced-gutenberg'), url && /*#__PURE__*/React.createElement("a", {
            href: url || '#',
            key: "link_url",
            target: "_blank",
            style: {
              float: 'right'
            }
          }, __('Preview', 'advanced-gutenberg'))]
        }, /*#__PURE__*/React.createElement(URLInput, {
          value: url,
          onChange: function onChange(value) {
            return setAttributes({
              url: value
            });
          },
          autoFocus: false,
          isFullWidth: true,
          hasBorder: true
        })), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Open in new tab', 'advanced-gutenberg'),
          checked: !!urlOpenNewTab,
          onChange: function onChange() {
            return setAttributes({
              urlOpenNewTab: !attributes.urlOpenNewTab
            });
          }
        })), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Text/Color', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Text size', 'advanced-gutenberg'),
          value: textSize || '',
          onChange: function onChange(size) {
            return setAttributes({
              textSize: size
            });
          },
          min: 10,
          max: 100,
          beforeIcon: "editor-textcolor",
          allowReset: true
        }), !isStyleOutlined && /*#__PURE__*/React.createElement(_0_adv_components_components_jsx__WEBPACK_IMPORTED_MODULE_0__.AdvColorControl, {
          label: __('Background Color', 'advanced-gutenberg'),
          value: bgColor,
          onChange: function onChange(value) {
            return setAttributes({
              bgColor: value
            });
          }
        }), /*#__PURE__*/React.createElement(_0_adv_components_components_jsx__WEBPACK_IMPORTED_MODULE_0__.AdvColorControl, {
          label: __('Text Color', 'advanced-gutenberg'),
          value: textColor,
          onChange: function onChange(value) {
            return setAttributes({
              textColor: value
            });
          }
        })), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Border', 'advanced-gutenberg'),
          initialOpen: false
        }, !isStyleSquared && /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Border radius', 'advanced-gutenberg'),
          value: borderRadius || '',
          onChange: function onChange(value) {
            return setAttributes({
              borderRadius: value
            });
          },
          min: 0,
          max: 100
        }), /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Border style', 'advanced-gutenberg'),
          value: borderStyle,
          options: listBorderStyles,
          onChange: function onChange(value) {
            return setAttributes({
              borderStyle: value
            });
          }
        }), borderStyle !== 'none' && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Border Color', 'advanced-gutenberg'),
          initialOpen: false,
          colorSettings: [{
            label: __('Border Color', 'advanced-gutenberg'),
            value: borderColor,
            onChange: function onChange(value) {
              return setAttributes({
                borderColor: value === undefined ? '#2196f3' : value
              });
            }
          }]
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Border width', 'advanced-gutenberg'),
          value: borderWidth || '',
          onChange: function onChange(value) {
            return setAttributes({
              borderWidth: value
            });
          },
          min: 0,
          max: 100
        }))), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Margin', 'advanced-gutenberg'),
          initialOpen: false
        }, /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Margin top', 'advanced-gutenberg'),
          value: marginTop || '',
          onChange: function onChange(value) {
            return setAttributes({
              marginTop: value
            });
          },
          min: 0,
          max: 100
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Margin right', 'advanced-gutenberg'),
          value: marginRight || '',
          onChange: function onChange(value) {
            return setAttributes({
              marginRight: value
            });
          },
          min: 0,
          max: 100
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Margin bottom', 'advanced-gutenberg'),
          value: marginBottom || '',
          onChange: function onChange(value) {
            return setAttributes({
              marginBottom: value
            });
          },
          min: 0,
          max: 100
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Margin left', 'advanced-gutenberg'),
          value: marginLeft || '',
          onChange: function onChange(value) {
            return setAttributes({
              marginLeft: value
            });
          },
          min: 0,
          max: 100
        })), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Padding', 'advanced-gutenberg'),
          initialOpen: false
        }, /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Padding top', 'advanced-gutenberg'),
          value: paddingTop || '',
          onChange: function onChange(value) {
            return setAttributes({
              paddingTop: value
            });
          },
          min: 0,
          max: 100
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Padding right', 'advanced-gutenberg'),
          value: paddingRight || '',
          onChange: function onChange(value) {
            return setAttributes({
              paddingRight: value
            });
          },
          min: 0,
          max: 100
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Padding bottom', 'advanced-gutenberg'),
          value: paddingBottom || '',
          onChange: function onChange(value) {
            return setAttributes({
              paddingBottom: value
            });
          },
          min: 0,
          max: 100
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Padding left', 'advanced-gutenberg'),
          value: paddingLeft || '',
          onChange: function onChange(value) {
            return setAttributes({
              paddingLeft: value
            });
          },
          min: 0,
          max: 100
        })), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Hover', 'advanced-gutenberg'),
          initialOpen: false
        }, /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Color Settings', 'advanced-gutenberg'),
          initialOpen: false,
          colorSettings: hoverColorSettings
        }), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Shadow', 'advanced-gutenberg'),
          initialOpen: false
        }, /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Opacity (%)', 'advanced-gutenberg'),
          value: hoverOpacity,
          onChange: function onChange(value) {
            return setAttributes({
              hoverOpacity: value
            });
          },
          min: 0,
          max: 100
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Transition speed (ms)', 'advanced-gutenberg'),
          value: transitionSpeed || '',
          onChange: function onChange(value) {
            return setAttributes({
              transitionSpeed: value
            });
          },
          min: 0,
          max: 3000
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Shadow H offset', 'advanced-gutenberg'),
          value: hoverShadowH || '',
          onChange: function onChange(value) {
            return setAttributes({
              hoverShadowH: value
            });
          },
          min: -50,
          max: 50
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Shadow V offset', 'advanced-gutenberg'),
          value: hoverShadowV || '',
          onChange: function onChange(value) {
            return setAttributes({
              hoverShadowV: value
            });
          },
          min: -50,
          max: 50
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Shadow blur', 'advanced-gutenberg'),
          value: hoverShadowBlur || '',
          onChange: function onChange(value) {
            return setAttributes({
              hoverShadowBlur: value
            });
          },
          min: 0,
          max: 50
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Shadow spread', 'advanced-gutenberg'),
          value: hoverShadowSpread || '',
          onChange: function onChange(value) {
            return setAttributes({
              hoverShadowSpread: value
            });
          },
          min: 0,
          max: 50
        }))), advgbBlocks.advgb_pro === '1' ? /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Icon', 'advanced-gutenberg'),
          initialOpen: false,
          className: "advgb-pro-icon"
        }, /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Display icon', 'advanced-gutenberg'),
          checked: iconDisplay,
          onChange: function onChange() {
            return setAttributes({
              iconDisplay: !iconDisplay
            });
          },
          className: "advgb-child-toggle"
        }), iconDisplay && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(BaseControl, {
          label: __('Icon Library (Material Icon)', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(Button, {
          className: "button button-large advgb-browse-icon-btn",
          onClick: function onClick() {
            if (!showPopup) {
              _this2.togglePopup();
            }
          }
        }, __('Icon Selection', 'advanced-gutenberg'))), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Icon Size (px)', 'advanced-gutenberg'),
          value: iconSize,
          min: 1,
          max: 200,
          onChange: function onChange(value) {
            return setAttributes({
              iconSize: value
            });
          }
        }), /*#__PURE__*/React.createElement(_0_adv_components_components_jsx__WEBPACK_IMPORTED_MODULE_0__.AdvColorControl, {
          label: __('Icon Color', 'advanced-gutenberg'),
          value: iconColor,
          onChange: function onChange(value) {
            return setAttributes({
              iconColor: value
            });
          }
        }), /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Icon Position', 'advanced-gutenberg'),
          value: iconPosition,
          options: [{
            label: __('Left', 'advanced-gutenberg'),
            value: 'left'
          }, {
            label: __('Right', 'advanced-gutenberg'),
            value: 'right'
          }],
          onChange: function onChange(value) {
            return setAttributes({
              iconPosition: value
            });
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Icon Spacing (px)', 'advanced-gutenberg'),
          value: iconSpacing,
          min: 0,
          max: 100,
          help: __('Spacing between icon and text', 'advanced-gutenberg'),
          onChange: function onChange(value) {
            return setAttributes({
              iconSpacing: value
            });
          }
        }))), /*#__PURE__*/React.createElement(React.Fragment, null)) : /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Icon', 'advanced-gutenberg'),
          initialOpen: false,
          className: "advgb-pro-icon"
        }, /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
          className: "advgb-promo-overlay-area"
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-blur"
        }, /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Display icon', 'advanced-gutenberg'),
          checked: iconDisplay,
          className: "advgb-child-toggle"
        }), /*#__PURE__*/React.createElement(BaseControl, {
          label: __('Icon Library (Material Icon)', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(Button, {
          className: "button button-large advgb-browse-icon-btn"
        }, __('Icon Selection', 'advanced-gutenberg'))), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Icon Size (px)', 'advanced-gutenberg'),
          value: iconSize,
          min: 1,
          max: 200
        }), /*#__PURE__*/React.createElement(_0_adv_components_components_jsx__WEBPACK_IMPORTED_MODULE_0__.AdvColorControl, {
          label: __('Icon Color', 'advanced-gutenberg'),
          value: iconColor
        }), /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Icon Position', 'advanced-gutenberg'),
          value: iconPosition,
          options: [{
            label: __('Left', 'advanced-gutenberg'),
            value: 'left'
          }, {
            label: __('Right', 'advanced-gutenberg'),
            value: 'right'
          }]
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Icon Spacing (px)', 'advanced-gutenberg'),
          value: iconSpacing,
          min: 0,
          max: 100,
          help: __('Spacing between icon and text', 'advanced-gutenberg')
        })), /*#__PURE__*/React.createElement("div", {
          className: "advgb-pro-overlay-wrap"
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-pro-overlay-text advgb-tooltips ppb-tooltips-library click",
          "data-toggle": "ppbtooltip",
          "data-placement": "top"
        }, /*#__PURE__*/React.createElement("span", {
          className: "advgb-promo-text"
        }, __('Pro', 'advanced-gutenberg')), /*#__PURE__*/React.createElement("span", {
          className: "tooltip-text"
        }, /*#__PURE__*/React.createElement("p", null, __('PublishPress Blocks Pro supports icons in buttons.', 'advanced-gutenberg')), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("a", {
          className: "clickable",
          href: "https://publishpress.com/links/blocks-menu",
          target: "_blank"
        }, __('Upgrade to Pro', 'advanced-gutenberg'))), /*#__PURE__*/React.createElement("i", null))))), /*#__PURE__*/React.createElement(React.Fragment, null))), /*#__PURE__*/React.createElement(React.Fragment, null))));
      }
    }]);
  }(Component);
  var buttonBlockIcon = /*#__PURE__*/React.createElement("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    width: "20",
    height: "20",
    viewBox: "2 2 22 22"
  }, /*#__PURE__*/React.createElement("path", {
    fill: "none",
    d: "M0 0h24v24H0V0z"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M19 7H5c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2zm0 8H5V9h14v6z"
  }));
  var blockAttrs = {
    id: {
      type: 'string'
    },
    url: {
      type: 'string'
    },
    urlOpenNewTab: {
      type: 'boolean',
      default: true
    },
    title: {
      type: 'string'
    },
    text: {
      selector: 'a',
      default: 'PUSH THE BUTTON'
    },
    bgColor: {
      type: 'string'
    },
    textColor: {
      type: 'string'
    },
    textSize: {
      type: 'number',
      default: 18
    },
    marginTop: {
      type: 'number',
      default: 0
    },
    marginRight: {
      type: 'number',
      default: 0
    },
    marginBottom: {
      type: 'number',
      default: 0
    },
    marginLeft: {
      type: 'number',
      default: 0
    },
    paddingTop: {
      type: 'number',
      default: 10
    },
    paddingRight: {
      type: 'number',
      default: 30
    },
    paddingBottom: {
      type: 'number',
      default: 10
    },
    paddingLeft: {
      type: 'number',
      default: 30
    },
    borderWidth: {
      type: 'number',
      default: 1
    },
    borderColor: {
      type: 'string'
    },
    borderStyle: {
      type: 'string',
      default: 'none'
    },
    borderRadius: {
      type: 'number',
      default: 50
    },
    hoverTextColor: {
      type: 'string'
    },
    hoverBgColor: {
      type: 'string'
    },
    hoverShadowColor: {
      type: 'string',
      default: '#ccc'
    },
    hoverShadowH: {
      type: 'number',
      default: 1
    },
    hoverShadowV: {
      type: 'number',
      default: 1
    },
    hoverShadowBlur: {
      type: 'number',
      default: 12
    },
    hoverShadowSpread: {
      type: 'number',
      default: 0
    },
    hoverOpacity: {
      type: 'number',
      default: 100
    },
    transitionSpeed: {
      type: 'number',
      default: 200
    },
    align: {
      type: 'string',
      default: 'none'
    },
    iconDisplay: {
      type: 'boolean',
      default: false
    },
    icon: {
      type: 'string',
      default: 'insert_link'
    },
    iconSize: {
      type: 'number',
      default: 30
    },
    iconColor: {
      type: 'string'
    },
    iconTheme: {
      type: 'string',
      default: 'outlined'
    },
    iconPosition: {
      type: 'string',
      default: 'left'
    },
    iconSpacing: {
      type: 'number',
      default: 7
    },
    noreferrer: {
      type: 'boolean',
      default: true
    },
    nofollow: {
      type: 'boolean',
      default: false
    },
    changed: {
      type: 'boolean',
      default: false
    },
    isPreview: {
      type: 'boolean',
      default: false
    }
  };
  registerBlockType('advgb/button', {
    apiVersion: 3,
    title: __('Button - PublishPress', 'advanced-gutenberg'),
    description: __('Button block with more options and styles.', 'advanced-gutenberg'),
    icon: {
      src: buttonBlockIcon,
      foreground: typeof advgbBlocks !== 'undefined' ? advgbBlocks.color : undefined
    },
    category: 'advgb-category',
    keywords: [__('button', 'advanced-gutenberg'), __('advanced button', 'advanced-gutenberg'), __('link', 'advanced-gutenberg')],
    attributes: blockAttrs,
    example: {
      attributes: {
        isPreview: true
      }
    },
    transforms: {
      from: [{
        type: 'block',
        blocks: ['core/button'],
        transform: function transform(attributes) {
          return createBlock('advgb/button', _objectSpread(_objectSpread({}, attributes), {}, {
            bgColor: attributes.color
          }));
        }
      }],
      to: [{
        type: 'block',
        blocks: ['core/button'],
        transform: function transform(attributes) {
          return createBlock('core/button', _objectSpread(_objectSpread({}, attributes), {}, {
            color: attributes.bgColor
          }));
        }
      }]
    },
    styles: [{
      name: 'default',
      label: __('Default', 'advanced-gutenberg'),
      isDefault: true
    }, {
      name: 'outlined',
      label: __('Outlined', 'advanced-gutenberg')
    }, {
      name: 'squared',
      label: __('Squared', 'advanced-gutenberg')
    }, {
      name: 'squared-outline',
      label: __('Squared Outline', 'advanced-gutenberg')
    }],
    supports: {
      anchor: true,
      align: ['right', 'left', 'center', 'full']
    },
    edit: AdvButton,
    save: function save(_ref) {
      var attributes = _ref.attributes;
      var id = attributes.id,
        align = attributes.align,
        url = attributes.url,
        urlOpenNewTab = attributes.urlOpenNewTab,
        title = attributes.title,
        text = attributes.text,
        iconDisplay = attributes.iconDisplay,
        icon = attributes.icon,
        iconSize = attributes.iconSize,
        iconColor = attributes.iconColor,
        iconTheme = attributes.iconTheme,
        iconPosition = attributes.iconPosition,
        iconSpacing = attributes.iconSpacing,
        noreferrer = attributes.noreferrer,
        nofollow = attributes.nofollow;
      var iconClass = ['material-icons', iconTheme !== '' && "-".concat(iconTheme)].filter(Boolean).join('');
      return /*#__PURE__*/React.createElement("div", {
        className: "align".concat(align)
      }, /*#__PURE__*/React.createElement("a", {
        className: "wp-block-advgb-button_link ".concat(id),
        href: url || '#',
        title: title,
        target: !urlOpenNewTab ? '_self' : '_blank',
        rel: 'noopener ' + advgb_relAttribute(attributes)
      }, iconDisplay && /*#__PURE__*/React.createElement("i", {
        className: iconClass
      }, icon), /*#__PURE__*/React.createElement(RichText.Content, {
        tagName: "span",
        value: text
      })));
    },
    getEditWrapperProps: function getEditWrapperProps(attributes) {
      var align = attributes.align;
      var props = {
        'data-resized': true
      };
      if ('left' === align || 'right' === align || 'center' === align) {
        props['data-align'] = align;
      }
      return props;
    },
    deprecated: [{
      attributes: _objectSpread(_objectSpread({}, blockAttrs), {}, {
        text: {
          source: 'children',
          selector: 'a',
          default: 'PUSH THE BUTTON'
        }
      }),
      supports: {
        anchor: true,
        align: ['right', 'left', 'center', 'full']
      },
      save: function save(_ref2) {
        var attributes = _ref2.attributes;
        var id = attributes.id,
          align = attributes.align,
          url = attributes.url,
          urlOpenNewTab = attributes.urlOpenNewTab,
          title = attributes.title,
          text = attributes.text,
          icon = attributes.icon,
          iconSize = attributes.iconSize,
          iconColor = attributes.iconColor,
          iconTheme = attributes.iconTheme;
        return /*#__PURE__*/React.createElement("div", {
          className: "align".concat(align)
        }, /*#__PURE__*/React.createElement(RichText.Content, {
          tagName: "a",
          className: "wp-block-advgb-button_link ".concat(id),
          href: url || '#',
          title: title,
          target: !urlOpenNewTab ? '_self' : '_blank',
          value: text,
          rel: "noopener noreferrer"
        }));
      }
    }, {
      attributes: _objectSpread(_objectSpread({}, blockAttrs), {}, {
        transitionSpeed: {
          type: 'number',
          default: 0.2
        }
      }),
      migrate: function migrate(attributes) {
        var transitionSpeed = attributes.transitionSpeed * 1000;
        return _objectSpread(_objectSpread({}, attributes), {}, {
          transitionSpeed: transitionSpeed
        });
      },
      save: function save(_ref3) {
        var attributes = _ref3.attributes;
        var id = attributes.id,
          align = attributes.align,
          url = attributes.url,
          urlOpenNewTab = attributes.urlOpenNewTab,
          title = attributes.title,
          text = attributes.text;
        return /*#__PURE__*/React.createElement("div", {
          className: "align".concat(align)
        }, /*#__PURE__*/React.createElement(RichText.Content, {
          tagName: "a",
          className: "wp-block-advgb-button_link ".concat(id),
          href: url || '#',
          title: title,
          target: !urlOpenNewTab ? '_self' : '_blank',
          value: text,
          rel: "noopener noreferrer"
        }));
      }
    }]
  });
})(wp.i18n, wp.blocks, wp.element, wp.blockEditor, wp.components);

/***/ },

/***/ "./assets/blocks/advicon/block.jsx"
/*!*****************************************!*\
  !*** ./assets/blocks/advicon/block.jsx ***!
  \*****************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _0_adv_components_components_jsx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../0-adv-components/components.jsx */ "./assets/blocks/0-adv-components/components.jsx");
/* harmony import */ var _0_adv_components_icon_class_jsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../0-adv-components/icon-class.jsx */ "./assets/blocks/0-adv-components/icon-class.jsx");
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }


(function (wpI18n, wpBlocks, wpElement, wpBlockEditor, wpComponents, lodash) {
  wpBlockEditor = wp.blockEditor || wp.editor;
  var __ = wpI18n.__;
  var Component = wpElement.Component,
    Fragment = wpElement.Fragment;
  var registerBlockType = wpBlocks.registerBlockType;
  var _wpBlockEditor = wpBlockEditor,
    InspectorControls = _wpBlockEditor.InspectorControls,
    BlockControls = _wpBlockEditor.BlockControls,
    AlignmentToolbar = _wpBlockEditor.AlignmentToolbar,
    URLInput = _wpBlockEditor.URLInput;
  var BaseControl = wpComponents.BaseControl,
    PanelBody = wpComponents.PanelBody,
    RangeControl = wpComponents.RangeControl,
    SelectControl = wpComponents.SelectControl,
    TextControl = wpComponents.TextControl,
    Button = wpComponents.Button;
  var times = lodash.times;
  var previewImageData = 'data:image/png;base64, ';
  var MARGIN_PADDING_CONTROLS = [{
    label: 'Top',
    icon: /*#__PURE__*/React.createElement("svg", {
      width: "20px",
      height: "20px",
      viewBox: "0 0 20 20",
      xmlns: "http://www.w3.org/2000/svg",
      "fill-rule": "evenodd",
      "clip-rule": "evenodd",
      "stroke-linejoin": "round",
      "stroke-miterlimit": "1.414"
    }, /*#__PURE__*/React.createElement("rect", {
      x: "2.714",
      y: "5.492",
      width: "1.048",
      height: "9.017",
      fill: "#555d66"
    }), /*#__PURE__*/React.createElement("rect", {
      x: "16.265",
      y: "5.498",
      width: "1.023",
      height: "9.003",
      fill: "#555d66"
    }), /*#__PURE__*/React.createElement("rect", {
      x: "5.518",
      y: "2.186",
      width: "8.964",
      height: "2.482",
      fill: "#272b2f"
    }), /*#__PURE__*/React.createElement("rect", {
      x: "5.487",
      y: "16.261",
      width: "9.026",
      height: "1.037",
      fill: "#555d66"
    }))
  }, {
    label: 'Right',
    icon: /*#__PURE__*/React.createElement("svg", {
      width: "20px",
      height: "20px",
      viewBox: "0 0 20 20",
      xmlns: "http://www.w3.org/2000/svg",
      "fill-rule": "evenodd",
      "clip-rule": "evenodd",
      "stroke-linejoin": "round",
      "stroke-miterlimit": "1.414"
    }, /*#__PURE__*/React.createElement("rect", {
      x: "2.714",
      y: "5.492",
      width: "1.046",
      height: "9.017",
      fill: "#555d66"
    }), /*#__PURE__*/React.createElement("rect", {
      x: "15.244",
      y: "5.498",
      width: "2.518",
      height: "9.003",
      fill: "#272b2f"
    }), /*#__PURE__*/React.createElement("rect", {
      x: "5.518",
      y: "2.719",
      width: "8.964",
      height: "0.954",
      fill: "#555d66"
    }), /*#__PURE__*/React.createElement("rect", {
      x: "5.487",
      y: "16.308",
      width: "9.026",
      height: "0.99",
      fill: "#555d66"
    }))
  }, {
    label: 'Bottom',
    icon: /*#__PURE__*/React.createElement("svg", {
      width: "20px",
      height: "20px",
      viewBox: "0 0 20 20",
      xmlns: "http://www.w3.org/2000/svg",
      "fill-rule": "evenodd",
      "clip-rule": "evenodd",
      "stroke-linejoin": "round",
      "stroke-miterlimit": "1.414"
    }, /*#__PURE__*/React.createElement("rect", {
      x: "2.714",
      y: "5.492",
      width: "1",
      height: "9.017",
      fill: "#555d66"
    }), /*#__PURE__*/React.createElement("rect", {
      x: "16.261",
      y: "5.498",
      width: "1.027",
      height: "9.003",
      fill: "#555d66"
    }), /*#__PURE__*/React.createElement("rect", {
      x: "5.518",
      y: "2.719",
      width: "8.964",
      height: "0.968",
      fill: "#555d66"
    }), /*#__PURE__*/React.createElement("rect", {
      x: "5.487",
      y: "15.28",
      width: "9.026",
      height: "2.499",
      fill: "#272b2f"
    }))
  }, {
    label: 'Left',
    icon: /*#__PURE__*/React.createElement("svg", {
      width: "20px",
      height: "20px",
      viewBox: "0 0 20 20",
      xmlns: "http://www.w3.org/2000/svg",
      "fill-rule": "evenodd",
      "clip-rule": "evenodd",
      "stroke-linejoin": "round",
      "stroke-miterlimit": "1.414"
    }, /*#__PURE__*/React.createElement("rect", {
      x: "2.202",
      y: "5.492",
      width: "2.503",
      height: "9.017",
      fill: "#272b2f"
    }), /*#__PURE__*/React.createElement("rect", {
      x: "16.276",
      y: "5.498",
      width: "1.012",
      height: "9.003",
      fill: "#555d66"
    }), /*#__PURE__*/React.createElement("rect", {
      x: "5.518",
      y: "2.719",
      width: "8.964",
      height: "0.966",
      fill: "#555d66"
    }), /*#__PURE__*/React.createElement("rect", {
      x: "5.487",
      y: "16.303",
      width: "9.026",
      height: "0.995",
      fill: "#555d66"
    }))
  }];
  var blockIcon = /*#__PURE__*/React.createElement("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    width: "24",
    height: "24",
    viewBox: "0 0 24 24"
  }, /*#__PURE__*/React.createElement("path", {
    fill: "none",
    d: "M0 0h24v24H0V0z"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M19 1H5c-1.1 0-1.99.9-1.99 2L3 15.93c0 .69.35 1.3.88 1.66L12 23l8.11-5.41c.53-.36.88-.97.88-1.66L21 3c0-1.1-.9-2-2-2zm-7 19.6l-7-4.66V3h14v12.93l-7 4.67zm-2.01-7.42l-2.58-2.59L6 12l4 4 8-8-1.42-1.42z"
  }));
  var AdvIconEdit = /*#__PURE__*/function (_Component) {
    function AdvIconEdit() {
      var _this;
      _classCallCheck(this, AdvIconEdit);
      _this = _callSuper(this, AdvIconEdit, arguments);
      _this.state = {
        showPopup: false,
        currentItem: 0,
        iconSelected: '',
        selectedIcon: false,
        iconThemeSelected: 'outlined',
        selectedIconTheme: false,
        isBlockIdSet: false // @since 3.2.3
      };
      _this.togglePopup = _this.togglePopup.bind(_this);
      _this.handleIcon = _this.handleIcon.bind(_this);
      _this.handleIconTheme = _this.handleIconTheme.bind(_this);
      return _this;
    }
    _inherits(AdvIconEdit, _Component);
    return _createClass(AdvIconEdit, [{
      key: "componentWillMount",
      value: function componentWillMount() {
        var _this$props = this.props,
          attributes = _this$props.attributes,
          setAttributes = _this$props.setAttributes;
        var currentBlockConfig = advgbDefaultConfig['advgb-icon'];

        // No override attributes of blocks inserted before
        if (attributes.changed !== true) {
          if (_typeof(currentBlockConfig) === 'object' && currentBlockConfig !== null) {
            Object.keys(currentBlockConfig).map(function (attribute) {
              if (typeof attributes[attribute] === 'boolean') {
                attributes[attribute] = !!currentBlockConfig[attribute];
              } else {
                attributes[attribute] = currentBlockConfig[attribute];
              }
            });
          }

          // Finally set changed attribute to true, so we don't modify anything again
          setAttributes({
            changed: true
          });
        }
      }
    }, {
      key: "componentDidMount",
      value: function componentDidMount() {}
    }, {
      key: "componentDidUpdate",
      value: function componentDidUpdate() {
        var _this$state = this.state,
          currentItem = _this$state.currentItem,
          iconSelected = _this$state.iconSelected,
          selectedIcon = _this$state.selectedIcon,
          iconThemeSelected = _this$state.iconThemeSelected;
        var _this$props2 = this.props,
          attributes = _this$props2.attributes,
          setAttributes = _this$props2.setAttributes,
          clientId = _this$props2.clientId;

        // @since 3.2.3 - https://github.com/publishpress/PublishPress-Blocks/issues/1389
        if (!this.state.isBlockIdSet) {
          setAttributes({
            blockIDX: "advgb-icon-".concat(clientId)
          });
          this.setState({
            isBlockIdSet: true
          });
        }
        if (selectedIcon) {
          this.setState({
            selectedIcon: false,
            selectedIconTheme: false
          });
          this.updateItems(parseInt(currentItem), {
            icon: iconSelected,
            iconTheme: iconThemeSelected
          });
        }
      }
    }, {
      key: "handleIcon",
      value: function handleIcon(iconValue) {
        this.setState({
          iconSelected: iconValue,
          selectedIcon: true
        });
      }
    }, {
      key: "handleIconTheme",
      value: function handleIconTheme(iconThemeValue) {
        this.setState({
          iconThemeSelected: iconThemeValue,
          selectedIconTheme: true
        });
      }
    }, {
      key: "updateItems",
      value: function updateItems(idx, data) {
        var _this$props3 = this.props,
          attributes = _this$props3.attributes,
          setAttributes = _this$props3.setAttributes;
        var items = attributes.items;
        var newItems = items.map(function (item, index) {
          if (idx === index) {
            item = _objectSpread(_objectSpread({}, item), data);
          }
          return item;
        });
        setAttributes({
          items: newItems
        });
        this.setState({
          searchedText: ''
        });
      }
    }, {
      key: "getItemData",
      value: function getItemData(idx, dataName) {
        var attributes = this.props.attributes;
        var items = attributes.items;
        var data = '';
        items.map(function (item, index) {
          if (parseInt(idx) === index) {
            for (var key in item) {
              if (dataName === key && item.hasOwnProperty(key)) {
                data = item[key];
              }
            }
          }
        });
        return data;
      }
    }, {
      key: "togglePopup",
      value: function togglePopup() {
        var showPopup = this.state.showPopup;
        this.setState({
          showPopup: !showPopup
        });
      }
    }, {
      key: "render",
      value: function render() {
        var _this2 = this;
        var _this$props4 = this.props,
          attributes = _this$props4.attributes,
          setAttributes = _this$props4.setAttributes;
        var blockIDX = attributes.blockIDX,
          items = attributes.items,
          numberItem = attributes.numberItem,
          tAlign = attributes.tAlign,
          isPreview = attributes.isPreview;
        var _this$state2 = this.state,
          showPopup = _this$state2.showPopup,
          currentItem = _this$state2.currentItem;
        var blockWrapClass = ['advgb-icon-wrapper'].filter(Boolean).join(' ');
        var blockClass = ['advgb-icons'].filter(Boolean).join(' ');
        var i = 0;
        var j = 0;
        return isPreview ? /*#__PURE__*/React.createElement("img", {
          alt: __('Advanced Icon', 'advanced-gutenberg'),
          width: "100%",
          src: previewImageData
        }) : /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(BlockControls, null, /*#__PURE__*/React.createElement(AlignmentToolbar, {
          value: tAlign,
          onChange: function onChange(value) {
            return setAttributes({
              tAlign: value
            });
          }
        })), /*#__PURE__*/React.createElement(InspectorControls, null, /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Icon Count', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Number of Icons', 'advanced-gutenberg'),
          min: 1,
          max: 10,
          value: numberItem,
          onChange: function onChange(value) {
            return setAttributes({
              numberItem: value
            });
          }
        })), items.map(function (item, idx) {
          i++;
          if (i > numberItem) return false;
          return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(PanelBody, {
            title: __("Icon ".concat(i, " Settings"), 'advanced-gutenberg'),
            initialOpen: false
          }, /*#__PURE__*/React.createElement(BaseControl, {
            label: __('Icon Library (Material Icon)', 'advanced-gutenberg')
          }, /*#__PURE__*/React.createElement(Button, {
            className: "button button-large advgb-browse-image-btn",
            "data-currentItem": idx,
            onClick: function onClick(event) {
              if (!showPopup) {
                _this2.togglePopup();
                _this2.setState({
                  currentItem: event.target.attributes.getNamedItem('data-currentItem').value
                });
              }
            }
          }, __('Icon Selection', 'advanced-gutenberg'))), /*#__PURE__*/React.createElement(SelectControl, {
            label: __('Icon Style', 'advanced-gutenberg'),
            value: item.style,
            options: [{
              label: __('Default', 'advanced-gutenberg'),
              value: 'default'
            }, {
              label: __('Stacked', 'advanced-gutenberg'),
              value: 'stacked'
            }],
            onChange: function onChange(value) {
              return _this2.updateItems(idx, {
                style: value
              });
            }
          }), /*#__PURE__*/React.createElement(RangeControl, {
            label: __('Icon Size', 'advanced-gutenberg'),
            min: 10,
            max: 250,
            value: item.size,
            onChange: function onChange(value) {
              return _this2.updateItems(idx, {
                size: value
              });
            }
          }), /*#__PURE__*/React.createElement(_0_adv_components_components_jsx__WEBPACK_IMPORTED_MODULE_0__.AdvColorControl, {
            label: __('Icon Color', 'advanced-gutenberg'),
            value: item.color,
            onChange: function onChange(value) {
              return _this2.updateItems(idx, {
                color: value
              });
            }
          }), /*#__PURE__*/React.createElement(_0_adv_components_components_jsx__WEBPACK_IMPORTED_MODULE_0__.AdvColorControl, {
            label: __('Icon Background', 'advanced-gutenberg'),
            value: item.bgColor,
            onChange: function onChange(value) {
              return _this2.updateItems(idx, {
                bgColor: value
              });
            }
          }), item.style && item.style === 'stacked' && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(BaseControl, {
            label: __('Border', 'advanced-gutenberg'),
            className: "advgb-control-header"
          }), /*#__PURE__*/React.createElement(_0_adv_components_components_jsx__WEBPACK_IMPORTED_MODULE_0__.AdvColorControl, {
            label: __('Border Color', 'advanced-gutenberg'),
            value: item.borderColor,
            onChange: function onChange(value) {
              return _this2.updateItems(idx, {
                borderColor: value
              });
            }
          }), /*#__PURE__*/React.createElement(RangeControl, {
            label: __('Border Size(px)', 'advanced-gutenberg'),
            min: 0,
            max: 20,
            value: item.borderSize,
            onChange: function onChange(value) {
              return _this2.updateItems(idx, {
                borderSize: value
              });
            }
          }), /*#__PURE__*/React.createElement(RangeControl, {
            label: __('Border Radius(%)', 'advanced-gutenberg'),
            min: 0,
            max: 50,
            value: item.borderRadius,
            onChange: function onChange(value) {
              return _this2.updateItems(idx, {
                borderRadius: value
              });
            }
          })), /*#__PURE__*/React.createElement(BaseControl, {
            label: __('Link', 'advanced-gutenberg'),
            className: "advgb-control-header"
          }), /*#__PURE__*/React.createElement(BaseControl, {
            label: __('Link', 'advanced-gutenberg')
          }, /*#__PURE__*/React.createElement(URLInput, {
            value: item.link,
            onChange: function onChange(value) {
              return _this2.updateItems(idx, {
                link: value
              });
            },
            autoFocus: false,
            isFullWidth: true,
            hasBorder: true
          })), /*#__PURE__*/React.createElement(SelectControl, {
            label: __('Link Target', 'advanced-gutenberg'),
            value: item.linkTarget,
            options: [{
              label: __('Same Window', 'advanced-gutenberg'),
              value: '_self'
            }, {
              label: __('New Window', 'advanced-gutenberg'),
              value: '_blank'
            }],
            onChange: function onChange(value) {
              return _this2.updateItems(idx, {
                linkTarget: value
              });
            }
          }), /*#__PURE__*/React.createElement(TextControl, {
            label: __('Title for Accessibility', 'advanced-gutenberg'),
            value: item.title,
            onChange: function onChange(value) {
              return _this2.updateItems(idx, {
                title: value
              });
            }
          }), item.style && item.style === 'stacked' && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(BaseControl, {
            label: __('Padding', 'advanced-gutenberg'),
            className: "advgb-control-header"
          }), /*#__PURE__*/React.createElement("div", {
            className: "advgb-controls-title"
          }, /*#__PURE__*/React.createElement("span", null, __('Unit', 'advanced-gutenberg')), /*#__PURE__*/React.createElement("div", {
            className: "advgb-unit-wrapper",
            key: "unit"
          }, ['px', 'em', 'vh', '%'].map(function (unit, uIdx) {
            return /*#__PURE__*/React.createElement("span", {
              className: "advgb-unit ".concat(item.paddingUnit === unit ? 'selected' : ''),
              key: uIdx,
              onClick: function onClick() {
                return _this2.updateItems(idx, {
                  paddingUnit: unit
                });
              }
            }, unit);
          }))), MARGIN_PADDING_CONTROLS.map(function (pos, mpIdx) {
            return /*#__PURE__*/React.createElement(RangeControl, {
              className: "advgb-padding-margin-control",
              key: mpIdx,
              label: pos.icon,
              beforeIcon: pos.icon,
              value: item['padding' + pos.label],
              min: 0,
              max: 180,
              onChange: function onChange(value) {
                return _this2.updateItems(idx, _defineProperty({}, 'padding' + pos.label, value));
              }
            });
          })), /*#__PURE__*/React.createElement(BaseControl, {
            label: __('Margin', 'advanced-gutenberg'),
            className: "advgb-control-header"
          }), /*#__PURE__*/React.createElement("div", {
            className: "advgb-controls-title"
          }, /*#__PURE__*/React.createElement("span", null, __('Unit', 'advanced-gutenberg')), /*#__PURE__*/React.createElement("div", {
            className: "advgb-unit-wrapper",
            key: "unit"
          }, ['px', 'em', 'vh', '%'].map(function (unit, uIdx) {
            return /*#__PURE__*/React.createElement("span", {
              className: "advgb-unit ".concat(item.marginUnit === unit ? 'selected' : ''),
              key: uIdx,
              onClick: function onClick() {
                return _this2.updateItems(idx, {
                  marginUnit: unit
                });
              }
            }, unit);
          }))), MARGIN_PADDING_CONTROLS.map(function (pos, mpIdx) {
            return /*#__PURE__*/React.createElement(RangeControl, {
              className: "advgb-padding-margin-control",
              key: mpIdx,
              label: pos.icon,
              beforeIcon: pos.icon,
              value: item['margin' + pos.label],
              min: 0,
              max: 180,
              onChange: function onChange(value) {
                return _this2.updateItems(idx, _defineProperty({}, 'margin' + pos.label, value));
              }
            });
          })));
        })), /*#__PURE__*/React.createElement("div", {
          className: blockWrapClass,
          id: blockIDX
        }, /*#__PURE__*/React.createElement("div", {
          className: blockClass,
          style: {
            textAlign: tAlign
          }
        }, items.map(function (item, idx) {
          j++;
          if (j > numberItem) return false;
          var advgbIconClass = ["advgb-icon-style-".concat(item.style), 'advgb-icon-wrap', "advgb-item-".concat(idx)].filter(Boolean).join(' ');
          var iconWrapClass = ['advgb-icon', "advgb-icon-".concat(item.icon)].filter(Boolean).join(' ');
          var iconClass = [item.iconType === 'material' && 'material-icons', item.iconTheme !== '' && "-".concat(item.iconTheme)].filter(Boolean).join('');
          var iconWrapStyles = {
            display: 'flex',
            alignItems: 'center',
            marginTop: item.marginTop + item.marginUnit,
            marginBottom: item.marginBottom + item.marginUnit,
            marginLeft: item.marginLeft + item.marginUnit,
            marginRight: item.marginRight + item.marginUnit,
            paddingTop: item.style !== 'default' ? item.paddingTop + item.paddingUnit : 0,
            paddingBottom: item.style !== 'default' ? item.paddingBottom + item.paddingUnit : 0,
            paddingLeft: item.style !== 'default' ? item.paddingLeft + item.paddingUnit : 0,
            paddingRight: item.style !== 'default' ? item.paddingRight + item.paddingUnit : 0,
            borderWidth: item.style !== 'default' ? item.borderSize + 'px' : 0,
            borderStyle: 'solid',
            borderColor: item.borderColor,
            background: item.bgColor,
            borderRadius: item.borderRadius + '%'
          };
          var iconStyles = {
            fontSize: item.size + 'px',
            color: item.color
          };
          return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
            className: advgbIconClass
          }, /*#__PURE__*/React.createElement("div", {
            className: iconWrapClass,
            style: iconWrapStyles
          }, /*#__PURE__*/React.createElement("i", {
            className: iconClass,
            style: iconStyles
          }, item.icon))));
        })), showPopup ? /*#__PURE__*/React.createElement(_0_adv_components_icon_class_jsx__WEBPACK_IMPORTED_MODULE_1__.IconListPopupHook, {
          content: "iconpopup",
          closePopup: function closePopup() {
            if (showPopup) {
              _this2.togglePopup();
            }
          },
          onSelectIcon: this.handleIcon,
          onSelectIconTheme: this.handleIconTheme,
          selectedIcon: this.getItemData(currentItem, 'icon'),
          selectedIconTheme: this.getItemData(currentItem, 'iconTheme')
        }) : null));
      }
    }]);
  }(Component);
  var blockAttrs = {
    blockIDX: {
      type: 'string'
    },
    items: {
      type: 'array',
      default: times(10, function () {
        return {
          icon: 'beenhere',
          iconType: 'material',
          iconTheme: 'outlined',
          size: 120,
          color: '#111111',
          style: 'default',
          bgColor: '',
          borderColor: '#111',
          borderSize: 2,
          borderRadius: 0,
          paddingTop: 20,
          paddingBottom: 20,
          paddingLeft: 20,
          paddingRight: 20,
          marginTop: 0,
          marginBottom: 0,
          marginLeft: 0,
          marginRight: 40,
          paddingUnit: 'px',
          marginUnit: 'px',
          link: '',
          linkTarget: '_self',
          title: ''
        };
      })
    },
    numberItem: {
      type: 'number',
      default: 2
    },
    changed: {
      type: 'boolean',
      default: false
    },
    tAlign: {
      type: 'string',
      default: 'center'
    },
    isPreview: {
      type: 'boolean',
      default: false
    }
  };
  registerBlockType('advgb/icon', {
    apiVersion: 3,
    title: __('Icon - PublishPress', 'advanced-gutenberg'),
    description: __('Icon block with more options and styles.', 'advanced-gutenberg'),
    icon: {
      src: blockIcon,
      foreground: typeof advgbBlocks !== 'undefined' ? advgbBlocks.color : undefined
    },
    category: 'advgb-category',
    keywords: [__('icon', 'advanced-gutenberg'), __('advanced icon', 'advanced-gutenberg')],
    attributes: blockAttrs,
    supports: {
      align: ["left", "center", "right"]
    },
    example: {
      attributes: {
        isPreview: true
      }
    },
    edit: AdvIconEdit,
    save: function save(_ref) {
      var attributes = _ref.attributes;
      var blockIDX = attributes.blockIDX,
        className = attributes.className,
        items = attributes.items,
        numberItem = attributes.numberItem;
      var blockWrapClass = ['wp-block-advgb-icon', 'icon-wrapper', className, blockIDX].filter(Boolean).join(' ');
      var blockClass = ['advgb-icons'].filter(Boolean).join(' ');
      var i = 0;
      return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
        className: blockWrapClass
      }, /*#__PURE__*/React.createElement("div", {
        className: blockClass
      }, items.map(function (item, idx) {
        i++;
        if (i > numberItem) return false;
        var itemLink = item.link;
        if (!item.link.match(/^[a-zA-Z]+:\/\//)) {
          itemLink = 'http://' + item.link;
        }
        var advgbIconClass = ["advgb-icon-style-".concat(item.style), 'advgb-icon-wrap', "advgb-item-".concat(idx)].filter(Boolean).join(' ');
        var iconWrapClass = ['advgb-icon', "advgb-icon-".concat(item.icon)].filter(Boolean).join(' ');
        var iconClass = [item.iconType === 'material' && 'material-icons', item.iconTheme !== '' && "-".concat(item.iconTheme)].filter(Boolean).join('');
        return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
          className: advgbIconClass
        }, item.link !== '' && /*#__PURE__*/React.createElement("a", {
          href: itemLink,
          target: item.linkTarget,
          title: item.title,
          rel: "noopener noreferrer"
        }, /*#__PURE__*/React.createElement("span", {
          className: iconWrapClass
        }, /*#__PURE__*/React.createElement("i", {
          className: iconClass
        }, item.icon))), item.link === '' && /*#__PURE__*/React.createElement("span", {
          className: iconWrapClass
        }, /*#__PURE__*/React.createElement("i", {
          className: iconClass
        }, item.icon))));
      }))));
    },
    deprecated: [{
      attributes: blockAttrs,
      save: function save(_ref2) {
        var attributes = _ref2.attributes;
        var blockIDX = attributes.blockIDX,
          items = attributes.items,
          numberItem = attributes.numberItem;
        var blockWrapClass = ['wp-block-advgb-icon', 'icon-wrapper', blockIDX].filter(Boolean).join(' ');
        var blockClass = ['advgb-icons'].filter(Boolean).join(' ');
        var i = 0;
        return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
          className: blockWrapClass
        }, /*#__PURE__*/React.createElement("div", {
          className: blockClass
        }, items.map(function (item, idx) {
          i++;
          if (i > numberItem) return false;
          var advgbIconClass = ["advgb-icon-style-".concat(item.style), 'advgb-icon-wrap', "advgb-item-".concat(idx)].filter(Boolean).join(' ');
          var iconWrapClass = ['advgb-icon', "advgb-icon-".concat(item.icon)].filter(Boolean).join(' ');
          var iconClass = [item.iconType === 'material' && 'material-icons', item.iconTheme !== '' && "-".concat(item.iconTheme)].filter(Boolean).join('');
          return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
            className: advgbIconClass
          }, item.link !== '' && /*#__PURE__*/React.createElement("a", {
            href: item.link,
            title: item.title
          }, /*#__PURE__*/React.createElement("div", {
            className: iconWrapClass
          }, /*#__PURE__*/React.createElement("i", {
            className: iconClass
          }, item.icon))), item.link === '' && /*#__PURE__*/React.createElement("div", {
            className: iconWrapClass
          }, /*#__PURE__*/React.createElement("i", {
            className: iconClass
          }, item.icon))));
        }))));
      }
    }, {
      attributes: blockAttrs,
      save: function save(_ref3) {
        var attributes = _ref3.attributes;
        var blockIDX = attributes.blockIDX,
          items = attributes.items,
          numberItem = attributes.numberItem;
        var blockWrapClass = ['wp-block-advgb-icon', 'icon-wrapper'].filter(Boolean).join(' ');
        var blockClass = ['advgb-icons'].filter(Boolean).join(' ');
        var i = 0;
        return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
          className: blockWrapClass,
          id: blockIDX
        }, /*#__PURE__*/React.createElement("div", {
          className: blockClass
        }, items.map(function (item, idx) {
          i++;
          if (i > numberItem) return false;
          var advgbIconClass = ["advgb-icon-style-".concat(item.style), 'advgb-icon-wrap', "advgb-item-".concat(idx)].filter(Boolean).join(' ');
          var iconWrapClass = ['advgb-icon', "advgb-icon-".concat(item.icon)].filter(Boolean).join(' ');
          var iconClass = [item.iconType === 'material' && 'material-icons', item.iconTheme !== '' && "-".concat(item.iconTheme)].filter(Boolean).join('');
          return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
            className: advgbIconClass
          }, item.link !== '' && /*#__PURE__*/React.createElement("a", {
            href: item.link,
            title: item.title
          }, /*#__PURE__*/React.createElement("div", {
            className: iconWrapClass
          }, /*#__PURE__*/React.createElement("i", {
            className: iconClass
          }, item.icon))), item.link === '' && /*#__PURE__*/React.createElement("div", {
            className: iconWrapClass
          }, /*#__PURE__*/React.createElement("i", {
            className: iconClass
          }, item.icon))));
        }))));
      }
    }]
  });
})(wp.i18n, wp.blocks, wp.element, wp.blockEditor, wp.components, lodash);

/***/ },

/***/ "./assets/blocks/advimage/block.jsx"
/*!******************************************!*\
  !*** ./assets/blocks/advimage/block.jsx ***!
  \******************************************/
() {

function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
(function (wpI18n, wpBlocks, wpElement, wpBlockEditor, wpComponents) {
  wpBlockEditor = wp.blockEditor || wp.editor;
  var __ = wpI18n.__;
  var Component = wpElement.Component,
    Fragment = wpElement.Fragment;
  var registerBlockType = wpBlocks.registerBlockType;
  var _wpBlockEditor = wpBlockEditor,
    InspectorControls = _wpBlockEditor.InspectorControls,
    BlockControls = _wpBlockEditor.BlockControls,
    RichText = _wpBlockEditor.RichText,
    PanelColorSettings = _wpBlockEditor.PanelColorSettings,
    MediaUpload = _wpBlockEditor.MediaUpload;
  var RangeControl = wpComponents.RangeControl,
    PanelBody = wpComponents.PanelBody,
    ToggleControl = wpComponents.ToggleControl,
    SelectControl = wpComponents.SelectControl,
    TextControl = wpComponents.TextControl,
    Button = wpComponents.Button,
    ToolbarGroup = wpComponents.ToolbarGroup,
    ToolbarButton = wpComponents.ToolbarButton,
    FocalPointPicker = wpComponents.FocalPointPicker;
  var previewImageData = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAAD9CAYAAACV6WqFAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAACp5JREFUeNrs3c2LFOkBwOGu7p4ZnYghhwRyiNEsKCGBSU5RmIDxJEHILX9BDgZWkPwDOex5vErIsIdlL4LecgjEm/EQyMlcdTEuCvEg6OBH7OmqdM12mbKmuqe7urq7uup5oJhxXZ22qn/1vm9/VLdaAAAAAAAAAAAAUCfBon9gt9u11yFlf39/dUMfBh0s6+dDxUVH/X6ZJ4Cg5LDz/s5A3DBV9FHZ0QclRh7k/L3BiJ8ldhgfeJT334oGH8wh8OCI74UOo+OOMt8fCn4QezR1qyVN/bNBZ7e88IHxYefGHg+w047shYMb/LC8yNuZwNtjogfyww6P+PXU0/igYOTZEbqdCbu9tbXV/fzzz39y5syZ32xsbPwsCIJvJT8ziiKHl8YbNNEatNDv9XpfPXv27C+7u7v/uHHjxqtM3GHm+0KxFw09bxRvJ9vOzs53rl69+qf19fVfO5wwmTAM/3P//v3fXrp06V+pwJOtnxf7pOv1YMbIPwp8sHXu3r37yfb29pedTuenDh1MOY+PojePHz/+w9mzZ28P4w5zvn60fp9kVG8XnXXkbAexX7hw4YbIofB0fvPUqVN/vHPnzo9b3zxY3slZGk/9DNZUoee8fPWjyB88ePDLwXT9ksMFxQ0Gyu9fvHjx02PHjiWhd1LBZx/gbpUe+rjI4+306dO/c5hgdsePH//5tWvXvpuJPO8ZrIneP9IuGHfetL0zOAP9yiGC2Q3i/eH29vaPckbzvBE9KDv0UcEf3IDB+uLbDhGUslbfWFtbO35E4PNZo48IPv1AAVCSfr8fTDCaz22NPmrq7tVuUG7o7dZkLylfyIg+1RQCmEwURcGIkXzq1iYOfcRTay0jOsxHGIajZtCHBtijHnmfZkQPjOiwUOP6mvsaPe8GiBzKn7rndVdocG3PEDiwmFF95msvzvrKOCcBWP40vjXP0IEVIXQQOiB0QOiA0AGhA0IHhA4IHYQOCB0QOlA13SrdmL29vVav13NUqJWTJ09OdO11IzogdEDoIHS7AIQOCB0QOiB0QOiA0AGhA0IHoQNCB4QOCB0QOiB0QOiA0EHogNABoQNChyKCILATStC1C6hS1O12+2AbFXgYhh82hM4qTSsHYXc6nYlG7+REkES/v79vB5q6U/mRpts92IpM0ePg19fXP4SP0KngNH1tba2USJOTBUKngpGX+UBbfMIQu9CpkDjyea71ETo1jTwRh27NLnSWeWcb87RZ2bEjdJZkUQEmz8cjdGo6mhvVhc6SQ1+k+KTi5bNCZ8GWEZ3pu9BpQOgInQaMrEZ0oYPQAaHDVKIoshOEjtDnw8UphE4DYjeTEDoNGF2N6EKn5tGJXOgrKX7t9rzf4jnvafQip9JCF/rKiV9Vllw8cZWvorKoCznGJxShC33lpONOXwV1FUf1fr9fmxOK0Cl1yp59nXjRq6ZWQRz6PKfwceQebRf6Sk7Z86zyer3X680lxjhyU3ahr/SUvY6xlxmlyIVemyl73oi/6g/Ozbpmj2cGZZ80ajlo2AWrNWU/dKYePji3qnf0OPR4i/+901z+KXlgT+BCr+2UPe//n9e6d9HBJ9eWy3tmIXkuPo7bA25Cr/2UfVzsqy4ZoRfxNJw1OpWfsuf92VV+cA4jeiWdPHnSZ30t0d7eXi1mMEZ0QOiA0AGhg9ABoQNCB4QOCB2YAy/tKqjo5YqqcGWYOrwhxLvWhL4Qb968KRR5FV6P7iINpu7M86xakdfGV+Gacz4vXei1VPTtp3U86cSzGm8IEnrtzPL203nepmXElswmVv0yWEKnslP2Qwe/3V7oCSjeD+krxyz65wudxkzZ827fIj4QYtQHT1R9/widyo2Ys06n57kfxs1qTOGFvvKjedOXF5Osxa3XhW7KviDziG2a1w2s8mfKCd2UvbG3u8iLg1b5M+WEbsq+cre9jJG16OzAFF7opuwLXK/P8m+IR/Kif76KrzkQOrWYspc9Is96olvUU35NYp5U8mh+4sQJO6JEb9++Pdgwopuyg9BN2UHoJY3mzG/fWq8L3ZS9ATzlJnRTdrEzyf6zC8qdsr9//77W/+b4enPxZagWdYJLPic9Oan63HShV2LKXvfQk9iXEVy8z+OTTB0ubmnqbspeect8TMIUXuhLnbKzuJOM2IW+tCk7i51RecrNGn2uka+vr9sRFTkWyYdoxF+t24VemmPHjrU2NjbsiIrZ29tr9Xo9O8LUvYQzoosiIHRrQhB6DUZzzLaELnIcJ6GbsjNvLkF1xInQLph8lIifxvFa6+pJPgI6Dj15LT5CLzwVdAdajePWhPcbmLqbsjfetNeTF7rRHOt1oYucqnIJKqGbsjtpC90dA8dU6O4QrNwszXpd6KbsDVmvN/0lsu7dRnPHWOjuANRD0y9B1ejQTdkdb6EbzanpMW/ier0tchx7oZvCUcv1etOecmvkvd1oTtNeItu40L2ziSau1xsVuhdO0NTZXWNC99ZFmny/aMxiNV6P+TQPRt036v4prY0JPb7Wm+u90diTmV0AQgeEDggdEDogdEDogNABoYPQAaEDQgeEDggdEDogdEDoIHRA6IDQAaEDQgeEDggdEDoIHRA6IHRA6IDQAaEDQgeEDggdhA7USbdKN2Zzc7MVRZGjQq10Oh2hV22HgKk7IHRA6IDQAaEDQgeEDkIHhA4IHRA6IHSg2qFHR/waKE80S2vtGePOCh0PKCfsMAyjCaOOyg597Gje6/W+dnxgdv1+/9Xz589fZXqbNPyZQo9G/LcPN+LFixd/dYhgdu/evfvq1q1bXx8xuEalh76/v3/UmiG6efPm7mC68dphgtk8efLkb/fu3XudCjq7fdRhTp8fCab54d1uNxieHJItviRMfJWateHX9YcPH147derUp0EQHHe4YHovX778+9bW1u+fPn3633hFHHc82N6nvu+ntvhxsWgQelT2Gj0as4VXrlz587Nnz74Y3ghgCnt7e//c2dn5bBB5L4k49XXcyF76iB5kRvTsqH7w9fbt27+4fPnyZxsbG584fDBev99//ejRoy/Onz9/cxB7bzhQ7g+3XubrR6P5JCN60dCDVOjtYeDp2OOts7m5uXb9+vUfnDt37ntra2vrURQFw82RhW+Eg9H75e7u7r8Hy953w3j7mdBHRZ5srXmEnkz5g8w6vZOKPP3r9Jo+yPzMwHGmoaLM1/Q0PR16PxX5fur3w8yIPr7dAjcuyNzI5AcGwxsQ5DwOkBe6yBH7/7+mW+rnxJ63Xm8NR/OjB+kSbmiUCj2JPf37eaGLHCYLPTtNL/Rg3FShx2eOwfS91Tr8PF444gQQjYjcqI7ID7cSZmIPx8Q+lW7BG5g3fc+O4sl/T6/nRQ7jR/QoZx2e/DpvNJ8o+kKxpR6Uy3twLsiZrreN5jDVqB7ljOJh9s9Msj6fZY2eHtXTo3uYCjg9oocih5Gh543q0Zg1+UQve515RB8zsgcTbC2xw8jQx23pyKdap5fxqHvQyn9nzaipusBhfOzjvp868lKiGz4KH4z4e8dN1wWPyMev2fNOBFNN2UuP7YjgBQ7TB//h10Xinmt0w+An/ftFj7jH/P6sgS8ttNQDeEAJozUAAAAAAAAAAAAAAAAAAAAU9T8BBgBlRXSz1vTICQAAAABJRU5ErkJggg==';
  var AdvImage = /*#__PURE__*/function (_Component) {
    function AdvImage() {
      var _this;
      _classCallCheck(this, AdvImage);
      _this = _callSuper(this, AdvImage, arguments);
      _this.state = {
        currentEdit: '',
        isBlockIdSet: false // @since 3.2.3
      };
      return _this;
    }
    _inherits(AdvImage, _Component);
    return _createClass(AdvImage, [{
      key: "componentWillMount",
      value: function componentWillMount() {
        var _this$props = this.props,
          attributes = _this$props.attributes,
          setAttributes = _this$props.setAttributes;
        var currentBlockConfig = advgbDefaultConfig['advgb-image'];

        // No override attributes of blocks inserted before
        if (attributes.changed !== true) {
          if (_typeof(currentBlockConfig) === 'object' && currentBlockConfig !== null) {
            Object.keys(currentBlockConfig).map(function (attribute) {
              if (typeof attributes[attribute] === 'boolean') {
                attributes[attribute] = !!currentBlockConfig[attribute];
              } else {
                attributes[attribute] = currentBlockConfig[attribute];
              }
            });
          }

          // Finally set changed attribute to true, so we don't modify anything again
          setAttributes({
            changed: true
          });
        }
      }
    }, {
      key: "componentDidMount",
      value: function componentDidMount() {
        var setAttributes = this.props.setAttributes;

        // Reset attributes when Pro is not available
        if (advgbBlocks.advgb_pro !== 'undefined' && advgbBlocks.advgb_pro !== '1') {
          setAttributes({
            titleTag: 'h4',
            subtitleTag: 'p'
          });
        }
      }
    }, {
      key: "componentDidUpdate",
      value: function componentDidUpdate() {
        var _this$props2 = this.props,
          setAttributes = _this$props2.setAttributes,
          clientId = _this$props2.clientId;

        // @since 3.2.3 - https://github.com/publishpress/PublishPress-Blocks/issues/1389
        if (!this.state.isBlockIdSet) {
          setAttributes({
            blockIDX: "advgb-img-".concat(clientId)
          });
          this.setState({
            isBlockIdSet: true
          });
        }
      }
    }, {
      key: "render",
      value: function render() {
        var _this2 = this;
        var currentEdit = this.state.currentEdit;
        var _this$props3 = this.props,
          attributes = _this$props3.attributes,
          setAttributes = _this$props3.setAttributes,
          isSelected = _this$props3.isSelected;
        var blockIDX = attributes.blockIDX,
          openOnClick = attributes.openOnClick,
          openUrl = attributes.openUrl,
          linkInNewTab = attributes.linkInNewTab,
          imageUrl = attributes.imageUrl,
          imageID = attributes.imageID,
          title = attributes.title,
          titleColor = attributes.titleColor,
          subtitle = attributes.subtitle,
          subtitleColor = attributes.subtitleColor,
          overlayColor = attributes.overlayColor,
          defaultOpacity = attributes.defaultOpacity,
          fullWidth = attributes.fullWidth,
          width = attributes.width,
          height = attributes.height,
          vAlign = attributes.vAlign,
          hAlign = attributes.hAlign,
          overlayOpacity = attributes.overlayOpacity,
          focalPoint = attributes.focalPoint,
          isPreview = attributes.isPreview,
          titleTag = attributes.titleTag,
          subtitleTag = attributes.subtitleTag;
        var blockClassName = ['advgb-image-block image-wrap', fullWidth && 'full-width', openOnClick === 'lightbox' && !!imageUrl && 'advgb-lightbox', blockIDX].filter(Boolean).join(' ');
        return isPreview ? /*#__PURE__*/React.createElement("img", {
          alt: __('Advanced Image', 'advanced-gutenberg'),
          width: "100%",
          src: previewImageData
        }) : /*#__PURE__*/React.createElement(Fragment, null, imageID && /*#__PURE__*/React.createElement(BlockControls, null, /*#__PURE__*/React.createElement(ToolbarGroup, null, /*#__PURE__*/React.createElement(MediaUpload, {
          allowedTypes: ['image'],
          value: imageID,
          onSelect: function onSelect(image) {
            return setAttributes({
              imageUrl: image.url,
              imageID: image.id
            });
          },
          render: function render(_ref) {
            var open = _ref.open;
            return /*#__PURE__*/React.createElement(ToolbarButton, {
              label: __('Change image', 'advanced-gutenberg'),
              icon: "edit",
              onClick: open
            });
          }
        }), /*#__PURE__*/React.createElement(ToolbarButton, {
          label: __('Remove image', 'advanced-gutenberg'),
          icon: "no",
          onClick: function onClick() {
            return setAttributes({
              imageUrl: undefined,
              imageID: undefined
            });
          }
        }))), /*#__PURE__*/React.createElement(InspectorControls, null, /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Advanced Image', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Action on click', 'advanced-gutenberg'),
          value: openOnClick,
          options: [{
            label: __('None', 'advanced-gutenberg'),
            value: 'none'
          }, {
            label: __('Open image in lightbox', 'advanced-gutenberg'),
            value: 'lightbox'
          }, {
            label: __('Open custom URL', 'advanced-gutenberg'),
            value: 'url'
          }],
          onChange: function onChange(value) {
            return setAttributes({
              openOnClick: value
            });
          }
        }), openOnClick === 'url' && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(TextControl, {
          label: [__('Link URL', 'advanced-gutenberg'), openUrl && /*#__PURE__*/React.createElement("a", {
            href: openUrl || '#',
            key: "advgb_image_link_url",
            target: "_blank",
            style: {
              float: 'right'
            }
          }, __('Preview', 'advanced-gutenberg'))],
          value: openUrl,
          placeholder: __('Enter URL…', 'advanced-gutenberg'),
          onChange: function onChange(text) {
            return setAttributes({
              openUrl: text
            });
          }
        }), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Open link in new tab', 'advanced-gutenberg'),
          checked: linkInNewTab,
          onChange: function onChange() {
            return setAttributes({
              linkInNewTab: !linkInNewTab
            });
          }
        })), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Image Size', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Full width', 'advanced-gutenberg'),
          checked: fullWidth,
          onChange: function onChange() {
            return setAttributes({
              fullWidth: !fullWidth
            });
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Height', 'advanced-gutenberg'),
          value: height,
          min: 100,
          max: 1000,
          onChange: function onChange(value) {
            return setAttributes({
              height: value
            });
          }
        }), !fullWidth && /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Width', 'advanced-gutenberg'),
          value: width,
          min: 200,
          max: 1300,
          onChange: function onChange(value) {
            return setAttributes({
              width: value
            });
          }
        }), imageUrl && /*#__PURE__*/React.createElement(FocalPointPicker, {
          label: __('Focal Point Picker', 'advanced-gutenberg'),
          url: imageUrl,
          value: focalPoint,
          onChange: function onChange(value) {
            return setAttributes({
              focalPoint: value
            });
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Overlay opacity default', 'advanced-gutenberg'),
          value: defaultOpacity,
          min: 0,
          max: 100,
          onChange: function onChange(value) {
            return setAttributes({
              defaultOpacity: value
            });
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Overlay opacity hover', 'advanced-gutenberg'),
          value: overlayOpacity,
          min: 0,
          max: 100,
          onChange: function onChange(value) {
            return setAttributes({
              overlayOpacity: value
            });
          }
        })), /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Color Settings', 'advanced-gutenberg'),
          initialOpen: false,
          colorSettings: [{
            label: __('Title Color', 'advanced-gutenberg'),
            value: titleColor,
            onChange: function onChange(value) {
              return setAttributes({
                titleColor: value === undefined ? '#fff' : value
              });
            }
          }, {
            label: __('Subtitle Color', 'advanced-gutenberg'),
            value: subtitleColor,
            onChange: function onChange(value) {
              return setAttributes({
                subtitleColor: value === undefined ? '#fff' : value
              });
            }
          }, {
            label: __('Overlay Color', 'advanced-gutenberg'),
            value: overlayColor,
            onChange: function onChange(value) {
              return setAttributes({
                overlayColor: value === undefined ? '#000' : value
              });
            }
          }]
        }), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Text Alignment', 'advanced-gutenberg'),
          initialOpen: false
        }, /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Vertical Alignment', 'advanced-gutenberg'),
          value: vAlign,
          options: [{
            label: __('Top', 'advanced-gutenberg'),
            value: 'flex-start'
          }, {
            label: __('Center', 'advanced-gutenberg'),
            value: 'center'
          }, {
            label: __('Bottom', 'advanced-gutenberg'),
            value: 'flex-end'
          }],
          onChange: function onChange(value) {
            return setAttributes({
              vAlign: value
            });
          }
        }), /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Horizontal Alignment', 'advanced-gutenberg'),
          value: hAlign,
          options: [{
            label: __('Left', 'advanced-gutenberg'),
            value: 'flex-start'
          }, {
            label: __('Center', 'advanced-gutenberg'),
            value: 'center'
          }, {
            label: __('Right', 'advanced-gutenberg'),
            value: 'flex-end'
          }],
          onChange: function onChange(value) {
            return setAttributes({
              hAlign: value
            });
          }
        })))), /*#__PURE__*/React.createElement("div", {
          className: blockClassName,
          style: {
            width: fullWidth ? '100%' : width,
            height: height
          }
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-image-wrapper",
          style: _objectSpread({
            justifyContent: vAlign,
            alignItems: hAlign
          }, !imageUrl && _defineProperty(_defineProperty({
            backgroundImage: "url(".concat(advgbBlocks.image_holder, ")"),
            backgroundPosition: focalPoint ? "".concat(focalPoint.x * 100, "% ").concat(focalPoint.y * 100, "%") : undefined,
            height: height,
            width: fullWidth ? '100%' : width,
            backgroundSize: 'cover'
          }, "backgroundPosition", 'center'), "backgroundRepeat", 'no-repeat'))
        }, imageUrl ? /*#__PURE__*/React.createElement("img", {
          src: imageUrl,
          alt: attributes.imageAlt || title || '',
          className: "advgb-image",
          style: {
            width: fullWidth ? '100%' : width,
            height: height,
            objectPosition: focalPoint ? "".concat(focalPoint.x * 100, "% ").concat(focalPoint.y * 100, "%") : 'center'
          }
        }) : null, /*#__PURE__*/React.createElement("span", {
          className: "advgb-image-overlay",
          style: {
            backgroundColor: overlayColor,
            opacity: defaultOpacity / 100
          }
        }), /*#__PURE__*/React.createElement("div", {
          className: "advgb-image-caption-wrap"
        }, !imageUrl && /*#__PURE__*/React.createElement(MediaUpload, {
          allowedTypes: ['image'],
          value: imageID,
          onSelect: function onSelect(image) {
            return setAttributes({
              imageUrl: image.url,
              imageID: image.id,
              imageAlt: image.alt,
              focalPoint: {
                "x": "0.50",
                "y": "0.50"
              }
            });
          },
          render: function render(_ref3) {
            var open = _ref3.open;
            return /*#__PURE__*/React.createElement(Button, {
              className: "button button-large advgb-browse-image-btn",
              onClick: open
            }, __('Open media library', 'advanced-gutenberg'));
          }
        }), /*#__PURE__*/React.createElement(RichText, {
          tagName: titleTag,
          className: "advgb-image-title",
          value: title,
          onChange: function onChange(value) {
            return setAttributes({
              title: value.trim()
            });
          },
          style: {
            color: titleColor
          },
          isSelected: isSelected && currentEdit === 'title',
          unstableOnFocus: function unstableOnFocus() {
            return _this2.setState({
              currentEdit: 'title'
            });
          },
          unstableOnSplit: function unstableOnSplit() {
            return null;
          },
          placeholder: __('Enter title…', 'advanced-gutenberg'),
          allowedFormats: []
        }), /*#__PURE__*/React.createElement(RichText, {
          tagName: subtitleTag,
          className: "advgb-image-subtitle",
          value: subtitle,
          onChange: function onChange(value) {
            return setAttributes({
              subtitle: value.trim()
            });
          },
          style: {
            color: subtitleColor
          },
          isSelected: isSelected && currentEdit === 'subtitle',
          unstableOnFocus: function unstableOnFocus() {
            return _this2.setState({
              currentEdit: 'subtitle'
            });
          },
          unstableOnSplit: function unstableOnSplit() {
            return null;
          },
          placeholder: __('Enter subtitle…', 'advanced-gutenberg'),
          allowedFormats: []
        })), /*#__PURE__*/React.createElement("style", null, ".".concat(blockIDX, ".advgb-image-block:hover .advgb-image-overlay {opacity: ").concat(overlayOpacity / 100, " !important;}")))));
      }
    }]);
  }(Component);
  var advImageBlockIcon = /*#__PURE__*/React.createElement("svg", {
    height: "20",
    viewBox: "2 2 22 22",
    width: "20",
    xmlns: "http://www.w3.org/2000/svg"
  }, /*#__PURE__*/React.createElement("path", {
    d: "M0 0h24v24H0V0z",
    fill: "none"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M1 5h2v14H1zm4 0h2v14H5zm17 0H10c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h12c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zM11 17l2.5-3.15L15.29 16l2.5-3.22L21 17H11z"
  }));
  var blockAttrs = {
    blockIDX: {
      type: 'string'
    },
    openOnClick: {
      type: 'string',
      default: 'none'
    },
    linkInNewTab: {
      type: 'boolean',
      default: true
    },
    openUrl: {
      type: 'string'
    },
    imageUrl: {
      type: 'string'
    },
    imageAlt: {
      type: 'string'
    },
    imageID: {
      type: 'number'
    },
    title: {
      type: 'string',
      default: 'Image title'
    },
    titleColor: {
      type: 'string',
      default: '#fff'
    },
    subtitle: {
      type: 'string',
      default: 'Your subtitle here'
    },
    subtitleColor: {
      type: 'string',
      default: '#fff'
    },
    overlayColor: {
      type: 'string',
      default: '#000'
    },
    fullWidth: {
      type: 'boolean',
      default: true
    },
    width: {
      type: 'number',
      default: 500
    },
    height: {
      type: 'number',
      default: 500
    },
    vAlign: {
      type: 'string',
      default: 'center'
    },
    hAlign: {
      type: 'string',
      default: 'center'
    },
    overlayOpacity: {
      type: 'number',
      default: 20
    },
    defaultOpacity: {
      type: 'number',
      default: 40
    },
    focalPoint: {
      type: 'object'
    },
    changed: {
      type: 'boolean',
      default: false
    },
    isPreview: {
      type: 'boolean',
      default: false
    },
    titleTag: {
      type: 'string',
      default: 'h4'
    },
    subtitleTag: {
      type: 'string',
      default: 'p'
    }
  };
  registerBlockType('advgb/image', {
    apiVersion: 3,
    title: __('Image - PublishPress', 'advanced-gutenberg'),
    description: __('Image/photo block with more options and styles.', 'advanced-gutenberg'),
    icon: {
      src: advImageBlockIcon,
      foreground: typeof advgbBlocks !== 'undefined' ? advgbBlocks.color : undefined
    },
    category: 'advgb-category',
    keywords: [__('image', 'advanced-gutenberg'), __('advanced image', 'advanced-gutenberg'), __('photo', 'advanced-gutenberg'), __('box', 'advanced-gutenberg')],
    attributes: blockAttrs,
    example: {
      attributes: {
        isPreview: true
      }
    },
    supports: {
      align: true,
      anchor: true
    },
    edit: AdvImage,
    save: function save(_ref4) {
      var attributes = _ref4.attributes;
      var blockIDX = attributes.blockIDX,
        openOnClick = attributes.openOnClick,
        openUrl = attributes.openUrl,
        linkInNewTab = attributes.linkInNewTab,
        imageUrl = attributes.imageUrl,
        title = attributes.title,
        titleColor = attributes.titleColor,
        subtitle = attributes.subtitle,
        subtitleColor = attributes.subtitleColor,
        overlayColor = attributes.overlayColor,
        fullWidth = attributes.fullWidth,
        width = attributes.width,
        height = attributes.height,
        vAlign = attributes.vAlign,
        hAlign = attributes.hAlign,
        focalPoint = attributes.focalPoint,
        titleTag = attributes.titleTag,
        subtitleTag = attributes.subtitleTag;
      var linkURL = openOnClick === 'url' && !!openUrl ? openUrl : undefined;
      var blockClassName = ['advgb-image-block image-wrap', fullWidth && 'full-width', openOnClick === 'lightbox' && !!imageUrl && 'advgb-lightbox', blockIDX].filter(Boolean).join(' ');
      return /*#__PURE__*/React.createElement("div", {
        className: blockClassName,
        style: {
          width: fullWidth ? '100%' : width,
          height: height
        }
      }, /*#__PURE__*/React.createElement("div", {
        className: "advgb-image-wrapper",
        style: {
          justifyContent: vAlign,
          alignItems: hAlign
        }
      }, imageUrl && /*#__PURE__*/React.createElement("img", {
        src: imageUrl,
        alt: attributes.imageAlt || title || '',
        className: "advgb-image",
        style: {
          width: fullWidth ? '100%' : width,
          height: height,
          objectPosition: focalPoint ? "".concat(focalPoint.x * 100, "% ").concat(focalPoint.y * 100, "%") : 'center'
        },
        "data-image": openOnClick === 'lightbox' ? imageUrl : undefined
      }), /*#__PURE__*/React.createElement("a", {
        className: "advgb-image-overlay",
        style: {
          backgroundColor: overlayColor
        },
        target: linkInNewTab ? '_blank' : '_self',
        rel: "noopener noreferrer",
        href: linkURL
      }), /*#__PURE__*/React.createElement("div", {
        className: "advgb-image-caption-wrap"
      }, title && /*#__PURE__*/React.createElement(RichText.Content, {
        tagName: titleTag,
        className: "advgb-image-title",
        style: {
          color: titleColor
        },
        value: title
      }), subtitle && /*#__PURE__*/React.createElement(RichText.Content, {
        tagName: subtitleTag,
        className: "advgb-image-subtitle",
        style: {
          color: subtitleColor
        },
        value: subtitle
      }))));
    },
    deprecated: [{
      attributes: _objectSpread(_objectSpread({}, blockAttrs), {}, {
        overlayColor: {
          type: 'string',
          default: '#2196f3'
        },
        fullWidth: {
          type: 'boolean',
          default: false
        }
      }),
      save: function save(_ref5) {
        var attributes = _ref5.attributes;
        var blockIDX = attributes.blockIDX,
          openOnClick = attributes.openOnClick,
          openUrl = attributes.openUrl,
          linkInNewTab = attributes.linkInNewTab,
          imageUrl = attributes.imageUrl,
          title = attributes.title,
          titleColor = attributes.titleColor,
          subtitle = attributes.subtitle,
          subtitleColor = attributes.subtitleColor,
          overlayColor = attributes.overlayColor,
          fullWidth = attributes.fullWidth,
          width = attributes.width,
          height = attributes.height,
          vAlign = attributes.vAlign,
          hAlign = attributes.hAlign,
          focalPoint = attributes.focalPoint;
        var linkURL = openOnClick === 'url' && !!openUrl ? openUrl : undefined;
        var blockClassName = ['advgb-image-block', fullWidth && 'full-width', openOnClick === 'lightbox' && !!imageUrl && 'advgb-lightbox', blockIDX].filter(Boolean).join(' ');
        return /*#__PURE__*/React.createElement("div", {
          className: blockClassName,
          style: {
            backgroundImage: "url(".concat(imageUrl, ")"),
            backgroundPosition: focalPoint ? "".concat(focalPoint.x * 100, "% ").concat(focalPoint.y * 100, "%") : undefined,
            height: height,
            width: width,
            justifyContent: vAlign,
            alignItems: hAlign
          },
          "data-image": imageUrl
        }, /*#__PURE__*/React.createElement("a", {
          className: "advgb-image-overlay",
          style: {
            backgroundColor: overlayColor
          },
          target: linkInNewTab ? '_blank' : '_self',
          rel: "noopener noreferrer",
          href: linkURL
        }), title && /*#__PURE__*/React.createElement("h4", {
          className: "advgb-image-title",
          style: {
            color: titleColor
          }
        }, title), subtitle && /*#__PURE__*/React.createElement("p", {
          className: "advgb-image-subtitle",
          style: {
            color: subtitleColor
          }
        }, subtitle));
      }
    }, {
      attributes: blockAttrs,
      save: function save(_ref6) {
        var attributes = _ref6.attributes;
        var openOnClick = attributes.openOnClick,
          openUrl = attributes.openUrl,
          linkInNewTab = attributes.linkInNewTab,
          imageUrl = attributes.imageUrl,
          title = attributes.title,
          titleColor = attributes.titleColor,
          subtitle = attributes.subtitle,
          subtitleColor = attributes.subtitleColor,
          overlayColor = attributes.overlayColor,
          fullWidth = attributes.fullWidth,
          width = attributes.width,
          height = attributes.height,
          vAlign = attributes.vAlign,
          hAlign = attributes.hAlign;
        var linkURL = openOnClick === 'url' && !!openUrl ? openUrl : undefined;
        var blockClassName = ['advgb-image-block', fullWidth && 'full-width', openOnClick === 'lightbox' && !!imageUrl && 'advgb-lightbox'].filter(Boolean).join(' ');
        return /*#__PURE__*/React.createElement("div", {
          className: blockClassName,
          style: {
            backgroundImage: "url(".concat(imageUrl, ")"),
            height: height,
            width: width,
            justifyContent: vAlign,
            alignItems: hAlign
          },
          "data-image": imageUrl
        }, /*#__PURE__*/React.createElement("a", {
          className: "advgb-image-overlay",
          style: {
            backgroundColor: overlayColor
          },
          target: linkInNewTab ? '_blank' : '_self',
          rel: "noopener noreferrer",
          href: linkURL
        }), title && /*#__PURE__*/React.createElement("h4", {
          className: "advgb-image-title",
          style: {
            color: titleColor
          }
        }, title), subtitle && /*#__PURE__*/React.createElement("p", {
          className: "advgb-image-subtitle",
          style: {
            color: subtitleColor
          }
        }, subtitle));
      }
    }, {
      attributes: blockAttrs,
      save: function save(_ref7) {
        var attributes = _ref7.attributes;
        var blockIDX = attributes.blockIDX,
          openOnClick = attributes.openOnClick,
          openUrl = attributes.openUrl,
          linkInNewTab = attributes.linkInNewTab,
          imageUrl = attributes.imageUrl,
          title = attributes.title,
          titleColor = attributes.titleColor,
          subtitle = attributes.subtitle,
          subtitleColor = attributes.subtitleColor,
          overlayColor = attributes.overlayColor,
          fullWidth = attributes.fullWidth,
          width = attributes.width,
          height = attributes.height,
          vAlign = attributes.vAlign,
          hAlign = attributes.hAlign,
          focalPoint = attributes.focalPoint,
          titleTag = attributes.titleTag,
          subtitleTag = attributes.subtitleTag;
        var linkURL = openOnClick === 'url' && !!openUrl ? openUrl : undefined;
        var blockClassName = ['advgb-image-block', fullWidth && 'full-width', openOnClick === 'lightbox' && !!imageUrl && 'advgb-lightbox', blockIDX].filter(Boolean).join(' ');
        return /*#__PURE__*/React.createElement("div", {
          className: blockClassName,
          style: {
            backgroundImage: "url(".concat(imageUrl, ")"),
            backgroundPosition: focalPoint ? "".concat(focalPoint.x * 100, "% ").concat(focalPoint.y * 100, "%") : undefined,
            height: height,
            width: width,
            justifyContent: vAlign,
            alignItems: hAlign
          },
          "data-image": imageUrl
        }, /*#__PURE__*/React.createElement("a", {
          className: "advgb-image-overlay",
          style: {
            backgroundColor: overlayColor
          },
          target: linkInNewTab ? '_blank' : '_self',
          rel: "noopener noreferrer",
          href: linkURL
        }), title && /*#__PURE__*/React.createElement(RichText.Content, {
          tagName: titleTag,
          className: "advgb-image-title",
          style: {
            color: titleColor
          },
          value: title
        }), subtitle && /*#__PURE__*/React.createElement(RichText.Content, {
          tagName: subtitleTag,
          className: "advgb-image-subtitle",
          style: {
            color: subtitleColor
          },
          value: subtitle
        }));
      }
    }]
  });
})(wp.i18n, wp.blocks, wp.element, wp.blockEditor, wp.components);

/***/ },

/***/ "./assets/blocks/advlist/block.jsx"
/*!*****************************************!*\
  !*** ./assets/blocks/advlist/block.jsx ***!
  \*****************************************/
(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {

function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
(function (wpI18n, wpBlocks, wpElement, wpBlockEditor, wpComponents, wpData) {
  wpBlockEditor = wp.blockEditor || wp.editor;
  var __ = wpI18n.__;
  var Component = wpElement.Component,
    Fragment = wpElement.Fragment,
    renderToString = wpElement.renderToString,
    createElement = wpElement.createElement;
  var registerBlockType = wpBlocks.registerBlockType,
    createBlock = wpBlocks.createBlock;
  var _wpBlockEditor = wpBlockEditor,
    InspectorControls = _wpBlockEditor.InspectorControls,
    RichText = _wpBlockEditor.RichText,
    ColorPalette = _wpBlockEditor.ColorPalette,
    BlockControls = _wpBlockEditor.BlockControls,
    InnerBlocks = _wpBlockEditor.InnerBlocks;
  var BaseControl = wpComponents.BaseControl,
    RangeControl = wpComponents.RangeControl,
    PanelBody = wpComponents.PanelBody,
    Dashicon = wpComponents.Dashicon,
    ToolbarGroup = wpComponents.ToolbarGroup,
    ToolbarButton = wpComponents.ToolbarButton;
  var select = wpData.select,
    dispatch = wpData.dispatch;
  var parse = __webpack_require__(/*! html-react-parser */ "./node_modules/html-react-parser/index.js");
  var previewImageData = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAADzCAYAAACv4wv1AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAACRpJREFUeNrs3b+LFP0dwPGZ3b1f/qqexERUsDEBUZsUIUgiERP/AbG3EZQUgZBAqhRp0uQHBnwsIsFOsVUCD0kRCLHQVkQ5G6+IJEI89Lw7d3ey38vuPeM8M3P7Y+5ud329YHK6PrlbHN77+c7s7BhFAAAAAAAAAEBPXNU3ajQa2/J94ROVhP9pNpu7H3oq7ng7X0TgU4w8+9go0ccjRB4XfK+45PuLH8qjTnIeT0YNPh4i8LyY45zYY4HDwLGnQ0/K4h8k+MYIkWejjnOiFzv0H3o28t4W57wYxAVL/NEmek7kRVutZMoD5dO8aGsXTfl+Jnujgshr6a+3b9/++qlTp47Mzs7ub7fbUZIkcWfb/Ap8qVarJXEcRysrK28fP368dPXq1X9nom7nTPp2aqL3NdnjPkMvi3xju3v37jcvXLjwy07g3+08+SOdJ7/PboQ+x3qSvGu1Wi/X1tYe3rlz5zdXrlz5Vzfo7JY73bea6nEfkUclS/R6+Lq4uPjjw4cP/y4EbpfBaDrBLz1//vxnJ0+e/KIbdSsVeisv9k7opVO9NsRx/EeT/OHDhyePHDnyucihGvV6/fDx48f/+ODBg5PdYVpPN5czdLMXrA0WeuaCmDjzw+rnzp2b77zq/LqzTP/M7oFKj90/O3PmzK9Onz69EP3/XFo29lo0wLtatSGew2b0169f/8HMzMwZuwWqNz8//70bN258PzXV61H+u1pbHoLX+og6Kjg+rx08ePB8Z5rP2iVQvdDWsWPHfrjF8j1vBT7SMXp26V6bm5v7tt0B22dhYeFbOaHnXaA20kSPcpYH6ak+Y1fAtpqJPr5WJS/0LS9KG/QY/aOLZFwAAzuiljk+z1u6j3wybqtLXYFtEq4ozYS9LSfjtooe2H5lny3pe0mQq+Tz5ulXG7sAdjb2odf+w/zAKDLRYScjjwqOyys56x5v8RXY2diLgq98okeD/ABg99VEDhO1dN/x0IFPYKIDQgeEDggdEDogdEDoIHRA6IDQAaEDQgeEDggdEDoIHRA6IHRA6IDQAaEDQgeEDggdhA4IHRA6IHRA6IDQAaEDQgehA0IHhA4IHRA6IHRA6IDQQeiA0AGhA0IHhA4IHRA6IHRA6CB0QOiA0AGhA0IHhA4IHfhSY5Kf/Pv37zc2GGcHDhyIGo3dTc1EB0t3QOiA0IHxMFYn48KJtbW1tShJkmhmZiZaWFiI6vW6vQTTMtFXVlY2Qm+32xuhr6+vR8vLyxu/B6Yg9BD26upq348DExh6q9Ua6s+ACQq9Vit+Go7RYYpCn5+f/8rjcRznPg4MZmzOuu/Zs2cj7HBM3jvrHh4rm/bAhIUehLfTwgZM4dIdEDowTUt3S30w0QGhA0IHx+iTya2kmARuJQUIHZjC0MOlr81m0yfWYFqP0cOdZcLNJ0LsQfjUWji2Cde/A1Mw0cMUf/fu3WbkQZjq4Q4zwJSEHqZ5nhC7ZTxMSehl94VLT3lggkMPnz3PE47Pd/v9RxB6Rebm5nJvGRVuPAGMbizGZZjc4Qx7OFYPJ+bCXWVmZ2dNc5im0Huxuz8cTPHSHRA6IHRgYo7Rh+FWUmCiA0IHoQOO0cdDuLjmw4cP9iJjLVz5udv/tNhEhx4id884xl34LMduh27pDpbuOytc6977yOo4LHdA6BV7+/ZttL6+vvn78M8n7927d+PDLcAULN3DJE9HHoQbToTbSwFTEnrRmfPeXWGBKQi97E6v7gILUxJ60a2kwsm4vDvPABMYejjhlr3pRIh8//799hBUYGzOuof7w4XYe2+vuY0UTGHovSnuvXOY0qU7IHRA6MBEHaMPquhtORiraToG550mOvRwZt7ZebB0ByZ9ooebTrjxBOMu/HNju73yNNHB0h2wdK9Q+Ehq+Fx6+MhqOEsZ7jDjRBtMUegh8uXl5ajVam0+FqIPd5gJwQNTsHQPUacj71lZWdl4EQCmIPSyO8zkvQAAExh62ZVDPs0GUxJ60XH4ONz4HoRekXB2PZx4S98fLkS+b98+ewiqaGxcnkiY6mELd311AwqY0tDT0x2YwqU7IHRA6MDEHaMPYmFhYWMDTHQQur8CEDogdEDogNABoQNCB4QOCB2EDggdEDogdEDogNABoQNCB6EDQgeEDggdEDogdEDogNBB6IDQAaEDQgeEDggdEDogdEDoIHRA6IDQAaEDQgeEDggdEDoIHRA6IHRA6IDQAaEDQgeEDkIHhA4IHRA6IHRA6MCuh57464MdkYzaXK2iJwBM8EQvfSVptVr/9VcI2+fDhw9v+hiqyaih533Dze3Vq1f/sCtg+7x8+fKfRf2ltpEmerLVq8b9+/f/1mw2X9odUL319fWle/fu/X2QoIvEZX/YaDTi7otBb6uHh7vbTNgWFxd/cvTo0Z/bLVCtZ8+e/f7EiROfd37ZDKv47tZMfW11t3Z3SzqDNxl26Z6UbZcuXfrTmzdv/mK3QHVev379xcWLF//c7ay9VYdVH6NHqR+8sT169Oj9+fPnf/rixYvf2j0wuqdPn/7h7Nmzv3jy5MlqKvJ2enLnBJ6MunTvbb2lez21hJ9JLeUb165d+8bly5d/dOjQoe/Mzs5+rZ+fAUTR6urqf5aWlh7fvHnzr7du3XrVDbq3PG+mtsJle3fpPnLocSryWk7ovfjTx/Tp/y9QvEqOciZ3Kyf0Zir0dr+hN/p8Ar0Xhd4TiVNPJBtyPbWsEDr0F3qvtbzQW5kJnnt8XhR5P6HnPZl07K1UxOk/N9GhutALJ3jU58m40tDDK0Rn+Z63tIhSAbdylh9loYsevnoiLTtI2wXTPBt63vcbaqInmamdDb73+3om8lomcrHDYKG3U4G3yqZ52bK9r9BzpnqUiTzKWbLnTXNxQ3n06ffM2yXbQNN8kGP03lTPiz39KpQXudBhsMneLog+GWaaDxRfd6rHmePz7CZyGG2iRwVRtzP/3eavKw19i9iL4s/7GaKH/CV3khNz3tn1gSIfKrqc2PPiz35vccNgUz3v60fL/H4jHzrATOxFvzbJYbipXhR/1D0mH/gjqyPFlxO8wKH64Aee4NF2RVgQfSR66DvuqMq4dzS87gsAUKKqoAEAgIn2PwEGAH9ZFbruawVFAAAAAElFTkSuQmCC';
  var INNER_BLOCKS_TEMPLATE = [['advgb/list-item']];
  var AdvList = /*#__PURE__*/function (_Component) {
    function AdvList() {
      var _this;
      _classCallCheck(this, AdvList);
      _this = _callSuper(this, AdvList, arguments);
      _this.state = {
        migrateValues: [],
        migrateStatus: null,
        // Status to migrate from <li> to innerBlocks. true: initialized, false: finished
        isBlockIdSet: false // @since 3.2.3
      };
      return _this;
    }
    _inherits(AdvList, _Component);
    return _createClass(AdvList, [{
      key: "componentWillMount",
      value: function componentWillMount() {
        var _this$props = this.props,
          attributes = _this$props.attributes,
          setAttributes = _this$props.setAttributes;
        var currentBlockConfig = advgbDefaultConfig['advgb-list'];

        // No override attributes of blocks inserted before
        if (attributes.changed !== true) {
          if (_typeof(currentBlockConfig) === 'object' && currentBlockConfig !== null) {
            Object.keys(currentBlockConfig).map(function (attribute) {
              if (typeof attributes[attribute] === 'boolean') {
                attributes[attribute] = !!currentBlockConfig[attribute];
              } else {
                attributes[attribute] = currentBlockConfig[attribute];
              }
            });
          }

          // Finally set changed attribute to true, so we don't modify anything again
          setAttributes({
            changed: true
          });
        }

        // Copy values into a state to migrate to innerBlocks
        if (attributes.values.length && attributes.values[0].hasOwnProperty('type') && attributes.values[0].type === 'li') {
          this.setState({
            migrateValues: attributes.values,
            migrateStatus: true
          });

          // Empty template to avoid adding an empty List item at the end of each migrated List
          INNER_BLOCKS_TEMPLATE = [];
        }
      }
    }, {
      key: "componentDidMount",
      value: function componentDidMount() {
        var setAttributes = this.props.setAttributes;

        // Reset values attribute to default
        if (this.state.migrateStatus === true) {
          setAttributes({
            values: []
          });
        }
      }
    }, {
      key: "componentDidUpdate",
      value: function componentDidUpdate(prevProps) {
        var _this$props2 = this.props,
          setAttributes = _this$props2.setAttributes,
          attributes = _this$props2.attributes,
          clientId = _this$props2.clientId;
        var _select = select('core/block-editor'),
          getBlockOrder = _select.getBlockOrder;
        var innerBlocks = getBlockOrder(clientId);

        // @since 3.2.3 - https://github.com/publishpress/PublishPress-Blocks/issues/1389
        if (!this.state.isBlockIdSet) {
          setAttributes({
            id: 'advgblist-' + clientId
          });
          this.setState({
            isBlockIdSet: true
          });
        }
        if (this.state.migrateStatus === true && !prevProps.attributes.values.length && this.state.migrateValues.length) {
          // Migrate static HTML <li> elements to innerBlocks - since 3.1.3
          this.migrateToInnerBlocks(this.state.migrateValues);
        } else if (!innerBlocks.length) {
          // If no inner blocks, we add one
          var _dispatch = dispatch('core/block-editor'),
            insertBlock = _dispatch.insertBlock;
          insertBlock(createBlock('advgb/list-item'), 0, clientId);
        } else {
          // Nothing to do here
        }
      }

      /**
       * Migrate static content from <li> tags to advgb/list-item innerBlocks
       *
       * @since 3.1.3
       *
       * @param {array} values Array of objects with list values
       *
       * @return {bool}
       */
    }, {
      key: "migrateToInnerBlocks",
      value: function migrateToInnerBlocks(values) {
        var _this$props3 = this.props,
          setAttributes = _this$props3.setAttributes,
          attributes = _this$props3.attributes,
          clientId = _this$props3.clientId;
        var _dispatch2 = dispatch('core/block-editor'),
          insertBlock = _dispatch2.insertBlock;
        var cancel = false;

        /* Convert from objects to HTML strings
         *
         * From:
         * {
         *   "type": "li",
         *   "props": {
         *     "children": [
         *       "Lorem ",
         *       {
         *         "type": "strong",
         *         "props": {
         *           "children": [
         *             "ipsum"
         *           ]
         *         }
         *       },
         *       " dolor"
         *     ]
         *   }
         * }
         *
         * To:
         * "Lorem <strong>ipsum</strong> dolor"
         */
        var parsedValues = values.map(function (item, n) {
          // Check if migration to innerBlocks was done before
          if (item.props === undefined) {
            cancel = true;
            return;
          }
          return item.props.children.map(function (child) {
            if (typeof child === 'string') {
              return child;
            } else {
              return renderToString(createElement(child.type, child.props, child.props.children));
            }
          });
        });

        // Don't continue. Migration to innerBlocks was done before
        if (cancel === true) {
          return;
        }

        /* Convert each array value into a merged string
         *
         * From:
         * [
         *   "Lorem ",
         *   "<strong>ipsum</strong>",
         *   " dolor"
         * ]
         *
         * To:
         * "Lorem <strong>ipsum</strong> dolor"
         */
        var stringValues = parsedValues.map(function (item) {
          return item.join('');
        });

        // Insert content as advgb/list-item blocks
        stringValues.forEach(function (item, index) {
          insertBlock(createBlock('advgb/list-item', {
            content: item
          }), index, clientId);
        });
        this.setState({
          migrateStatus: false
        });
      }
    }, {
      key: "render",
      value: function render() {
        var listIcons = [{
          label: __('None', 'advanced-gutenberg'),
          value: ''
        }, {
          label: __('Pushpin', 'advanced-gutenberg'),
          value: 'admin-post'
        }, {
          label: __('Configuration', 'advanced-gutenberg'),
          value: 'admin-generic'
        }, {
          label: __('Flag', 'advanced-gutenberg'),
          value: 'flag'
        }, {
          label: __('Star', 'advanced-gutenberg'),
          value: 'star-filled'
        }, {
          label: __('Checkmark', 'advanced-gutenberg'),
          value: 'yes'
        }, {
          label: __('Checkmark 2', 'advanced-gutenberg'),
          value: 'yes-alt'
        }, {
          label: __('Checkmark 3', 'advanced-gutenberg'),
          value: 'saved'
        }, {
          label: __('Minus', 'advanced-gutenberg'),
          value: 'minus'
        }, {
          label: __('Minus 2', 'advanced-gutenberg'),
          value: 'remove'
        }, {
          label: __('Plus', 'advanced-gutenberg'),
          value: 'plus'
        }, {
          label: __('Plus 2', 'advanced-gutenberg'),
          value: 'insert'
        }, {
          label: __('Play', 'advanced-gutenberg'),
          value: 'controls-play'
        }, {
          label: __('Arrow right', 'advanced-gutenberg'),
          value: 'arrow-right-alt'
        }, {
          label: __('Arrow right 2', 'advanced-gutenberg'),
          value: 'arrow-right-alt2'
        }, {
          label: __('X Cross 2', 'advanced-gutenberg'),
          value: 'no'
        }, {
          label: __('X Cross', 'advanced-gutenberg'),
          value: 'dismiss'
        }, {
          label: __('Warning', 'advanced-gutenberg'),
          value: 'warning'
        }, {
          label: __('Help', 'advanced-gutenberg'),
          value: 'editor-help'
        }, {
          label: __('Info', 'advanced-gutenberg'),
          value: 'info'
        }, {
          label: __('Info 2', 'advanced-gutenberg'),
          value: 'info-outline'
        }, {
          label: __('Circle', 'advanced-gutenberg'),
          value: 'marker'
        }];
        var _this$props4 = this.props,
          attributes = _this$props4.attributes,
          setAttributes = _this$props4.setAttributes,
          className = _this$props4.className,
          blockID = _this$props4.clientId;
        var id = attributes.id,
          values = attributes.values,
          icon = attributes.icon,
          iconSize = attributes.iconSize,
          iconColor = attributes.iconColor,
          margin = attributes.margin,
          padding = attributes.padding,
          lineHeight = attributes.lineHeight,
          fontSize = attributes.fontSize,
          isPreview = attributes.isPreview;
        var listClassName = [className, id, icon && 'advgb-list', icon && "advgb-list-".concat(icon)].filter(Boolean).join(' ');
        var size = typeof iconSize != 'undefined' ? parseInt(iconSize) : 16;
        var marg = typeof margin != 'undefined' ? parseInt(margin) : 2;
        var padd = typeof padding != 'undefined' ? parseInt(padding) * 2 : 4;
        return isPreview ? /*#__PURE__*/React.createElement("img", {
          alt: __('Advanced List', 'advanced-gutenberg'),
          width: "100%",
          src: previewImageData
        }) : /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(BlockControls, null, /*#__PURE__*/React.createElement(ToolbarGroup, null, /*#__PURE__*/React.createElement(ToolbarButton, {
          label: __('Refresh this list when it conflict with other lists styles', 'advanced-gutenberg'),
          icon: "update",
          onClick: function onClick() {
            return setAttributes({
              id: 'advgblist-' + blockID
            });
          }
        }))), /*#__PURE__*/React.createElement(InspectorControls, null, /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Text Settings', 'advanced-gutenberg'),
          initialOpen: false
        }, /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Text size', 'advanced-gutenberg'),
          value: fontSize || '',
          onChange: function onChange(size) {
            return setAttributes({
              fontSize: size
            });
          },
          min: 10,
          max: 100,
          beforeIcon: "editor-textcolor",
          allowReset: true
        })), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Icon Settings', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(BaseControl, {
          label: __('List icon', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-icon-items-wrapper"
        }, listIcons.map(function (item, index) {
          return /*#__PURE__*/React.createElement("div", {
            className: "advgb-icon-item h20",
            key: index
          }, /*#__PURE__*/React.createElement("span", {
            onClick: function onClick() {
              return setAttributes({
                icon: item.value
              });
            },
            className: [item.value === icon && 'active', item.value === '' && 'remove-icon'].filter(Boolean).join(' ')
          }, /*#__PURE__*/React.createElement(Dashicon, {
            icon: item.value
          })));
        }))), icon && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(PanelBody, {
          title: [__('Icon color', 'advanced-gutenberg'), /*#__PURE__*/React.createElement("span", {
            key: "advgb-list-icon-color",
            className: "dashicons dashicons-".concat(icon),
            style: {
              color: iconColor,
              marginLeft: '10px'
            }
          })],
          initialOpen: false
        }, /*#__PURE__*/React.createElement(ColorPalette, {
          value: iconColor,
          onChange: function onChange(value) {
            return setAttributes({
              iconColor: value === undefined ? '#000' : value
            });
          }
        })), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Icon size', 'advanced-gutenberg'),
          value: iconSize || '',
          onChange: function onChange(size) {
            return setAttributes({
              iconSize: size
            });
          },
          min: 10,
          max: 100,
          allowReset: true
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Line height', 'advanced-gutenberg'),
          value: lineHeight || '',
          onChange: function onChange(size) {
            return setAttributes({
              lineHeight: size
            });
          },
          min: 0,
          max: 100,
          allowReset: true
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Margin', 'advanced-gutenberg'),
          value: margin || '',
          onChange: function onChange(size) {
            return setAttributes({
              margin: size
            });
          },
          min: 0,
          max: 100,
          allowReset: true
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Padding', 'advanced-gutenberg'),
          value: padding || '',
          onChange: function onChange(size) {
            return setAttributes({
              padding: size
            });
          },
          min: 0,
          max: 100,
          allowReset: true
        })))), /*#__PURE__*/React.createElement("ul", {
          className: listClassName
        }, /*#__PURE__*/React.createElement(InnerBlocks, {
          template: INNER_BLOCKS_TEMPLATE,
          templateLock: false,
          allowedBlocks: ['advgb/list-item'],
          className: listClassName
        })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("style", null, ".".concat(id, " li { font-size: ").concat(fontSize, "px; }")), icon && /*#__PURE__*/React.createElement("style", null, ".".concat(id, " li {\n                                    padding-left: ").concat(size + padd, "px;\n                                    margin-left: 0;\n                                }\n                                .").concat(id, " li:before {\n                                    font-size: ").concat(iconSize, "px;\n                                    color: ").concat(iconColor, ";\n                                    line-height: ").concat(lineHeight, "px;\n                                    margin: ").concat(margin, "px;\n                                    padding: ").concat(padding, "px;\n                                    margin-left: -").concat(size + padd + marg, "px\n                                }"))));
      }
    }]);
  }(Component);
  var listBlockIcon = /*#__PURE__*/React.createElement("svg", {
    height: "20",
    viewBox: "2 2 22 22",
    width: "20",
    xmlns: "http://www.w3.org/2000/svg"
  }, /*#__PURE__*/React.createElement("path", {
    d: "M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M0 0h24v24H0z",
    fill: "none"
  }));
  var listBlockAttrs = {
    id: {
      type: 'string'
    },
    icon: {
      type: 'string'
    },
    iconSize: {
      type: 'number',
      default: 16
    },
    iconColor: {
      type: 'string',
      default: '#000'
    },
    fontSize: {
      type: 'number',
      default: 16
    },
    lineHeight: {
      type: 'number',
      default: 18
    },
    margin: {
      type: 'number',
      default: 2
    },
    padding: {
      type: 'number',
      default: 2
    },
    changed: {
      type: 'boolean',
      default: false
    },
    isPreview: {
      type: 'boolean',
      default: false
    },
    // Deprecated since 3.1.3
    values: {
      type: 'array',
      source: 'children',
      selector: 'ul',
      default: []
    }
  };
  registerBlockType('advgb/list', {
    apiVersion: 3,
    title: __('List - PublishPress', 'advanced-gutenberg'),
    description: __('List block with custom icons and styles.', 'advanced-gutenberg'),
    icon: {
      src: listBlockIcon,
      foreground: typeof advgbBlocks !== 'undefined' ? advgbBlocks.color : undefined
    },
    category: 'advgb-category',
    keywords: [__('list', 'advanced-gutenberg'), __('advanced list', 'advanced-gutenberg'), __('icon', 'advanced-gutenberg')],
    attributes: listBlockAttrs,
    example: {
      attributes: {
        isPreview: true
      }
    },
    transforms: {
      from: [{
        type: 'block',
        blocks: ['core/list'],
        transform: function transform(attributes, innerBlocks) {
          var list = innerBlocks.map(function (item, index) {
            return createBlock('advgb/list-item', _objectSpread(_objectSpread({}, attributes), {}, {
              content: innerBlocks[index].attributes.content
            }));
          });
          return createBlock('advgb/list', _objectSpread(_objectSpread({}, attributes), {}, {
            changed: false
          }), list);
        }
      }],
      to: [{
        type: 'block',
        blocks: ['core/list'],
        transform: function transform(attributes, innerBlocks) {
          var list = innerBlocks.map(function (item, index) {
            return createBlock('core/list-item', _objectSpread(_objectSpread({}, attributes), {}, {
              content: innerBlocks[index].attributes.content
            }));
          });
          return createBlock('core/list', {
            attributes: attributes
          }, list);
        }
      }]
    },
    supports: {
      anchor: true
    },
    edit: AdvList,
    save: function save(_ref) {
      var attributes = _ref.attributes;
      var id = attributes.id,
        values = attributes.values,
        icon = attributes.icon;
      var listClassName = [id, icon && 'advgb-list', icon && "advgb-list-".concat(icon)].filter(Boolean).join(' ');
      return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("ul", {
        className: listClassName
      }, /*#__PURE__*/React.createElement(InnerBlocks.Content, null)));
    },
    deprecated: [{
      attributes: listBlockAttrs,
      supports: {
        anchor: true
      },
      save: function save(_ref2) {
        var attributes = _ref2.attributes;
        var id = attributes.id,
          values = attributes.values,
          icon = attributes.icon;
        var listClassName = [id, icon && 'advgb-list', icon && "advgb-list-".concat(icon)].filter(Boolean).join(' ');
        return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("ul", {
          className: listClassName
        }, values));
      }
    }]
  });
})(wp.i18n, wp.blocks, wp.element, wp.blockEditor, wp.components, wp.data);

/***/ },

/***/ "./assets/blocks/advlist/item.jsx"
/*!****************************************!*\
  !*** ./assets/blocks/advlist/item.jsx ***!
  \****************************************/
() {

function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
(function (wpI18n, wpBlocks, wpElement, wpBlockEditor, wpData) {
  wpBlockEditor = wp.blockEditor || wp.editor;
  var __ = wpI18n.__;
  var Fragment = wpElement.Fragment,
    Component = wpElement.Component;
  var registerBlockType = wpBlocks.registerBlockType,
    createBlock = wpBlocks.createBlock;
  var _wpBlockEditor = wpBlockEditor,
    RichText = _wpBlockEditor.RichText;
  var select = wpData.select,
    dispatch = wpData.dispatch;
  var previewImageData = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAADzCAYAAACv4wv1AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAACRpJREFUeNrs3b+LFP0dwPGZ3b1f/qqexERUsDEBUZsUIUgiERP/AbG3EZQUgZBAqhRp0uQHBnwsIsFOsVUCD0kRCLHQVkQ5G6+IJEI89Lw7d3ey38vuPeM8M3P7Y+5ud329YHK6PrlbHN77+c7s7BhFAAAAAAAAAEBPXNU3ajQa2/J94ROVhP9pNpu7H3oq7ng7X0TgU4w8+9go0ccjRB4XfK+45PuLH8qjTnIeT0YNPh4i8LyY45zYY4HDwLGnQ0/K4h8k+MYIkWejjnOiFzv0H3o28t4W57wYxAVL/NEmek7kRVutZMoD5dO8aGsXTfl+Jnujgshr6a+3b9/++qlTp47Mzs7ub7fbUZIkcWfb/Ap8qVarJXEcRysrK28fP368dPXq1X9nom7nTPp2aqL3NdnjPkMvi3xju3v37jcvXLjwy07g3+08+SOdJ7/PboQ+x3qSvGu1Wi/X1tYe3rlz5zdXrlz5Vzfo7JY73bea6nEfkUclS/R6+Lq4uPjjw4cP/y4EbpfBaDrBLz1//vxnJ0+e/KIbdSsVeisv9k7opVO9NsRx/EeT/OHDhyePHDnyucihGvV6/fDx48f/+ODBg5PdYVpPN5czdLMXrA0WeuaCmDjzw+rnzp2b77zq/LqzTP/M7oFKj90/O3PmzK9Onz69EP3/XFo29lo0wLtatSGew2b0169f/8HMzMwZuwWqNz8//70bN258PzXV61H+u1pbHoLX+og6Kjg+rx08ePB8Z5rP2iVQvdDWsWPHfrjF8j1vBT7SMXp26V6bm5v7tt0B22dhYeFbOaHnXaA20kSPcpYH6ak+Y1fAtpqJPr5WJS/0LS9KG/QY/aOLZFwAAzuiljk+z1u6j3wybqtLXYFtEq4ozYS9LSfjtooe2H5lny3pe0mQq+Tz5ulXG7sAdjb2odf+w/zAKDLRYScjjwqOyys56x5v8RXY2diLgq98okeD/ABg99VEDhO1dN/x0IFPYKIDQgeEDggdEDogdEDoIHRA6IDQAaEDQgeEDggdEDoIHRA6IHRA6IDQAaEDQgeEDggdhA4IHRA6IHRA6IDQAaEDQgehA0IHhA4IHRA6IHRA6IDQQeiA0AGhA0IHhA4IHRA6IHRA6CB0QOiA0AGhA0IHhA4IHfhSY5Kf/Pv37zc2GGcHDhyIGo3dTc1EB0t3QOiA0IHxMFYn48KJtbW1tShJkmhmZiZaWFiI6vW6vQTTMtFXVlY2Qm+32xuhr6+vR8vLyxu/B6Yg9BD26upq348DExh6q9Ua6s+ACQq9Vit+Go7RYYpCn5+f/8rjcRznPg4MZmzOuu/Zs2cj7HBM3jvrHh4rm/bAhIUehLfTwgZM4dIdEDowTUt3S30w0QGhA0IHx+iTya2kmARuJQUIHZjC0MOlr81m0yfWYFqP0cOdZcLNJ0LsQfjUWji2Cde/A1Mw0cMUf/fu3WbkQZjq4Q4zwJSEHqZ5nhC7ZTxMSehl94VLT3lggkMPnz3PE47Pd/v9RxB6Rebm5nJvGRVuPAGMbizGZZjc4Qx7OFYPJ+bCXWVmZ2dNc5im0Huxuz8cTPHSHRA6IHRgYo7Rh+FWUmCiA0IHoQOO0cdDuLjmw4cP9iJjLVz5udv/tNhEhx4id884xl34LMduh27pDpbuOytc6977yOo4LHdA6BV7+/ZttL6+vvn78M8n7927d+PDLcAULN3DJE9HHoQbToTbSwFTEnrRmfPeXWGBKQi97E6v7gILUxJ60a2kwsm4vDvPABMYejjhlr3pRIh8//799hBUYGzOuof7w4XYe2+vuY0UTGHovSnuvXOY0qU7IHRA6MBEHaMPquhtORiraToG550mOvRwZt7ZebB0ByZ9ooebTrjxBOMu/HNju73yNNHB0h2wdK9Q+Ehq+Fx6+MhqOEsZ7jDjRBtMUegh8uXl5ajVam0+FqIPd5gJwQNTsHQPUacj71lZWdl4EQCmIPSyO8zkvQAAExh62ZVDPs0GUxJ60XH4ONz4HoRekXB2PZx4S98fLkS+b98+ewiqaGxcnkiY6mELd311AwqY0tDT0x2YwqU7IHRA6MDEHaMPYmFhYWMDTHQQur8CEDogdEDogNABoQNCB4QOCB2EDggdEDogdEDogNABoQNCB6EDQgeEDggdEDogdEDogNBB6IDQAaEDQgeEDggdEDogdEDoIHRA6IDQAaEDQgeEDggdEDoIHRA6IHRA6IDQAaEDQgeEDkIHhA4IHRA6IHRA6MCuh57464MdkYzaXK2iJwBM8EQvfSVptVr/9VcI2+fDhw9v+hiqyaih533Dze3Vq1f/sCtg+7x8+fKfRf2ltpEmerLVq8b9+/f/1mw2X9odUL319fWle/fu/X2QoIvEZX/YaDTi7otBb6uHh7vbTNgWFxd/cvTo0Z/bLVCtZ8+e/f7EiROfd37ZDKv47tZMfW11t3Z3SzqDNxl26Z6UbZcuXfrTmzdv/mK3QHVev379xcWLF//c7ay9VYdVH6NHqR+8sT169Oj9+fPnf/rixYvf2j0wuqdPn/7h7Nmzv3jy5MlqKvJ2enLnBJ6MunTvbb2lez21hJ9JLeUb165d+8bly5d/dOjQoe/Mzs5+rZ+fAUTR6urqf5aWlh7fvHnzr7du3XrVDbq3PG+mtsJle3fpPnLocSryWk7ovfjTx/Tp/y9QvEqOciZ3Kyf0Zir0dr+hN/p8Ar0Xhd4TiVNPJBtyPbWsEDr0F3qvtbzQW5kJnnt8XhR5P6HnPZl07K1UxOk/N9GhutALJ3jU58m40tDDK0Rn+Z63tIhSAbdylh9loYsevnoiLTtI2wXTPBt63vcbaqInmamdDb73+3om8lomcrHDYKG3U4G3yqZ52bK9r9BzpnqUiTzKWbLnTXNxQ3n06ffM2yXbQNN8kGP03lTPiz39KpQXudBhsMneLog+GWaaDxRfd6rHmePz7CZyGG2iRwVRtzP/3eavKw19i9iL4s/7GaKH/CV3khNz3tn1gSIfKrqc2PPiz35vccNgUz3v60fL/H4jHzrATOxFvzbJYbipXhR/1D0mH/gjqyPFlxO8wKH64Aee4NF2RVgQfSR66DvuqMq4dzS87gsAUKKqoAEAgIn2PwEGAH9ZFbruawVFAAAAAElFTkSuQmCC';
  var itemEdit = /*#__PURE__*/function (_Component) {
    function itemEdit() {
      _classCallCheck(this, itemEdit);
      return _callSuper(this, itemEdit, arguments);
    }

    /**
     * Remove empty spaces and breaklines
     *
     * @since 3.1.3
     * @param {string} content The string to check
     *
     * @return {string}
     */
    _inherits(itemEdit, _Component);
    return _createClass(itemEdit, [{
      key: "cleanContent",
      value: function cleanContent(content) {
        return content.replace('<br>', '').trim();
      }
    }, {
      key: "render",
      value: function render() {
        var _this = this;
        var _this$props = this.props,
          attributes = _this$props.attributes,
          setAttributes = _this$props.setAttributes,
          clientId = _this$props.clientId;
        var isPreview = attributes.isPreview,
          content = attributes.content;
        var insertBlockOnEnter = function insertBlockOnEnter(event) {
          // No insert new block when key is different to enter or is Enter + Shift
          if (event.key !== 'Enter' || event.key === 'Enter' && event.shiftKey) {
            return;
          }
          var _select = select('core/block-editor'),
            getBlockRootClientId = _select.getBlockRootClientId,
            getBlock = _select.getBlock;
          var _dispatch = dispatch('core/block-editor'),
            insertBlock = _dispatch.insertBlock;
          var parentId = getBlockRootClientId(clientId);
          if (parentId === null) {
            return;
          }
          var parentBlock = getBlock(parentId);

          // Find the current list-item position
          var itemIndex = parentBlock.innerBlocks.findIndex(function (el) {
            return el.clientId === clientId;
          }) || 0;
          var currentContent,
            newContent = '';
          if (!_this.cleanContent(content).length) {
            // Found only empty spaces in content. Let's save as empty string
            setAttributes({
              content: ''
            });
          } else if (content.includes('<br>') && content.length) {
            /* If <br> exists between words/string,
             * get the last one and split the content between current and the new item
             */
            var lastIndex = content.lastIndexOf('<br>');
            currentContent = content.slice(0, lastIndex);
            newContent = content.slice(lastIndex + 4); // 4 is the char length of '<br>'

            setAttributes({
              content: currentContent
            });
          } else {
            // Nothing to do here
          }

          // Insert a new List item
          insertBlock(createBlock('advgb/list-item', {
            content: newContent
          }), parentBlock.innerBlocks.length !== itemIndex // Insert after current item position
          ? itemIndex + 1 // After current item
          : parentBlock.innerBlocks.length + 1,
          // After the last item in the list
          parentId);
        };
        return isPreview ? /*#__PURE__*/React.createElement("img", {
          alt: __('List item', 'advanced-gutenberg'),
          width: "100%",
          src: previewImageData
        }) : /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("li", {
          onKeyDown: insertBlockOnEnter
        }, /*#__PURE__*/React.createElement(RichText, {
          tagName: "span",
          onChange: function onChange(value) {
            return setAttributes({
              content: value
            });
          },
          value: content,
          placeholder: __('Type a list item', 'advanced-gutenberg'),
          allowedFormats: ['core/bold', 'core/italic', 'core/text-color', 'core/link']
        })));
      }
    }]);
  }(Component);
  var blockIcon = /*#__PURE__*/React.createElement("svg", {
    height: "20",
    viewBox: "2 2 22 22",
    width: "20",
    xmlns: "http://www.w3.org/2000/svg"
  }, /*#__PURE__*/React.createElement("path", {
    d: "M 3,13 H 5 V 11 H 3 Z m 4,0 H 21 V 11 H 7 Z"
  }));
  var blockAttrs = {
    content: {
      type: 'string',
      source: 'html',
      selector: 'li',
      default: ''
    },
    isPreview: {
      type: 'boolean',
      default: false
    }
  };
  registerBlockType('advgb/list-item', {
    apiVersion: 3,
    title: __('List item - PublishPress', 'advanced-gutenberg'),
    description: __('Insert a list item inside List block.', 'advanced-gutenberg'),
    icon: {
      src: blockIcon,
      foreground: typeof advgbBlocks !== 'undefined' ? advgbBlocks.color : undefined
    },
    parent: ['advgb/list'],
    category: 'advgb-category',
    attributes: blockAttrs,
    supports: {
      className: false
    },
    edit: itemEdit,
    save: function save(_ref) {
      var attributes = _ref.attributes;
      var content = attributes.content;
      return /*#__PURE__*/React.createElement(RichText.Content, {
        tagName: "li",
        value: content
      });
    }
  });
})(wp.i18n, wp.blocks, wp.element, wp.blockEditor, wp.data);

/***/ },

/***/ "./assets/blocks/advtable/block.jsx"
/*!******************************************!*\
  !*** ./assets/blocks/advtable/block.jsx ***!
  \******************************************/
() {

function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _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 _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
(function (wpI18n, wpBlocks, wpElement, wpBlockEditor, wpComponents, lodash) {
  wpBlockEditor = wp.blockEditor || wp.editor;
  var __ = wpI18n.__;
  var Component = wpElement.Component,
    Fragment = wpElement.Fragment;
  var registerBlockType = wpBlocks.registerBlockType,
    createBlock = wpBlocks.createBlock;
  var _wpBlockEditor = wpBlockEditor,
    InspectorControls = _wpBlockEditor.InspectorControls,
    BlockControls = _wpBlockEditor.BlockControls,
    RichText = _wpBlockEditor.RichText,
    PanelColorSettings = _wpBlockEditor.PanelColorSettings;
  var PanelBody = wpComponents.PanelBody,
    BaseControl = wpComponents.BaseControl,
    RangeControl = wpComponents.RangeControl,
    SelectControl = wpComponents.SelectControl,
    ToggleControl = wpComponents.ToggleControl,
    TextControl = wpComponents.TextControl,
    Button = wpComponents.Button,
    ToolbarGroup = wpComponents.ToolbarGroup,
    ToolbarButton = wpComponents.ToolbarButton,
    DropdownMenu = wpComponents.DropdownMenu,
    Tooltip = wpComponents.Tooltip;
  var times = lodash.times;
  var tableBlockIcon = /*#__PURE__*/React.createElement("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    width: "20",
    height: "20",
    viewBox: "2 2 22 22"
  }, /*#__PURE__*/React.createElement("path", {
    d: "M3 3v18h18V3H3zm8 16H5v-6h6v6zm0-8H5V5h6v6zm8 8h-6v-6h6v6zm0-8h-6V5h6v6z"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M0 0h24v24H0z",
    fill: "none"
  }));
  var willSetContent = null;
  var lastValue = '';
  var previewImageData = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAADxCAYAAADiK6r+AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAB5NJREFUeNrs3M+LE/0dwPGZyUTR1gV/0PUiDx68tTyFHnpQilCfHnqueuhBEfwD2mOhh6L24qXQS499CsVLF6TtvZdipQ9alIeqbPEkRSi1uhalbjLTiU/izo7fxE0yyebJvF4wT9x9ds3E+M5nJjtfowgAAAAAAAAAAAAAABZLPMvfPE3Tud0XfEnlvf90Op0vX+hF4PEY9+MFgMYEvYPP57OIPq458OrvGQ+5FTli3/o4D/z/WoOPZxh4POTXIkfsW78Oxf7ua4rY84UIvRJ5Ne7QZrJjkm+PethW23RPa468uiVjBg9NCD4UdRb4ePC18Yhz/NlP9NKbbqG4e7fJjRs3Vk+fPv29AwcOfDdJkqPl+83z3FNPY8Rx3Ps7/7rwtwcPHvz+0qVLf19fX++UIs9K23svBtNM9XiKyIdN8dYg8idPnvzgyJEjP261Wl83vWFLlmX/LoL/w/Xr13927dq156XAu5XYs/KRwKSxt2o6ZE/629vIT506tff+/ftXDh48+PNiiq+KHN6b7vv37NnzzZMnT35y4sSJP928efPlDgZwXLxAzG+iB6Z5UtrSR48efXL8+PFfFw/mgKcURtvY2Pjt4cOHf9Sf5tUtqxy+T3S+m9RwyF+OvXX06NH02LFjPxU57MzKysoP79y58/3oizfHW+XT32j7m9fVq01nHvqw8/NkbW3t43a7/bGnD3auGI5nApEnpUan+klVMuX+vXfoXhyyf8c5OYynOF//qBR6qzLNk2kinyj0wKHDtole+KqnDcacmHG8J3DInkQ1XXNSx6F7VN6pLMtMcxhT/5qS6iF79QKzuYc+7Gq4pNhhocP4ocdDAo/rCD6paT/f7Yir3WD6juqa5NOEHu9gugP1hP5eU4F/72Hm5+jDzjWAmtvazUN30xzqn+hRoKdd/Tm6iQ67M93nHrp/RAIWMO6ZTnRg8QgdhA4IHRA6IHRA6IDQAaEDQgehA0IHhA4IHRA6IHRA6IDQQeiA0AGhA0IHhA4IHRA6IHQQuj8CEDogdEDogNABoQNCB4QOCB2EDggdEDogdEDogNABoQNCB6EDQgeEDggdEDogdEDogNBB6MDSS3d7B549e9aIP+hDhw5Fr1+/frsts3379r3dmvK8jrKyshKlaboQ+2Kig0N3QOiA0AGhA0IHhA4IHRA6CB1YLrt+fV7vcsmmaLfbjXmMTXpeh07RJBF6E0PvXfe8KNc+e15N9LmyqGX5Areo5QsWtQBCB4QOCB0QOggdEDogdEDogNABoQNCB4bb9Svue4s9mmKw4KMJmvS8Cn0Hln01VznyTqcTbW5uLvXj7K1H763YasrzOsrevXsXZk260OcYei/yJjxeoW+96C1K6M7RoQGEDkIHhA4IHRA6IHRA6IDQAaGD0AGhA0IHFo316HNkPTqNDd169OViPfoW69EbGrr16M1iPTogdEDogNABoYPQAaEDQgeEDggdmBWLWubIohYaG7pFLcvFopYtFrU0NHSLWprFohZA6IDQAaEDQgehA0IHhA4IHRA6IHRgYlavzZHVa5jogNABoQNCB6EDQgeEDggdEDogdEDogNABoYPQAaEDQgeEDggdEDogdEDoIHRA6IDQAaEDQgeEDggdEDoIHRA6IHRA6IDQAaEDQgeEDggdhA4IHRA6IHRA6IDQAaEDQgehA0IHhA4IHRA6IHRA6IDQQej1yv2xwmI1lNS9U3Ece5pgwaJPat6h/M2bNxueGxhPlmX/GzT0gcjzeYde3ql3d37v3r2/OnyH8bx69eqfQ9oa9bmZhp6PCv/ixYufFzv9F08d7NytW7f+OGKi59NO9brO0d9tGxsb3bt37/6qOBT5r6cPPuzp06e/O3/+/GeljrJKV9t0Op25HbrnocgH24ULF/78+PHjXziEh9Fevnz52ZUrV34Z6CgLfG5iY79Fnqbp4Pt6W6v/YtG7Tftbu7+la2tr3z5z5sxP9u/f/41J7guWVTGV/7O+vv7puXPnfvPw4cNXxae6xbbZ3zql204/+u4g/uJ783mHnpRCbw0CL92mly9f/trZs2e/tbq6+lG73f5K7/vyPI+ETxMVp7Sbz58//9ft27c/v3r16j9evHix2Y+4U9oGwXcroedzC70fe1yJvRWIPS1N+lbpRSEu3a/YaZLqKe8g4G4p6s3SdO+WJvlgiyYJPZ1yp+PSDg+i71ZijioPTugIfXu83UrU3Sj8/lc06bl6WkPkUeXVqRxweSerE13sNC3wahNZJe5O5eMsquGNuGknejX48mTvBh6Y0BH79lYGIXcDUz040Sf50drEoffurDhPr071LPDAsn7cWSDyeNr3CmAJJnoWOIyvHr5H0xy21zHRQw8iCzygvHQOH5VuBU5TJ3posmeVj2v5GfrUoZV+1BYFpnVSuY0DgQsdsW+/QGZY5Pmkh+21hPaB2IdtIkfsO9umjry22AKxR0PCdl6O0MPn61EU/jHa1JHXHlv/QppoyOF5aJKLnSYGHoWCrn7dJBfGzCX0wHQfdj8CR/QjPq5jis8tuCHRR6JH3NvVOb0XJrL+CwA0Ut3TGgAAAAAAAAAAqPi/AAMAGqyWU8hzlH8AAAAASUVORK5CYII=';
  var previewImageDataStripes = 'data:image/png;base64, ';
  var AdvTable = /*#__PURE__*/function (_Component) {
    function AdvTable() {
      var _this;
      _classCallCheck(this, AdvTable);
      _this = _callSuper(this, AdvTable, arguments);
      _this.state = {
        initRow: 3,
        initCol: 3,
        selectedCell: null,
        rangeSelected: null,
        multiSelected: null,
        sectionSelected: null,
        updated: false,
        isBlockIdSet: false // @since 3.2.3
      };
      _this.calculateRealColIndex = _this.calculateRealColIndex.bind(_this);
      _this.isMultiSelected = _this.isMultiSelected.bind(_this);
      _this.isRangeSelected = _this.isRangeSelected.bind(_this);
      return _this;
    }
    _inherits(AdvTable, _Component);
    return _createClass(AdvTable, [{
      key: "componentWillMount",
      value: function componentWillMount() {
        var _this$props = this.props,
          attributes = _this$props.attributes,
          setAttributes = _this$props.setAttributes;
        var currentBlockConfig = advgbDefaultConfig['advgb-table'];

        // No override attributes of blocks inserted before
        if (attributes.changed !== true) {
          if (_typeof(currentBlockConfig) === 'object' && currentBlockConfig !== null) {
            Object.keys(currentBlockConfig).map(function (attribute) {
              if (typeof attributes[attribute] === 'boolean') {
                attributes[attribute] = !!currentBlockConfig[attribute];
              } else {
                attributes[attribute] = currentBlockConfig[attribute];
              }
            });
          }

          // Finally set changed attribute to true, so we don't modify anything again
          setAttributes({
            changed: true
          });
        }
      }
    }, {
      key: "componentDidMount",
      value: function componentDidMount() {}
    }, {
      key: "componentDidUpdate",
      value: function componentDidUpdate(prevProps, prevState) {
        var _this$props2 = this.props,
          isSelected = _this$props2.isSelected,
          setAttributes = _this$props2.setAttributes,
          clientId = _this$props2.clientId;
        var _this$state = this.state,
          selectedCell = _this$state.selectedCell,
          updated = _this$state.updated;

        // @since 3.2.3 - https://github.com/publishpress/PublishPress-Blocks/issues/1389
        if (!this.state.isBlockIdSet) {
          setAttributes({
            blockIDX: "advgb-table-".concat(clientId)
          });
          this.calculateRealColIndex('head');
          this.setState({
            isBlockIdSet: true
          });
        }

        // Check if isSelected has changed and if selectedCell was true before
        if (!isSelected && prevProps.isSelected && selectedCell) {
          this.setState({
            selectedCell: null,
            rangeSelected: null,
            multiSelected: null
          });
        }

        // Check if updated has changed from false to true
        if (updated && !prevState.updated) {
          this.calculateRealColIndex();
          this.setState({
            updated: false
          });
        }
      }
    }, {
      key: "createTable",
      value: function createTable() {
        var setAttributes = this.props.setAttributes;
        var _this$state2 = this.state,
          initRow = _this$state2.initRow,
          initCol = _this$state2.initCol;
        this.setState({
          updated: true
        });
        return setAttributes({
          body: times(parseInt(initRow), function () {
            return {
              cells: times(parseInt(initCol), function () {
                return {
                  content: ''
                };
              })
            };
          })
        });
      }

      // Check if is multi cells selected
    }, {
      key: "isMultiSelected",
      value: function isMultiSelected() {
        var multiSelected = this.state.multiSelected;
        return multiSelected && multiSelected.length > 1;
      }

      // Check if is range cells selected
    }, {
      key: "isRangeSelected",
      value: function isRangeSelected() {
        var rangeSelected = this.state.rangeSelected;
        return rangeSelected && rangeSelected.toCell;
      }
    }, {
      key: "calculateRealColIndex",
      value: function calculateRealColIndex() {
        var _this$props3 = this.props,
          attributes = _this$props3.attributes,
          setAttributes = _this$props3.setAttributes;
        ['head', 'body', 'foot'].forEach(function (section) {
          if (!attributes[section].length) return null;
          var newSection = attributes[section].map(function (row, cRow) {
            return {
              cells: row.cells.map(function (cell, cCol) {
                cell.cI = cCol;
                for (var i = 0; i < cRow; i++) {
                  for (var j = 0; j < attributes[section][i].cells.length; j++) {
                    if (attributes[section][i].cells[j] && attributes[section][i].cells[j].colSpan) {
                      if (attributes[section][i].cells[j].rowSpan && i + parseInt(attributes[section][i].cells[j].rowSpan) > cRow) {
                        if (cCol === 0) {
                          if (attributes[section][i].cells[j].cI <= cell.cI) {
                            cell.cI += parseInt(attributes[section][i].cells[j].colSpan);
                          }
                        } else {
                          var lastColSpan = !isNaN(parseInt(row.cells[cCol - 1].colSpan)) ? parseInt(row.cells[cCol - 1].colSpan) : 0;
                          if (attributes[section][i].cells[j].cI === row.cells[cCol - 1].cI + 1 || attributes[section][i].cells[j].cI <= row.cells[cCol - 1].cI + lastColSpan) {
                            cell.cI += parseInt(attributes[section][i].cells[j].colSpan);
                          }
                        }
                      }
                    }
                  }
                }
                for (var _j = 0; _j < cCol; _j++) {
                  if (row.cells[_j]) {
                    if (row.cells[_j].colSpan) {
                      cell.cI += parseInt(row.cells[_j].colSpan) - 1;
                    }
                  }
                }
                return cell;
              })
            };
          });
          setAttributes(_defineProperty({}, section, newSection));
        });
      }
    }, {
      key: "insertRow",
      value: function insertRow(offset) {
        var _this$state3 = this.state,
          selectedCell = _this$state3.selectedCell,
          sectionSelected = _this$state3.sectionSelected;
        if (!selectedCell) {
          return null;
        }
        var _this$props4 = this.props,
          attributes = _this$props4.attributes,
          setAttributes = _this$props4.setAttributes;
        var currentSection = attributes[sectionSelected];
        var rowIndex = selectedCell.rowIndex;
        var newRow = jQuery.extend(true, {}, currentSection[rowIndex]);
        newRow.cells.map(function (cell) {
          cell.content = '';
          return cell;
        });
        newRow.cells = newRow.cells.filter(function (cCell) {
          return !cCell.rowSpan;
        });
        var newSection = [].concat(_toConsumableArray(currentSection.slice(0, rowIndex + offset)), [newRow], _toConsumableArray(currentSection.slice(rowIndex + offset))).map(function (row, rowIdx) {
          return {
            cells: row.cells.map(function (cell) {
              if (cell.rowSpan) {
                if (rowIdx <= rowIndex && rowIdx + parseInt(cell.rowSpan) - 1 >= rowIndex) {
                  cell.rowSpan = parseInt(cell.rowSpan) + 1;
                }
              }
              return cell;
            })
          };
        });
        this.setState({
          selectedCell: null,
          sectionSelected: null,
          updated: true
        });
        setAttributes(_defineProperty({}, sectionSelected, newSection));
      }
    }, {
      key: "deleteRow",
      value: function deleteRow() {
        var _this$state4 = this.state,
          selectedCell = _this$state4.selectedCell,
          sectionSelected = _this$state4.sectionSelected;
        if (!selectedCell) {
          return null;
        }
        var _this$props5 = this.props,
          attributes = _this$props5.attributes,
          setAttributes = _this$props5.setAttributes;
        var currentSection = attributes[sectionSelected];
        var rowIndex = selectedCell.rowIndex;
        var newSection = currentSection.map(function (row, cRowIdx) {
          return {
            cells: row.cells.map(function (cell) {
              if (cell.rowSpan) {
                if (cRowIdx <= rowIndex && parseInt(cell.rowSpan) + cRowIdx > rowIndex) {
                  cell.rowSpan = parseInt(cell.rowSpan) - 1;
                  if (cRowIdx === rowIndex) {
                    var findColIdx = currentSection[cRowIdx + 1].cells.findIndex(function (elm) {
                      return elm.cI === cell.cI || elm.cI > cell.cI;
                    });
                    currentSection[cRowIdx + 1].cells.splice(findColIdx, 0, cell);
                  }
                }
              }
              return cell;
            })
          };
        });
        this.setState({
          selectedCell: null,
          sectionSelected: null,
          updated: true
        });
        if (newSection.length < 2) {
          alert(__('At least 1 row of current section must present.', 'advanced-gutenberg'));
          return false;
        }
        setAttributes(_defineProperty({}, sectionSelected, newSection.filter(function (row, index) {
          return index !== rowIndex;
        })));
      }
    }, {
      key: "insertColumn",
      value: function insertColumn(offset) {
        var selectedCell = this.state.selectedCell;
        if (!selectedCell) {
          return null;
        }
        var _this$props6 = this.props,
          attributes = _this$props6.attributes,
          setAttributes = _this$props6.setAttributes;
        var cI = selectedCell.cI;
        var countRowSpan = 0;
        this.setState({
          selectedCell: null,
          updated: true
        });
        ['head', 'body', 'foot'].forEach(function (section) {
          return setAttributes(_defineProperty({}, section, attributes[section].map(function (row) {
            if (countRowSpan > 0) {
              // Skip if previous cell has row span
              countRowSpan--;
              return row;
            }
            var findColIdx = row.cells.findIndex(function (cell, idx) {
              return cell.cI === cI || row.cells[idx + 1] && row.cells[idx + 1].cI > cI;
            });
            if (findColIdx === -1) {
              findColIdx = row.cells.length - 1;
            }
            if (row.cells[findColIdx].colSpan && row.cells[findColIdx].cI < cI + offset && row.cells[findColIdx].cI + parseInt(row.cells[findColIdx].colSpan) > cI + offset) {
              row.cells[findColIdx].colSpan++;
              if (row.cells[findColIdx].rowSpan) {
                countRowSpan = parseInt(row.cells[findColIdx].rowSpan) - 1;
              }
              return row;
            } else {
              var realOffset = offset;
              if (row.cells[findColIdx].cI > cI && offset === 1) {
                realOffset = 0;
              } else if (row.cells[findColIdx].cI < cI && offset === 0) {
                realOffset = 1;
              }
              return {
                cells: [].concat(_toConsumableArray(row.cells.slice(0, findColIdx + realOffset)), [{
                  content: ''
                }], _toConsumableArray(row.cells.slice(findColIdx + realOffset)))
              };
            }
          })));
        });
      }
    }, {
      key: "deleteColumn",
      value: function deleteColumn() {
        var selectedCell = this.state.selectedCell;
        if (!selectedCell) {
          return null;
        }
        var _this$props7 = this.props,
          attributes = _this$props7.attributes,
          setAttributes = _this$props7.setAttributes;
        var cI = selectedCell.cI;
        var countRowSpan = 0;
        this.setState({
          selectedCell: null,
          updated: true
        });
        ['head', 'body', 'foot'].forEach(function (section) {
          return setAttributes(_defineProperty({}, section, attributes[section].map(function (row) {
            if (countRowSpan > 0) {
              countRowSpan--;
              return row;
            }
            var findColIdx = row.cells.findIndex(function (cell, idx) {
              return cell.cI === cI || row.cells[idx + 1] && row.cells[idx + 1].cI > cI;
            });
            if (row.cells[findColIdx].rowSpan) {
              countRowSpan = parseInt(row.cells[findColIdx].rowSpan) - 1;
            }
            if (row.cells[findColIdx].colSpan) {
              row.cells[findColIdx].colSpan--;
              if (row.cells[findColIdx].colSpan <= 1) {
                delete row.cells[findColIdx].colSpan;
              }
              return row;
            }
            return {
              cells: row.cells.filter(function (cell, index) {
                return index !== findColIdx;
              })
            };
          })));
        });
      }
    }, {
      key: "mergeCells",
      value: function mergeCells() {
        var _this$state5 = this.state,
          rangeSelected = _this$state5.rangeSelected,
          sectionSelected = _this$state5.sectionSelected;
        if (!this.isRangeSelected()) {
          return null;
        }
        var _this$props8 = this.props,
          attributes = _this$props8.attributes,
          setAttributes = _this$props8.setAttributes;
        var fromCell = rangeSelected.fromCell,
          toCell = rangeSelected.toCell;
        var currentSection = attributes[sectionSelected];
        var fCell = currentSection[fromCell.rowIdx].cells[fromCell.colIdx];
        var tCell = currentSection[toCell.rowIdx].cells[toCell.colIdx];
        var fcSpan = typeof fCell.colSpan === 'undefined' ? 0 : parseInt(fCell.colSpan) - 1;
        var frSpan = typeof fCell.rowSpan === 'undefined' ? 0 : parseInt(fCell.rowSpan) - 1;
        var tcSpan = typeof tCell.colSpan === 'undefined' ? 0 : parseInt(tCell.colSpan) - 1;
        var trSpan = typeof tCell.rowSpan === 'undefined' ? 0 : parseInt(tCell.rowSpan) - 1;
        var minRowIdx = Math.min(fromCell.rowIdx, toCell.rowIdx);
        var maxRowIdx = Math.max(fromCell.rowIdx + frSpan, toCell.rowIdx + trSpan);
        var minColIdx = Math.min(fromCell.RCI, toCell.RCI);
        var maxColIdx = Math.max(fromCell.RCI + fcSpan, toCell.RCI + tcSpan);
        var newSection = currentSection.map(function (row, curRowIndex) {
          if (curRowIndex < minRowIdx || curRowIndex > maxRowIdx) {
            return row;
          }
          return {
            cells: row.cells.map(function (cell, curColIndex) {
              if (curColIndex === Math.min(fromCell.colIdx, toCell.colIdx) && curRowIndex === Math.min(fromCell.rowIdx, toCell.rowIdx)) {
                var rowSpan = Math.abs(maxRowIdx - minRowIdx) + 1;
                var colSpan = Math.abs(maxColIdx - minColIdx) + 1;
                return _objectSpread(_objectSpread({}, cell), {}, {
                  rowSpan: rowSpan > 1 ? rowSpan : undefined,
                  colSpan: colSpan > 1 ? colSpan : undefined
                });
              }
              return cell;
            }).filter(function (cell, cCol) {
              return cell.cI < minColIdx || cCol === Math.min(fromCell.colIdx, toCell.colIdx) && curRowIndex === Math.min(fromCell.rowIdx, toCell.rowIdx) || cell.cI > maxColIdx;
            })
          };
        });
        setAttributes(_defineProperty({}, sectionSelected, newSection));
        this.setState({
          selectedCell: null,
          sectionSelected: null,
          rangeSelected: null,
          updated: true
        });
      }
    }, {
      key: "splitMergedCells",
      value: function splitMergedCells() {
        var _this$state6 = this.state,
          selectedCell = _this$state6.selectedCell,
          sectionSelected = _this$state6.sectionSelected;
        if (!selectedCell) {
          return null;
        }
        var _this$props9 = this.props,
          attributes = _this$props9.attributes,
          setAttributes = _this$props9.setAttributes;
        var colIndex = selectedCell.colIndex,
          rowIndex = selectedCell.rowIndex,
          cI = selectedCell.cI;
        var cellColSpan = attributes[sectionSelected][rowIndex].cells[colIndex].colSpan ? parseInt(attributes[sectionSelected][rowIndex].cells[colIndex].colSpan) : 1;
        var cellRowSpan = attributes[sectionSelected][rowIndex].cells[colIndex].rowSpan ? parseInt(attributes[sectionSelected][rowIndex].cells[colIndex].rowSpan) : 1;
        attributes[sectionSelected][rowIndex].cells[colIndex].colSpan = undefined;
        attributes[sectionSelected][rowIndex].cells[colIndex].rowSpan = undefined;
        var newSection = attributes[sectionSelected].map(function (row, curRowIndex) {
          if (curRowIndex >= rowIndex && curRowIndex < rowIndex + cellRowSpan) {
            var findColIdx = row.cells.findIndex(function (cell) {
              return cell.cI >= cI;
            });
            var startRowFix = 0;
            if (curRowIndex === rowIndex) {
              startRowFix = 1;
            }
            return {
              cells: [].concat(_toConsumableArray(row.cells.slice(0, findColIdx + startRowFix)), _toConsumableArray(times(cellColSpan - startRowFix, function () {
                return {
                  content: ''
                };
              })), _toConsumableArray(row.cells.slice(findColIdx + startRowFix)))
            };
          }
          return row;
        });
        setAttributes(_defineProperty({}, sectionSelected, newSection));
        this.setState({
          selectedCell: null,
          sectionSelected: null,
          updated: true
        });
      }

      // Parse styles from HTML form to React styles object
    }, {
      key: "getCellStyles",
      value: function getCellStyles(style) {
        var _this$state7 = this.state,
          selectedCell = _this$state7.selectedCell,
          sectionSelected = _this$state7.sectionSelected;
        var section = this.props.attributes[sectionSelected];
        if (!selectedCell) return undefined;
        var rowIndex = selectedCell.rowIndex,
          colIndex = selectedCell.colIndex;
        if (style === 'borderColor') {
          return section[rowIndex].cells[colIndex].borderColorSaved;
        }
        var styles = AdvTable.parseStyles(section[rowIndex].cells[colIndex].styles);
        if (_typeof(styles) === 'object') {
          var _convertedStyles = styles[style];
          if (_convertedStyles && typeof _convertedStyles !== 'number' && _convertedStyles.indexOf('px')) {
            _convertedStyles = styles[style].replace(/px/g, '');
          }
          return typeof _convertedStyles === 'undefined' && style === 'borderStyle' ? 'solid' : _convertedStyles;
        } else {
          if (typeof styles !== 'undefined') {
            var _convertedStyles2 = styles[style];
          }
          return typeof convertedStyles === 'undefined' && style === 'borderStyle' ? 'solid' : undefined;
        }
      }
    }, {
      key: "updateCellsStyles",
      value: function updateCellsStyles(style) {
        var _this2 = this;
        var _this$state8 = this.state,
          selectedCell = _this$state8.selectedCell,
          rangeSelected = _this$state8.rangeSelected,
          multiSelected = _this$state8.multiSelected,
          sectionSelected = _this$state8.sectionSelected;
        if (!selectedCell && !this.isRangeSelected() && !this.isMultiSelected()) {
          return null;
        }
        var _this$props10 = this.props,
          attributes = _this$props10.attributes,
          setAttributes = _this$props10.setAttributes;
        var rowIndex = selectedCell.rowIndex,
          colIndex = selectedCell.colIndex;
        var section = attributes[sectionSelected];
        var minRowIdx, maxRowIdx, minColIdx, maxColIdx;
        if (this.isRangeSelected()) {
          var fromCell = rangeSelected.fromCell,
            toCell = rangeSelected.toCell;
          var fCell = section[fromCell.rowIdx].cells[fromCell.colIdx];
          var tCell = section[toCell.rowIdx].cells[toCell.colIdx];
          var fcSpan = typeof fCell.colSpan === 'undefined' ? 0 : parseInt(fCell.colSpan) - 1;
          var frSpan = typeof fCell.rowSpan === 'undefined' ? 0 : parseInt(fCell.rowSpan) - 1;
          var tcSpan = typeof tCell.colSpan === 'undefined' ? 0 : parseInt(tCell.colSpan) - 1;
          var trSpan = typeof tCell.rowSpan === 'undefined' ? 0 : parseInt(tCell.rowSpan) - 1;
          minRowIdx = Math.min(fromCell.rowIdx, toCell.rowIdx);
          maxRowIdx = Math.max(fromCell.rowIdx + frSpan, toCell.rowIdx + trSpan);
          minColIdx = Math.min(fromCell.RCI, toCell.RCI);
          maxColIdx = Math.max(fromCell.RCI + fcSpan, toCell.RCI + tcSpan);
        }
        var newSection = section.map(function (row, curRowIndex) {
          if (!_this2.isRangeSelected() && !_this2.isMultiSelected() && curRowIndex !== rowIndex || _this2.isRangeSelected() && (curRowIndex < minRowIdx || curRowIndex > maxRowIdx) || _this2.isMultiSelected() && multiSelected.findIndex(function (c) {
            return c.rowIndex === curRowIndex;
          }) === -1) {
            return row;
          }
          return {
            cells: row.cells.map(function (cell, curColIndex) {
              if (!_this2.isRangeSelected() && !_this2.isMultiSelected() && curColIndex === colIndex || _this2.isRangeSelected() && cell.cI >= minColIdx && cell.cI <= maxColIdx || _this2.isMultiSelected() && multiSelected.findIndex(function (c) {
                return c.colIndex === curColIndex && c.rowIndex === curRowIndex;
              }) > -1) {
                cell.styles = AdvTable.parseStyles(cell.styles);
                if (style.borderColor) {
                  // Set border color
                  if (cell.styles.borderTopColor) {
                    cell.styles = _objectSpread(_objectSpread({}, cell.styles), {}, {
                      borderTopColor: style.borderColor
                    });
                  }
                  if (cell.styles.borderRightColor) {
                    cell.styles = _objectSpread(_objectSpread({}, cell.styles), {}, {
                      borderRightColor: style.borderColor
                    });
                  }
                  if (cell.styles.borderBottomColor) {
                    cell.styles = _objectSpread(_objectSpread({}, cell.styles), {}, {
                      borderBottomColor: style.borderColor
                    });
                  }
                  if (cell.styles.borderLeftColor) {
                    cell.styles = _objectSpread(_objectSpread({}, cell.styles), {}, {
                      borderLeftColor: style.borderColor
                    });
                  }
                  cell.borderColorSaved = style.borderColor;
                } else if (style.setBorder) {
                  // Set border
                  var cellBorderColor = cell.borderColorSaved || '#000';
                  var cellColSpan = !cell.colSpan ? 0 : parseInt(cell.colSpan) - 1;
                  var cellRowSpan = !cell.rowSpan ? 0 : parseInt(cell.rowSpan) - 1;
                  switch (style.setBorder) {
                    case 'top':
                      cell.styles = _objectSpread(_objectSpread({}, cell.styles), {}, {
                        borderTopColor: cellBorderColor
                      });
                      break;
                    case 'right':
                      cell.styles = _objectSpread(_objectSpread({}, cell.styles), {}, {
                        borderRightColor: cellBorderColor
                      });
                      break;
                    case 'bottom':
                      cell.styles = _objectSpread(_objectSpread({}, cell.styles), {}, {
                        borderBottomColor: cellBorderColor
                      });
                      break;
                    case 'left':
                      cell.styles = _objectSpread(_objectSpread({}, cell.styles), {}, {
                        borderLeftColor: cellBorderColor
                      });
                      break;
                    case 'all':
                      cell.styles = _objectSpread(_objectSpread({}, cell.styles), {}, {
                        borderTopColor: cellBorderColor,
                        borderRightColor: cellBorderColor,
                        borderBottomColor: cellBorderColor,
                        borderLeftColor: cellBorderColor
                      });
                      break;
                    case 'none':
                      cell.styles = _objectSpread(_objectSpread({}, cell.styles), {}, {
                        borderTopColor: undefined,
                        borderRightColor: undefined,
                        borderBottomColor: undefined,
                        borderLeftColor: undefined
                      });
                      break;
                    case 'vert':
                      if (cell.cI === minColIdx) {
                        cell.styles = _objectSpread(_objectSpread({}, cell.styles), {}, {
                          borderRightColor: cellBorderColor
                        });
                      } else if (cell.cI + cellColSpan === maxColIdx) {
                        cell.styles = _objectSpread(_objectSpread({}, cell.styles), {}, {
                          borderLeftColor: cellBorderColor
                        });
                      } else {
                        cell.styles = _objectSpread(_objectSpread({}, cell.styles), {}, {
                          borderRightColor: cellBorderColor,
                          borderLeftColor: cellBorderColor
                        });
                      }
                      break;
                    case 'horz':
                      if (curRowIndex === minRowIdx) {
                        cell.styles = _objectSpread(_objectSpread({}, cell.styles), {}, {
                          borderBottomColor: cellBorderColor
                        });
                      } else if (curRowIndex + cellRowSpan === maxRowIdx) {
                        cell.styles = _objectSpread(_objectSpread({}, cell.styles), {}, {
                          borderTopColor: cellBorderColor
                        });
                      } else {
                        cell.styles = _objectSpread(_objectSpread({}, cell.styles), {}, {
                          borderTopColor: cellBorderColor,
                          borderBottomColor: cellBorderColor
                        });
                      }
                      break;
                    case 'inner':
                      if (curRowIndex === minRowIdx) {
                        cell.styles = _objectSpread(_objectSpread({}, cell.styles), {}, {
                          borderBottomColor: cellBorderColor
                        });
                      } else if (curRowIndex + cellRowSpan === maxRowIdx) {
                        cell.styles = _objectSpread(_objectSpread({}, cell.styles), {}, {
                          borderTopColor: cellBorderColor
                        });
                      } else {
                        cell.styles = _objectSpread(_objectSpread({}, cell.styles), {}, {
                          borderTopColor: cellBorderColor,
                          borderBottomColor: cellBorderColor
                        });
                      }
                      if (cell.cI === minColIdx) {
                        cell.styles = _objectSpread(_objectSpread({}, cell.styles), {}, {
                          borderRightColor: cellBorderColor
                        });
                      } else if (cell.cI + cellColSpan === maxColIdx) {
                        cell.styles = _objectSpread(_objectSpread({}, cell.styles), {}, {
                          borderLeftColor: cellBorderColor
                        });
                      } else {
                        cell.styles = _objectSpread(_objectSpread({}, cell.styles), {}, {
                          borderRightColor: cellBorderColor,
                          borderLeftColor: cellBorderColor
                        });
                      }
                      break;
                    case 'outer':
                      if (curRowIndex === minRowIdx) {
                        cell.styles = _objectSpread(_objectSpread({}, cell.styles), {}, {
                          borderTopColor: cellBorderColor
                        });
                      } else if (curRowIndex + cellRowSpan === maxRowIdx) {
                        cell.styles = _objectSpread(_objectSpread({}, cell.styles), {}, {
                          borderBottomColor: cellBorderColor
                        });
                      }
                      if (cell.cI === minColIdx) {
                        cell.styles = _objectSpread(_objectSpread({}, cell.styles), {}, {
                          borderLeftColor: cellBorderColor
                        });
                      } else if (cell.cI + cellColSpan === maxColIdx) {
                        cell.styles = _objectSpread(_objectSpread({}, cell.styles), {}, {
                          borderRightColor: cellBorderColor
                        });
                      }
                      break;
                    default:
                      // Nothing
                      break;
                  }
                } else {
                  cell.styles = _objectSpread(_objectSpread({}, cell.styles), style);
                }
              }
              return cell;
            })
          };
        });
        setAttributes(_defineProperty({}, section, newSection));
      }
    }, {
      key: "updateCellContent",
      value: function updateCellContent(content) {
        var cell = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
        var _this$state9 = this.state,
          selectedCell = _this$state9.selectedCell,
          sectionSelected = _this$state9.sectionSelected;
        if (!selectedCell && !cell) {
          return null;
        }
        var rowIndex, colIndex;
        if (cell) {
          rowIndex = cell.rowIndex;
          colIndex = cell.colIndex;
        } else {
          rowIndex = selectedCell.rowIndex;
          colIndex = selectedCell.colIndex;
        }
        var _this$props11 = this.props,
          attributes = _this$props11.attributes,
          setAttributes = _this$props11.setAttributes;
        var newSection = attributes[sectionSelected].map(function (row, curRowIndex) {
          if (curRowIndex !== rowIndex) {
            return row;
          }
          return {
            cells: row.cells.map(function (cell, curColIndex) {
              if (curColIndex !== colIndex) {
                return cell;
              }
              return _objectSpread(_objectSpread({}, cell), {}, {
                content: content
              });
            })
          };
        });
        setAttributes(_defineProperty({}, sectionSelected, newSection));
      }
    }, {
      key: "toggleSection",
      value: function toggleSection(section) {
        var _this$props12 = this.props,
          attributes = _this$props12.attributes,
          setAttributes = _this$props12.setAttributes;
        var sectionSelected = this.state.sectionSelected;
        var body = attributes.body;
        var cellsToAdd = [{
          cells: body[0].cells.map(function (cell) {
            return {
              cI: cell.cI,
              colSpan: cell.colSpan
            };
          })
        }];
        if (sectionSelected === section) {
          this.setState({
            selectedCell: null,
            sectionSelected: null
          });
        }
        if (!attributes[section].length) {
          return setAttributes(_defineProperty({}, section, cellsToAdd));
        }
        return setAttributes(_defineProperty({}, section, []));
      }
    }, {
      key: "renderSection",
      value: function renderSection(section) {
        var _this3 = this;
        var attributes = this.props.attributes;
        var _this$state10 = this.state,
          selectedCell = _this$state10.selectedCell,
          multiSelected = _this$state10.multiSelected,
          rangeSelected = _this$state10.rangeSelected,
          sectionSelected = _this$state10.sectionSelected;
        return attributes[section].map(function (_ref, rowIndex) {
          var cells = _ref.cells;
          return /*#__PURE__*/React.createElement("tr", {
            key: rowIndex
          }, cells.map(function (_ref2, colIndex) {
            var content = _ref2.content,
              styles = _ref2.styles,
              colSpan = _ref2.colSpan,
              rowSpan = _ref2.rowSpan,
              cI = _ref2.cI;
            var cell = {
              rowIndex: rowIndex,
              colIndex: colIndex,
              cI: cI,
              section: section
            };
            var isSelected = selectedCell && selectedCell.rowIndex === rowIndex && selectedCell.colIndex === colIndex && sectionSelected === section;
            if (_this3.isRangeSelected()) {
              var fromCell = rangeSelected.fromCell,
                toCell = rangeSelected.toCell;
              if (attributes[sectionSelected][fromCell.rowIdx] && attributes[sectionSelected][toCell.rowIdx]) {
                var fCell = attributes[sectionSelected][fromCell.rowIdx].cells[fromCell.colIdx];
                var tCell = attributes[sectionSelected][toCell.rowIdx].cells[toCell.colIdx];
                var fcSpan = typeof fCell.colSpan === 'undefined' ? 0 : parseInt(fCell.colSpan) - 1;
                var frSpan = typeof fCell.rowSpan === 'undefined' ? 0 : parseInt(fCell.rowSpan) - 1;
                var tcSpan = typeof tCell.colSpan === 'undefined' ? 0 : parseInt(tCell.colSpan) - 1;
                var trSpan = typeof tCell.rowSpan === 'undefined' ? 0 : parseInt(tCell.rowSpan) - 1;
                isSelected = rowIndex >= Math.min(fromCell.rowIdx, toCell.rowIdx) && rowIndex <= Math.max(fromCell.rowIdx + frSpan, toCell.rowIdx + trSpan) && cI >= Math.min(fromCell.RCI, toCell.RCI) && cI <= Math.max(fromCell.RCI + fcSpan, toCell.RCI + tcSpan) && section === sectionSelected;
              }
            }
            if (_this3.isMultiSelected()) {
              isSelected = multiSelected.findIndex(function (c) {
                return c.rowIndex === rowIndex && c.colIndex === colIndex;
              }) > -1 && multiSelected[0].section === section;
            }
            var cellClassName = [isSelected && 'cell-selected'].filter(Boolean).join(' ');
            styles = AdvTable.parseStyles(styles);
            return /*#__PURE__*/React.createElement("td", {
              key: colIndex,
              className: cellClassName,
              style: styles,
              colSpan: colSpan,
              rowSpan: rowSpan,
              onClick: function onClick(e) {
                if (e.shiftKey) {
                  if (!rangeSelected) return;
                  if (!rangeSelected.fromCell) return;
                  var _fromCell = rangeSelected.fromCell;
                  if (section !== _fromCell.section) {
                    alert(__('Cannot select multi cells from difference section!', 'advanced-gutenberg'));
                    return;
                  }
                  var _toCell = {
                    rowIdx: rowIndex,
                    colIdx: colIndex,
                    RCI: cI,
                    section: section
                  };
                  _this3.setState({
                    rangeSelected: {
                      fromCell: _fromCell,
                      toCell: _toCell
                    },
                    multiSelected: null
                  });
                } else if (e.ctrlKey || e.metaKey) {
                  var multiCells = multiSelected ? multiSelected : [];
                  var existCell = multiCells.findIndex(function (cel) {
                    return cel.rowIndex === rowIndex && cel.colIndex === colIndex;
                  });
                  if (multiCells.length && section !== multiCells[0].section) {
                    alert(__('Cannot select multi cells from difference section!', 'advanced-gutenberg'));
                    return;
                  }
                  if (existCell === -1) {
                    multiCells.push(cell);
                  } else {
                    multiCells.splice(existCell, 1);
                  }
                  _this3.setState({
                    multiSelected: multiCells,
                    rangeSelected: null
                  });
                } else {
                  _this3.setState({
                    rangeSelected: {
                      fromCell: {
                        rowIdx: rowIndex,
                        colIdx: colIndex,
                        RCI: cI,
                        section: section
                      }
                    },
                    multiSelected: [cell]
                  });
                }
              }
            }, /*#__PURE__*/React.createElement(RichText, {
              className: "wp-block-table__cell-content",
              value: content,
              onChange: function onChange(value) {
                if (willSetContent) clearTimeout(willSetContent);
                lastValue = value;
                willSetContent = setTimeout(function () {
                  return _this3.updateCellContent(value, selectedCell);
                }, 10);
              },
              onFocus: function onFocus() {
                if (willSetContent) {
                  _this3.updateCellContent(lastValue, selectedCell);
                  clearTimeout(willSetContent);
                  willSetContent = null;
                }
                _this3.setState({
                  selectedCell: cell,
                  sectionSelected: section
                });
              },
              unstableOnFocus: function unstableOnFocus() {
                if (willSetContent) {
                  _this3.updateCellContent(lastValue, selectedCell);
                  clearTimeout(willSetContent);
                  willSetContent = null;
                }
                _this3.setState({
                  selectedCell: cell,
                  sectionSelected: section
                });
              }
              /* onClick jump to the rescue in case unstableOnFocus
               * doesn't work due the cell is not focused */,
              onClick: function onClick() {
                if (willSetContent) {
                  _this3.updateCellContent(lastValue, selectedCell);
                  clearTimeout(willSetContent);
                  willSetContent = null;
                }
                _this3.setState({
                  selectedCell: cell,
                  sectionSelected: section
                });
              }
            }));
          }));
        });
      }
    }, {
      key: "render",
      value: function render() {
        var _this4 = this;
        var _this$props13 = this.props,
          attributes = _this$props13.attributes,
          setAttributes = _this$props13.setAttributes,
          className = _this$props13.className;
        var head = attributes.head,
          body = attributes.body,
          foot = attributes.foot,
          maxWidth = attributes.maxWidth,
          tableCollapsed = attributes.tableCollapsed,
          hasFixedLayout = attributes.hasFixedLayout,
          isPreview = attributes.isPreview;
        var _this$state11 = this.state,
          initRow = _this$state11.initRow,
          initCol = _this$state11.initCol,
          selectedCell = _this$state11.selectedCell,
          rangeSelected = _this$state11.rangeSelected,
          multiSelected = _this$state11.multiSelected;
        var maxWidthVal = !!maxWidth ? maxWidth : undefined;
        var currentCell = selectedCell ? body[selectedCell.rowIndex].cells[selectedCell.colIndex] : null;

        // First time insert block, let user determine the table
        if (!body.length) {
          return isPreview ? /*#__PURE__*/React.createElement("img", {
            alt: __('Advanced Table', 'advanced-gutenberg'),
            width: "100%",
            src: className.includes('is-style-stripes') ? previewImageDataStripes : previewImageData
          }) : /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
            className: "advgb-init-table"
          }, /*#__PURE__*/React.createElement(TextControl, {
            type: "number",
            label: __('Column Count', 'advanced-gutenberg'),
            value: initCol,
            onChange: function onChange(value) {
              return _this4.setState({
                initCol: value
              });
            },
            min: "1"
          }), /*#__PURE__*/React.createElement(TextControl, {
            type: "number",
            label: __('Row Count', 'advanced-gutenberg'),
            value: initRow,
            onChange: function onChange(value) {
              return _this4.setState({
                initRow: value
              });
            },
            min: "1"
          }), /*#__PURE__*/React.createElement(Button, {
            isPrimary: true,
            onClick: function onClick() {
              return _this4.createTable();
            }
          }, __('Create', 'advanced-gutenberg')), /*#__PURE__*/React.createElement("div", {
            style: {
              marginTop: 10
            }
          }, /*#__PURE__*/React.createElement("small", null, __('Hint: Hold CTRL key for multi cells selection. Hold SHIFT key for range cells selection.', 'advanced-gutenberg')))));
        }
        var TABLE_CONTROLS = [{
          icon: 'table-row-before',
          title: __('Add Row Before', 'advanced-gutenberg'),
          isDisabled: !selectedCell || this.isRangeSelected() || this.isMultiSelected(),
          onClick: function onClick() {
            return _this4.insertRow(0);
          }
        }, {
          icon: 'table-row-after',
          title: __('Add Row After', 'advanced-gutenberg'),
          isDisabled: !selectedCell || this.isRangeSelected() || this.isMultiSelected(),
          onClick: function onClick() {
            return _this4.insertRow(1);
          }
        }, {
          icon: 'table-row-delete',
          title: __('Delete Row', 'advanced-gutenberg'),
          isDisabled: !selectedCell || this.isRangeSelected() || this.isMultiSelected(),
          onClick: function onClick() {
            return _this4.deleteRow();
          }
        }, {
          icon: 'table-col-before',
          title: __('Add Column Before', 'advanced-gutenberg'),
          isDisabled: !selectedCell || this.isRangeSelected() || this.isMultiSelected(),
          onClick: function onClick() {
            return _this4.insertColumn(0);
          }
        }, {
          icon: 'table-col-after',
          title: __('Add Column After', 'advanced-gutenberg'),
          isDisabled: !selectedCell || this.isRangeSelected() || this.isMultiSelected(),
          onClick: function onClick() {
            return _this4.insertColumn(1);
          }
        }, {
          icon: 'table-col-delete',
          title: __('Delete Column', 'advanced-gutenberg'),
          isDisabled: !selectedCell || this.isRangeSelected() || this.isMultiSelected(),
          onClick: function onClick() {
            return _this4.deleteColumn();
          }
        }, {
          icon: /*#__PURE__*/React.createElement("svg", {
            width: "20",
            height: "20",
            viewBox: "4 2 18 18",
            className: "dashicon"
          }, /*#__PURE__*/React.createElement("path", {
            fill: "none",
            d: "M0,0h24v24H0V0z"
          }), /*#__PURE__*/React.createElement("path", {
            d: "M4,5v13h17V5H4z M14,7v9h-3V7H14z M6,7h3v9H6V7z M19,16h-3V7h3V16z"
          })),
          title: __('Split Merged Cells', 'advanced-gutenberg'),
          isDisabled: !selectedCell || currentCell && !currentCell.rowSpan && !currentCell.colSpan || this.isRangeSelected() || this.isMultiSelected(),
          onClick: function onClick() {
            return _this4.splitMergedCells();
          }
        }, {
          icon: /*#__PURE__*/React.createElement("svg", {
            width: "20",
            height: "20",
            className: "dashicon",
            viewBox: "2 2 22 22"
          }, /*#__PURE__*/React.createElement("path", {
            fill: "none",
            d: "M0,0h24v24H0V0z"
          }), /*#__PURE__*/React.createElement("polygon", {
            points: "21,18 2,18 2,20 21,20 21,18"
          }), /*#__PURE__*/React.createElement("path", {
            d: "M19,10v4H4v-4H19 M20,8H3C2.45,8,2,8.45,2,9v6c0,0.55,0.45,1,1,1h17c0.55,0,1-0.45,1-1V9C21,8.45,20.55,8,20,8L20,8z"
          }), /*#__PURE__*/React.createElement("polygon", {
            points: "21,4 2,4 2,6 21,6 21,4"
          })),
          title: __('Merge Cells', 'advanced-gutenberg'),
          isDisabled: !this.isRangeSelected(),
          onClick: function onClick() {
            return _this4.mergeCells();
          }
        }];
        var BORDER_SELECT = [{
          title: __('Border Top', 'advanced-gutenberg'),
          icon: /*#__PURE__*/React.createElement("svg", {
            xmlns: "http://www.w3.org/2000/svg",
            width: "24",
            height: "24",
            viewBox: "0 0 24 24"
          }, /*#__PURE__*/React.createElement("path", {
            d: "M7 21h2v-2H7v2zm0-8h2v-2H7v2zm4 0h2v-2h-2v2zm0 8h2v-2h-2v2zm-8-4h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2v-2H3v2zm0-4h2V7H3v2zm8 8h2v-2h-2v2zm8-8h2V7h-2v2zm0 4h2v-2h-2v2zM3 3v2h18V3H3zm16 14h2v-2h-2v2zm-4 4h2v-2h-2v2zM11 9h2V7h-2v2zm8 12h2v-2h-2v2zm-4-8h2v-2h-2v2z"
          }), /*#__PURE__*/React.createElement("path", {
            d: "M0 0h24v24H0z",
            fill: "none"
          })),
          onClick: function onClick() {
            return _this4.updateCellsStyles({
              setBorder: 'top'
            });
          }
        }, {
          title: __('Border Right', 'advanced-gutenberg'),
          icon: /*#__PURE__*/React.createElement("svg", {
            xmlns: "http://www.w3.org/2000/svg",
            width: "24",
            height: "24",
            viewBox: "0 0 24 24"
          }, /*#__PURE__*/React.createElement("path", {
            d: "M7 21h2v-2H7v2zM3 5h2V3H3v2zm4 0h2V3H7v2zm0 8h2v-2H7v2zm-4 8h2v-2H3v2zm8 0h2v-2h-2v2zm-8-8h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm8 8h2v-2h-2v2zm4-4h2v-2h-2v2zm4-10v18h2V3h-2zm-4 18h2v-2h-2v2zm0-16h2V3h-2v2zm-4 8h2v-2h-2v2zm0-8h2V3h-2v2zm0 4h2V7h-2v2z"
          }), /*#__PURE__*/React.createElement("path", {
            d: "M0 0h24v24H0z",
            fill: "none"
          })),
          onClick: function onClick() {
            return _this4.updateCellsStyles({
              setBorder: 'right'
            });
          }
        }, {
          title: __('Border Bottom', 'advanced-gutenberg'),
          icon: /*#__PURE__*/React.createElement("svg", {
            xmlns: "http://www.w3.org/2000/svg",
            width: "24",
            height: "24",
            viewBox: "0 0 24 24"
          }, /*#__PURE__*/React.createElement("path", {
            d: "M9 11H7v2h2v-2zm4 4h-2v2h2v-2zM9 3H7v2h2V3zm4 8h-2v2h2v-2zM5 3H3v2h2V3zm8 4h-2v2h2V7zm4 4h-2v2h2v-2zm-4-8h-2v2h2V3zm4 0h-2v2h2V3zm2 10h2v-2h-2v2zm0 4h2v-2h-2v2zM5 7H3v2h2V7zm14-4v2h2V3h-2zm0 6h2V7h-2v2zM5 11H3v2h2v-2zM3 21h18v-2H3v2zm2-6H3v2h2v-2z"
          }), /*#__PURE__*/React.createElement("path", {
            d: "M0 0h24v24H0z",
            fill: "none"
          })),
          onClick: function onClick() {
            return _this4.updateCellsStyles({
              setBorder: 'bottom'
            });
          }
        }, {
          title: __('Border Left', 'advanced-gutenberg'),
          icon: /*#__PURE__*/React.createElement("svg", {
            xmlns: "http://www.w3.org/2000/svg",
            width: "24",
            height: "24",
            viewBox: "0 0 24 24"
          }, /*#__PURE__*/React.createElement("path", {
            d: "M11 21h2v-2h-2v2zm0-4h2v-2h-2v2zm0-12h2V3h-2v2zm0 4h2V7h-2v2zm0 4h2v-2h-2v2zm-4 8h2v-2H7v2zM7 5h2V3H7v2zm0 8h2v-2H7v2zm-4 8h2V3H3v18zM19 9h2V7h-2v2zm-4 12h2v-2h-2v2zm4-4h2v-2h-2v2zm0-14v2h2V3h-2zm0 10h2v-2h-2v2zm0 8h2v-2h-2v2zm-4-8h2v-2h-2v2zm0-8h2V3h-2v2z"
          }), /*#__PURE__*/React.createElement("path", {
            d: "M0 0h24v24H0z",
            fill: "none"
          })),
          onClick: function onClick() {
            return _this4.updateCellsStyles({
              setBorder: 'left'
            });
          }
        }, {
          title: __('Border All', 'advanced-gutenberg'),
          icon: /*#__PURE__*/React.createElement("svg", {
            xmlns: "http://www.w3.org/2000/svg",
            width: "24",
            height: "24",
            viewBox: "0 0 24 24"
          }, /*#__PURE__*/React.createElement("path", {
            d: "M3 3v18h18V3H3zm8 16H5v-6h6v6zm0-8H5V5h6v6zm8 8h-6v-6h6v6zm0-8h-6V5h6v6z"
          }), /*#__PURE__*/React.createElement("path", {
            d: "M0 0h24v24H0z",
            fill: "none"
          })),
          onClick: function onClick() {
            return _this4.updateCellsStyles({
              setBorder: 'all'
            });
          }
        }, {
          title: __('Border None', 'advanced-gutenberg'),
          icon: /*#__PURE__*/React.createElement("svg", {
            xmlns: "http://www.w3.org/2000/svg",
            width: "24",
            height: "24",
            viewBox: "0 0 24 24"
          }, /*#__PURE__*/React.createElement("path", {
            d: "M7 5h2V3H7v2zm0 8h2v-2H7v2zm0 8h2v-2H7v2zm4-4h2v-2h-2v2zm0 4h2v-2h-2v2zm-8 0h2v-2H3v2zm0-4h2v-2H3v2zm0-4h2v-2H3v2zm0-4h2V7H3v2zm0-4h2V3H3v2zm8 8h2v-2h-2v2zm8 4h2v-2h-2v2zm0-4h2v-2h-2v2zm0 8h2v-2h-2v2zm0-12h2V7h-2v2zm-8 0h2V7h-2v2zm8-6v2h2V3h-2zm-8 2h2V3h-2v2zm4 16h2v-2h-2v2zm0-8h2v-2h-2v2zm0-8h2V3h-2v2z"
          }), /*#__PURE__*/React.createElement("path", {
            d: "M0 0h24v24H0z",
            fill: "none"
          })),
          onClick: function onClick() {
            return _this4.updateCellsStyles({
              setBorder: 'none'
            });
          }
        }];
        if (this.isRangeSelected()) {
          var EXTRA_BORDER_SELECT = [{
            title: __('Border Vertical', 'advanced-gutenberg'),
            icon: /*#__PURE__*/React.createElement("svg", {
              xmlns: "http://www.w3.org/2000/svg",
              width: "24",
              height: "24",
              viewBox: "0 0 24 24"
            }, /*#__PURE__*/React.createElement("path", {
              d: "M3 9h2V7H3v2zm0-4h2V3H3v2zm4 16h2v-2H7v2zm0-8h2v-2H7v2zm-4 0h2v-2H3v2zm0 8h2v-2H3v2zm0-4h2v-2H3v2zM7 5h2V3H7v2zm12 12h2v-2h-2v2zm-8 4h2V3h-2v18zm8 0h2v-2h-2v2zm0-8h2v-2h-2v2zm0-10v2h2V3h-2zm0 6h2V7h-2v2zm-4-4h2V3h-2v2zm0 16h2v-2h-2v2zm0-8h2v-2h-2v2z"
            }), /*#__PURE__*/React.createElement("path", {
              d: "M0 0h24v24H0z",
              fill: "none"
            })),
            onClick: function onClick() {
              return _this4.updateCellsStyles({
                setBorder: 'vert'
              });
            }
          }, {
            title: __('Border Horizontal', 'advanced-gutenberg'),
            icon: /*#__PURE__*/React.createElement("svg", {
              xmlns: "http://www.w3.org/2000/svg",
              width: "24",
              height: "24",
              viewBox: "0 0 24 24"
            }, /*#__PURE__*/React.createElement("path", {
              d: "M3 21h2v-2H3v2zM5 7H3v2h2V7zM3 17h2v-2H3v2zm4 4h2v-2H7v2zM5 3H3v2h2V3zm4 0H7v2h2V3zm8 0h-2v2h2V3zm-4 4h-2v2h2V7zm0-4h-2v2h2V3zm6 14h2v-2h-2v2zm-8 4h2v-2h-2v2zm-8-8h18v-2H3v2zM19 3v2h2V3h-2zm0 6h2V7h-2v2zm-8 8h2v-2h-2v2zm4 4h2v-2h-2v2zm4 0h2v-2h-2v2z"
            }), /*#__PURE__*/React.createElement("path", {
              d: "M0 0h24v24H0z",
              fill: "none"
            })),
            onClick: function onClick() {
              return _this4.updateCellsStyles({
                setBorder: 'horz'
              });
            }
          }, {
            title: __('Border Inner', 'advanced-gutenberg'),
            icon: /*#__PURE__*/React.createElement("svg", {
              xmlns: "http://www.w3.org/2000/svg",
              width: "24",
              height: "24",
              viewBox: "0 0 24 24"
            }, /*#__PURE__*/React.createElement("path", {
              d: "M3 21h2v-2H3v2zm4 0h2v-2H7v2zM5 7H3v2h2V7zM3 17h2v-2H3v2zM9 3H7v2h2V3zM5 3H3v2h2V3zm12 0h-2v2h2V3zm2 6h2V7h-2v2zm0-6v2h2V3h-2zm-4 18h2v-2h-2v2zM13 3h-2v8H3v2h8v8h2v-8h8v-2h-8V3zm6 18h2v-2h-2v2zm0-4h2v-2h-2v2z"
            }), /*#__PURE__*/React.createElement("path", {
              d: "M0 0h24v24H0z",
              fill: "none"
            })),
            onClick: function onClick() {
              return _this4.updateCellsStyles({
                setBorder: 'inner'
              });
            }
          }, {
            title: __('Border Outer', 'advanced-gutenberg'),
            icon: /*#__PURE__*/React.createElement("svg", {
              xmlns: "http://www.w3.org/2000/svg",
              width: "24",
              height: "24",
              viewBox: "0 0 24 24"
            }, /*#__PURE__*/React.createElement("path", {
              d: "M13 7h-2v2h2V7zm0 4h-2v2h2v-2zm4 0h-2v2h2v-2zM3 3v18h18V3H3zm16 16H5V5h14v14zm-6-4h-2v2h2v-2zm-4-4H7v2h2v-2z"
            }), /*#__PURE__*/React.createElement("path", {
              d: "M0 0h24v24H0z",
              fill: "none"
            })),
            onClick: function onClick() {
              return _this4.updateCellsStyles({
                setBorder: 'outer'
              });
            }
          }];
          BORDER_SELECT = [].concat(_toConsumableArray(BORDER_SELECT), EXTRA_BORDER_SELECT);
        }
        var HORZ_ALIGNMENT_CONTROLS = [{
          icon: 'editor-alignleft',
          title: __('Align left', 'advanced-gutenberg'),
          align: 'left'
        }, {
          icon: 'editor-aligncenter',
          title: __('Align center', 'advanced-gutenberg'),
          align: 'center'
        }, {
          icon: 'editor-alignright',
          title: __('Align right', 'advanced-gutenberg'),
          align: 'right'
        }, {
          icon: 'editor-justify',
          title: __('Align justify', 'advanced-gutenberg'),
          align: 'justify'
        }];
        var VERT_ALIGNMENT_CONTROLS = [{
          icon: /*#__PURE__*/React.createElement("svg", {
            xmlns: "http://www.w3.org/2000/svg",
            width: "20",
            height: "20",
            viewBox: "0 0 24 24"
          }, /*#__PURE__*/React.createElement("path", {
            d: "M8 11h3v10h2V11h3l-4-4-4 4zM4 3v2h16V3H4z"
          }), /*#__PURE__*/React.createElement("path", {
            d: "M0 0h24v24H0z",
            fill: "none"
          })),
          title: __('Align top', 'advanced-gutenberg'),
          align: 'top'
        }, {
          icon: /*#__PURE__*/React.createElement("svg", {
            xmlns: "http://www.w3.org/2000/svg",
            width: "20",
            height: "20",
            viewBox: "0 0 24 24"
          }, /*#__PURE__*/React.createElement("path", {
            d: "M8 19h3v4h2v-4h3l-4-4-4 4zm8-14h-3V1h-2v4H8l4 4 4-4zM4 11v2h16v-2H4z"
          }), /*#__PURE__*/React.createElement("path", {
            d: "M0 0h24v24H0z",
            fill: "none"
          })),
          title: __('Align middle', 'advanced-gutenberg'),
          align: 'middle'
        }, {
          icon: /*#__PURE__*/React.createElement("svg", {
            xmlns: "http://www.w3.org/2000/svg",
            width: "20",
            height: "20",
            viewBox: "0 0 24 24"
          }, /*#__PURE__*/React.createElement("path", {
            d: "M16 13h-3V3h-2v10H8l4 4 4-4zM4 19v2h16v-2H4z"
          }), /*#__PURE__*/React.createElement("path", {
            d: "M0 0h24v24H0z",
            fill: "none"
          })),
          title: __('Align bottom', 'advanced-gutenberg'),
          align: 'bottom'
        }];
        return isPreview ? /*#__PURE__*/React.createElement("img", {
          alt: __('Advanced Table', 'advanced-gutenberg'),
          width: "100%",
          src: previewImageData
        }) : /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(BlockControls, null, /*#__PURE__*/React.createElement(ToolbarGroup, null, /*#__PURE__*/React.createElement(DropdownMenu, {
          hasArrowIndicator: true,
          icon: "editor-table",
          label: __('Edit Table', 'advanced-gutenberg'),
          controls: TABLE_CONTROLS
        }), /*#__PURE__*/React.createElement(ToolbarButton, {
          icon: "update",
          label: __('Refresh table (Use this after using undo or redo)', 'advanced-gutenberg'),
          onClick: function onClick() {
            return _this4.calculateRealColIndex();
          }
        }))), /*#__PURE__*/React.createElement(InspectorControls, null, /*#__PURE__*/React.createElement(PanelBody, {
          className: "pp-block-table-control-settings",
          title: __('Table Settings', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Max width (px)', 'advanced-gutenberg'),
          help: __('Set this to 0 to make max-width is 100%', 'advanced-gutenberg'),
          min: 0,
          max: 1999,
          value: maxWidth,
          onChange: function onChange(value) {
            return setAttributes({
              maxWidth: value
            });
          }
        }), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Fixed width table cells', 'advanced-gutenberg'),
          checked: hasFixedLayout,
          onChange: function onChange() {
            return setAttributes({
              hasFixedLayout: !hasFixedLayout
            });
          }
        }), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Table header', 'advanced-gutenberg'),
          checked: head && head.length,
          onChange: function onChange() {
            return _this4.toggleSection('head');
          }
        }), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Table footer', 'advanced-gutenberg'),
          checked: foot && foot.length,
          onChange: function onChange() {
            return _this4.toggleSection('foot');
          }
        }), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Border collapsed', 'advanced-gutenberg'),
          checked: tableCollapsed,
          onChange: function onChange() {
            return setAttributes({
              tableCollapsed: !tableCollapsed
            });
          }
        })), /*#__PURE__*/React.createElement(PanelBody, {
          className: "pp-block-table-control-settings",
          title: __('Cell Settings', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Color Settings', 'advanced-gutenberg'),
          colorSettings: [{
            label: __('Background Color', 'advanced-gutenberg'),
            value: this.getCellStyles('backgroundColor'),
            onChange: function onChange(value) {
              return _this4.updateCellsStyles({
                backgroundColor: value
              });
            }
          }, {
            label: __('Text Color', 'advanced-gutenberg'),
            value: this.getCellStyles('color'),
            onChange: function onChange(value) {
              return _this4.updateCellsStyles({
                color: value
              });
            }
          }]
        }), /*#__PURE__*/React.createElement(PanelBody, {
          className: "pp-block-table-control-settings",
          title: __('Border', 'advanced-gutenberg'),
          initialOpen: false
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-border-item-wrapper"
        }, BORDER_SELECT.map(function (item, index) {
          return /*#__PURE__*/React.createElement("div", {
            className: "advgb-border-item",
            key: index
          }, /*#__PURE__*/React.createElement(Tooltip, {
            text: item.title
          }, /*#__PURE__*/React.createElement("span", {
            onClick: item.onClick
          }, item.icon)));
        })), /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Border Style', 'advanced-gutenberg'),
          value: this.getCellStyles('borderStyle'),
          options: [{
            label: __('Solid', 'advanced-gutenberg'),
            value: 'solid'
          }, {
            label: __('Dashed', 'advanced-gutenberg'),
            value: 'dashed'
          }, {
            label: __('Dotted', 'advanced-gutenberg'),
            value: 'dotted'
          }, {
            label: __('None', 'advanced-gutenberg'),
            value: 'none'
          }],
          onChange: function onChange(value) {
            return _this4.updateCellsStyles({
              borderStyle: value
            });
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Border width', 'advanced-gutenberg'),
          value: this.getCellStyles('borderWidth') || 0,
          min: 0,
          max: 10,
          onChange: function onChange(value) {
            return _this4.updateCellsStyles({
              borderWidth: value
            });
          }
        }), /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Border Color', 'advanced-gutenberg'),
          colorSettings: [{
            label: __('Border Color', 'advanced-gutenberg'),
            value: this.getCellStyles('borderColor'),
            onChange: function onChange(value) {
              return _this4.updateCellsStyles({
                borderColor: value
              });
            }
          }]
        })), /*#__PURE__*/React.createElement(PanelBody, {
          className: "pp-block-table-control-settings",
          title: __('Padding', 'advanced-gutenberg'),
          initialOpen: false
        }, /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Padding Top', 'advanced-gutenberg'),
          value: this.getCellStyles('paddingTop') || 0,
          min: 0,
          max: 100,
          onChange: function onChange(value) {
            return _this4.updateCellsStyles({
              paddingTop: value
            });
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Padding Right', 'advanced-gutenberg'),
          value: this.getCellStyles('paddingRight') || 0,
          min: 0,
          max: 100,
          onChange: function onChange(value) {
            return _this4.updateCellsStyles({
              paddingRight: value
            });
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Padding Bottom', 'advanced-gutenberg'),
          value: this.getCellStyles('paddingBottom') || 0,
          min: 0,
          max: 100,
          onChange: function onChange(value) {
            return _this4.updateCellsStyles({
              paddingBottom: value
            });
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Padding Left', 'advanced-gutenberg'),
          value: this.getCellStyles('paddingLeft') || 0,
          min: 0,
          max: 100,
          onChange: function onChange(value) {
            return _this4.updateCellsStyles({
              paddingLeft: value
            });
          }
        })), /*#__PURE__*/React.createElement(PanelBody, {
          className: "pp-block-table-control-settings",
          title: __('Text Alignment', 'advanced-gutenberg'),
          initialOpen: false
        }, /*#__PURE__*/React.createElement(BaseControl, {
          help: __('Horizontal Align', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(ToolbarGroup, {
          controls: HORZ_ALIGNMENT_CONTROLS.map(function (control) {
            var isActive = _this4.getCellStyles('textAlign') === control.align;
            return _objectSpread(_objectSpread({}, control), {}, {
              isActive: isActive,
              onClick: function onClick() {
                return _this4.updateCellsStyles({
                  textAlign: isActive ? undefined : control.align
                });
              }
            });
          })
        })), /*#__PURE__*/React.createElement(BaseControl, {
          help: __('Vertical Align', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(ToolbarGroup, {
          controls: VERT_ALIGNMENT_CONTROLS.map(function (control) {
            var isActive = _this4.getCellStyles('verticalAlign') === control.align;
            return _objectSpread(_objectSpread({}, control), {}, {
              isActive: isActive,
              onClick: function onClick() {
                return _this4.updateCellsStyles({
                  verticalAlign: isActive ? undefined : control.align
                });
              }
            });
          })
        }))))), /*#__PURE__*/React.createElement("table", {
          className: className,
          style: {
            maxWidth: maxWidthVal,
            borderCollapse: tableCollapsed ? 'collapse' : undefined,
            tableLayout: hasFixedLayout ? 'fixed' : undefined
          }
        }, !!head.length && /*#__PURE__*/React.createElement("thead", null, this.renderSection('head')), /*#__PURE__*/React.createElement("tbody", null, this.renderSection('body')), !!foot.length && /*#__PURE__*/React.createElement("tfoot", null, this.renderSection('foot'))));
      }
    }], [{
      key: "parseStyles",
      value: function parseStyles(styles) {
        if (typeof styles !== 'string') {
          return styles;
        }
        return styles.split(';').filter(function (style) {
          return style.split(':')[0] && style.split(':')[1];
        }).map(function (style) {
          return [style.split(':')[0].trim().replace(/-./g, function (c) {
            return c.substr(1).toUpperCase();
          }), style.split(':')[1].trim()];
        }).reduce(function (styleObj, style) {
          return _objectSpread(_objectSpread({}, styleObj), {}, _defineProperty({}, style[0], style[1]));
        }, {});
      }
    }]);
  }(Component);
  registerBlockType('advgb/table', {
    apiVersion: 3,
    title: __('Table - PublishPress', 'advanced-gutenberg'),
    description: __('Table block with more styles and functions.', 'advanced-gutenberg'),
    icon: {
      src: tableBlockIcon,
      foreground: typeof advgbBlocks !== 'undefined' ? advgbBlocks.color : undefined
    },
    category: 'advgb-category',
    keywords: [__('table', 'advanced-gutenberg'), __('advanced table', 'advanced-gutenberg'), __('cell', 'advanced-gutenberg'), __('data', 'advanced-gutenberg')],
    attributes: {
      head: {
        type: 'array',
        default: [],
        source: 'query',
        selector: 'thead tr',
        query: {
          cells: {
            type: 'array',
            default: [],
            source: 'query',
            selector: 'td, th',
            query: {
              content: {
                source: 'html'
              },
              styles: {
                type: 'string',
                source: 'attribute',
                attribute: 'style'
              },
              colSpan: {
                type: 'string',
                source: 'attribute',
                attribute: 'colspan'
              },
              borderColorSaved: {
                type: 'string',
                source: 'attribute',
                attribute: 'data-border-color'
              }
            }
          }
        }
      },
      body: {
        type: 'array',
        default: [],
        source: 'query',
        selector: 'tbody tr',
        query: {
          cells: {
            type: 'array',
            default: [],
            source: 'query',
            selector: 'td',
            query: {
              content: {
                source: 'html'
              },
              styles: {
                type: 'string',
                source: 'attribute',
                attribute: 'style'
              },
              colSpan: {
                type: 'string',
                source: 'attribute',
                attribute: 'colspan'
              },
              rowSpan: {
                type: 'string',
                source: 'attribute',
                attribute: 'rowspan'
              },
              borderColorSaved: {
                type: 'string',
                source: 'attribute',
                attribute: 'data-border-color'
              }
            }
          }
        }
      },
      foot: {
        type: 'array',
        default: [],
        source: 'query',
        selector: 'tfoot tr',
        query: {
          cells: {
            type: 'array',
            default: [],
            source: 'query',
            selector: 'td, th',
            query: {
              content: {
                source: 'html'
              },
              styles: {
                type: 'string',
                source: 'attribute',
                attribute: 'style'
              },
              colSpan: {
                type: 'string',
                source: 'attribute',
                attribute: 'colspan'
              },
              borderColorSaved: {
                type: 'string',
                source: 'attribute',
                attribute: 'data-border-color'
              }
            }
          }
        }
      },
      maxWidth: {
        type: 'number',
        default: 0
      },
      hasFixedLayout: {
        type: 'boolean',
        default: false
      },
      tableCollapsed: {
        type: 'boolean',
        default: false
      },
      changed: {
        type: 'boolean',
        default: false
      },
      isPreview: {
        type: 'boolean',
        default: false
      },
      blockIDX: {
        type: 'string'
      }
    },
    example: {
      attributes: {
        isPreview: true
      }
    },
    supports: {
      align: true,
      anchor: true
    },
    styles: [{
      name: 'default',
      label: __('Default', 'advanced-gutenberg'),
      isDefault: true
    }, {
      name: 'stripes',
      label: __('Stripes', 'advanced-gutenberg')
    }],
    edit: AdvTable,
    save: function save(_ref3) {
      var attributes = _ref3.attributes;
      var head = attributes.head,
        body = attributes.body,
        foot = attributes.foot,
        maxWidth = attributes.maxWidth,
        tableCollapsed = attributes.tableCollapsed,
        hasFixedLayout = attributes.hasFixedLayout;
      var maxWidthVal = !!maxWidth ? maxWidth : undefined;
      function renderSection(section) {
        var sectionTagName = section === 'head' ? 'th' : 'td';
        return attributes[section].map(function (_ref4, rowIndex) {
          var cells = _ref4.cells;
          return /*#__PURE__*/React.createElement("tr", {
            key: rowIndex
          }, cells.map(function (_ref5, colIndex) {
            var content = _ref5.content,
              styles = _ref5.styles,
              colSpan = _ref5.colSpan,
              rowSpan = _ref5.rowSpan,
              borderColorSaved = _ref5.borderColorSaved;
            return /*#__PURE__*/React.createElement(RichText.Content, {
              tagName: sectionTagName,
              value: content,
              key: colIndex,
              style: styles,
              colSpan: colSpan,
              rowSpan: rowSpan,
              "data-border-color": borderColorSaved
            });
          }));
        });
      }
      return /*#__PURE__*/React.createElement("table", {
        className: "advgb-table-frontend",
        style: {
          maxWidth: maxWidthVal,
          borderCollapse: tableCollapsed ? 'collapse' : undefined,
          tableLayout: hasFixedLayout ? 'fixed' : undefined
        }
      }, !!head.length && /*#__PURE__*/React.createElement("thead", null, renderSection('head')), /*#__PURE__*/React.createElement("tbody", null, renderSection('body')), !!foot.length && /*#__PURE__*/React.createElement("tfoot", null, renderSection('foot')));
    },
    transforms: {
      from: [{
        type: 'block',
        blocks: ['core/table'],
        transform: function transform(attributes) {
          return createBlock('advgb/table', {
            body: attributes.body
          });
        }
      }]
    },
    deprecated: [{
      attributes: {
        head: {
          type: 'array',
          default: [],
          source: 'query',
          selector: 'thead tr',
          query: {
            cells: {
              type: 'array',
              default: [],
              source: 'query',
              selector: 'td, th',
              query: {
                content: {
                  source: 'html'
                },
                styles: {
                  type: 'string',
                  source: 'attribute',
                  attribute: 'style'
                },
                colSpan: {
                  type: 'string',
                  source: 'attribute',
                  attribute: 'colspan'
                },
                borderColorSaved: {
                  type: 'string',
                  source: 'attribute',
                  attribute: 'data-border-color'
                }
              }
            }
          }
        },
        body: {
          type: 'array',
          default: [],
          source: 'query',
          selector: 'tbody tr',
          query: {
            cells: {
              type: 'array',
              default: [],
              source: 'query',
              selector: 'td',
              query: {
                content: {
                  source: 'html'
                },
                styles: {
                  type: 'string',
                  source: 'attribute',
                  attribute: 'style'
                },
                colSpan: {
                  type: 'string',
                  source: 'attribute',
                  attribute: 'colspan'
                },
                rowSpan: {
                  type: 'string',
                  source: 'attribute',
                  attribute: 'rowspan'
                },
                borderColorSaved: {
                  type: 'string',
                  source: 'attribute',
                  attribute: 'data-border-color'
                }
              }
            }
          }
        },
        foot: {
          type: 'array',
          default: [],
          source: 'query',
          selector: 'tfoot tr',
          query: {
            cells: {
              type: 'array',
              default: [],
              source: 'query',
              selector: 'td, th',
              query: {
                content: {
                  source: 'html'
                },
                styles: {
                  type: 'string',
                  source: 'attribute',
                  attribute: 'style'
                },
                colSpan: {
                  type: 'string',
                  source: 'attribute',
                  attribute: 'colspan'
                },
                borderColorSaved: {
                  type: 'string',
                  source: 'attribute',
                  attribute: 'data-border-color'
                }
              }
            }
          }
        },
        maxWidth: {
          type: 'number',
          default: 0
        },
        hasFixedLayout: {
          type: 'boolean',
          default: false
        },
        tableCollapsed: {
          type: 'boolean',
          default: false
        },
        changed: {
          type: 'boolean',
          default: false
        },
        isPreview: {
          type: 'boolean',
          default: false
        }
      },
      save: function save(_ref6) {
        var attributes = _ref6.attributes;
        var head = attributes.head,
          body = attributes.body,
          foot = attributes.foot,
          maxWidth = attributes.maxWidth,
          tableCollapsed = attributes.tableCollapsed,
          hasFixedLayout = attributes.hasFixedLayout;
        var maxWidthVal = !!maxWidth ? maxWidth : undefined;
        function renderSection(section) {
          var sectionTagName = section === 'head' ? 'th' : 'td';
          return attributes[section].map(function (_ref7, rowIndex) {
            var cells = _ref7.cells;
            return /*#__PURE__*/React.createElement("tr", {
              key: rowIndex
            }, cells.map(function (_ref8, colIndex) {
              var content = _ref8.content,
                styles = _ref8.styles,
                colSpan = _ref8.colSpan,
                rowSpan = _ref8.rowSpan,
                borderColorSaved = _ref8.borderColorSaved;
              return /*#__PURE__*/React.createElement(RichText.Content, {
                tagName: sectionTagName,
                value: content,
                key: colIndex,
                style: styles,
                colSpan: colSpan,
                rowSpan: rowSpan,
                "data-border-color": borderColorSaved
              });
            }));
          });
        }
        return /*#__PURE__*/React.createElement("table", {
          className: "advgb-table-frontend",
          style: {
            maxWidth: maxWidthVal,
            borderCollapse: tableCollapsed ? 'collapse' : undefined,
            tableLayout: hasFixedLayout ? 'fixed' : undefined
          }
        }, !!head.length && /*#__PURE__*/React.createElement("thead", null, renderSection('head')), /*#__PURE__*/React.createElement("tbody", null, renderSection('body')), !!foot.length && /*#__PURE__*/React.createElement("tfoot", null, renderSection('foot')));
      }
    }, {
      attributes: {
        head: {
          type: 'array',
          default: [],
          source: 'query',
          selector: 'thead tr',
          query: {
            cells: {
              type: 'array',
              default: [],
              source: 'query',
              selector: 'td, th',
              query: {
                content: {
                  source: 'html'
                },
                styles: {
                  type: 'string',
                  source: 'attribute',
                  attribute: 'style'
                },
                colSpan: {
                  type: 'string',
                  source: 'attribute',
                  attribute: 'colspan'
                },
                borderColorSaved: {
                  type: 'string',
                  source: 'attribute',
                  attribute: 'data-border-color'
                }
              }
            }
          }
        },
        body: {
          type: 'array',
          default: [],
          source: 'query',
          selector: 'tbody tr',
          query: {
            cells: {
              type: 'array',
              default: [],
              source: 'query',
              selector: 'td',
              query: {
                content: {
                  source: 'html'
                },
                styles: {
                  type: 'string',
                  source: 'attribute',
                  attribute: 'style'
                },
                colSpan: {
                  type: 'string',
                  source: 'attribute',
                  attribute: 'colspan'
                },
                rowSpan: {
                  type: 'string',
                  source: 'attribute',
                  attribute: 'rowspan'
                },
                borderColorSaved: {
                  type: 'string',
                  source: 'attribute',
                  attribute: 'data-border-color'
                }
              }
            }
          }
        },
        foot: {
          type: 'array',
          default: [],
          source: 'query',
          selector: 'tfoot tr',
          query: {
            cells: {
              type: 'array',
              default: [],
              source: 'query',
              selector: 'td, th',
              query: {
                content: {
                  source: 'html'
                },
                styles: {
                  type: 'string',
                  source: 'attribute',
                  attribute: 'style'
                },
                colSpan: {
                  type: 'string',
                  source: 'attribute',
                  attribute: 'colspan'
                },
                borderColorSaved: {
                  type: 'string',
                  source: 'attribute',
                  attribute: 'data-border-color'
                }
              }
            }
          }
        },
        maxWidth: {
          type: 'number',
          default: 0
        },
        hasFixedLayout: {
          type: 'boolean',
          default: false
        },
        tableCollapsed: {
          type: 'boolean',
          default: false
        },
        changed: {
          type: 'boolean',
          default: false
        },
        isPreview: {
          type: 'boolean',
          default: false
        }
      },
      save: function save(_ref9) {
        var attributes = _ref9.attributes;
        var head = attributes.head,
          body = attributes.body,
          foot = attributes.foot,
          maxWidth = attributes.maxWidth,
          tableCollapsed = attributes.tableCollapsed,
          hasFixedLayout = attributes.hasFixedLayout;
        var maxWidthVal = !!maxWidth ? maxWidth : undefined;
        function renderSection(section) {
          return attributes[section].map(function (_ref10, rowIndex) {
            var cells = _ref10.cells;
            return /*#__PURE__*/React.createElement("tr", {
              key: rowIndex
            }, cells.map(function (_ref11, colIndex) {
              var content = _ref11.content,
                styles = _ref11.styles,
                colSpan = _ref11.colSpan,
                rowSpan = _ref11.rowSpan,
                borderColorSaved = _ref11.borderColorSaved;
              return /*#__PURE__*/React.createElement(RichText.Content, {
                tagName: "td",
                value: content,
                key: colIndex,
                style: styles,
                colSpan: colSpan,
                rowSpan: rowSpan,
                "data-border-color": borderColorSaved
              });
            }));
          });
        }
        return /*#__PURE__*/React.createElement("table", {
          className: "advgb-table-frontend",
          style: {
            maxWidth: maxWidthVal,
            borderCollapse: tableCollapsed ? 'collapse' : undefined,
            tableLayout: hasFixedLayout ? 'fixed' : undefined
          }
        }, !!head.length && /*#__PURE__*/React.createElement("thead", null, renderSection('head')), /*#__PURE__*/React.createElement("tbody", null, renderSection('body')), !!foot.length && /*#__PURE__*/React.createElement("tfoot", null, renderSection('foot')));
      }
    }]
  });
})(wp.i18n, wp.blocks, wp.element, wp.blockEditor, wp.components, lodash);

/***/ },

/***/ "./assets/blocks/advtabs/block.jsx"
/*!*****************************************!*\
  !*** ./assets/blocks/advtabs/block.jsx ***!
  \*****************************************/
() {

function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _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 _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
(function (wpI18n, wpBlocks, wpElement, wpBlockEditor, wpComponents, wpCompose, lodash) {
  wpBlockEditor = wp.blockEditor || wp.editor;
  var __ = wpI18n.__;
  var Component = wpElement.Component,
    Fragment = wpElement.Fragment;
  var registerBlockType = wpBlocks.registerBlockType,
    createBlock = wpBlocks.createBlock,
    cloneBlock = wpBlocks.cloneBlock;
  var _wpBlockEditor = wpBlockEditor,
    InspectorControls = _wpBlockEditor.InspectorControls,
    RichText = _wpBlockEditor.RichText,
    PanelColorSettings = _wpBlockEditor.PanelColorSettings,
    InnerBlocks = _wpBlockEditor.InnerBlocks;
  var Dashicon = wpComponents.Dashicon,
    Tooltip = wpComponents.Tooltip,
    PanelBody = wpComponents.PanelBody,
    RangeControl = wpComponents.RangeControl,
    SelectControl = wpComponents.SelectControl,
    Button = wpComponents.Button,
    TextControl = wpComponents.TextControl;
  var _wp$data = wp.data,
    withDispatch = _wp$data.withDispatch,
    withSelect = _wp$data.withSelect,
    select = _wp$data.select,
    dispatch = _wp$data.dispatch;
  var compose = wpCompose.compose;
  var times = lodash.times;
  var svgPath = /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("path", {
    fill: "currentColor",
    d: "M491.2,474.55a1.93,1.93,0,0,1,0-2.84Z"
  }), /*#__PURE__*/React.createElement("path", {
    fill: "none",
    stroke: "currentColor",
    strokeMiterlimit: "10",
    strokeWidth: "7.43",
    d: "M248.71,475.78H34.46c-10.59,0-11.37-.8-11.37-11.22q0-206.92,0-413.84c0-4.89-.2-9.78-.08-14.66.21-8.43,3.91-12,12.18-12,41.14,0,82.29.08,123.44-.12,4.38,0,6.31,1.52,8,5.29,14.32,31.05,28.91,62,43.22,93,1.7,3.69,3.65,5,7.74,5q122.26-.18,244.52-.09c12.73,0,12.73,0,12.73,12.59V463.22c0,12.14-.4,12.56-12.39,12.56Z"
  }), /*#__PURE__*/React.createElement("path", {
    fill: "currentColor",
    d: "M257,24.15c23,0,46,.11,69-.09,4.67,0,6.33,1.24,6.29,6.12q-.33,37.57,0,75.17c0,4.52-1.39,6-5.93,6q-49.17-.24-98.34,0c-4.29,0-6.49-1.5-8.24-5.32C208,80.21,196,54.53,184.06,28.81c-2.08-4.48-2-4.64,3-4.65Q222.05,24.13,257,24.15Z"
  }), /*#__PURE__*/React.createElement("path", {
    fill: "currentColor",
    d: "M411.32,111.22c-18.92,0-37.85-.12-56.77.08-4.59,0-6.39-1.09-6.35-6q.33-37.6,0-75.21c0-4.53,1.41-6,5.95-6,36.43.15,72.85.07,109.27.1,6.91,0,9.69,2.29,11.09,9.08a27.87,27.87,0,0,1,.53,5.62q0,33.12,0,66.23c0,6.05-.13,6.13-6.05,6.13Z"
  }));
  var tabHorizontalIcon = /*#__PURE__*/React.createElement("svg", {
    color: "#5954d6",
    xmlns: "http://www.w3.org/2000/svg",
    width: "50",
    height: "50",
    viewBox: "0 0 500 500",
    style: {
      backgroundColor: "#fff"
    }
  }, svgPath);
  var tabVerticalIcon = /*#__PURE__*/React.createElement("svg", {
    color: "#5954d6",
    xmlns: "http://www.w3.org/2000/svg",
    width: "50",
    height: "50",
    viewBox: "0 0 500 500",
    style: {
      backgroundColor: "#fff"
    },
    transform: "rotate(-90) scale(-1, 1)"
  }, svgPath);
  var TABS_STYLES = [{
    name: 'horz',
    label: __('Horizontal', 'advanced-gutenberg'),
    icon: tabHorizontalIcon
  }, {
    name: 'vert',
    label: __('Vertical', 'advanced-gutenberg'),
    icon: tabVerticalIcon
  }];
  var previewImageData = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAADzCAYAAACv4wv1AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAACiRJREFUeNrs3c1rHOcBwOGZ2V3JkoJcArEbKCWE4NC4EEMwlPYQY3qoaeihkEtPOZkGcogvaS7ufxCoIZReeuglh+BDC8WXkgRaSopPwW1CoDkEO20gbgyOYq0l7e5032U3jEaz0n7Maker54FhJVmRJjP6zfvO7GgVRQAAAAAAAAAAcIzEs/ii9Xr90L4XHHFp/gOtVqu6offjjgUO5QQfPlZW9PEM4o73+fqih+Fxp/v92zTRxyVFftCjyGH00LOPaRmxxxNGng84zsUdHxA9sH/caS70dJrY4ykiLwo7LEn/44nYYeTIR10mij2eMvIkF3jv8aWXXjrxyiuvnFlbW/tWmqZJp9Pp/Tf9Rzj24jjuLVtbW82bN29++tprr/1vY2Oj0485/5h/e+zY4zEiLxrFk8xj8swzz9Rv3Ljxk1OnTl3ufv5z3f+Rk0Zx2GdIT9Nmu93+tBv5n956663fv/rqq3czYeeXiUf2cUIfFnktvP3666+vX7169XdLS0s/s/tgfN0Z739v3br1y/Pnz/+9+247E3h7yCgfnnNPSws9M5rnz8V7kZ85c6bxwQcf/LnRaPzI7oKpRvjNd95556eXLl36Zz/wdi72bPAjj+rJhFP8JDtt767YL7qR/9BugqnP3Veff/753547d+5EfyCt5Xqb6MJ2Ms46FCy17pFnpXtO/mvn4lCO7qD5vWvXrv0gTKZzoSdDOpw+9IL71nedo7/88svfTZLktN0D5Xnqqad+nIm8VhD5WOrjzizy5+mnT5/+tt0C5VpbW/t+P/DBOflgcE0z76ejfr1kxLgLIw9Lp9Op2y1Q/gw+N2UfOm3P3ak61Tl6/pbXby7EtdvtxD6BmUiGnKNP9IXGnbbver87orsIByVL0zTeZxQf++r7JKPxrm/mtlaYmaninjb0XSvRP/IAs4+96DR6JqHvubzfDd2ugNlFPtEIPu05uhEd5hf7xC/k4oo5HANTh27qDoc6dZ/ozjgjOhjRAaEDQgeEDggdEDogdEDoIHRA6IDQAaEDQgeEDggdEDoIHRA6IHRA6IDQAaEDQgeEDkK3CUDogNABoQNCB4QOCB0YVb2KK/X5559H9+7dO/yNUa9Hjz/+eLS+vr7n31qtVvTw4cMoTdNDX69GoxGdOHFi18c6nU7UbDZ7j4etVqtFKysrURzHChL6ZD755JPo7t27c/v+4QBz9uzZXbGHyL/66qu5rdPOzk4v6NXV1d774WBz//79uRx0BusTlpMnTyrI1H18W1tbc408O6PICiP5vGVnE2E7zSvygXa7HW1vbytI6JOFXgVhBM+ad1TZuKq4PggdEDogdEDogNCBvrpNwGELz2qE5+GTJImWl5dtECM6iyhEHu7q8zy8EX2PJ554IlpbWyv1a37xxRdT3aATRqOyR6Qw2m1ubk7034ZbU8veRsE87wrkmIUefoCL7kGf5w9wmHqG++MrMz2r2PpkhZtrBgewwY024aC2sbHRe3tpack0XugcdeFuvjBlH/axqh6ghA5jzjbCb7wNRvL8xbjwG3oIPfrwww8rt07hglJYqiLEM49f7x039LDNwroOft2VQ9j+NgEY0aF0YboepupeuELoLPj5elgwdQeEDggdEDoIfY6qcgtkVe/SCs87Wx8WIvSy72efxGOPPVa5A1C4F3zwdFRYn3k/NRWumrub7eio3ND19NNPR5999ln04MGDuXz/8AccHn300T2RPfLII3N7ldoww8j+AYcQWTgghjvM5vGKsIO73DwPLvSpfqjDr6RWTYg9LFWaNoeDDxy5qTsgdEDogNBB6MAiq/Rvr4U/FRyW/EsQQRWFpxvDs0bhGZGqPfVYydDDc8PhhQSr8tdVYVzhPoMqvXpOvYqRh1dn9Sd5OcrCzUxhNjqLl99eiHP0sIFEziIIM9KqzEqTKm4cWBQPHz4Uel4Yyedx7zbM8mda6AXn58AxmLoDQgeEDggdhA4IHRA6IHRA6IDQAaEDQgeh2wQgdEDogNABoQNCB4QOCB0QOggdEDpwtNSP4kovLy/3FhbbgwcP/Hmu4xx6kiS9P0/Lgk83u/tZ6KbugNABoYPQgUVyJK9oNZvN3gIY0QGhg6l7tY9OSRLVajV7r6JarVaUpqkNIfTphLviVlZW7L2K2tjYiHZ2dmwIU3dA6IDQAaEDOUfyYtzW1lbvyi7VZN8IvRSdTqe3AKbugNDB1L3SGo2GV5ipsHANxamV0Kdf6W7k7oyrrnAxTuim7oDQAaEDQgf2cmccpbNvhF4Kd8aBqTsgdBA6IHRA6IDQAaEDQgeEDggdhA4IHRA6IHRA6IDQAaEDQgeEDkIHhA4IHRA6IHRgYUOv1Wr2CAsljmOhF20UsbNIlpaWhF5kbW3NTwcLM5qvrKwIvUi9Xhc7CxH5+vp6lCTVSKySf2RxeXk5ajQaUbPZ9McUOXLC6WcYyatyfl7Z0HtTje6R0MgOCzp1B4QOCB0QOggdEDogdEDogNABoQNCB4QOQrcJQOiA0AGhA0IHhA4IHRA6IHQQOiB0QOiA0AGhA0IHhA4IHYQOCB0QOrC4ocdxbCvCbKS5x/zbRnQ4BgeAmYSeFryfNrtsdyjXzs7O/X1G9ZmP6Glm6XnvvfduT7sSwG537tx5v8wp/DRT917wb7755r3Nzc337Rooz/Xr1/+aG1Snir124JEgScLVtuySZB6TdrudPPnkk/969tlnfx7H8ZJdBFOP5n948cUXb3Tf7HSXdmbpZJZdM+tOp1PqOXr+CNNbLl++/O9bt25d7UZ/z26CyX355Zd/eeGFF35TEHTRMvKonowRefbtTuaxd9Q5f/78H999990rX3/99c00TbftMhjd1tbWfz7++ONrFy5c+NVHH33UzLY1bBQfx4FPgtfr9Sg3bU/6U/56Zmn0H2sXL148eeXKlefOnTt3aXV19TuZqT6Qs729ff/27dv/ePvtt//2xhtv3MnE3cotO/3HdlH8rVar9NDjfuj52OuZj9UyB4Vs6IKHvbPkPTPkgtBbBefrg8gPHOXrB31COFL0Y49y5wXZlYpzEaf92AefF4schgaf7Sl/AS5/Ea4zyfS9PsERKM6tXJyJPb/ySbT7ir1RHfYOmtmeBmG3ov2vtKfjnLPXx1ipuOAIFA85OiX9f09ysUdih4Mvbuem8EWxjzWqjxR6ZvqeZs4pBjFHBQeBpCByIzocPKIXXW0fGvlBF+EmnbrHBUeiqGCF4yGjucihOPZO7rG9T+Rj3/8+VnjdUT0fbDbkZMij0GG8UX2/x28+f9TRfNwRPTuqZx+z5+TZf+sIHUY+Tx+2dCYdxSce0QtG9mhIzAcFLngEvjf0KNrnVvPMeflMn14rWtk4t0LZEb0ocoHD8FF9WPTffM440/XSRtbMXXPRCFGLHA4e4Yf9GurEkZcWX0Hw4oaSpvXTBD7TEPcJHzgg9jLCBgAAAAAAZuX/AgwAYHi5yJYhRDUAAAAASUVORK5CYII=';

  /**
   * This allows for checking to see if the block needs to generate a new ID.
   */
  var advgbTabsUniqueIDs = [];
  var AdvTabsWrapper = /*#__PURE__*/function (_Component) {
    function AdvTabsWrapper() {
      var _this;
      _classCallCheck(this, AdvTabsWrapper);
      _this = _callSuper(this, AdvTabsWrapper, arguments);
      _this.state = {
        viewport: 'desktop',
        isBlockIdSet: false // @since 3.2.3
      };
      return _this;
    }
    _inherits(AdvTabsWrapper, _Component);
    return _createClass(AdvTabsWrapper, [{
      key: "componentWillMount",
      value: function componentWillMount() {
        var _this$props = this.props,
          attributes = _this$props.attributes,
          setAttributes = _this$props.setAttributes;
        var currentBlockConfig = advgbDefaultConfig['advgb-adv-tabs'];
        // No override attributes of blocks inserted before
        if (attributes.changed !== true) {
          if (_typeof(currentBlockConfig) === 'object' && currentBlockConfig !== null) {
            Object.keys(currentBlockConfig).map(function (attribute) {
              if (typeof attributes[attribute] === 'boolean') {
                attributes[attribute] = !!currentBlockConfig[attribute];
              } else {
                attributes[attribute] = currentBlockConfig[attribute];
              }
            });
          }

          // Finally set changed attribute to true, so we don't modify anything again
          setAttributes({
            changed: true
          });
        }
      }
    }, {
      key: "componentDidUpdate",
      value: function componentDidUpdate(prevProps) {
        var _this$props2 = this.props,
          attributes = _this$props2.attributes,
          setAttributes = _this$props2.setAttributes,
          innerBlocks = _this$props2.innerBlocks;
        var isTransform = attributes.isTransform;

        // @since 3.2.3 - https://github.com/publishpress/PublishPress-Blocks/issues/1389
        if (!this.state.isBlockIdSet) {
          if (!attributes.uniqueID) {
            this.props.setAttributes({
              uniqueID: '_' + this.props.clientId.substr(2, 9)
            });
            advgbTabsUniqueIDs.push('_' + this.props.clientId.substr(2, 9));
          } else if (advgbTabsUniqueIDs.includes(this.props.attributes.uniqueID)) {
            this.props.setAttributes({
              uniqueID: '_' + this.props.clientId.substr(2, 9)
            });
            advgbTabsUniqueIDs.push('_' + this.props.clientId.substr(2, 9));
          } else {
            advgbTabsUniqueIDs.push(this.props.attributes.uniqueID);
          }
          if (!prevProps.innerBlocks.length) {
            setAttributes({
              tabHeaders: [__('Tab 1', 'advanced-gutenberg'), __('Tab 2', 'advanced-gutenberg'), __('Tab 3', 'advanced-gutenberg')],
              pid: "advgb-tabs-".concat(this.props.clientId)
            });
          } else {
            setAttributes({
              pid: "advgb-tabs-".concat(this.props.clientId)
            });
          }
          this.updateTabHeaders();
          this.updateTabAnchors();
          this.props.resetOrder();
          this.setState({
            isBlockIdSet: true
          });
        }
        if (isTransform) {
          setAttributes({
            isTransform: false
          });
          this.props.updateTabActive(0);
        }

        // Add consecutive id attributes to each child block, starting from 0
        if (!prevProps.innerBlocks.length) {
          this.updateTabIds(innerBlocks);
        } else if (advgbBlocks.advgb_pro === '1') {
          // Be sure ids are consecutive, starting from 0
          var ids = innerBlocks.map(function (item) {
            return item.attributes.id;
          });
          var consecutive = ids.every(function (val, i) {
            return i === 0 || val - 1 === ids[i - 1];
          });
          if (!consecutive) {
            this.updateTabIds(innerBlocks);
          }
        } else {
          // Nothing to do here
        }
      }
    }, {
      key: "componentDidMount",
      value: function componentDidMount() {}

      /**
       * Update id attributes for child blocks, so right content is displayed
       * matching its active header
       * https://github.com/publishpress/PublishPress-Blocks/issues/1117
       *
       * @since 3.1.3
       *
       * @param {array} innerBlocks Array of inner blocks objects
       *
       * @return {void}
       */
    }, {
      key: "updateTabIds",
      value: function updateTabIds(innerBlocks) {
        var _dispatch = dispatch('core/block-editor'),
          updateBlockAttributes = _dispatch.updateBlockAttributes;
        times(innerBlocks.length, function (n) {
          updateBlockAttributes(innerBlocks[n].clientId, {
            id: n
          });
        });
      }
    }, {
      key: "updateTabsAttr",
      value: function updateTabsAttr(attrs) {
        var _this$props3 = this.props,
          setAttributes = _this$props3.setAttributes,
          clientId = _this$props3.clientId;
        var _ref = !wp.blockEditor ? dispatch('core/editor') : dispatch('core/block-editor'),
          updateBlockAttributes = _ref.updateBlockAttributes;
        var _ref2 = !wp.blockEditor ? select('core/editor') : select('core/block-editor'),
          getBlockOrder = _ref2.getBlockOrder;
        var childBlocks = getBlockOrder(clientId);
        setAttributes(attrs);
        childBlocks.forEach(function (childBlockId) {
          return updateBlockAttributes(childBlockId, attrs);
        });
        this.props.resetOrder();
      }
    }, {
      key: "updateTabsHeader",
      value: function updateTabsHeader(header, index) {
        var _this$props4 = this.props,
          attributes = _this$props4.attributes,
          setAttributes = _this$props4.setAttributes,
          clientId = _this$props4.clientId;
        var tabHeaders = attributes.tabHeaders;
        var _ref3 = !wp.blockEditor ? dispatch('core/editor') : dispatch('core/block-editor'),
          updateBlockAttributes = _ref3.updateBlockAttributes;
        var _ref4 = !wp.blockEditor ? select('core/editor') : select('core/block-editor'),
          getBlockOrder = _ref4.getBlockOrder;
        var childBlocks = getBlockOrder(clientId);
        var newHeaders = tabHeaders.map(function (item, idx) {
          if (index === idx) {
            item = header;
          }
          return item;
        });
        setAttributes({
          tabHeaders: newHeaders
        });
        updateBlockAttributes(childBlocks[index], {
          header: header
        });
        this.updateTabHeaders();
      }
    }, {
      key: "updateTabHeaders",
      value: function updateTabHeaders() {
        var _this$props5 = this.props,
          attributes = _this$props5.attributes,
          clientId = _this$props5.clientId;
        var tabHeaders = attributes.tabHeaders;
        var _ref5 = !wp.blockEditor ? dispatch('core/editor') : dispatch('core/block-editor'),
          updateBlockAttributes = _ref5.updateBlockAttributes;
        var _ref6 = !wp.blockEditor ? select('core/editor') : select('core/block-editor'),
          getBlockOrder = _ref6.getBlockOrder;
        var childBlocks = getBlockOrder(clientId);
        childBlocks.forEach(function (childBlockId) {
          return updateBlockAttributes(childBlockId, {
            tabHeaders: tabHeaders
          });
        });
      }
    }, {
      key: "updateTabsAnchor",
      value: function updateTabsAnchor(anchor, index) {
        var _this$props6 = this.props,
          attributes = _this$props6.attributes,
          setAttributes = _this$props6.setAttributes,
          clientId = _this$props6.clientId;
        var tabAnchors = attributes.tabAnchors;
        var _ref7 = !wp.blockEditor ? dispatch('core/editor') : dispatch('core/block-editor'),
          updateBlockAttributes = _ref7.updateBlockAttributes;
        var _ref8 = !wp.blockEditor ? select('core/editor') : select('core/block-editor'),
          getBlockOrder = _ref8.getBlockOrder;
        var childBlocks = getBlockOrder(clientId);
        var newAnchors = tabAnchors.map(function (item, idx) {
          if (index === idx) {
            item = anchor;
          }
          return item;
        });
        setAttributes({
          tabAnchors: newAnchors
        });
        updateBlockAttributes(childBlocks[index], {
          anchor: anchor
        });
        this.updateTabAnchors();
      }
    }, {
      key: "updateTabAnchors",
      value: function updateTabAnchors() {
        var _this$props7 = this.props,
          attributes = _this$props7.attributes,
          clientId = _this$props7.clientId;
        var tabAnchors = attributes.tabAnchors;
        var _ref9 = !wp.blockEditor ? dispatch('core/editor') : dispatch('core/block-editor'),
          updateBlockAttributes = _ref9.updateBlockAttributes;
        var _ref10 = !wp.blockEditor ? select('core/editor') : select('core/block-editor'),
          getBlockOrder = _ref10.getBlockOrder;
        var childBlocks = getBlockOrder(clientId);
        childBlocks.forEach(function (childBlockId) {
          return updateBlockAttributes(childBlockId, {
            tabAnchors: tabAnchors
          });
        });
      }
    }, {
      key: "duplicateTab",
      value: function duplicateTab(index) {
        var _this$props8 = this.props,
          attributes = _this$props8.attributes,
          setAttributes = _this$props8.setAttributes,
          clientId = _this$props8.clientId;
        var _ref11 = !wp.blockEditor ? dispatch('core/editor') : dispatch('core/block-editor'),
          insertBlock = _ref11.insertBlock;
        var _ref12 = !wp.blockEditor ? select('core/editor') : select('core/block-editor'),
          getBlockOrder = _ref12.getBlockOrder,
          getBlock = _ref12.getBlock;
        var childBlocks = getBlockOrder(clientId);
        var blockTab = getBlock(childBlocks[index]);
        var clonedTab = cloneBlock(blockTab);
        insertBlock(clonedTab, attributes.tabHeaders.length, clientId);
        setAttributes({
          tabHeaders: [].concat(_toConsumableArray(attributes.tabHeaders), ["".concat(attributes.tabHeaders[index], " (").concat(__('copy', 'advanced-gutenberg'), ")")]),
          tabAnchors: [].concat(_toConsumableArray(attributes.tabAnchors), [''])
        });
        this.props.resetOrder();
      }
    }, {
      key: "addTab",
      value: function addTab() {
        var _this$props9 = this.props,
          attributes = _this$props9.attributes,
          setAttributes = _this$props9.setAttributes,
          clientId = _this$props9.clientId;
        var _ref13 = !wp.blockEditor ? dispatch('core/editor') : dispatch('core/block-editor'),
          insertBlock = _ref13.insertBlock;
        var tabItemBlock = createBlock('advgb/tab');
        insertBlock(tabItemBlock, attributes.tabHeaders.length, clientId);
        setAttributes({
          tabHeaders: [].concat(_toConsumableArray(attributes.tabHeaders), [__('Tab Header', 'advanced-gutenberg')]),
          tabAnchors: [].concat(_toConsumableArray(attributes.tabAnchors), [''])
        });
        this.props.resetOrder();
      }
    }, {
      key: "removeTab",
      value: function removeTab(index) {
        var _this$props10 = this.props,
          attributes = _this$props10.attributes,
          setAttributes = _this$props10.setAttributes,
          clientId = _this$props10.clientId;
        var _ref14 = !wp.blockEditor ? dispatch('core/editor') : dispatch('core/block-editor'),
          removeBlock = _ref14.removeBlock;
        var _ref15 = !wp.blockEditor ? select('core/editor') : select('core/block-editor'),
          getBlockOrder = _ref15.getBlockOrder;
        var childBlocks = getBlockOrder(clientId);
        removeBlock(childBlocks[index], false);
        setAttributes({
          tabHeaders: attributes.tabHeaders.filter(function (vl, idx) {
            return idx !== index;
          }),
          tabAnchors: attributes.tabAnchors.filter(function (vl, idx) {
            return idx !== index;
          })
        });
        this.updateTabsAttr({
          tabActive: 0
        });
        this.props.resetOrder();
      }
    }, {
      key: "moveTab",
      value: function moveTab(index, direction) {
        var attributes = this.props.attributes;
        var headers = attributes.tabHeaders;
        var header = headers.splice(index, 1);
        var anchors = attributes.tabAnchors;
        var anchor = anchors.splice(index, 1);
        switch (direction) {
          case 'back':
            if (index === 0) {
              return;
            }
            this.onMove(index, index - 1, headers, header, anchors, anchor);
            break;
          case 'forward':
            if (index === headers.length) {
              return;
            }
            this.onMove(index, index + 1, headers, header, anchors, anchor);
            break;
        }
      }
    }, {
      key: "onMove",
      value: function onMove(index, newIndex, headers, header, anchors, anchor) {
        var _this$props11 = this.props,
          attributes = _this$props11.attributes,
          setAttributes = _this$props11.setAttributes,
          clientId = _this$props11.clientId;
        var _ref16 = !wp.blockEditor ? dispatch('core/editor') : dispatch('core/block-editor'),
          moveBlockToPosition = _ref16.moveBlockToPosition;
        var _ref17 = !wp.blockEditor ? select('core/editor') : select('core/block-editor'),
          getBlockOrder = _ref17.getBlockOrder;
        var childBlocks = getBlockOrder(clientId);
        headers.splice(newIndex, 0, header[0]);
        anchors.splice(newIndex, 0, anchor[0]);
        setAttributes({
          tabHeaders: headers,
          tabAnchors: anchors
        });
        moveBlockToPosition(childBlocks[index], clientId, clientId, newIndex);
        this.updateTabHeaders();
        this.updateTabAnchors();
        this.props.resetOrder();
        this.props.updateTabActive(newIndex);
      }
    }, {
      key: "translatableText",
      value: function translatableText(text) {
        switch (text) {
          case 'desktop':
            return __('desktop', 'advanced-gutenberg');
            // removed by dead control flow

          case 'tablet':
            return __('tablet', 'advanced-gutenberg');
            // removed by dead control flow

          case 'mobile':
            return __('mobile', 'advanced-gutenberg');
            // removed by dead control flow

        }
      }
    }, {
      key: "render",
      value: function render() {
        var _this2 = this;
        var _this$props12 = this.props,
          attributes = _this$props12.attributes,
          setAttributes = _this$props12.setAttributes,
          clientId = _this$props12.clientId;
        var viewport = this.state.viewport;
        var tabHeaders = attributes.tabHeaders,
          tabAnchors = attributes.tabAnchors,
          tabActive = attributes.tabActive,
          tabActiveFrontend = attributes.tabActiveFrontend,
          tabsStyleD = attributes.tabsStyleD,
          tabsStyleT = attributes.tabsStyleT,
          tabsStyleM = attributes.tabsStyleM,
          headerBgColor = attributes.headerBgColor,
          headerTextColor = attributes.headerTextColor,
          bodyBgColor = attributes.bodyBgColor,
          bodyTextColor = attributes.bodyTextColor,
          borderStyle = attributes.borderStyle,
          borderWidth = attributes.borderWidth,
          borderColor = attributes.borderColor,
          borderRadius = attributes.borderRadius,
          pid = attributes.pid,
          activeTabBgColor = attributes.activeTabBgColor,
          activeTabTextColor = attributes.activeTabTextColor,
          isPreview = attributes.isPreview;
        var blockClass = ["advgb-tabs-wrapper", "advgb-tab-".concat(tabsStyleD, "-desktop"), "advgb-tab-".concat(tabsStyleT, "-tablet"), "advgb-tab-".concat(tabsStyleM, "-mobile")].filter(Boolean).join(' ');
        var deviceLetter = 'D';
        if (viewport === 'tablet') deviceLetter = 'T';
        if (viewport === 'mobile') deviceLetter = 'M';
        return isPreview ? /*#__PURE__*/React.createElement("img", {
          alt: __('Advanced Tabs', 'advanced-gutenberg'),
          width: "100%",
          src: previewImageData
        }) : /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(InspectorControls, null, /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Tabs Style', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-columns-responsive-items"
        }, ['desktop', 'tablet', 'mobile'].map(function (device, index) {
          var itemClasses = ["advgb-columns-responsive-item", viewport === device && 'is-selected'].filter(Boolean).join(' ');
          return /*#__PURE__*/React.createElement("div", {
            className: itemClasses,
            key: index,
            onClick: function onClick() {
              return _this2.setState({
                viewport: device
              });
            }
          }, _this2.translatableText(device));
        })), /*#__PURE__*/React.createElement("div", {
          className: "advgb-tabs-styles"
        }, TABS_STYLES.map(function (style, index) {
          return /*#__PURE__*/React.createElement(Tooltip, {
            key: index,
            text: style.label
          }, /*#__PURE__*/React.createElement(Button, {
            className: 'advgb-tabs-style' + (style.name === attributes["tabsStyle".concat(deviceLetter)] ? ' is-style-selected' : ''),
            isToggled: style.name === attributes["tabsStyle".concat(deviceLetter)],
            onClick: function onClick() {
              return setAttributes(_defineProperty({}, "tabsStyle".concat(deviceLetter), style.name));
            }
          }, style.icon));
        }), viewport === 'mobile' && /*#__PURE__*/React.createElement(Tooltip, {
          text: __('Stacked', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(Button, {
          className: 'advgb-tabs-style' + (tabsStyleM === 'stack' ? ' is-style-selected' : ''),
          isToggled: tabsStyleM === 'stack',
          onClick: function onClick() {
            return setAttributes({
              tabsStyleM: 'stack'
            });
          }
        }, /*#__PURE__*/React.createElement("svg", {
          color: "#5954d6",
          width: "50px",
          height: "50px",
          viewBox: "0 0 26 26",
          xmlns: "http://www.w3.org/2000/svg",
          style: {
            backgroundColor: "#fff"
          }
        }, /*#__PURE__*/React.createElement("path", {
          fill: "currentColor",
          d: "M24.2480469,18.5H1.75C1.3359375,18.5,1,18.8359375,1,19.25v5C1,24.6640625,1.3359375,25,1.75,25   h22.4980469c0.4140625,0,0.75-0.3359375,0.75-0.75v-5C24.9980469,18.8359375,24.6621094,18.5,24.2480469,18.5z M23.4980469,23.5   H2.5V20h20.9980469V23.5z"
        }), /*#__PURE__*/React.createElement("path", {
          fill: "currentColor",
          d: "M24.25,9.75H1.75C1.3359375,9.75,1,10.0859375,1,10.5v5c0,0.4140625,0.3359375,0.75,0.75,0.75h22.5   c0.4140625,0,0.75-0.3359375,0.75-0.75v-5C25,10.0859375,24.6640625,9.75,24.25,9.75z M23.5,14.75h-21v-3.5h21V14.75z"
        }), /*#__PURE__*/React.createElement("path", {
          fill: "currentColor",
          d: "M1.75,7.5h22.4980469c0.4140625,0,0.75-0.3359375,0.75-0.75v-5c0-0.4140625-0.3359375-0.75-0.75-0.75H1.75   C1.3359375,1,1,1.3359375,1,1.75v5C1,7.1640625,1.3359375,7.5,1.75,7.5z M2.5,2.5h20.9980469V6H2.5V2.5z"
        })))))), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Tabs Settings', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Initial Open Tab', 'advanced-gutenberg'),
          value: tabActiveFrontend,
          options: tabHeaders.map(function (tab, index) {
            return {
              value: index,
              label: tab
            };
          }),
          onChange: function onChange(value) {
            return setAttributes({
              tabActiveFrontend: parseInt(value)
            });
          }
        })), /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Tab Colors', 'advanced-gutenberg'),
          initialOpen: false,
          colorSettings: [{
            label: __('Background Color', 'advanced-gutenberg'),
            value: headerBgColor,
            onChange: function onChange(value) {
              return setAttributes({
                headerBgColor: value === undefined ? '#e0e0e0' : value
              });
            }
          }, {
            label: __('Text Color', 'advanced-gutenberg'),
            value: headerTextColor,
            onChange: function onChange(value) {
              return setAttributes({
                headerTextColor: value === undefined ? '#fff' : value
              });
            }
          }, {
            label: __('Active Tab Background Color', 'advanced-gutenberg'),
            value: activeTabBgColor,
            onChange: function onChange(value) {
              return setAttributes({
                activeTabBgColor: value
              });
            }
          }, {
            label: __('Active Tab Text Color', 'advanced-gutenberg'),
            value: activeTabTextColor,
            onChange: function onChange(value) {
              return setAttributes({
                activeTabTextColor: value
              });
            }
          }]
        }), /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Body Colors', 'advanced-gutenberg'),
          initialOpen: false,
          colorSettings: [{
            label: __('Background Color', 'advanced-gutenberg'),
            value: bodyBgColor,
            onChange: function onChange(value) {
              return setAttributes({
                bodyBgColor: value
              });
            }
          }, {
            label: __('Text Color', 'advanced-gutenberg'),
            value: bodyTextColor,
            onChange: function onChange(value) {
              return setAttributes({
                bodyTextColor: value
              });
            }
          }]
        }), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Border Settings', 'advanced-gutenberg'),
          initialOpen: false
        }, /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Border Style', 'advanced-gutenberg'),
          value: borderStyle,
          options: [{
            label: __('None', 'advanced-gutenberg'),
            value: 'none'
          }, {
            label: __('Solid', 'advanced-gutenberg'),
            value: 'solid'
          }, {
            label: __('Dashed', 'advanced-gutenberg'),
            value: 'dashed'
          }, {
            label: __('Dotted', 'advanced-gutenberg'),
            value: 'dotted'
          }],
          onChange: function onChange(value) {
            return setAttributes({
              borderStyle: value
            });
          }
        }), /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Border Color', 'advanced-gutenberg'),
          initialOpen: false,
          colorSettings: [{
            label: __('Border Color', 'advanced-gutenberg'),
            value: borderColor,
            onChange: function onChange(value) {
              return setAttributes({
                borderColor: value
              });
            }
          }]
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Border width', 'advanced-gutenberg'),
          value: borderWidth,
          min: 1,
          max: 10,
          onChange: function onChange(value) {
            return setAttributes({
              borderWidth: value
            });
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Border radius', 'advanced-gutenberg'),
          value: borderRadius,
          min: 0,
          max: 100,
          onChange: function onChange(value) {
            return setAttributes({
              borderRadius: value
            });
          }
        }))), /*#__PURE__*/React.createElement("div", {
          className: blockClass,
          style: {
            border: 'none'
          }
        }, /*#__PURE__*/React.createElement("ul", {
          className: "advgb-tabs-panel"
        }, tabHeaders.map(function (item, index) {
          return /*#__PURE__*/React.createElement("li", {
            key: index,
            className: "advgb-tab ".concat(tabActive === index ? 'advgb-tab-active' : ''),
            style: {
              backgroundColor: headerBgColor,
              borderStyle: borderStyle,
              borderWidth: borderWidth + 'px',
              borderColor: borderColor,
              borderRadius: borderRadius + 'px'
            }
          }, /*#__PURE__*/React.createElement("a", {
            id: tabAnchors[index],
            style: {
              color: headerTextColor
            },
            onClick: function onClick() {
              _this2.props.updateTabActive(index);
            }
          }, /*#__PURE__*/React.createElement(RichText, {
            tagName: "p",
            value: item,
            onChange: function onChange(value) {
              return _this2.updateTabsHeader(value, index);
            },
            unstableOnSplit: function unstableOnSplit() {
              return null;
            },
            placeholder: __('Title…', 'advanced-gutenberg')
          })), advgbBlocks.advgb_pro === '1' && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(TextControl, {
            placeholder: __('HTML Anchor', 'advanced-gutenberg'),
            value: tabAnchors[index],
            onChange: function onChange(value) {
              return _this2.updateTabsAnchor(value, index);
            },
            className: "advgb-floating-anchor-field",
            style: {
              display: tabActive === index ? 'block' : 'none'
            }
          }), index > 0 && /*#__PURE__*/React.createElement(Tooltip, {
            text: __('Move back', 'advanced-gutenberg')
          }, /*#__PURE__*/React.createElement("span", {
            className: "advgb-tab-move-back",
            onClick: function onClick() {
              return _this2.moveTab(index, 'back');
            },
            style: {
              display: tabActive === index ? 'block' : 'none'
            }
          }, /*#__PURE__*/React.createElement(Dashicon, {
            icon: "arrow-left-alt2"
          }))), index < tabHeaders.length - 1 && /*#__PURE__*/React.createElement(Tooltip, {
            text: __('Move forward', 'advanced-gutenberg')
          }, /*#__PURE__*/React.createElement("span", {
            className: "advgb-tab-move-forward",
            onClick: function onClick() {
              return _this2.moveTab(index, 'forward');
            },
            style: {
              display: tabActive === index ? 'block' : 'none'
            }
          }, /*#__PURE__*/React.createElement(Dashicon, {
            icon: "arrow-right-alt2"
          }))), /*#__PURE__*/React.createElement(Tooltip, {
            text: __('Duplicate tab', 'advanced-gutenberg')
          }, /*#__PURE__*/React.createElement("span", {
            className: "advgb-tab-duplicate",
            onClick: function onClick() {
              return _this2.duplicateTab(index);
            },
            style: {
              display: tabActive === index ? 'block' : 'none'
            }
          }, /*#__PURE__*/React.createElement(Dashicon, {
            icon: "admin-page"
          })))), tabHeaders.length > 1 && /*#__PURE__*/React.createElement(Tooltip, {
            text: __('Remove tab', 'advanced-gutenberg')
          }, /*#__PURE__*/React.createElement("span", {
            className: "advgb-tab-remove",
            onClick: function onClick() {
              return _this2.removeTab(index);
            },
            style: {
              display: tabActive === index ? 'block' : 'none'
            }
          }, /*#__PURE__*/React.createElement(Dashicon, {
            icon: "no"
          }))));
        }), /*#__PURE__*/React.createElement("li", {
          className: "advgb-tab advgb-add-tab",
          style: {
            borderRadius: borderRadius + 'px',
            borderWidth: borderWidth + 'px'
          }
        }, /*#__PURE__*/React.createElement(Tooltip, {
          text: __('Add tab', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement("span", {
          onClick: function onClick() {
            return _this2.addTab();
          }
        }, /*#__PURE__*/React.createElement(Dashicon, {
          icon: "plus"
        }))))), /*#__PURE__*/React.createElement("div", {
          className: "advgb-tab-body-wrapper",
          style: {
            backgroundColor: bodyBgColor,
            color: bodyTextColor,
            borderStyle: borderStyle,
            borderWidth: borderWidth + 'px',
            borderColor: borderColor,
            borderRadius: borderRadius + 'px'
          }
        }, /*#__PURE__*/React.createElement(InnerBlocks, {
          template: [['advgb/tab'], ['advgb/tab'], ['advgb/tab']],
          templateLock: false,
          allowedBlocks: ['advgb/tab']
        }))), !!pid && /*#__PURE__*/React.createElement("style", null, activeTabBgColor && "#block-".concat(clientId, " li.advgb-tab.advgb-tab-active, #block-").concat(clientId, " li.advgb-tab.ui-tabs-active {\n                                background-color: ").concat(activeTabBgColor, " !important;\n                            }"), activeTabTextColor && "#block-".concat(clientId, " li.advgb-tab.advgb-tab-active a, #block-").concat(clientId, " li.advgb-tab.ui-tabs-active button.advgb-tab-button,\n                        #block-").concat(clientId, " li.advgb-tab.advgb-tab-active a, #block-").concat(clientId, " li.advgb-tab.ui-tabs-active a {\n                                color: ").concat(activeTabTextColor, " !important;\n                            }")));
      }
    }]);
  }(Component);
  var tabsBlockIcon = /*#__PURE__*/React.createElement("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    width: "20",
    height: "20",
    viewBox: "0 0 24 24"
  }, /*#__PURE__*/React.createElement("path", {
    fill: "none",
    d: "M0,0h24v24H0V0z"
  }), /*#__PURE__*/React.createElement("path", {
    fill: "none",
    d: "M0,0h24v24H0V0z"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M21,3H3C1.9,3,1,3.9,1,5v14c0,1.1,0.9,2,2,2h18c1.1,0,2-0.9,2-2V5C23,3.9,22.1,3,21,3z M21,19H3V5h10v4h8V19z"
  }));
  var tabBlockAttrs = {
    tabHeaders: {
      type: 'array',
      default: [__('Tab 1', 'advanced-gutenberg'), __('Tab 2', 'advanced-gutenberg'), __('Tab 3', 'advanced-gutenberg')]
    },
    tabActive: {
      type: 'number',
      default: 0
    },
    tabActiveFrontend: {
      type: 'number',
      default: 0
    },
    tabsStyleD: {
      type: 'string',
      default: 'horz'
    },
    tabsStyleT: {
      type: 'string',
      default: 'vert'
    },
    tabsStyleM: {
      type: 'string',
      default: 'stack'
    },
    headerBgColor: {
      type: 'string',
      default: '#e0e0e0'
    },
    headerTextColor: {
      type: 'string',
      default: '#fff'
    },
    bodyBgColor: {
      type: 'string'
    },
    bodyTextColor: {
      type: 'string'
    },
    borderStyle: {
      type: 'string',
      default: 'solid'
    },
    borderWidth: {
      type: 'number',
      default: 1
    },
    borderColor: {
      type: 'string'
    },
    borderRadius: {
      type: 'number',
      default: 10
    },
    pid: {
      type: 'string'
    },
    activeTabBgColor: {
      type: 'string'
    },
    activeTabTextColor: {
      type: 'string'
    },
    changed: {
      type: 'boolean',
      default: false
    },
    isPreview: {
      type: 'boolean',
      default: false
    },
    uniqueID: {
      type: 'string',
      default: ''
    },
    isTransform: {
      type: 'boolean',
      default: false
    },
    tabAnchors: {
      type: 'array',
      default: ['', '', '']
    }
  };
  registerBlockType('advgb/adv-tabs', {
    apiVersion: 3,
    title: __('Tabs - PublishPress', 'advanced-gutenberg'),
    description: __('Create horizontal or vertical tabs to display your content.', 'advanced-gutenberg'),
    icon: {
      src: tabsBlockIcon,
      foreground: typeof advgbBlocks !== 'undefined' ? advgbBlocks.color : undefined
    },
    category: "advgb-category",
    keywords: [__('tabs', 'advanced-gutenberg'), __('advanced tabs', 'advanced-gutenberg'), __('cards', 'advanced-gutenberg')],
    attributes: tabBlockAttrs,
    example: {
      attributes: {
        isPreview: true
      }
    },
    supports: {
      anchor: true
    },
    edit: compose(withSelect(function (select, ownProps) {
      var clientId = ownProps.clientId;
      var _select = select('core/block-editor'),
        getBlock = _select.getBlock;
      return {
        innerBlocks: getBlock(clientId).innerBlocks
      };
    }), withDispatch(function (dispatch, _ref18, _ref19) {
      var clientId = _ref18.clientId,
        innerBlocks = _ref18.innerBlocks;
      var select = _ref19.select;
      var _dispatch2 = dispatch('core/block-editor'),
        updateBlockAttributes = _dispatch2.updateBlockAttributes;
      return {
        resetOrder: function resetOrder() {
          times(innerBlocks.length, function (n) {
            updateBlockAttributes(innerBlocks[n].clientId, {
              id: n
            });
          });
        },
        updateTabActive: function updateTabActive(tabActive) {
          updateBlockAttributes(clientId, {
            tabActive: tabActive
          });
          times(innerBlocks.length, function (n) {
            updateBlockAttributes(innerBlocks[n].clientId, {
              tabActive: tabActive
            });
          });
          this.resetOrder();
        }
      };
    }))(AdvTabsWrapper),
    save: function save(_ref20) {
      var attributes = _ref20.attributes;
      var tabHeaders = attributes.tabHeaders,
        tabAnchors = attributes.tabAnchors,
        tabActiveFrontend = attributes.tabActiveFrontend,
        tabsStyleD = attributes.tabsStyleD,
        tabsStyleT = attributes.tabsStyleT,
        tabsStyleM = attributes.tabsStyleM,
        headerBgColor = attributes.headerBgColor,
        headerTextColor = attributes.headerTextColor,
        bodyBgColor = attributes.bodyBgColor,
        bodyTextColor = attributes.bodyTextColor,
        borderStyle = attributes.borderStyle,
        borderWidth = attributes.borderWidth,
        borderColor = attributes.borderColor,
        borderRadius = attributes.borderRadius,
        pid = attributes.pid,
        uniqueID = attributes.uniqueID;
      var blockClass = ["advgb-tabs-wrapper", "advgb-tab-".concat(tabsStyleD, "-desktop"), "advgb-tab-".concat(tabsStyleT, "-tablet"), "advgb-tab-".concat(tabsStyleM, "-mobile"), pid].filter(Boolean).join(' ');
      return /*#__PURE__*/React.createElement("div", {
        className: blockClass,
        "data-tab-active": tabActiveFrontend
      }, /*#__PURE__*/React.createElement("ul", {
        className: "advgb-tabs-panel",
        role: "tablist"
      }, tabHeaders.map(function (header, index) {
        return /*#__PURE__*/React.createElement("li", {
          key: index,
          className: "advgb-tab ".concat(index === tabActiveFrontend ? 'advgb-tab-active' : ''),
          role: "presentation",
          style: {
            backgroundColor: headerBgColor,
            borderStyle: borderStyle,
            borderWidth: borderWidth + 'px',
            borderColor: borderColor,
            borderRadius: borderRadius + 'px'
          }
        }, /*#__PURE__*/React.createElement("button", {
          className: "advgb-tab-button",
          id: "advgb-tab-".concat(uniqueID, "-").concat(index),
          "aria-controls": "advgb-tab-panel-".concat(uniqueID, "-").concat(index),
          role: "tab",
          "aria-selected": index === tabActiveFrontend,
          tabIndex: "0",
          style: {
            color: headerTextColor,
            background: 'none',
            border: 'none',
            width: '100%',
            textAlign: 'inherit',
            cursor: 'pointer',
            padding: '8px 16px',
            font: 'inherit'
          }
        }, /*#__PURE__*/React.createElement(RichText.Content, {
          tagName: "span",
          value: header
        })));
      })), /*#__PURE__*/React.createElement("div", {
        className: "advgb-tab-body-wrapper",
        style: {
          backgroundColor: bodyBgColor,
          color: bodyTextColor,
          borderStyle: borderStyle,
          borderWidth: borderWidth + 'px',
          borderColor: borderColor,
          borderRadius: borderRadius + 'px'
        }
      }, /*#__PURE__*/React.createElement(InnerBlocks.Content, null)));
    },
    deprecated: [{
      attributes: _objectSpread({}, tabBlockAttrs),
      save: function save(_ref21) {
        var attributes = _ref21.attributes;
        var tabHeaders = attributes.tabHeaders,
          tabAnchors = attributes.tabAnchors,
          tabActiveFrontend = attributes.tabActiveFrontend,
          tabsStyleD = attributes.tabsStyleD,
          tabsStyleT = attributes.tabsStyleT,
          tabsStyleM = attributes.tabsStyleM,
          headerBgColor = attributes.headerBgColor,
          headerTextColor = attributes.headerTextColor,
          bodyBgColor = attributes.bodyBgColor,
          bodyTextColor = attributes.bodyTextColor,
          borderStyle = attributes.borderStyle,
          borderWidth = attributes.borderWidth,
          borderColor = attributes.borderColor,
          borderRadius = attributes.borderRadius,
          pid = attributes.pid,
          uniqueID = attributes.uniqueID;
        var blockClass = ["advgb-tabs-wrapper", "advgb-tab-".concat(tabsStyleD, "-desktop"), "advgb-tab-".concat(tabsStyleT, "-tablet"), "advgb-tab-".concat(tabsStyleM, "-mobile"), pid].filter(Boolean).join(' ');
        return /*#__PURE__*/React.createElement("div", {
          className: blockClass,
          "data-tab-active": tabActiveFrontend
        }, /*#__PURE__*/React.createElement("ul", {
          className: "advgb-tabs-panel"
        }, tabHeaders.map(function (header, index) {
          return /*#__PURE__*/React.createElement("li", {
            key: index,
            className: "advgb-tab",
            style: {
              backgroundColor: headerBgColor,
              borderStyle: borderStyle,
              borderWidth: borderWidth + 'px',
              borderColor: borderColor,
              borderRadius: borderRadius + 'px'
            }
          }, /*#__PURE__*/React.createElement("a", {
            id: "advgb-tabs-tab".concat(index),
            href: "#advgb-tab-header-".concat(uniqueID, "-").concat(index),
            style: {
              color: headerTextColor
            },
            "aria-controls": "advgb-tab-header-".concat(uniqueID, "-").concat(index)
          }, /*#__PURE__*/React.createElement(RichText.Content, {
            tagName: "span",
            value: header
          })));
        })), /*#__PURE__*/React.createElement("div", {
          className: "advgb-tab-body-wrapper",
          style: {
            backgroundColor: bodyBgColor,
            color: bodyTextColor,
            borderStyle: borderStyle,
            borderWidth: borderWidth + 'px',
            borderColor: borderColor,
            borderRadius: borderRadius + 'px'
          }
        }, /*#__PURE__*/React.createElement(InnerBlocks.Content, null)));
      }
    }, {
      attributes: _objectSpread({}, tabBlockAttrs),
      save: function save(_ref22) {
        var attributes = _ref22.attributes;
        var tabHeaders = attributes.tabHeaders,
          tabActiveFrontend = attributes.tabActiveFrontend,
          tabsStyleD = attributes.tabsStyleD,
          tabsStyleT = attributes.tabsStyleT,
          tabsStyleM = attributes.tabsStyleM,
          headerBgColor = attributes.headerBgColor,
          headerTextColor = attributes.headerTextColor,
          bodyBgColor = attributes.bodyBgColor,
          bodyTextColor = attributes.bodyTextColor,
          borderStyle = attributes.borderStyle,
          borderWidth = attributes.borderWidth,
          borderColor = attributes.borderColor,
          borderRadius = attributes.borderRadius,
          pid = attributes.pid;
        var blockClass = ["advgb-tabs-wrapper", "advgb-tab-".concat(tabsStyleD, "-desktop"), "advgb-tab-".concat(tabsStyleT, "-tablet"), "advgb-tab-".concat(tabsStyleM, "-mobile"), pid].filter(Boolean).join(' ');
        return /*#__PURE__*/React.createElement("div", {
          className: blockClass,
          "data-tab-active": tabActiveFrontend
        }, /*#__PURE__*/React.createElement("ul", {
          className: "advgb-tabs-panel"
        }, tabHeaders.map(function (header, index) {
          return /*#__PURE__*/React.createElement("li", {
            key: index,
            className: "advgb-tab",
            style: {
              backgroundColor: headerBgColor,
              borderStyle: borderStyle,
              borderWidth: borderWidth + 'px',
              borderColor: borderColor,
              borderRadius: borderRadius + 'px'
            }
          }, /*#__PURE__*/React.createElement("a", {
            href: "#advgb-tabs-tab".concat(index),
            style: {
              color: headerTextColor
            }
          }, /*#__PURE__*/React.createElement(RichText.Content, {
            tagName: "span",
            value: header
          })));
        })), /*#__PURE__*/React.createElement("div", {
          className: "advgb-tab-body-wrapper",
          style: {
            backgroundColor: bodyBgColor,
            color: bodyTextColor,
            borderStyle: borderStyle,
            borderWidth: borderWidth + 'px',
            borderColor: borderColor,
            borderRadius: borderRadius + 'px'
          }
        }, /*#__PURE__*/React.createElement(InnerBlocks.Content, null)));
      }
    }, {
      attributes: _objectSpread(_objectSpread({}, tabBlockAttrs), {}, {
        isTransform: {
          type: 'boolean',
          default: false
        }
      }),
      save: function save(_ref23) {
        var attributes = _ref23.attributes;
        var tabHeaders = attributes.tabHeaders,
          tabActiveFrontend = attributes.tabActiveFrontend,
          tabsStyleD = attributes.tabsStyleD,
          tabsStyleT = attributes.tabsStyleT,
          tabsStyleM = attributes.tabsStyleM,
          headerBgColor = attributes.headerBgColor,
          headerTextColor = attributes.headerTextColor,
          bodyBgColor = attributes.bodyBgColor,
          bodyTextColor = attributes.bodyTextColor,
          borderStyle = attributes.borderStyle,
          borderWidth = attributes.borderWidth,
          borderColor = attributes.borderColor,
          borderRadius = attributes.borderRadius,
          pid = attributes.pid;
        var blockClass = ["advgb-tabs-wrapper", "advgb-tab-".concat(tabsStyleD, "-desktop"), "advgb-tab-".concat(tabsStyleT, "-tablet"), "advgb-tab-".concat(tabsStyleM, "-mobile"), pid].filter(Boolean).join(' ');
        return /*#__PURE__*/React.createElement("div", {
          className: blockClass,
          "data-tab-active": tabActiveFrontend
        }, /*#__PURE__*/React.createElement("ul", {
          className: "advgb-tabs-panel"
        }, tabHeaders.map(function (header, index) {
          return /*#__PURE__*/React.createElement("li", {
            key: index,
            className: "advgb-tab",
            style: {
              backgroundColor: headerBgColor,
              borderStyle: borderStyle,
              borderWidth: borderWidth + 'px',
              borderColor: borderColor,
              borderRadius: borderRadius + 'px'
            }
          }, /*#__PURE__*/React.createElement("a", {
            href: "#advgb-tabs-tab".concat(index),
            style: {
              color: headerTextColor
            }
          }, /*#__PURE__*/React.createElement("span", null, header)));
        })), /*#__PURE__*/React.createElement("div", {
          className: "advgb-tab-body-wrapper",
          style: {
            backgroundColor: bodyBgColor,
            color: bodyTextColor,
            borderStyle: borderStyle,
            borderWidth: borderWidth + 'px',
            borderColor: borderColor,
            borderRadius: borderRadius + 'px'
          }
        }, /*#__PURE__*/React.createElement(InnerBlocks.Content, null)));
      }
    }, {
      attributes: _objectSpread(_objectSpread({}, tabBlockAttrs), {}, {
        uniqueID: {
          type: 'string',
          default: ''
        }
      }),
      save: function save(_ref24) {
        var attributes = _ref24.attributes;
        var tabHeaders = attributes.tabHeaders,
          tabActiveFrontend = attributes.tabActiveFrontend,
          tabsStyleD = attributes.tabsStyleD,
          tabsStyleT = attributes.tabsStyleT,
          tabsStyleM = attributes.tabsStyleM,
          headerBgColor = attributes.headerBgColor,
          headerTextColor = attributes.headerTextColor,
          bodyBgColor = attributes.bodyBgColor,
          bodyTextColor = attributes.bodyTextColor,
          borderStyle = attributes.borderStyle,
          borderWidth = attributes.borderWidth,
          borderColor = attributes.borderColor,
          borderRadius = attributes.borderRadius,
          pid = attributes.pid;
        var blockClass = ["advgb-tabs-wrapper", "advgb-tab-".concat(tabsStyleD, "-desktop"), "advgb-tab-".concat(tabsStyleT, "-tablet"), "advgb-tab-".concat(tabsStyleM, "-mobile")].filter(Boolean).join(' ');
        return /*#__PURE__*/React.createElement("div", {
          id: pid,
          className: blockClass,
          "data-tab-active": tabActiveFrontend
        }, /*#__PURE__*/React.createElement("ul", {
          className: "advgb-tabs-panel"
        }, tabHeaders.map(function (header, index) {
          return /*#__PURE__*/React.createElement("li", {
            key: index,
            className: "advgb-tab",
            style: {
              backgroundColor: headerBgColor,
              borderStyle: borderStyle,
              borderWidth: borderWidth + 'px',
              borderColor: borderColor,
              borderRadius: borderRadius + 'px'
            }
          }, /*#__PURE__*/React.createElement("a", {
            href: "#".concat(pid, "-").concat(index),
            style: {
              color: headerTextColor
            }
          }, /*#__PURE__*/React.createElement("span", null, header)));
        })), /*#__PURE__*/React.createElement("div", {
          className: "advgb-tab-body-wrapper",
          style: {
            backgroundColor: bodyBgColor,
            color: bodyTextColor,
            borderStyle: borderStyle,
            borderWidth: borderWidth + 'px',
            borderColor: borderColor,
            borderRadius: borderRadius + 'px'
          }
        }, /*#__PURE__*/React.createElement(InnerBlocks.Content, null)));
      }
    }]
  });
})(wp.i18n, wp.blocks, wp.element, wp.blockEditor, wp.components, wp.compose, lodash);

/***/ },

/***/ "./assets/blocks/advtabs/tab.jsx"
/*!***************************************!*\
  !*** ./assets/blocks/advtabs/tab.jsx ***!
  \***************************************/
() {

function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
(function (wpI18n, wpBlocks, wpElement, wpBlockEditor, wpComponents) {
  wpBlockEditor = wp.blockEditor || wp.editor;
  var __ = wpI18n.__;
  var Component = wpElement.Component,
    Fragment = wpElement.Fragment;
  var registerBlockType = wpBlocks.registerBlockType;
  var _wpBlockEditor = wpBlockEditor,
    InnerBlocks = _wpBlockEditor.InnerBlocks,
    RichText = _wpBlockEditor.RichText;
  var select = wp.data.select;
  var tabsBlockIcon = /*#__PURE__*/React.createElement("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    width: "20",
    height: "20",
    viewBox: "0 0 24 24"
  }, /*#__PURE__*/React.createElement("path", {
    fill: "none",
    d: "M0,0h24v24H0V0z"
  }), /*#__PURE__*/React.createElement("path", {
    fill: "none",
    d: "M0,0h24v24H0V0z"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M21,3H3C1.9,3,1,3.9,1,5v14c0,1.1,0.9,2,2,2h18c1.1,0,2-0.9,2-2V5C23,3.9,22.1,3,21,3z M21,19H3V5h10v4h8V19z"
  }));

  /**
   * This allows for checking to see if the block needs to generate a new ID.
   */
  var advgbTabsUniqueIDs = [];
  var TabItemEdit = /*#__PURE__*/function (_Component) {
    function TabItemEdit() {
      var _this;
      _classCallCheck(this, TabItemEdit);
      _this = _callSuper(this, TabItemEdit, arguments);
      _this.state = {
        isBlockIdSet: false // @since 3.2.3
      };
      return _this;
    }
    _inherits(TabItemEdit, _Component);
    return _createClass(TabItemEdit, [{
      key: "componentWillMount",
      value: function componentWillMount() {
        var _this$props = this.props,
          attributes = _this$props.attributes,
          setAttributes = _this$props.setAttributes,
          clientId = _this$props.clientId;
        var _ref = !wp.blockEditor ? select('core/editor') : select('core/block-editor'),
          getBlockRootClientId = _ref.getBlockRootClientId,
          getBlockAttributes = _ref.getBlockAttributes;
        var rootBlockId = getBlockRootClientId(clientId);
        var rootBlockAttrs = getBlockAttributes(rootBlockId);

        // Apply parent style if newly inserted
        if (attributes.changed !== true) {
          if (rootBlockAttrs !== null && rootBlockAttrs.needUpdate !== false) {
            Object.keys(rootBlockAttrs).map(function (attribute) {
              attributes[attribute] = rootBlockAttrs[attribute];
            });

            // Done applied, we will not do this again
            setAttributes({
              changed: true
            });
          }
        }
      }
    }, {
      key: "componentDidMount",
      value: function componentDidMount() {
        var _this$props2 = this.props,
          attributes = _this$props2.attributes,
          setAttributes = _this$props2.setAttributes;
        var id = attributes.id,
          tabAnchors = attributes.tabAnchors;
        if (typeof tabAnchors !== 'undefined') {
          setAttributes({
            anchor: tabAnchors[id]
          });
        }
      }
    }, {
      key: "componentDidUpdate",
      value: function componentDidUpdate() {
        var _this$props3 = this.props,
          attributes = _this$props3.attributes,
          setAttributes = _this$props3.setAttributes,
          clientId = _this$props3.clientId;
        var id = attributes.id,
          tabHeaders = attributes.tabHeaders;

        // @since 3.2.3 - https://github.com/publishpress/PublishPress-Blocks/issues/1389
        if (!this.state.isBlockIdSet) {
          var _ref2 = !wpBlockEditor ? select('core/editor') : select('core/block-editor'),
            getBlockRootClientId = _ref2.getBlockRootClientId,
            getBlockAttributes = _ref2.getBlockAttributes;
          var rootBlockId = getBlockRootClientId(clientId);
          var rootBlockAttrs = getBlockAttributes(rootBlockId);
          if (rootBlockAttrs && rootBlockAttrs.uniqueID) {
            // Use parent's unique ID as base
            this.props.setAttributes({
              uniqueID: rootBlockAttrs.uniqueID
            });
          } else {
            // fallback if no root uniqueID
            this.props.setAttributes({
              uniqueID: '_' + clientId.substr(2, 9)
            });
          }

          /*
          //This seems to be resulting in non unique id for other tabs except first tab.
          // I'll be removing it totally after user test the above solution instead
          if ( ! this.props.attributes.uniqueID ) {
              this.props.setAttributes( {
                  uniqueID: '_' + this.props.clientId.substr( 2, 9 ),
              } );
              advgbTabsUniqueIDs.push( '_' + this.props.clientId.substr( 2, 9 ) );
          } else if ( advgbTabsUniqueIDs.includes( this.props.attributes.uniqueID ) ) {
              this.props.setAttributes( {
                  uniqueID: '_' + this.props.clientId.substr( 2, 9 ),
              } );
              advgbTabsUniqueIDs.push( '_' + this.props.clientId.substr( 2, 9 ) );
          } else {
              advgbTabsUniqueIDs.push( this.props.attributes.uniqueID );
          }*/

          setAttributes({
            header: tabHeaders[id]
          });
          this.setState({
            isBlockIdSet: true
          });
        }
      }
    }, {
      key: "render",
      value: function render() {
        var attributes = this.props.attributes;
        var tabActive = attributes.tabActive,
          id = attributes.id,
          uniqueID = attributes.uniqueID;
        var ALLOWED_BLOCKS = wp.blocks.getBlockTypes().map(function (block) {
          return block.name;
        }).filter(function (blockName) {
          return blockName !== 'advgb/adv-tabs' && blockName !== 'advgb/tab';
        });
        var tabClassName = ["advgb-tab-".concat(uniqueID), 'advgb-tab-body'].filter(Boolean).join(' ');
        return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
          className: tabClassName,
          style: {
            display: id === tabActive ? 'block' : 'none'
          }
        }, /*#__PURE__*/React.createElement(InnerBlocks, {
          template: [['core/paragraph']],
          templateLock: false,
          allowedBlocks: ALLOWED_BLOCKS
        })));
      }
    }]);
  }(Component);
  registerBlockType('advgb/tab', {
    apiVersion: 3,
    title: __('Tab Item - PublishPress', 'advanced-gutenberg'),
    parent: ['advgb/adv-tabs'],
    icon: {
      src: tabsBlockIcon,
      foreground: typeof advgbBlocks !== 'undefined' ? advgbBlocks.color : undefined
    },
    category: 'advgb-category',
    attributes: {
      id: {
        type: 'number',
        default: 0
      },
      pid: {
        type: 'string'
      },
      header: {
        type: 'html'
      },
      anchor: {
        type: 'string'
      },
      tabActive: {
        type: 'number',
        default: 0
      },
      changed: {
        type: 'boolean',
        default: false
      },
      tabHeaders: {
        type: 'array',
        default: [__('Tab 1', 'advanced-gutenberg'), __('Tab 2', 'advanced-gutenberg'), __('Tab 3', 'advanced-gutenberg')]
      },
      tabAnchors: {
        type: 'array',
        default: ['', '', '']
      },
      uniqueID: {
        type: 'string',
        default: ''
      }
    },
    supports: {
      reusable: false
    },
    keywords: [__('tab', 'advanced-gutenberg')],
    edit: TabItemEdit,
    save: function save(_ref3) {
      var attributes = _ref3.attributes;
      var id = attributes.id,
        tabActive = attributes.tabActive,
        header = attributes.header,
        uniqueID = attributes.uniqueID,
        anchor = attributes.anchor;
      var tabClassName = ["advgb-tab-".concat(uniqueID), 'advgb-tab-body'].filter(Boolean).join(' ');
      return /*#__PURE__*/React.createElement("div", {
        className: "advgb-tab-body-container"
      }, /*#__PURE__*/React.createElement("div", {
        className: "advgb-tab-body-header advgb-tab-class-".concat(anchor, " ").concat(id === tabActive ? 'header-active' : ''),
        id: "advgb-tab-panel-".concat(uniqueID, "-").concat(id),
        role: "tabpanel",
        "aria-labelledby": "advgb-tab-".concat(uniqueID, "-").concat(id),
        tabIndex: "0"
      }, /*#__PURE__*/React.createElement(RichText.Content, {
        tagName: "span",
        value: header
      })), /*#__PURE__*/React.createElement("div", {
        className: tabClassName,
        "aria-labelledby": "advgb-tab-panel-".concat(uniqueID, "-").concat(id),
        style: {
          display: id === tabActive ? 'block' : 'none'
        }
      }, /*#__PURE__*/React.createElement(InnerBlocks.Content, null)));
    },
    deprecated: [{
      attributes: {
        id: {
          type: 'number',
          default: 0
        },
        pid: {
          type: 'string'
        },
        header: {
          type: 'html'
        },
        anchor: {
          type: 'string'
        },
        tabActive: {
          type: 'number',
          default: 0
        },
        changed: {
          type: 'boolean',
          default: false
        },
        tabHeaders: {
          type: 'array',
          default: [__('Tab 1', 'advanced-gutenberg'), __('Tab 2', 'advanced-gutenberg'), __('Tab 3', 'advanced-gutenberg')]
        },
        tabAnchors: {
          type: 'array',
          default: ['', '', '']
        },
        uniqueID: {
          type: 'string',
          default: ''
        }
      },
      save: function save(_ref4) {
        var attributes = _ref4.attributes;
        var id = attributes.id,
          tabActive = attributes.tabActive,
          header = attributes.header,
          uniqueID = attributes.uniqueID,
          anchor = attributes.anchor;
        var tabClassName = ["advgb-tab-".concat(uniqueID), 'advgb-tab-body'].filter(Boolean).join(' ');
        return /*#__PURE__*/React.createElement("div", {
          className: "advgb-tab-body-container"
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-tab-body-header advgb-tab-class-".concat(anchor, " ").concat(id === tabActive ? 'header-active' : ''),
          id: "advgb-tab-panel-".concat(uniqueID, "-").concat(id),
          role: "tabpanel",
          "aria-labelledby": "advgb-tab-".concat(uniqueID, "-").concat(id),
          tabIndex: "0"
        }, header), /*#__PURE__*/React.createElement("div", {
          className: tabClassName,
          "aria-labelledby": "advgb-tab-panel-".concat(uniqueID, "-").concat(id),
          style: {
            display: id === tabActive ? 'block' : 'none'
          }
        }, /*#__PURE__*/React.createElement(InnerBlocks.Content, null)));
      }
    }, {
      attributes: {
        id: {
          type: 'number',
          default: 0
        },
        pid: {
          type: 'string'
        },
        header: {
          type: 'html'
        },
        anchor: {
          type: 'string'
        },
        tabActive: {
          type: 'number',
          default: 0
        },
        changed: {
          type: 'boolean',
          default: false
        },
        tabHeaders: {
          type: 'array',
          default: [__('Tab 1', 'advanced-gutenberg'), __('Tab 2', 'advanced-gutenberg'), __('Tab 3', 'advanced-gutenberg')]
        },
        tabAnchors: {
          type: 'array',
          default: ['', '', '']
        },
        uniqueID: {
          type: 'string',
          default: ''
        }
      },
      save: function save(_ref5) {
        var attributes = _ref5.attributes;
        var id = attributes.id,
          uniqueID = attributes.uniqueID,
          header = attributes.header,
          anchor = attributes.anchor;
        var tabClassName = ["advgb-tab-".concat(uniqueID), 'advgb-tab-body'].filter(Boolean).join(' ');
        return /*#__PURE__*/React.createElement("div", {
          className: "advgb-tab-body-container"
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-tab-body-header advgb-tab-class-".concat(anchor)
        }, header), /*#__PURE__*/React.createElement("div", {
          className: tabClassName,
          "aria-labelledby": "advgb-tabs-tab".concat(id)
        }, /*#__PURE__*/React.createElement(InnerBlocks.Content, null)));
      }
    }, {
      attributes: {
        id: {
          type: 'number',
          default: 0
        },
        pid: {
          type: 'string'
        },
        header: {
          type: 'html'
        },
        tabActive: {
          type: 'number',
          default: 0
        },
        changed: {
          type: 'boolean',
          default: false
        },
        tabHeaders: {
          type: 'array',
          default: [__('Tab 1', 'advanced-gutenberg'), __('Tab 2', 'advanced-gutenberg'), __('Tab 3', 'advanced-gutenberg')]
        },
        uniqueID: {
          type: 'string',
          default: ''
        }
      },
      supports: {
        reusable: false
      },
      save: function save(_ref6) {
        var attributes = _ref6.attributes;
        var id = attributes.id,
          uniqueID = attributes.uniqueID,
          header = attributes.header;
        var tabClassName = ["advgb-tab-".concat(uniqueID), 'advgb-tab-body'].filter(Boolean).join(' ');
        return /*#__PURE__*/React.createElement("div", {
          className: "advgb-tab-body-container"
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-tab-body-header"
        }, header), /*#__PURE__*/React.createElement("div", {
          className: tabClassName,
          "aria-labelledby": "advgb-tabs-tab".concat(id)
        }, /*#__PURE__*/React.createElement(InnerBlocks.Content, null)));
      }
    }, {
      attributes: {
        pid: {
          type: 'string'
        },
        header: {
          type: 'html'
        },
        tabActive: {
          type: 'number',
          default: 0
        },
        changed: {
          type: 'boolean',
          default: false
        },
        tabHeaders: {
          type: 'array',
          default: [__('Tab 1', 'advanced-gutenberg'), __('Tab 2', 'advanced-gutenberg'), __('Tab 3', 'advanced-gutenberg')]
        },
        uniqueID: {
          type: 'string',
          default: ''
        }
      },
      save: function save(_ref7) {
        var attributes = _ref7.attributes;
        var pid = attributes.pid,
          header = attributes.header;
        return /*#__PURE__*/React.createElement("div", {
          className: "advgb-tab-body-container"
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-tab-body-header"
        }, header), /*#__PURE__*/React.createElement("div", {
          className: "advgb-tab-body",
          id: pid
        }, /*#__PURE__*/React.createElement(InnerBlocks.Content, null)));
      }
    }, {
      attributes: {
        id: {
          type: 'number',
          default: 0
        },
        pid: {
          type: 'string'
        },
        header: {
          type: 'html'
        },
        tabActive: {
          type: 'number',
          default: 0
        },
        changed: {
          type: 'boolean',
          default: false
        },
        tabHeaders: {
          type: 'array',
          default: [__('Tab 1', 'advanced-gutenberg'), __('Tab 2', 'advanced-gutenberg'), __('Tab 3', 'advanced-gutenberg')]
        },
        uniqueID: {
          type: 'string',
          default: ''
        },
        anchor: {
          type: 'string',
          default: ''
        }
      },
      save: function save(_ref8) {
        var attributes = _ref8.attributes;
        var id = attributes.id,
          tabActive = attributes.tabActive,
          header = attributes.header,
          uniqueID = attributes.uniqueID,
          anchor = attributes.anchor;
        var tabClassName = ["advgb-tab-".concat(uniqueID), 'advgb-tab-body'].filter(Boolean).join(' ');
        return /*#__PURE__*/React.createElement("div", {
          className: "advgb-tab-body-container",
          style: {
            display: id === tabActive ? 'block' : 'none'
          }
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-tab-body-header advgb-tab-class-".concat(anchor),
          id: "advgb-tab-panel-".concat(uniqueID, "-").concat(id),
          role: "tabpanel",
          "aria-labelledby": "advgb-tab-".concat(uniqueID, "-").concat(id),
          tabIndex: "0"
        }, header), /*#__PURE__*/React.createElement("div", {
          className: tabClassName,
          "aria-labelledby": "advgb-tab-panel-".concat(uniqueID, "-").concat(id)
        }, /*#__PURE__*/React.createElement(InnerBlocks.Content, null)));
      }
    }]
  });
})(wp.i18n, wp.blocks, wp.element, wp.blockEditor, wp.components);

/***/ },

/***/ "./assets/blocks/advvideo/block.jsx"
/*!******************************************!*\
  !*** ./assets/blocks/advvideo/block.jsx ***!
  \******************************************/
() {

function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
(function (wpI18n, wpBlocks, wpElement, wpBlockEditor, wpComponents) {
  wpBlockEditor = wp.blockEditor || wp.editor;
  var __ = wpI18n.__;
  var Component = wpElement.Component,
    Fragment = wpElement.Fragment;
  var registerBlockType = wpBlocks.registerBlockType;
  var _wpBlockEditor = wpBlockEditor,
    InspectorControls = _wpBlockEditor.InspectorControls,
    BlockControls = _wpBlockEditor.BlockControls,
    PanelColorSettings = _wpBlockEditor.PanelColorSettings,
    MediaUpload = _wpBlockEditor.MediaUpload;
  var RangeControl = wpComponents.RangeControl,
    PanelBody = wpComponents.PanelBody,
    ToggleControl = wpComponents.ToggleControl,
    BaseControl = wpComponents.BaseControl,
    TextControl = wpComponents.TextControl,
    SelectControl = wpComponents.SelectControl,
    Button = wpComponents.Button,
    Dashicon = wpComponents.Dashicon,
    Spinner = wpComponents.Spinner,
    Toolbar = wpComponents.Toolbar,
    ToolbarGroup = wpComponents.ToolbarGroup,
    ToolbarButton = wpComponents.ToolbarButton,
    Disabled = wpComponents.Disabled;
  var PLAY_BUTTON_STYLE = {
    normal: [/*#__PURE__*/React.createElement("path", {
      key: "x",
      d: "M8 5v14l11-7z"
    }), /*#__PURE__*/React.createElement("path", {
      key: "y",
      d: "M0 0h24v24H0z",
      fill: "none"
    })],
    circleFill: [/*#__PURE__*/React.createElement("path", {
      key: "x",
      d: "M0 0h24v24H0z",
      fill: "none"
    }), /*#__PURE__*/React.createElement("path", {
      key: "y",
      d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 14.5v-9l6 4.5-6 4.5z"
    })],
    circleOutline: [/*#__PURE__*/React.createElement("path", {
      key: "x",
      d: "M0 0h24v24H0z",
      fill: "none"
    }), /*#__PURE__*/React.createElement("path", {
      key: "y",
      d: "M10 16.5l6-4.5-6-4.5v9zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"
    })],
    videoCam: [/*#__PURE__*/React.createElement("path", {
      key: "x",
      d: "M0 0h24v24H0z",
      fill: "none"
    }), /*#__PURE__*/React.createElement("path", {
      key: "y",
      d: "M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l4 4v-11l-4 4z"
    })],
    squareCurved: [/*#__PURE__*/React.createElement("path", {
      key: "x",
      d: "M20 8H4V6h16v2zm-2-6H6v2h12V2zm4 10v8c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2v-8c0-1.1.9-2 2-2h16c1.1 0 2 .9 2 2zm-6 4l-6-3.27v6.53L16 16z"
    }), /*#__PURE__*/React.createElement("path", {
      key: "y",
      fill: "none",
      d: "M0 0h24v24H0z"
    })],
    starSticker: [/*#__PURE__*/React.createElement("path", {
      key: "x",
      d: "M0 0h24v24H0z",
      fill: "none"
    }), /*#__PURE__*/React.createElement("path", {
      key: "y",
      d: "M20 12c0-1.1.9-2 2-2V6c0-1.1-.9-2-2-2H4c-1.1 0-1.99.9-1.99 2v4c1.1 0 1.99.9 1.99 2s-.89 2-2 2v4c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-4c-1.1 0-2-.9-2-2zm-4.42 4.8L12 14.5l-3.58 2.3 1.08-4.12-3.29-2.69 4.24-.25L12 5.8l1.54 3.95 4.24.25-3.29 2.69 1.09 4.11z"
    })]
  };
  var previewImageData = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAAEDCAYAAAAcBhlYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAACu1JREFUeNrs3cuLG/cBwPEZPfa9XhuTEJq02KE09NJLSQvJXxBampBALyWn0t5KL4WcSy8lp+SSHhJoCyGHQC7F15L40lxajEuLDzFODHYS7AZSr/ZpSVP9VMmM5RlppNV7Px8YpGRtWavRd36/eaw2igAAAAAAAAAAAAAAAGDK4nE/YKVSmfi/AUsqSf9HvV6fn9A7YcfT2IjAaQy++/9OEn48xrjjPo8rehgu7qTf/WGjj8cQeTzgVuwwWuR5t0OP8PEJIk/fppeo577IoXjs6dve+4/8maKxxyeIvMgSCR6GGsmz4s5bCscejyHyUs79fsED2aN579LsuR0p9vgEkZe6YT/xxBPlDz744DvPPPPMjzY3N18ql8vfjeN43fqDwpqNRuNGrVa79Pnnn//1xRdf/Nunn35aT0WeXoaOvUjo/SJvLzdv3vxJK/bfl0qlb1pfcMLhPUlq9+7d+/Mrr7zyu8uXLx/1RN7IG937hV4eYjQvZURevn379s9akf+xNYLvWEVwcq2WVtbW1n7w8ssvP3n16tXL169fb/QMznH06IG5uNls5j5mqei/nTGqly9dunTx/Pnzv7FqYPy2trZ++uabb77UGZC7S3rATTeZdVVq4dDjjC1J+x/Z3t4uPffcc79s7Y9/2yqBiSg/9dRTvzh79mw1FXkpevSg98Bd8dKAaXtv4A+m7m+//fa3NjY2fmxdwOSsrKx87/333/9hz4g+KPgTTd0fCv3ixYtPtkbzb1gVMFlPP/309zNCLxT4MKHnHXVfbS1VqwEmPH8vl7cGjOJxxky8cOhxv9ibzWbJKoDJa7UWF9hH73thWtGDcY/spzcaDVe6wRQkSZLZYE+bUTTKwbg+I3uc2soAkw896xLzKBrisvJhpt8PbU06WxlgOvr94NhYQ8/abwCmN6JnjeKFgi86dY+HfWBgIqN6XoNjOY+ed4AAWACj7KMDsx3NC43i4xrRRQ9LOKIDQgeEDggdmJzKIj7p8JE5R0dH1h6zGR1LpWh1dVXo0wj94ODAO46ZqFarCxe6qTvYRweEDggdEDogdEDogNABoYPQAaEDQgeEDggdEDogdEDoIHRA6IDQAaEDQgeEDggdEDoI3UsAQgeEDggdEDogdEDogNABoYPQAaEDQgeEDggdEDogdEDoIHRA6IDQAaEDQgeEDggdEDoIneVfySWrWegsva2trWhjYyOK49iLIXSW2draWnT27NloZWXFiyF0llkY0cPoHhbT+dOl4iU4fcKoXq1Wo4ODg+jw8NALYkRnmUf3sN++s7MTlctlL4jQWWYh8hD7+vq6g3VCZ9mF0EPwYUqP0FnmN0OpFG1vb0ebm5tGd6GzzJIkiZrNZvuW5eGoOw/U6/WoVqu1Q0foLOEovre3Fx0fH3sxhM4yOjo6ivb3903Vhc4yCtPzMIrfv3/fiyF0llH3ijijuNBZQuFgWxjFG42GF0PoLOM0PeyHu65d6CyxcMqM080FMyB0QOiA0AGhA0IHhA4IHRA6CB0QOiB0QOiA0AGhA0IHhA5CB4QOCB0QOiB0QOiA0AGhg9C9BCB0QOiA0AGhA0IHhA4IHRA6CB0QOiB0QOiA0AGhA0IHhA5CB4QOCB0QOiB0QOiA0AGhw2lXWcitU6kUra+vW3vM7P0ndKGDqTsgdEDogNABoYPQAaEDQgeEDggdEDogdEDogNBB6IDQAaED86HiJWAU9+7di+r1+tgeL3xi0CQ/Nejw8DDa39+Pms1mlCTJ1F6nlZWV9vdVLpfbi9B7HBwcRI1G48GLFIT/DissrCxmq1arRWtra2Nd35MKPTzXL774YmavVbVajc6dOxdtbm5GlUpF6F17e3vt0SJsDcMbYGtr68EKC7Eze9McFU/6PMPsY5bu378fffXVV+0BK8Qex7F99DC9Ojo6am/dw8id/sRNkTOKeXjfhAErBD+rDeRcjehhJD8+Pm5v8cL9MKJvbGw8unVqxb+6uuodPCVhgxs2vnnCuhjlI5AHPe7du3f7fr3f83nsscfmbmMTIj/1oYcVGqbrOzs70e7ubnu/JivyIEyBfNzz9IT1Mij0UfY9Bz3unTt3Rpp2nzlzplDo4c+Me8C4devWXK7DuZq6h1EhTN3DmyYvcmCBR/SwZe1OawYdzQ3ToLDPw/Sm7oNmY2H/c9yP+/jjj7dneKO8l4oIuwZCn4Gip2vCG0To82OU/egi5m0/e5Et1JVxYb8dRtklnIfnEA4yz+LU2tyN6IOEc5Dhghmn2WYrvFnDehhluj6Ljfj29nb72M+shDNJ4QzSrC6WWbjQw1bRQbr5mV2N8wrFSUUQNkrhPROuTPv666/HunEa5nsLxxpC7EZ0FsoiXccQTseGU24htHFenz9M6OH1ChtHocMEdzVCZLOcOs9y/1zonKrYZxnazHd7vQVA6IDQgUVgH71HuOKu31V34RRfOFVymvf3MKIvvPTplxBz71VV4dyxC3Ywovfx2WeftX/OfN6EH57Iuq46nI4JV1WFq8DCKJ/1s8Tz+j0xvfeJ0HuEIGb9sT5ZBv2EVL8PC5jX74npv0+EvsDT+HDZpA+jxNR9COGHUuZR+nLO9EG2vI/+Se+3z+v3xGTfJ0Lv48KFC3P/goRw+/1cfO8BukX4nsDUPSPkWV4TDUKfQ466j8ciH9EW+ingqPt4LPIR7UXgghkwojOIo+7j4RdyCH2uOeqOqTsgdEDogNABoQNCB6EDQgeEDggdEDogdGCKocdxnHj5YPlCTzoLMH1Jz200TI8jj+hJkoTPQPY5yDBhzWazPo0RPcnYiiQ3bty402g07lgNMFmt1q5ljOpJzog/3hH9rbfeurW/v3/FaoDJqdfrd19//fW/50zdC+9Sj7KPHpbmlStXjj/88MM/tEb1/1gdMJn98k8++eRPH330Ua2nvyQa8phZ0al71tYjefXVV69++eWX71kfMH67u7v/eOONN/6SHmB7Gyz6WLm/5LtSqcSpjUF3KUf//5y5sFQ7S6W11fnVhQsXft35OnBCe3t7/3zhhRd+/vHHH++GGXxrCb+r+35nqXduG6mluyEI0/1HNgC5YXZ+7VCc2hiUOvfT4be//u6771559tln/33u3Lkz5XJ5o/V3V+M4djEODDFNbwX631qt9q/WwPne888//9tr164ddOJtZCzN1PLQKJ/1S0H7jejp0NNxVzobiGpqdG+P9BsbG5XXXnvtYsv51t+vJkkSdxarEfpr3r59+7/vvPPOzevXrx9mBF7vGcnrqeC7I3qSNZoPE3rcM31PT+HTsXeXODXiRxm3wMP72d3bZmoanhV6PWdk7xt67ue6h98N3om999xdsxNs94lEPV9PekIXORSPPUnF2w25njNlb0YFj8BXCjyBOCPkrKvi0l8vpTYIschhpNCbBfbLC10SWxnxiSSp/YIo40mWeiI3qkPxtrKm78286Xr3McIsfKTQU9P39JNq5jzZUuo2bx9d7JA9AmddDJM1VU9HHhUZzYuO6N3pe/qBmn2eYJwxogschpu6997mTdsLndIqFF/qCHyUMSUv5dwXOow+fc+LPivypN+0faj4BsQeFwxc7JA/3U4GRD9S5EOHlxF71CdugcNoo3q/6KNhIx8pwJ7Y88LPemyxQ/GRvd/tUJGPHF/qSHy/mIUOJws992vDRD6W+DJGeGHDeMMfegSfeIw9590FDyMGfpKwAQAAAAAAAAAAAAAAYOb+J8AAxH4EURcdIEMAAAAASUVORK5CYII=';
  var AdvVideo = /*#__PURE__*/function (_Component) {
    function AdvVideo() {
      var _this;
      _classCallCheck(this, AdvVideo);
      _this = _callSuper(this, AdvVideo, arguments);
      _this.state = {
        fetching: false
      };
      _this.fetchVideoInfo = _this.fetchVideoInfo.bind(_this);
      return _this;
    }
    _inherits(AdvVideo, _Component);
    return _createClass(AdvVideo, [{
      key: "componentWillMount",
      value: function componentWillMount() {
        var _this$props = this.props,
          attributes = _this$props.attributes,
          setAttributes = _this$props.setAttributes;
        var currentBlockConfig = advgbDefaultConfig['advgb-video'];

        // No override attributes of blocks inserted before
        if (attributes.changed !== true) {
          if (_typeof(currentBlockConfig) === 'object' && currentBlockConfig !== null) {
            Object.keys(currentBlockConfig).map(function (attribute) {
              if (typeof attributes[attribute] === 'boolean') {
                attributes[attribute] = !!currentBlockConfig[attribute];
              } else {
                attributes[attribute] = currentBlockConfig[attribute];
              }
            });
          }

          // Finally set changed attribute to true, so we don't modify anything again
          setAttributes({
            changed: true
          });
        }
      }
    }, {
      key: "fetchVideoInfo",
      value: function fetchVideoInfo() {
        var _this2 = this;
        var _this$props2 = this.props,
          attributes = _this$props2.attributes,
          setAttributes = _this$props2.setAttributes;
        var videoID = attributes.videoID,
          poster = attributes.poster,
          posterID = attributes.posterID;
        var realID = videoID;
        if (!!videoID) {
          this.setState({
            fetching: true
          });
          var url = '';
          if (videoID.match(/^\d+$/g)) {
            url = "https://vimeo.com/".concat(videoID);
          } else {
            url = "https://www.youtube.com/watch?v=".concat(videoID);
          }
          if (videoID.indexOf('http') > -1) {
            url = videoID;
          }
          if (videoID.match(/youtube.com/)) {
            realID = videoID.split('v=');
            realID = realID[1];
          } else if (videoID.match(/youtu.be|vimeo.com/)) {
            realID = videoID.split('/');
            realID = realID[realID.length - 1];
          }
          if (!realID) realID = '';
          if (realID.indexOf('&') > -1) realID = realID.substring(0, realID.indexOf('&'));
          wp.apiFetch({
            path: wp.url.addQueryArgs("/oembed/1.0/proxy?url=".concat(encodeURIComponent(url)))
          }).then(function (obj) {
            _this2.setState({
              fetching: false
            });
            if (!!obj.title && !!obj.provider_name) {
              setAttributes({
                videoTitle: obj.title,
                poster: !!posterID ? poster : obj.thumbnail_url
              });
              switch (obj.provider_name) {
                case 'YouTube':
                  setAttributes({
                    videoSourceType: 'youtube',
                    videoURL: "https://www.youtube.com/embed/".concat(realID, "?rel=0&wmode=transparent")
                  });
                  break;
                case 'Vimeo':
                  setAttributes({
                    videoSourceType: 'vimeo',
                    videoURL: "https://player.vimeo.com/video/".concat(realID)
                  });
                  break;
                default:
                  break;
              }
            } else {
              setAttributes({
                videoTitle: 'ADVGB_FAIL_TO_LOAD',
                poster: ''
              });
            }
          }).catch(function (error) {
            _this2.setState({
              fetching: false
            });
            setAttributes({
              videoTitle: 'ADVGB_FAIL_TO_LOAD',
              poster: ''
            });
          });
        }
      }
    }, {
      key: "loadLocalVideo",
      value: function loadLocalVideo(video, blockId) {
        this.props.setAttributes({
          videoURL: video.url,
          videoID: video.id,
          videoTitle: video.title,
          videoSourceType: 'local',
          openInLightbox: false
        });
        if (document.querySelector('#' + blockId + ' video') != null) {
          document.querySelector('#' + blockId + ' video').pause();
          document.querySelector('#' + blockId + ' video').load();
        }
      }
    }, {
      key: "render",
      value: function render() {
        var _this3 = this;
        var _this$props3 = this.props,
          isSelected = _this$props3.isSelected,
          attributes = _this$props3.attributes,
          clientId = _this$props3.clientId,
          setAttributes = _this$props3.setAttributes;
        var videoURL = attributes.videoURL,
          videoID = attributes.videoID,
          videoSourceType = attributes.videoSourceType,
          videoTitle = attributes.videoTitle,
          videoFullWidth = attributes.videoFullWidth,
          videoWidth = attributes.videoWidth,
          useCustomHeight = attributes.useCustomHeight,
          videoHeight = attributes.videoHeight,
          playButtonIcon = attributes.playButtonIcon,
          playButtonSize = attributes.playButtonSize,
          playButtonColor = attributes.playButtonColor,
          overlayColor = attributes.overlayColor,
          poster = attributes.poster,
          posterID = attributes.posterID,
          openInLightbox = attributes.openInLightbox,
          autoPlay = attributes.autoPlay,
          loop = attributes.loop,
          muted = attributes.muted,
          playback = attributes.playback,
          playsinline = attributes.playsinline,
          preload = attributes.preload,
          isPreview = attributes.isPreview;
        var blockClassName = ['advgb-video-block', !!openInLightbox && !!videoURL && 'advgb-video-lightbox'].filter(Boolean).join(' ');
        var videoWrapperClass = ['advgb-video-wrapper', !!videoFullWidth && 'full-width', !openInLightbox && 'no-lightbox'].filter(Boolean).join(' ');
        var blockId = 'advgb-video-' + clientId;
        var videoHostIcon = {
          youtube: /*#__PURE__*/React.createElement("svg", {
            id: "Social_Icons",
            version: "1.1",
            viewBox: "0 0 128 128",
            xmlns: "http://www.w3.org/2000/svg"
          }, /*#__PURE__*/React.createElement("g", {
            id: "_x34__stroke"
          }, /*#__PURE__*/React.createElement("g", {
            id: "Youtube_1_"
          }, /*#__PURE__*/React.createElement("rect", {
            clipRule: "evenodd",
            fill: "none",
            height: "128",
            width: "128"
          }), /*#__PURE__*/React.createElement("path", {
            clipRule: "evenodd",
            d: "M126.72,38.224c0,0-1.252-8.883-5.088-12.794    c-4.868-5.136-10.324-5.16-12.824-5.458c-17.912-1.305-44.78-1.305-44.78-1.305h-0.056c0,0-26.868,0-44.78,1.305    c-2.504,0.298-7.956,0.322-12.828,5.458C2.528,29.342,1.28,38.224,1.28,38.224S0,48.658,0,59.087v9.781    c0,10.433,1.28,20.863,1.28,20.863s1.248,8.883,5.084,12.794c4.872,5.136,11.268,4.975,14.116,5.511    c10.24,0.991,43.52,1.297,43.52,1.297s26.896-0.04,44.808-1.345c2.5-0.302,7.956-0.326,12.824-5.462    c3.836-3.912,5.088-12.794,5.088-12.794S128,79.302,128,68.868v-9.781C128,48.658,126.72,38.224,126.72,38.224z M50.784,80.72    L50.78,44.501l34.584,18.172L50.784,80.72z",
            fill: "#CE1312",
            fillRule: "evenodd",
            id: "Youtube"
          })))),
          vimeo: /*#__PURE__*/React.createElement("svg", {
            height: "25",
            viewBox: "0 0 32 32",
            width: "25",
            xmlns: "http://www.w3.org/2000/svg"
          }, /*#__PURE__*/React.createElement("g", null, /*#__PURE__*/React.createElement("circle", {
            cx: "16",
            cy: "16",
            id: "BG",
            r: "16",
            fill: "#5FCCFF"
          }), /*#__PURE__*/React.createElement("path", {
            d: "M24,12.4c-0.1,1.6-1.2,3.7-3.3,6.4c-2.2,2.8-4,4.2-5.5,4.2        c-0.9,0-1.7-0.9-2.4-2.6c-0.4-1.6-0.9-3.2-1.3-4.7c-0.5-1.7-1-2.6-1.5-2.6c-0.1,0-0.5,0.3-1.3,0.8l-0.8-1        c0.8-0.7,1.6-1.4,2.3-2.1c1.1-0.9,1.8-1.4,2.4-1.4c1.2-0.1,2,0.7,2.3,2.5c0.3,2,0.5,3.2,0.6,3.7c0.4,1.6,0.8,2.4,1.2,2.4        c0.3,0,0.8-0.5,1.5-1.6c0.7-1.1,1-1.9,1.1-2.4c0.1-0.9-0.3-1.4-1.1-1.4c-0.4,0-0.8,0.1-1.2,0.3c0.8-2.6,2.3-3.8,4.5-3.7        C23.3,9.2,24.1,10.3,24,12.4",
            id: "Vimeo",
            fill: "#FFFFFF"
          }))),
          local: /*#__PURE__*/React.createElement("svg", {
            height: "25",
            id: "Layer_1",
            version: "1.1",
            viewBox: "0 0 24 24",
            width: "25",
            xmlns: "http://www.w3.org/2000/svg"
          }, /*#__PURE__*/React.createElement("path", {
            clipRule: "evenodd",
            d: "M22.506,21v0.016L17,15.511V19c0,1.105-0.896,2-2,2h-1.5H3H2c-1.104,0-2-0.895-2-2  v-1l0,0V6l0,0V5c0-1.104,0.896-1.999,2-1.999h1l0,0h10.5l0,0H15c1.104,0,2,0.895,2,1.999v3.516l5.5-5.5V3.001  c0.828,0,1.5,0.671,1.5,1.499v15C24,20.327,23.331,20.996,22.506,21z",
            fillRule: "evenodd"
          }))
        };
        return isPreview ? /*#__PURE__*/React.createElement("img", {
          alt: __('Advanced Video', 'advanced-gutenberg'),
          width: "100%",
          src: previewImageData
        }) : /*#__PURE__*/React.createElement(Fragment, null, (!!poster && openInLightbox || !openInLightbox && videoSourceType === 'local') && /*#__PURE__*/React.createElement(BlockControls, null, /*#__PURE__*/React.createElement(ToolbarGroup, null, /*#__PURE__*/React.createElement(MediaUpload, {
          allowedTypes: ["image"],
          value: posterID,
          onSelect: function onSelect(image) {
            return setAttributes({
              poster: image.url,
              posterID: image.id
            });
          },
          render: function render(_ref) {
            var open = _ref.open;
            return /*#__PURE__*/React.createElement(ToolbarButton, {
              className: "components-toolbar__control",
              label: __('Change image preview', 'advanced-gutenberg'),
              icon: "edit",
              onClick: open
            });
          }
        }), /*#__PURE__*/React.createElement(ToolbarButton, {
          className: "components-toolbar__control",
          label: __('Remove image preview', 'advanced-gutenberg'),
          icon: "no",
          onClick: function onClick() {
            return setAttributes({
              poster: undefined,
              posterID: undefined
            });
          }
        }))), /*#__PURE__*/React.createElement(InspectorControls, null, /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Video Settings', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Open video in light box', 'advanced-gutenberg'),
          help: __('Lightbox offers additional display options.', 'advanced-gutenberg'),
          checked: openInLightbox,
          onChange: function onChange() {
            return setAttributes({
              openInLightbox: !openInLightbox
            });
          }
        }), videoSourceType === 'local' && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Autoplay', 'advanced-gutenberg'),
          checked: autoPlay,
          onChange: function onChange() {
            return setAttributes({
              autoPlay: !autoPlay
            });
          }
        }), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Loop', 'advanced-gutenberg'),
          checked: loop,
          onChange: function onChange() {
            return setAttributes({
              loop: !loop
            });
          }
        }), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Muted', 'advanced-gutenberg'),
          checked: muted,
          onChange: function onChange() {
            return setAttributes({
              muted: !muted
            });
          }
        }), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Playback Controls', 'advanced-gutenberg'),
          checked: playback,
          onChange: function onChange() {
            return setAttributes({
              playback: !playback
            });
          }
        }), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Play inline', 'advanced-gutenberg'),
          checked: playsinline,
          onChange: function onChange() {
            return setAttributes({
              playsinline: !playsinline
            });
          }
        }), /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Video preloading', 'advanced-gutenberg'),
          value: preload,
          options: [{
            label: __('Auto', 'advanced-gutenberg'),
            value: 'auto'
          }, {
            label: __('Metadata', 'advanced-gutenberg'),
            value: 'metadata'
          }, {
            label: __('None', 'advanced-gutenberg'),
            value: 'none'
          }],
          onChange: function onChange(value) {
            return setAttributes({
              preload: value
            });
          }
        })), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Full width', 'advanced-gutenberg'),
          checked: videoFullWidth,
          onChange: function onChange() {
            return setAttributes({
              videoFullWidth: !videoFullWidth
            });
          }
        }), !videoFullWidth && /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Video width', 'advanced-gutenberg'),
          value: videoWidth,
          min: 100,
          max: 1000,
          onChange: function onChange(value) {
            return setAttributes({
              videoWidth: value
            });
          }
        }), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Video height', 'advanced-gutenberg'),
          checked: useCustomHeight,
          onChange: function onChange() {
            return setAttributes({
              useCustomHeight: !useCustomHeight
            });
          }
        }), useCustomHeight && /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Custom height', 'advanced-gutenberg'),
          value: videoHeight,
          min: 300,
          max: 700,
          onChange: function onChange(value) {
            return setAttributes({
              videoHeight: value
            });
          }
        }), !!openInLightbox && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Color Settings', 'advanced-gutenberg'),
          initialOpen: false,
          colorSettings: [{
            label: __('Overlay Color', 'advanced-gutenberg'),
            value: overlayColor,
            onChange: function onChange(value) {
              return setAttributes({
                overlayColor: value === undefined ? '#EEEEEE' : value
              });
            }
          }, {
            label: __('Play Button Color', 'advanced-gutenberg'),
            value: playButtonColor,
            onChange: function onChange(value) {
              return setAttributes({
                playButtonColor: value === undefined ? '#fff' : value
              });
            }
          }]
        }), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Play Button', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(BaseControl, {
          label: __('Icon Style', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-icon-items-wrapper"
        }, Object.keys(PLAY_BUTTON_STYLE).map(function (key, index) {
          return /*#__PURE__*/React.createElement("div", {
            className: "advgb-icon-item",
            key: index
          }, /*#__PURE__*/React.createElement("span", {
            className: key === playButtonIcon ? 'active' : '',
            onClick: function onClick() {
              return setAttributes({
                playButtonIcon: key
              });
            }
          }, /*#__PURE__*/React.createElement("svg", {
            xmlns: "http://www.w3.org/2000/svg",
            width: "24",
            height: "24",
            viewBox: "0 0 24 24"
          }, PLAY_BUTTON_STYLE[key])));
        }))), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Play Button Size', 'advanced-gutenberg'),
          value: playButtonSize,
          min: 40,
          max: 200,
          onChange: function onChange(value) {
            return setAttributes({
              playButtonSize: value
            });
          }
        }))))), /*#__PURE__*/React.createElement("div", {
          className: blockClassName,
          id: blockId
        }, !!openInLightbox && /*#__PURE__*/React.createElement("div", {
          className: videoWrapperClass,
          style: {
            backgroundColor: overlayColor,
            width: videoWidth
          }
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-video-poster",
          style: {
            backgroundImage: "url(".concat(poster, ")")
          }
        }), /*#__PURE__*/React.createElement("div", {
          className: "advgb-button-wrapper",
          style: {
            height: videoHeight
          }
        }, !poster && /*#__PURE__*/React.createElement(MediaUpload, {
          allowedTypes: ["image"],
          onSelect: function onSelect(media) {
            return setAttributes({
              poster: media.url,
              posterID: media.id
            });
          },
          value: posterID,
          render: function render(_ref2) {
            var open = _ref2.open;
            return /*#__PURE__*/React.createElement(Button, {
              className: "button button-large",
              onClick: open
            }, __('Select image preview', 'advanced-gutenberg'));
          }
        }), /*#__PURE__*/React.createElement("div", {
          className: "advgb-play-button",
          style: {
            color: playButtonColor
          }
        }, /*#__PURE__*/React.createElement("svg", {
          xmlns: "http://www.w3.org/2000/svg",
          width: playButtonSize,
          height: playButtonSize,
          viewBox: "0 0 24 24"
        }, PLAY_BUTTON_STYLE[playButtonIcon])))), !openInLightbox && /*#__PURE__*/React.createElement("div", {
          className: videoWrapperClass
        }, (videoSourceType === 'youtube' || videoSourceType === 'vimeo') && /*#__PURE__*/React.createElement("iframe", {
          src: videoURL,
          frameBorder: "0",
          allowFullScreen: true,
          style: {
            width: videoWidth,
            height: useCustomHeight ? videoHeight : undefined
          }
        }) || videoSourceType === 'local' && /*#__PURE__*/React.createElement(Disabled, null, /*#__PURE__*/React.createElement("video", {
          width: videoWidth,
          height: useCustomHeight ? videoHeight : undefined,
          poster: poster,
          controls: playback,
          muted: muted
        }, /*#__PURE__*/React.createElement("source", {
          src: videoURL
        }), 'Your browser does not support HTML5 video.')) || !videoSourceType && /*#__PURE__*/React.createElement("div", {
          style: {
            width: videoWidth,
            height: useCustomHeight ? videoHeight : undefined
          }
        })), isSelected && /*#__PURE__*/React.createElement("div", {
          className: "advgb-video-input-block"
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-video-input"
        }, /*#__PURE__*/React.createElement(Dashicon, {
          className: "advgb-video-link-icon",
          icon: "admin-links"
        }), /*#__PURE__*/React.createElement(TextControl, {
          placeholder: __('Youtube/Vimeo video URL/ID…', 'advanced-gutenberg'),
          value: videoID,
          onChange: function onChange(value) {
            setAttributes({
              videoID: value,
              videoURL: '',
              videoTitle: undefined,
              videoSourceType: ''
            });
          }
        }), /*#__PURE__*/React.createElement(Button, {
          className: "button button-large",
          disabled: !videoID || videoSourceType === 'local',
          style: {
            height: '31px'
          },
          onClick: this.fetchVideoInfo
        }, __('Fetch video content', 'advanced-gutenberg')), /*#__PURE__*/React.createElement(MediaUpload, {
          allowedTypes: ["video"],
          value: videoID,
          onSelect: function onSelect(video) {
            return _this3.loadLocalVideo(video, blockId);
          },
          render: function render(_ref3) {
            var open = _ref3.open;
            return /*#__PURE__*/React.createElement(Button, {
              className: "button button-large is-primary",
              onClick: open,
              style: {
                marginLeft: '5px'
              }
            }, __('Load local video', 'advanced-gutenberg'));
          }
        })), /*#__PURE__*/React.createElement("div", {
          className: "advgb-current-video-desc",
          style: {
            minWidth: '50%',
            margin: '10px auto',
            textAlign: 'center'
          }
        }, /*#__PURE__*/React.createElement("strong", null, __('Current Video', 'advanced-gutenberg'), ":"), /*#__PURE__*/React.createElement("span", {
          title: videoSourceType,
          style: {
            width: '25px',
            height: '25px',
            margin: '-1px 5px 0',
            display: 'flex',
            alignItems: 'center',
            justifyContent: 'center'
          }
        }, videoHostIcon[videoSourceType] || this.state.fetching && /*#__PURE__*/React.createElement(Spinner, null)), /*#__PURE__*/React.createElement("span", null, videoTitle === 'ADVGB_FAIL_TO_LOAD' && /*#__PURE__*/React.createElement("strong", {
          style: {
            color: 'red'
          }
        }, __('Wrong video URL/ID. Please try another.', 'advanced-gutenberg')) || videoTitle || __('Not selected yet.', 'advanced-gutenberg'))))));
      }
    }]);
  }(Component);
  var advVideoBlockIcon = /*#__PURE__*/React.createElement("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    width: "20",
    height: "20",
    viewBox: "2 2 22 22"
  }, /*#__PURE__*/React.createElement("path", {
    d: "M0 0h24v24H0z",
    fill: "none"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M10 16.5l6-4.5-6-4.5v9zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"
  }));
  var blockAttrs = {
    videoURL: {
      type: 'string'
    },
    videoID: {
      type: 'string'
    },
    videoSourceType: {
      type: 'string'
    },
    videoTitle: {
      type: 'string'
    },
    videoFullWidth: {
      type: 'boolean',
      default: true
    },
    videoWidth: {
      type: 'number'
    },
    useCustomHeight: {
      type: 'boolean',
      default: true
    },
    videoHeight: {
      type: 'number',
      default: 450
    },
    playButtonIcon: {
      type: 'string',
      default: 'normal'
    },
    playButtonSize: {
      type: 'number',
      default: 80
    },
    playButtonColor: {
      type: 'string',
      default: '#fff'
    },
    overlayColor: {
      type: 'string',
      default: '#EEEEEE'
    },
    poster: {
      type: 'string'
    },
    posterID: {
      type: 'number'
    },
    openInLightbox: {
      type: 'boolean',
      default: true
    },
    changed: {
      type: 'boolean',
      default: false
    },
    autoPlay: {
      type: 'boolean',
      default: false
    },
    loop: {
      type: 'boolean',
      default: false
    },
    muted: {
      type: 'boolean',
      default: false
    },
    playback: {
      type: 'boolean',
      default: true
    },
    playsinline: {
      type: 'boolean',
      default: true
    },
    preload: {
      type: 'string',
      default: 'metadata'
    },
    isPreview: {
      type: 'boolean',
      default: false
    }
  };
  registerBlockType('advgb/video', {
    apiVersion: 3,
    title: __('Video - PublishPress', 'advanced-gutenberg'),
    description: __('Add more options and styles for videos in your Media Library.', 'advanced-gutenberg'),
    icon: {
      src: advVideoBlockIcon,
      foreground: typeof advgbBlocks !== 'undefined' ? advgbBlocks.color : undefined
    },
    category: 'advgb-category',
    keywords: [__('video', 'advanced-gutenberg'), __('advanced video', 'advanced-gutenberg'), __('embed', 'advanced-gutenberg'), __('media', 'advanced-gutenberg')],
    attributes: blockAttrs,
    example: {
      attributes: {
        isPreview: true
      }
    },
    supports: {
      anchor: true
    },
    edit: AdvVideo,
    save: function save(_ref4) {
      var attributes = _ref4.attributes;
      var videoURL = attributes.videoURL,
        videoSourceType = attributes.videoSourceType,
        videoTitle = attributes.videoTitle,
        videoFullWidth = attributes.videoFullWidth,
        videoWidth = attributes.videoWidth,
        useCustomHeight = attributes.useCustomHeight,
        videoHeight = attributes.videoHeight,
        playButtonIcon = attributes.playButtonIcon,
        playButtonSize = attributes.playButtonSize,
        playButtonColor = attributes.playButtonColor,
        overlayColor = attributes.overlayColor,
        poster = attributes.poster,
        openInLightbox = attributes.openInLightbox,
        autoPlay = attributes.autoPlay,
        loop = attributes.loop,
        muted = attributes.muted,
        playback = attributes.playback,
        playsinline = attributes.playsinline,
        preload = attributes.preload;
      var blockClassName = ['advgb-video-block', !!videoFullWidth && 'full-width', !!openInLightbox && !!videoURL && 'advgb-video-lightbox'].filter(Boolean).join(' ');
      var videoWrapperClass = ['advgb-video-wrapper', !!videoFullWidth && 'full-width', !openInLightbox && 'no-lightbox'].filter(Boolean).join(' ');
      var videoAttributes = [];
      if (loop) videoAttributes.push('loop');
      if (muted) videoAttributes.push('muted');
      if (autoPlay) videoAttributes.push('autoplay');
      if (playback) videoAttributes.push('controls');
      if (playsinline) videoAttributes.push('playsinline');
      return /*#__PURE__*/React.createElement("div", {
        className: blockClassName,
        "data-video": videoURL,
        "data-source": videoSourceType,
        "data-video-attr": videoAttributes.join(','),
        "data-video-preload": preload
      }, !openInLightbox && /*#__PURE__*/React.createElement("div", {
        className: videoWrapperClass
      }, (videoSourceType === 'youtube' || videoSourceType === 'vimeo') && /*#__PURE__*/React.createElement("iframe", {
        src: videoURL,
        width: videoWidth,
        height: useCustomHeight ? videoHeight : undefined,
        frameBorder: "0",
        allowFullScreen: true
      }) || videoSourceType === 'local' && /*#__PURE__*/React.createElement("video", {
        className: videoFullWidth && 'full-width',
        width: videoWidth,
        height: useCustomHeight ? videoHeight : undefined,
        poster: poster,
        controls: playback,
        loop: loop,
        muted: muted,
        autoPlay: autoPlay,
        preload: preload,
        playsInline: playsinline
      }, /*#__PURE__*/React.createElement("source", {
        src: videoURL
      }), 'Your browser does not support HTML5 video.') || !videoSourceType && /*#__PURE__*/React.createElement("div", {
        style: {
          width: videoWidth,
          height: useCustomHeight ? videoHeight : undefined
        }
      })), !!openInLightbox && /*#__PURE__*/React.createElement("div", {
        className: videoWrapperClass,
        style: {
          backgroundColor: overlayColor,
          width: videoWidth
        }
      }, /*#__PURE__*/React.createElement("div", {
        className: "advgb-video-poster",
        style: {
          backgroundImage: "url(".concat(poster, ")")
        }
      }), /*#__PURE__*/React.createElement("div", {
        className: "advgb-button-wrapper",
        style: {
          height: videoHeight
        }
      }, /*#__PURE__*/React.createElement("div", {
        className: "advgb-play-button",
        style: {
          color: playButtonColor
        }
      }, /*#__PURE__*/React.createElement("svg", {
        xmlns: "http://www.w3.org/2000/svg",
        width: playButtonSize,
        height: playButtonSize,
        viewBox: "0 0 24 24"
      }, PLAY_BUTTON_STYLE[playButtonIcon])))));
    },
    deprecated: [{
      attributes: blockAttrs,
      save: function save(_ref5) {
        var attributes = _ref5.attributes;
        var videoURL = attributes.videoURL,
          videoSourceType = attributes.videoSourceType,
          videoTitle = attributes.videoTitle,
          videoFullWidth = attributes.videoFullWidth,
          videoWidth = attributes.videoWidth,
          useCustomHeight = attributes.useCustomHeight,
          videoHeight = attributes.videoHeight,
          playButtonIcon = attributes.playButtonIcon,
          playButtonSize = attributes.playButtonSize,
          playButtonColor = attributes.playButtonColor,
          overlayColor = attributes.overlayColor,
          poster = attributes.poster,
          openInLightbox = attributes.openInLightbox;
        var blockClassName = ['advgb-video-block', !!videoFullWidth && 'full-width', !!openInLightbox && !!videoURL && 'advgb-video-lightbox'].filter(Boolean).join(' ');
        var videoWrapperClass = ['advgb-video-wrapper', !!videoFullWidth && 'full-width', !openInLightbox && 'no-lightbox'].filter(Boolean).join(' ');
        return /*#__PURE__*/React.createElement("div", {
          className: blockClassName,
          "data-video": videoURL,
          "data-source": videoSourceType
        }, !openInLightbox && /*#__PURE__*/React.createElement("div", {
          className: videoWrapperClass
        }, (videoSourceType === 'youtube' || videoSourceType === 'vimeo') && /*#__PURE__*/React.createElement("iframe", {
          src: videoURL,
          width: videoWidth,
          height: useCustomHeight ? videoHeight : undefined,
          frameBorder: "0",
          allowFullScreen: true
        }) || videoSourceType === 'local' && /*#__PURE__*/React.createElement("video", {
          className: videoFullWidth && 'full-width',
          width: videoWidth,
          height: useCustomHeight ? videoHeight : undefined,
          poster: poster,
          controls: true
        }, /*#__PURE__*/React.createElement("source", {
          src: videoURL
        }), 'Your browser does not support HTML5 video.') || !videoSourceType && /*#__PURE__*/React.createElement("div", {
          style: {
            width: videoWidth,
            height: useCustomHeight ? videoHeight : undefined
          }
        })), !!openInLightbox && /*#__PURE__*/React.createElement("div", {
          className: videoWrapperClass,
          style: {
            backgroundColor: overlayColor,
            width: videoWidth
          }
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-video-poster",
          style: {
            backgroundImage: "url(".concat(poster, ")")
          }
        }), /*#__PURE__*/React.createElement("div", {
          className: "advgb-button-wrapper",
          style: {
            height: videoHeight
          }
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-play-button",
          style: {
            color: playButtonColor
          }
        }, /*#__PURE__*/React.createElement("svg", {
          xmlns: "http://www.w3.org/2000/svg",
          width: playButtonSize,
          height: playButtonSize,
          viewBox: "0 0 24 24"
        }, PLAY_BUTTON_STYLE[playButtonIcon])))));
      }
    }]
  });
})(wp.i18n, wp.blocks, wp.element, wp.blockEditor, wp.components);

/***/ },

/***/ "./assets/blocks/columns/block.jsx"
/*!*****************************************!*\
  !*** ./assets/blocks/columns/block.jsx ***!
  \*****************************************/
() {

function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
(function (wpI18n, wpBlocks, wpElement, wpBlockEditor, wpComponents, lodash) {
  wpBlockEditor = wp.blockEditor || wp.editor;
  var __ = wpI18n.__;
  var Component = wpElement.Component,
    Fragment = wpElement.Fragment;
  var registerBlockType = wpBlocks.registerBlockType;
  var _wpBlockEditor = wpBlockEditor,
    InspectorControls = _wpBlockEditor.InspectorControls,
    BlockControls = _wpBlockEditor.BlockControls,
    PanelColorSettings = _wpBlockEditor.PanelColorSettings,
    InnerBlocks = _wpBlockEditor.InnerBlocks;
  var PanelBody = wpComponents.PanelBody,
    RangeControl = wpComponents.RangeControl,
    SelectControl = wpComponents.SelectControl,
    ToggleControl = wpComponents.ToggleControl,
    Tooltip = wpComponents.Tooltip,
    ToolbarGroup = wpComponents.ToolbarGroup;
  var times = lodash.times;
  var _wp$data = wp.data,
    dispatch = _wp$data.dispatch,
    select = _wp$data.select;
  var COLUMNS_LAYOUTS = [{
    columns: 1,
    layout: '100',
    icon: '100',
    title: __('One column', 'advanced-gutenberg'),
    description: __('100', 'advanced-gutenberg')
  }, {
    columns: 2,
    layout: '12-12',
    icon: '12-12',
    title: __('Two columns; equal split', 'advanced-gutenberg'),
    description: __('50 / 50', 'advanced-gutenberg')
  }, {
    columns: 2,
    layout: '23-13',
    icon: '23-13',
    title: __('Two columns; two-thirds, one-third split', 'advanced-gutenberg'),
    description: __('66 / 33', 'advanced-gutenberg')
  }, {
    columns: 2,
    layout: '13-23',
    icon: '13-23',
    title: __('Two columns; one-third, two-thirds split', 'advanced-gutenberg'),
    description: __('33 / 66', 'advanced-gutenberg')
  }, {
    columns: 2,
    layout: '14-34',
    icon: '14-34',
    title: __('Two columns; one-quarter, three-quarters split', 'advanced-gutenberg'),
    description: __('25 / 75', 'advanced-gutenberg')
  }, {
    columns: 2,
    layout: '34-14',
    icon: '34-14',
    title: __('Two columns; three-quarters, one-quarter split', 'advanced-gutenberg'),
    description: __('75 / 25', 'advanced-gutenberg')
  }, {
    columns: 2,
    layout: '15-45',
    icon: '15-45',
    title: __('Two columns; one-fifth, four-fifths split', 'advanced-gutenberg'),
    description: __('20 / 80', 'advanced-gutenberg')
  }, {
    columns: 2,
    layout: '45-15',
    icon: '45-15',
    title: __('Two columns; four-fifths, one-fifth split', 'advanced-gutenberg'),
    description: __('80 / 20', 'advanced-gutenberg')
  }, {
    columns: 3,
    layout: '13-13-13',
    icon: '13-13-13',
    title: __('Three columns; equal split', 'advanced-gutenberg'),
    description: __('33 / 33 / 33', 'advanced-gutenberg')
  }, {
    columns: 3,
    layout: '12-14-14',
    icon: '12-14-14',
    title: __('Three columns; wider one-half left column', 'advanced-gutenberg'),
    description: __('50 / 25 / 25', 'advanced-gutenberg')
  }, {
    columns: 3,
    layout: '14-14-12',
    icon: '14-14-12',
    title: __('Three columns; wider one-half right column', 'advanced-gutenberg'),
    description: __('25 / 25 / 50', 'advanced-gutenberg')
  }, {
    columns: 3,
    layout: '14-12-14',
    icon: '14-12-14',
    title: __('Three columns; wider one-half center column', 'advanced-gutenberg'),
    description: __('25 / 50 / 25', 'advanced-gutenberg')
  }, {
    columns: 3,
    layout: '15-35-15',
    icon: '15-35-15',
    title: __('Three columns; wider three-fifths center column', 'advanced-gutenberg'),
    description: __('20 / 60 / 20', 'advanced-gutenberg')
  }, {
    columns: 3,
    layout: '35-15-15',
    icon: '35-15-15',
    title: __('Three columns; wider three-fifths left column', 'advanced-gutenberg'),
    description: __('60 / 20 / 20', 'advanced-gutenberg')
  }, {
    columns: 3,
    layout: '15-15-35',
    icon: '15-15-35',
    title: __('Three columns; wider three-fifths right column', 'advanced-gutenberg'),
    description: __('20 / 20 / 60', 'advanced-gutenberg')
  }, {
    columns: 3,
    layout: '16-46-16',
    icon: '16-46-16',
    title: __('Three columns; wider four-sixths center column', 'advanced-gutenberg'),
    description: __('16.6 / 66.6 / 16.6', 'advanced-gutenberg')
  }, {
    columns: 4,
    layout: '14-14-14-14',
    icon: '14-14-14-14',
    title: __('Four columns; equal split', 'advanced-gutenberg'),
    description: __('25 / 25 / 25 / 25', 'advanced-gutenberg')
  }, {
    columns: 4,
    layout: '36-16-16-16',
    icon: '36-16-16-16',
    title: __('Four columns; wider one-half left column', 'advanced-gutenberg'),
    description: __('50 / 16.6 / 16.6 / 16.6', 'advanced-gutenberg')
  }, {
    columns: 4,
    layout: '16-16-16-36',
    icon: '16-16-16-36',
    title: __('Four columns; wider one-half right column', 'advanced-gutenberg'),
    description: __('16.6 / 16.6 / 16.6 / 50', 'advanced-gutenberg')
  }, {
    columns: 4,
    layout: '15-15-15-25',
    icon: '15-15-15-25',
    title: __('Four columns; wider two-fifths right column', 'advanced-gutenberg'),
    description: __('20 / 20 / 20 / 40', 'advanced-gutenberg')
  }, {
    columns: 4,
    layout: '25-15-15-15',
    icon: '25-15-15-15',
    title: __('Four columns; wider two-fifths left column', 'advanced-gutenberg'),
    description: __('40 / 20 / 20 / 20', 'advanced-gutenberg')
  }, {
    columns: 5,
    layout: 'five',
    icon: '15-15-15-15-15',
    title: __('Five columns; equal split', 'advanced-gutenberg'),
    description: __('20 / 20 / 20 / 20 / 20', 'advanced-gutenberg')
  }, {
    columns: 6,
    layout: 'six',
    icon: '16-16-16-16-16-16',
    title: __('Six columns; equal split', 'advanced-gutenberg'),
    description: __('16.6 / 16.6 / 16.6 / 16.6 / 16.6 / 16.6', 'advanced-gutenberg')
  }];
  var COLUMNS_LAYOUTS_RESPONSIVE = [{
    columns: 3,
    layout: '1-12-12',
    icon: '100-12-12',
    title: __('Three: 100 - 1/2 - 1/2', 'advanced-gutenberg')
  }, {
    columns: 3,
    layout: '12-12-1',
    icon: '12-12-100',
    title: __('Three: 1/2 - 1/2 - 100', 'advanced-gutenberg')
  }, {
    columns: 4,
    layout: '12x4',
    icon: '12-12-12-12',
    title: __('Four: Two Columns', 'advanced-gutenberg')
  }, {
    columns: 6,
    layout: '12x6',
    icon: '12-12-12-12',
    title: __('Six: Two Columns', 'advanced-gutenberg')
  }, {
    columns: 6,
    layout: '13x6',
    icon: '13-13-13-13-13-13',
    title: __('Six: Three Columns', 'advanced-gutenberg')
  }];
  var COLUMNS_LAYOUTS_STACKED = {
    columns: 1,
    layout: 'stacked',
    icon: 'stacked',
    title: __('Stacked', 'advanced-gutenberg')
  };
  var GUTTER_OPTIONS = [{
    label: __('None', 'advanced-gutenberg'),
    value: 0
  }, {
    label: '10px',
    value: 10
  }, {
    label: '20px',
    value: 20
  }, {
    label: '30px',
    value: 30
  }, {
    label: '40px',
    value: 40
  }, {
    label: '50px',
    value: 50
  }, {
    label: '70px',
    value: 70
  }, {
    label: '90px',
    value: 90
  }];
  var previewImageData = 'data:image/png;base64, ';
  var AdvColumnsEdit = /*#__PURE__*/function (_Component) {
    function AdvColumnsEdit() {
      var _this;
      _classCallCheck(this, AdvColumnsEdit);
      _this = _callSuper(this, AdvColumnsEdit, arguments);
      _this.state = {
        tabSelected: 'desktop',
        isBlockIdSet: false // @since 3.2.3
      };
      return _this;
    }
    _inherits(AdvColumnsEdit, _Component);
    return _createClass(AdvColumnsEdit, [{
      key: "componentWillMount",
      value: function componentWillMount() {
        var _this$props = this.props,
          attributes = _this$props.attributes,
          setAttributes = _this$props.setAttributes;
        var currentBlockConfig = advgbDefaultConfig['advgb-columns'];

        // No override attributes of blocks inserted before
        if (attributes.changed !== true) {
          if (_typeof(currentBlockConfig) === 'object' && currentBlockConfig !== null) {
            Object.keys(currentBlockConfig).map(function (attribute) {
              if (typeof attributes[attribute] === 'boolean') {
                attributes[attribute] = !!currentBlockConfig[attribute];
              } else {
                attributes[attribute] = currentBlockConfig[attribute];
              }
            });
          }

          // Finally set changed attribute to true, so we don't modify anything again
          setAttributes({
            changed: true
          });
        }
      }
    }, {
      key: "componentDidMount",
      value: function componentDidMount() {}
    }, {
      key: "componentDidUpdate",
      value: function componentDidUpdate(prevProps) {
        var _prevProps$attributes = prevProps.attributes,
          prevLayout = _prevProps$attributes.columnsLayout,
          prevLayoutT = _prevProps$attributes.columnsLayoutT,
          prevLayoutM = _prevProps$attributes.columnsLayoutM;
        var _this$props2 = this.props,
          attributes = _this$props2.attributes,
          setAttributes = _this$props2.setAttributes,
          clientId = _this$props2.clientId;
        var columns = attributes.columns,
          columnsLayout = attributes.columnsLayout,
          columnsLayoutT = attributes.columnsLayoutT,
          columnsLayoutM = attributes.columnsLayoutM;
        var _ref = !wp.blockEditor ? select('core/editor') : select('core/block-editor'),
          getBlockOrder = _ref.getBlockOrder;
        var _ref2 = !wp.blockEditor ? dispatch('core/editor') : dispatch('core/block-editor'),
          updateBlockAttributes = _ref2.updateBlockAttributes;
        var childBlocks = getBlockOrder(clientId);
        var shouldUpdate = false;
        var classes = times(6, function () {
          return [];
        });
        var extraClassD = !!columnsLayoutT ? '-desktop' : '-tablet';
        var extraClassT = '-tablet';
        var extraClassM = '-mobile';

        // @since 3.2.3 - https://github.com/publishpress/PublishPress-Blocks/issues/1389
        if (!this.state.isBlockIdSet) {
          setAttributes({
            colId: 'advgb-cols-' + clientId
          });
          this.setState({
            isBlockIdSet: true
          });
        }
        if (prevLayout !== columnsLayout || prevLayoutT !== columnsLayoutT || prevLayoutM !== columnsLayoutM) {
          shouldUpdate = true;
          classes = AdvColumnsEdit.prepareColumnClass(columnsLayout, extraClassD, classes);
          classes = AdvColumnsEdit.prepareColumnClass(columnsLayoutT, extraClassT, classes);
          classes = AdvColumnsEdit.prepareColumnClass(columnsLayoutM, extraClassM, classes);
        }
        if (shouldUpdate) {
          classes = classes.map(function (cls) {
            return cls.filter(Boolean).join(' ');
          });
          classes.map(function (cls, idx) {
            return !!childBlocks[idx] && updateBlockAttributes(childBlocks[idx], {
              columnClasses: cls,
              width: 0
            });
          });
        }
      }
    }, {
      key: "translatableText",
      value: function translatableText(text) {
        switch (text) {
          case 'desktop':
            return __('desktop', 'advanced-gutenberg');
            // removed by dead control flow

          case 'tablet':
            return __('tablet', 'advanced-gutenberg');
            // removed by dead control flow

          case 'mobile':
            return __('mobile', 'advanced-gutenberg');
            // removed by dead control flow

        }
      }
    }, {
      key: "render",
      value: function render() {
        var _this2 = this;
        var _this$props3 = this.props,
          attributes = _this$props3.attributes,
          setAttributes = _this$props3.setAttributes,
          clientId = _this$props3.clientId,
          className = _this$props3.className;
        var tabSelected = this.state.tabSelected;
        var columns = attributes.columns,
          columnsLayout = attributes.columnsLayout,
          columnsLayoutT = attributes.columnsLayoutT,
          columnsLayoutM = attributes.columnsLayoutM,
          marginUnit = attributes.marginUnit,
          marginTop = attributes.marginTop,
          marginRight = attributes.marginRight,
          marginBottom = attributes.marginBottom,
          marginLeft = attributes.marginLeft,
          marginTopM = attributes.marginTopM,
          marginRightM = attributes.marginRightM,
          marginBottomM = attributes.marginBottomM,
          marginLeftM = attributes.marginLeftM,
          paddingUnit = attributes.paddingUnit,
          paddingTop = attributes.paddingTop,
          paddingRight = attributes.paddingRight,
          paddingBottom = attributes.paddingBottom,
          paddingLeft = attributes.paddingLeft,
          paddingTopM = attributes.paddingTopM,
          paddingRightM = attributes.paddingRightM,
          paddingBottomM = attributes.paddingBottomM,
          paddingLeftM = attributes.paddingLeftM,
          vAlign = attributes.vAlign,
          gutter = attributes.gutter,
          collapsedGutter = attributes.collapsedGutter,
          collapsedRtl = attributes.collapsedRtl,
          columnsWrapped = attributes.columnsWrapped,
          contentMaxWidth = attributes.contentMaxWidth,
          contentMaxWidthUnit = attributes.contentMaxWidthUnit,
          contentMinHeight = attributes.contentMinHeight,
          contentMinHeightUnit = attributes.contentMinHeightUnit,
          contentMaxHeight = attributes.contentMaxHeight,
          contentMaxHeightUnit = attributes.contentMaxHeightUnit,
          wrapperTag = attributes.wrapperTag,
          isPreview = attributes.isPreview;
        var blockClasses = ['advgb-columns', className, vAlign && "columns-valign-".concat(vAlign), columns && "advgb-columns-".concat(columns), columnsLayout && "layout-".concat(columnsLayout), columnsLayoutT && "tbl-layout-".concat(columnsLayoutT), columnsLayoutM && "mbl-layout-".concat(columnsLayoutM), !!gutter && "gutter-".concat(gutter), !!collapsedGutter && "vgutter-".concat(collapsedGutter), collapsedRtl && 'order-rtl', columnsWrapped && 'columns-wrapped'].filter(Boolean).join(' ');
        if (!columns) {
          return isPreview ? /*#__PURE__*/React.createElement("img", {
            alt: __('Columns Manager', 'advanced-gutenberg'),
            width: "100%",
            src: previewImageData
          }) : /*#__PURE__*/React.createElement("div", {
            className: "advgb-columns-select-wrapper"
          }, /*#__PURE__*/React.createElement("div", {
            className: "advgb-columns-select-title"
          }, __('Choose a columns layout', 'advanced-gutenberg')), /*#__PURE__*/React.createElement("div", {
            className: "advgb-columns-select-layout"
          }, COLUMNS_LAYOUTS.map(function (layout, index) {
            return /*#__PURE__*/React.createElement(Tooltip, {
              text: layout.title,
              key: index
            }, /*#__PURE__*/React.createElement("div", {
              className: "advgb-columns-layout",
              onClick: function onClick() {
                return setAttributes({
                  columns: layout.columns,
                  columnsLayout: layout.layout
                });
              }
            }, /*#__PURE__*/React.createElement("img", {
              src: advgbBlocks.pluginUrl + '/assets/blocks/columns/icons/' + layout.icon + '.png',
              alt: layout.layout
            }), /*#__PURE__*/React.createElement("div", {
              className: "advgb-columns-layout-description"
            }, layout.description)));
          })));
        }
        var COLUMNS_LAYOUTS_FILTERED = COLUMNS_LAYOUTS.filter(function (item) {
          return item.columns === columns;
        });
        var COLUMNS_LAYOUTS_RESPONSIVE_FILTERED = COLUMNS_LAYOUTS_RESPONSIVE.filter(function (item) {
          return item.columns === columns;
        });
        COLUMNS_LAYOUTS_RESPONSIVE_FILTERED.push(COLUMNS_LAYOUTS_STACKED);
        var VERT_ALIGNMENT_CONTROLS = [{
          icon: /*#__PURE__*/React.createElement("svg", {
            xmlns: "http://www.w3.org/2000/svg",
            width: "20",
            height: "20",
            viewBox: "0 0 24 24"
          }, /*#__PURE__*/React.createElement("path", {
            d: "M8 11h3v10h2V11h3l-4-4-4 4zM4 3v2h16V3H4z"
          }), /*#__PURE__*/React.createElement("path", {
            d: "M0 0h24v24H0z",
            fill: "none"
          })),
          title: __('Vertical Align Top', 'advanced-gutenberg'),
          isActive: vAlign === 'top',
          onClick: function onClick() {
            return setAttributes({
              vAlign: 'top'
            });
          }
        }, {
          icon: /*#__PURE__*/React.createElement("svg", {
            xmlns: "http://www.w3.org/2000/svg",
            width: "20",
            height: "20",
            viewBox: "0 0 24 24"
          }, /*#__PURE__*/React.createElement("path", {
            d: "M8 19h3v4h2v-4h3l-4-4-4 4zm8-14h-3V1h-2v4H8l4 4 4-4zM4 11v2h16v-2H4z"
          }), /*#__PURE__*/React.createElement("path", {
            d: "M0 0h24v24H0z",
            fill: "none"
          })),
          title: __('Vertical Align Middle', 'advanced-gutenberg'),
          isActive: vAlign === 'middle',
          onClick: function onClick() {
            return setAttributes({
              vAlign: 'middle'
            });
          }
        }, {
          icon: /*#__PURE__*/React.createElement("svg", {
            xmlns: "http://www.w3.org/2000/svg",
            width: "20",
            height: "20",
            viewBox: "0 0 24 24"
          }, /*#__PURE__*/React.createElement("path", {
            d: "M16 13h-3V3h-2v10H8l4 4 4-4zM4 19v2h16v-2H4z"
          }), /*#__PURE__*/React.createElement("path", {
            d: "M0 0h24v24H0z",
            fill: "none"
          })),
          title: __('Vertical Align Bottom', 'advanced-gutenberg'),
          isActive: vAlign === 'bottom',
          onClick: function onClick() {
            return setAttributes({
              vAlign: 'bottom'
            });
          }
        }, {
          icon: /*#__PURE__*/React.createElement("svg", {
            xmlns: "http://www.w3.org/2000/svg",
            width: "20",
            height: "20",
            viewBox: "0 0 12 32"
          }, /*#__PURE__*/React.createElement("polygon", {
            points: "8,20 8,26 12,26 6,32 0,26 4,26 4,20"
          }), /*#__PURE__*/React.createElement("polygon", {
            points: "4,12 4,6 0,6 6,0 12,6 8,6 8,12"
          })),
          title: __('Inner Columns Full Height', 'advanced-gutenberg'),
          isActive: vAlign === 'full',
          onClick: function onClick() {
            return setAttributes({
              vAlign: 'full'
            });
          }
        }];
        var MARGIN_PADDING_CONTROLS = [{
          label: 'Top',
          icon: 'arrow-up-alt2'
        }, {
          label: 'Right',
          icon: 'arrow-right-alt2'
        }, {
          label: 'Bottom',
          icon: 'arrow-down-alt2'
        }, {
          label: 'Left',
          icon: 'arrow-left-alt2'
        }];
        var deviceLetter = '';
        if (tabSelected === 'tablet') deviceLetter = 'T';
        if (tabSelected === 'mobile') deviceLetter = 'M';
        return isPreview ? /*#__PURE__*/React.createElement("img", {
          alt: __('Columns Manager ', 'advanced-gutenberg'),
          width: "100%",
          src: previewImageData
        }) : /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(BlockControls, null, /*#__PURE__*/React.createElement(ToolbarGroup, {
          controls: VERT_ALIGNMENT_CONTROLS
        })), /*#__PURE__*/React.createElement(InspectorControls, null, /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Columns Settings', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Responsive Settings', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-columns-responsive-items"
        }, ['desktop', 'tablet', 'mobile'].map(function (device, index) {
          var itemClasses = ["advgb-columns-responsive-item", tabSelected === device && 'is-selected'].filter(Boolean).join(' ');
          return /*#__PURE__*/React.createElement("div", {
            className: itemClasses,
            key: index,
            onClick: function onClick() {
              return _this2.setState({
                tabSelected: device
              });
            }
          }, _this2.translatableText(device));
        })), /*#__PURE__*/React.createElement("div", {
          className: "advgb-columns-select-layout on-inspector"
        }, COLUMNS_LAYOUTS_FILTERED.map(function (layout, index) {
          var layoutClasses = ['advgb-columns-layout', tabSelected === 'desktop' && layout.layout === columnsLayout && 'is-selected', tabSelected === 'tablet' && layout.layout === columnsLayoutT && 'is-selected', tabSelected === 'mobile' && layout.layout === columnsLayoutM && 'is-selected'].filter(Boolean).join(' ');
          return /*#__PURE__*/React.createElement(Tooltip, {
            text: layout.title,
            key: index
          }, /*#__PURE__*/React.createElement("div", {
            className: layoutClasses,
            onClick: function onClick() {
              setAttributes(_defineProperty({}, 'columnsLayout' + deviceLetter, layout.layout));
              _this2.setState({
                random: Math.random()
              });
            }
          }, /*#__PURE__*/React.createElement("img", {
            src: advgbBlocks.pluginUrl + '/assets/blocks/columns/icons/' + layout.icon + '.png',
            alt: layout.layout
          })));
        }), tabSelected !== 'desktop' && COLUMNS_LAYOUTS_RESPONSIVE_FILTERED.map(function (layout, index) {
          var layoutClasses = ['advgb-columns-layout', tabSelected === 'tablet' && layout.layout === columnsLayoutT && 'is-selected', tabSelected === 'mobile' && layout.layout === columnsLayoutM && 'is-selected'].filter(Boolean).join(' ');
          return /*#__PURE__*/React.createElement(Tooltip, {
            text: layout.title,
            key: index
          }, /*#__PURE__*/React.createElement("div", {
            className: layoutClasses,
            onClick: function onClick() {
              setAttributes(_defineProperty({}, 'columnsLayout' + deviceLetter, layout.layout));
              _this2.setState({
                random: Math.random()
              });
            }
          }, /*#__PURE__*/React.createElement("img", {
            src: advgbBlocks.pluginUrl + '/assets/blocks/columns/icons/' + layout.icon + '.png',
            alt: layout.layout
          })));
        })), tabSelected === 'desktop' && /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Space between columns', 'advanced-gutenberg'),
          value: gutter,
          options: GUTTER_OPTIONS,
          onChange: function onChange(value) {
            return setAttributes({
              gutter: parseInt(value)
            });
          }
        }), tabSelected === 'mobile' && columnsLayoutM === 'stacked' && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Vertical space when collapsed', 'advanced-gutenberg'),
          value: collapsedGutter,
          options: GUTTER_OPTIONS,
          onChange: function onChange(value) {
            return setAttributes({
              collapsedGutter: parseInt(value)
            });
          }
        }), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Collapsed Order RTL', 'advanced-gutenberg'),
          checked: collapsedRtl,
          onChange: function onChange() {
            return setAttributes({
              collapsedRtl: !collapsedRtl
            });
          }
        })), /*#__PURE__*/React.createElement(PanelBody, {
          title: tabSelected !== 'desktop' ? AdvColumnsEdit.jsUcfirst(tabSelected) + __(' Padding', 'advanced-gutenberg') : __('Padding', 'advanced-gutenberg'),
          initialOpen: false
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-controls-title"
        }, /*#__PURE__*/React.createElement("span", null, __('Unit', 'advanced-gutenberg')), /*#__PURE__*/React.createElement("div", {
          className: "advgb-unit-wrapper",
          key: "unit"
        }, ['px', 'em', 'vh', '%'].map(function (unit, idx) {
          return /*#__PURE__*/React.createElement("span", {
            className: "advgb-unit ".concat(paddingUnit === unit ? 'selected' : ''),
            key: idx,
            onClick: function onClick() {
              return setAttributes({
                paddingUnit: unit
              });
            }
          }, unit);
        }))), MARGIN_PADDING_CONTROLS.map(function (pos, idx) {
          return /*#__PURE__*/React.createElement(RangeControl, {
            key: idx,
            beforeIcon: pos.icon,
            value: attributes['padding' + pos.label + deviceLetter] || 0,
            min: 0,
            max: 200,
            onChange: function onChange(value) {
              return setAttributes(_defineProperty({}, 'padding' + pos.label + deviceLetter, value));
            }
          });
        })), /*#__PURE__*/React.createElement(PanelBody, {
          title: tabSelected !== 'desktop' ? AdvColumnsEdit.jsUcfirst(tabSelected) + __(' Margin', 'advanced-gutenberg') : __('Margin', 'advanced-gutenberg'),
          initialOpen: false
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-controls-title"
        }, /*#__PURE__*/React.createElement("span", null, __('Unit', 'advanced-gutenberg')), /*#__PURE__*/React.createElement("div", {
          className: "advgb-unit-wrapper",
          key: "unit"
        }, ['px', 'em', 'vh', '%'].map(function (unit, idx) {
          return /*#__PURE__*/React.createElement("span", {
            className: "advgb-unit ".concat(marginUnit === unit ? 'selected' : ''),
            key: idx,
            onClick: function onClick() {
              return setAttributes({
                marginUnit: unit
              });
            }
          }, unit);
        }))), MARGIN_PADDING_CONTROLS.map(function (pos, idx) {
          return /*#__PURE__*/React.createElement(RangeControl, {
            key: idx,
            beforeIcon: pos.icon,
            value: attributes['margin' + pos.label + deviceLetter] || 0,
            min: 0,
            max: 200,
            onChange: function onChange(value) {
              return setAttributes(_defineProperty({}, 'margin' + pos.label + deviceLetter, value));
            }
          });
        }))), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Row Settings', 'advanced-gutenberg'),
          initialOpen: false
        }, /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Columns Wrapped', 'advanced-gutenberg'),
          help: __('If your columns overflow they available space, they will be placed on a new line.', 'advanced-gutenberg'),
          checked: columnsWrapped,
          onChange: function onChange() {
            return setAttributes({
              columnsWrapped: !columnsWrapped
            });
          }
        }), /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Wrapper Tag', 'advanced-gutenberg'),
          value: wrapperTag,
          options: [{
            label: 'Div',
            value: 'div'
          }, {
            label: 'Header',
            value: 'header'
          }, {
            label: 'Section',
            value: 'section'
          }, {
            label: 'Main',
            value: 'main'
          }, {
            label: 'Article',
            value: 'article'
          }, {
            label: 'Aside',
            value: 'aside'
          }, {
            label: 'Footer',
            value: 'footer'
          }],
          onChange: function onChange(value) {
            return setAttributes({
              wrapperTag: value
            });
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: [__('Content Max Width', 'advanced-gutenberg'), /*#__PURE__*/React.createElement("div", {
            className: "advgb-unit-wrapper",
            key: "unit"
          }, ['px', 'vw', '%'].map(function (unit, idx) {
            return /*#__PURE__*/React.createElement("span", {
              className: "advgb-unit ".concat(contentMaxWidthUnit === unit ? 'selected' : ''),
              key: idx,
              onClick: function onClick() {
                return setAttributes({
                  contentMaxWidthUnit: unit
                });
              }
            }, unit);
          }))],
          value: contentMaxWidth,
          min: 0,
          max: contentMaxWidthUnit === 'px' ? 2000 : 100,
          onChange: function onChange(value) {
            return setAttributes({
              contentMaxWidth: value
            });
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: [__('Content Min Height', 'advanced-gutenberg'), /*#__PURE__*/React.createElement("div", {
            className: "advgb-unit-wrapper",
            key: "unit"
          }, ['px', 'vw', 'vh'].map(function (unit, idx) {
            return /*#__PURE__*/React.createElement("span", {
              className: "advgb-unit ".concat(contentMinHeightUnit === unit ? 'selected' : ''),
              key: idx,
              onClick: function onClick() {
                return setAttributes({
                  contentMinHeightUnit: unit
                });
              }
            }, unit);
          }))],
          value: contentMinHeight,
          min: 0,
          max: contentMinHeightUnit === 'px' ? 2000 : 200,
          onChange: function onChange(value) {
            return setAttributes({
              contentMinHeight: value
            });
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: [__('Content Max Height', 'advanced-gutenberg'), /*#__PURE__*/React.createElement("div", {
            className: "advgb-unit-wrapper",
            key: "unit"
          }, ['px', 'vw', 'vh'].map(function (unit, idx) {
            return /*#__PURE__*/React.createElement("span", {
              className: "advgb-unit ".concat(contentMaxHeightUnit === unit ? 'selected' : ''),
              key: idx,
              onClick: function onClick() {
                return setAttributes({
                  contentMaxHeightUnit: unit
                });
              }
            }, unit);
          }))],
          value: contentMaxHeight,
          min: 0,
          max: contentMaxHeightUnit === 'px' ? 2000 : 200,
          onChange: function onChange(value) {
            return setAttributes({
              contentMaxHeight: value
            });
          }
        })))), /*#__PURE__*/React.createElement("span", {
          className: "advgb-columns-spacing"
        }, "\xA0"), /*#__PURE__*/React.createElement("div", {
          className: "advgb-columns-wrapper"
        }, /*#__PURE__*/React.createElement("div", {
          className: blockClasses,
          style: {
            maxWidth: !!contentMaxWidth ? "".concat(contentMaxWidth).concat(contentMaxWidthUnit) : undefined,
            minHeight: !!contentMinHeight ? "".concat(contentMinHeight).concat(contentMinHeightUnit) : undefined,
            maxHeight: !!contentMaxHeight ? "".concat(contentMaxHeight).concat(contentMaxHeightUnit) : undefined
          }
        }, /*#__PURE__*/React.createElement(InnerBlocks, {
          template: times(parseInt(columns), function () {
            return ['advgb/column'];
          }),
          templateLock: "all",
          allowedBlocks: ['advgb/column'],
          random: this.state.random
        }))), /*#__PURE__*/React.createElement("style", null, "#block-".concat(clientId, " .advgb-columns-wrapper .advgb-columns {\n                            margin-top: ").concat(marginTop + marginUnit, ";\n                            margin-right: ").concat(marginRight + marginUnit, ";\n                            margin-bottom: ").concat(marginBottom + marginUnit, ";\n                            margin-left: ").concat(marginLeft + marginUnit, ";\n                            padding-top: ").concat(paddingTop + paddingUnit, ";\n                            padding-right: ").concat(paddingRight + paddingUnit, ";\n                            padding-bottom: ").concat(paddingBottom + paddingUnit, ";\n                            padding-left: ").concat(paddingLeft + paddingUnit, ";\n                        }\n                        @media screen and (max-width: 767px) {\n                            #block-").concat(clientId, " .advgb-columns-wrapper .advgb-columns {\n                                margin-top: ").concat(marginTopM + marginUnit, ";\n                                margin-right: ").concat(marginRightM + marginUnit, ";\n                                margin-bottom: ").concat(marginBottomM + marginUnit, ";\n                                margin-left: ").concat(marginLeftM + marginUnit, ";\n                                padding-top: ").concat(paddingTopM + paddingUnit, ";\n                                padding-right: ").concat(paddingRightM + paddingUnit, ";\n                                padding-bottom: ").concat(paddingBottomM + paddingUnit, ";\n                                padding-left: ").concat(paddingLeftM + paddingUnit, ";\n                            }\n                        }")));
      }
    }], [{
      key: "prepareColumnClass",
      value: function prepareColumnClass(layout, extraClass, classObj) {
        switch (layout) {
          case '12-12':
            for (var i = 0; i < 2; i++) {
              classObj[i].push('advgb-is-half' + extraClass);
            }
            break;
          case '13-13-13':
            for (var _i = 0; _i < 3; _i++) {
              classObj[_i].push('advgb-is-one-third' + extraClass);
            }
            break;
          case '14-14-14-14':
            for (var _i2 = 0; _i2 < 4; _i2++) {
              classObj[_i2].push('advgb-is-one-quarter' + extraClass);
            }
            break;
          case 'five':
            for (var _i3 = 0; _i3 < 5; _i3++) {
              classObj[_i3].push('advgb-is-one-fifth' + extraClass);
            }
            break;
          case 'six':
            for (var _i4 = 0; _i4 < 6; _i4++) {
              classObj[_i4].push('advgb-is-2' + extraClass);
            }
            break;
          case '23-13':
            classObj[0].push('advgb-is-two-thirds' + extraClass);
            classObj[1].push('advgb-is-one-third' + extraClass);
            break;
          case '13-23':
            classObj[0].push('advgb-is-one-third' + extraClass);
            classObj[1].push('advgb-is-two-thirds' + extraClass);
            break;
          case '34-14':
            classObj[0].push('advgb-is-three-quarters' + extraClass);
            classObj[1].push('advgb-is-one-quarter' + extraClass);
            break;
          case '14-34':
            classObj[0].push('advgb-is-one-quarter' + extraClass);
            classObj[1].push('advgb-is-three-quarters' + extraClass);
            break;
          case '45-15':
            classObj[0].push('advgb-is-four-fifths' + extraClass);
            classObj[1].push('advgb-is-one-fifth' + extraClass);
            break;
          case '15-45':
            classObj[0].push('advgb-is-one-fifth' + extraClass);
            classObj[1].push('advgb-is-four-fifths' + extraClass);
            break;
          case '12-14-14':
            classObj[0].push('advgb-is-half' + extraClass);
            classObj[1].push('advgb-is-one-quarter' + extraClass);
            classObj[2].push('advgb-is-one-quarter' + extraClass);
            break;
          case '14-14-12':
            classObj[0].push('advgb-is-one-quarter' + extraClass);
            classObj[1].push('advgb-is-one-quarter' + extraClass);
            classObj[2].push('advgb-is-half' + extraClass);
            break;
          case '14-12-14':
            classObj[0].push('advgb-is-one-quarter' + extraClass);
            classObj[1].push('advgb-is-half' + extraClass);
            classObj[2].push('advgb-is-one-quarter' + extraClass);
            break;
          case '15-35-15':
            classObj[0].push('advgb-is-one-fifth' + extraClass);
            classObj[1].push('advgb-is-three-fifths' + extraClass);
            classObj[2].push('advgb-is-one-fifth' + extraClass);
            break;
          case '35-15-15':
            classObj[0].push('advgb-is-three-fifths' + extraClass);
            classObj[1].push('advgb-is-one-fifth' + extraClass);
            classObj[2].push('advgb-is-one-fifth' + extraClass);
            break;
          case '15-15-35':
            classObj[0].push('advgb-is-one-fifth' + extraClass);
            classObj[1].push('advgb-is-one-fifth' + extraClass);
            classObj[2].push('advgb-is-three-fifths' + extraClass);
            break;
          case '16-46-16':
            classObj[0].push('advgb-is-2' + extraClass);
            classObj[1].push('advgb-is-8' + extraClass);
            classObj[2].push('advgb-is-2' + extraClass);
            break;
          case '1-12-12':
            classObj[0].push('advgb-is-full' + extraClass);
            classObj[1].push('advgb-is-half' + extraClass);
            classObj[2].push('advgb-is-half' + extraClass);
            break;
          case '12-12-1':
            classObj[0].push('advgb-is-half' + extraClass);
            classObj[1].push('advgb-is-half' + extraClass);
            classObj[2].push('advgb-is-full' + extraClass);
            break;
          case '36-16-16-16':
            classObj[0].push('advgb-is-half' + extraClass);
            classObj[1].push('advgb-is-2' + extraClass);
            classObj[2].push('advgb-is-2' + extraClass);
            classObj[3].push('advgb-is-2' + extraClass);
            break;
          case '16-16-16-36':
            classObj[0].push('advgb-is-2' + extraClass);
            classObj[1].push('advgb-is-2' + extraClass);
            classObj[2].push('advgb-is-2' + extraClass);
            classObj[3].push('advgb-is-half' + extraClass);
            break;
          case '25-15-15-15':
            classObj[0].push('advgb-is-two-fifths' + extraClass);
            classObj[1].push('advgb-is-one-fifth' + extraClass);
            classObj[2].push('advgb-is-one-fifth' + extraClass);
            classObj[3].push('advgb-is-one-fifth' + extraClass);
            break;
          case '15-15-15-25':
            classObj[0].push('advgb-is-one-fifth' + extraClass);
            classObj[1].push('advgb-is-one-fifth' + extraClass);
            classObj[2].push('advgb-is-one-fifth' + extraClass);
            classObj[3].push('advgb-is-two-fifths' + extraClass);
            break;
          case '12x4':
            for (var _i5 = 0; _i5 < 4; _i5++) {
              classObj[_i5].push('advgb-is-half' + extraClass);
            }
            break;
          case '12x6':
            for (var _i6 = 0; _i6 < 6; _i6++) {
              classObj[_i6].push('advgb-is-half' + extraClass);
            }
            break;
          case '13x6':
            for (var _i7 = 0; _i7 < 6; _i7++) {
              classObj[_i7].push('advgb-is-one-third' + extraClass);
            }
            break;
          case 'stacked':
            for (var _i8 = 0; _i8 < 6; _i8++) {
              classObj[_i8].push('advgb-is-full' + extraClass);
            }
            break;
          default:
            break;
        }
        return classObj;
      }
    }, {
      key: "jsUcfirst",
      value: function jsUcfirst(string) {
        return string.charAt(0).toUpperCase() + string.slice(1);
      }
    }]);
  }(Component);
  var blockAttrs = {
    columns: {
      type: 'number'
    },
    columnsLayout: {
      type: 'string'
    },
    columnsLayoutT: {
      type: 'string'
    },
    columnsLayoutM: {
      type: 'string',
      default: 'stacked'
    },
    marginTop: {
      type: 'number'
    },
    marginTopT: {
      type: 'number'
    },
    marginTopM: {
      type: 'number'
    },
    marginRight: {
      type: 'number'
    },
    marginRightT: {
      type: 'number'
    },
    marginRightM: {
      type: 'number'
    },
    marginBottom: {
      type: 'number'
    },
    marginBottomT: {
      type: 'number'
    },
    marginBottomM: {
      type: 'number'
    },
    marginLeft: {
      type: 'number'
    },
    marginLeftT: {
      type: 'number'
    },
    marginLeftM: {
      type: 'number'
    },
    marginUnit: {
      type: 'string',
      default: 'px'
    },
    paddingTop: {
      type: 'number'
    },
    paddingTopT: {
      type: 'number'
    },
    paddingTopM: {
      type: 'number'
    },
    paddingRight: {
      type: 'number'
    },
    paddingRightT: {
      type: 'number'
    },
    paddingRightM: {
      type: 'number'
    },
    paddingBottom: {
      type: 'number'
    },
    paddingBottomT: {
      type: 'number'
    },
    paddingBottomM: {
      type: 'number'
    },
    paddingLeft: {
      type: 'number'
    },
    paddingLeftT: {
      type: 'number'
    },
    paddingLeftM: {
      type: 'number'
    },
    paddingUnit: {
      type: 'string',
      default: 'px'
    },
    gutter: {
      type: 'number',
      default: 0
    },
    collapsedGutter: {
      type: 'number',
      default: 10
    },
    collapsedRtl: {
      type: 'boolean',
      default: false
    },
    vAlign: {
      type: 'string'
    },
    columnsWrapped: {
      type: 'boolean',
      default: false
    },
    contentMaxWidth: {
      type: 'number'
    },
    contentMaxWidthUnit: {
      type: 'string',
      default: 'px'
    },
    contentMinHeight: {
      type: 'number'
    },
    contentMinHeightUnit: {
      type: 'string',
      default: 'px'
    },
    contentMaxHeight: {
      type: 'number'
    },
    contentMaxHeightUnit: {
      type: 'string',
      default: 'px'
    },
    wrapperTag: {
      type: 'string',
      default: 'div'
    },
    colId: {
      type: 'string'
    },
    changed: {
      type: 'boolean',
      default: false
    },
    isPreview: {
      type: 'boolean',
      default: false
    }
  };
  var legacyClassBasedAttrs = _objectSpread(_objectSpread({}, blockAttrs), {}, {
    legacyWrapperClassName: {
      type: 'string',
      source: 'attribute',
      selector: '.wp-block-advgb-columns',
      attribute: 'class'
    },
    legacyWrapperId: {
      type: 'string',
      source: 'attribute',
      selector: '.wp-block-advgb-columns',
      attribute: 'id'
    },
    legacyColumnsClassName: {
      type: 'string',
      source: 'attribute',
      selector: '.advgb-columns',
      attribute: 'class'
    }
  });
  var parseLegacyClassToken = function parseLegacyClassToken(className, tokenPattern) {
    if (typeof className !== 'string' || !className.length) {
      return undefined;
    }
    var match = className.match(tokenPattern);
    if (!match || typeof match[1] === 'undefined') {
      return undefined;
    }
    return match[1];
  };
  var parseLegacyClassTokenNumber = function parseLegacyClassTokenNumber(className, tokenPattern) {
    var parsedToken = parseLegacyClassToken(className, tokenPattern);
    if (typeof parsedToken === 'undefined') {
      return undefined;
    }
    var parsedNumber = parseInt(parsedToken, 10);
    return Number.isNaN(parsedNumber) ? undefined : parsedNumber;
  };
  var resolveLegacyColumnsAttributes = function resolveLegacyColumnsAttributes(attributes) {
    var legacyColumnsClassName = attributes.legacyColumnsClassName || '';
    return {
      columns: attributes.columns || parseLegacyClassTokenNumber(legacyColumnsClassName, /\badvgb-columns-(\d+)\b/),
      columnsLayout: attributes.columnsLayout || parseLegacyClassToken(legacyColumnsClassName, /\blayout-([^\s]+)\b/),
      columnsLayoutT: attributes.columnsLayoutT || parseLegacyClassToken(legacyColumnsClassName, /\btbl-layout-([^\s]+)\b/),
      columnsLayoutM: attributes.columnsLayoutM || parseLegacyClassToken(legacyColumnsClassName, /\bmbl-layout-([^\s]+)\b/),
      vAlign: attributes.vAlign || parseLegacyClassToken(legacyColumnsClassName, /\bcolumns-valign-([^\s]+)\b/),
      gutter: typeof attributes.gutter === 'number' && attributes.gutter > 0 ? attributes.gutter : parseLegacyClassTokenNumber(legacyColumnsClassName, /\bgutter-(\d+)\b/),
      collapsedGutter: typeof attributes.collapsedGutter === 'number' && attributes.collapsedGutter > 0 ? attributes.collapsedGutter : parseLegacyClassTokenNumber(legacyColumnsClassName, /\bvgutter-(\d+)\b/),
      collapsedRtl: attributes.collapsedRtl || /\border-rtl\b/.test(legacyColumnsClassName),
      columnsWrapped: attributes.columnsWrapped || /\bcolumns-wrapped\b/.test(legacyColumnsClassName),
      colId: attributes.colId || attributes.legacyWrapperId
    };
  };
  registerBlockType('advgb/columns', {
    apiVersion: 3,
    title: __('Columns - PublishPress', 'advanced-gutenberg'),
    description: __('Create flexible layouts for your content with advanced options and styles.', 'advanced-gutenberg'),
    icon: {
      src: 'layout',
      foreground: typeof advgbBlocks !== 'undefined' ? advgbBlocks.color : undefined
    },
    category: 'advgb-category',
    keywords: [__('columns', 'advanced-gutenberg'), __('columns manager', 'advanced-gutenberg'), __('row', 'advanced-gutenberg'), __('layout', 'advanced-gutenberg')],
    supports: {
      align: ['wide', 'full'],
      html: false
    },
    attributes: blockAttrs,
    example: {
      attributes: {
        isPreview: true
      }
    },
    edit: AdvColumnsEdit,
    save: function save(_ref3) {
      var attributes = _ref3.attributes;
      var columns = attributes.columns,
        columnsLayout = attributes.columnsLayout,
        columnsLayoutT = attributes.columnsLayoutT,
        columnsLayoutM = attributes.columnsLayoutM,
        vAlign = attributes.vAlign,
        gutter = attributes.gutter,
        collapsedGutter = attributes.collapsedGutter,
        collapsedRtl = attributes.collapsedRtl,
        columnsWrapped = attributes.columnsWrapped,
        contentMaxWidth = attributes.contentMaxWidth,
        contentMaxWidthUnit = attributes.contentMaxWidthUnit,
        contentMinHeight = attributes.contentMinHeight,
        contentMinHeightUnit = attributes.contentMinHeightUnit,
        contentMaxHeight = attributes.contentMaxHeight,
        contentMaxHeightUnit = attributes.contentMaxHeightUnit,
        wrapperTag = attributes.wrapperTag,
        colId = attributes.colId;
      var Tag = wrapperTag;
      var blockClasses = ['advgb-columns', 'advgb-columns-row', 'advgb-is-mobile', vAlign && "columns-valign-".concat(vAlign), columns && "advgb-columns-".concat(columns), columnsLayout && "layout-".concat(columnsLayout), columnsLayoutT && "tbl-layout-".concat(columnsLayoutT), columnsLayoutM && "mbl-layout-".concat(columnsLayoutM), !!gutter && "gutter-".concat(gutter), !!collapsedGutter && "vgutter-".concat(collapsedGutter), collapsedRtl && 'order-rtl', columnsWrapped && 'columns-wrapped'].filter(Boolean).join(' ');
      return /*#__PURE__*/React.createElement(Tag, {
        className: "advgb-columns-wrapper",
        id: colId
      }, /*#__PURE__*/React.createElement("div", {
        className: "advgb-columns-container"
      }, /*#__PURE__*/React.createElement("div", {
        className: blockClasses,
        style: {
          maxWidth: !!contentMaxWidth ? "".concat(contentMaxWidth).concat(contentMaxWidthUnit) : undefined,
          minHeight: !!contentMinHeight ? "".concat(contentMinHeight).concat(contentMinHeightUnit) : undefined,
          maxHeight: !!contentMaxHeight ? "".concat(contentMaxHeight).concat(contentMaxHeightUnit) : undefined
        }
      }, /*#__PURE__*/React.createElement(InnerBlocks.Content, null))));
    },
    deprecated: [{
      attributes: legacyClassBasedAttrs,
      migrate: function migrate(attributes, innerBlocks) {
        var migratedAttributes = _objectSpread(_objectSpread({}, attributes), resolveLegacyColumnsAttributes(attributes));
        delete migratedAttributes.legacyWrapperClassName;
        delete migratedAttributes.legacyWrapperId;
        delete migratedAttributes.legacyColumnsClassName;
        return [migratedAttributes, innerBlocks];
      },
      save: function save(_ref4) {
        var attributes = _ref4.attributes;
        var contentMaxWidth = attributes.contentMaxWidth,
          contentMaxWidthUnit = attributes.contentMaxWidthUnit,
          contentMinHeight = attributes.contentMinHeight,
          contentMinHeightUnit = attributes.contentMinHeightUnit,
          contentMaxHeight = attributes.contentMaxHeight,
          contentMaxHeightUnit = attributes.contentMaxHeightUnit,
          wrapperTag = attributes.wrapperTag,
          legacyWrapperClassName = attributes.legacyWrapperClassName,
          legacyColumnsClassName = attributes.legacyColumnsClassName;
        var _resolveLegacyColumns = resolveLegacyColumnsAttributes(attributes),
          columns = _resolveLegacyColumns.columns,
          columnsLayout = _resolveLegacyColumns.columnsLayout,
          columnsLayoutT = _resolveLegacyColumns.columnsLayoutT,
          columnsLayoutM = _resolveLegacyColumns.columnsLayoutM,
          vAlign = _resolveLegacyColumns.vAlign,
          gutter = _resolveLegacyColumns.gutter,
          collapsedGutter = _resolveLegacyColumns.collapsedGutter,
          collapsedRtl = _resolveLegacyColumns.collapsedRtl,
          columnsWrapped = _resolveLegacyColumns.columnsWrapped,
          colId = _resolveLegacyColumns.colId;
        var Tag = wrapperTag || 'div';
        var blockClasses = legacyColumnsClassName || ['advgb-columns', 'advgb-columns-row', 'advgb-is-mobile', vAlign && "columns-valign-".concat(vAlign), columns && "advgb-columns-".concat(columns), columnsLayout && "layout-".concat(columnsLayout), columnsLayoutT && "tbl-layout-".concat(columnsLayoutT), columnsLayoutM && "mbl-layout-".concat(columnsLayoutM), !!gutter && "gutter-".concat(gutter), !!collapsedGutter && "vgutter-".concat(collapsedGutter), collapsedRtl && 'order-rtl', columnsWrapped && 'columns-wrapped'].filter(Boolean).join(' ');
        return /*#__PURE__*/React.createElement(Tag, {
          className: legacyWrapperClassName || 'wp-block-advgb-columns advgb-columns-wrapper',
          id: colId
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-columns-container"
        }, /*#__PURE__*/React.createElement("div", {
          className: blockClasses,
          style: {
            maxWidth: !!contentMaxWidth ? "".concat(contentMaxWidth).concat(contentMaxWidthUnit) : undefined,
            minHeight: !!contentMinHeight ? "".concat(contentMinHeight).concat(contentMinHeightUnit) : undefined,
            maxHeight: !!contentMaxHeight ? "".concat(contentMaxHeight).concat(contentMaxHeightUnit) : undefined
          }
        }, /*#__PURE__*/React.createElement(InnerBlocks.Content, null))));
      }
    }, {
      attributes: blockAttrs,
      save: function save(_ref5) {
        var attributes = _ref5.attributes;
        var columns = attributes.columns,
          columnsLayout = attributes.columnsLayout,
          columnsLayoutT = attributes.columnsLayoutT,
          columnsLayoutM = attributes.columnsLayoutM,
          vAlign = attributes.vAlign,
          gutter = attributes.gutter,
          collapsedGutter = attributes.collapsedGutter,
          collapsedRtl = attributes.collapsedRtl,
          columnsWrapped = attributes.columnsWrapped,
          contentMaxWidth = attributes.contentMaxWidth,
          contentMaxWidthUnit = attributes.contentMaxWidthUnit,
          contentMinHeight = attributes.contentMinHeight,
          contentMinHeightUnit = attributes.contentMinHeightUnit,
          contentMaxHeight = attributes.contentMaxHeight,
          contentMaxHeightUnit = attributes.contentMaxHeightUnit,
          wrapperTag = attributes.wrapperTag,
          colId = attributes.colId;
        var Tag = wrapperTag;
        var blockClasses = ['advgb-columns', 'advgb-is-mobile', vAlign && "columns-valign-".concat(vAlign), columns && "advgb-columns-".concat(columns), columnsLayout && "layout-".concat(columnsLayout), columnsLayoutT && "tbl-layout-".concat(columnsLayoutT), columnsLayoutM && "mbl-layout-".concat(columnsLayoutM), !!gutter && "gutter-".concat(gutter), !!collapsedGutter && "vgutter-".concat(collapsedGutter), collapsedRtl && 'order-rtl', columnsWrapped && 'columns-wrapped'].filter(Boolean).join(' ');
        return /*#__PURE__*/React.createElement(Tag, {
          className: "advgb-columns-wrapper"
        }, /*#__PURE__*/React.createElement("div", {
          className: blockClasses,
          id: colId,
          style: {
            maxWidth: !!contentMaxWidth ? "".concat(contentMaxWidth).concat(contentMaxWidthUnit) : undefined,
            minHeight: !!contentMinHeight ? "".concat(contentMinHeight).concat(contentMinHeightUnit) : undefined,
            maxHeight: !!contentMaxHeight ? "".concat(contentMaxHeight).concat(contentMaxHeightUnit) : undefined
          }
        }, /*#__PURE__*/React.createElement(InnerBlocks.Content, null)));
      }
    }, {
      attributes: blockAttrs,
      save: function save(_ref6) {
        var attributes = _ref6.attributes;
        var columns = attributes.columns,
          columnsLayout = attributes.columnsLayout,
          columnsLayoutT = attributes.columnsLayoutT,
          columnsLayoutM = attributes.columnsLayoutM,
          vAlign = attributes.vAlign,
          gutter = attributes.gutter,
          collapsedGutter = attributes.collapsedGutter,
          collapsedRtl = attributes.collapsedRtl,
          columnsWrapped = attributes.columnsWrapped,
          contentMaxWidth = attributes.contentMaxWidth,
          contentMaxWidthUnit = attributes.contentMaxWidthUnit,
          contentMinHeight = attributes.contentMinHeight,
          contentMinHeightUnit = attributes.contentMinHeightUnit,
          wrapperTag = attributes.wrapperTag,
          colId = attributes.colId;
        var Tag = wrapperTag;
        var blockClasses = ['advgb-columns', 'columns is-mobile', vAlign && "columns-valign-".concat(vAlign), columns && "advgb-columns-".concat(columns), columnsLayout && "layout-".concat(columnsLayout), columnsLayoutT && "tbl-layout-".concat(columnsLayoutT), columnsLayoutM && "mbl-layout-".concat(columnsLayoutM), !!gutter && "gutter-".concat(gutter), !!collapsedGutter && "vgutter-".concat(collapsedGutter), collapsedRtl && 'order-rtl', columnsWrapped && 'columns-wrapped'].filter(Boolean).join(' ');
        return /*#__PURE__*/React.createElement(Tag, {
          className: "advgb-columns-wrapper"
        }, /*#__PURE__*/React.createElement("div", {
          className: blockClasses,
          id: colId,
          style: {
            maxWidth: !!contentMaxWidth ? "".concat(contentMaxWidth).concat(contentMaxWidthUnit) : undefined,
            minHeight: !!contentMinHeight ? "".concat(contentMinHeight).concat(contentMinHeightUnit) : undefined
          }
        }, /*#__PURE__*/React.createElement(InnerBlocks.Content, null)));
      }
    }]
  });
})(wp.i18n, wp.blocks, wp.element, wp.blockEditor, wp.components, lodash);

/***/ },

/***/ "./assets/blocks/columns/column.jsx"
/*!******************************************!*\
  !*** ./assets/blocks/columns/column.jsx ***!
  \******************************************/
() {

function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
(function (wpI18n, wpBlocks, wpElement, wpBlockEditor, wpComponents) {
  wpBlockEditor = wp.blockEditor || wp.editor;
  var __ = wpI18n.__;
  var Component = wpElement.Component,
    Fragment = wpElement.Fragment;
  var registerBlockType = wpBlocks.registerBlockType;
  var _wpBlockEditor = wpBlockEditor,
    InspectorControls = _wpBlockEditor.InspectorControls,
    PanelColorSettings = _wpBlockEditor.PanelColorSettings,
    AlignmentToolbar = _wpBlockEditor.AlignmentToolbar,
    InnerBlocks = _wpBlockEditor.InnerBlocks;
  var PanelBody = wpComponents.PanelBody,
    RangeControl = wpComponents.RangeControl,
    BaseControl = wpComponents.BaseControl,
    SelectControl = wpComponents.SelectControl;
  var select = wp.data.select;
  var columnsBlockIcon = /*#__PURE__*/React.createElement("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    width: "20",
    height: "20",
    viewBox: "0 0 24 24"
  }, /*#__PURE__*/React.createElement("path", {
    d: "M10 18h5V5h-5v13zm-6 0h5V5H4v13zM16 5v13h5V5h-5z"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M0 0h24v24H0z",
    fill: "none"
  }));
  var listBorderStyles = [{
    label: __('None', 'advanced-gutenberg'),
    value: 'none'
  }, {
    label: __('Solid', 'advanced-gutenberg'),
    value: 'solid'
  }, {
    label: __('Dotted', 'advanced-gutenberg'),
    value: 'dotted'
  }, {
    label: __('Dashed', 'advanced-gutenberg'),
    value: 'dashed'
  }, {
    label: __('Double', 'advanced-gutenberg'),
    value: 'double'
  }, {
    label: __('Groove', 'advanced-gutenberg'),
    value: 'groove'
  }, {
    label: __('Ridge', 'advanced-gutenberg'),
    value: 'ridge'
  }, {
    label: __('Inset', 'advanced-gutenberg'),
    value: 'inset'
  }, {
    label: __('Outset', 'advanced-gutenberg'),
    value: 'outset'
  }];
  var MARGIN_PADDING_CONTROLS = [{
    label: 'Top',
    icon: 'arrow-up-alt2'
  }, {
    label: 'Right',
    icon: 'arrow-right-alt2'
  }, {
    label: 'Bottom',
    icon: 'arrow-down-alt2'
  }, {
    label: 'Left',
    icon: 'arrow-left-alt2'
  }];
  var AdvColumnEdit = /*#__PURE__*/function (_Component) {
    function AdvColumnEdit() {
      var _this;
      _classCallCheck(this, AdvColumnEdit);
      _this = _callSuper(this, AdvColumnEdit, arguments);
      _this.state = {
        tabSelected: 'desktop',
        isBlockIdSet: false // @since 3.2.3
      };
      return _this;
    }
    _inherits(AdvColumnEdit, _Component);
    return _createClass(AdvColumnEdit, [{
      key: "componentWillMount",
      value: function componentWillMount() {
        var _this$props = this.props,
          attributes = _this$props.attributes,
          setAttributes = _this$props.setAttributes;
        var currentBlockConfig = advgbDefaultConfig['advgb-column'];

        // No override attributes of blocks inserted before
        if (attributes.changed !== true) {
          if (_typeof(currentBlockConfig) === 'object' && currentBlockConfig !== null) {
            Object.keys(currentBlockConfig).map(function (attribute) {
              if (typeof attributes[attribute] === 'boolean') {
                attributes[attribute] = !!currentBlockConfig[attribute];
              } else {
                attributes[attribute] = currentBlockConfig[attribute];
              }
            });
          }

          // Finally set changed attribute to true, so we don't modify anything again
          setAttributes({
            changed: true
          });
        }
      }
    }, {
      key: "componentDidMount",
      value: function componentDidMount() {}
    }, {
      key: "componentDidUpdate",
      value: function componentDidUpdate() {
        var _this$props2 = this.props,
          setAttributes = _this$props2.setAttributes,
          clientId = _this$props2.clientId;

        // @since 3.2.3 - https://github.com/publishpress/PublishPress-Blocks/issues/1389
        if (!this.state.isBlockIdSet) {
          setAttributes({
            colId: 'advgb-col-' + clientId
          });
          this.setState({
            isBlockIdSet: true
          });
        }
      }
    }, {
      key: "render",
      value: function render() {
        var _this2 = this;
        var tabSelected = this.state.tabSelected;
        var _this$props3 = this.props,
          attributes = _this$props3.attributes,
          setAttributes = _this$props3.setAttributes,
          clientId = _this$props3.clientId,
          className = _this$props3.className;
        var width = attributes.width,
          borderColor = attributes.borderColor,
          borderStyle = attributes.borderStyle,
          borderWidth = attributes.borderWidth,
          borderRadius = attributes.borderRadius,
          textAlign = attributes.textAlign,
          textAlignM = attributes.textAlignM,
          marginTop = attributes.marginTop,
          marginRight = attributes.marginRight,
          marginBottom = attributes.marginBottom,
          marginLeft = attributes.marginLeft,
          marginTopM = attributes.marginTopM,
          marginRightM = attributes.marginRightM,
          marginBottomM = attributes.marginBottomM,
          marginLeftM = attributes.marginLeftM,
          paddingTop = attributes.paddingTop,
          paddingRight = attributes.paddingRight,
          paddingBottom = attributes.paddingBottom,
          paddingLeft = attributes.paddingLeft,
          paddingTopM = attributes.paddingTopM,
          paddingRightM = attributes.paddingRightM,
          paddingBottomM = attributes.paddingBottomM,
          paddingLeftM = attributes.paddingLeftM;
        var _ref = !wp.blockEditor ? select('core/editor') : select('core/block-editor'),
          getBlockOrder = _ref.getBlockOrder,
          getBlockRootClientId = _ref.getBlockRootClientId,
          getBlockAttributes = _ref.getBlockAttributes;
        var hasChildBlocks = getBlockOrder(clientId).length > 0;
        var rootBlockId = getBlockRootClientId(clientId);
        var rootChildBlocks = getBlockOrder(rootBlockId).filter(function (blockId) {
          return blockId !== clientId;
        });
        var avaiWidth = 100;
        rootChildBlocks.map(function (blockId) {
          var width = getBlockAttributes(blockId).width || 0;
          avaiWidth -= parseInt(width);
        });
        var blockClasses = ['advgb-column', className].filter(Boolean).join(' ');
        var deviceLetter = '';
        if (tabSelected === 'mobile') deviceLetter = 'M';
        return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(InspectorControls, null, /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Column Settings', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(RangeControl, {
          label: [__('Width (%)', 'advanced-gutenberg'), /*#__PURE__*/React.createElement("span", {
            key: "width",
            style: {
              color: '#555d66',
              marginLeft: 10
            }
          }, __('Available: ', 'advanced-gutenberg') + avaiWidth + '%')],
          help: __('Set to 0 = auto. This will override predefine layout styles. Recommend for experience users!', 'advanced-gutenberg'),
          value: width,
          min: 0,
          max: avaiWidth,
          onChange: function onChange(value) {
            return setAttributes({
              width: value
            });
          }
        }), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Border Settings', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Border style', 'advanced-gutenberg'),
          value: borderStyle,
          options: listBorderStyles,
          onChange: function onChange(value) {
            return setAttributes({
              borderStyle: value
            });
          }
        }), borderStyle !== 'none' && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Border Color', 'advanced-gutenberg'),
          initialOpen: false,
          colorSettings: [{
            label: __('Border Color', 'advanced-gutenberg'),
            value: borderColor,
            onChange: function onChange(value) {
              return setAttributes({
                borderColor: value
              });
            }
          }]
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Border width', 'advanced-gutenberg'),
          value: borderWidth || '',
          onChange: function onChange(value) {
            return setAttributes({
              borderWidth: value
            });
          },
          min: 0,
          max: 20
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Border radius (px)', 'advanced-gutenberg'),
          value: borderRadius || '',
          onChange: function onChange(value) {
            return setAttributes({
              borderRadius: value
            });
          },
          min: 0,
          max: 100
        }))), /*#__PURE__*/React.createElement("div", {
          className: "advgb-columns-responsive-items",
          style: {
            borderTop: '2px solid #aaa',
            paddingTop: 10
          }
        }, ['desktop', 'mobile'].map(function (device, index) {
          var itemClasses = ["advgb-columns-responsive-item", tabSelected === device && 'is-selected'].filter(Boolean).join(' ');
          return /*#__PURE__*/React.createElement("div", {
            className: itemClasses,
            key: index,
            onClick: function onClick() {
              return _this2.setState({
                tabSelected: device
              });
            }
          }, device);
        })), /*#__PURE__*/React.createElement(BaseControl, {
          label: AdvColumnEdit.jsUcfirst(tabSelected) + __(' text alignment', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(AlignmentToolbar, {
          isCollapsed: false,
          value: attributes['textAlign' + deviceLetter],
          onChange: function onChange(align) {
            return setAttributes(_defineProperty({}, 'textAlign' + deviceLetter, align));
          }
        })), /*#__PURE__*/React.createElement(PanelBody, {
          title: tabSelected !== 'desktop' ? AdvColumnEdit.jsUcfirst(tabSelected) + __(' Padding', 'advanced-gutenberg') : __('Padding', 'advanced-gutenberg'),
          initialOpen: false
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-controls-title"
        }, __('Unit (px)', 'advanced-gutenberg')), MARGIN_PADDING_CONTROLS.map(function (pos, idx) {
          return /*#__PURE__*/React.createElement(RangeControl, {
            key: idx,
            beforeIcon: pos.icon,
            value: attributes['padding' + pos.label + deviceLetter] || '',
            min: 0,
            max: 200,
            onChange: function onChange(value) {
              return setAttributes(_defineProperty({}, 'padding' + pos.label + deviceLetter, value));
            }
          });
        })), /*#__PURE__*/React.createElement(PanelBody, {
          title: tabSelected !== 'desktop' ? AdvColumnEdit.jsUcfirst(tabSelected) + __(' Margin', 'advanced-gutenberg') : __('Margin', 'advanced-gutenberg'),
          initialOpen: false
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-controls-title"
        }, __('Unit (px)', 'advanced-gutenberg')), MARGIN_PADDING_CONTROLS.map(function (pos, idx) {
          return /*#__PURE__*/React.createElement(RangeControl, {
            key: idx,
            beforeIcon: pos.icon,
            value: attributes['margin' + pos.label + deviceLetter] || '',
            min: 0,
            max: 200,
            onChange: function onChange(value) {
              return setAttributes(_defineProperty({}, 'margin' + pos.label + deviceLetter, value));
            }
          });
        })))), /*#__PURE__*/React.createElement("div", {
          className: blockClasses
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-column-inner",
          style: {
            borderStyle: borderStyle,
            borderColor: borderColor,
            borderWidth: borderWidth,
            borderRadius: borderRadius
          }
        }, /*#__PURE__*/React.createElement(InnerBlocks, {
          templateLock: false,
          renderAppender: hasChildBlocks ? undefined : function () {
            return /*#__PURE__*/React.createElement(InnerBlocks.ButtonBlockAppender, null);
          }
        }))), /*#__PURE__*/React.createElement("style", null, "#block-".concat(clientId, " .advgb-column > .advgb-column-inner {\n                            text-align: ").concat(textAlign, ";\n                            margin-top: ").concat(marginTop, "px;\n                            margin-right: ").concat(marginRight, "px;\n                            margin-bottom: ").concat(marginBottom, "px;\n                            margin-left: ").concat(marginLeft, "px;\n                            padding-top: ").concat(paddingTop, "px;\n                            padding-right: ").concat(paddingRight, "px;\n                            padding-bottom: ").concat(paddingBottom, "px;\n                            padding-left: ").concat(paddingLeft, "px;\n                        }\n                        @media screen and (max-width: 767px) {\n                            #block-").concat(clientId, " .advgb-column > .advgb-column-inner {\n                                text-align: ").concat(textAlignM, ";\n                                margin-top: ").concat(marginTopM, "px;\n                                margin-right: ").concat(marginRightM, "px;\n                                margin-bottom: ").concat(marginBottomM, "px;\n                                margin-left: ").concat(marginLeftM, "px;\n                                padding-top: ").concat(paddingTopM, "px;\n                                padding-right: ").concat(paddingRightM, "px;\n                                padding-bottom: ").concat(paddingBottomM, "px;\n                                padding-left: ").concat(paddingLeftM, "px;\n                            }\n                        }\n                        ").concat(width ? "#block-".concat(clientId, " {flex-basis: ").concat(width, "%;}") : '')));
      }
    }], [{
      key: "jsUcfirst",
      value: function jsUcfirst(string) {
        return string.charAt(0).toUpperCase() + string.slice(1);
      }
    }]);
  }(Component);
  var blockAttrs = {
    width: {
      type: 'number'
    },
    columnClasses: {
      type: 'string'
    },
    colId: {
      type: 'string'
    },
    borderStyle: {
      type: 'string',
      default: 'none'
    },
    borderColor: {
      type: 'string'
    },
    borderWidth: {
      type: 'number',
      default: 1
    },
    borderRadius: {
      type: 'number'
    },
    textAlign: {
      type: 'string'
    },
    textAlignM: {
      type: 'string'
    },
    marginTop: {
      type: 'number'
    },
    marginTopM: {
      type: 'number'
    },
    marginRight: {
      type: 'number'
    },
    marginRightM: {
      type: 'number'
    },
    marginBottom: {
      type: 'number'
    },
    marginBottomM: {
      type: 'number'
    },
    marginLeft: {
      type: 'number'
    },
    marginLeftM: {
      type: 'number'
    },
    paddingTop: {
      type: 'number'
    },
    paddingTopM: {
      type: 'number'
    },
    paddingRight: {
      type: 'number'
    },
    paddingRightM: {
      type: 'number'
    },
    paddingBottom: {
      type: 'number'
    },
    paddingBottomM: {
      type: 'number'
    },
    paddingLeft: {
      type: 'number'
    },
    paddingLeftM: {
      type: 'number'
    },
    changed: {
      type: 'boolean',
      default: false
    }
  };

  // Legacy attribute set that reads colId from the saved HTML id attribute.
  // Covers old column blocks where colId was never stored in the block JSON
  // but the serialised HTML was written with an id (e.g. id="advgb-col-<uuid>").
  var legacyColumnAttrs = _objectSpread(_objectSpread({}, blockAttrs), {}, {
    colId: {
      type: 'string',
      source: 'attribute',
      selector: '.advgb-column',
      attribute: 'id'
    }
  });
  registerBlockType('advgb/column', {
    apiVersion: 3,
    title: __('Column - PublishPress', 'advanced-gutenberg'),
    parent: ['advgb/columns'],
    description: __('Column in row.', 'advanced-gutenberg'),
    icon: {
      src: columnsBlockIcon,
      foreground: typeof advgbBlocks !== 'undefined' ? advgbBlocks.color : undefined
    },
    category: 'advgb-category',
    keywords: [__('columns', 'advanced-gutenberg'), __('row', 'advanced-gutenberg'), __('layout', 'advanced-gutenberg')],
    supports: {
      inserter: false,
      reusable: false,
      html: false
    },
    attributes: blockAttrs,
    edit: AdvColumnEdit,
    save: function save(_ref2) {
      var attributes = _ref2.attributes;
      var width = attributes.width,
        columnClasses = attributes.columnClasses,
        colId = attributes.colId,
        borderColor = attributes.borderColor,
        borderStyle = attributes.borderStyle,
        borderWidth = attributes.borderWidth,
        borderRadius = attributes.borderRadius;
      var blockClasses = ['advgb-column', columnClasses].filter(Boolean).join(' ');
      return /*#__PURE__*/React.createElement("div", {
        className: blockClasses,
        id: colId,
        style: {
          flex: width ? 'none' : undefined
        }
      }, /*#__PURE__*/React.createElement("div", {
        className: "advgb-column-inner",
        style: {
          borderStyle: borderStyle,
          borderColor: borderColor,
          borderWidth: borderWidth,
          borderRadius: borderRadius
        }
      }, /*#__PURE__*/React.createElement(InnerBlocks.Content, null)));
    },
    deprecated: [{
      attributes: legacyColumnAttrs,
      migrate: function migrate(attributes, innerBlocks) {
        var migratedAttributes = _objectSpread({}, attributes);
        return [migratedAttributes, innerBlocks];
      },
      save: function save(_ref3) {
        var attributes = _ref3.attributes;
        var width = attributes.width,
          columnClasses = attributes.columnClasses,
          colId = attributes.colId,
          borderColor = attributes.borderColor,
          borderStyle = attributes.borderStyle,
          borderWidth = attributes.borderWidth,
          borderRadius = attributes.borderRadius;
        var blockClasses = ['advgb-column', columnClasses].filter(Boolean).join(' ');
        return /*#__PURE__*/React.createElement("div", {
          className: blockClasses,
          id: colId,
          style: {
            flex: width ? 'none' : undefined
          }
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-column-inner",
          style: {
            borderStyle: borderStyle,
            borderColor: borderColor,
            borderWidth: borderWidth,
            borderRadius: borderRadius
          }
        }, /*#__PURE__*/React.createElement(InnerBlocks.Content, null)));
      }
    }, {
      attributes: blockAttrs,
      save: function save(_ref4) {
        var attributes = _ref4.attributes;
        var width = attributes.width,
          columnClasses = attributes.columnClasses,
          colId = attributes.colId,
          borderColor = attributes.borderColor,
          borderStyle = attributes.borderStyle,
          borderWidth = attributes.borderWidth,
          borderRadius = attributes.borderRadius;
        var blockClasses = ['advgb-column', columnClasses].filter(Boolean).join(' ');
        return /*#__PURE__*/React.createElement("div", {
          className: blockClasses,
          id: colId,
          style: {
            width: width ? width + '%' : undefined,
            flex: width ? 'none' : undefined
          }
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-column-inner",
          style: {
            borderStyle: borderStyle,
            borderColor: borderColor,
            borderWidth: borderWidth,
            borderRadius: borderRadius
          }
        }, /*#__PURE__*/React.createElement(InnerBlocks.Content, null)));
      }
    }, {
      attributes: blockAttrs,
      save: function save(_ref5) {
        var attributes = _ref5.attributes;
        var width = attributes.width,
          columnClasses = attributes.columnClasses,
          colId = attributes.colId,
          borderColor = attributes.borderColor,
          borderStyle = attributes.borderStyle,
          borderWidth = attributes.borderWidth,
          borderRadius = attributes.borderRadius;
        var blockClasses = ['advgb-column', 'column', columnClasses].filter(Boolean).join(' ');
        return /*#__PURE__*/React.createElement("div", {
          className: blockClasses,
          id: colId,
          style: {
            width: width ? width + '%' : undefined,
            flex: width ? 'none' : undefined
          }
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-column-inner",
          style: {
            borderStyle: borderStyle,
            borderColor: borderColor,
            borderWidth: borderWidth,
            borderRadius: borderRadius
          }
        }, /*#__PURE__*/React.createElement(InnerBlocks.Content, null)));
      }
    }]
  });
})(wp.i18n, wp.blocks, wp.element, wp.blockEditor, wp.components);

/***/ },

/***/ "./assets/blocks/contact-form/block.jsx"
/*!**********************************************!*\
  !*** ./assets/blocks/contact-form/block.jsx ***!
  \**********************************************/
() {

function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
(function (wpI18n, wpBlocks, wpElement, wpBlockEditor, wpComponents) {
  wpBlockEditor = wp.blockEditor || wp.editor;
  var __ = wpI18n.__;
  var Component = wpElement.Component,
    Fragment = wpElement.Fragment;
  var registerBlockType = wpBlocks.registerBlockType;
  var _wpBlockEditor = wpBlockEditor,
    InspectorControls = _wpBlockEditor.InspectorControls,
    PanelColorSettings = _wpBlockEditor.PanelColorSettings;
  var PanelBody = wpComponents.PanelBody,
    RangeControl = wpComponents.RangeControl,
    SelectControl = wpComponents.SelectControl,
    TextControl = wpComponents.TextControl;
  var contactBlockIcon = /*#__PURE__*/React.createElement("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    width: "20",
    height: "20",
    viewBox: "0 0 24 24"
  }, /*#__PURE__*/React.createElement("path", {
    fill: "none",
    d: "M0 0h24v24H0V0z"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6zm-2 0l-8 4.99L4 6h16zm0 12H4V8l8 5 8-5v10z"
  }));
  var previewImageData = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAAEBCAYAAABRzrhTAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAACOxJREFUeNrs3c9rFO0BwPHZ2TUxiS5W8WAr1YMHLxZe6kVKaVEo3l4PvXgRqmChp4JXoccXevLie3mJ9B+QWovQU1E8FCmtp4jvwVNNJEYDJpJokt3pzrJrx8nMZnezO9m6nw8Mya5xJszku88z+zMIAAAAAAAAAAAA4EtSGuTKKpXK0LcBYyJKXtja2trb0Btxl8QNxQTfvq7X8Et9xp31f0sd1it86C/saKd/6yb60i4DT39fEjoMJfS8r12N8KVdRp6OOyt2kUN/sSe/pr/f9jOdYi/1EXlW2HmLER12F3oy6nrquq5jL/URedYSZlw2qsNgRvN04FnBd4y90sWG8yIPE1/Dp0+ffnXq1KnfTkxM/DIMwx85XtC3zUas379///7B/fv3/3Tt2rVXqcBLre/rGTcSpYzz/M4jbcZo/lnc8XL37t0fXrhw4XczMzO/d3xgsOr1+uL8/Pwfrl69eu/hw4cfG1fVEpHX86bzjRuKqJfQ06N5mFyuXLky/e233343OTn5tUMCQ5rLR9Ha4uLiNxcvXvxubm5uIxF7LSf4bVP4bkIvZYRejpeVlZXZqampXzsUMHS158+fXz9z5sxfW4Enl8zRPRl62MVoHmTFfu/evZMih8KUT5w48ZtDhw5VWgNtcna94yNdYQ8b+mzqfvbs2V/Z91CcxsD6s9u3b59uz6iDz+8z2/bQdvK1J2EXcWdO36vV6i/seihUqTHA/jwVembkaWHOtH3H2BsO2+9QrImJiR+kpu1h0MUT1LqdumfdIQcULIqiUkbkO56nh13GHaRX2NogUKB6vV7qNfJ+RvRk8MDejOhZTz3PnbYHfQT7aaWNDdrrsDfyXiWaO8sOO6yol8tA8SN61+//0O3Da+lzdqHD6I7su566A6MZfEfhMFcODH0k76pJIzqMAaGD0AGhA0IHhA4IHRA6IHRA6CB0QOiA0AGhA0IHhA4IHRA6CB0QOiB0QOiA0AGhA0IHhA5CtwtA6IDQAaEDQgeEDggdEDogdBA6IHRA6IDQAaEDQgeEDggdhA4IHRA6IHRA6IDQAaEDQgehA0IHhA4IHRA6IHRA6IDQAaGD0AGhA0IHhA4IHRA6IHRA6DCWKqPwS6yurjoSBSiXy8H09PS26z9+/BhsbGzYQQWI9398HMYy9M3NTX8Be6herzsGBYmiyNQdEDogdGCkz9GzxHdYhGFvt0O1Wq15vsnulUqloFLZuz8Px3JMQp+Zmen5D219fb25MIA/jMa+P3jw4J5t37E0dQeEDggdhA58iUb2zriVlRVHZw/Fz5RbXl62I4zogNABoQNjdo6+b98+R6IAeS+PjJ+B6BgUI37G4diGvpfPwCIIJicnmwum7oDQAaEDQgeEDuzSSNzr7qmWjItqtbonb+hhRAdTd0DogNCB0TCyr0ePn5LZ67vAdhK/o2j80UMg9BELfZD3Tm5tbQkdU3dA6IDQAefofYjPpwf5Ub4+3gehj2jogKk7IHRA6CB0QOiA0AGhA0IHhA4IHdjOhyxCgXzIImDqDggdEDoIHRA68P+uYhfA/0RRNLR179VDa0KHROBv374N1tbWhhL74cOHg/379wflcnmgH0widOgh8hcvXgRLS0tD28bCwkJw7Nix4OjRo5+Cd44OBXr9+vVQI2979epVsLy83Hzj02GeIggdMkbzIt9xeGVlpbm9ot9+XOiIvcDRNf6sgo2NDaHDlywOPF5M3YGBc687ZDh37tyu1zE3N9c8Jx8FRnQYA0IHU3cYT4OYctdqNaHDKIvPr03dAaEDQoeRUuQLTOJtxUvRL1kVOmMtDu7IkSPNV5QNPbYwDKampoKJiYnCX6rqzjjGXhzeyZMng5cvXwYfPnwYyvPQ41F8eno6qFarzRsVoUPR56+N6A4cOBAcP348WF9fb77wZNDPRY9DjwOfmZlp3rAUPXUXOqbvjegqlUrzg0TiUXcYI3q8jfb5uXeYgT2OfZh3zHnPOBih4L/I0xOHFr58QgehA0IHhA4IHRA6IHRA6IDQQeiA0AGhA0IHhA4IHRA6IHQQOiB0QOiA0AGhA0IHhA4IHYRuF4DQAaEDQgeEDggdEDogdEDoIHRA6IDQAaEDQgeEDggdEDoIHRA6IHRA6IDQAaEDQgeEDmMiGkbokf0KexZ0T/31G3q0ubn52v6GYq2uri5lDLbRbkOPcpZgaWnpn3Y7FDuSP3r06F85M+uO0Yd9TsujBw8e/N1+h0JH8yc3b958kR50M3qNdjt1/7SBGzdu/GdxcXHW7ofhq9fr7x8/fjy7trZWbzVYz5tt9zp1j3aYvkeXLl3647t37/7mMMBQI19/9uzZ7evXr/+jFXi9Q9yZsZcz6w+b/ZdaF0utG4RSYmleXlhYiGq12r9Pnz5dr1arP3VIYLA2NzeXnjx58s3ly5f/PD8/v5EIvZb4Wsu7AWjcSATJmD9TqVSCVNjlVtzx10rWMjs7+5Pz589/PTMz8+NyuXwgcSMB9HJ+HEX1jY2N5Tdv3nx/69atv9y5c2cxEfRWa4m/30xd3hb81tZW5xAbsadH8HboWbG3rwsTS/L/Az203p61J87HaxmxpyOvpc/f26FXutxglFhBmLjVaP8C7RuN5LRB6DCc0GupBjuds+8YepSINErFXkoEnlxxpxFd8ND9wJoVej1jBE/+TLLVoD2adww9/qHWuXqUGq3rHX5JocPgQ6+lZtBZo3p6NI+6HdHzphLtaOupf98pdLFDb6fKUc70PW/K3tfUPT2aJ6+rpVYcJs7f25GHqbhFDt2FHuSEnrdseyw9OW3vKr7UQ21BarROh10ybYeBj+pZwec9Oy4+7Y56HdGzRvd6KuLkqJ/172KH/kf0vODzpuyZU/eu42s9rp4ON2sJgvyH1sQOO0ceZMTbTdzbpuy7GdGjnOvTkYsbBjOyBzlxR53Oy/seYVvn60FOyDtN1QUP/Y3swQ7T846R9x1f4g66vHWJGoY3uncd+MCCzBnlh7ItGLPRPPdnug18KPElohc4DDD4XsMGAAAAAAAAAACAL9t/BRgA+YcmXetsJFIAAAAASUVORK5CYII=';
  var AdvContactForm = /*#__PURE__*/function (_Component) {
    function AdvContactForm() {
      _classCallCheck(this, AdvContactForm);
      return _callSuper(this, AdvContactForm, arguments);
    }
    _inherits(AdvContactForm, _Component);
    return _createClass(AdvContactForm, [{
      key: "componentWillMount",
      value: function componentWillMount() {
        var _this$props = this.props,
          attributes = _this$props.attributes,
          setAttributes = _this$props.setAttributes;
        var currentBlockConfig = advgbDefaultConfig['advgb-contact-form'];

        // No override attributes of blocks inserted before
        if (attributes.changed !== true) {
          if (_typeof(currentBlockConfig) === 'object' && currentBlockConfig !== null) {
            Object.keys(currentBlockConfig).map(function (attribute) {
              if (typeof attributes[attribute] === 'boolean') {
                attributes[attribute] = !!currentBlockConfig[attribute];
              } else {
                attributes[attribute] = currentBlockConfig[attribute];
              }
            });
          }

          // Finally set changed attribute to true, so we don't modify anything again
          setAttributes({
            changed: true
          });
        }
      }
    }, {
      key: "render",
      value: function render() {
        var _this$props2 = this.props,
          attributes = _this$props2.attributes,
          setAttributes = _this$props2.setAttributes;
        var nameLabel = attributes.nameLabel,
          emailLabel = attributes.emailLabel,
          msgLabel = attributes.msgLabel,
          submitLabel = attributes.submitLabel,
          successLabel = attributes.successLabel,
          alertLabel = attributes.alertLabel,
          bgColor = attributes.bgColor,
          textColor = attributes.textColor,
          borderColor = attributes.borderColor,
          borderStyle = attributes.borderStyle,
          borderRadius = attributes.borderRadius,
          submitColor = attributes.submitColor,
          submitBgColor = attributes.submitBgColor,
          submitRadius = attributes.submitRadius,
          submitPosition = attributes.submitPosition,
          isPreview = attributes.isPreview;
        return isPreview ? /*#__PURE__*/React.createElement("img", {
          alt: __('Contact Form', 'advanced-gutenberg'),
          width: "100%",
          src: previewImageData
        }) : /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(InspectorControls, null, /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Form Settings', 'advanced-gutenberg')
        }, typeof advgbBlocks !== 'undefined' && !parseInt(advgbBlocks.captchaEnabled) && /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Notice', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement("p", {
          style: {
            fontStyle: 'italic'
          }
        }, __('We strongly recommend to enable Google reCAPTCHA to avoid spam.', 'advanced-gutenberg'), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("a", {
          href: advgbBlocks.config_url + '&tab=recaptcha',
          target: "_blank"
        }, __('You can enable it in Settings', 'advanced-gutenberg')))), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Email sender', 'advanced-gutenberg'),
          initialOpen: false
        }, /*#__PURE__*/React.createElement("p", {
          style: {
            fontStyle: 'italic'
          }
        }, __('An email will be sent to the admin email (by default) whenever a contact form is submitted. You can change it in ', 'advanced-gutenberg'), /*#__PURE__*/React.createElement("a", {
          href: advgbBlocks.config_url + '&tab=forms',
          target: "_blank"
        }, " ", __('settings', 'advanced-gutenberg'), "."))), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Text Label', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(TextControl, {
          label: __('Name input placeholder', 'advanced-gutenberg'),
          value: nameLabel,
          onChange: function onChange(value) {
            return setAttributes({
              nameLabel: value
            });
          }
        }), /*#__PURE__*/React.createElement(TextControl, {
          label: __('Email input placeholder', 'advanced-gutenberg'),
          value: emailLabel,
          onChange: function onChange(value) {
            return setAttributes({
              emailLabel: value
            });
          }
        }), /*#__PURE__*/React.createElement(TextControl, {
          label: __('Message input placeholder', 'advanced-gutenberg'),
          value: msgLabel,
          onChange: function onChange(value) {
            return setAttributes({
              msgLabel: value
            });
          }
        }), /*#__PURE__*/React.createElement(TextControl, {
          label: __('Submit text', 'advanced-gutenberg'),
          value: submitLabel,
          onChange: function onChange(value) {
            return setAttributes({
              submitLabel: value
            });
          }
        }), /*#__PURE__*/React.createElement(TextControl, {
          label: __('Empty field warning text', 'advanced-gutenberg'),
          value: alertLabel,
          onChange: function onChange(value) {
            return setAttributes({
              alertLabel: value
            });
          }
        }), /*#__PURE__*/React.createElement(TextControl, {
          label: __('Submit success text', 'advanced-gutenberg'),
          value: successLabel,
          onChange: function onChange(value) {
            return setAttributes({
              successLabel: value
            });
          }
        })), /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Input Color', 'advanced-gutenberg'),
          colorSettings: [{
            label: __('Background color', 'advanced-gutenberg'),
            value: bgColor,
            onChange: function onChange(value) {
              return setAttributes({
                bgColor: value
              });
            }
          }, {
            label: __('Text color', 'advanced-gutenberg'),
            value: textColor,
            onChange: function onChange(value) {
              return setAttributes({
                textColor: value
              });
            }
          }]
        }), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Border Settings', 'advanced-gutenberg'),
          initialOpen: false
        }, /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Border Color', 'advanced-gutenberg'),
          initialOpen: false,
          colorSettings: [{
            label: __('Border color', 'advanced-gutenberg'),
            value: borderColor,
            onChange: function onChange(value) {
              return setAttributes({
                borderColor: value
              });
            }
          }]
        }), /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Border Style', 'advanced-gutenberg'),
          value: borderStyle,
          options: [{
            label: __('Solid', 'advanced-gutenberg'),
            value: 'solid'
          }, {
            label: __('Dashed', 'advanced-gutenberg'),
            value: 'dashed'
          }, {
            label: __('Dotted', 'advanced-gutenberg'),
            value: 'dotted'
          }],
          onChange: function onChange(value) {
            return setAttributes({
              borderStyle: value
            });
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Border radius (px)', 'advanced-gutenberg'),
          value: borderRadius,
          onChange: function onChange(value) {
            return setAttributes({
              borderRadius: value
            });
          },
          min: 0,
          max: 50
        })), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Submit Button Settings', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Color Settings', 'advanced-gutenberg'),
          initialOpen: false,
          colorSettings: [{
            label: __('Border and Text', 'advanced-gutenberg'),
            value: submitColor,
            onChange: function onChange(value) {
              return setAttributes({
                submitColor: value
              });
            }
          }, {
            label: __('Background', 'advanced-gutenberg'),
            value: submitBgColor,
            onChange: function onChange(value) {
              return setAttributes({
                submitBgColor: value
              });
            }
          }]
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Button border radius', 'advanced-gutenberg'),
          value: submitRadius,
          onChange: function onChange(value) {
            return setAttributes({
              submitRadius: value
            });
          },
          min: 0,
          max: 50
        }), /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Button position', 'advanced-gutenberg'),
          value: submitPosition,
          options: [{
            label: __('Center', 'advanced-gutenberg'),
            value: 'center'
          }, {
            label: __('Left', 'advanced-gutenberg'),
            value: 'left'
          }, {
            label: __('Right', 'advanced-gutenberg'),
            value: 'right'
          }],
          onChange: function onChange(value) {
            return setAttributes({
              submitPosition: value
            });
          }
        })))), /*#__PURE__*/React.createElement("div", {
          className: "advgb-contact-form"
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-form-field advgb-form-field-half"
        }, /*#__PURE__*/React.createElement("input", {
          type: "text",
          disabled: true,
          className: "advgb-form-input",
          value: nameLabel ? nameLabel : 'Name',
          style: {
            backgroundColor: bgColor,
            color: textColor,
            borderColor: borderColor,
            borderStyle: borderStyle,
            borderRadius: borderRadius
          }
        })), /*#__PURE__*/React.createElement("div", {
          className: "advgb-form-field advgb-form-field-half"
        }, /*#__PURE__*/React.createElement("input", {
          type: "text",
          disabled: true,
          className: "advgb-form-input",
          value: emailLabel ? emailLabel : 'Email address',
          style: {
            backgroundColor: bgColor,
            color: textColor,
            borderColor: borderColor,
            borderStyle: borderStyle,
            borderRadius: borderRadius
          }
        })), /*#__PURE__*/React.createElement("div", {
          className: "advgb-form-field advgb-form-field-full"
        }, /*#__PURE__*/React.createElement("textarea", {
          className: "advgb-form-input",
          disabled: true,
          value: msgLabel ? msgLabel : 'Message',
          style: {
            backgroundColor: bgColor,
            color: textColor,
            borderColor: borderColor,
            borderStyle: borderStyle,
            borderRadius: borderRadius
          }
        })), /*#__PURE__*/React.createElement("div", {
          className: "advgb-form-submit-wrapper",
          style: {
            textAlign: submitPosition
          }
        }, /*#__PURE__*/React.createElement("button", {
          className: "advgb-form-submit",
          style: {
            borderColor: submitColor,
            color: submitColor,
            backgroundColor: submitBgColor,
            borderRadius: submitRadius
          }
        }, submitLabel ? submitLabel : 'Submit'))));
      }
    }]);
  }(Component);
  var contactBlockAttrs = {
    nameLabel: {
      type: 'string'
    },
    emailLabel: {
      type: 'string'
    },
    msgLabel: {
      type: 'string'
    },
    submitLabel: {
      type: 'string'
    },
    successLabel: {
      type: 'string'
    },
    alertLabel: {
      type: 'string'
    },
    bgColor: {
      type: 'string'
    },
    textColor: {
      type: 'string'
    },
    borderStyle: {
      type: 'string'
    },
    borderColor: {
      type: 'string'
    },
    borderRadius: {
      type: 'number'
    },
    submitColor: {
      type: 'string'
    },
    submitBgColor: {
      type: 'string'
    },
    submitRadius: {
      type: 'number'
    },
    submitPosition: {
      type: 'string',
      default: 'right'
    },
    changed: {
      type: 'boolean',
      default: false
    },
    isPreview: {
      type: 'boolean',
      default: false
    }
  };
  registerBlockType('advgb/contact-form', {
    apiVersion: 3,
    title: __('Contact Form - PublishPress', 'advanced-gutenberg'),
    description: __('Fastest way to create a contact form for your page.', 'advanced-gutenberg'),
    icon: {
      src: contactBlockIcon,
      foreground: typeof advgbBlocks !== 'undefined' ? advgbBlocks.color : undefined
    },
    category: 'advgb-category',
    keywords: [__('contact', 'advanced-gutenberg'), __('form', 'advanced-gutenberg')],
    attributes: contactBlockAttrs,
    example: {
      attributes: {
        isPreview: true
      }
    },
    supports: {
      anchor: true
    },
    edit: AdvContactForm,
    save: function save(_ref) {
      var attributes = _ref.attributes;
      var nameLabel = attributes.nameLabel,
        emailLabel = attributes.emailLabel,
        msgLabel = attributes.msgLabel,
        submitLabel = attributes.submitLabel,
        successLabel = attributes.successLabel,
        alertLabel = attributes.alertLabel,
        bgColor = attributes.bgColor,
        textColor = attributes.textColor,
        borderColor = attributes.borderColor,
        borderStyle = attributes.borderStyle,
        borderRadius = attributes.borderRadius,
        submitColor = attributes.submitColor,
        submitBgColor = attributes.submitBgColor,
        submitRadius = attributes.submitRadius,
        submitPosition = attributes.submitPosition;
      return /*#__PURE__*/React.createElement("div", {
        className: "advgb-contact-form"
      }, /*#__PURE__*/React.createElement("form", {
        method: "POST"
      }, /*#__PURE__*/React.createElement("div", {
        className: "advgb-form-field advgb-form-field-half"
      }, /*#__PURE__*/React.createElement("input", {
        type: "text",
        className: "advgb-form-input advgb-form-input-name",
        placeholder: nameLabel ? nameLabel : 'Name',
        name: "contact_name",
        style: {
          backgroundColor: bgColor,
          color: textColor,
          borderColor: borderColor,
          borderStyle: borderStyle,
          borderRadius: borderRadius
        }
      })), /*#__PURE__*/React.createElement("div", {
        className: "advgb-form-field advgb-form-field-half"
      }, /*#__PURE__*/React.createElement("input", {
        type: "email",
        className: "advgb-form-input advgb-form-input-email",
        placeholder: emailLabel ? emailLabel : 'Email address',
        name: "contact_email",
        style: {
          backgroundColor: bgColor,
          color: textColor,
          borderColor: borderColor,
          borderStyle: borderStyle,
          borderRadius: borderRadius
        }
      })), /*#__PURE__*/React.createElement("div", {
        className: "advgb-form-field advgb-form-field-full"
      }, /*#__PURE__*/React.createElement("textarea", {
        className: "advgb-form-input advgb-form-input-msg",
        placeholder: msgLabel ? msgLabel : 'Message',
        name: "contact_message",
        style: {
          backgroundColor: bgColor,
          color: textColor,
          borderColor: borderColor,
          borderStyle: borderStyle,
          borderRadius: borderRadius
        }
      })), /*#__PURE__*/React.createElement("div", {
        className: "advgb-grecaptcha clearfix position-".concat(submitPosition)
      }), /*#__PURE__*/React.createElement("div", {
        className: "advgb-form-submit-wrapper",
        style: {
          textAlign: submitPosition
        }
      }, /*#__PURE__*/React.createElement("button", {
        className: "advgb-form-submit",
        type: "submit",
        "data-success": successLabel ? successLabel : undefined,
        "data-alert": alertLabel ? alertLabel : undefined,
        style: {
          borderColor: submitColor,
          color: submitColor,
          backgroundColor: submitBgColor,
          borderRadius: submitRadius
        }
      }, submitLabel ? submitLabel : 'Submit'))));
    }
  });
})(wp.i18n, wp.blocks, wp.element, wp.blockEditor, wp.components);

/***/ },

/***/ "./assets/blocks/container/block.jsx"
/*!*******************************************!*\
  !*** ./assets/blocks/container/block.jsx ***!
  \*******************************************/
() {

(function (wpI18n, wpBlocks, wpBlockEditor) {
  wpBlockEditor = wp.blockEditor || wp.editor;
  var __ = wpI18n.__;
  var Fragment = wp.element.Fragment;
  var registerBlockType = wpBlocks.registerBlockType,
    createBlock = wpBlocks.createBlock;
  var _wpBlockEditor = wpBlockEditor,
    InnerBlocks = _wpBlockEditor.InnerBlocks,
    InspectorControls = _wpBlockEditor.InspectorControls;
  var _wp$components = wp.components,
    PanelBody = _wp$components.PanelBody,
    SelectControl = _wp$components.SelectControl;
  var containerBlockIcon = /*#__PURE__*/React.createElement("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    width: "20",
    height: "20",
    viewBox: "2 2 22 22"
  }, /*#__PURE__*/React.createElement("path", {
    fill: "none",
    d: "M0 0h24v24H0V0z"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M3 5v14h19V5H3zm2 2h15v4H5V7zm0 10v-4h4v4H5zm6 0v-4h9v4h-9z"
  }));
  registerBlockType('advgb/container', {
    apiVersion: 3,
    title: __('Container - PublishPress', 'advanced-gutenberg'),
    description: __('Block for containing other blocks.', 'advanced-gutenberg'),
    icon: {
      src: containerBlockIcon,
      foreground: typeof advgbBlocks !== 'undefined' ? advgbBlocks.color : undefined
    },
    category: 'advgb-category',
    keywords: [__('container', 'advanced-gutenberg'), __('row', 'advanced-gutenberg'), __('box', 'advanced-gutenberg')],
    attributes: {
      wrapperTag: {
        type: 'string',
        default: 'div'
      }
    },
    supports: {
      align: true,
      className: true
    },
    transforms: {
      to: [{
        type: 'block',
        blocks: ['advgb/columns'],
        transform: function transform(attributes, innerBlocks) {
          var className = attributes.className,
            wrapperTag = attributes.wrapperTag;
          var columnBlock = createBlock('advgb/column', {}, innerBlocks);
          return createBlock('advgb/columns', {
            columns: 1,
            className: className,
            wrapperTag: wrapperTag
          }, [columnBlock]);
        }
      }]
    },
    edit: function edit(props) {
      var attributes = props.attributes,
        setAttributes = props.setAttributes,
        className = props.className;
      var wrapperTag = attributes.wrapperTag;
      return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(InspectorControls, null, /*#__PURE__*/React.createElement(PanelBody, {
        title: __('Container Settings', 'advanced-gutenberg')
      }, /*#__PURE__*/React.createElement(SelectControl, {
        label: __('Wrapper Tag', 'advanced-gutenberg'),
        value: wrapperTag,
        options: [{
          label: 'Div',
          value: 'div'
        }, {
          label: 'Header',
          value: 'header'
        }, {
          label: 'Section',
          value: 'section'
        }, {
          label: 'Main',
          value: 'main'
        }, {
          label: 'Article',
          value: 'article'
        }, {
          label: 'Aside',
          value: 'aside'
        }, {
          label: 'Footer',
          value: 'footer'
        }],
        onChange: function onChange(value) {
          return setAttributes({
            wrapperTag: value
          });
        }
      }))), /*#__PURE__*/React.createElement("div", {
        className: "advgb-blocks-container ".concat(className)
      }, /*#__PURE__*/React.createElement(InnerBlocks, null)));
    },
    save: function save(_ref) {
      var attributes = _ref.attributes;
      var Tag = attributes.wrapperTag;
      return /*#__PURE__*/React.createElement(Tag, {
        className: "advgb-blocks-container"
      }, /*#__PURE__*/React.createElement(InnerBlocks.Content, null));
    }
  });
})(wp.i18n, wp.blocks, wp.blockEditor);

/***/ },

/***/ "./assets/blocks/count-up/block.jsx"
/*!******************************************!*\
  !*** ./assets/blocks/count-up/block.jsx ***!
  \******************************************/
() {

function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
(function (wpI18n, wpBlocks, wpElement, wpBlockEditor, wpComponents) {
  wpBlockEditor = wp.blockEditor || wp.editor;
  var __ = wpI18n.__;
  var Component = wpElement.Component,
    Fragment = wpElement.Fragment;
  var registerBlockType = wpBlocks.registerBlockType;
  var _wpBlockEditor = wpBlockEditor,
    InspectorControls = _wpBlockEditor.InspectorControls,
    RichText = _wpBlockEditor.RichText,
    PanelColorSettings = _wpBlockEditor.PanelColorSettings;
  var RangeControl = wpComponents.RangeControl,
    PanelBody = wpComponents.PanelBody,
    TextControl = wpComponents.TextControl,
    FormToggle = wpComponents.FormToggle;
  var previewImageData = 'data:image/png;base64, ';
  var AdvCountUp = /*#__PURE__*/function (_Component) {
    function AdvCountUp() {
      var _this;
      _classCallCheck(this, AdvCountUp);
      _this = _callSuper(this, AdvCountUp, arguments);
      _this.state = {
        currentEdit: '',
        isBlockIdSet: false // @since 3.2.3
      };
      return _this;
    }
    _inherits(AdvCountUp, _Component);
    return _createClass(AdvCountUp, [{
      key: "componentWillMount",
      value: function componentWillMount() {
        var _this$props = this.props,
          attributes = _this$props.attributes,
          setAttributes = _this$props.setAttributes;
        var currentBlockConfig = advgbDefaultConfig['advgb-count-up'];

        // No override attributes of blocks inserted before
        if (attributes.changed !== true) {
          if (_typeof(currentBlockConfig) === 'object' && currentBlockConfig !== null) {
            Object.keys(currentBlockConfig).map(function (attribute) {
              if (typeof attributes[attribute] === 'boolean') {
                attributes[attribute] = !!currentBlockConfig[attribute];
              } else {
                attributes[attribute] = currentBlockConfig[attribute];
              }
            });
          }

          // Finally set changed attribute to true, so we don't modify anything again
          setAttributes({
            changed: true
          });
        }
      }
    }, {
      key: "componentDidMount",
      value: function componentDidMount() {}
    }, {
      key: "componentDidUpdate",
      value: function componentDidUpdate() {
        var _this$props2 = this.props,
          setAttributes = _this$props2.setAttributes,
          clientId = _this$props2.clientId;

        // @since 3.2.3 - https://github.com/publishpress/PublishPress-Blocks/issues/1389
        if (!this.state.isBlockIdSet) {
          setAttributes({
            id: 'count-up-' + clientId
          });
          this.setState({
            isBlockIdSet: true
          });
        }
      }
    }, {
      key: "render",
      value: function render() {
        var _this2 = this;
        var currentEdit = this.state.currentEdit;
        var _this$props3 = this.props,
          attributes = _this$props3.attributes,
          setAttributes = _this$props3.setAttributes,
          isSelected = _this$props3.isSelected;
        var id = attributes.id,
          headerText = attributes.headerText,
          headerText2 = attributes.headerText2,
          headerText3 = attributes.headerText3,
          headerTextColor = attributes.headerTextColor,
          countUpNumber = attributes.countUpNumber,
          countUpNumber2 = attributes.countUpNumber2,
          countUpNumber3 = attributes.countUpNumber3,
          countUpNumberColor = attributes.countUpNumberColor,
          countUpNumberSize = attributes.countUpNumberSize,
          countUpSymbol = attributes.countUpSymbol,
          countUpSymbol2 = attributes.countUpSymbol2,
          countUpSymbol3 = attributes.countUpSymbol3,
          countUpSymbolAfter = attributes.countUpSymbolAfter,
          countUpSymbolAfter2 = attributes.countUpSymbolAfter2,
          countUpSymbolAfter3 = attributes.countUpSymbolAfter3,
          descText = attributes.descText,
          descText2 = attributes.descText2,
          descText3 = attributes.descText3,
          descTextColor = attributes.descTextColor,
          columns = attributes.columns,
          isPreview = attributes.isPreview;
        var countUpNameClass = ["advgb-count-up advgb-column-".concat(columns), id].filter(Boolean).join(' ');
        return isPreview ? /*#__PURE__*/React.createElement("img", {
          alt: __('Count Up', 'advanced-gutenberg'),
          width: "100%",
          src: previewImageData
        }) : /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(InspectorControls, null, /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Count Up Settings', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Color Settings', 'advanced-gutenberg'),
          initialOpen: false,
          colorSettings: [{
            label: __('Header Color', 'advanced-gutenberg'),
            value: headerTextColor,
            onChange: function onChange(value) {
              return setAttributes({
                headerTextColor: value
              });
            }
          }, {
            label: __('Count Up Color', 'advanced-gutenberg'),
            value: countUpNumberColor,
            onChange: function onChange(value) {
              return setAttributes({
                countUpNumberColor: value
              });
            }
          }, {
            label: __('Description Color', 'advanced-gutenberg'),
            value: descTextColor,
            onChange: function onChange(value) {
              return setAttributes({
                descTextColor: value
              });
            }
          }]
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Columns', 'advanced-gutenberg'),
          min: 1,
          max: 3,
          value: columns,
          onChange: function onChange(value) {
            return setAttributes({
              columns: value
            });
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Counter Number Size', 'advanced-gutenberg'),
          min: 10,
          max: 100,
          value: countUpNumberSize,
          onChange: function onChange(value) {
            return setAttributes({
              countUpNumberSize: value
            });
          }
        }), /*#__PURE__*/React.createElement("div", null, __('Counter Up Symbol', 'advanced-gutenberg')), /*#__PURE__*/React.createElement("div", {
          className: "advgb-col-3"
        }, /*#__PURE__*/React.createElement(TextControl, {
          value: countUpSymbol,
          onChange: function onChange(value) {
            return setAttributes({
              countUpSymbol: value
            });
          }
        }), /*#__PURE__*/React.createElement(FormToggle, {
          checked: countUpSymbolAfter,
          onChange: function onChange() {
            return setAttributes({
              countUpSymbolAfter: !countUpSymbolAfter
            });
          },
          title: !!countUpSymbolAfter ? __('After', 'advanced-gutenberg') : __('Before', 'advanced-gutenberg')
        })), parseInt(columns) > 1 && /*#__PURE__*/React.createElement("div", {
          className: "advgb-col-3"
        }, /*#__PURE__*/React.createElement(TextControl, {
          value: countUpSymbol2,
          onChange: function onChange(value) {
            return setAttributes({
              countUpSymbol2: value
            });
          }
        }), /*#__PURE__*/React.createElement(FormToggle, {
          checked: countUpSymbolAfter2,
          onChange: function onChange() {
            return setAttributes({
              countUpSymbolAfter2: !countUpSymbolAfter2
            });
          },
          title: !!countUpSymbolAfter2 ? __('After', 'advanced-gutenberg') : __('Before', 'advanced-gutenberg')
        })), parseInt(columns) > 2 && /*#__PURE__*/React.createElement("div", {
          className: "advgb-col-3"
        }, /*#__PURE__*/React.createElement(TextControl, {
          value: countUpSymbol3,
          onChange: function onChange(value) {
            return setAttributes({
              countUpSymbol3: value
            });
          }
        }), /*#__PURE__*/React.createElement(FormToggle, {
          checked: countUpSymbolAfter3,
          onChange: function onChange() {
            return setAttributes({
              countUpSymbolAfter3: !countUpSymbolAfter3
            });
          },
          title: !!countUpSymbolAfter3 ? __('After', 'advanced-gutenberg') : __('Before', 'advanced-gutenberg')
        })), /*#__PURE__*/React.createElement("p", {
          className: 'components-base-control__help',
          style: {
            clear: 'both'
          }
        }, __('Use toggle buttons above to define symbol placement before/after the number (toggle on is after).', 'advanced-gutenberg')))), /*#__PURE__*/React.createElement("div", {
          className: countUpNameClass,
          style: {
            display: 'flex'
          }
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-count-up-columns-one"
        }, /*#__PURE__*/React.createElement(RichText, {
          tagName: "h4",
          value: headerText,
          onChange: function onChange(value) {
            return setAttributes({
              headerText: value
            });
          },
          isSelected: isSelected && currentEdit === 'header',
          unstableOnFocus: function unstableOnFocus() {
            return _this2.setState({
              currentEdit: 'header'
            });
          },
          style: {
            color: headerTextColor
          },
          placeholder: __('Enter text…', 'advanced-gutenberg'),
          className: "advgb-count-up-header"
        }), /*#__PURE__*/React.createElement("div", {
          className: "advgb-counter"
        }, countUpSymbol && !countUpSymbolAfter && /*#__PURE__*/React.createElement("span", {
          className: "advgb-counter-symbol",
          style: {
            fontSize: countUpNumberSize,
            color: countUpNumberColor
          }
        }, countUpSymbol), /*#__PURE__*/React.createElement(RichText, {
          tagName: "div",
          value: countUpNumber,
          onChange: function onChange(value) {
            return setAttributes({
              countUpNumber: value
            });
          },
          isSelected: isSelected && currentEdit === 'countUp',
          unstableOnFocus: function unstableOnFocus() {
            return _this2.setState({
              currentEdit: 'countUp'
            });
          },
          style: {
            fontSize: countUpNumberSize + 'px',
            color: countUpNumberColor
          },
          className: "advgb-counter-number"
        }), countUpSymbol && countUpSymbolAfter && /*#__PURE__*/React.createElement("span", {
          className: "advgb-counter-symbol",
          style: {
            fontSize: countUpNumberSize,
            color: countUpNumberColor
          }
        }, countUpSymbol)), /*#__PURE__*/React.createElement(RichText, {
          tagName: "p",
          value: descText,
          onChange: function onChange(value) {
            return setAttributes({
              descText: value
            });
          },
          isSelected: isSelected && currentEdit === 'desc',
          unstableOnFocus: function unstableOnFocus() {
            return _this2.setState({
              currentEdit: 'desc'
            });
          },
          style: {
            color: descTextColor
          },
          placeholder: __('Enter text…', 'advanced-gutenberg'),
          className: "advgb-count-up-desc"
        })), /*#__PURE__*/React.createElement("div", {
          className: "advgb-count-up-columns-two"
        }, /*#__PURE__*/React.createElement(RichText, {
          tagName: "h4",
          value: headerText2,
          onChange: function onChange(value) {
            return setAttributes({
              headerText2: value
            });
          },
          isSelected: isSelected && currentEdit === 'header2',
          unstableOnFocus: function unstableOnFocus() {
            return _this2.setState({
              currentEdit: 'header2'
            });
          },
          style: {
            color: headerTextColor
          },
          placeholder: __('Enter text…', 'advanced-gutenberg'),
          className: "advgb-count-up-header"
        }), /*#__PURE__*/React.createElement("div", {
          className: "advgb-counter"
        }, countUpSymbol2 && !countUpSymbolAfter2 && /*#__PURE__*/React.createElement("span", {
          className: "advgb-counter-symbol",
          style: {
            fontSize: countUpNumberSize,
            color: countUpNumberColor
          }
        }, countUpSymbol2), /*#__PURE__*/React.createElement(RichText, {
          tagName: "div",
          value: countUpNumber2,
          onChange: function onChange(value) {
            return setAttributes({
              countUpNumber2: value
            });
          },
          isSelected: isSelected && currentEdit === 'countUp2',
          unstableOnFocus: function unstableOnFocus() {
            return _this2.setState({
              currentEdit: 'countUp2'
            });
          },
          style: {
            fontSize: countUpNumberSize + 'px',
            color: countUpNumberColor
          },
          className: "advgb-counter-number"
        }), countUpSymbol2 && countUpSymbolAfter2 && /*#__PURE__*/React.createElement("span", {
          className: "advgb-counter-symbol",
          style: {
            fontSize: countUpNumberSize,
            color: countUpNumberColor
          }
        }, countUpSymbol2)), /*#__PURE__*/React.createElement(RichText, {
          tagName: "p",
          value: descText2,
          onChange: function onChange(value) {
            return setAttributes({
              descText2: value
            });
          },
          isSelected: isSelected && currentEdit === 'desc2',
          unstableOnFocus: function unstableOnFocus() {
            return _this2.setState({
              currentEdit: 'desc2'
            });
          },
          style: {
            color: descTextColor
          },
          placeholder: __('Enter text…', 'advanced-gutenberg'),
          className: "advgb-count-up-desc"
        })), /*#__PURE__*/React.createElement("div", {
          className: "advgb-count-up-columns-three"
        }, /*#__PURE__*/React.createElement(RichText, {
          tagName: "h4",
          value: headerText3,
          onChange: function onChange(value) {
            return setAttributes({
              headerText3: value
            });
          },
          isSelected: isSelected && currentEdit === 'header3',
          unstableOnFocus: function unstableOnFocus() {
            return _this2.setState({
              currentEdit: 'header3'
            });
          },
          style: {
            color: headerTextColor
          },
          placeholder: __('Enter text…', 'advanced-gutenberg'),
          className: "advgb-count-up-header"
        }), /*#__PURE__*/React.createElement("div", {
          className: "advgb-counter"
        }, countUpSymbol3 && !countUpSymbolAfter3 && /*#__PURE__*/React.createElement("span", {
          className: "advgb-counter-symbol",
          style: {
            fontSize: countUpNumberSize,
            color: countUpNumberColor
          }
        }, countUpSymbol3), /*#__PURE__*/React.createElement(RichText, {
          tagName: "div",
          value: countUpNumber3,
          onChange: function onChange(value) {
            return setAttributes({
              countUpNumber3: value
            });
          },
          isSelected: isSelected && currentEdit === 'countUp3',
          unstableOnFocus: function unstableOnFocus() {
            return _this2.setState({
              currentEdit: 'countUp3'
            });
          },
          style: {
            fontSize: countUpNumberSize + 'px',
            color: countUpNumberColor
          },
          className: "advgb-counter-number"
        }), countUpSymbol3 && countUpSymbolAfter3 && /*#__PURE__*/React.createElement("span", {
          className: "advgb-counter-symbol",
          style: {
            fontSize: countUpNumberSize,
            color: countUpNumberColor
          }
        }, countUpSymbol3)), /*#__PURE__*/React.createElement(RichText, {
          tagName: "p",
          value: descText3,
          onChange: function onChange(value) {
            return setAttributes({
              descText3: value
            });
          },
          isSelected: isSelected && currentEdit === 'desc3',
          unstableOnFocus: function unstableOnFocus() {
            return _this2.setState({
              currentEdit: 'desc3'
            });
          },
          style: {
            color: descTextColor
          },
          placeholder: __('Enter text…', 'advanced-gutenberg'),
          className: "advgb-count-up-desc"
        }))));
      }
    }]);
  }(Component);
  var countUpBlockIcon = /*#__PURE__*/React.createElement("svg", {
    height: "20",
    viewBox: "2 2 22 22",
    width: "20",
    xmlns: "http://www.w3.org/2000/svg"
  }, /*#__PURE__*/React.createElement("path", {
    d: "M0 0h24v24H0zm0 0h24v24H0z",
    fill: "none"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M16.05 16.29l2.86-3.07c.38-.39.72-.79 1.04-1.18.32-.39.59-.78.82-1.17.23-.39.41-.78.54-1.17.13-.39.19-.79.19-1.18 0-.53-.09-1.02-.27-1.46-.18-.44-.44-.81-.78-1.11-.34-.31-.77-.54-1.26-.71-.51-.16-1.08-.24-1.72-.24-.69 0-1.31.11-1.85.32-.54.21-1 .51-1.36.88-.37.37-.65.8-.84 1.3-.18.47-.27.97-.28 1.5h2.14c.01-.31.05-.6.13-.87.09-.29.23-.54.4-.75.18-.21.41-.37.68-.49.27-.12.6-.18.96-.18.31 0 .58.05.81.15.23.1.43.25.59.43.16.18.28.4.37.65.08.25.13.52.13.81 0 .22-.03.43-.08.65-.06.22-.15.45-.29.7-.14.25-.32.53-.56.83-.23.3-.52.65-.88 1.03l-4.17 4.55V18H22v-1.71h-5.95zM8 7H6v4H2v2h4v4h2v-4h4v-2H8V7z"
  }));
  var blockAttrs = {
    id: {
      type: 'string'
    },
    headerText: {
      type: 'string',
      default: 'Header text'
    },
    headerText2: {
      type: 'string',
      default: 'Header text'
    },
    headerText3: {
      type: 'string',
      default: 'Header text'
    },
    headerTextColor: {
      type: 'string'
    },
    countUpNumber: {
      type: 'string',
      default: '56789'
    },
    countUpNumber2: {
      type: 'string',
      default: '56789'
    },
    countUpNumber3: {
      type: 'string',
      default: '56789'
    },
    countUpNumberColor: {
      type: 'string'
    },
    countUpNumberSize: {
      type: 'number',
      default: 55
    },
    countUpSymbol: {
      type: 'string'
    },
    countUpSymbol2: {
      type: 'string'
    },
    countUpSymbol3: {
      type: 'string'
    },
    countUpSymbolAfter: {
      type: 'boolean',
      default: false
    },
    countUpSymbolAfter2: {
      type: 'boolean',
      default: false
    },
    countUpSymbolAfter3: {
      type: 'boolean',
      default: false
    },
    descText: {
      type: 'string',
      default: 'and description'
    },
    descText2: {
      type: 'string',
      default: 'and description'
    },
    descText3: {
      type: 'string',
      default: 'and description'
    },
    descTextColor: {
      type: 'string'
    },
    columns: {
      type: 'number',
      default: 1
    },
    changed: {
      type: 'boolean',
      default: false
    },
    isPreview: {
      type: 'boolean',
      default: false
    }
  };
  registerBlockType('advgb/count-up', {
    apiVersion: 3,
    title: __('Count Up - PublishPress', 'advanced-gutenberg'),
    description: __('Create an animated display for important numbers.', 'advanced-gutenberg'),
    icon: {
      src: countUpBlockIcon,
      foreground: typeof advgbBlocks !== 'undefined' ? advgbBlocks.color : undefined
    },
    category: 'advgb-category',
    keywords: [__('numbers', 'advanced-gutenberg'), __('count', 'advanced-gutenberg'), __('increase', 'advanced-gutenberg')],
    attributes: blockAttrs,
    example: {
      attributes: {
        isPreview: true
      }
    },
    supports: {
      anchor: true
    },
    edit: AdvCountUp,
    save: function save(_ref) {
      var attributes = _ref.attributes;
      var id = attributes.id,
        headerText = attributes.headerText,
        headerText2 = attributes.headerText2,
        headerText3 = attributes.headerText3,
        headerTextColor = attributes.headerTextColor,
        countUpNumber = attributes.countUpNumber,
        countUpNumber2 = attributes.countUpNumber2,
        countUpNumber3 = attributes.countUpNumber3,
        countUpNumberColor = attributes.countUpNumberColor,
        countUpNumberSize = attributes.countUpNumberSize,
        countUpSymbol = attributes.countUpSymbol,
        countUpSymbol2 = attributes.countUpSymbol2,
        countUpSymbol3 = attributes.countUpSymbol3,
        countUpSymbolAfter = attributes.countUpSymbolAfter,
        countUpSymbolAfter2 = attributes.countUpSymbolAfter2,
        countUpSymbolAfter3 = attributes.countUpSymbolAfter3,
        descText = attributes.descText,
        descText2 = attributes.descText2,
        descText3 = attributes.descText3,
        descTextColor = attributes.descTextColor,
        columns = attributes.columns;
      var countSymbolElm = countUpSymbol ? /*#__PURE__*/React.createElement("span", {
        className: "advgb-counter-symbol"
      }, countUpSymbol) : '';
      var countSymbolElm2 = countUpSymbol2 ? /*#__PURE__*/React.createElement("span", {
        className: "advgb-counter-symbol"
      }, countUpSymbol2) : '';
      var countSymbolElm3 = countUpSymbol3 ? /*#__PURE__*/React.createElement("span", {
        className: "advgb-counter-symbol"
      }, countUpSymbol3) : '';
      var countUpNameClass = ['advgb-count-up', id].filter(Boolean).join(' ');
      return /*#__PURE__*/React.createElement("div", {
        className: countUpNameClass,
        style: {
          display: 'flex'
        }
      }, /*#__PURE__*/React.createElement("div", {
        className: "advgb-count-up-columns-one"
      }, /*#__PURE__*/React.createElement(RichText.Content, {
        tagName: "h4",
        value: headerText,
        style: {
          color: headerTextColor
        },
        className: "advgb-count-up-header"
      }), /*#__PURE__*/React.createElement("div", {
        className: "advgb-counter",
        style: {
          color: countUpNumberColor,
          fontSize: countUpNumberSize + 'px'
        }
      }, !countUpSymbolAfter && countSymbolElm, /*#__PURE__*/React.createElement(RichText.Content, {
        tagName: "span",
        value: countUpNumber,
        className: "advgb-counter-number"
      }), !!countUpSymbolAfter && countSymbolElm), /*#__PURE__*/React.createElement(RichText.Content, {
        tagName: "p",
        value: descText,
        style: {
          color: descTextColor
        },
        className: "advgb-count-up-desc"
      })), parseInt(columns) > 1 && /*#__PURE__*/React.createElement("div", {
        className: "advgb-count-up-columns-two"
      }, /*#__PURE__*/React.createElement(RichText.Content, {
        tagName: "h4",
        value: headerText2,
        style: {
          color: headerTextColor
        },
        className: "advgb-count-up-header"
      }), /*#__PURE__*/React.createElement("div", {
        className: "advgb-counter",
        style: {
          color: countUpNumberColor,
          fontSize: countUpNumberSize + 'px'
        }
      }, !countUpSymbolAfter2 && countSymbolElm2, /*#__PURE__*/React.createElement(RichText.Content, {
        tagName: "span",
        value: countUpNumber2,
        className: "advgb-counter-number"
      }), !!countUpSymbolAfter2 && countSymbolElm2), /*#__PURE__*/React.createElement(RichText.Content, {
        tagName: "p",
        value: descText2,
        style: {
          color: descTextColor
        },
        className: "advgb-count-up-desc"
      })), parseInt(columns) > 2 && /*#__PURE__*/React.createElement("div", {
        className: "advgb-count-up-columns-three"
      }, /*#__PURE__*/React.createElement(RichText.Content, {
        tagName: "h4",
        value: headerText3,
        style: {
          color: headerTextColor
        },
        className: "advgb-count-up-header"
      }), /*#__PURE__*/React.createElement("div", {
        className: "advgb-counter",
        style: {
          color: countUpNumberColor,
          fontSize: countUpNumberSize + 'px'
        }
      }, !countUpSymbolAfter3 && countSymbolElm3, /*#__PURE__*/React.createElement(RichText.Content, {
        tagName: "span",
        value: countUpNumber3,
        className: "advgb-counter-number"
      }), !!countUpSymbolAfter3 && countSymbolElm3), /*#__PURE__*/React.createElement(RichText.Content, {
        tagName: "p",
        value: descText3,
        style: {
          color: descTextColor
        },
        className: "advgb-count-up-desc"
      })));
    },
    deprecated: [{
      attributes: blockAttrs,
      save: function save(_ref2) {
        var attributes = _ref2.attributes;
        var headerText = attributes.headerText,
          headerText2 = attributes.headerText2,
          headerText3 = attributes.headerText3,
          headerTextColor = attributes.headerTextColor,
          countUpNumber = attributes.countUpNumber,
          countUpNumber2 = attributes.countUpNumber2,
          countUpNumber3 = attributes.countUpNumber3,
          countUpNumberColor = attributes.countUpNumberColor,
          countUpNumberSize = attributes.countUpNumberSize,
          countUpSymbol = attributes.countUpSymbol,
          countUpSymbol2 = attributes.countUpSymbol2,
          countUpSymbol3 = attributes.countUpSymbol3,
          countUpSymbolAfter = attributes.countUpSymbolAfter,
          countUpSymbolAfter2 = attributes.countUpSymbolAfter2,
          countUpSymbolAfter3 = attributes.countUpSymbolAfter3,
          descText = attributes.descText,
          descText2 = attributes.descText2,
          descText3 = attributes.descText3,
          descTextColor = attributes.descTextColor,
          columns = attributes.columns;
        var countSymbolElm = countUpSymbol ? /*#__PURE__*/React.createElement("span", {
          className: "advgb-counter-symbol"
        }, countUpSymbol) : '';
        var countSymbolElm2 = countUpSymbol2 ? /*#__PURE__*/React.createElement("span", {
          className: "advgb-counter-symbol"
        }, countUpSymbol2) : '';
        var countSymbolElm3 = countUpSymbol3 ? /*#__PURE__*/React.createElement("span", {
          className: "advgb-counter-symbol"
        }, countUpSymbol3) : '';
        return /*#__PURE__*/React.createElement("div", {
          className: "advgb-count-up",
          style: {
            display: 'flex'
          }
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-count-up-columns-one",
          style: {
            textAlign: 'center'
          }
        }, /*#__PURE__*/React.createElement(RichText.Content, {
          tagName: "h4",
          value: headerText,
          style: {
            color: headerTextColor
          },
          className: "advgb-count-up-header"
        }), /*#__PURE__*/React.createElement("div", {
          className: "advgb-counter",
          style: {
            color: countUpNumberColor,
            fontSize: countUpNumberSize + 'px'
          }
        }, !countUpSymbolAfter && countSymbolElm, /*#__PURE__*/React.createElement("span", {
          className: "advgb-counter-number"
        }, countUpNumber), !!countUpSymbolAfter && countSymbolElm), /*#__PURE__*/React.createElement(RichText.Content, {
          tagName: "p",
          value: descText,
          style: {
            color: descTextColor
          },
          className: "advgb-count-up-desc"
        })), parseInt(columns) > 1 && /*#__PURE__*/React.createElement("div", {
          className: "advgb-count-up-columns-two",
          style: {
            textAlign: 'center'
          }
        }, /*#__PURE__*/React.createElement(RichText.Content, {
          tagName: "h4",
          value: headerText2,
          style: {
            color: headerTextColor
          },
          className: "advgb-count-up-header"
        }), /*#__PURE__*/React.createElement("div", {
          className: "advgb-counter",
          style: {
            color: countUpNumberColor,
            fontSize: countUpNumberSize + 'px'
          }
        }, !countUpSymbolAfter2 && countSymbolElm2, /*#__PURE__*/React.createElement("span", {
          className: "advgb-counter-number"
        }, countUpNumber2), !!countUpSymbolAfter2 && countSymbolElm2), /*#__PURE__*/React.createElement(RichText.Content, {
          tagName: "p",
          value: descText2,
          style: {
            color: descTextColor
          },
          className: "advgb-count-up-desc"
        })), parseInt(columns) > 2 && /*#__PURE__*/React.createElement("div", {
          className: "advgb-count-up-columns-three",
          style: {
            textAlign: 'center'
          }
        }, /*#__PURE__*/React.createElement(RichText.Content, {
          tagName: "h4",
          value: headerText3,
          style: {
            color: headerTextColor
          },
          className: "advgb-count-up-header"
        }), /*#__PURE__*/React.createElement("div", {
          className: "advgb-counter",
          style: {
            color: countUpNumberColor,
            fontSize: countUpNumberSize + 'px'
          }
        }, !countUpSymbolAfter3 && countSymbolElm3, /*#__PURE__*/React.createElement("span", {
          className: "advgb-counter-number"
        }, countUpNumber3), !!countUpSymbolAfter3 && countSymbolElm3), /*#__PURE__*/React.createElement(RichText.Content, {
          tagName: "p",
          value: descText3,
          style: {
            color: descTextColor
          },
          className: "advgb-count-up-desc"
        })));
      }
    }]
  });
})(wp.i18n, wp.blocks, wp.element, wp.blockEditor, wp.components);

/***/ },

/***/ "./assets/blocks/images-slider/block.jsx"
/*!***********************************************!*\
  !*** ./assets/blocks/images-slider/block.jsx ***!
  \***********************************************/
() {

function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _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 _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
(function (wpI18n, wpBlocks, wpElement, wpBlockEditor, wpComponents) {
  wpBlockEditor = wp.blockEditor || wp.editor;
  var __ = wpI18n.__;
  var Component = wpElement.Component,
    Fragment = wpElement.Fragment;
  var registerBlockType = wpBlocks.registerBlockType;
  var _wpBlockEditor = wpBlockEditor,
    InspectorControls = _wpBlockEditor.InspectorControls,
    PanelColorSettings = _wpBlockEditor.PanelColorSettings,
    MediaUpload = _wpBlockEditor.MediaUpload,
    RichText = _wpBlockEditor.RichText;
  var PanelBody = wpComponents.PanelBody,
    RangeControl = wpComponents.RangeControl,
    ToggleControl = wpComponents.ToggleControl,
    SelectControl = wpComponents.SelectControl,
    TextControl = wpComponents.TextControl,
    TextareaControl = wpComponents.TextareaControl,
    Button = wpComponents.Button,
    Placeholder = wpComponents.Placeholder,
    Tooltip = wpComponents.Tooltip;
  var $ = jQuery;
  var imageSliderBlockIcon = /*#__PURE__*/React.createElement("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    width: "20",
    height: "20",
    viewBox: "2 2 22 22",
    className: "dashicon"
  }, /*#__PURE__*/React.createElement("path", {
    fill: "none",
    d: "M0 0h24v24H0V0z"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M20 4h-3.17L15 2H9L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM9.88 4h4.24l1.83 2H20v12H4V6h4.05"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M15 11H9V8.5L5.5 12 9 15.5V13h6v2.5l3.5-3.5L15 8.5z"
  }));
  var previewImageData = 'data:image/png;base64, ';
  var AdvImageSlider = /*#__PURE__*/function (_Component) {
    function AdvImageSlider() {
      var _this;
      _classCallCheck(this, AdvImageSlider);
      _this = _callSuper(this, AdvImageSlider, arguments);
      _this.state = {
        currentSelected: 0,
        imageLoaded: false,
        isBlockIdSet: false // @since 3.2.3
      };
      _this.initSlider = _this.initSlider.bind(_this);
      return _this;
    }
    _inherits(AdvImageSlider, _Component);
    return _createClass(AdvImageSlider, [{
      key: "componentWillMount",
      value: function componentWillMount() {
        var _this$props = this.props,
          attributes = _this$props.attributes,
          setAttributes = _this$props.setAttributes;
        var currentBlockConfig = advgbDefaultConfig['advgb-images-slider'];

        // No override attributes of blocks inserted before
        if (attributes.changed !== true) {
          if (_typeof(currentBlockConfig) === 'object' && currentBlockConfig !== null) {
            Object.keys(currentBlockConfig).map(function (attribute) {
              if (typeof attributes[attribute] === 'boolean') {
                attributes[attribute] = !!currentBlockConfig[attribute];
              } else {
                attributes[attribute] = currentBlockConfig[attribute];
              }
            });
          }

          // Finally set changed attribute to true, so we don't modify anything again
          setAttributes({
            changed: true
          });
        }
      }
    }, {
      key: "componentDidMount",
      value: function componentDidMount() {
        var _this$props2 = this.props,
          attributes = _this$props2.attributes,
          setAttributes = _this$props2.setAttributes,
          clientId = _this$props2.clientId;
        if (attributes.images.length) {
          this.initSlider();
        }

        // Reset attributes when Pro is not available
        if (advgbBlocks.advgb_pro !== 'undefined' && advgbBlocks.advgb_pro !== '1') {
          setAttributes({
            titleTag: 'h4',
            titleShow: true,
            textTag: 'p'
          });
        }
      }
    }, {
      key: "componentWillUpdate",
      value: function componentWillUpdate(nextProps) {
        var _this$props3 = this.props,
          clientId = _this$props3.clientId,
          attributes = _this$props3.attributes;
        var images = attributes.images;
        var nextImages = nextProps.attributes.images;
        if (images.length !== nextImages.length) {
          $("#block-".concat(clientId, " .advgb-images-slider.slick-initialized")).slick('unslick');
          $("#block-".concat(clientId, " .advgb-image-slider-item")).removeAttr('tabindex').removeAttr('role').removeAttr('aria-describedby');
        }
      }
    }, {
      key: "componentDidUpdate",
      value: function componentDidUpdate(prevProps) {
        var _this$props4 = this.props,
          attributes = _this$props4.attributes,
          setAttributes = _this$props4.setAttributes,
          clientId = _this$props4.clientId;
        var images = attributes.images,
          autoplay = attributes.autoplay,
          autoplaySpeed = attributes.autoplaySpeed;
        var prevImages = prevProps.attributes.images;

        // @since 3.2.3 - https://github.com/publishpress/PublishPress-Blocks/issues/1389
        if (!this.state.isBlockIdSet) {
          setAttributes({
            id: 'advg-images-slider-' + clientId
          });
          this.setState({
            isBlockIdSet: true
          });
        }
        if (images.length !== prevImages.length) {
          if (images.length) {
            this.initSlider();
          }
        }

        // Autoplay
        if (autoplay && advgbBlocks.advgb_pro !== 'undefined' && advgbBlocks.advgb_pro === '1') {
          $("#block-".concat(clientId, " .advgb-images-slider.slick-initialized")).slick('slickSetOption', 'autoplay', true, true);
        } else {
          $("#block-".concat(clientId, " .advgb-images-slider.slick-initialized")).slick('slickSetOption', 'autoplay', false, true);
        }

        // Autoplay speed
        if (autoplay && autoplaySpeed && advgbBlocks.advgb_pro !== 'undefined' && advgbBlocks.advgb_pro === '1') {
          $("#block-".concat(clientId, " .advgb-images-slider.slick-initialized")).slick('slickSetOption', 'autoplaySpeed', autoplaySpeed, true);
        } else {
          $("#block-".concat(clientId, " .advgb-images-slider.slick-initialized")).slick('slickSetOption', 'autoplaySpeed', 3000, true);
        }
        if (this.state.imageLoaded) {
          $("#block-".concat(clientId, " .advgb-image-slider-image-list ")).find('.advgb-image-slider-image-list-item:first-child').find('.advgb-image-slider-image-list-img').trigger('click');
          this.setState({
            imageLoaded: null
          });
        }
      }
    }, {
      key: "initSlider",
      value: function initSlider() {
        var _this2 = this;
        var clientId = this.props.clientId;
        $("#block-".concat(clientId, " .advgb-images-slider:not(.slick-initialized)")).slick({
          dots: true,
          adaptiveHeight: true
        });
        $("#block-".concat(clientId, " .advgb-images-slider")).on('afterChange', function (e, s, currentSlide) {
          if (_this2.state.currentSelected !== currentSlide) {
            _this2.setState({
              currentSelected: currentSlide
            });
          }
        });
      }
    }, {
      key: "moveImage",
      value: function moveImage(currentIndex, newIndex) {
        var _this$props5 = this.props,
          setAttributes = _this$props5.setAttributes,
          attributes = _this$props5.attributes;
        var images = attributes.images;
        var image = images[currentIndex];
        setAttributes({
          images: [].concat(_toConsumableArray(images.filter(function (img, idx) {
            return idx !== currentIndex;
          }).slice(0, newIndex)), [image], _toConsumableArray(images.filter(function (img, idx) {
            return idx !== currentIndex;
          }).slice(newIndex)))
        });
      }
    }, {
      key: "updateImagesData",
      value: function updateImagesData(data) {
        var currentSelected = this.state.currentSelected;
        if (typeof currentSelected !== 'number') {
          return null;
        }
        var _this$props6 = this.props,
          attributes = _this$props6.attributes,
          setAttributes = _this$props6.setAttributes;
        var images = attributes.images;
        var newImages = images.map(function (image, index) {
          if (index === currentSelected) {
            image = _objectSpread(_objectSpread({}, image), data);
          }
          return image;
        });
        setAttributes({
          images: newImages
        });
      }
    }, {
      key: "render",
      value: function render() {
        var _this3 = this;
        var _this$props7 = this.props,
          attributes = _this$props7.attributes,
          setAttributes = _this$props7.setAttributes,
          isSelected = _this$props7.isSelected,
          clientId = _this$props7.clientId;
        var _this$state = this.state,
          currentSelected = _this$state.currentSelected,
          imageLoaded = _this$state.imageLoaded;
        var images = attributes.images,
          actionOnClick = attributes.actionOnClick,
          fullWidth = attributes.fullWidth,
          autoHeight = attributes.autoHeight,
          width = attributes.width,
          height = attributes.height,
          alwaysShowOverlay = attributes.alwaysShowOverlay,
          rtl = attributes.rtl,
          hoverColor = attributes.hoverColor,
          titleColor = attributes.titleColor,
          textColor = attributes.textColor,
          hAlign = attributes.hAlign,
          vAlign = attributes.vAlign,
          isPreview = attributes.isPreview,
          autoplay = attributes.autoplay,
          autoplaySpeed = attributes.autoplaySpeed,
          id = attributes.id,
          titleTag = attributes.titleTag,
          titleShow = attributes.titleShow,
          textTag = attributes.textTag;
        if (images.length === 0) {
          return isPreview ? /*#__PURE__*/React.createElement("img", {
            alt: __('Images Slider', 'advanced-gutenberg'),
            width: "100%",
            src: previewImageData
          }) : /*#__PURE__*/React.createElement(Placeholder, {
            icon: imageSliderBlockIcon,
            label: __('Image Slider Block', 'advanced-gutenberg'),
            instructions: __('No images selected. Adding images to start using this block.', 'advanced-gutenberg')
          }, /*#__PURE__*/React.createElement(MediaUpload, {
            allowedTypes: ['image'],
            value: null,
            multiple: true,
            onSelect: function onSelect(image) {
              var imgInsert = image.map(function (img) {
                return {
                  url: img.url,
                  id: img.id,
                  title: img.title || img.alt,
                  text: img.caption || img.description
                };
              });
              setAttributes({
                images: [].concat(_toConsumableArray(images), _toConsumableArray(imgInsert))
              });
            },
            render: function render(_ref) {
              var open = _ref.open;
              return /*#__PURE__*/React.createElement(Button, {
                className: "button button-large button-primary",
                onClick: open
              }, __('Add images', 'advanced-gutenberg'));
            }
          }));
        }
        var blockClass = ['advgb-images-slider-block', imageLoaded === false && 'advgb-ajax-loading', id].filter(Boolean).join(' ');
        return isPreview ? /*#__PURE__*/React.createElement("img", {
          alt: __('Images Slider', 'advanced-gutenberg'),
          width: "100%",
          src: previewImageData
        }) : /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(InspectorControls, null, /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Image Settings', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Action on click', 'advanced-gutenberg'),
          value: actionOnClick,
          options: [{
            label: __('None', 'advanced-gutenberg'),
            value: ''
          }, {
            label: __('Open image in lightbox', 'advanced-gutenberg'),
            value: 'lightbox'
          }, {
            label: __('Open custom link', 'advanced-gutenberg'),
            value: 'link'
          }],
          onChange: function onChange(value) {
            return setAttributes({
              actionOnClick: value
            });
          }
        }), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Full width', 'advanced-gutenberg'),
          checked: fullWidth,
          onChange: function onChange() {
            return setAttributes({
              fullWidth: !fullWidth
            });
          }
        }), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Auto height', 'advanced-gutenberg'),
          checked: autoHeight,
          onChange: function onChange() {
            return setAttributes({
              autoHeight: !autoHeight
            });
          }
        }), !fullWidth && /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Width', 'advanced-gutenberg'),
          value: width,
          onChange: function onChange(value) {
            return setAttributes({
              width: value
            });
          },
          min: 200,
          max: 1300
        }), !autoHeight && /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Height', 'advanced-gutenberg'),
          value: height,
          onChange: function onChange(value) {
            return setAttributes({
              height: value
            });
          },
          min: 100,
          max: 1000
        }), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Always show overlay', 'advanced-gutenberg'),
          checked: alwaysShowOverlay,
          onChange: function onChange() {
            return setAttributes({
              alwaysShowOverlay: !alwaysShowOverlay
            });
          }
        }), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Enable RTL', 'advanced-gutenberg'),
          checked: rtl,
          onChange: function onChange() {
            return setAttributes({
              rtl: !rtl
            });
          }
        })), /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Color Settings', 'advanced-gutenberg'),
          colorSettings: [{
            label: __('Hover Color', 'advanced-gutenberg'),
            value: hoverColor,
            onChange: function onChange(value) {
              return setAttributes({
                hoverColor: value
              });
            }
          }, {
            label: __('Title Color', 'advanced-gutenberg'),
            value: titleColor,
            onChange: function onChange(value) {
              return setAttributes({
                titleColor: value
              });
            }
          }, {
            label: __('Text Color', 'advanced-gutenberg'),
            value: textColor,
            onChange: function onChange(value) {
              return setAttributes({
                textColor: value
              });
            }
          }]
        }), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Text Alignment', 'advanced-gutenberg'),
          initialOpen: false
        }, /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Vertical Alignment', 'advanced-gutenberg'),
          value: vAlign,
          options: [{
            label: __('Top', 'advanced-gutenberg'),
            value: 'flex-start'
          }, {
            label: __('Center', 'advanced-gutenberg'),
            value: 'center'
          }, {
            label: __('Bottom', 'advanced-gutenberg'),
            value: 'flex-end'
          }],
          onChange: function onChange(value) {
            return setAttributes({
              vAlign: value
            });
          }
        }), /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Horizontal Alignment', 'advanced-gutenberg'),
          value: hAlign,
          options: [{
            label: __('Left', 'advanced-gutenberg'),
            value: 'flex-start'
          }, {
            label: __('Center', 'advanced-gutenberg'),
            value: 'center'
          }, {
            label: __('Right', 'advanced-gutenberg'),
            value: 'flex-end'
          }],
          onChange: function onChange(value) {
            return setAttributes({
              hAlign: value
            });
          }
        }))), /*#__PURE__*/React.createElement("div", {
          className: blockClass
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-images-slider",
          dir: rtl ? 'rtl' : 'ltr'
        }, images.map(function (image, index) {
          return /*#__PURE__*/React.createElement("div", {
            className: "advgb-image-slider-item",
            key: index
          }, /*#__PURE__*/React.createElement("img", {
            src: image.url,
            className: "advgb-image-slider-img",
            alt: image.title,
            style: {
              width: fullWidth ? '100%' : width,
              height: autoHeight ? 'auto' : height
            },
            onLoad: function onLoad() {
              if (index === 0) {
                if (_this3.state.imageLoaded === false) {
                  _this3.setState({
                    imageLoaded: true
                  });
                }
              }
            },
            onError: function onError() {
              if (index === 0) {
                if (_this3.state.imageLoaded === false) {
                  _this3.setState({
                    imageLoaded: true
                  });
                }
              }
            }
          }), /*#__PURE__*/React.createElement("div", {
            className: "advgb-image-slider-item-info",
            style: {
              justifyContent: vAlign,
              alignItems: hAlign
            }
          }, (actionOnClick !== '' || alwaysShowOverlay) && /*#__PURE__*/React.createElement("span", {
            className: "advgb-image-slider-overlay",
            style: {
              backgroundColor: hoverColor,
              opacity: alwaysShowOverlay ? 0.5 : undefined
            }
          }), image.title && titleShow && /*#__PURE__*/React.createElement(RichText, {
            tagName: titleTag,
            className: "advgb-image-slider-title",
            style: {
              color: titleColor
            },
            value: image.title,
            onChange: function onChange(value) {
              return _this3.updateImagesData({
                title: value || ''
              });
            },
            allowedFormats: []
          }), image.text && /*#__PURE__*/React.createElement(RichText, {
            tagName: textTag,
            className: "advgb-image-slider-text",
            style: {
              color: textColor
            },
            value: image.text,
            onChange: function onChange(value) {
              return _this3.updateImagesData({
                text: value || ''
              });
            },
            allowedFormats: []
          })));
        })), isSelected && /*#__PURE__*/React.createElement("div", {
          className: "advgb-image-slider-controls"
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-image-slider-control"
        }, /*#__PURE__*/React.createElement(TextControl, {
          label: __('Title', 'advanced-gutenberg'),
          value: images[currentSelected] ? images[currentSelected].title || '' : '',
          onChange: function onChange(value) {
            return _this3.updateImagesData({
              title: value || ''
            });
          }
        })), /*#__PURE__*/React.createElement("div", {
          className: "advgb-image-slider-control"
        }, /*#__PURE__*/React.createElement(TextareaControl, {
          label: __('Text', 'advanced-gutenberg'),
          value: images[currentSelected] ? images[currentSelected].text || '' : '',
          onChange: function onChange(value) {
            return _this3.updateImagesData({
              text: value || ''
            });
          }
        })), actionOnClick === 'link' && /*#__PURE__*/React.createElement("div", {
          className: "advgb-image-slider-control"
        }, /*#__PURE__*/React.createElement(TextControl, {
          label: __('Link', 'advanced-gutenberg'),
          value: images[currentSelected] ? images[currentSelected].link || '' : '',
          onChange: function onChange(value) {
            return _this3.updateImagesData({
              link: value || ''
            });
          }
        })), /*#__PURE__*/React.createElement("div", {
          className: "advgb-image-slider-image-list"
        }, images.map(function (image, index) {
          return /*#__PURE__*/React.createElement("div", {
            className: "advgb-image-slider-image-list-item",
            key: index
          }, index > 0 && /*#__PURE__*/React.createElement(Tooltip, {
            text: __('Move Left', 'advanced-gutenberg')
          }, /*#__PURE__*/React.createElement("span", {
            className: "advgb-move-arrow advgb-move-left",
            onClick: function onClick() {
              return _this3.moveImage(index, index - 1);
            }
          }, /*#__PURE__*/React.createElement("svg", {
            xmlns: "http://www.w3.org/2000/svg",
            width: "24",
            height: "24",
            viewBox: "0 0 24 24"
          }, /*#__PURE__*/React.createElement("path", {
            fill: "none",
            d: "M0 0h24v24H0V0z"
          }), /*#__PURE__*/React.createElement("path", {
            d: "M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"
          })))), /*#__PURE__*/React.createElement("img", {
            src: image.url,
            className: "advgb-image-slider-image-list-img",
            alt: __('Image', 'advanced-gutenberg'),
            onClick: function onClick() {
              $("#block-".concat(clientId, " .advgb-images-slider")).slick('slickGoTo', index, false);
              _this3.setState({
                currentSelected: index
              });
            }
          }), index + 1 < images.length && /*#__PURE__*/React.createElement(Tooltip, {
            text: __('Move Right', 'advanced-gutenberg')
          }, /*#__PURE__*/React.createElement("span", {
            className: "advgb-move-arrow advgb-move-right",
            onClick: function onClick() {
              return _this3.moveImage(index, index + 1);
            }
          }, /*#__PURE__*/React.createElement("svg", {
            xmlns: "http://www.w3.org/2000/svg",
            width: "24",
            height: "24",
            viewBox: "0 0 24 24"
          }, /*#__PURE__*/React.createElement("path", {
            fill: "none",
            d: "M0 0h24v24H0V0z"
          }), /*#__PURE__*/React.createElement("path", {
            d: "M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"
          })))), /*#__PURE__*/React.createElement(Tooltip, {
            text: __('Remove image', 'advanced-gutenberg')
          }, /*#__PURE__*/React.createElement(Button, {
            className: "advgb-image-slider-image-list-item-remove",
            icon: "no",
            onClick: function onClick() {
              if (index === currentSelected) _this3.setState({
                currentSelected: null
              });
              setAttributes({
                images: images.filter(function (img, idx) {
                  return idx !== index;
                })
              });
            }
          })));
        }), /*#__PURE__*/React.createElement("div", {
          className: "advgb-image-slider-add-item"
        }, /*#__PURE__*/React.createElement(MediaUpload, {
          allowedTypes: ['image'],
          value: currentSelected,
          multiple: true,
          onSelect: function onSelect(imgs) {
            setAttributes({
              images: [].concat(_toConsumableArray(images), _toConsumableArray(imgs.map(function (img) {
                return {
                  url: img.url,
                  id: img.id,
                  title: img.title || img.alt,
                  text: img.caption || img.description
                };
              })))
            });
          },
          render: function render(_ref2) {
            var open = _ref2.open;
            return /*#__PURE__*/React.createElement(Button, {
              label: __('Add image', 'advanced-gutenberg'),
              icon: "plus",
              onClick: open
            });
          }
        }))))));
      }
    }]);
  }(Component);
  var blockAttrs = {
    images: {
      type: 'array',
      default: [] // [ { id: int, url, title, text, link: string } ]
    },
    actionOnClick: {
      type: 'string',
      default: ''
    },
    fullWidth: {
      type: 'boolean',
      default: true
    },
    autoHeight: {
      type: 'boolean',
      default: true
    },
    width: {
      type: 'number',
      default: 700
    },
    height: {
      type: 'number',
      default: 500
    },
    alwaysShowOverlay: {
      type: 'boolean',
      default: false
    },
    rtl: {
      type: 'boolean',
      default: false
    },
    hoverColor: {
      type: 'string'
    },
    titleColor: {
      type: 'string'
    },
    textColor: {
      type: 'string'
    },
    vAlign: {
      type: 'string',
      default: 'center'
    },
    hAlign: {
      type: 'string',
      default: 'center'
    },
    autoplay: {
      type: 'boolean',
      default: false
    },
    autoplaySpeed: {
      type: 'number',
      default: 3000
    },
    changed: {
      type: 'boolean',
      default: false
    },
    id: {
      type: 'string'
    },
    isPreview: {
      type: 'boolean',
      default: false
    },
    titleTag: {
      type: 'string',
      default: 'h4'
    },
    titleShow: {
      type: 'boolean',
      default: true
    },
    textTag: {
      type: 'string',
      default: 'p'
    }
  };
  registerBlockType('advgb/images-slider', {
    apiVersion: 3,
    title: __('Images Slider - PublishPress', 'advanced-gutenberg'),
    description: __('Display your images in a slider.', 'advanced-gutenberg'),
    icon: {
      src: imageSliderBlockIcon,
      foreground: typeof advgbBlocks !== 'undefined' ? advgbBlocks.color : undefined
    },
    category: 'advgb-category',
    keywords: [__('slide', 'advanced-gutenberg'), __('gallery', 'advanced-gutenberg'), __('photos', 'advanced-gutenberg')],
    attributes: blockAttrs,
    example: {
      attributes: {
        isPreview: true
      }
    },
    supports: {
      anchor: true
    },
    edit: AdvImageSlider,
    save: function save(_ref3) {
      var attributes = _ref3.attributes;
      var images = attributes.images,
        actionOnClick = attributes.actionOnClick,
        fullWidth = attributes.fullWidth,
        autoHeight = attributes.autoHeight,
        width = attributes.width,
        height = attributes.height,
        alwaysShowOverlay = attributes.alwaysShowOverlay,
        rtl = attributes.rtl,
        hoverColor = attributes.hoverColor,
        titleColor = attributes.titleColor,
        textColor = attributes.textColor,
        hAlign = attributes.hAlign,
        vAlign = attributes.vAlign,
        id = attributes.id,
        titleTag = attributes.titleTag,
        titleShow = attributes.titleShow,
        textTag = attributes.textTag;
      var blockClassName = ['advgb-images-slider-block', actionOnClick === 'lightbox' && 'advgb-images-slider-lightbox', id].filter(Boolean).join(' ');
      return /*#__PURE__*/React.createElement("div", {
        className: blockClassName
      }, /*#__PURE__*/React.createElement("div", {
        className: "advgb-images-slider",
        dir: rtl ? 'rtl' : 'ltr'
      }, images.map(function (image, index) {
        return /*#__PURE__*/React.createElement("div", {
          className: "advgb-image-slider-item",
          key: index
        }, /*#__PURE__*/React.createElement("img", {
          src: image.url,
          className: "advgb-image-slider-img",
          alt: image.title,
          style: {
            width: fullWidth ? '100%' : width,
            height: autoHeight ? 'auto' : height
          }
        }), /*#__PURE__*/React.createElement("div", {
          className: "advgb-image-slider-item-info",
          style: {
            justifyContent: vAlign,
            alignItems: hAlign
          }
        }, (actionOnClick !== '' || alwaysShowOverlay) && /*#__PURE__*/React.createElement("a", {
          className: "advgb-image-slider-overlay",
          target: actionOnClick !== '' ? '_blank' : false,
          rel: "noopener noreferrer",
          href: actionOnClick === 'link' && !!image.link ? image.link : '#',
          style: {
            backgroundColor: hoverColor,
            opacity: alwaysShowOverlay ? 0.5 : undefined
          }
        }), image.title && titleShow && /*#__PURE__*/React.createElement(RichText.Content, {
          tagName: titleTag,
          className: "advgb-image-slider-title",
          style: {
            color: titleColor
          },
          value: image.title
        }), image.text && /*#__PURE__*/React.createElement(RichText.Content, {
          tagName: textTag,
          className: "advgb-image-slider-text",
          style: {
            color: textColor
          },
          value: image.text
        })));
      })));
    },
    deprecated: [{
      attributes: blockAttrs,
      supports: {
        anchor: true
      },
      save: function save(_ref4) {
        var attributes = _ref4.attributes;
        var images = attributes.images,
          actionOnClick = attributes.actionOnClick,
          fullWidth = attributes.fullWidth,
          autoHeight = attributes.autoHeight,
          width = attributes.width,
          height = attributes.height,
          alwaysShowOverlay = attributes.alwaysShowOverlay,
          rtl = attributes.rtl,
          hoverColor = attributes.hoverColor,
          titleColor = attributes.titleColor,
          textColor = attributes.textColor,
          hAlign = attributes.hAlign,
          vAlign = attributes.vAlign;
        var blockClassName = ['advgb-images-slider-block', actionOnClick === 'lightbox' && 'advgb-images-slider-lightbox'].filter(Boolean).join(' ');
        return /*#__PURE__*/React.createElement("div", {
          className: blockClassName
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-images-slider",
          "data-slick": "{\"rtl\": ".concat(rtl, "}")
        }, images.map(function (image, index) {
          return /*#__PURE__*/React.createElement("div", {
            className: "advgb-image-slider-item",
            key: index
          }, /*#__PURE__*/React.createElement("img", {
            src: image.url,
            className: "advgb-image-slider-img",
            alt: image.title,
            style: {
              width: fullWidth ? '100%' : width,
              height: autoHeight ? 'auto' : height
            }
          }), /*#__PURE__*/React.createElement("div", {
            className: "advgb-image-slider-item-info",
            style: {
              justifyContent: vAlign,
              alignItems: hAlign
            }
          }, (actionOnClick !== '' || alwaysShowOverlay) && /*#__PURE__*/React.createElement("a", {
            className: "advgb-image-slider-overlay",
            target: actionOnClick !== '' ? '_blank' : false,
            rel: "noopener noreferrer",
            href: actionOnClick === 'link' && !!image.link ? image.link : '#',
            style: {
              backgroundColor: hoverColor,
              opacity: alwaysShowOverlay ? 0.5 : undefined
            }
          }), image.title && /*#__PURE__*/React.createElement("h4", {
            className: "advgb-image-slider-title",
            style: {
              color: titleColor
            }
          }, image.title), image.text && /*#__PURE__*/React.createElement("p", {
            className: "advgb-image-slider-text",
            style: {
              color: textColor
            }
          }, image.text)));
        })));
      }
    }, {
      attributes: blockAttrs,
      save: function save(_ref5) {
        var attributes = _ref5.attributes;
        var images = attributes.images,
          actionOnClick = attributes.actionOnClick,
          fullWidth = attributes.fullWidth,
          autoHeight = attributes.autoHeight,
          width = attributes.width,
          height = attributes.height,
          alwaysShowOverlay = attributes.alwaysShowOverlay,
          rtl = attributes.rtl,
          hoverColor = attributes.hoverColor,
          titleColor = attributes.titleColor,
          textColor = attributes.textColor,
          hAlign = attributes.hAlign,
          vAlign = attributes.vAlign;
        var blockClassName = ['advgb-images-slider-block', actionOnClick === 'lightbox' && 'advgb-images-slider-lightbox'].filter(Boolean).join(' ');
        return /*#__PURE__*/React.createElement("div", {
          className: blockClassName
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-images-slider",
          "data-slick": "{\"rtl\": ".concat(rtl, "}")
        }, images.map(function (image, index) {
          return /*#__PURE__*/React.createElement("div", {
            className: "advgb-image-slider-item",
            key: index
          }, /*#__PURE__*/React.createElement("img", {
            src: image.url,
            className: "advgb-image-slider-img",
            alt: 'Slider image',
            style: {
              width: fullWidth ? '100%' : width,
              height: autoHeight ? 'auto' : height
            }
          }), /*#__PURE__*/React.createElement("div", {
            className: "advgb-image-slider-item-info",
            style: {
              justifyContent: vAlign,
              alignItems: hAlign
            }
          }, /*#__PURE__*/React.createElement("a", {
            className: "advgb-image-slider-overlay",
            target: "_blank",
            rel: "noopener noreferrer",
            href: actionOnClick === 'link' && !!image.link ? image.link : '#',
            style: {
              backgroundColor: hoverColor,
              opacity: alwaysShowOverlay ? 0.5 : undefined
            }
          }), image.title && /*#__PURE__*/React.createElement("h4", {
            className: "advgb-image-slider-title",
            style: {
              color: titleColor
            }
          }, image.title), image.text && /*#__PURE__*/React.createElement("p", {
            className: "advgb-image-slider-text",
            style: {
              color: textColor
            }
          }, image.text)));
        })));
      }
    }, {
      attributes: blockAttrs,
      save: function save(_ref6) {
        var attributes = _ref6.attributes;
        var images = attributes.images,
          actionOnClick = attributes.actionOnClick,
          fullWidth = attributes.fullWidth,
          autoHeight = attributes.autoHeight,
          width = attributes.width,
          height = attributes.height,
          alwaysShowOverlay = attributes.alwaysShowOverlay,
          hoverColor = attributes.hoverColor,
          titleColor = attributes.titleColor,
          textColor = attributes.textColor,
          hAlign = attributes.hAlign,
          vAlign = attributes.vAlign;
        var blockClassName = ['advgb-images-slider-block', actionOnClick === 'lightbox' && 'advgb-images-slider-lightbox'].filter(Boolean).join(' ');
        return /*#__PURE__*/React.createElement("div", {
          className: blockClassName
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-images-slider"
        }, images.map(function (image, index) {
          return /*#__PURE__*/React.createElement("div", {
            className: "advgb-image-slider-item",
            key: index
          }, /*#__PURE__*/React.createElement("img", {
            src: image.url,
            className: "advgb-image-slider-img",
            alt: 'Slider image',
            style: {
              width: fullWidth ? '100%' : width,
              height: autoHeight ? 'auto' : height
            }
          }), /*#__PURE__*/React.createElement("div", {
            className: "advgb-image-slider-item-info",
            style: {
              justifyContent: vAlign,
              alignItems: hAlign
            }
          }, /*#__PURE__*/React.createElement("a", {
            className: "advgb-image-slider-overlay",
            target: "_blank",
            rel: "noopener noreferrer",
            href: actionOnClick === 'link' && !!image.link ? image.link : '#',
            style: {
              backgroundColor: hoverColor,
              opacity: alwaysShowOverlay ? 0.5 : undefined
            }
          }), image.title && /*#__PURE__*/React.createElement("h4", {
            className: "advgb-image-slider-title",
            style: {
              color: titleColor
            }
          }, image.title), image.text && /*#__PURE__*/React.createElement("p", {
            className: "advgb-image-slider-text",
            style: {
              color: textColor
            }
          }, image.text)));
        })));
      }
    }, {
      attributes: blockAttrs,
      save: function save(_ref7) {
        var attributes = _ref7.attributes;
        var images = attributes.images,
          actionOnClick = attributes.actionOnClick,
          fullWidth = attributes.fullWidth,
          autoHeight = attributes.autoHeight,
          width = attributes.width,
          height = attributes.height,
          alwaysShowOverlay = attributes.alwaysShowOverlay,
          hoverColor = attributes.hoverColor,
          titleColor = attributes.titleColor,
          textColor = attributes.textColor,
          hAlign = attributes.hAlign,
          vAlign = attributes.vAlign;
        var blockClassName = ['advgb-images-slider-block', actionOnClick === 'lightbox' && 'advgb-images-slider-lightbox'].filter(Boolean).join(' ');
        return /*#__PURE__*/React.createElement("div", {
          className: blockClassName
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-images-slider"
        }, images.map(function (image, index) {
          return /*#__PURE__*/React.createElement("div", {
            className: "advgb-image-slider-item",
            key: index
          }, /*#__PURE__*/React.createElement("img", {
            src: image.url,
            className: "advgb-image-slider-img",
            alt: 'Slider image',
            style: {
              width: fullWidth ? '100%' : width,
              height: autoHeight ? 'auto' : height
            }
          }), /*#__PURE__*/React.createElement("div", {
            className: "advgb-image-slider-item-info",
            style: {
              justifyContent: vAlign,
              alignItems: hAlign
            }
          }, /*#__PURE__*/React.createElement("a", {
            className: "advgb-image-slider-overlay",
            target: "_blank",
            rel: "noopener noreferrer",
            href: actionOnClick === 'link' && !!image.link ? image.link : undefined,
            style: {
              backgroundColor: hoverColor,
              opacity: alwaysShowOverlay ? 0.5 : undefined
            }
          }), /*#__PURE__*/React.createElement("h4", {
            className: "advgb-image-slider-title",
            style: {
              color: titleColor
            }
          }, image.title), /*#__PURE__*/React.createElement("p", {
            className: "advgb-image-slider-text",
            style: {
              color: textColor
            }
          }, image.text)));
        })));
      }
    }]
  });
})(wp.i18n, wp.blocks, wp.element, wp.blockEditor, wp.components);

/***/ },

/***/ "./assets/blocks/infobox/block.jsx"
/*!*****************************************!*\
  !*** ./assets/blocks/infobox/block.jsx ***!
  \*****************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _0_adv_components_components_jsx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../0-adv-components/components.jsx */ "./assets/blocks/0-adv-components/components.jsx");
/* harmony import */ var _0_adv_components_icon_class_jsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../0-adv-components/icon-class.jsx */ "./assets/blocks/0-adv-components/icon-class.jsx");
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }


(function (wpI18n, wpBlocks, wpElement, wpBlockEditor, wpComponents) {
  wpBlockEditor = wp.blockEditor || wp.editor;
  var __ = wpI18n.__;
  var Component = wpElement.Component,
    Fragment = wpElement.Fragment;
  var registerBlockType = wpBlocks.registerBlockType;
  var _wpBlockEditor = wpBlockEditor,
    InspectorControls = _wpBlockEditor.InspectorControls,
    BlockControls = _wpBlockEditor.BlockControls,
    AlignmentToolbar = _wpBlockEditor.AlignmentToolbar,
    RichText = _wpBlockEditor.RichText;
  var BaseControl = wpComponents.BaseControl,
    PanelBody = wpComponents.PanelBody,
    RangeControl = wpComponents.RangeControl,
    SelectControl = wpComponents.SelectControl,
    Button = wpComponents.Button;
  var previewImageData = 'data:image/png;base64, ';
  var blockIcon = /*#__PURE__*/React.createElement("svg", {
    version: "1.1",
    id: "Layer_1",
    xmlns: "http://www.w3.org/2000/svg",
    x: "0px",
    y: "0px",
    viewBox: "0 0 250 250"
  }, /*#__PURE__*/React.createElement("path", {
    d: "M114,110h23v69.1h-23V110z M114,63.9v23h23v-23H114z M225,22v11v177v11h-11H37H26v-11V33V22h11h177H225z M214,33H37v177h177V33z"
  }));
  var MARGIN_PADDING_CONTROLS = [{
    label: 'Top',
    icon: /*#__PURE__*/React.createElement("svg", {
      width: "20px",
      height: "20px",
      viewBox: "0 0 20 20",
      xmlns: "http://www.w3.org/2000/svg",
      "fill-rule": "evenodd",
      "clip-rule": "evenodd",
      "stroke-linejoin": "round",
      "stroke-miterlimit": "1.414"
    }, /*#__PURE__*/React.createElement("rect", {
      x: "2.714",
      y: "5.492",
      width: "1.048",
      height: "9.017",
      fill: "#555d66"
    }), /*#__PURE__*/React.createElement("rect", {
      x: "16.265",
      y: "5.498",
      width: "1.023",
      height: "9.003",
      fill: "#555d66"
    }), /*#__PURE__*/React.createElement("rect", {
      x: "5.518",
      y: "2.186",
      width: "8.964",
      height: "2.482",
      fill: "#272b2f"
    }), /*#__PURE__*/React.createElement("rect", {
      x: "5.487",
      y: "16.261",
      width: "9.026",
      height: "1.037",
      fill: "#555d66"
    }))
  }, {
    label: 'Right',
    icon: /*#__PURE__*/React.createElement("svg", {
      width: "20px",
      height: "20px",
      viewBox: "0 0 20 20",
      xmlns: "http://www.w3.org/2000/svg",
      "fill-rule": "evenodd",
      "clip-rule": "evenodd",
      "stroke-linejoin": "round",
      "stroke-miterlimit": "1.414"
    }, /*#__PURE__*/React.createElement("rect", {
      x: "2.714",
      y: "5.492",
      width: "1.046",
      height: "9.017",
      fill: "#555d66"
    }), /*#__PURE__*/React.createElement("rect", {
      x: "15.244",
      y: "5.498",
      width: "2.518",
      height: "9.003",
      fill: "#272b2f"
    }), /*#__PURE__*/React.createElement("rect", {
      x: "5.518",
      y: "2.719",
      width: "8.964",
      height: "0.954",
      fill: "#555d66"
    }), /*#__PURE__*/React.createElement("rect", {
      x: "5.487",
      y: "16.308",
      width: "9.026",
      height: "0.99",
      fill: "#555d66"
    }))
  }, {
    label: 'Bottom',
    icon: /*#__PURE__*/React.createElement("svg", {
      width: "20px",
      height: "20px",
      viewBox: "0 0 20 20",
      xmlns: "http://www.w3.org/2000/svg",
      "fill-rule": "evenodd",
      "clip-rule": "evenodd",
      "stroke-linejoin": "round",
      "stroke-miterlimit": "1.414"
    }, /*#__PURE__*/React.createElement("rect", {
      x: "2.714",
      y: "5.492",
      width: "1",
      height: "9.017",
      fill: "#555d66"
    }), /*#__PURE__*/React.createElement("rect", {
      x: "16.261",
      y: "5.498",
      width: "1.027",
      height: "9.003",
      fill: "#555d66"
    }), /*#__PURE__*/React.createElement("rect", {
      x: "5.518",
      y: "2.719",
      width: "8.964",
      height: "0.968",
      fill: "#555d66"
    }), /*#__PURE__*/React.createElement("rect", {
      x: "5.487",
      y: "15.28",
      width: "9.026",
      height: "2.499",
      fill: "#272b2f"
    }))
  }, {
    label: 'Left',
    icon: /*#__PURE__*/React.createElement("svg", {
      width: "20px",
      height: "20px",
      viewBox: "0 0 20 20",
      xmlns: "http://www.w3.org/2000/svg",
      "fill-rule": "evenodd",
      "clip-rule": "evenodd",
      "stroke-linejoin": "round",
      "stroke-miterlimit": "1.414"
    }, /*#__PURE__*/React.createElement("rect", {
      x: "2.202",
      y: "5.492",
      width: "2.503",
      height: "9.017",
      fill: "#272b2f"
    }), /*#__PURE__*/React.createElement("rect", {
      x: "16.276",
      y: "5.498",
      width: "1.012",
      height: "9.003",
      fill: "#555d66"
    }), /*#__PURE__*/React.createElement("rect", {
      x: "5.518",
      y: "2.719",
      width: "8.964",
      height: "0.966",
      fill: "#555d66"
    }), /*#__PURE__*/React.createElement("rect", {
      x: "5.487",
      y: "16.303",
      width: "9.026",
      height: "0.995",
      fill: "#555d66"
    }))
  }];
  var InfoBoxEdit = /*#__PURE__*/function (_Component) {
    function InfoBoxEdit() {
      var _this;
      _classCallCheck(this, InfoBoxEdit);
      _this = _callSuper(this, InfoBoxEdit, arguments);
      _this.state = {
        showPopup: false,
        iconSelected: '',
        selectedIcon: false,
        iconThemeSelected: 'outlined',
        selectedIconTheme: false,
        isBlockIdSet: false // @since 3.2.3
      };
      _this.togglePopup = _this.togglePopup.bind(_this);
      _this.handleIcon = _this.handleIcon.bind(_this);
      _this.handleIconTheme = _this.handleIconTheme.bind(_this);
      return _this;
    }
    _inherits(InfoBoxEdit, _Component);
    return _createClass(InfoBoxEdit, [{
      key: "componentWillMount",
      value: function componentWillMount() {
        var _this$props = this.props,
          attributes = _this$props.attributes,
          setAttributes = _this$props.setAttributes;
        var currentBlockConfig = advgbDefaultConfig['advgb-infobox'];

        // No override attributes of blocks inserted before
        if (attributes.changed !== true) {
          if (_typeof(currentBlockConfig) === 'object' && currentBlockConfig !== null) {
            Object.keys(currentBlockConfig).map(function (attribute) {
              if (typeof attributes[attribute] === 'boolean') {
                attributes[attribute] = !!currentBlockConfig[attribute];
              } else {
                attributes[attribute] = currentBlockConfig[attribute];
              }
            });
          }

          // Finally set changed attribute to true, so we don't modify anything again
          setAttributes({
            changed: true
          });
        }
      }
    }, {
      key: "componentDidMount",
      value: function componentDidMount() {}
    }, {
      key: "componentDidUpdate",
      value: function componentDidUpdate() {
        var _this$state = this.state,
          iconSelected = _this$state.iconSelected,
          selectedIcon = _this$state.selectedIcon,
          iconThemeSelected = _this$state.iconThemeSelected,
          selectedIconTheme = _this$state.selectedIconTheme;
        var _this$props2 = this.props,
          setAttributes = _this$props2.setAttributes,
          clientId = _this$props2.clientId;

        // @since 3.2.3 - https://github.com/publishpress/PublishPress-Blocks/issues/1389
        if (!this.state.isBlockIdSet) {
          setAttributes({
            blockIDX: "advgb-infobox-".concat(clientId)
          });
          this.setState({
            isBlockIdSet: true
          });
        }
        if (selectedIcon) {
          this.setState({
            selectedIcon: false
          });
          setAttributes({
            icon: iconSelected,
            iconTheme: iconThemeSelected
          });
        }
        if (selectedIconTheme) {
          this.setState({
            selectedIconTheme: false
          });
          setAttributes({
            iconTheme: iconThemeSelected
          });
        }
      }
    }, {
      key: "togglePopup",
      value: function togglePopup() {
        var showPopup = this.state.showPopup;
        this.setState({
          showPopup: !showPopup
        });
      }
    }, {
      key: "handleIcon",
      value: function handleIcon(iconValue) {
        this.setState({
          iconSelected: iconValue,
          selectedIcon: true
        });
      }
    }, {
      key: "handleIconTheme",
      value: function handleIconTheme(iconThemeValue) {
        this.setState({
          iconThemeSelected: iconThemeValue,
          selectedIconTheme: true
        });
      }
    }, {
      key: "render",
      value: function render() {
        var _this2 = this;
        var _this$props3 = this.props,
          attributes = _this$props3.attributes,
          setAttributes = _this$props3.setAttributes;
        var blockIDX = attributes.blockIDX,
          isPreview = attributes.isPreview,
          align = attributes.align,
          containerBorderWidth = attributes.containerBorderWidth,
          containerBorderRadius = attributes.containerBorderRadius,
          containerPaddingTop = attributes.containerPaddingTop,
          containerPaddingBottom = attributes.containerPaddingBottom,
          containerPaddingLeft = attributes.containerPaddingLeft,
          containerPaddingRight = attributes.containerPaddingRight,
          containerBackground = attributes.containerBackground,
          containerBorderBackground = attributes.containerBorderBackground,
          containerPaddingUnit = attributes.containerPaddingUnit,
          iconBorderWidth = attributes.iconBorderWidth,
          iconBorderRadius = attributes.iconBorderRadius,
          iconPaddingTop = attributes.iconPaddingTop,
          iconPaddingBottom = attributes.iconPaddingBottom,
          iconPaddingLeft = attributes.iconPaddingLeft,
          iconPaddingRight = attributes.iconPaddingRight,
          iconMarginTop = attributes.iconMarginTop,
          iconMarginBottom = attributes.iconMarginBottom,
          iconMarginLeft = attributes.iconMarginLeft,
          iconMarginRight = attributes.iconMarginRight,
          iconBackground = attributes.iconBackground,
          iconBorderBackground = attributes.iconBorderBackground,
          iconPaddingUnit = attributes.iconPaddingUnit,
          iconMarginUnit = attributes.iconMarginUnit,
          icon = attributes.icon,
          iconSize = attributes.iconSize,
          iconColor = attributes.iconColor,
          iconTheme = attributes.iconTheme,
          title = attributes.title,
          titleColor = attributes.titleColor,
          titleSize = attributes.titleSize,
          titleSizeUnit = attributes.titleSizeUnit,
          titleLineHeight = attributes.titleLineHeight,
          titleLineHeightUnit = attributes.titleLineHeightUnit,
          titleHtmlTag = attributes.titleHtmlTag,
          titlePaddingTop = attributes.titlePaddingTop,
          titlePaddingBottom = attributes.titlePaddingBottom,
          titlePaddingLeft = attributes.titlePaddingLeft,
          titlePaddingRight = attributes.titlePaddingRight,
          titleMarginTop = attributes.titleMarginTop,
          titleMarginBottom = attributes.titleMarginBottom,
          titleMarginLeft = attributes.titleMarginLeft,
          titleMarginRight = attributes.titleMarginRight,
          titlePaddingUnit = attributes.titlePaddingUnit,
          titleMarginUnit = attributes.titleMarginUnit,
          text = attributes.text,
          textColor = attributes.textColor,
          textSize = attributes.textSize,
          textSizeUnit = attributes.textSizeUnit,
          textLineHeight = attributes.textLineHeight,
          textLineHeightUnit = attributes.textLineHeightUnit,
          textPaddingTop = attributes.textPaddingTop,
          textPaddingBottom = attributes.textPaddingBottom,
          textPaddingLeft = attributes.textPaddingLeft,
          textPaddingRight = attributes.textPaddingRight,
          textMarginTop = attributes.textMarginTop,
          textMarginBottom = attributes.textMarginBottom,
          textMarginLeft = attributes.textMarginLeft,
          textMarginRight = attributes.textMarginRight,
          textPaddingUnit = attributes.textPaddingUnit,
          textMarginUnit = attributes.textMarginUnit;
        var showPopup = this.state.showPopup;
        var blockWrapClass = ['advgb-infobox-wrapper', "has-text-align-".concat(align)].filter(Boolean).join(' ');
        var blockClass = ['advgb-infobox-wrap'].filter(Boolean).join(' ');
        var iconClass = ['material-icons', iconTheme !== '' && "-".concat(iconTheme)].filter(Boolean).join('');
        var containerPadding = containerPaddingTop + containerPaddingUnit + ' ' + containerPaddingRight + containerPaddingUnit + ' ' + containerPaddingBottom + containerPaddingUnit + ' ' + containerPaddingLeft + containerPaddingUnit;
        var iconPadding = iconPaddingTop + iconPaddingUnit + ' ' + iconPaddingRight + iconPaddingUnit + ' ' + iconPaddingBottom + iconPaddingUnit + ' ' + iconPaddingLeft + iconPaddingUnit;
        var iconMargin = iconMarginTop + iconMarginUnit + ' ' + iconMarginRight + iconMarginUnit + ' ' + iconMarginBottom + iconMarginUnit + ' ' + iconMarginLeft + iconMarginUnit;
        var titlePadding = titlePaddingTop + titlePaddingUnit + ' ' + titlePaddingRight + titlePaddingUnit + ' ' + titlePaddingBottom + titlePaddingUnit + ' ' + titlePaddingLeft + titlePaddingUnit;
        var titleMargin = titleMarginTop + titleMarginUnit + ' ' + titleMarginRight + titleMarginUnit + ' ' + titleMarginBottom + titleMarginUnit + ' ' + titleMarginLeft + titleMarginUnit;
        var textPadding = textPaddingTop + textPaddingUnit + ' ' + textPaddingRight + textPaddingUnit + ' ' + textPaddingBottom + textPaddingUnit + ' ' + textPaddingLeft + textPaddingUnit;
        var textMargin = textMarginTop + textMarginUnit + ' ' + textMarginRight + textMarginUnit + ' ' + textMarginBottom + textMarginUnit + ' ' + textMarginLeft + textMarginUnit;
        return isPreview ? /*#__PURE__*/React.createElement("img", {
          alt: __('Info Box', 'advanced-gutenberg'),
          width: "100%",
          src: previewImageData
        }) : /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(BlockControls, null, /*#__PURE__*/React.createElement(AlignmentToolbar, {
          value: align,
          onChange: function onChange(newAlign) {
            return setAttributes({
              align: newAlign
            });
          }
        })), /*#__PURE__*/React.createElement(InspectorControls, null, /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Container Settings', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(_0_adv_components_components_jsx__WEBPACK_IMPORTED_MODULE_0__.AdvColorControl, {
          label: __('Background', 'advanced-gutenberg'),
          value: containerBackground,
          onChange: function onChange(value) {
            return setAttributes({
              containerBackground: value
            });
          }
        }), /*#__PURE__*/React.createElement(_0_adv_components_components_jsx__WEBPACK_IMPORTED_MODULE_0__.AdvColorControl, {
          label: __('Border Color', 'advanced-gutenberg'),
          value: containerBorderBackground,
          onChange: function onChange(value) {
            return setAttributes({
              containerBorderBackground: value
            });
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Border Width (px)', 'advanced-gutenberg'),
          min: 0,
          max: 40,
          value: containerBorderWidth,
          onChange: function onChange(value) {
            return setAttributes({
              containerBorderWidth: value
            });
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Border Radius (px)', 'advanced-gutenberg'),
          min: 0,
          max: 200,
          value: containerBorderRadius,
          onChange: function onChange(value) {
            return setAttributes({
              containerBorderRadius: value
            });
          }
        }), /*#__PURE__*/React.createElement(BaseControl, {
          label: __('Padding', 'advanced-gutenberg'),
          className: "advgb-control-header"
        }), /*#__PURE__*/React.createElement("div", {
          className: "advgb-controls-title"
        }, /*#__PURE__*/React.createElement("span", null, __('Unit', 'advanced-gutenberg')), /*#__PURE__*/React.createElement("div", {
          className: "advgb-unit-wrapper",
          key: "unit"
        }, ['px', 'em', 'vh', '%'].map(function (unit, uIdx) {
          return /*#__PURE__*/React.createElement("span", {
            className: "advgb-unit ".concat(containerPaddingUnit === unit ? 'selected' : ''),
            key: uIdx,
            onClick: function onClick() {
              return setAttributes({
                containerPaddingUnit: unit
              });
            }
          }, unit);
        }))), MARGIN_PADDING_CONTROLS.map(function (pos, mpIdx) {
          return /*#__PURE__*/React.createElement(RangeControl, {
            className: "advgb-padding-margin-control",
            key: mpIdx,
            beforeIcon: pos.icon,
            value: attributes['containerPadding' + pos.label],
            min: 0,
            max: 180,
            onChange: function onChange(value) {
              return setAttributes(_defineProperty({}, 'containerPadding' + pos.label, value));
            }
          });
        })), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Icon Settings', 'advanced-gutenberg'),
          initialOpen: false
        }, /*#__PURE__*/React.createElement(BaseControl, {
          label: __('Icon Library (Material Icon)', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(Button, {
          className: "button button-large advgb-browse-icon-btn",
          onClick: function onClick() {
            if (!showPopup) {
              _this2.togglePopup();
            }
          }
        }, __('Icon Selection', 'advanced-gutenberg'))), /*#__PURE__*/React.createElement(_0_adv_components_components_jsx__WEBPACK_IMPORTED_MODULE_0__.AdvColorControl, {
          label: __('Icon Color', 'advanced-gutenberg'),
          value: iconColor,
          onChange: function onChange(value) {
            return setAttributes({
              iconColor: value
            });
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Icon Size (px)', 'advanced-gutenberg'),
          value: iconSize,
          min: 1,
          max: 200,
          onChange: function onChange(value) {
            return setAttributes({
              iconSize: value
            });
          }
        }), /*#__PURE__*/React.createElement(_0_adv_components_components_jsx__WEBPACK_IMPORTED_MODULE_0__.AdvColorControl, {
          label: __('Background', 'advanced-gutenberg'),
          value: iconBackground,
          onChange: function onChange(value) {
            return setAttributes({
              iconBackground: value
            });
          }
        }), /*#__PURE__*/React.createElement(_0_adv_components_components_jsx__WEBPACK_IMPORTED_MODULE_0__.AdvColorControl, {
          label: __('Border Color', 'advanced-gutenberg'),
          value: iconBorderBackground,
          onChange: function onChange(value) {
            return setAttributes({
              iconBorderBackground: value
            });
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Border Width (px)', 'advanced-gutenberg'),
          min: 0,
          max: 40,
          value: iconBorderWidth,
          onChange: function onChange(value) {
            return setAttributes({
              iconBorderWidth: value
            });
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Border Radius (px)', 'advanced-gutenberg'),
          min: 0,
          max: 200,
          value: iconBorderRadius,
          onChange: function onChange(value) {
            return setAttributes({
              iconBorderRadius: value
            });
          }
        }), /*#__PURE__*/React.createElement(BaseControl, {
          label: __('Padding', 'advanced-gutenberg'),
          className: "advgb-control-header"
        }), /*#__PURE__*/React.createElement("div", {
          className: "advgb-controls-title"
        }, /*#__PURE__*/React.createElement("span", null, __('Unit', 'advanced-gutenberg')), /*#__PURE__*/React.createElement("div", {
          className: "advgb-unit-wrapper",
          key: "unit"
        }, ['px', 'em', 'vh', '%'].map(function (unit, uIdx) {
          return /*#__PURE__*/React.createElement("span", {
            className: "advgb-unit ".concat(iconPaddingUnit === unit ? 'selected' : ''),
            key: uIdx,
            onClick: function onClick() {
              return setAttributes({
                iconPaddingUnit: unit
              });
            }
          }, unit);
        }))), MARGIN_PADDING_CONTROLS.map(function (pos, mpIdx) {
          return /*#__PURE__*/React.createElement(RangeControl, {
            className: "advgb-padding-margin-control",
            key: mpIdx,
            beforeIcon: pos.icon,
            value: attributes['iconPadding' + pos.label],
            min: 0,
            max: 180,
            onChange: function onChange(value) {
              return setAttributes(_defineProperty({}, 'iconPadding' + pos.label, value));
            }
          });
        }), /*#__PURE__*/React.createElement(BaseControl, {
          label: __('Margin', 'advanced-gutenberg'),
          className: "advgb-control-header"
        }), /*#__PURE__*/React.createElement("div", {
          className: "advgb-controls-title"
        }, /*#__PURE__*/React.createElement("span", null, __('Unit', 'advanced-gutenberg')), /*#__PURE__*/React.createElement("div", {
          className: "advgb-unit-wrapper",
          key: "unit"
        }, ['px', 'em', 'vh', '%'].map(function (unit, uIdx) {
          return /*#__PURE__*/React.createElement("span", {
            className: "advgb-unit ".concat(iconMarginUnit === unit ? 'selected' : ''),
            key: uIdx,
            onClick: function onClick() {
              return setAttributes({
                iconMarginUnit: unit
              });
            }
          }, unit);
        }))), MARGIN_PADDING_CONTROLS.map(function (pos, mpIdx) {
          return /*#__PURE__*/React.createElement(RangeControl, {
            className: "advgb-padding-margin-control",
            key: mpIdx,
            beforeIcon: pos.icon,
            value: attributes['iconMargin' + pos.label],
            min: 0,
            max: 180,
            onChange: function onChange(value) {
              return setAttributes(_defineProperty({}, 'iconMargin' + pos.label, value));
            }
          });
        })), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Title Settings', 'advanced-gutenberg'),
          initialOpen: false
        }, /*#__PURE__*/React.createElement(_0_adv_components_components_jsx__WEBPACK_IMPORTED_MODULE_0__.AdvColorControl, {
          label: __('Color', 'advanced-gutenberg'),
          value: titleColor,
          onChange: function onChange(value) {
            return setAttributes({
              titleColor: value
            });
          }
        }), /*#__PURE__*/React.createElement("div", {
          className: "advgb-controls-title"
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-unit-wrapper advgb-unit-2",
          key: "unit"
        }, ['px', 'em'].map(function (unit, uIdx) {
          return /*#__PURE__*/React.createElement("span", {
            className: "advgb-unit ".concat(titleSizeUnit === unit ? 'selected' : ''),
            key: uIdx,
            onClick: function onClick() {
              return setAttributes({
                titleSizeUnit: unit
              });
            }
          }, unit);
        }))), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Font Size', 'advanced-gutenberg'),
          value: titleSize,
          min: titleSizeUnit === 'px' ? 1 : 0.2,
          max: titleSizeUnit === 'px' ? 200 : 12.0,
          step: titleSizeUnit === 'px' ? 1 : 0.1,
          onChange: function onChange(value) {
            return setAttributes({
              titleSize: value
            });
          }
        }), /*#__PURE__*/React.createElement("div", {
          className: "advgb-controls-title"
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-unit-wrapper advgb-unit-2",
          key: "unit"
        }, ['px', 'em'].map(function (unit, uIdx) {
          return /*#__PURE__*/React.createElement("span", {
            className: "advgb-unit ".concat(titleLineHeightUnit === unit ? 'selected' : ''),
            key: uIdx,
            onClick: function onClick() {
              return setAttributes({
                titleLineHeightUnit: unit
              });
            }
          }, unit);
        }))), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Line Height', 'advanced-gutenberg'),
          value: titleLineHeight,
          min: titleLineHeightUnit === 'px' ? 1 : 0.2,
          max: titleLineHeightUnit === 'px' ? 200 : 12.0,
          step: titleLineHeightUnit === 'px' ? 1 : 0.1,
          onChange: function onChange(value) {
            return setAttributes({
              titleLineHeight: value
            });
          }
        }), /*#__PURE__*/React.createElement(SelectControl, {
          label: __('HTML Tag', 'advanced-gutenberg'),
          value: titleHtmlTag,
          options: [{
            label: __('H1', 'advanced-gutenberg'),
            value: 'h1'
          }, {
            label: __('H2', 'advanced-gutenberg'),
            value: 'h2'
          }, {
            label: __('H3', 'advanced-gutenberg'),
            value: 'h3'
          }, {
            label: __('H4', 'advanced-gutenberg'),
            value: 'h4'
          }, {
            label: __('H5', 'advanced-gutenberg'),
            value: 'h5'
          }, {
            label: __('H6', 'advanced-gutenberg'),
            value: 'h6'
          }],
          onChange: function onChange(value) {
            return setAttributes({
              titleHtmlTag: value
            });
          }
        }), /*#__PURE__*/React.createElement(BaseControl, {
          label: __('Padding', 'advanced-gutenberg'),
          className: "advgb-control-header"
        }), /*#__PURE__*/React.createElement("div", {
          className: "advgb-controls-title"
        }, /*#__PURE__*/React.createElement("span", null, __('Unit', 'advanced-gutenberg')), /*#__PURE__*/React.createElement("div", {
          className: "advgb-unit-wrapper",
          key: "unit"
        }, ['px', 'em', 'vh', '%'].map(function (unit, uIdx) {
          return /*#__PURE__*/React.createElement("span", {
            className: "advgb-unit ".concat(titlePaddingUnit === unit ? 'selected' : ''),
            key: uIdx,
            onClick: function onClick() {
              return setAttributes({
                titlePaddingUnit: unit
              });
            }
          }, unit);
        }))), MARGIN_PADDING_CONTROLS.map(function (pos, mpIdx) {
          return /*#__PURE__*/React.createElement(RangeControl, {
            className: "advgb-padding-margin-control",
            key: mpIdx,
            beforeIcon: pos.icon,
            value: attributes['titlePadding' + pos.label],
            min: 0,
            max: 180,
            onChange: function onChange(value) {
              return setAttributes(_defineProperty({}, 'titlePadding' + pos.label, value));
            }
          });
        }), /*#__PURE__*/React.createElement(BaseControl, {
          label: __('Margin', 'advanced-gutenberg'),
          className: "advgb-control-header"
        }), /*#__PURE__*/React.createElement("div", {
          className: "advgb-controls-title"
        }, /*#__PURE__*/React.createElement("span", null, __('Unit', 'advanced-gutenberg')), /*#__PURE__*/React.createElement("div", {
          className: "advgb-unit-wrapper",
          key: "unit"
        }, ['px', 'em', 'vh', '%'].map(function (unit, uIdx) {
          return /*#__PURE__*/React.createElement("span", {
            className: "advgb-unit ".concat(titleMarginUnit === unit ? 'selected' : ''),
            key: uIdx,
            onClick: function onClick() {
              return setAttributes({
                titleMarginUnit: unit
              });
            }
          }, unit);
        }))), MARGIN_PADDING_CONTROLS.map(function (pos, mpIdx) {
          return /*#__PURE__*/React.createElement(RangeControl, {
            className: "advgb-padding-margin-control",
            key: mpIdx,
            beforeIcon: pos.icon,
            value: attributes['titleMargin' + pos.label],
            min: 0,
            max: 180,
            onChange: function onChange(value) {
              return setAttributes(_defineProperty({}, 'titleMargin' + pos.label, value));
            }
          });
        })), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Text Settings', 'advanced-gutenberg'),
          initialOpen: false
        }, /*#__PURE__*/React.createElement(_0_adv_components_components_jsx__WEBPACK_IMPORTED_MODULE_0__.AdvColorControl, {
          label: __('Color', 'advanced-gutenberg'),
          value: textColor,
          onChange: function onChange(value) {
            return setAttributes({
              textColor: value
            });
          }
        }), /*#__PURE__*/React.createElement("div", {
          className: "advgb-controls-title"
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-unit-wrapper advgb-unit-2",
          key: "unit"
        }, ['px', 'em'].map(function (unit, uIdx) {
          return /*#__PURE__*/React.createElement("span", {
            className: "advgb-unit ".concat(textSizeUnit === unit ? 'selected' : ''),
            key: uIdx,
            onClick: function onClick() {
              return setAttributes({
                textSizeUnit: unit
              });
            }
          }, unit);
        }))), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Font Size', 'advanced-gutenberg'),
          value: textSize,
          min: textSizeUnit === 'px' ? 1 : 0.2,
          max: textSizeUnit === 'px' ? 200 : 12.0,
          step: textSizeUnit === 'px' ? 1 : 0.1,
          onChange: function onChange(value) {
            return setAttributes({
              textSize: value
            });
          }
        }), /*#__PURE__*/React.createElement("div", {
          className: "advgb-controls-title"
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-unit-wrapper advgb-unit-2",
          key: "unit"
        }, ['px', 'em'].map(function (unit, uIdx) {
          return /*#__PURE__*/React.createElement("span", {
            className: "advgb-unit ".concat(textLineHeightUnit === unit ? 'selected' : ''),
            key: uIdx,
            onClick: function onClick() {
              return setAttributes({
                textLineHeightUnit: unit
              });
            }
          }, unit);
        }))), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Line Height', 'advanced-gutenberg'),
          value: textLineHeight,
          min: textLineHeightUnit === 'px' ? 1 : 0.2,
          max: textLineHeightUnit === 'px' ? 200 : 12.0,
          step: textLineHeightUnit === 'px' ? 1 : 0.1,
          onChange: function onChange(value) {
            return setAttributes({
              textLineHeight: value
            });
          }
        }), /*#__PURE__*/React.createElement(BaseControl, {
          label: __('Padding', 'advanced-gutenberg'),
          className: "advgb-control-header"
        }), /*#__PURE__*/React.createElement("div", {
          className: "advgb-controls-title"
        }, /*#__PURE__*/React.createElement("span", null, __('Unit', 'advanced-gutenberg')), /*#__PURE__*/React.createElement("div", {
          className: "advgb-unit-wrapper",
          key: "unit"
        }, ['px', 'em', 'vh', '%'].map(function (unit, uIdx) {
          return /*#__PURE__*/React.createElement("span", {
            className: "advgb-unit ".concat(textPaddingUnit === unit ? 'selected' : ''),
            key: uIdx,
            onClick: function onClick() {
              return setAttributes({
                textPaddingUnit: unit
              });
            }
          }, unit);
        }))), MARGIN_PADDING_CONTROLS.map(function (pos, mpIdx) {
          return /*#__PURE__*/React.createElement(RangeControl, {
            className: "advgb-padding-margin-control",
            key: mpIdx,
            beforeIcon: pos.icon,
            value: attributes['textPadding' + pos.label],
            min: 0,
            max: 180,
            onChange: function onChange(value) {
              return setAttributes(_defineProperty({}, 'textPadding' + pos.label, value));
            }
          });
        }), /*#__PURE__*/React.createElement(BaseControl, {
          label: __('Margin', 'advanced-gutenberg'),
          className: "advgb-control-header"
        }), /*#__PURE__*/React.createElement("div", {
          className: "advgb-controls-title"
        }, /*#__PURE__*/React.createElement("span", null, __('Unit', 'advanced-gutenberg')), /*#__PURE__*/React.createElement("div", {
          className: "advgb-unit-wrapper",
          key: "unit"
        }, ['px', 'em', 'vh', '%'].map(function (unit, uIdx) {
          return /*#__PURE__*/React.createElement("span", {
            className: "advgb-unit ".concat(textMarginUnit === unit ? 'selected' : ''),
            key: uIdx,
            onClick: function onClick() {
              return setAttributes({
                textMarginUnit: unit
              });
            }
          }, unit);
        }))), MARGIN_PADDING_CONTROLS.map(function (pos, mpIdx) {
          return /*#__PURE__*/React.createElement(RangeControl, {
            className: "advgb-padding-margin-control",
            key: mpIdx,
            beforeIcon: pos.icon,
            value: attributes['textMargin' + pos.label],
            min: 0,
            max: 180,
            onChange: function onChange(value) {
              return setAttributes(_defineProperty({}, 'textMargin' + pos.label, value));
            }
          });
        }))), /*#__PURE__*/React.createElement("div", {
          className: blockWrapClass,
          style: {
            backgroundColor: containerBackground,
            padding: containerPadding,
            border: "".concat(containerBorderWidth, "px solid ").concat(containerBorderBackground),
            borderRadius: "".concat(containerBorderRadius, "px")
          },
          id: blockIDX
        }, /*#__PURE__*/React.createElement("div", {
          className: blockClass
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-infobox-icon-container",
          style: {
            backgroundColor: iconBackground,
            padding: iconPadding,
            margin: iconMargin,
            border: "".concat(iconBorderWidth, "px solid ").concat(iconBorderBackground),
            borderRadius: "".concat(iconBorderRadius, "px")
          }
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-infobox-icon-inner-container"
        }, /*#__PURE__*/React.createElement("i", {
          className: iconClass,
          style: {
            color: iconColor,
            fontSize: iconSize,
            display: 'block'
          }
        }, icon))), /*#__PURE__*/React.createElement("div", {
          className: "advgb-infobox-textcontent"
        }, /*#__PURE__*/React.createElement(RichText, {
          tagName: titleHtmlTag,
          className: "advgb-infobox-title",
          onChange: function onChange(value) {
            return setAttributes({
              title: value
            });
          },
          value: title,
          style: {
            color: titleColor,
            fontSize: titleSize + titleSizeUnit,
            lineHeight: titleLineHeight + titleLineHeightUnit,
            padding: titlePadding,
            margin: titleMargin,
            whiteSpace: 'pre-wrap'
          }
        }), /*#__PURE__*/React.createElement(RichText, {
          tagName: "p",
          className: "advgb-infobox-text",
          onChange: function onChange(value) {
            return setAttributes({
              text: value
            });
          },
          value: text,
          style: {
            color: textColor,
            fontSize: textSize + textSizeUnit,
            lineHeight: textLineHeight + textLineHeightUnit,
            padding: textPadding,
            margin: textMargin,
            whiteSpace: 'pre-wrap'
          }
        }))), showPopup ? /*#__PURE__*/React.createElement(_0_adv_components_icon_class_jsx__WEBPACK_IMPORTED_MODULE_1__.IconListPopupHook, {
          content: "iconpopup",
          closePopup: function closePopup() {
            if (showPopup) {
              _this2.togglePopup();
            }
          },
          onSelectIcon: this.handleIcon,
          onSelectIconTheme: this.handleIconTheme,
          selectedIcon: icon,
          selectedIconTheme: iconTheme
        }) : null));
      }
    }]);
  }(Component);
  var blockAttrs = {
    blockIDX: {
      type: 'string'
    },
    align: {
      type: 'string',
      default: 'center'
    },
    containerBorderWidth: {
      type: 'number',
      default: 0
    },
    containerBorderRadius: {
      type: 'number',
      default: 0
    },
    containerPaddingTop: {
      type: 'number',
      default: 20
    },
    containerPaddingBottom: {
      type: 'number',
      default: 20
    },
    containerPaddingLeft: {
      type: 'number',
      default: 20
    },
    containerPaddingRight: {
      type: 'number',
      default: 20
    },
    containerPaddingUnit: {
      type: 'string',
      default: 'px'
    },
    containerBackground: {
      type: 'string',
      default: '#f5f5f5'
    },
    containerBorderBackground: {
      type: 'string',
      default: '#e8e8e8'
    },
    iconBorderWidth: {
      type: 'number',
      default: 0
    },
    iconBorderRadius: {
      type: 'number',
      default: 0
    },
    iconPaddingTop: {
      type: 'number',
      default: 0
    },
    iconPaddingBottom: {
      type: 'number',
      default: 0
    },
    iconPaddingLeft: {
      type: 'number',
      default: 0
    },
    iconPaddingRight: {
      type: 'number',
      default: 0
    },
    iconMarginTop: {
      type: 'number',
      default: 0
    },
    iconMarginBottom: {
      type: 'number',
      default: 0
    },
    iconMarginLeft: {
      type: 'number',
      default: 0
    },
    iconMarginRight: {
      type: 'number',
      default: 0
    },
    iconPaddingUnit: {
      type: 'string',
      default: 'px'
    },
    iconMarginUnit: {
      type: 'string',
      default: 'px'
    },
    iconBackground: {
      type: 'string',
      default: '#f5f5f5'
    },
    iconBorderBackground: {
      type: 'string',
      default: '#e8e8e8'
    },
    icon: {
      type: 'string',
      default: 'beenhere'
    },
    iconSize: {
      type: 'number',
      default: 70
    },
    iconColor: {
      type: 'string',
      default: '#333'
    },
    iconTheme: {
      type: 'string',
      default: 'outlined'
    },
    title: {
      type: 'string',
      default: 'Title'
    },
    titleColor: {
      type: 'string',
      default: '#333'
    },
    titleSize: {
      type: 'number'
    },
    titleSizeUnit: {
      type: 'string',
      default: 'px'
    },
    titleLineHeight: {
      type: 'number'
    },
    titleLineHeightUnit: {
      type: 'string',
      default: 'px'
    },
    titleHtmlTag: {
      type: 'string',
      default: 'h3'
    },
    titlePaddingTop: {
      type: 'number',
      default: 0
    },
    titlePaddingBottom: {
      type: 'number',
      default: 0
    },
    titlePaddingLeft: {
      type: 'number',
      default: 0
    },
    titlePaddingRight: {
      type: 'number',
      default: 0
    },
    titleMarginTop: {
      type: 'number',
      default: 5
    },
    titleMarginBottom: {
      type: 'number',
      default: 10
    },
    titleMarginLeft: {
      type: 'number',
      default: 0
    },
    titleMarginRight: {
      type: 'number',
      default: 0
    },
    titlePaddingUnit: {
      type: 'string',
      default: 'px'
    },
    titleMarginUnit: {
      type: 'string',
      default: 'px'
    },
    text: {
      type: 'string',
      default: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean diam dolor, accumsan sed rutrum vel, dapibus et leo.'
    },
    textColor: {
      type: 'string',
      default: '#333'
    },
    textSize: {
      type: 'number'
    },
    textSizeUnit: {
      type: 'string',
      default: 'px'
    },
    textLineHeight: {
      type: 'number'
    },
    textLineHeightUnit: {
      type: 'string',
      default: 'px'
    },
    textPaddingTop: {
      type: 'number',
      default: 0
    },
    textPaddingBottom: {
      type: 'number',
      default: 0
    },
    textPaddingLeft: {
      type: 'number',
      default: 0
    },
    textPaddingRight: {
      type: 'number',
      default: 0
    },
    textMarginTop: {
      type: 'number',
      default: 0
    },
    textMarginBottom: {
      type: 'number',
      default: 0
    },
    textMarginLeft: {
      type: 'number',
      default: 0
    },
    textMarginRight: {
      type: 'number',
      default: 0
    },
    textPaddingUnit: {
      type: 'string',
      default: 'px'
    },
    textMarginUnit: {
      type: 'string',
      default: 'px'
    },
    changed: {
      type: 'boolean',
      default: false
    },
    isPreview: {
      type: 'boolean',
      default: false
    }
  };
  registerBlockType('advgb/infobox', {
    apiVersion: 3,
    title: __('Info Box - PublishPress', 'advanced-gutenberg'),
    description: __('Icon block with more options and styles.', 'advanced-gutenberg'),
    icon: {
      src: blockIcon,
      foreground: typeof advgbBlocks !== 'undefined' ? advgbBlocks.color : undefined
    },
    category: 'advgb-category',
    keywords: [__('info', 'advanced-gutenberg'), __('icon', 'advanced-gutenberg'), __('box', 'advanced-gutenberg')],
    attributes: blockAttrs,
    example: {
      attributes: {
        isPreview: true
      }
    },
    edit: InfoBoxEdit,
    save: function save(_ref) {
      var attributes = _ref.attributes;
      var blockIDX = attributes.blockIDX,
        className = attributes.className,
        title = attributes.title,
        titleHtmlTag = attributes.titleHtmlTag,
        text = attributes.text,
        icon = attributes.icon,
        iconTheme = attributes.iconTheme,
        align = attributes.align;
      var blockWrapClass = ['wp-block-advgb-infobox', 'advgb-infobox-wrapper', "has-text-align-".concat(align), className, blockIDX].filter(Boolean).join(' ');
      var blockClass = ['advgb-infobox-wrap'].filter(Boolean).join(' ');
      var iconClass = ['material-icons', iconTheme !== '' && "-".concat(iconTheme)].filter(Boolean).join('');
      return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
        className: blockWrapClass
      }, /*#__PURE__*/React.createElement("div", {
        className: blockClass
      }, /*#__PURE__*/React.createElement("div", {
        className: "advgb-infobox-icon-container"
      }, /*#__PURE__*/React.createElement("div", {
        className: "advgb-infobox-icon-inner-container"
      }, /*#__PURE__*/React.createElement("i", {
        className: iconClass
      }, icon))), /*#__PURE__*/React.createElement("div", {
        className: "advgb-infobox-textcontent"
      }, /*#__PURE__*/React.createElement(RichText.Content, {
        tagName: titleHtmlTag,
        className: "advgb-infobox-title",
        value: title
      }), /*#__PURE__*/React.createElement(RichText.Content, {
        tagName: "p",
        className: "advgb-infobox-text",
        value: text
      })))));
    },
    deprecated: [{
      attributes: blockAttrs,
      save: function save(_ref2) {
        var attributes = _ref2.attributes;
        var blockIDX = attributes.blockIDX,
          title = attributes.title,
          titleHtmlTag = attributes.titleHtmlTag,
          text = attributes.text,
          icon = attributes.icon,
          iconTheme = attributes.iconTheme,
          align = attributes.align;
        var blockWrapClass = ['wp-block-advgb-infobox', 'advgb-infobox-wrapper', "has-text-align-".concat(align)].filter(Boolean).join(' ');
        var blockClass = ['advgb-infobox-wrap'].filter(Boolean).join(' ');
        var iconClass = ['material-icons', iconTheme !== '' && "-".concat(iconTheme)].filter(Boolean).join('');
        return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
          className: blockWrapClass,
          id: blockIDX
        }, /*#__PURE__*/React.createElement("div", {
          className: blockClass
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-infobox-icon-container"
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-infobox-icon-inner-container"
        }, /*#__PURE__*/React.createElement("i", {
          className: iconClass
        }, icon))), /*#__PURE__*/React.createElement("div", {
          className: "advgb-infobox-textcontent"
        }, /*#__PURE__*/React.createElement(RichText.Content, {
          tagName: titleHtmlTag,
          className: "advgb-infobox-title",
          value: title
        }), /*#__PURE__*/React.createElement(RichText.Content, {
          tagName: "p",
          className: "advgb-infobox-text",
          value: text
        })))));
      }
    }]
  });
})(wp.i18n, wp.blocks, wp.element, wp.blockEditor, wp.components);

/***/ },

/***/ "./assets/blocks/login-form/block.jsx"
/*!********************************************!*\
  !*** ./assets/blocks/login-form/block.jsx ***!
  \********************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _0_adv_components_components_jsx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../0-adv-components/components.jsx */ "./assets/blocks/0-adv-components/components.jsx");
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }

(function (wpI18n, wpBlocks, wpElement, wpBlockEditor, wpComponents) {
  wpBlockEditor = wp.blockEditor || wp.editor;
  var __ = wpI18n.__;
  var Component = wpElement.Component,
    Fragment = wpElement.Fragment;
  var registerBlockType = wpBlocks.registerBlockType;
  var _wpBlockEditor = wpBlockEditor,
    InspectorControls = _wpBlockEditor.InspectorControls,
    BlockControls = _wpBlockEditor.BlockControls,
    RichText = _wpBlockEditor.RichText,
    PanelColorSettings = _wpBlockEditor.PanelColorSettings,
    MediaUpload = _wpBlockEditor.MediaUpload;
  var RangeControl = wpComponents.RangeControl,
    PanelBody = wpComponents.PanelBody,
    TextControl = wpComponents.TextControl,
    SelectControl = wpComponents.SelectControl,
    ToggleControl = wpComponents.ToggleControl,
    Tooltip = wpComponents.Tooltip,
    ToolbarGroup = wpComponents.ToolbarGroup,
    ToolbarButton = wpComponents.ToolbarButton,
    Placeholder = wpComponents.Placeholder;
  var userIcon = /*#__PURE__*/React.createElement("svg", {
    fill: "currentColor",
    width: "24",
    height: "24",
    viewBox: "0 0 24 24",
    xmlns: "http://www.w3.org/2000/svg"
  }, /*#__PURE__*/React.createElement("path", {
    d: "M12 5.9c1.16 0 2.1.94 2.1 2.1s-.94 2.1-2.1 2.1S9.9 9.16 9.9 8s.94-2.1 2.1-2.1m0 9c2.97 0 6.1 1.46 6.1 2.1v1.1H5.9V17c0-.64 3.13-2.1 6.1-2.1M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4z"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M0 0h24v24H0z",
    fill: "none"
  }));
  var emailIcon = /*#__PURE__*/React.createElement("svg", {
    fill: "currentColor",
    width: "24",
    height: "24",
    viewBox: "0 0 24 24",
    xmlns: "http://www.w3.org/2000/svg"
  }, /*#__PURE__*/React.createElement("path", {
    d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10h5v-2h-5c-4.34 0-8-3.66-8-8s3.66-8 8-8 8 3.66 8 8v1.43c0 .79-.71 1.57-1.5 1.57s-1.5-.78-1.5-1.57V12c0-2.76-2.24-5-5-5s-5 2.24-5 5 2.24 5 5 5c1.38 0 2.64-.56 3.54-1.47.65.89 1.77 1.47 2.96 1.47 1.97 0 3.5-1.6 3.5-3.57V12c0-5.52-4.48-10-10-10zm0 13c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3z"
  }), /*#__PURE__*/React.createElement("path", {
    fill: "none",
    d: "M0 0h24v24H0z"
  }));
  var passwordIcon = /*#__PURE__*/React.createElement("svg", {
    fill: "currentColor",
    width: "24",
    height: "24",
    viewBox: "0 0 24 24",
    xmlns: "http://www.w3.org/2000/svg"
  }, /*#__PURE__*/React.createElement("g", {
    fill: "none"
  }, /*#__PURE__*/React.createElement("path", {
    d: "M0 0h24v24H0V0z"
  }), /*#__PURE__*/React.createElement("path", {
    opacity: ".87",
    d: "M0 0h24v24H0V0z"
  })), /*#__PURE__*/React.createElement("path", {
    d: "M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"
  }));
  var previewImageData = 'data:image/png;base64, ';
  var LoginFormEdit = /*#__PURE__*/function (_Component) {
    function LoginFormEdit() {
      var _this;
      _classCallCheck(this, LoginFormEdit);
      _this = _callSuper(this, LoginFormEdit, arguments);
      _this.state = {
        registerView: false
      };
      return _this;
    }
    _inherits(LoginFormEdit, _Component);
    return _createClass(LoginFormEdit, [{
      key: "componentWillMount",
      value: function componentWillMount() {
        var _this$props = this.props,
          attributes = _this$props.attributes,
          setAttributes = _this$props.setAttributes;
        var currentBlockConfig = advgbDefaultConfig['advgb-login-form'];

        // No override attributes of blocks inserted before
        if (attributes.changed !== true) {
          if (_typeof(currentBlockConfig) === 'object' && currentBlockConfig !== null) {
            Object.keys(currentBlockConfig).map(function (attribute) {
              if (typeof attributes[attribute] === 'boolean') {
                attributes[attribute] = !!currentBlockConfig[attribute];
              } else {
                attributes[attribute] = currentBlockConfig[attribute];
              }
            });
          }

          // Finally set changed attribute to true, so we don't modify anything again
          setAttributes({
            changed: true
          });
        }

        // Change view to Register form regard to initial form option
        this.setState({
          registerView: attributes.formType === 'register'
        });
      }
    }, {
      key: "componentDidMount",
      value: function componentDidMount() {
        var _this$props2 = this.props,
          clientId = _this$props2.clientId,
          attributes = _this$props2.attributes,
          setAttributes = _this$props2.setAttributes;
        var submitButtonId = attributes.submitButtonId;
        if (!submitButtonId) {
          setAttributes({
            submitButtonId: "advgb-submit-btn-".concat(clientId)
          });
        }
      }
    }, {
      key: "render",
      value: function render() {
        var _this2 = this;
        var registerView = this.state.registerView;
        var _this$props3 = this.props,
          attributes = _this$props3.attributes,
          setAttributes = _this$props3.setAttributes;
        var formType = attributes.formType,
          formWidth = attributes.formWidth,
          redirect = attributes.redirect,
          redirectLink = attributes.redirectLink,
          showLogo = attributes.showLogo,
          showInputFieldIcon = attributes.showInputFieldIcon,
          showRegisterLink = attributes.showRegisterLink,
          showLostPasswordLink = attributes.showLostPasswordLink,
          logoImg = attributes.logoImg,
          logoID = attributes.logoID,
          registerLogoImg = attributes.registerLogoImg,
          registerLogoID = attributes.registerLogoID,
          logoWidth = attributes.logoWidth,
          welcomeText = attributes.welcomeText,
          loginLabel = attributes.loginLabel,
          loginText = attributes.loginText,
          passwordText = attributes.passwordText,
          usernameLabel = attributes.usernameLabel,
          userText = attributes.userText,
          emailLabel = attributes.emailLabel,
          emailText = attributes.emailText,
          rememberMeText = attributes.rememberMeText,
          loginSubmitLabel = attributes.loginSubmitLabel,
          registerSubmitLabel = attributes.registerSubmitLabel,
          registerText = attributes.registerText,
          registerLinkText = attributes.registerLinkText,
          registerWelcome = attributes.registerWelcome,
          backToLoginText = attributes.backToLoginText,
          lostPasswordText = attributes.lostPasswordText,
          headerBgColor = attributes.headerBgColor,
          bgColor = attributes.bgColor,
          textColor = attributes.textColor,
          inputColor = attributes.inputColor,
          borderColor = attributes.borderColor,
          borderStyle = attributes.borderStyle,
          borderWidth = attributes.borderWidth,
          submitColor = attributes.submitColor,
          submitBgColor = attributes.submitBgColor,
          submitRadius = attributes.submitRadius,
          submitPosition = attributes.submitPosition,
          submitButtonId = attributes.submitButtonId,
          submitHoverColor = attributes.submitHoverColor,
          submitHoverBgColor = attributes.submitHoverBgColor,
          submitHoverShadow = attributes.submitHoverShadow,
          submitHoverShadowH = attributes.submitHoverShadowH,
          submitHoverShadowV = attributes.submitHoverShadowV,
          submitHoverShadowBlur = attributes.submitHoverShadowBlur,
          submitHoverShadowSpread = attributes.submitHoverShadowSpread,
          submitHoverOpacity = attributes.submitHoverOpacity,
          submitHoverTranSpeed = attributes.submitHoverTranSpeed,
          isPreview = attributes.isPreview;
        var logoElm = /*#__PURE__*/React.createElement(MediaUpload, {
          allowedTypes: ["image"],
          onSelect: function onSelect(media) {
            return setAttributes({
              logoImg: media.sizes.medium ? media.sizes.medium.url : media.sizes.full.url,
              logoID: media.id
            });
          },
          value: logoID,
          render: function render(_ref) {
            var open = _ref.open;
            return /*#__PURE__*/React.createElement("div", {
              className: "advgb-lores-form-logo-wrapper"
            }, /*#__PURE__*/React.createElement(Tooltip, {
              text: __('Click to change logo', 'advanced-gutenberg')
            }, /*#__PURE__*/React.createElement("span", {
              style: {
                display: 'block'
              }
            }, /*#__PURE__*/React.createElement("img", {
              className: "advgb-lores-form-logo",
              onClick: open,
              src: logoImg,
              alt: __('Site logo', 'advanced-gutenberg'),
              style: {
                width: logoWidth ? logoWidth + 'px' : undefined,
                cursor: 'pointer'
              }
            }))));
          }
        });
        var regLogoElm = /*#__PURE__*/React.createElement(MediaUpload, {
          allowedTypes: ["image"],
          onSelect: function onSelect(media) {
            return setAttributes({
              registerLogoImg: media.sizes.medium ? media.sizes.medium.url : media.sizes.full.url,
              registerLogoID: media.id
            });
          },
          value: registerLogoID,
          render: function render(_ref2) {
            var open = _ref2.open;
            return /*#__PURE__*/React.createElement("div", {
              className: "advgb-lores-form-logo-wrapper"
            }, /*#__PURE__*/React.createElement(Tooltip, {
              text: __('Click to change logo', 'advanced-gutenberg')
            }, /*#__PURE__*/React.createElement("span", {
              style: {
                display: 'block'
              }
            }, /*#__PURE__*/React.createElement("img", {
              className: "advgb-lores-form-logo",
              onClick: open,
              src: registerLogoImg,
              alt: __('Site logo', 'advanced-gutenberg'),
              style: {
                width: logoWidth ? logoWidth + 'px' : undefined,
                cursor: 'pointer'
              }
            }))));
          }
        });
        var loginForm = /*#__PURE__*/React.createElement("div", {
          className: "advgb-login-form-wrapper advgb-lores-form"
        }, !!showRegisterLink && /*#__PURE__*/React.createElement("div", {
          className: "advgb-register-link-wrapper advgb-header-navigation",
          style: {
            backgroundColor: headerBgColor
          }
        }, /*#__PURE__*/React.createElement(RichText, {
          tagName: "span",
          value: registerText,
          className: "advgb-register-text",
          onChange: function onChange(value) {
            return setAttributes({
              registerText: value.trim()
            });
          },
          style: {
            color: textColor
          },
          onReplace: function onReplace() {
            return null;
          },
          onSplit: function onSplit() {
            return null;
          },
          placeholder: __('Text…', 'advanced-gutenberg'),
          keepPlaceholderOnFocus: true,
          allowedFormats: ['core/bold', 'core/italic']
        }), /*#__PURE__*/React.createElement(RichText, {
          tagName: "a",
          value: registerLinkText,
          className: "advgb-register-link",
          onChange: function onChange(value) {
            return setAttributes({
              registerLinkText: value.trim()
            });
          },
          style: {
            color: submitBgColor
          },
          onReplace: function onReplace() {
            return null;
          },
          onSplit: function onSplit() {
            return null;
          },
          placeholder: __('Register…', 'advanced-gutenberg'),
          keepPlaceholderOnFocus: true,
          allowedFormats: ['core/bold', 'core/italic']
        })), /*#__PURE__*/React.createElement("div", {
          className: "advgb-login-form advgb-form-inner"
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-lores-form-header"
        }, !!showLogo && logoElm, /*#__PURE__*/React.createElement(RichText, {
          tagName: "h3",
          value: welcomeText,
          className: "advgb-lores-form-welcome",
          onChange: function onChange(value) {
            return setAttributes({
              welcomeText: value.trim()
            });
          },
          style: {
            color: textColor
          },
          placeholder: __('Welcome text…', 'advanced-gutenberg'),
          keepPlaceholderOnFocus: true,
          allowedFormats: ['core/bold', 'core/italic']
        })), /*#__PURE__*/React.createElement("div", {
          className: "advgb-lores-field advgb-login-user"
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-lores-field-label"
        }, /*#__PURE__*/React.createElement(RichText, {
          tagName: "label",
          value: loginText,
          onChange: function onChange(value) {
            return setAttributes({
              loginText: value.trim()
            });
          },
          style: {
            color: textColor
          },
          onReplace: function onReplace() {
            return null;
          },
          onSplit: function onSplit() {
            return null;
          },
          placeholder: __('Username label…', 'advanced-gutenberg'),
          keepPlaceholderOnFocus: true,
          allowedFormats: ['core/bold', 'core/italic']
        })), /*#__PURE__*/React.createElement("div", {
          className: "advgb-lores-field-input",
          style: {
            backgroundColor: bgColor,
            color: inputColor,
            borderBottomColor: borderColor,
            borderStyle: borderStyle,
            borderWidth: borderWidth
          }
        }, !!showInputFieldIcon && /*#__PURE__*/React.createElement("span", {
          className: "advgb-lores-input-icon",
          style: {
            color: textColor
          }
        }, emailIcon), /*#__PURE__*/React.createElement("input", {
          type: "text",
          disabled: true,
          className: "advgb-lores-input",
          style: {
            color: inputColor
          },
          value: loginLabel ? loginLabel : 'user@email.com'
        }))), /*#__PURE__*/React.createElement("div", {
          className: "advgb-lores-field advgb-login-password"
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-lores-field-label"
        }, /*#__PURE__*/React.createElement(RichText, {
          tagName: "label",
          value: passwordText,
          onChange: function onChange(value) {
            return setAttributes({
              passwordText: value.trim()
            });
          },
          style: {
            color: textColor
          },
          onReplace: function onReplace() {
            return null;
          },
          onSplit: function onSplit() {
            return null;
          },
          placeholder: __('Password label…', 'advanced-gutenberg'),
          keepPlaceholderOnFocus: true,
          allowedFormats: ['core/bold', 'core/italic']
        })), /*#__PURE__*/React.createElement("div", {
          className: "advgb-lores-field-input",
          style: {
            backgroundColor: bgColor,
            color: inputColor,
            borderBottomColor: borderColor,
            borderStyle: borderStyle,
            borderWidth: borderWidth
          }
        }, !!showInputFieldIcon && /*#__PURE__*/React.createElement("span", {
          className: "advgb-lores-input-icon",
          style: {
            color: textColor
          }
        }, passwordIcon), /*#__PURE__*/React.createElement("input", {
          type: "password",
          disabled: true,
          className: "advgb-lores-input",
          style: {
            color: inputColor
          },
          value: "password"
        }))), /*#__PURE__*/React.createElement("div", {
          className: "advgb-lores-field advgb-lores-submit-wrapper advgb-submit-align-".concat(submitPosition)
        }, /*#__PURE__*/React.createElement("label", {
          htmlFor: "rememberme",
          className: "remember-me-label"
        }, /*#__PURE__*/React.createElement("input", {
          type: "checkbox",
          checked: true,
          className: "advgb-lores-checkbox",
          style: {
            color: submitBgColor
          }
        }), /*#__PURE__*/React.createElement("div", {
          className: "remember-me-switch",
          style: {
            color: submitBgColor
          }
        }, /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(RichText, {
          tagName: "span",
          value: rememberMeText,
          onChange: function onChange(value) {
            return setAttributes({
              passwordText: value.trim()
            });
          },
          style: {
            color: textColor
          },
          onReplace: function onReplace() {
            return null;
          },
          onSplit: function onSplit() {
            return null;
          },
          placeholder: __('Remember me…', 'advanced-gutenberg'),
          keepPlaceholderOnFocus: true,
          allowedFormats: ['core/bold', 'core/italic']
        })))), /*#__PURE__*/React.createElement("div", {
          className: "advgb-lores-submit advgb-login-submit"
        }, /*#__PURE__*/React.createElement("span", {
          className: "advgb-lores-submit-button ".concat(submitButtonId),
          style: {
            borderColor: submitColor,
            color: submitColor,
            backgroundColor: submitBgColor,
            borderRadius: submitRadius
          }
        }, /*#__PURE__*/React.createElement(RichText, {
          tagName: "span",
          value: loginSubmitLabel,
          onChange: function onChange(value) {
            return setAttributes({
              loginSubmitLabel: value.trim()
            });
          },
          onReplace: function onReplace() {
            return null;
          },
          onSplit: function onSplit() {
            return null;
          },
          placeholder: __('Login…', 'advanced-gutenberg'),
          keepPlaceholderOnFocus: true,
          allowedFormats: ['core/bold', 'core/italic']
        })))), !!showLostPasswordLink && /*#__PURE__*/React.createElement("div", {
          className: "advgb-lores-field advgb-lost-password-field"
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-lost-password"
        }, /*#__PURE__*/React.createElement(RichText, {
          tagName: "a",
          value: lostPasswordText,
          className: "advgb-lost-password-link",
          onChange: function onChange(value) {
            return setAttributes({
              lostPasswordText: value.trim()
            });
          },
          style: {
            color: submitBgColor
          },
          onReplace: function onReplace() {
            return null;
          },
          onSplit: function onSplit() {
            return null;
          },
          placeholder: __('Lost password…', 'advanced-gutenberg'),
          keepPlaceholderOnFocus: true,
          allowedFormats: ['core/bold', 'core/italic']
        })))));
        var registerForm = /*#__PURE__*/React.createElement("div", {
          className: "advgb-register-form-wrapper advgb-lores-form"
        }, !!showRegisterLink && /*#__PURE__*/React.createElement("div", {
          className: "advgb-header-navigation advgb-back-to-login",
          style: {
            backgroundColor: headerBgColor
          }
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-back-to-login-link",
          style: {
            color: submitBgColor
          }
        }, /*#__PURE__*/React.createElement(RichText, {
          tagName: "span",
          value: backToLoginText,
          className: "advgb-register-text",
          onChange: function onChange(value) {
            return setAttributes({
              backToLoginText: value.trim()
            });
          },
          style: {
            color: submitBgColor
          },
          onReplace: function onReplace() {
            return null;
          },
          onSplit: function onSplit() {
            return null;
          },
          placeholder: __('Back…', 'advanced-gutenberg'),
          keepPlaceholderOnFocus: true,
          allowedFormats: ['core/bold', 'core/italic']
        }))), /*#__PURE__*/React.createElement("div", {
          className: "advgb-register-form advgb-form-inner"
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-lores-form-header"
        }, !!showLogo && regLogoElm, /*#__PURE__*/React.createElement(RichText, {
          tagName: "h3",
          value: registerWelcome,
          className: "advgb-lores-form-welcome",
          onChange: function onChange(value) {
            return setAttributes({
              registerWelcome: value.trim()
            });
          },
          style: {
            color: textColor
          },
          placeholder: __('Register…', 'advanced-gutenberg'),
          keepPlaceholderOnFocus: true,
          allowedFormats: ['core/bold', 'core/italic']
        })), /*#__PURE__*/React.createElement("div", {
          className: "advgb-lores-field advgb-register-username"
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-lores-field-label"
        }, /*#__PURE__*/React.createElement(RichText, {
          tagName: "label",
          value: userText,
          onChange: function onChange(value) {
            return setAttributes({
              userText: value.trim()
            });
          },
          style: {
            color: textColor
          },
          onReplace: function onReplace() {
            return null;
          },
          onSplit: function onSplit() {
            return null;
          },
          placeholder: __('Username label…', 'advanced-gutenberg'),
          keepPlaceholderOnFocus: true,
          allowedFormats: ['core/bold', 'core/italic']
        })), /*#__PURE__*/React.createElement("div", {
          className: "advgb-lores-field-input",
          style: {
            backgroundColor: bgColor,
            color: inputColor,
            borderBottomColor: borderColor,
            borderStyle: borderStyle,
            borderWidth: borderWidth
          }
        }, !!showInputFieldIcon && /*#__PURE__*/React.createElement("span", {
          className: "advgb-lores-input-icon",
          style: {
            color: textColor
          }
        }, userIcon), /*#__PURE__*/React.createElement("input", {
          type: "text",
          disabled: true,
          className: "advgb-lores-input",
          style: {
            color: inputColor
          },
          value: usernameLabel ? usernameLabel : 'username'
        }))), /*#__PURE__*/React.createElement("div", {
          className: "advgb-lores-field advgb-register-email"
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-lores-field-label"
        }, /*#__PURE__*/React.createElement(RichText, {
          tagName: "label",
          value: emailText,
          onChange: function onChange(value) {
            return setAttributes({
              emailText: value.trim()
            });
          },
          style: {
            color: textColor
          },
          onReplace: function onReplace() {
            return null;
          },
          onSplit: function onSplit() {
            return null;
          },
          placeholder: __('Email label…', 'advanced-gutenberg'),
          keepPlaceholderOnFocus: true,
          allowedFormats: ['core/bold', 'core/italic']
        })), /*#__PURE__*/React.createElement("div", {
          className: "advgb-lores-field-input",
          style: {
            backgroundColor: bgColor,
            color: inputColor,
            borderBottomColor: borderColor,
            borderStyle: borderStyle,
            borderWidth: borderWidth
          }
        }, !!showInputFieldIcon && /*#__PURE__*/React.createElement("span", {
          className: "advgb-lores-input-icon",
          style: {
            color: textColor
          }
        }, emailIcon), /*#__PURE__*/React.createElement("input", {
          type: "text",
          disabled: true,
          className: "advgb-lores-input",
          style: {
            color: inputColor
          },
          value: emailLabel ? emailLabel : 'user@email.com'
        }))), /*#__PURE__*/React.createElement("div", {
          className: "advgb-lores-field advgb-lores-submit-wrapper advgb-submit-align-".concat(submitPosition)
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-lores-submit advgb-register-submit"
        }, /*#__PURE__*/React.createElement("span", {
          className: "advgb-lores-submit-button ".concat(submitButtonId),
          style: {
            borderColor: submitColor,
            color: submitColor,
            backgroundColor: submitBgColor,
            borderRadius: submitRadius
          }
        }, /*#__PURE__*/React.createElement(RichText, {
          tagName: "span",
          value: registerSubmitLabel,
          onChange: function onChange(value) {
            return setAttributes({
              registerSubmitLabel: value.trim()
            });
          },
          onReplace: function onReplace() {
            return null;
          },
          onSplit: function onSplit() {
            return null;
          },
          placeholder: __('Register…', 'advanced-gutenberg'),
          keepPlaceholderOnFocus: true,
          allowedFormats: ['core/bold', 'core/italic']
        }))))));
        return isPreview ? /*#__PURE__*/React.createElement("img", {
          alt: __('Login/Register Form', 'advanced-gutenberg'),
          width: "100%",
          src: previewImageData
        }) : /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(BlockControls, null, /*#__PURE__*/React.createElement(ToolbarGroup, {
          label: __('Options', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(ToolbarButton, {
          icon: "image-flip-horizontal",
          label: __('Switch View', 'advanced-gutenberg'),
          onClick: function onClick() {
            return _this2.setState({
              registerView: !registerView
            });
          }
        }))), /*#__PURE__*/React.createElement(InspectorControls, null, /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Form State', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Initial Form', 'advanced-gutenberg'),
          help: __('Form that show on load.', 'advanced-gutenberg'),
          value: formType,
          options: [{
            label: __('Login', 'advanced-gutenberg'),
            value: 'login'
          }, {
            label: __('Register', 'advanced-gutenberg'),
            value: 'register'
          }],
          onChange: function onChange(value) {
            setAttributes({
              formType: value
            });
            _this2.setState({
              registerView: value === 'register'
            });
          }
        }), /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Redirect After Login', 'advanced-gutenberg'),
          value: redirect,
          options: [{
            label: __('Home', 'advanced-gutenberg'),
            value: 'home'
          }, {
            label: __('Dashboard', 'advanced-gutenberg'),
            value: 'dashboard'
          }, {
            label: __('Current Page', 'advanced-gutenberg'),
            value: 'currentpage'
          }, {
            label: __('Custom', 'advanced-gutenberg'),
            value: 'custom'
          }],
          onChange: function onChange(value) {
            return setAttributes({
              redirect: value
            });
          }
        }), redirect === 'custom' && /*#__PURE__*/React.createElement(TextControl, {
          label: __('Custom redirect link', 'advanced-gutenberg'),
          value: redirectLink,
          onChange: function onChange(value) {
            return setAttributes({
              redirectLink: value
            });
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Form Width (px)', 'advanced-gutenberg'),
          value: formWidth,
          onChange: function onChange(value) {
            return setAttributes({
              formWidth: value
            });
          },
          min: 300,
          max: 1500
        }), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Show Logo', 'advanced-gutenberg'),
          checked: !!showLogo,
          onChange: function onChange() {
            return setAttributes({
              showLogo: !showLogo
            });
          }
        }), !!showLogo && /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Logo Width (px)', 'advanced-gutenberg'),
          value: logoWidth,
          onChange: function onChange(value) {
            return setAttributes({
              logoWidth: value
            });
          },
          min: 100,
          max: 1500
        }), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Show input field icon', 'advanced-gutenberg'),
          checked: !!showInputFieldIcon,
          onChange: function onChange() {
            return setAttributes({
              showInputFieldIcon: !showInputFieldIcon
            });
          }
        }), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Show register/header link', 'advanced-gutenberg'),
          checked: !!showRegisterLink,
          onChange: function onChange() {
            return setAttributes({
              showRegisterLink: !showRegisterLink
            });
          }
        }), !!showRegisterLink && /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Header Color', 'advanced-gutenberg'),
          initialOpen: false,
          colorSettings: [{
            label: __('Header color', 'advanced-gutenberg'),
            value: headerBgColor,
            onChange: function onChange(value) {
              return setAttributes({
                headerBgColor: value
              });
            }
          }]
        }), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Show lost password link', 'advanced-gutenberg'),
          checked: !!showLostPasswordLink,
          onChange: function onChange() {
            return setAttributes({
              showLostPasswordLink: !showLostPasswordLink
            });
          }
        })), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Input placeholder', 'advanced-gutenberg'),
          initialOpen: false
        }, /*#__PURE__*/React.createElement(TextControl, {
          label: __('Login input placeholder', 'advanced-gutenberg'),
          value: loginLabel,
          onChange: function onChange(value) {
            return setAttributes({
              loginLabel: value
            });
          }
        }), /*#__PURE__*/React.createElement(TextControl, {
          label: __('Username input placeholder', 'advanced-gutenberg'),
          help: __('Use in register form', 'advanced-gutenberg'),
          value: usernameLabel,
          onChange: function onChange(value) {
            return setAttributes({
              usernameLabel: value
            });
          }
        }), /*#__PURE__*/React.createElement(TextControl, {
          label: __('Email input placeholder', 'advanced-gutenberg'),
          help: __('Use in register form', 'advanced-gutenberg'),
          value: emailLabel,
          onChange: function onChange(value) {
            return setAttributes({
              emailLabel: value
            });
          }
        })), /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Text/Input Color', 'advanced-gutenberg'),
          initialOpen: false,
          colorSettings: [{
            label: __('Input background color', 'advanced-gutenberg'),
            value: bgColor,
            onChange: function onChange(value) {
              return setAttributes({
                bgColor: value
              });
            }
          }, {
            label: __('Input color', 'advanced-gutenberg'),
            value: inputColor,
            onChange: function onChange(value) {
              return setAttributes({
                inputColor: value
              });
            }
          }, {
            label: __('Text color', 'advanced-gutenberg'),
            value: textColor,
            onChange: function onChange(value) {
              return setAttributes({
                textColor: value
              });
            }
          }]
        }), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Border Settings', 'advanced-gutenberg'),
          initialOpen: false
        }, /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Border Color', 'advanced-gutenberg'),
          initialOpen: false,
          colorSettings: [{
            label: __('Border color', 'advanced-gutenberg'),
            value: borderColor,
            onChange: function onChange(value) {
              return setAttributes({
                borderColor: value
              });
            }
          }]
        }), /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Border Style', 'advanced-gutenberg'),
          value: borderStyle,
          options: [{
            label: __('Solid', 'advanced-gutenberg'),
            value: 'solid'
          }, {
            label: __('Dashed', 'advanced-gutenberg'),
            value: 'dashed'
          }, {
            label: __('Dotted', 'advanced-gutenberg'),
            value: 'dotted'
          }],
          onChange: function onChange(value) {
            return setAttributes({
              borderStyle: value
            });
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Border width', 'advanced-gutenberg'),
          value: borderWidth,
          onChange: function onChange(value) {
            return setAttributes({
              borderWidth: value
            });
          },
          min: 0,
          max: 10
        })), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Submit Button Settings', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(_0_adv_components_components_jsx__WEBPACK_IMPORTED_MODULE_0__.AdvColorControl, {
          label: __('Border and Text', 'advanced-gutenberg'),
          value: submitColor,
          onChange: function onChange(value) {
            return setAttributes({
              submitColor: value
            });
          }
        }), /*#__PURE__*/React.createElement(_0_adv_components_components_jsx__WEBPACK_IMPORTED_MODULE_0__.AdvColorControl, {
          label: __('Background', 'advanced-gutenberg'),
          value: submitBgColor,
          onChange: function onChange(value) {
            return setAttributes({
              submitBgColor: value
            });
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Button border radius', 'advanced-gutenberg'),
          value: submitRadius,
          onChange: function onChange(value) {
            return setAttributes({
              submitRadius: value
            });
          },
          min: 0,
          max: 50
        }), /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Button position', 'advanced-gutenberg'),
          value: submitPosition,
          options: [{
            label: __('Center', 'advanced-gutenberg'),
            value: 'center'
          }, {
            label: __('Left', 'advanced-gutenberg'),
            value: 'left'
          }, {
            label: __('Right', 'advanced-gutenberg'),
            value: 'right'
          }],
          onChange: function onChange(value) {
            return setAttributes({
              submitPosition: value
            });
          }
        })), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Submit Button Hover', 'advanced-gutenberg'),
          initialOpen: false
        }, /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Hover Colors', 'advanced-gutenberg'),
          initialOpen: false,
          colorSettings: [{
            label: __('Background color', 'advanced-gutenberg'),
            value: submitHoverBgColor,
            onChange: function onChange(value) {
              return setAttributes({
                submitHoverBgColor: value
              });
            }
          }, {
            label: __('Text color', 'advanced-gutenberg'),
            value: submitHoverColor,
            onChange: function onChange(value) {
              return setAttributes({
                submitHoverColor: value
              });
            }
          }, {
            label: __('Shadow color', 'advanced-gutenberg'),
            value: submitHoverShadow,
            onChange: function onChange(value) {
              return setAttributes({
                submitHoverShadow: value
              });
            }
          }]
        }), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Shadow', 'advanced-gutenberg'),
          initialOpen: false
        }, /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Opacity (%)', 'advanced-gutenberg'),
          value: submitHoverOpacity,
          onChange: function onChange(value) {
            return setAttributes({
              submitHoverOpacity: value
            });
          },
          min: 0,
          max: 100
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Transition speed (ms)', 'advanced-gutenberg'),
          value: submitHoverTranSpeed || '',
          onChange: function onChange(value) {
            return setAttributes({
              submitHoverTranSpeed: value
            });
          },
          min: 0,
          max: 3000
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Shadow H offset', 'advanced-gutenberg'),
          value: submitHoverShadowH || '',
          onChange: function onChange(value) {
            return setAttributes({
              submitHoverShadowH: value
            });
          },
          min: -50,
          max: 50
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Shadow V offset', 'advanced-gutenberg'),
          value: submitHoverShadowV || '',
          onChange: function onChange(value) {
            return setAttributes({
              submitHoverShadowV: value
            });
          },
          min: -50,
          max: 50
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Shadow blur', 'advanced-gutenberg'),
          value: submitHoverShadowBlur || '',
          onChange: function onChange(value) {
            return setAttributes({
              submitHoverShadowBlur: value
            });
          },
          min: 0,
          max: 50
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Shadow spread', 'advanced-gutenberg'),
          value: submitHoverShadowSpread || '',
          onChange: function onChange(value) {
            return setAttributes({
              submitHoverShadowSpread: value
            });
          },
          min: 0,
          max: 50
        }))), typeof advgbBlocks !== 'undefined' && !parseInt(advgbBlocks.captchaEnabled) && /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Notice', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement("p", {
          style: {
            fontStyle: 'italic'
          }
        }, __('We strongly recommend to enable Google reCAPTCHA to avoid spam.', 'advanced-gutenberg'), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("a", {
          href: advgbBlocks.config_url + '&tab=recaptcha',
          target: "_blank"
        }, __('You can enable it in Settings', 'advanced-gutenberg'))))), /*#__PURE__*/React.createElement("div", {
          className: "advgb-lores-form-wrapper",
          style: {
            width: formWidth
          }
        }, !registerView ? loginForm : typeof advgbBlocks !== 'undefined' && !parseInt(advgbBlocks.registerEnabled) ? /*#__PURE__*/React.createElement(Placeholder, {
          icon: userIcon,
          label: __('Registration Form', 'advanced-gutenberg'),
          instructions: __('Registration for your website is currently disabled, enable it in WordPress General settings to use registration form', 'advanced-gutenberg')
        }) : registerForm, /*#__PURE__*/React.createElement("style", null, ".".concat(submitButtonId, ":hover {\n                                color: ").concat(submitHoverColor, " !important;\n                                background-color: ").concat(submitHoverBgColor, " !important;\n                                box-shadow: ").concat(submitHoverShadowH, "px ").concat(submitHoverShadowV, "px ").concat(submitHoverShadowBlur, "px ").concat(submitHoverShadowSpread, "px ").concat(submitHoverShadow, ";\n                                transition: all ").concat(submitHoverTranSpeed, "s ease;\n                                opacity: ").concat(submitHoverOpacity / 100, "\n                            }"))));
      }
    }]);
  }(Component);
  var loginFormBlockIcon = /*#__PURE__*/React.createElement("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    width: "20",
    height: "20",
    viewBox: "2 2 22 22"
  }, /*#__PURE__*/React.createElement("path", {
    fill: "none",
    d: "M0 0h24v24H0V0z"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M11 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0-6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zM5 18c.2-.63 2.57-1.68 4.96-1.94l2.04-2c-.39-.04-.68-.06-1-.06-2.67 0-8 1.34-8 4v2h9l-2-2H5zm15.6-5.5l-5.13 5.17-2.07-2.08L12 17l3.47 3.5L22 13.91z"
  }));
  var blockAttrs = {
    formType: {
      type: 'string',
      default: 'login'
    },
    formWidth: {
      type: 'number',
      default: 500
    },
    redirect: {
      type: 'string',
      default: 'home'
    },
    redirectLink: {
      type: 'string'
    },
    showLogo: {
      type: 'boolean',
      default: true
    },
    showInputFieldIcon: {
      type: 'boolean',
      default: true
    },
    showRegisterLink: {
      type: 'boolean',
      default: true
    },
    showLostPasswordLink: {
      type: 'boolean',
      default: true
    },
    logoImg: {
      type: 'string',
      default: advgbBlocks.login_logo
    },
    logoID: {
      type: 'number'
    },
    registerLogoImg: {
      type: 'string',
      default: advgbBlocks.reg_logo
    },
    registerLogoID: {
      type: 'number'
    },
    logoWidth: {
      type: 'number',
      default: 150
    },
    welcomeText: {
      type: 'string',
      default: __('Welcome back', 'advanced-gutenberg')
    },
    loginLabel: {
      type: 'string'
    },
    loginText: {
      type: 'string',
      default: __('Username or Email', 'advanced-gutenberg')
    },
    passwordText: {
      type: 'string',
      default: __('Password', 'advanced-gutenberg')
    },
    usernameLabel: {
      type: 'string'
    },
    userText: {
      type: 'string',
      default: __('Username', 'advanced-gutenberg')
    },
    emailLabel: {
      type: 'string'
    },
    emailText: {
      type: 'string',
      default: __('Email', 'advanced-gutenberg')
    },
    rememberMeText: {
      type: 'string',
      default: __('Remember me', 'advanced-gutenberg')
    },
    loginSubmitLabel: {
      type: 'string',
      default: __('LOGIN', 'advanced-gutenberg')
    },
    registerSubmitLabel: {
      type: 'string',
      default: __('REGISTER', 'advanced-gutenberg')
    },
    registerText: {
      type: 'string',
      default: __("Don't have an account?", "advanced-gutenberg")
    },
    registerLinkText: {
      type: 'string',
      default: __('Register now', 'advanced-gutenberg')
    },
    registerWelcome: {
      type: 'string',
      default: __('Register new account', 'advanced-gutenberg')
    },
    backToLoginText: {
      type: 'string',
      default: __('Login', 'advanced-gutenberg')
    },
    lostPasswordText: {
      type: 'string',
      default: __('Lost your password?', 'advanced-gutenberg')
    },
    headerBgColor: {
      type: 'string'
    },
    bgColor: {
      type: 'string'
    },
    textColor: {
      type: 'string'
    },
    inputColor: {
      type: 'string'
    },
    borderStyle: {
      type: 'string'
    },
    borderColor: {
      type: 'string'
    },
    borderWidth: {
      type: 'number'
    },
    submitButtonId: {
      type: 'string'
    },
    submitColor: {
      type: 'string'
    },
    submitBgColor: {
      type: 'string'
    },
    submitRadius: {
      type: 'number'
    },
    submitPosition: {
      type: 'string',
      default: 'right'
    },
    submitHoverColor: {
      type: 'string'
    },
    submitHoverBgColor: {
      type: 'string'
    },
    submitHoverShadow: {
      type: 'string'
    },
    submitHoverShadowH: {
      type: 'number',
      default: 1
    },
    submitHoverShadowV: {
      type: 'number',
      default: 1
    },
    submitHoverShadowBlur: {
      type: 'number',
      default: 12
    },
    submitHoverShadowSpread: {
      type: 'number',
      default: 0
    },
    submitHoverOpacity: {
      type: 'number',
      default: 100
    },
    submitHoverTranSpeed: {
      type: 'number',
      default: 200
    },
    changed: {
      type: 'boolean',
      default: false
    },
    isPreview: {
      type: 'boolean',
      default: false
    }
  };
  registerBlockType('advgb/login-form', {
    apiVersion: 3,
    title: __('Login and Register - PublishPress', 'advanced-gutenberg'),
    description: __('Create a login form for your post/page.', 'advanced-gutenberg'),
    icon: {
      src: loginFormBlockIcon,
      foreground: typeof advgbBlocks !== 'undefined' ? advgbBlocks.color : undefined
    },
    category: 'advgb-category',
    keywords: [__('accordion', 'advanced-gutenberg'), __('list', 'advanced-gutenberg'), __('faq', 'advanced-gutenberg')],
    attributes: blockAttrs,
    example: {
      attributes: {
        isPreview: true
      }
    },
    supports: {
      anchor: true
    },
    edit: LoginFormEdit,
    save: function save(_ref3) {
      var attributes = _ref3.attributes;
      var formType = attributes.formType,
        formWidth = attributes.formWidth,
        redirect = attributes.redirect,
        redirectLink = attributes.redirectLink,
        showLogo = attributes.showLogo,
        showInputFieldIcon = attributes.showInputFieldIcon,
        showRegisterLink = attributes.showRegisterLink,
        showLostPasswordLink = attributes.showLostPasswordLink,
        logoImg = attributes.logoImg,
        registerLogoImg = attributes.registerLogoImg,
        logoWidth = attributes.logoWidth,
        welcomeText = attributes.welcomeText,
        loginLabel = attributes.loginLabel,
        loginText = attributes.loginText,
        passwordText = attributes.passwordText,
        usernameLabel = attributes.usernameLabel,
        userText = attributes.userText,
        emailLabel = attributes.emailLabel,
        emailText = attributes.emailText,
        rememberMeText = attributes.rememberMeText,
        loginSubmitLabel = attributes.loginSubmitLabel,
        registerSubmitLabel = attributes.registerSubmitLabel,
        registerText = attributes.registerText,
        registerLinkText = attributes.registerLinkText,
        registerWelcome = attributes.registerWelcome,
        backToLoginText = attributes.backToLoginText,
        lostPasswordText = attributes.lostPasswordText,
        headerBgColor = attributes.headerBgColor,
        bgColor = attributes.bgColor,
        textColor = attributes.textColor,
        inputColor = attributes.inputColor,
        borderColor = attributes.borderColor,
        borderStyle = attributes.borderStyle,
        borderWidth = attributes.borderWidth,
        submitColor = attributes.submitColor,
        submitBgColor = attributes.submitBgColor,
        submitRadius = attributes.submitRadius,
        submitPosition = attributes.submitPosition,
        submitButtonId = attributes.submitButtonId;
      var logoElmSave = /*#__PURE__*/React.createElement("div", {
        className: "advgb-lores-form-logo-wrapper"
      }, /*#__PURE__*/React.createElement("span", {
        style: {
          display: 'block'
        }
      }, /*#__PURE__*/React.createElement("img", {
        className: "advgb-lores-form-logo",
        src: logoImg,
        alt: __('Site logo', 'advanced-gutenberg'),
        style: {
          width: logoWidth ? logoWidth + 'px' : undefined,
          cursor: 'pointer'
        }
      })));
      var regLogoElmSave = /*#__PURE__*/React.createElement("div", {
        className: "advgb-lores-form-logo-wrapper"
      }, /*#__PURE__*/React.createElement("span", {
        style: {
          display: 'block'
        }
      }, /*#__PURE__*/React.createElement("img", {
        className: "advgb-lores-form-logo",
        src: registerLogoImg,
        alt: __('Site logo', 'advanced-gutenberg'),
        style: {
          width: logoWidth ? logoWidth + 'px' : undefined,
          cursor: 'pointer'
        }
      })));
      var loginFormSave = /*#__PURE__*/React.createElement("div", {
        className: "advgb-login-form-wrapper advgb-lores-form",
        style: {
          display: formType === 'login' ? 'block' : 'none'
        }
      }, !!showRegisterLink && /*#__PURE__*/React.createElement("div", {
        className: "advgb-register-link-wrapper advgb-header-navigation",
        style: {
          backgroundColor: headerBgColor
        }
      }, /*#__PURE__*/React.createElement(RichText.Content, {
        tagName: "span",
        className: "advgb-register-text",
        value: registerText,
        style: {
          color: textColor
        }
      }), /*#__PURE__*/React.createElement(RichText.Content, {
        tagName: "a",
        href: "#",
        className: "advgb-register-link",
        value: registerLinkText,
        style: {
          color: submitBgColor
        }
      })), /*#__PURE__*/React.createElement("form", {
        action: "",
        className: "advgb-form-login",
        method: "post"
      }, /*#__PURE__*/React.createElement("div", {
        className: "advgb-login-form advgb-form-inner"
      }, /*#__PURE__*/React.createElement("div", {
        className: "advgb-lores-form-header"
      }, !!showLogo && logoElmSave, /*#__PURE__*/React.createElement(RichText.Content, {
        tagName: "h3",
        className: "advgb-lores-form-welcome",
        value: welcomeText,
        style: {
          color: textColor
        }
      })), /*#__PURE__*/React.createElement("div", {
        className: "advgb-lores-field advgb-login-user",
        style: {
          borderColor: textColor
        }
      }, /*#__PURE__*/React.createElement("div", {
        className: "advgb-lores-field-label"
      }, /*#__PURE__*/React.createElement(RichText.Content, {
        tagName: "label",
        htmlFor: "advgb-login-user",
        value: loginText,
        style: {
          color: textColor
        }
      })), /*#__PURE__*/React.createElement("div", {
        className: "advgb-lores-field-input",
        style: {
          backgroundColor: bgColor,
          color: inputColor,
          borderBottomColor: borderColor,
          borderStyle: borderStyle,
          borderWidth: borderWidth
        }
      }, !!showInputFieldIcon && /*#__PURE__*/React.createElement("span", {
        className: "advgb-lores-input-icon",
        style: {
          color: textColor
        }
      }, emailIcon), /*#__PURE__*/React.createElement("input", {
        type: "text",
        id: "advgb-login-user",
        className: "advgb-lores-input",
        name: "log",
        style: {
          color: inputColor
        },
        placeholder: loginLabel ? loginLabel : 'user@email.com'
      }))), /*#__PURE__*/React.createElement("div", {
        className: "advgb-lores-field advgb-login-password",
        style: {
          borderColor: textColor
        }
      }, /*#__PURE__*/React.createElement("div", {
        className: "advgb-lores-field-label"
      }, /*#__PURE__*/React.createElement(RichText.Content, {
        tagName: "label",
        htmlFor: "advgb-login-password",
        value: passwordText,
        style: {
          color: textColor
        }
      })), /*#__PURE__*/React.createElement("div", {
        className: "advgb-lores-field-input",
        style: {
          backgroundColor: bgColor,
          color: inputColor,
          borderBottomColor: borderColor,
          borderStyle: borderStyle,
          borderWidth: borderWidth
        }
      }, !!showInputFieldIcon && /*#__PURE__*/React.createElement("span", {
        className: "advgb-lores-input-icon",
        style: {
          color: textColor
        }
      }, passwordIcon), /*#__PURE__*/React.createElement("input", {
        type: "password",
        id: "advgb-login-password",
        className: "advgb-lores-input",
        name: "pwd",
        style: {
          color: inputColor
        },
        placeholder: "password"
      }))), /*#__PURE__*/React.createElement("div", {
        className: "advgb-grecaptcha clearfix position-".concat(submitPosition)
      }), /*#__PURE__*/React.createElement("div", {
        className: "advgb-lores-field advgb-lores-submit-wrapper advgb-submit-align-".concat(submitPosition)
      }, /*#__PURE__*/React.createElement("label", {
        htmlFor: "rememberme",
        className: "remember-me-label"
      }, /*#__PURE__*/React.createElement("input", {
        type: "checkbox",
        value: "forever",
        id: "rememberme",
        name: "rememberme",
        className: "advgb-lores-checkbox"
      }), /*#__PURE__*/React.createElement("div", {
        style: {
          color: submitBgColor
        },
        className: "remember-me-switch"
      }, /*#__PURE__*/React.createElement(RichText.Content, {
        tagName: "span",
        style: {
          color: textColor
        },
        value: rememberMeText
      }))), /*#__PURE__*/React.createElement("div", {
        className: "advgb-lores-submit advgb-login-submit"
      }, /*#__PURE__*/React.createElement(RichText.Content, {
        tagName: "button",
        value: loginSubmitLabel,
        className: "advgb-lores-submit-button ".concat(submitButtonId),
        type: "submit",
        name: "wp-submit",
        style: {
          borderColor: submitColor,
          color: submitColor,
          backgroundColor: submitBgColor,
          borderRadius: submitRadius
        }
      }), /*#__PURE__*/React.createElement("input", {
        type: "hidden",
        name: "redirect_to",
        "data-redirect": redirect,
        className: "redirect_to",
        value: redirectLink
      }), /*#__PURE__*/React.createElement("input", {
        type: "hidden",
        name: "testcookie",
        value: "1"
      }), /*#__PURE__*/React.createElement("input", {
        type: "hidden",
        name: "advgb_login_form",
        value: "1"
      }))), !!showLostPasswordLink && /*#__PURE__*/React.createElement("div", {
        className: "advgb-lores-field advgb-lost-password-field"
      }, /*#__PURE__*/React.createElement("div", {
        className: "advgb-lost-password"
      }, /*#__PURE__*/React.createElement(RichText.Content, {
        tagName: "a",
        href: "#",
        className: "advgb-lost-password",
        style: {
          color: submitBgColor
        },
        value: lostPasswordText
      }))))));
      var registerFormSave = /*#__PURE__*/React.createElement("div", {
        className: "advgb-register-form-wrapper advgb-lores-form",
        style: {
          display: formType === 'register' ? 'block' : 'none'
        }
      }, !!showRegisterLink && /*#__PURE__*/React.createElement("div", {
        className: "advgb-header-navigation advgb-back-to-login",
        style: {
          backgroundColor: headerBgColor
        }
      }, /*#__PURE__*/React.createElement("div", {
        className: "advgb-back-to-login-link",
        style: {
          color: submitBgColor
        }
      }, /*#__PURE__*/React.createElement(RichText.Content, {
        tagName: "span",
        className: "advgb-register-text",
        style: {
          color: submitBgColor
        },
        value: backToLoginText
      }))), /*#__PURE__*/React.createElement("form", {
        action: "",
        className: "advgb-form-register",
        method: "post"
      }, /*#__PURE__*/React.createElement("div", {
        className: "advgb-register-form advgb-form-inner"
      }, /*#__PURE__*/React.createElement("div", {
        className: "advgb-lores-form-header"
      }, !!showLogo && regLogoElmSave, /*#__PURE__*/React.createElement(RichText.Content, {
        tagName: "h3",
        className: "advgb-lores-form-welcome",
        style: {
          color: textColor
        },
        value: registerWelcome
      })), /*#__PURE__*/React.createElement("div", {
        className: "advgb-lores-field advgb-register-username",
        style: {
          borderColor: textColor
        }
      }, /*#__PURE__*/React.createElement("div", {
        className: "advgb-lores-field-label"
      }, /*#__PURE__*/React.createElement(RichText.Content, {
        tagName: "label",
        htmlFor: "advgb-register-username",
        style: {
          color: textColor
        },
        value: userText
      })), /*#__PURE__*/React.createElement("div", {
        className: "advgb-lores-field-input",
        style: {
          backgroundColor: bgColor,
          color: inputColor,
          borderBottomColor: borderColor,
          borderStyle: borderStyle,
          borderWidth: borderWidth
        }
      }, !!showInputFieldIcon && /*#__PURE__*/React.createElement("span", {
        className: "advgb-lores-input-icon",
        style: {
          color: textColor
        }
      }, userIcon), /*#__PURE__*/React.createElement("input", {
        type: "text",
        id: "advgb-register-username",
        className: "advgb-lores-input",
        name: "user_login",
        style: {
          color: inputColor
        },
        placeholder: usernameLabel ? usernameLabel : 'username'
      }))), /*#__PURE__*/React.createElement("div", {
        className: "advgb-lores-field advgb-register-email",
        style: {
          borderColor: textColor
        }
      }, /*#__PURE__*/React.createElement("div", {
        className: "advgb-lores-field-label"
      }, /*#__PURE__*/React.createElement(RichText.Content, {
        tagName: "label",
        htmlFor: "advgb-register-email",
        style: {
          color: textColor
        },
        value: emailText
      })), /*#__PURE__*/React.createElement("div", {
        className: "advgb-lores-field-input",
        style: {
          backgroundColor: bgColor,
          color: inputColor,
          borderBottomColor: borderColor,
          borderStyle: borderStyle,
          borderWidth: borderWidth
        }
      }, !!showInputFieldIcon && /*#__PURE__*/React.createElement("span", {
        className: "advgb-lores-input-icon",
        style: {
          color: textColor
        }
      }, emailIcon), /*#__PURE__*/React.createElement("input", {
        type: "email",
        id: "advgb-register-email",
        className: "advgb-lores-input",
        name: "user_email",
        style: {
          color: inputColor
        },
        placeholder: emailLabel ? emailLabel : 'user@email.com'
      }))), /*#__PURE__*/React.createElement("div", {
        className: "advgb-grecaptcha clearfix position-".concat(submitPosition)
      }), /*#__PURE__*/React.createElement("div", {
        className: "advgb-lores-field advgb-lores-submit-wrapper advgb-submit-align-".concat(submitPosition)
      }, /*#__PURE__*/React.createElement("div", {
        className: "advgb-lores-submit advgb-register-submit"
      }, /*#__PURE__*/React.createElement(RichText.Content, {
        tagName: "button",
        value: registerSubmitLabel,
        className: "advgb-lores-submit-button ".concat(submitButtonId),
        type: "submit",
        name: "wp-submit",
        style: {
          borderColor: submitColor,
          color: submitColor,
          backgroundColor: submitBgColor,
          borderRadius: submitRadius
        }
      }))))));
      return /*#__PURE__*/React.createElement("div", {
        className: "advgb-lores-form-wrapper",
        style: {
          width: formWidth
        }
      }, loginFormSave, registerFormSave);
    }
  });
})(wp.i18n, wp.blocks, wp.element, wp.blockEditor, wp.components);

/***/ },

/***/ "./assets/blocks/map/block.jsx"
/*!*************************************!*\
  !*** ./assets/blocks/map/block.jsx ***!
  \*************************************/
() {

function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _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 _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
(function (wpI18n, wpBlocks, wpElement, wpBlockEditor, wpComponents) {
  wpBlockEditor = wp.blockEditor || wp.editor;
  var __ = wpI18n.__;
  var Component = wpElement.Component,
    Fragment = wpElement.Fragment;
  var registerBlockType = wpBlocks.registerBlockType;
  var _wpBlockEditor = wpBlockEditor,
    InspectorControls = _wpBlockEditor.InspectorControls,
    MediaUpload = _wpBlockEditor.MediaUpload;
  var PanelBody = wpComponents.PanelBody,
    TextControl = wpComponents.TextControl,
    TextareaControl = wpComponents.TextareaControl,
    RangeControl = wpComponents.RangeControl,
    SelectControl = wpComponents.SelectControl,
    ToggleControl = wpComponents.ToggleControl,
    BaseControl = wpComponents.BaseControl,
    Button = wpComponents.Button,
    Placeholder = wpComponents.Placeholder,
    Spinner = wpComponents.Spinner;
  var mapWillUpdate = null;
  var sanitizeMapText = function sanitizeMapText(text) {
    var preserveLineBreaks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
    if (!text) return '';
    var div = document.createElement('div');
    div.textContent = text;
    var sanitized = div.innerHTML;
    if (preserveLineBreaks) {
      sanitized = sanitized.replace(/\n/g, '<br>');
    }
    return sanitized;
  };
  var escapeAttribute = function escapeAttribute(text) {
    return sanitizeMapText(text).replace(/"/g, '&quot;').replace(/'/g, '&#39;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
  };
  var mapBlockIcon = /*#__PURE__*/React.createElement("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    width: "20",
    height: "20",
    viewBox: "2 2 22 22",
    className: "dashicon"
  }, /*#__PURE__*/React.createElement("path", {
    d: "M20.5 3l-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM15 19l-6-2.11V5l6 2.11V19z"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M0 0h24v24H0z",
    fill: "none"
  }));
  var MAP_STYLES = {
    silver: [{
      "elementType": "geometry",
      "stylers": [{
        "color": "#f5f5f5"
      }]
    }, {
      "elementType": "labels.icon",
      "stylers": [{
        "visibility": "off"
      }]
    }, {
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#616161"
      }]
    }, {
      "elementType": "labels.text.stroke",
      "stylers": [{
        "color": "#f5f5f5"
      }]
    }, {
      "featureType": "administrative.land_parcel",
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#bdbdbd"
      }]
    }, {
      "featureType": "poi",
      "elementType": "geometry",
      "stylers": [{
        "color": "#eeeeee"
      }]
    }, {
      "featureType": "poi",
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#757575"
      }]
    }, {
      "featureType": "poi.park",
      "elementType": "geometry",
      "stylers": [{
        "color": "#e5e5e5"
      }]
    }, {
      "featureType": "poi.park",
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#9e9e9e"
      }]
    }, {
      "featureType": "road",
      "elementType": "geometry",
      "stylers": [{
        "color": "#ffffff"
      }]
    }, {
      "featureType": "road.arterial",
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#757575"
      }]
    }, {
      "featureType": "road.highway",
      "elementType": "geometry",
      "stylers": [{
        "color": "#dadada"
      }]
    }, {
      "featureType": "road.highway",
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#616161"
      }]
    }, {
      "featureType": "road.local",
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#9e9e9e"
      }]
    }, {
      "featureType": "transit.line",
      "elementType": "geometry",
      "stylers": [{
        "color": "#e5e5e5"
      }]
    }, {
      "featureType": "transit.station",
      "elementType": "geometry",
      "stylers": [{
        "color": "#eeeeee"
      }]
    }, {
      "featureType": "water",
      "elementType": "geometry",
      "stylers": [{
        "color": "#c9c9c9"
      }]
    }, {
      "featureType": "water",
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#9e9e9e"
      }]
    }],
    retro: [{
      "elementType": "geometry",
      "stylers": [{
        "color": "#ebe3cd"
      }]
    }, {
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#523735"
      }]
    }, {
      "elementType": "labels.text.stroke",
      "stylers": [{
        "color": "#f5f1e6"
      }]
    }, {
      "featureType": "administrative",
      "elementType": "geometry.stroke",
      "stylers": [{
        "color": "#c9b2a6"
      }]
    }, {
      "featureType": "administrative.land_parcel",
      "elementType": "geometry.stroke",
      "stylers": [{
        "color": "#dcd2be"
      }]
    }, {
      "featureType": "administrative.land_parcel",
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#ae9e90"
      }]
    }, {
      "featureType": "landscape.natural",
      "elementType": "geometry",
      "stylers": [{
        "color": "#dfd2ae"
      }]
    }, {
      "featureType": "poi",
      "elementType": "geometry",
      "stylers": [{
        "color": "#dfd2ae"
      }]
    }, {
      "featureType": "poi",
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#93817c"
      }]
    }, {
      "featureType": "poi.park",
      "elementType": "geometry.fill",
      "stylers": [{
        "color": "#a5b076"
      }]
    }, {
      "featureType": "poi.park",
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#447530"
      }]
    }, {
      "featureType": "road",
      "elementType": "geometry",
      "stylers": [{
        "color": "#f5f1e6"
      }]
    }, {
      "featureType": "road.arterial",
      "elementType": "geometry",
      "stylers": [{
        "color": "#fdfcf8"
      }]
    }, {
      "featureType": "road.highway",
      "elementType": "geometry",
      "stylers": [{
        "color": "#f8c967"
      }]
    }, {
      "featureType": "road.highway",
      "elementType": "geometry.stroke",
      "stylers": [{
        "color": "#e9bc62"
      }]
    }, {
      "featureType": "road.highway.controlled_access",
      "elementType": "geometry",
      "stylers": [{
        "color": "#e98d58"
      }]
    }, {
      "featureType": "road.highway.controlled_access",
      "elementType": "geometry.stroke",
      "stylers": [{
        "color": "#db8555"
      }]
    }, {
      "featureType": "road.local",
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#806b63"
      }]
    }, {
      "featureType": "transit.line",
      "elementType": "geometry",
      "stylers": [{
        "color": "#dfd2ae"
      }]
    }, {
      "featureType": "transit.line",
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#8f7d77"
      }]
    }, {
      "featureType": "transit.line",
      "elementType": "labels.text.stroke",
      "stylers": [{
        "color": "#ebe3cd"
      }]
    }, {
      "featureType": "transit.station",
      "elementType": "geometry",
      "stylers": [{
        "color": "#dfd2ae"
      }]
    }, {
      "featureType": "water",
      "elementType": "geometry.fill",
      "stylers": [{
        "color": "#b9d3c2"
      }]
    }, {
      "featureType": "water",
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#92998d"
      }]
    }],
    dark: [{
      "elementType": "geometry",
      "stylers": [{
        "color": "#212121"
      }]
    }, {
      "elementType": "labels.icon",
      "stylers": [{
        "visibility": "off"
      }]
    }, {
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#757575"
      }]
    }, {
      "elementType": "labels.text.stroke",
      "stylers": [{
        "color": "#212121"
      }]
    }, {
      "featureType": "administrative",
      "elementType": "geometry",
      "stylers": [{
        "color": "#757575"
      }]
    }, {
      "featureType": "administrative.country",
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#9e9e9e"
      }]
    }, {
      "featureType": "administrative.land_parcel",
      "stylers": [{
        "visibility": "off"
      }]
    }, {
      "featureType": "administrative.locality",
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#bdbdbd"
      }]
    }, {
      "featureType": "poi",
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#757575"
      }]
    }, {
      "featureType": "poi.park",
      "elementType": "geometry",
      "stylers": [{
        "color": "#181818"
      }]
    }, {
      "featureType": "poi.park",
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#616161"
      }]
    }, {
      "featureType": "poi.park",
      "elementType": "labels.text.stroke",
      "stylers": [{
        "color": "#1b1b1b"
      }]
    }, {
      "featureType": "road",
      "elementType": "geometry.fill",
      "stylers": [{
        "color": "#2c2c2c"
      }]
    }, {
      "featureType": "road",
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#8a8a8a"
      }]
    }, {
      "featureType": "road.arterial",
      "elementType": "geometry",
      "stylers": [{
        "color": "#373737"
      }]
    }, {
      "featureType": "road.highway",
      "elementType": "geometry",
      "stylers": [{
        "color": "#3c3c3c"
      }]
    }, {
      "featureType": "road.highway.controlled_access",
      "elementType": "geometry",
      "stylers": [{
        "color": "#4e4e4e"
      }]
    }, {
      "featureType": "road.local",
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#616161"
      }]
    }, {
      "featureType": "transit",
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#757575"
      }]
    }, {
      "featureType": "water",
      "elementType": "geometry",
      "stylers": [{
        "color": "#000000"
      }]
    }, {
      "featureType": "water",
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#3d3d3d"
      }]
    }],
    night: [{
      "elementType": "geometry",
      "stylers": [{
        "color": "#242f3e"
      }]
    }, {
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#746855"
      }]
    }, {
      "elementType": "labels.text.stroke",
      "stylers": [{
        "color": "#242f3e"
      }]
    }, {
      "featureType": "administrative.locality",
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#d59563"
      }]
    }, {
      "featureType": "poi",
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#d59563"
      }]
    }, {
      "featureType": "poi.park",
      "elementType": "geometry",
      "stylers": [{
        "color": "#263c3f"
      }]
    }, {
      "featureType": "poi.park",
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#6b9a76"
      }]
    }, {
      "featureType": "road",
      "elementType": "geometry",
      "stylers": [{
        "color": "#38414e"
      }]
    }, {
      "featureType": "road",
      "elementType": "geometry.stroke",
      "stylers": [{
        "color": "#212a37"
      }]
    }, {
      "featureType": "road",
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#9ca5b3"
      }]
    }, {
      "featureType": "road.highway",
      "elementType": "geometry",
      "stylers": [{
        "color": "#746855"
      }]
    }, {
      "featureType": "road.highway",
      "elementType": "geometry.stroke",
      "stylers": [{
        "color": "#1f2835"
      }]
    }, {
      "featureType": "road.highway",
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#f3d19c"
      }]
    }, {
      "featureType": "transit",
      "elementType": "geometry",
      "stylers": [{
        "color": "#2f3948"
      }]
    }, {
      "featureType": "transit.station",
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#d59563"
      }]
    }, {
      "featureType": "water",
      "elementType": "geometry",
      "stylers": [{
        "color": "#17263c"
      }]
    }, {
      "featureType": "water",
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#515c6d"
      }]
    }, {
      "featureType": "water",
      "elementType": "labels.text.stroke",
      "stylers": [{
        "color": "#17263c"
      }]
    }],
    aubergine: [{
      "elementType": "geometry",
      "stylers": [{
        "color": "#1d2c4d"
      }]
    }, {
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#8ec3b9"
      }]
    }, {
      "elementType": "labels.text.stroke",
      "stylers": [{
        "color": "#1a3646"
      }]
    }, {
      "featureType": "administrative.country",
      "elementType": "geometry.stroke",
      "stylers": [{
        "color": "#4b6878"
      }]
    }, {
      "featureType": "administrative.land_parcel",
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#64779e"
      }]
    }, {
      "featureType": "administrative.province",
      "elementType": "geometry.stroke",
      "stylers": [{
        "color": "#4b6878"
      }]
    }, {
      "featureType": "landscape.man_made",
      "elementType": "geometry.stroke",
      "stylers": [{
        "color": "#334e87"
      }]
    }, {
      "featureType": "landscape.natural",
      "elementType": "geometry",
      "stylers": [{
        "color": "#023e58"
      }]
    }, {
      "featureType": "poi",
      "elementType": "geometry",
      "stylers": [{
        "color": "#283d6a"
      }]
    }, {
      "featureType": "poi",
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#6f9ba5"
      }]
    }, {
      "featureType": "poi",
      "elementType": "labels.text.stroke",
      "stylers": [{
        "color": "#1d2c4d"
      }]
    }, {
      "featureType": "poi.park",
      "elementType": "geometry.fill",
      "stylers": [{
        "color": "#023e58"
      }]
    }, {
      "featureType": "poi.park",
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#3C7680"
      }]
    }, {
      "featureType": "road",
      "elementType": "geometry",
      "stylers": [{
        "color": "#304a7d"
      }]
    }, {
      "featureType": "road",
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#98a5be"
      }]
    }, {
      "featureType": "road",
      "elementType": "labels.text.stroke",
      "stylers": [{
        "color": "#1d2c4d"
      }]
    }, {
      "featureType": "road.highway",
      "elementType": "geometry",
      "stylers": [{
        "color": "#2c6675"
      }]
    }, {
      "featureType": "road.highway",
      "elementType": "geometry.stroke",
      "stylers": [{
        "color": "#255763"
      }]
    }, {
      "featureType": "road.highway",
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#b0d5ce"
      }]
    }, {
      "featureType": "road.highway",
      "elementType": "labels.text.stroke",
      "stylers": [{
        "color": "#023e58"
      }]
    }, {
      "featureType": "transit",
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#98a5be"
      }]
    }, {
      "featureType": "transit",
      "elementType": "labels.text.stroke",
      "stylers": [{
        "color": "#1d2c4d"
      }]
    }, {
      "featureType": "transit.line",
      "elementType": "geometry.fill",
      "stylers": [{
        "color": "#283d6a"
      }]
    }, {
      "featureType": "transit.station",
      "elementType": "geometry",
      "stylers": [{
        "color": "#3a4762"
      }]
    }, {
      "featureType": "water",
      "elementType": "geometry",
      "stylers": [{
        "color": "#0e1626"
      }]
    }, {
      "featureType": "water",
      "elementType": "labels.text.fill",
      "stylers": [{
        "color": "#4e6d70"
      }]
    }]
  };
  var previewImageData = 'data:image/png;base64, ';
  var AdvMap = /*#__PURE__*/function (_Component) {
    function AdvMap() {
      var _this;
      _classCallCheck(this, AdvMap);
      _this = _callSuper(this, AdvMap, arguments);
      _this.state = {
        currentAddress: '',
        currentMap: null,
        currentMarker: null,
        currentInfo: null,
        fetching: false,
        invalidStyle: false,
        isBlockIdSet: false // @since 3.2.3
      };
      _this.initMap = _this.initMap.bind(_this);
      _this.fetchLocation = _this.fetchLocation.bind(_this);
      return _this;
    }
    _inherits(AdvMap, _Component);
    return _createClass(AdvMap, [{
      key: "componentWillMount",
      value: function componentWillMount() {
        var _this$props = this.props,
          attributes = _this$props.attributes,
          setAttributes = _this$props.setAttributes;
        var currentBlockConfig = advgbDefaultConfig['advgb-map'];

        // No override attributes of blocks inserted before
        if (attributes.changed !== true) {
          if (_typeof(currentBlockConfig) === 'object' && currentBlockConfig !== null) {
            Object.keys(currentBlockConfig).map(function (attribute) {
              if (typeof attributes[attribute] === 'boolean') {
                attributes[attribute] = !!currentBlockConfig[attribute];
              } else {
                attributes[attribute] = currentBlockConfig[attribute];
              }
            });
          }

          // Finally set changed attribute to true, so we don't modify anything again
          setAttributes({
            changed: true
          });
        }
      }
    }, {
      key: "componentDidMount",
      value: function componentDidMount() {
        var attributes = this.props.attributes;
        if (attributes.mapID) {
          this.initMap();
        }
      }
    }, {
      key: "componentDidUpdate",
      value: function componentDidUpdate(prevProps, prevState) {
        var _prevProps$attributes = prevProps.attributes,
          prevAddr = _prevProps$attributes.address,
          prevUseLatLng = _prevProps$attributes.useLatLng;
        var _this$props$attribute = this.props.attributes,
          address = _this$props$attribute.address,
          useLatLng = _this$props$attribute.useLatLng;
        var _this$props2 = this.props,
          setAttributes = _this$props2.setAttributes,
          clientId = _this$props2.clientId;

        // @since 3.2.3 - https://github.com/publishpress/PublishPress-Blocks/issues/1389
        if (!this.state.isBlockIdSet) {
          setAttributes({
            mapID: 'advgbmap-' + clientId
          });
          this.setState({
            isBlockIdSet: true
          });
        }
        if (prevAddr !== address || prevUseLatLng !== useLatLng || prevState !== this.state) return null;
        if (prevProps.attributes !== this.props.attributes) {
          clearTimeout(mapWillUpdate);
          mapWillUpdate = setTimeout(this.initMap, 1000);
        }
      }
    }, {
      key: "initMap",
      value: function initMap() {
        if (typeof google === "undefined" || !this.props.attributes.mapID) return null;
        var DEFAULT_MARKER = 'https://maps.gstatic.com/mapfiles/api-3/images/spotlight-poi2.png';
        var _this$state = this.state,
          currentMap = _this$state.currentMap,
          currentMarker = _this$state.currentMarker,
          currentInfo = _this$state.currentInfo,
          invalidStyle = _this$state.invalidStyle;
        var _this$props$attribute2 = this.props.attributes,
          mapID = _this$props$attribute2.mapID,
          lat = _this$props$attribute2.lat,
          lng = _this$props$attribute2.lng,
          zoom = _this$props$attribute2.zoom,
          markerTitle = _this$props$attribute2.markerTitle,
          markerIcon = _this$props$attribute2.markerIcon,
          markerDesc = _this$props$attribute2.markerDesc,
          mapStyle = _this$props$attribute2.mapStyle,
          mapStyleCustom = _this$props$attribute2.mapStyleCustom,
          infoWindowDefaultShown = _this$props$attribute2.infoWindowDefaultShown;
        var location = {
          lat: parseFloat(lat),
          lng: parseFloat(lng)
        };
        var that = this;
        var map = currentMap;
        var marker = currentMarker;
        var infoWindow = currentInfo;
        var customStyleParsed = '';
        var formattedDesc = sanitizeMapText(markerDesc.replace(/\n/g, '<br/>'));
        var sanitizedTitle = sanitizeMapText(markerTitle);
        if (mapStyle === 'custom') {
          try {
            customStyleParsed = JSON.parse(mapStyleCustom);
            if (invalidStyle) that.setState({
              invalidStyle: false
            });
          } catch (e) {
            that.setState({
              invalidStyle: true
            });
          }
        }
        if (!map) {
          map = new google.maps.Map(document.getElementById(mapID), {
            zoom: zoom,
            center: location,
            gestureHandling: 'cooperative'
          });
          this.setState({
            currentMap: map
          });
        }
        map.setCenter(location);
        map.setZoom(zoom);
        map.setOptions({
          styles: !!mapStyle ? mapStyle !== 'custom' ? MAP_STYLES[mapStyle] : customStyleParsed : undefined
        });
        if (!infoWindow) {
          infoWindow = new google.maps.InfoWindow({
            content: "<div class=\"advgbmap-wrapper\">\n                    <h3 class=\"advgbmap-title\">".concat(sanitizedTitle, "</h3>\n                    <p class=\"advgbmap-desc\">").concat(formattedDesc || '', "</p>\n                </div>"),
            maxWidth: 500
          });
          this.setState({
            currentInfo: infoWindow
          });
        }
        infoWindow.setContent("<div class=\"advgbmap-wrapper\">\n                <h3 class=\"advgbmap-title\">".concat(sanitizedTitle, "</h3>\n                <p class=\"advgbmap-desc\">").concat(formattedDesc || '', "</p>\n            </div>"));
        if (!marker) {
          marker = new google.maps.Marker({
            position: location,
            map: map,
            title: markerTitle,
            draggable: true,
            animation: google.maps.Animation.DROP,
            icon: {
              url: markerIcon || DEFAULT_MARKER,
              scaledSize: new google.maps.Size(27, 43)
            }
          });
          this.setState({
            currentMarker: marker
          });
        }
        marker.setPosition(location);
        marker.setTitle(markerTitle);
        marker.setIcon({
          url: markerIcon || DEFAULT_MARKER,
          scaledSize: new google.maps.Size(27, 43)
        });
        if (!!markerTitle || !!markerDesc) {
          marker.addListener('click', function () {
            infoWindow.open(map, marker);
          });
          if (infoWindowDefaultShown) {
            infoWindow.open(map, marker);
          }
        } else {
          infoWindow.close();
        }
        marker.addListener('dragend', function () {
          var newLocation = marker.getPosition();
          var newLat = newLocation.lat();
          var newLng = newLocation.lng();
          that.props.setAttributes({
            lat: newLat,
            lng: newLng
          });
        });
      }
    }, {
      key: "fetchLocation",
      value: function fetchLocation() {
        if (typeof google === "undefined") return null;
        var _this$props3 = this.props,
          attributes = _this$props3.attributes,
          setAttributes = _this$props3.setAttributes;
        var address = attributes.address;
        var geoCoder = new google.maps.Geocoder();
        var _google$maps$Geocoder = google.maps.GeocoderStatus,
          OK = _google$maps$Geocoder.OK,
          ZERO_RESULTS = _google$maps$Geocoder.ZERO_RESULTS;
        var that = this;
        if (geoCoder) {
          that.setState({
            fetching: true
          });
          geoCoder.geocode({
            address: address
          }, function (res, stt) {
            if (stt === OK) {
              var location = res[0].geometry.location;
              setAttributes({
                lat: location.lat().toString(),
                lng: location.lng().toString(),
                currentAddress: res[0].formatted_address
              });
            } else if (stt === ZERO_RESULTS) {
              setAttributes({
                currentAddress: __('No matching address found!', 'advanced-gutenberg')
              });
            } else {
              setAttributes({
                currentAddress: stt
              });
            }
            that.setState({
              fetching: false
            });
          });
        }
      }
    }, {
      key: "render",
      value: function render() {
        var _this$state2 = this.state,
          fetching = _this$state2.fetching,
          invalidStyle = _this$state2.invalidStyle;
        var _this$props4 = this.props,
          attributes = _this$props4.attributes,
          setAttributes = _this$props4.setAttributes;
        var mapID = attributes.mapID,
          useLatLng = attributes.useLatLng,
          address = attributes.address,
          currentAddress = attributes.currentAddress,
          lat = attributes.lat,
          lng = attributes.lng,
          zoom = attributes.zoom,
          height = attributes.height,
          markerIcon = attributes.markerIcon,
          markerIconID = attributes.markerIconID,
          markerTitle = attributes.markerTitle,
          markerDesc = attributes.markerDesc,
          mapStyle = attributes.mapStyle,
          mapStyleCustom = attributes.mapStyleCustom,
          infoWindowDefaultShown = attributes.infoWindowDefaultShown,
          isPreview = attributes.isPreview;
        var listStyles = Object.keys(MAP_STYLES).map(function (style) {
          return {
            label: style[0].toUpperCase() + style.slice(1),
            value: style
          };
        });
        return isPreview ? /*#__PURE__*/React.createElement("img", {
          alt: __('Map', 'advanced-gutenberg'),
          width: "100%",
          src: previewImageData
        }) : /*#__PURE__*/React.createElement(Fragment, null, typeof google !== 'undefined' && /*#__PURE__*/React.createElement(InspectorControls, null, /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Map settings', 'advanced-gutenberg')
        }, !useLatLng && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(TextControl, {
          label: [__('Address', 'advanced-gutenberg'), /*#__PURE__*/React.createElement("a", {
            key: "switch-type",
            style: {
              marginLeft: '10px'
            },
            onClick: function onClick() {
              return setAttributes({
                useLatLng: !useLatLng
              });
            }
          }, __('Use Lat/Lng', 'advanced-gutenberg'))],
          value: address,
          placeholder: __('Enter address…', 'advanced-gutenberg'),
          onChange: function onChange(value) {
            return setAttributes({
              address: value
            });
          }
        }), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
          className: "button button-large",
          onClick: this.fetchLocation
        }, __('Fetch Location', 'advanced-gutenberg')), fetching && /*#__PURE__*/React.createElement(Spinner, null), /*#__PURE__*/React.createElement("div", {
          style: {
            margin: '10px auto'
          }
        }, /*#__PURE__*/React.createElement("strong", {
          style: {
            marginRight: '5px'
          }
        }, __('Current', 'advanced-gutenberg'), ":"), /*#__PURE__*/React.createElement("span", null, currentAddress)))), !!useLatLng && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(TextControl, {
          label: [__('Location', 'advanced-gutenberg'), /*#__PURE__*/React.createElement("a", {
            key: "switch-type",
            style: {
              marginLeft: '10px'
            },
            onClick: function onClick() {
              return setAttributes({
                useLatLng: !useLatLng
              });
            }
          }, __('Use Address', 'advanced-gutenberg'))],
          value: lat,
          placeholder: __('Enter latitude…', 'advanced-gutenberg'),
          title: __('Latitude', 'advanced-gutenberg'),
          onChange: function onChange(value) {
            return setAttributes({
              lat: value
            });
          }
        }), /*#__PURE__*/React.createElement(TextControl, {
          value: lng,
          placeholder: __('Enter longitude…', 'advanced-gutenberg'),
          title: __('Longitude', 'advanced-gutenberg'),
          onChange: function onChange(value) {
            return setAttributes({
              lng: value
            });
          }
        })), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Zoom level', 'advanced-gutenberg'),
          value: zoom,
          min: 0,
          max: 25,
          onChange: function onChange(value) {
            return setAttributes({
              zoom: value
            });
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Height', 'advanced-gutenberg'),
          value: height,
          min: 300,
          max: 1000,
          onChange: function onChange(value) {
            return setAttributes({
              height: value
            });
          }
        }), /*#__PURE__*/React.createElement(MediaUpload, {
          allowedTypes: ["image"],
          value: markerIconID,
          onSelect: function onSelect(image) {
            return setAttributes({
              markerIcon: image.sizes.thumbnail ? image.sizes.thumbnail.url : image.sizes.full.url,
              markerIconID: image.id
            });
          },
          render: function render(_ref) {
            var open = _ref.open;
            return /*#__PURE__*/React.createElement(BaseControl, {
              label: [__('Marker Icon (27x43 px)', 'advanced-gutenberg'), markerIcon && /*#__PURE__*/React.createElement("a", {
                key: "marker-icon-remove",
                style: {
                  marginLeft: '10px',
                  cursor: 'pointer'
                },
                onClick: function onClick() {
                  return setAttributes({
                    markerIcon: undefined,
                    markerIconID: undefined
                  });
                }
              }, __('Remove', 'advanced-gutenberg'))]
            }, /*#__PURE__*/React.createElement(Button, {
              className: "button button-large",
              onClick: open
            }, __('Choose icon', 'advanced-gutenberg')), !!markerIcon && /*#__PURE__*/React.createElement("img", {
              style: {
                maxHeight: '30px',
                marginLeft: '10px'
              },
              src: markerIcon,
              alt: __('Marker icon', 'advanced-gutenberg')
            }));
          }
        }), /*#__PURE__*/React.createElement(TextControl, {
          label: __('Marker Title', 'advanced-gutenberg'),
          value: markerTitle,
          placeholder: __('Enter custom title…', 'advanced-gutenberg'),
          onChange: function onChange(value) {
            return setAttributes({
              markerTitle: value
            });
          }
        }), /*#__PURE__*/React.createElement(TextareaControl, {
          label: __('Marker description', 'advanced-gutenberg'),
          value: markerDesc,
          placeholder: __('Enter custom description…', 'advanced-gutenberg'),
          onChange: function onChange(value) {
            return setAttributes({
              markerDesc: value
            });
          }
        }), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Open marker tooltip', 'advanced-gutenberg'),
          checked: infoWindowDefaultShown,
          onChange: function onChange() {
            return setAttributes({
              infoWindowDefaultShown: !infoWindowDefaultShown
            });
          }
        }), /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Map styles', 'advanced-gutenberg'),
          help: __('Custom map style is recommended for experienced users only.', 'advanced-gutenberg'),
          value: mapStyle,
          onChange: function onChange(value) {
            return setAttributes({
              mapStyle: value
            });
          },
          options: [{
            label: __('Standard', 'advanced-gutenberg'),
            value: ''
          }].concat(_toConsumableArray(listStyles), [{
            label: __('Custom', 'advanced-gutenberg'),
            value: 'custom'
          }])
        }), mapStyle === 'custom' && /*#__PURE__*/React.createElement(TextareaControl, {
          label: [__('Custom code', 'advanced-gutenberg'), invalidStyle && /*#__PURE__*/React.createElement("span", {
            key: "invalid-json",
            style: {
              fontWeight: 'bold',
              color: '#ff0000',
              marginLeft: 5
            }
          }, __('Invalid JSON', 'advanced-gutenberg'))],
          help: [__('Paste your custom map styles in json format into the text field. You can create your own map styles by follow one of these links: ', 'advanced-gutenberg'), /*#__PURE__*/React.createElement("a", {
            href: "https://mapstyle.withgoogle.com/",
            target: "_blank",
            key: "gg-map"
          }, "Google Map"), ' - ', /*#__PURE__*/React.createElement("a", {
            href: "https://snazzymaps.com/",
            target: "_blank",
            key: "snazzy-map"
          }, "Snazzy Map")],
          value: mapStyleCustom,
          placeholder: __('Enter your json code here…', 'advanced-gutenberg'),
          onChange: function onChange(value) {
            return setAttributes({
              mapStyleCustom: value
            });
          }
        }))), typeof google !== 'undefined' ? /*#__PURE__*/React.createElement("div", {
          className: "advgb-map-block"
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-map-content",
          id: mapID,
          style: {
            height: height
          }
        })) : /*#__PURE__*/React.createElement(Placeholder, {
          icon: mapBlockIcon,
          label: __('No API Key Provided!', 'advanced-gutenberg'),
          instructions: __('Opps! Look like you have not configured your Google API Key yet. ' + 'Add an API Key and refresh the page to start using Map Block. ' + 'This is a requirement enforced by Google.')
        }, /*#__PURE__*/React.createElement("a", {
          target: "_blank",
          className: "button button-large",
          href: advgbBlocks.config_url + '&tab=maps'
        }, __('Add Google API Key in Settings', 'advanced-gutenberg'))));
      }
    }]);
  }(Component);
  var mapBlockAttrs = {
    mapID: {
      type: 'string'
    },
    useLatLng: {
      type: 'boolean',
      default: false
    },
    address: {
      type: 'string',
      default: ''
    },
    currentAddress: {
      type: 'string'
    },
    lat: {
      type: 'string',
      default: '48.858370'
    },
    lng: {
      type: 'string',
      default: '2.294471'
    },
    zoom: {
      type: 'number',
      default: 14
    },
    height: {
      type: 'number',
      default: 350
    },
    markerIcon: {
      type: 'string'
    },
    markerIconID: {
      type: 'number'
    },
    markerTitle: {
      type: 'string',
      default: 'Eiffel Tower'
    },
    markerDesc: {
      type: 'string',
      default: ''
    },
    changed: {
      type: 'boolean',
      default: false
    },
    isPreview: {
      type: 'boolean',
      default: false
    }
  };
  registerBlockType('advgb/map', {
    apiVersion: 3,
    title: __('Map - PublishPress', 'advanced-gutenberg'),
    description: __('Display a location using Google Maps.', 'advanced-gutenberg'),
    icon: {
      src: mapBlockIcon,
      foreground: typeof advgbBlocks !== 'undefined' ? advgbBlocks.color : undefined
    },
    category: 'advgb-category',
    keywords: [__('google map', 'advanced-gutenberg'), __('location', 'advanced-gutenberg'), __('address', 'advanced-gutenberg')],
    attributes: _objectSpread(_objectSpread({}, mapBlockAttrs), {}, {
      mapStyle: {
        type: 'string'
      },
      mapStyleCustom: {
        type: 'string'
      },
      infoWindowDefaultShown: {
        type: 'boolean',
        default: true
      }
    }),
    example: {
      attributes: {
        isPreview: true
      }
    },
    supports: {
      anchor: true
    },
    edit: AdvMap,
    save: function save(_ref2) {
      var attributes = _ref2.attributes;
      var mapID = attributes.mapID,
        lat = attributes.lat,
        lng = attributes.lng,
        zoom = attributes.zoom,
        height = attributes.height,
        markerIcon = attributes.markerIcon,
        markerTitle = attributes.markerTitle,
        markerDesc = attributes.markerDesc,
        mapStyle = attributes.mapStyle,
        mapStyleCustom = attributes.mapStyleCustom,
        infoWindowDefaultShown = attributes.infoWindowDefaultShown;
      var formattedDesc = markerDesc.replace(/\n/g, '<br/>').replace(/'/, '\\\'');
      var formattedTitle = markerTitle.replace(/'/, '\\\'');
      var DEFAULT_MARKER = 'https://maps.gstatic.com/mapfiles/api-3/images/spotlight-poi2.png';
      var mapStyleApply = MAP_STYLES[mapStyle];
      if (mapStyle === 'custom') {
        try {
          mapStyleApply = JSON.parse(mapStyleCustom);
        } catch (e) {
          mapStyleApply = '';
        }
      }
      if (mapStyleApply) {
        mapStyleApply = JSON.stringify(mapStyleApply);
      } else {
        mapStyleApply = '';
      }
      return /*#__PURE__*/React.createElement("div", {
        className: "advgb-map-block",
        style: {
          margin: '10px auto'
        }
      }, /*#__PURE__*/React.createElement("div", {
        className: "advgb-map-content",
        id: mapID,
        style: {
          height: height
        },
        "data-default": DEFAULT_MARKER,
        "data-lat": lat,
        "data-lng": lng,
        "data-zoom": zoom,
        "data-title": formattedTitle,
        "data-desc": formattedDesc,
        "data-icon": markerIcon,
        "data-shown": infoWindowDefaultShown,
        "data-style": encodeURIComponent(mapStyleApply)
      }));
    },
    deprecated: [{
      attributes: _objectSpread(_objectSpread({}, mapBlockAttrs), {}, {
        mapStyle: {
          type: 'string'
        },
        mapStyleCustom: {
          type: 'string'
        }
      }),
      save: function save(_ref3) {
        var attributes = _ref3.attributes;
        var mapID = attributes.mapID,
          lat = attributes.lat,
          lng = attributes.lng,
          zoom = attributes.zoom,
          height = attributes.height,
          markerIcon = attributes.markerIcon,
          markerTitle = attributes.markerTitle,
          markerDesc = attributes.markerDesc,
          mapStyle = attributes.mapStyle,
          mapStyleCustom = attributes.mapStyleCustom;
        var formattedDesc = markerDesc.replace(/\n/g, '<br/>').replace(/'/, '\\\'');
        var formattedTitle = markerTitle.replace(/'/, '\\\'');
        var DEFAULT_MARKER = 'https://maps.gstatic.com/mapfiles/api-3/images/spotlight-poi2.png';
        var mapStyleApply = MAP_STYLES[mapStyle];
        if (mapStyle === 'custom') {
          try {
            mapStyleApply = JSON.parse(mapStyleCustom);
          } catch (e) {
            mapStyleApply = '';
          }
        }
        if (mapStyleApply) {
          mapStyleApply = JSON.stringify(mapStyleApply);
        } else {
          mapStyleApply = '';
        }
        return /*#__PURE__*/React.createElement("div", {
          className: "advgb-map-block",
          style: {
            margin: '10px auto'
          }
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-map-content",
          id: mapID,
          style: {
            height: height
          },
          "data-default": DEFAULT_MARKER,
          "data-lat": lat,
          "data-lng": lng,
          "data-zoom": zoom,
          "data-title": formattedTitle,
          "data-desc": formattedDesc,
          "data-icon": markerIcon,
          "data-style": encodeURIComponent(mapStyleApply)
        }));
      }
    }]
  });
})(wp.i18n, wp.blocks, wp.element, wp.blockEditor, wp.components);

/***/ },

/***/ "./assets/blocks/newsletter/block.jsx"
/*!********************************************!*\
  !*** ./assets/blocks/newsletter/block.jsx ***!
  \********************************************/
() {

function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
(function (wpI18n, wpBlocks, wpElement, wpBlockEditor, wpComponents) {
  wpBlockEditor = wp.blockEditor || wp.editor;
  var __ = wpI18n.__;
  var Component = wpElement.Component,
    Fragment = wpElement.Fragment;
  var registerBlockType = wpBlocks.registerBlockType;
  var _wpBlockEditor = wpBlockEditor,
    InspectorControls = _wpBlockEditor.InspectorControls,
    PanelColorSettings = _wpBlockEditor.PanelColorSettings;
  var PanelBody = wpComponents.PanelBody,
    RangeControl = wpComponents.RangeControl,
    SelectControl = wpComponents.SelectControl,
    TextControl = wpComponents.TextControl;
  var newsletterBlockIcon = /*#__PURE__*/React.createElement("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    width: "20",
    height: "20",
    viewBox: "0 0 24 24"
  }, /*#__PURE__*/React.createElement("path", {
    fill: "none",
    d: "M0 0h24v24H0V0z"
  }), /*#__PURE__*/React.createElement("path", {
    "fill-opacity": ".9",
    d: "M12 1.95c-5.52 0-10 4.48-10 10s4.48 10 10 10h5v-2h-5c-4.34 0-8-3.66-8-8s3.66-8 8-8 8 3.66 8 8v1.43c0 .79-.71 1.57-1.5 1.57s-1.5-.78-1.5-1.57v-1.43c0-2.76-2.24-5-5-5s-5 2.24-5 5 2.24 5 5 5c1.38 0 2.64-.56 3.54-1.47.65.89 1.77 1.47 2.96 1.47 1.97 0 3.5-1.6 3.5-3.57v-1.43c0-5.52-4.48-10-10-10zm0 13c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3z"
  }));
  var previewImageData = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAAD5CAYAAAAOeCiTAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAACchJREFUeNrs3T2IHOcdwOGZ3T1JPkmWItnEWEFgN6lMQAhcGGyQIagLhqRMo8K4TZHgVC6cwpUa48LYRTAoql0EYkyKpDRu5IBtiB0JEgjIyNinD9/pdncy/82NmJubvduPWWn27nlg2LMk3w4799v3nY+dSxIAAAAAAAAAAAAAAAB4yNJFfNNer7fw54B9Jiu+6Pf77Q29FHf6sN5QYL9FXv2zpqJPGwo8HfN90zHPI3yEvfO/s5q/byT4tOHI00rcdaGLHHbGXBf7tn8zT+xpQ5HXBV5djOyIe/xIPm7Z9u9mjT1tMPLy0pkidjjI0VfDHu4V/Syx9+acCdTFHY+ds2fPdj/88MOfnTlz5oVut3siy7I0X/6/pvnXtjMHVZqmo6C///77z99///2/vfXWW2ulyNNK8MPKm0Oa1B+8a3ZEz0fzcZGPlhdffPHQ1atXf/nEE0+82el0nrJZYZdhPcvub2xs/OXKlSuvv/baa//dCjuWQSn06igfB+emir07x5S9U408vt+1a9fePHny5Ot55KdtRthzdO/mXf30ueeee+H06dMff/TRR/f22LcffT0cDpOFhZ7HWx3NHwQeyzfffPPbxx9//Hf5yh+2CWGKELvdp86fP/+LGzduXP3ss882x8y2s3KL08TemXH/fMeU/b333nvqxIkTv7HJYObYf/LGG2/8amvg7FSWugPbzYdec1nrtth/nstH8mM2F8zu6aef/vWrr74au729muDTXZpsbESvnh7btm+e75dfsJlgPnm8z1y8ePGZ0i5xJ9l5Zmv67zvDtL36OFqB2MewmWA++b730dXV1eNbkWelwXRYaW7HfnvT++h1U3fnxaEh/X6/0f3zWUOvPY/uIhhoxmAwqJ627iRzXl3axIg+87sMsNNwOBx36fhiR/RdPmv+4MmLy1uB+WzNjvfaPU4rbS5sRN/tv4HZQ0+aninPu48ucmheOsHu8sJC3+sWUYKHZmNv7BhYx+sJ+19ToRvN4QCEDggdEDogdEDogNABoYPQAaEDQgeEDggdEDogdEDoIHRA6IDQAaEDQgeEDggdEDoIHRA6IHRA6IDQAaEDQgeEDkL3EoDQAaEDQgeEDggdEDogdEDoIHRA6IDQAaEDQgeEDggdEDoIHRA6IHRA6IDQAaEDQgeEDkIHhA4IHRA6IHTgoegtw0oOh8PRQgt+YHo9L4LQF2NjYyP54YcfbK0WOHXqlBfB1B0QOiB04ADvox8+fDhZWVmxtWA/h97pdEYLYOoOLPOIHqfX7t+/b2vRKqurq0m32xV6U+Jimc3NTT9ZtEqWZabugNABoQMHbh/9scceGy2AER0QOggdsI/+aPX7fefRaZ34DMayXJq9FKFH5G48QdvEB62WJXRTd7CPDggdsI/eFDeeoI2W5ZNrSxO6G0+AqTsgdEDoIHRA6IDQAaEDQgea4pddszTi9srlpQ3SNB0to1GzxRd1CZ2lEL/A486dO+2bEudxx+XZsfR6vW3hC30Kg8Fg9Jta2vji8fBG8rbeeCR+uch3332XHD16dHQD0whe6DNu5EOHDo3eLTnYU/Z402+j27dvj0b2Nv+cOhjHUoTeZjHjjBlHvBG1dV2FDg1M32Np8xuS0GGfzziWYh99WcWda+NIcUzn4uBMHKSJG2iA0GeIqVUv5taBmPX19dG6xVHYuAtJTOviLrbxZ3F0tpjqTSLeJJbpTiYIvXFra2utWp9Tp06NYo7l2LFjo4M09+7dG8Ua0cd54BjhY6Sf9PbVMRM4fvy4n1RM3dskRvOIOkKO0FdXV0eBHzlyZHT6JSKneTHridnSoty9e7e1p/eE/ghEyMVoHpEXN7WMH8Q4BROj+zIcvFk2cR57keew4/svc+iOui9IsQ8eI3z5TSBGdRD6kium5zFVjyl7jN7xdUz9YqR3N1tM3afUxnu9FwfdIuqYuo+bBk667o64TyYOgMalqIv8/kJ/RNp4NDrCjMjjYFzs0xUjePxZ8WGHOJ/unHqz2vzBF6HvU0XsYB8dEDogdEDogNDhgGn9Ufc4JVXcwYODKa4ybPP2b+sNIZcq9DhVNe7CEw5O6HE9QnwSMC5cadMtm+IqyLj4KX5OYx3bGrzz6LRe8Zn8eIwLkYrP9j/q2Iv1ik/NxWXOxe2ehQ5zBBUxhbjMuA33aIv1Ki5njisdhQ5ziqAipoiqTTdiLGIvFqFDA6N68dmBNoVefmwrobN0wS9DWK2bEXkJQOiA0AGhA0IHhA4IHRA6IHQQOiB0QOiA0AGhA0IHhA4IHYQOCB0QOiB0QOiA0AGhA0IHoQNCB4QOCB0QOiB0QOiA0AGhg9ABoQNCB4QOCB0QOiB0QOggdEDogNABoQNCB4QOCB0QOggdEDogdEDogNABoQNCB4QONBx65qWE/RH6XjEPvJww/6A5HA6zrd6yRxH6uPhHK7O+vv5v2wjmMxgM1m7evLlW01g2zwy6M0fc2574yy+//LPNBPO5e/fuP95+++1/jQl65lF+otD7/X6yxxNnly9f/jT/dzdtKpjdJ5988qd80LxfGVCzMe2V29xVd+J3hE4nzR+KpVN6HC35yg0uXLjwz7Nnz15M03TFJoPp3Lp16+OXXnrp3Y2Njag3jnkNtx6Lr4vlQfj5/vxDmbqXl+HLL7/896+//vpy/uR3bDaY3O3btz995ZVXfr+2ttavdlUzqk89fZ91RK+O6g8e33nnnWtPPvnkX5999tkfdbvdlXxZzUf4nk0J2wfMzc3Nb/N98s+/+OKLP547d+4P+SC5XhrF+5URfVAJP5lmRE8nXater5eWZgHF0t1aIuSVrcfRsrKy0rt06dKPn3/++TNHclmWpfmSxKNtDMnw+vXr337wwQf/+eqrr6qBx+Nm6bFfCf/BKD/pPvo0oSeV0bwIvVMKfKUUfrf0953Sc6XTPjfsp5G88jgsjdTl0PuVpXY/fdLQJ55Sxzfcij2p7D+kpZVMa/bly6GLHLbHnpXiHVQiHyQ7D8Bl5SYnHqgbWski4kHN33Ur+/KJ2BH5g6+LiAc1++SDvWJfVOhZKdBiJZMxI3kxmg+N6LBn6MOa0HcLPFtk6ONWdrBL6KnQYc9ZcVaJu3qUfVvs00zbZwqudFAuScZfQJPW7JsLHepDr47s2S6hj/6/hYe+FXvdEfTqyF0XudChPvRxwc8d+VzBjRnZd1vqnk/wHNT98yTZebXbbsvMkc8dWmlkHxd9Uvla3LAz+nHBJ01E3kh0lZE9GTN6G8lh95G9blqfNBF5o8HVBC9wmD34RgJfaHhjok9ED3ue/24s7kcWW+kSWjjwFhE0AAAAAAAAAAAAAOwT/xNgAPfkiOqfebQ/AAAAAElFTkSuQmCC';
  var AdvNewsletter = /*#__PURE__*/function (_Component) {
    function AdvNewsletter() {
      _classCallCheck(this, AdvNewsletter);
      return _callSuper(this, AdvNewsletter, arguments);
    }
    _inherits(AdvNewsletter, _Component);
    return _createClass(AdvNewsletter, [{
      key: "componentWillMount",
      value: function componentWillMount() {
        var _this$props = this.props,
          attributes = _this$props.attributes,
          setAttributes = _this$props.setAttributes;
        var currentBlockConfig = advgbDefaultConfig['advgb-newsletter'];

        // No override attributes of blocks inserted before
        if (attributes.changed !== true) {
          if (_typeof(currentBlockConfig) === 'object' && currentBlockConfig !== null) {
            Object.keys(currentBlockConfig).map(function (attribute) {
              if (typeof attributes[attribute] === 'boolean') {
                attributes[attribute] = !!currentBlockConfig[attribute];
              } else {
                attributes[attribute] = currentBlockConfig[attribute];
              }
            });
          }

          // Finally set changed attribute to true, so we don't modify anything again
          setAttributes({
            changed: true
          });
        }
      }
    }, {
      key: "render",
      value: function render() {
        var _this$props2 = this.props,
          attributes = _this$props2.attributes,
          setAttributes = _this$props2.setAttributes;
        var formStyle = attributes.formStyle,
          formWidth = attributes.formWidth,
          fnameLabel = attributes.fnameLabel,
          lnameLabel = attributes.lnameLabel,
          emailLabel = attributes.emailLabel,
          submitLabel = attributes.submitLabel,
          successLabel = attributes.successLabel,
          alertLabel = attributes.alertLabel,
          bgColor = attributes.bgColor,
          textColor = attributes.textColor,
          borderColor = attributes.borderColor,
          borderStyle = attributes.borderStyle,
          borderRadius = attributes.borderRadius,
          submitColor = attributes.submitColor,
          submitBgColor = attributes.submitBgColor,
          submitRadius = attributes.submitRadius,
          isPreview = attributes.isPreview;
        return isPreview ? /*#__PURE__*/React.createElement("img", {
          alt: __('Newsletter', 'advanced-gutenberg'),
          width: "100%",
          src: previewImageData
        }) : /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(InspectorControls, null, /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Newsletter Settings', 'advanced-gutenberg')
        }, typeof advgbBlocks !== 'undefined' && !parseInt(advgbBlocks.captchaEnabled) && /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Notice', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement("p", {
          style: {
            fontStyle: 'italic'
          }
        }, __('We strongly recommend to enable Google reCAPTCHA to avoid spam.', 'advanced-gutenberg'), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("a", {
          href: advgbBlocks.config_url + '&tab=recaptcha',
          target: "_blank"
        }, __('You can enable it in Settings', 'advanced-gutenberg')))), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Form Settings', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Form style', 'advanced-gutenberg'),
          value: formStyle,
          options: [{
            label: __('Default', 'advanced-gutenberg'),
            value: 'default'
          }, {
            label: __('Alternative', 'advanced-gutenberg'),
            value: 'alt'
          }],
          onChange: function onChange(value) {
            return setAttributes({
              formStyle: value
            });
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Form width (px)', 'advanced-gutenberg'),
          value: formWidth,
          onChange: function onChange(value) {
            return setAttributes({
              formWidth: value
            });
          },
          min: 200,
          max: 1000
        })), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Text Label', 'advanced-gutenberg')
        }, formStyle === 'alt' && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(TextControl, {
          label: __('First Name input placeholder', 'advanced-gutenberg'),
          value: fnameLabel,
          onChange: function onChange(value) {
            return setAttributes({
              fnameLabel: value
            });
          }
        }), /*#__PURE__*/React.createElement(TextControl, {
          label: __('Last Name input placeholder', 'advanced-gutenberg'),
          value: lnameLabel,
          onChange: function onChange(value) {
            return setAttributes({
              lnameLabel: value
            });
          }
        })), /*#__PURE__*/React.createElement(TextControl, {
          label: __('Email input placeholder', 'advanced-gutenberg'),
          value: emailLabel,
          onChange: function onChange(value) {
            return setAttributes({
              emailLabel: value
            });
          }
        }), /*#__PURE__*/React.createElement(TextControl, {
          label: __('Submit text', 'advanced-gutenberg'),
          value: submitLabel,
          onChange: function onChange(value) {
            return setAttributes({
              submitLabel: value
            });
          }
        }), /*#__PURE__*/React.createElement(TextControl, {
          label: __('Empty field warning text', 'advanced-gutenberg'),
          value: alertLabel,
          onChange: function onChange(value) {
            return setAttributes({
              alertLabel: value
            });
          }
        }), /*#__PURE__*/React.createElement(TextControl, {
          label: __('Submit success text', 'advanced-gutenberg'),
          value: successLabel,
          onChange: function onChange(value) {
            return setAttributes({
              successLabel: value
            });
          }
        })), /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Input Color', 'advanced-gutenberg'),
          colorSettings: [{
            label: __('Background color', 'advanced-gutenberg'),
            value: bgColor,
            onChange: function onChange(value) {
              return setAttributes({
                bgColor: value
              });
            }
          }, {
            label: __('Text color', 'advanced-gutenberg'),
            value: textColor,
            onChange: function onChange(value) {
              return setAttributes({
                textColor: value
              });
            }
          }]
        }), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Border Settings', 'advanced-gutenberg'),
          initialOpen: false
        }, /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Border Color', 'advanced-gutenberg'),
          initialOpen: false,
          colorSettings: [{
            label: __('Border color', 'advanced-gutenberg'),
            value: borderColor,
            onChange: function onChange(value) {
              return setAttributes({
                borderColor: value
              });
            }
          }]
        }), /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Border Style', 'advanced-gutenberg'),
          value: borderStyle,
          options: [{
            label: __('Solid', 'advanced-gutenberg'),
            value: 'solid'
          }, {
            label: __('Dashed', 'advanced-gutenberg'),
            value: 'dashed'
          }, {
            label: __('Dotted', 'advanced-gutenberg'),
            value: 'dotted'
          }],
          onChange: function onChange(value) {
            return setAttributes({
              borderStyle: value
            });
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Border radius (px)', 'advanced-gutenberg'),
          value: borderRadius,
          onChange: function onChange(value) {
            return setAttributes({
              borderRadius: value
            });
          },
          min: 0,
          max: 50
        })), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Submit Button Settings', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Color Settings', 'advanced-gutenberg'),
          initialOpen: false,
          colorSettings: [{
            label: __('Border and Text', 'advanced-gutenberg'),
            value: submitColor,
            onChange: function onChange(value) {
              return setAttributes({
                submitColor: value
              });
            }
          }, {
            label: __('Background', 'advanced-gutenberg'),
            value: submitBgColor,
            onChange: function onChange(value) {
              return setAttributes({
                submitBgColor: value
              });
            }
          }]
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Button border radius', 'advanced-gutenberg'),
          value: submitRadius,
          onChange: function onChange(value) {
            return setAttributes({
              submitRadius: value
            });
          },
          min: 0,
          max: 50
        })))), /*#__PURE__*/React.createElement("div", {
          className: "advgb-newsletter-wrapper"
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-newsletter clearfix style-".concat(formStyle),
          style: {
            maxWidth: formWidth
          }
        }, formStyle === 'default' && /*#__PURE__*/React.createElement("div", {
          className: "advgb-form-field"
        }, /*#__PURE__*/React.createElement("input", {
          type: "text",
          disabled: true,
          className: "advgb-form-input",
          value: emailLabel ? emailLabel : 'Email address',
          style: {
            backgroundColor: bgColor,
            color: textColor,
            borderColor: borderColor,
            borderStyle: borderStyle,
            borderRadius: borderRadius
          }
        }), /*#__PURE__*/React.createElement("div", {
          className: "advgb-form-submit-wrapper"
        }, /*#__PURE__*/React.createElement("button", {
          className: "advgb-form-submit",
          type: "button",
          style: {
            borderColor: submitColor,
            color: submitColor,
            backgroundColor: submitBgColor,
            borderRadius: submitRadius
          }
        }, submitLabel ? submitLabel : 'Submit'))), formStyle === 'alt' && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
          className: "advgb-form-field advgb-form-field-full"
        }, /*#__PURE__*/React.createElement("input", {
          type: "text",
          disabled: true,
          className: "advgb-form-input",
          value: fnameLabel ? fnameLabel : __('First Name', 'advanced-gutenberg'),
          style: {
            backgroundColor: bgColor,
            color: textColor,
            borderColor: borderColor,
            borderStyle: borderStyle,
            borderRadius: borderRadius
          }
        })), /*#__PURE__*/React.createElement("div", {
          className: "advgb-form-field advgb-form-field-full"
        }, /*#__PURE__*/React.createElement("input", {
          type: "text",
          disabled: true,
          className: "advgb-form-input",
          value: lnameLabel ? lnameLabel : __('Last Name', 'advanced-gutenberg'),
          style: {
            backgroundColor: bgColor,
            color: textColor,
            borderColor: borderColor,
            borderStyle: borderStyle,
            borderRadius: borderRadius
          }
        })), /*#__PURE__*/React.createElement("div", {
          className: "advgb-form-field advgb-form-field-full"
        }, /*#__PURE__*/React.createElement("input", {
          type: "text",
          disabled: true,
          className: "advgb-form-input",
          value: emailLabel ? emailLabel : 'Email address',
          style: {
            backgroundColor: bgColor,
            color: textColor,
            borderColor: borderColor,
            borderStyle: borderStyle,
            borderRadius: borderRadius
          }
        })), /*#__PURE__*/React.createElement("div", {
          className: "advgb-form-submit-wrapper"
        }, /*#__PURE__*/React.createElement("button", {
          className: "advgb-form-submit",
          type: "button",
          style: {
            borderColor: submitColor,
            color: submitColor,
            backgroundColor: submitBgColor,
            borderRadius: submitRadius
          }
        }, submitLabel ? submitLabel : 'Submit'))))));
      }
    }]);
  }(Component);
  registerBlockType('advgb/newsletter', {
    apiVersion: 3,
    title: __('Newsletter - PublishPress', 'advanced-gutenberg'),
    description: __('Fastest way to create a newsletter form for your page.', 'advanced-gutenberg'),
    icon: {
      src: newsletterBlockIcon,
      foreground: typeof advgbBlocks !== 'undefined' ? advgbBlocks.color : undefined
    },
    category: 'advgb-category',
    keywords: [__('newsletter', 'advanced-gutenberg'), __('form', 'advanced-gutenberg'), __('email', 'advanced-gutenberg')],
    attributes: {
      formStyle: {
        type: 'string',
        default: 'default'
      },
      formWidth: {
        type: 'number',
        default: 400
      },
      fnameLabel: {
        type: 'string'
      },
      lnameLabel: {
        type: 'string'
      },
      emailLabel: {
        type: 'string'
      },
      submitLabel: {
        type: 'string'
      },
      successLabel: {
        type: 'string'
      },
      alertLabel: {
        type: 'string'
      },
      bgColor: {
        type: 'string'
      },
      textColor: {
        type: 'string'
      },
      borderStyle: {
        type: 'string'
      },
      borderColor: {
        type: 'string'
      },
      borderRadius: {
        type: 'number'
      },
      submitColor: {
        type: 'string'
      },
      submitBgColor: {
        type: 'string'
      },
      submitRadius: {
        type: 'number'
      },
      changed: {
        type: 'boolean',
        default: false
      },
      isPreview: {
        type: 'boolean',
        default: false
      }
    },
    example: {
      attributes: {
        isPreview: true
      }
    },
    supports: {
      anchor: true
    },
    edit: AdvNewsletter,
    save: function save(_ref) {
      var attributes = _ref.attributes;
      var formStyle = attributes.formStyle,
        formWidth = attributes.formWidth,
        fnameLabel = attributes.fnameLabel,
        lnameLabel = attributes.lnameLabel,
        emailLabel = attributes.emailLabel,
        submitLabel = attributes.submitLabel,
        successLabel = attributes.successLabel,
        alertLabel = attributes.alertLabel,
        bgColor = attributes.bgColor,
        textColor = attributes.textColor,
        borderColor = attributes.borderColor,
        borderStyle = attributes.borderStyle,
        borderRadius = attributes.borderRadius,
        submitColor = attributes.submitColor,
        submitBgColor = attributes.submitBgColor,
        submitRadius = attributes.submitRadius;
      return /*#__PURE__*/React.createElement("div", {
        className: "advgb-newsletter clearfix style-".concat(formStyle),
        style: {
          maxWidth: formWidth
        }
      }, /*#__PURE__*/React.createElement("form", {
        method: "POST",
        className: "clearfix"
      }, formStyle === 'default' && /*#__PURE__*/React.createElement("div", {
        className: "advgb-form-field"
      }, /*#__PURE__*/React.createElement("input", {
        type: "email",
        className: "advgb-form-input advgb-form-input-email",
        placeholder: emailLabel ? emailLabel : 'Email address',
        style: {
          backgroundColor: bgColor,
          color: textColor,
          borderColor: borderColor,
          borderStyle: borderStyle,
          borderRadius: borderRadius
        }
      }), /*#__PURE__*/React.createElement("div", {
        className: "advgb-form-submit-wrapper"
      }, /*#__PURE__*/React.createElement("button", {
        className: "advgb-form-submit",
        type: "submit",
        "data-success": successLabel ? successLabel : undefined,
        "data-alert": alertLabel ? alertLabel : undefined,
        style: {
          borderColor: submitColor,
          color: submitColor,
          backgroundColor: submitBgColor,
          borderRadius: submitRadius
        }
      }, submitLabel ? submitLabel : 'Submit'))), formStyle === 'alt' && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
        className: "advgb-form-field advgb-form-field-full"
      }, /*#__PURE__*/React.createElement("input", {
        type: "text",
        className: "advgb-form-input advgb-form-input-fname",
        placeholder: fnameLabel ? fnameLabel : __('First Name', 'advanced-gutenberg'),
        style: {
          backgroundColor: bgColor,
          color: textColor,
          borderColor: borderColor,
          borderStyle: borderStyle,
          borderRadius: borderRadius
        }
      })), /*#__PURE__*/React.createElement("div", {
        className: "advgb-form-field advgb-form-field-full"
      }, /*#__PURE__*/React.createElement("input", {
        type: "text",
        className: "advgb-form-input advgb-form-input-lname",
        placeholder: lnameLabel ? lnameLabel : __('Last Name', 'advanced-gutenberg'),
        style: {
          backgroundColor: bgColor,
          color: textColor,
          borderColor: borderColor,
          borderStyle: borderStyle,
          borderRadius: borderRadius
        }
      })), /*#__PURE__*/React.createElement("div", {
        className: "advgb-form-field advgb-form-field-full"
      }, /*#__PURE__*/React.createElement("input", {
        type: "email",
        className: "advgb-form-input advgb-form-input-email",
        placeholder: emailLabel ? emailLabel : 'Email address',
        style: {
          backgroundColor: bgColor,
          color: textColor,
          borderColor: borderColor,
          borderStyle: borderStyle,
          borderRadius: borderRadius
        }
      })), /*#__PURE__*/React.createElement("div", {
        className: "advgb-form-submit-wrapper"
      }, /*#__PURE__*/React.createElement("button", {
        className: "advgb-form-submit",
        type: "submit",
        "data-success": successLabel ? successLabel : undefined,
        "data-alert": alertLabel ? alertLabel : undefined,
        style: {
          borderColor: submitColor,
          color: submitColor,
          backgroundColor: submitBgColor,
          borderRadius: submitRadius
        }
      }, submitLabel ? submitLabel : 'Submit'))), /*#__PURE__*/React.createElement("div", {
        className: "advgb-grecaptcha clearfix"
      })));
    }
  });
})(wp.i18n, wp.blocks, wp.element, wp.blockEditor, wp.components);

/***/ },

/***/ "./assets/blocks/pro-ad/shared/index.jsx"
/*!***********************************************!*\
  !*** ./assets/blocks/pro-ad/shared/index.jsx ***!
  \***********************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   AdvColorControl: () => (/* binding */ AdvColorControl),
/* harmony export */   AdvFontControl: () => (/* binding */ AdvFontControl),
/* harmony export */   AlignmentToolbar: () => (/* binding */ AlignmentToolbar),
/* harmony export */   BaseControl: () => (/* binding */ BaseControl),
/* harmony export */   BaseLabel: () => (/* binding */ BaseLabel),
/* harmony export */   BlockControls: () => (/* binding */ BlockControls),
/* harmony export */   Button: () => (/* binding */ Button),
/* harmony export */   CORE_SUPPORTED_BLOCKS: () => (/* binding */ CORE_SUPPORTED_BLOCKS),
/* harmony export */   CheckboxControl: () => (/* binding */ CheckboxControl),
/* harmony export */   ColorIndicator: () => (/* binding */ ColorIndicator),
/* harmony export */   ColorPalette: () => (/* binding */ ColorPalette),
/* harmony export */   Fragment: () => (/* binding */ Fragment),
/* harmony export */   InspectorControls: () => (/* binding */ InspectorControls),
/* harmony export */   Notice: () => (/* binding */ Notice),
/* harmony export */   PROMO_LINK: () => (/* binding */ PROMO_LINK),
/* harmony export */   PanelBody: () => (/* binding */ PanelBody),
/* harmony export */   RangeControl: () => (/* binding */ RangeControl),
/* harmony export */   RecentPostsEditTitle: () => (/* binding */ RecentPostsEditTitle),
/* harmony export */   SUPPORTED_BLOCKS: () => (/* binding */ SUPPORTED_BLOCKS),
/* harmony export */   SelectControl: () => (/* binding */ SelectControl),
/* harmony export */   ToggleControl: () => (/* binding */ ToggleControl),
/* harmony export */   __: () => (/* binding */ __),
/* harmony export */   addFilter: () => (/* binding */ addFilter),
/* harmony export */   advgbGetBlockTitle: () => (/* binding */ advgbGetBlockTitle),
/* harmony export */   createHigherOrderComponent: () => (/* binding */ createHigherOrderComponent),
/* harmony export */   sprintf: () => (/* binding */ sprintf)
/* harmony export */ });
// assets/blocks/pro-ad/shared/index.jsx

// WordPress dependencies
var __ = wp.i18n.__;

var addFilter = wp.hooks.addFilter;

var Fragment = wp.element.Fragment;

var createHigherOrderComponent = wp.compose.createHigherOrderComponent;

var sprintf = wp.i18n.sprintf;

// Block Editor components

var wpBlockEditor = wp.blockEditor || wp.editor;
var InspectorControls = wpBlockEditor.InspectorControls,
  ColorPalette = wpBlockEditor.ColorPalette,
  BlockControls = wpBlockEditor.BlockControls,
  AlignmentToolbar = wpBlockEditor.AlignmentToolbar;

// WordPress components

var _wp$components = wp.components,
  PanelBody = _wp$components.PanelBody,
  SelectControl = _wp$components.SelectControl,
  ToggleControl = _wp$components.ToggleControl,
  RangeControl = _wp$components.RangeControl,
  Notice = _wp$components.Notice,
  Button = _wp$components.Button,
  CheckboxControl = _wp$components.CheckboxControl,
  ColorIndicator = _wp$components.ColorIndicator,
  BaseControl = _wp$components.BaseControl;

// Base label helper

var BaseLabel = BaseControl.VisualLabel ? BaseControl.VisualLabel : "span";

// Shared constants
var PROMO_LINK = "https://publishpress.com/links/blocks-menu";
var SUPPORTED_BLOCKS = ['advgb/accordion-item', 'advgb/accordions', 'advgb/adv-tabs', 'advgb/adv-tab', 'advgb/recent-posts', 'advgb/images-slider', 'advgb/button', 'advgb/list', 'advgb/count-up', 'advgb/testimonial', 'advgb/image'];
var CORE_SUPPORTED_BLOCKS = ['core/paragraph', 'core/heading'];

// Shared components
function AdvFontControl(props) {
  return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(SelectControl, {
    label: __('Font Family', 'advanced-gutenberg'),
    value: "",
    options: [{
      label: 'Default',
      value: ''
    }]
  }), /*#__PURE__*/React.createElement(SelectControl, {
    label: __('Font Weight + Style', 'advanced-gutenberg'),
    value: "",
    options: [{
      label: 'Default',
      value: ''
    }]
  }), /*#__PURE__*/React.createElement(SelectControl, {
    label: __('Text Transform', 'advanced-gutenberg'),
    value: "",
    options: [{
      label: 'Default',
      value: ''
    }]
  }));
}
function AdvColorControl(props) {
  var label = props.label,
    value = props.value,
    onChange = props.onChange;
  return /*#__PURE__*/React.createElement(BaseControl, {
    className: "editor-color-palette-control block-editor-color-palette-control"
  }, /*#__PURE__*/React.createElement(BaseLabel, {
    className: "components-base-control__label"
  }, label, value && /*#__PURE__*/React.createElement(ColorIndicator, {
    colorValue: value
  })), /*#__PURE__*/React.createElement(ColorPalette, {
    className: "editor-color-palette-control__color-palette block-editor-color-palette-control__color-palette",
    value: value
  }));
}

// Shared utility functions
function advgbGetBlockTitle(name) {
  switch (name) {
    case 'advgb/accordion-item':
    case 'advgb/accordions':
      return __('Accordion', 'advanced-gutenberg');
      // removed by dead control flow

    case 'advgb/adv-tabs':
    case 'advgb/tab':
      return __('Tabs', 'advanced-gutenberg');
      // removed by dead control flow

    case 'advgb/recent-posts':
      return __('Content Display', 'advanced-gutenberg');
      // removed by dead control flow

    case 'advgb/images-slider':
      return __('Images Slider', 'advanced-gutenberg');
      // removed by dead control flow

    case 'advgb/button':
      return __('Button', 'advanced-gutenberg');
      // removed by dead control flow

    case 'advgb/list':
      return __('List', 'advanced-gutenberg');
      // removed by dead control flow

    case 'advgb/count-up':
      return __('Count Up', 'advanced-gutenberg');
      // removed by dead control flow

    case 'advgb/testimonial':
      return __('Testimonial', 'advanced-gutenberg');
      // removed by dead control flow

    case 'advgb/image':
      return __('Image', 'advanced-gutenberg');
      // removed by dead control flow

    default:
      return __('PublishPress', 'advanced-gutenberg');
      // removed by dead control flow

  }
}
function RecentPostsEditTitle(props) {
  var tabSelected = 'desktop';
  return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
    className: "advgb-recent-posts-responsive-items"
  }, ['desktop', 'tablet', 'mobile'].map(function (device, index) {
    var itemClasses = ["advgb-recent-posts-responsive-item", tabSelected === device && 'is-selected'].filter(Boolean).join(' ');
    return /*#__PURE__*/React.createElement("div", {
      className: itemClasses,
      key: index
    }, device);
  })), /*#__PURE__*/React.createElement("div", {
    className: "advgb-recent-posts-select-layout on-inspector"
  }, tabSelected === 'desktop' && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(RangeControl, {
    label: __('Font Size', 'advanced-gutenberg'),
    value: "",
    min: 10,
    max: 100,
    beforeIcon: "editor-textcolor",
    allowReset: true
  }), /*#__PURE__*/React.createElement(ToggleControl, {
    label: __('Hide', 'advanced-gutenberg'),
    checked: false
  })), tabSelected === 'tablet' && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(RangeControl, {
    label: __('Font Size', 'advanced-gutenberg'),
    value: "",
    min: 10,
    max: 100,
    beforeIcon: "editor-textcolor",
    allowReset: true
  }), /*#__PURE__*/React.createElement(ToggleControl, {
    label: __('Hide', 'advanced-gutenberg'),
    checked: false
  })), tabSelected === 'mobile' && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(RangeControl, {
    label: __('Font Size', 'advanced-gutenberg'),
    value: "",
    min: 10,
    max: 100,
    beforeIcon: "editor-textcolor",
    allowReset: true
  }), /*#__PURE__*/React.createElement(ToggleControl, {
    label: __('Hide', 'advanced-gutenberg'),
    checked: false
  }))));
}

/***/ },

/***/ "./assets/blocks/recent-posts/block.jsx"
/*!**********************************************!*\
  !*** ./assets/blocks/recent-posts/block.jsx ***!
  \**********************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _query_controls_jsx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query-controls.jsx */ "./assets/blocks/recent-posts/query-controls.jsx");
/* harmony import */ var _0_adv_components_components_jsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../0-adv-components/components.jsx */ "./assets/blocks/0-adv-components/components.jsx");
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }



(function (wpI18n, wpBlocks, wpElement, wpBlockEditor, wpComponents, wpData, lodash, wpHtmlEntities, wpDate) {
  wpBlockEditor = wp.blockEditor || wp.editor;
  var __ = wpI18n.__;
  var Component = wpElement.Component,
    Fragment = wpElement.Fragment,
    RawHTML = wpElement.RawHTML;
  var registerBlockType = wpBlocks.registerBlockType;
  var _wpBlockEditor = wpBlockEditor,
    InspectorControls = _wpBlockEditor.InspectorControls,
    BlockControls = _wpBlockEditor.BlockControls;
  var PanelBody = wpComponents.PanelBody,
    RangeControl = wpComponents.RangeControl,
    ToggleControl = wpComponents.ToggleControl,
    TextControl = wpComponents.TextControl,
    TextareaControl = wpComponents.TextareaControl,
    FormTokenField = wpComponents.FormTokenField,
    Spinner = wpComponents.Spinner,
    ToolbarGroup = wpComponents.ToolbarGroup,
    ToolbarButton = wpComponents.ToolbarButton,
    Placeholder = wpComponents.Placeholder,
    Tooltip = wpComponents.Tooltip,
    SelectControl = wpComponents.SelectControl;
  var withSelect = wpData.withSelect;
  var pickBy = lodash.pickBy,
    isUndefined = lodash.isUndefined,
    isArray = lodash.isArray,
    isNull = lodash.isNull,
    uniqWith = lodash.uniqWith,
    isEqual = lodash.isEqual,
    omit = lodash.omit,
    union = lodash.union,
    sortBy = lodash.sortBy,
    unset = lodash.unset,
    set = lodash.set,
    find = lodash.find;
  var decodeEntities = wpHtmlEntities.decodeEntities;
  var dateI18n = wpDate.dateI18n;
  var advRecentPostsBlockIcon = /*#__PURE__*/React.createElement("svg", {
    width: "20",
    height: "20",
    viewBox: "2 2 22 22"
  }, /*#__PURE__*/React.createElement("path", {
    fill: "none",
    d: "M0,0h24v24H0V0z"
  }), /*#__PURE__*/React.createElement("rect", {
    x: "13",
    y: "7.5",
    width: "5",
    height: "2"
  }), /*#__PURE__*/React.createElement("rect", {
    x: "13",
    y: "14.5",
    width: "5",
    height: "2"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M19,19H5V5h14V19z"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M11,6H6v5h5V6z M10,10H7V7h3V10z"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M11,13H6v5h5V13z M10,17H7v-3h3V17z"
  }));
  var INBUILT_POST_TYPES = ['page', 'post'];
  var PP_SERIES_POST_TYPES = typeof advgbBlocks.pp_series_post_types !== 'undefined' ? advgbBlocks.pp_series_post_types : ['post'];
  var MAX_CATEGORIES_SUGGESTIONS = 20;
  var previewImageData = 'data:image/png;base64, ';
  var FRONTPAGE_LAYOUTS = [{
    layout: '1-2',
    icon: '1-2',
    title: __('The leading post on top, the rest in 2 columns below', 'advanced-gutenberg')
  }, {
    layout: '1-3',
    icon: '1-3',
    title: __('The leading post on top, the rest in 3 columns below', 'advanced-gutenberg')
  }, {
    layout: '1-4',
    icon: '1-4',
    title: __('The leading post on top, the rest in 4 columns below', 'advanced-gutenberg')
  }, {
    layout: '1-5',
    icon: '1-5',
    title: __('The leading post on top, the rest in 5 columns below', 'advanced-gutenberg')
  }, {
    layout: 'stacked',
    icon: 'stacked',
    title: __('Stacked', 'advanced-gutenberg')
  }, {
    layout: '2-2',
    icon: '2-2',
    title: __('All posts in 2 columns grid', 'advanced-gutenberg')
  }, {
    layout: '3-3',
    icon: '3-3',
    title: __('All posts in 3 columns grid', 'advanced-gutenberg')
  }, {
    layout: '4-4',
    icon: '4-4',
    title: __('All posts in 4 columns grid', 'advanced-gutenberg')
  }, {
    layout: '5-5',
    icon: '5-5',
    title: __('All posts in 5 columns grid', 'advanced-gutenberg')
  }];

  // @TODO fix duplicated code from FRONTPAGE_LAYOUTS
  var FRONTPAGE_LAYOUTS_TABLET = [{
    layout: '1-2',
    icon: '1-2',
    title: __('The leading post on top, the rest in 2 columns below', 'advanced-gutenberg')
  }, {
    layout: '1-3',
    icon: '1-3',
    title: __('The leading post on top, the rest in 3 columns below', 'advanced-gutenberg')
  }, {
    layout: '1-4',
    icon: '1-4',
    title: __('The leading post on top, the rest in 4 columns below', 'advanced-gutenberg')
  }, {
    layout: '1-5',
    icon: '1-5',
    title: __('The leading post on top, the rest in 5 columns below', 'advanced-gutenberg')
  }, {
    layout: 'stacked',
    icon: 'stacked',
    title: __('Stacked', 'advanced-gutenberg')
  }, {
    layout: '2-2',
    icon: '2-2',
    title: __('All posts in 2 columns grid', 'advanced-gutenberg')
  }, {
    layout: '3-3',
    icon: '3-3',
    title: __('All posts in 3 columns grid', 'advanced-gutenberg')
  }, {
    layout: '4-4',
    icon: '4-4',
    title: __('All posts in 4 columns grid', 'advanced-gutenberg')
  }, {
    layout: '5-5',
    icon: '5-5',
    title: __('All posts in 5 columns grid', 'advanced-gutenberg')
  }];
  var FRONTPAGE_LAYOUTS_MOBILE = [{
    layout: '1-2',
    icon: '1-2',
    title: __('The leading post on top, the rest in 2 columns below', 'advanced-gutenberg')
  }, {
    layout: 'stacked',
    icon: 'stacked',
    title: __('Stacked', 'advanced-gutenberg')
  }, {
    layout: '2-2',
    icon: '2-2',
    title: __('All posts in 2 columns grid', 'advanced-gutenberg')
  }];
  var GAP_OPTIONS = [{
    label: __('None', 'advanced-gutenberg'),
    value: 0
  }, {
    label: '5px',
    value: 5
  }, {
    label: '10px',
    value: 10
  }, {
    label: '20px',
    value: 20
  }, {
    label: '30px',
    value: 30
  }, {
    label: '40px',
    value: 40
  }, {
    label: '50px',
    value: 50
  }];
  var NEWSPAPER_LAYOUTS = [{
    layout: 'np-1-1',
    icon: 'np-1-1',
    items: 2,
    title: __('The leading post in the left, 1 post in the right', 'advanced-gutenberg')
  }, {
    layout: 'np-1-2',
    icon: 'np-1-2',
    items: 3,
    title: __('The leading post in the left, 2 posts in the right', 'advanced-gutenberg')
  }, {
    layout: 'np-1-3',
    icon: 'np-1-3',
    items: 4,
    title: __('The leading post in the left, 3 posts in the right', 'advanced-gutenberg')
  }, {
    layout: 'np-1-4',
    icon: 'np-1-4',
    items: 5,
    title: __('The leading post in the left, 4 posts in the right', 'advanced-gutenberg')
  }, {
    layout: 'np-1-5',
    icon: 'np-1-5',
    items: 6,
    title: __('The leading post in the left, 5 posts in the right', 'advanced-gutenberg')
  }, {
    layout: 'np-1-1-r',
    icon: 'np-1-1-r',
    items: 2,
    title: __('The leading post in the right, 1 post in the left', 'advanced-gutenberg')
  }, {
    layout: 'np-1-2-r',
    icon: 'np-1-2-r',
    items: 3,
    title: __('The leading post in the right, 2 posts in the left', 'advanced-gutenberg')
  }, {
    layout: 'np-1-3-r',
    icon: 'np-1-3-r',
    items: 4,
    title: __('The leading post in the right, 3 posts in the left', 'advanced-gutenberg')
  }, {
    layout: 'np-1-4-r',
    icon: 'np-1-4-r',
    items: 5,
    title: __('The leading post in the right, 4 posts in the left', 'advanced-gutenberg')
  }, {
    layout: 'np-1-5-r',
    icon: 'np-1-5-r',
    items: 6,
    title: __('The leading post in the right, 5 posts in the left', 'advanced-gutenberg')
  }, {
    layout: 'np-2',
    icon: 'np-2',
    items: 3,
    title: __('The leading post on top, the rest of posts below', 'advanced-gutenberg')
  }, {
    layout: 'np-3-1',
    icon: 'np-3-1',
    items: 3,
    title: __('The leading post on top, below 2 columns with 1 post in the left and 1 post in the right', 'advanced-gutenberg')
  }, {
    layout: 'np-3-2',
    icon: 'np-3-2',
    items: 4,
    title: __('The leading post on top, below 2 columns with 1 post in the left and 2 posts in the right', 'advanced-gutenberg')
  }, {
    layout: 'np-3-3',
    icon: 'np-3-3',
    items: 5,
    title: __('The leading post on top, below 2 columns with 1 post in the left and 3 posts in the right', 'advanced-gutenberg')
  }];
  var ORDER_SECTIONS = [{
    label: 'Default',
    value: 'default'
  }, {
    label: 'Title, Image, Info, Text',
    value: 'title-image-info-text'
  }, {
    label: 'Image, Title, Text, Info',
    value: 'image-title-text-info'
  }, {
    label: 'Title, Image, Text, Info',
    value: 'title-image-text-info'
  }, {
    label: 'Title, Info, Text, Image',
    value: 'title-info-text-image'
  }, {
    label: 'Title, Text, Info, Image',
    value: 'title-text-info-image'
  }, {
    label: 'Title, Text, Image, Info',
    value: 'title-text-image-info'
  }];
  var DISPLAY_FOR = [{
    label: __('For all posts', 'advanced-gutenberg'),
    value: 'all'
  }, {
    label: __('For the first post', 'advanced-gutenberg'),
    value: 1
  }, {
    label: __('For the first 2 posts', 'advanced-gutenberg'),
    value: 2
  }, {
    label: __('For the first 3 posts', 'advanced-gutenberg'),
    value: 3
  }, {
    label: __('For the first 4 posts', 'advanced-gutenberg'),
    value: 4
  }, {
    label: __('For the first 5 posts', 'advanced-gutenberg'),
    value: 5
  }];
  var CUSTOM_TAX_PREFIX = 'custom-tax-';
  var initSlider = null;
  var initMasonry = null;
  var RecentPostsEdit = /*#__PURE__*/function (_Component) {
    function RecentPostsEdit() {
      var _this;
      _classCallCheck(this, RecentPostsEdit);
      _this = _callSuper(this, RecentPostsEdit, arguments);
      _this.state = {
        categoriesList: [],
        tagsList: [],
        catIdVsName: [],
        tagNameVsId: [],
        postTypeList: [],
        updating: false,
        tabSelected: 'desktop',
        updatePostSuggestions: true,
        // Backward compatibility 2.13.2 and lower
        authorList: [],
        isBlockIdSet: false,
        // @since 3.2.3
        //@since 3.3.2
        includePostsMethod: 'search',
        // 'search' or 'ids'
        postIdsInputValue: ''
      };
      _this.selectCategories = _this.selectCategories.bind(_this);
      _this.selectTags = _this.selectTags.bind(_this);
      _this.getTagIdsForTags = _this.getTagIdsForTags.bind(_this);
      _this.getCategoryForBkwrdCompat = _this.getCategoryForBkwrdCompat.bind(_this);
      _this.selectPostByTitle = _this.selectPostByTitle.bind(_this); // Backward compatibility 2.13.1 and lower
      _this.updatePostType = _this.updatePostType.bind(_this);
      _this.getPostIds = _this.getPostIds.bind(_this);
      _this.getPostTitles = _this.getPostTitles.bind(_this);
      return _this;
    }
    _inherits(RecentPostsEdit, _Component);
    return _createClass(RecentPostsEdit, [{
      key: "componentWillMount",
      value: function componentWillMount() {
        var _this2 = this;
        var _this$props = this.props,
          attributes = _this$props.attributes,
          setAttributes = _this$props.setAttributes;
        var currentBlockConfig = advgbDefaultConfig['advgb-recent-posts'];
        var tagsAndcategoriesListQuery = {
          per_page: -1,
          hide_empty: true
        };

        // No override attributes of blocks inserted before
        if (attributes.changed !== true) {
          if (_typeof(currentBlockConfig) === 'object' && currentBlockConfig !== null) {
            Object.keys(currentBlockConfig).map(function (attribute) {
              if (typeof attributes[attribute] === 'boolean') {
                attributes[attribute] = !!currentBlockConfig[attribute];
              } else {
                attributes[attribute] = currentBlockConfig[attribute];
              }
            });
          }

          // Finally set changed attribute to true, so we don't modify anything again
          setAttributes({
            changed: true
          });
        }

        // Do we need this?
        if (!!attributes.searchString) {
          setAttributes({
            searchString: ''
          });
        }
        wp.apiFetch({
          path: wp.url.addQueryArgs('advgb/v1/exclude_post_types')
        }).then(function (excludePostTypes) {
          wp.apiFetch({
            path: wp.url.addQueryArgs('wp/v2/types', {
              context: 'edit'
            })
          }).then(function (list) {
            var types = [];
            Object.keys(list).forEach(function (type) {
              if (list[type].viewable && !excludePostTypes.includes(type)) {
                types.push({
                  label: list[type].name,
                  value: list[type].slug
                });
              }
            });
            _this2.setState({
              postTypeList: types
            });
          });
        });
        wp.apiFetch({
          path: wp.url.addQueryArgs('wp/v2/categories', tagsAndcategoriesListQuery)
        }).then(function (list) {
          var suggestions = [];
          var catIdVsName = [];
          list.forEach(function (cat) {
            suggestions[cat.name] = cat;
            catIdVsName[cat.id] = cat.name;
          });
          _this2.setState({
            categoriesList: suggestions,
            catIdVsName: catIdVsName
          });

          // for backward compatibility, extract the (single select) category and set it as the (mutli select) categories
          // and make the (single select) category empty
          var categories = attributes.category && attributes.category !== undefined && attributes.category.length > 0 ? [_this2.getCategoryForBkwrdCompat(attributes.category)] : attributes.categories;
          setAttributes({
            categories: categories,
            category: ''
          });
        });
        wp.apiFetch({
          path: wp.url.addQueryArgs('wp/v2/tags', tagsAndcategoriesListQuery)
        }).then(function (list) {
          var suggestions = [];
          var tagNameVsId = [];
          list.forEach(function (tag) {
            suggestions.push(tag.name);
            tagNameVsId[tag.name] = tag.id;
          });
          _this2.setState({
            tagsList: suggestions,
            tagNameVsId: tagNameVsId
          });
          var tagIds = attributes.tags && attributes.tags.length > 0 ? _this2.getTagIdsForTags(attributes.tags) : [];
          setAttributes({
            tagIds: tagIds
          });
        });
        wp.apiFetch({
          path: wp.url.addQueryArgs('advgb/v1/authors')
        }).then(function (list) {
          _this2.setState({
            authorList: list
          });
        });

        // migrate from displayDate to postDate
        var postDateDisplay = attributes.displayDate ? 'created' : attributes.postDate;
        setAttributes({
          postDate: postDateDisplay,
          displayDate: false
        });
        var postType = attributes.postType === undefined ? 'post' : attributes.postType;
        this.generateTaxFilters(postType);
      }
    }, {
      key: "componentWillUpdate",
      value: function componentWillUpdate(nextProps) {
        var nextPosts = nextProps.recentPosts;
        var nextView = nextProps.attributes.postView;
        var _this$props2 = this.props,
          attributes = _this$props2.attributes,
          clientId = _this$props2.clientId,
          recentPosts = _this$props2.recentPosts;
        var $ = jQuery;
        if (nextView !== 'slider' || nextPosts && recentPosts && nextPosts.length !== recentPosts.length) {
          $("#block-".concat(clientId, " .advgb-recent-posts.slick-initialized")).slick('unslick');
          $("#block-".concat(clientId, " .advgb-recent-post")).removeAttr('tabindex').removeAttr('role').removeAttr('aria-describedby');
          if (nextView === 'slider' && nextPosts && recentPosts && nextPosts.length !== recentPosts.length) {
            if (!this.state.updating) {
              this.setState({
                updating: true
              });
            }
          }
          if (initSlider) {
            clearTimeout(initSlider);
          }
        }
        if (nextView !== 'masonry' || nextPosts && recentPosts && nextPosts.length !== recentPosts.length) {
          $("#block-".concat(clientId, " .masonry-view .advgb-recent-posts")).isotope('destroy');
          if (nextView === 'masonry' && nextPosts && recentPosts && nextPosts.length !== recentPosts.length) {
            if (!this.state.updating) {
              this.setState({
                updating: true
              });
            }
          }
          if (initMasonry) {
            clearTimeout(initMasonry);
          }
        }
      }
    }, {
      key: "componentDidMount",
      value: function componentDidMount() {
        var setAttributes = this.props.setAttributes;

        // Reset attributes when Pro is not available
        if (!this.isPro() && this.checkIncludeEnabled()) {
          setAttributes({
            includePosts: []
          });
        }
      }
    }, {
      key: "componentDidUpdate",
      value: function componentDidUpdate(prevProps) {
        var that = this;
        var _this$props3 = this.props,
          attributes = _this$props3.attributes,
          clientId = _this$props3.clientId,
          setAttributes = _this$props3.setAttributes,
          postList = _this$props3.postList;
        var postView = attributes.postView,
          sliderAutoplay = attributes.sliderAutoplay,
          sliderAutoplaySpeed = attributes.sliderAutoplaySpeed;
        var $ = jQuery;

        // @since 3.2.3 - https://github.com/publishpress/PublishPress-Blocks/issues/1389
        if (!this.state.isBlockIdSet) {
          setAttributes({
            id: 'recent-posts-' + clientId
          });
          this.setState({
            isBlockIdSet: true
          });
        }
        if (postView === 'slider') {
          // Autoplay
          initSlider = setTimeout(function () {
            $("#block-".concat(clientId, " .advgb-recent-posts-block.slider-view .advgb-recent-posts:not(.slick-initialized)")).slick({
              dots: true,
              adaptiveHeight: true,
              autoplay: sliderAutoplay
            });
            $("#block-".concat(clientId, " .advgb-recent-posts-block.slider-view .advgb-recent-posts.slick-initialized")).slick('slickSetOption', 'autoplay', sliderAutoplay, true);
            if (that.state.updating) {
              that.setState({
                updating: false
              });
            }
          }, 100);

          // Autoplay speed
          if (sliderAutoplay && sliderAutoplaySpeed && advgbBlocks.advgb_pro !== 'undefined' && advgbBlocks.advgb_pro === '1') {
            $("#block-".concat(clientId, " .advgb-recent-posts-block.slider-view .advgb-recent-posts.slick-initialized")).slick('slickSetOption', 'autoplaySpeed', sliderAutoplaySpeed, true);
          } else {
            $("#block-".concat(clientId, " .advgb-recent-posts-block.slider-view .advgb-recent-posts.slick-initialized")).slick('slickSetOption', 'autoplaySpeed', 3000, true);
          }
        } else {
          $("#block-".concat(clientId, " .advgb-recent-posts.slick-initialized")).slick('unslick');
        }
        if (postView === 'masonry') {
          initMasonry = setTimeout(function () {
            var $masonry = $("#block-".concat(clientId, " .masonry-view .advgb-recent-posts"));
            $masonry.isotope({
              itemSelector: '.advgb-recent-post',
              percentPosition: true
            });
            $(window).resize(function () {
              $masonry.isotope();
            });
            if (that.state.updating) {
              that.setState({
                updating: false
              });
            }
          }, 100);
        } else {
          $("#block-".concat(clientId, " .masonry-view .advgb-recent-posts")).isotope('destroy');
        }

        // Backward compatibility 2.13.1 and lower
        if (this.state.updatePostSuggestions && attributes.exclude && attributes.exclude.length > 0 && postList) {
          var postSuggestions = [];
          var postTitleVsIdMap = [];
          postList.forEach(function (post) {
            postSuggestions.push(post.title.raw);
            postTitleVsIdMap[post.title.raw] = post.id;
          });
          this.setState({
            postTitleVsIdMap: postTitleVsIdMap,
            updatePostSuggestions: false
          }, function () {
            if (!attributes.excludeIds) {
              this.selectPostByTitle(attributes.exclude, 'exclude');
            }
          });
        }
      }
    }, {
      key: "translatableText",
      value: function translatableText(text) {
        switch (text) {
          case 'desktop':
            return __('desktop', 'advanced-gutenberg');
            // removed by dead control flow

          case 'tablet':
            return __('tablet', 'advanced-gutenberg');
            // removed by dead control flow

          case 'mobile':
            return __('mobile', 'advanced-gutenberg');
            // removed by dead control flow

        }
      }
    }, {
      key: "isPro",
      value: function isPro() {
        return advgbBlocks.advgb_pro !== 'undefined' && advgbBlocks.advgb_pro === '1';
      }
    }, {
      key: "checkIncludeEnabled",
      value: function checkIncludeEnabled() {
        return typeof this.props.attributes.includePosts !== 'undefined' && this.props.attributes.includePosts.length > 0;
      }
    }, {
      key: "renderInfoSections",
      value: function renderInfoSections(post, index) {
        var _this3 = this;
        var attributes = this.props.attributes;
        var infoSectionOrder = attributes.infoSectionOrder,
          infoSectionSeparator = attributes.infoSectionSeparator,
          hideInfoSeparators = attributes.hideInfoSeparators,
          postType = attributes.postType;
        var order = infoSectionOrder || ['author', 'date', 'comments'];
        var separator = hideInfoSeparators ? '' : infoSectionSeparator || ' ';
        var sections = [];
        order.forEach(function (item, itemIndex) {
          var sectionContent = null;
          switch (item) {
            case 'author':
              if (_this3.checkElementDisplay('author', index)) {
                if (post.coauthors && post.coauthors.length > 0) {
                  sectionContent = post.coauthors.map(function (coauthor, coauthor_indx) {
                    return /*#__PURE__*/React.createElement(Fragment, {
                      key: coauthor_indx
                    }, /*#__PURE__*/React.createElement("a", {
                      href: coauthor.link,
                      target: "_blank",
                      className: "advgb-post-author"
                    }, coauthor.display_name), coauthor_indx < post.coauthors.length - 1 && /*#__PURE__*/React.createElement("span", null, ", "));
                  });
                } else {
                  sectionContent = /*#__PURE__*/React.createElement("a", {
                    href: post.author_meta.author_link,
                    target: "_blank",
                    className: "advgb-post-author"
                  }, post.author_meta.display_name);
                }
              }
              break;
            case 'date':
              if (_this3.checkElementDisplay('date', index)) {
                sectionContent = /*#__PURE__*/React.createElement("span", {
                  className: "advgb-post-datetime"
                }, _this3.getDateTime(post));
              }
              break;
            case 'comments':
              if (postType === 'post' && _this3.checkElementDisplay('comments', index)) {
                sectionContent = /*#__PURE__*/React.createElement("span", {
                  className: "advgb-post-comments"
                }, /*#__PURE__*/React.createElement("span", {
                  className: "dashicons dashicons-admin-comments"
                }), "(", post.comment_count, ")");
              }
              break;
          }
          if (sectionContent) {
            if (sections.length > 0 && !hideInfoSeparators) {
              sections.push( /*#__PURE__*/React.createElement("span", {
                key: "sep-".concat(itemIndex)
              }, separator));
            }
            sections.push( /*#__PURE__*/React.createElement(Fragment, {
              key: item
            }, sectionContent));
          }
        });
        return sections;
      }
    }, {
      key: "render",
      value: function render() {
        var _this4 = this;
        var _this$state = this.state,
          categoriesList = _this$state.categoriesList,
          tagsList = _this$state.tagsList,
          postTypeList = _this$state.postTypeList,
          tabSelected = _this$state.tabSelected,
          authorList = _this$state.authorList,
          postSuggestions = _this$state.postSuggestions,
          taxonomyList = _this$state.taxonomyList;
        var _this$props4 = this.props,
          attributes = _this$props4.attributes,
          setAttributes = _this$props4.setAttributes,
          recentPostsList = _this$props4.recentPosts,
          postsToSearch = _this$props4.postsToSearch,
          postsToSearchResolved = _this$props4.postsToSearchResolved,
          postsToInclude = _this$props4.postsToInclude,
          postsToIncludeResolved = _this$props4.postsToIncludeResolved,
          postsToExclude = _this$props4.postsToExclude,
          postsToExcludeResolved = _this$props4.postsToExcludeResolved,
          postList = _this$props4.postList;
        var id = attributes.id,
          postView = attributes.postView,
          order = attributes.order,
          orderBy = attributes.orderBy,
          numberOfPosts = attributes.numberOfPosts,
          columns = attributes.columns,
          columnsT = attributes.columnsT,
          columnsM = attributes.columnsM,
          displayFeaturedImage = attributes.displayFeaturedImage,
          displayFeaturedImageFor = attributes.displayFeaturedImageFor,
          displayFeaturedImageCaption = attributes.displayFeaturedImageCaption,
          enablePlaceholderImage = attributes.enablePlaceholderImage,
          imageOpacity = attributes.imageOpacity,
          imageOverlayColor = attributes.imageOverlayColor,
          displayAuthor = attributes.displayAuthor,
          displayAuthorFor = attributes.displayAuthorFor,
          authorLinkNewTab = attributes.authorLinkNewTab,
          displayDate = attributes.displayDate,
          postDate = attributes.postDate,
          postDateFor = attributes.postDateFor,
          postDateFormat = attributes.postDateFormat,
          displayTime = attributes.displayTime,
          displayExcerpt = attributes.displayExcerpt,
          displayExcerptFor = attributes.displayExcerptFor,
          postTextAsExcerpt = attributes.postTextAsExcerpt,
          postTextExcerptLength = attributes.postTextExcerptLength,
          displayReadMore = attributes.displayReadMore,
          displayReadMoreFor = attributes.displayReadMoreFor,
          readMoreLbl = attributes.readMoreLbl,
          isPreview = attributes.isPreview,
          categories = attributes.categories,
          tags = attributes.tags,
          frontpageLayout = attributes.frontpageLayout,
          frontpageLayoutT = attributes.frontpageLayoutT,
          frontpageLayoutM = attributes.frontpageLayoutM,
          gap = attributes.gap,
          frontpageStyle = attributes.frontpageStyle,
          sliderStyle = attributes.sliderStyle,
          newspaperLayout = attributes.newspaperLayout,
          excludeCurrentPost = attributes.excludeCurrentPost,
          showCategories = attributes.showCategories,
          showCategoriesFor = attributes.showCategoriesFor,
          showTags = attributes.showTags,
          showTagsFor = attributes.showTagsFor,
          displayCommentCount = attributes.displayCommentCount,
          displayCommentCountFor = attributes.displayCommentCountFor,
          textAfterTitle = attributes.textAfterTitle,
          textBeforeReadmore = attributes.textBeforeReadmore,
          includePosts = attributes.includePosts,
          excludePosts = attributes.excludePosts,
          offset = attributes.offset,
          selectedAuthorId = attributes.author,
          sliderAutoplay = attributes.sliderAutoplay,
          linkCustomTax = attributes.linkCustomTax,
          showCustomTaxList = attributes.showCustomTaxList,
          showCustomTaxListFor = attributes.showCustomTaxListFor,
          imagePosition = attributes.imagePosition,
          onlyFromCurrentUser = attributes.onlyFromCurrentUser,
          orderSections = attributes.orderSections,
          customDateFormat = attributes.customDateFormat,
          infoSectionOrder = attributes.infoSectionOrder,
          infoSectionSeparator = attributes.infoSectionSeparator,
          hideInfoSeparators = attributes.hideInfoSeparators,
          removeDateTimeSeparator = attributes.removeDateTimeSeparator,
          absoluteDateCreatedPrefix = attributes.absoluteDateCreatedPrefix,
          absoluteDateUpdatedPrefix = attributes.absoluteDateUpdatedPrefix,
          relativeDateCreatedPrefix = attributes.relativeDateCreatedPrefix,
          relativeDateUpdatedPrefix = attributes.relativeDateUpdatedPrefix,
          showDatePrefix = attributes.showDatePrefix;
        var recentPosts = this.props.recentPosts;
        var mergedPosts = this.getMergedPosts();
        var postSuggestionsExclude = this.getPostSuggestions(postList, 'exclude');
        var postSuggestionsInclude = this.getPostSuggestions(mergedPosts, 'include');

        // We need to check if we're in post edit or widgets screen
        var isInPost = wp.data.select('core/editor') && wp.data.select('core/editor').getCurrentPostType() === 'post';
        var postType = attributes.postType;
        if (postType === undefined) {
          postType = 'post';
        }
        var deviceLetter = '';
        if (tabSelected === 'tablet') deviceLetter = 'T';
        if (tabSelected === 'mobile') deviceLetter = 'M';
        var inspectorControls = /*#__PURE__*/React.createElement(InspectorControls, null, postView === 'slider' && /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Slider View Settings', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Style', 'advanced-gutenberg'),
          value: sliderStyle,
          options: [{
            label: __('Default', 'advanced-gutenberg'),
            value: 'default'
          }, {
            label: __('Headline', 'advanced-gutenberg'),
            value: 'headline'
          }],
          onChange: function onChange(value) {
            return setAttributes({
              sliderStyle: value
            });
          }
        }), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Autoplay', 'advanced-gutenberg'),
          checked: sliderAutoplay,
          onChange: function onChange() {
            return setAttributes({
              sliderAutoplay: !sliderAutoplay
            });
          }
        })), postView === 'frontpage' && /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Frontpage View Settings', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-recent-posts-responsive-items"
        }, ['desktop', 'tablet', 'mobile'].map(function (device, index) {
          var itemClasses = ["advgb-recent-posts-responsive-item", tabSelected === device && 'is-selected'].filter(Boolean).join(' ');
          return /*#__PURE__*/React.createElement("div", {
            className: itemClasses,
            key: index,
            onClick: function onClick() {
              return _this4.setState({
                tabSelected: device
              });
            }
          }, _this4.translatableText(device));
        })), /*#__PURE__*/React.createElement("div", {
          className: "advgb-recent-posts-select-layout on-inspector"
        }, tabSelected === 'desktop' && FRONTPAGE_LAYOUTS.map(function (layout, index) {
          var layoutClasses = ['advgb-recent-posts-layout', tabSelected === 'desktop' && layout.layout === frontpageLayout && 'is-selected'].filter(Boolean).join(' ');
          return /*#__PURE__*/React.createElement(Tooltip, {
            text: layout.title,
            key: index
          }, /*#__PURE__*/React.createElement("div", {
            className: layoutClasses,
            onClick: function onClick() {
              setAttributes(_defineProperty({}, 'frontpageLayout' + deviceLetter, layout.layout));
              _this4.setState({
                random: Math.random()
              });
            }
          }, /*#__PURE__*/React.createElement("img", {
            src: advgbBlocks.pluginUrl + '/assets/blocks/recent-posts/icons/' + layout.icon + '.png',
            alt: layout.layout
          })));
        }), tabSelected === 'tablet' && FRONTPAGE_LAYOUTS_TABLET.map(function (layout, index) {
          var layoutClasses = ['advgb-recent-posts-layout', tabSelected === 'tablet' && layout.layout === frontpageLayoutT && 'is-selected'].filter(Boolean).join(' ');
          return /*#__PURE__*/React.createElement(Tooltip, {
            text: layout.title,
            key: index
          }, /*#__PURE__*/React.createElement("div", {
            className: layoutClasses,
            onClick: function onClick() {
              setAttributes(_defineProperty({}, 'frontpageLayout' + deviceLetter, layout.layout));
              _this4.setState({
                random: Math.random()
              });
            }
          }, /*#__PURE__*/React.createElement("img", {
            src: advgbBlocks.pluginUrl + '/assets/blocks/recent-posts/icons/' + layout.icon + '.png',
            alt: layout.layout
          })));
        }), tabSelected === 'mobile' && FRONTPAGE_LAYOUTS_MOBILE.map(function (layout, index) {
          var layoutClasses = ['advgb-recent-posts-layout', tabSelected === 'mobile' && layout.layout === frontpageLayoutM && 'is-selected'].filter(Boolean).join(' ');
          return /*#__PURE__*/React.createElement(Tooltip, {
            text: layout.title,
            key: index
          }, /*#__PURE__*/React.createElement("div", {
            className: layoutClasses,
            onClick: function onClick() {
              setAttributes(_defineProperty({}, 'frontpageLayout' + deviceLetter, layout.layout));
              _this4.setState({
                random: Math.random()
              });
            }
          }, /*#__PURE__*/React.createElement("img", {
            src: advgbBlocks.pluginUrl + '/assets/blocks/recent-posts/icons/' + layout.icon + '.png',
            alt: layout.layout
          })));
        })), /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Style', 'advanced-gutenberg'),
          value: frontpageStyle,
          options: [{
            label: __('Default', 'advanced-gutenberg'),
            value: 'default'
          }, {
            label: __('Headline', 'advanced-gutenberg'),
            value: 'headline'
          }, {
            label: __('Boxed', 'advanced-gutenberg'),
            value: 'boxed'
          }],
          onChange: function onChange(value) {
            return setAttributes({
              frontpageStyle: value
            });
          }
        }), /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Space between columns and rows', 'advanced-gutenberg'),
          value: gap,
          options: GAP_OPTIONS,
          onChange: function onChange(value) {
            return setAttributes({
              gap: parseInt(value)
            });
          }
        })), postView === 'newspaper' && /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Newspaper View Settings', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-recent-posts-select-layout on-inspector"
        }, NEWSPAPER_LAYOUTS.map(function (layout, index) {
          var layoutClasses = ['advgb-recent-posts-layout', layout.layout === newspaperLayout && 'is-selected'].filter(Boolean).join(' ');
          return /*#__PURE__*/React.createElement(Tooltip, {
            text: layout.title,
            key: index
          }, /*#__PURE__*/React.createElement("div", {
            className: layoutClasses,
            onClick: function onClick() {
              setAttributes({
                newspaperLayout: layout.layout
              });
              _this4.setState({
                random: Math.random()
              });
              _this4.newspaperOnChangeLayout(layout.layout);
            }
          }, /*#__PURE__*/React.createElement("img", {
            src: advgbBlocks.pluginUrl + '/assets/blocks/recent-posts/icons/' + layout.icon + '.png',
            alt: layout.layout
          })));
        }))), postView === 'masonry' && /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Masonry View Settings', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Space between columns and rows', 'advanced-gutenberg'),
          value: gap,
          options: GAP_OPTIONS,
          onChange: function onChange(value) {
            return setAttributes({
              gap: parseInt(value)
            });
          }
        })), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Post Settings', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Post Type', 'advanced-gutenberg'),
          value: postType,
          options: postTypeList,
          onChange: function onChange(value) {
            return _this4.updatePostType(value);
          }
        }), /*#__PURE__*/React.createElement(_query_controls_jsx__WEBPACK_IMPORTED_MODULE_0__["default"], {
          order: order,
          orderBy: orderBy,
          postType: postType,
          numberOfItems: numberOfPosts,
          onOrderChange: function onOrderChange(value) {
            return setAttributes({
              order: value
            });
          },
          onOrderByChange: function onOrderByChange(value) {
            return setAttributes({
              orderBy: value
            });
          },
          onNumberOfItemsChange: function onNumberOfItemsChange(value) {
            return _this4.refreshOnChangeItems(value);
          }
        })), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Filters', 'advanced-gutenberg')
        }, this.isPro() && this.checkIncludeEnabled() && /*#__PURE__*/React.createElement("div", {
          className: "advgb-wrapper-disabled-msg notice notice-info"
        }, /*#__PURE__*/React.createElement("p", null, __('To enable filters, clear Advanced Filters > Display these posts only', 'advanced-gutenberg'))), /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
          className: this.isPro() && this.checkIncludeEnabled() ? 'advgb-wrapper-disabled' : ''
        }, this.isPro() && this.checkIncludeEnabled() && /*#__PURE__*/React.createElement("div", {
          className: "advgb-wrapper-disabled-overlay"
        }), postType === 'post' && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(FormTokenField, {
          key: "query-controls-categories-select",
          label: __('Show content with these Categories', 'advanced-gutenberg'),
          value: categories && categories.map(function (item) {
            return {
              id: item.id,
              value: item.name || item.value
            };
          }),
          suggestions: Object.keys(categoriesList),
          onChange: function onChange(value) {
            _this4.selectCategories(value);
          },
          maxSuggestions: MAX_CATEGORIES_SUGGESTIONS
        }), /*#__PURE__*/React.createElement(FormTokenField, {
          multiple: true,
          suggestions: tagsList,
          value: tags,
          label: __('Show content with these Tags', 'advanced-gutenberg'),
          placeholder: __('Type a tag', 'advanced-gutenberg'),
          onChange: function onChange(value) {
            _this4.selectTags(value);
          }
        })), taxonomyList && taxonomyList.length > 0 && taxonomyList.map(function (tax) {
          return /*#__PURE__*/React.createElement(FormTokenField, {
            multiple: true,
            suggestions: tax.suggestions,
            value: _this4.populateTaxTerms(tax),
            onChange: function onChange(value) {
              return _this4.selectTaxTerms(tax, value);
            },
            key: "query-controls-`${tax.slug}`-select",
            label: __('Show content with these ', 'advanced-gutenberg') + decodeEntities("".concat(tax.name))
          });
        }), !onlyFromCurrentUser && /*#__PURE__*/React.createElement(_query_controls_jsx__WEBPACK_IMPORTED_MODULE_0__.AuthorSelect, {
          key: "query-controls-author-select",
          authorList: authorList,
          label: __('Author', 'advanced-gutenberg'),
          noOptionLabel: __('All', 'advanced-gutenberg'),
          selectedAuthorId: selectedAuthorId,
          onChange: function onChange(value) {
            return setAttributes({
              author: value
            });
          }
        }), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Only shows posts written by the user viewing the block', 'advanced-gutenberg'),
          checked: onlyFromCurrentUser,
          onChange: function onChange() {
            return setAttributes({
              onlyFromCurrentUser: !onlyFromCurrentUser
            });
          }
        }), isInPost && postType === 'post' && /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Exclude current post', 'advanced-gutenberg'),
          help: __('If this post is listed in the block, you can exclude it.', 'advanced-gutenberg'),
          checked: excludeCurrentPost,
          onChange: function onChange() {
            return setAttributes({
              excludeCurrentPost: !excludeCurrentPost
            });
          }
        }), /*#__PURE__*/React.createElement(FormTokenField, {
          multiple: true,
          suggestions: postSuggestionsExclude,
          value: this.getPostTitles(excludePosts, postList),
          label: __('Exclude these posts', 'advanced-gutenberg'),
          placeholder: __('Search by title', 'advanced-gutenberg'),
          onChange: function onChange(excludePosts) {
            return _this4.getPostIds(excludePosts, postList, 'exclude');
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Offset the first posts', 'advanced-gutenberg'),
          value: offset,
          min: 0,
          max: 10,
          onChange: function onChange(value) {
            return setAttributes({
              offset: value
            });
          }
        })))), this.isPro() ? /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Advanced Filters', 'advanced-gutenberg'),
          className: "advgb-pro-icon"
        }, /*#__PURE__*/React.createElement("label", {
          className: "components-base-control__label"
        }, __('Display these posts only', 'advanced-gutenberg')), /*#__PURE__*/React.createElement("div", {
          className: "advgb-include-posts-tabs"
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-tab-buttons"
        }, /*#__PURE__*/React.createElement("button", {
          className: "advgb-tab-button ".concat(this.state.includePostsMethod === 'search' ? 'active' : ''),
          onClick: function onClick() {
            return _this4.setState({
              includePostsMethod: 'search'
            });
          }
        }, __('Search Posts', 'advanced-gutenberg')), /*#__PURE__*/React.createElement("button", {
          className: "advgb-tab-button ".concat(this.state.includePostsMethod === 'ids' ? 'active' : ''),
          onClick: function onClick() {
            return _this4.setState({
              includePostsMethod: 'ids'
            });
          }
        }, __('Enter Post IDs', 'advanced-gutenberg'))), /*#__PURE__*/React.createElement("div", {
          className: "advgb-tab-content"
        }, this.state.includePostsMethod === 'search' ? /*#__PURE__*/React.createElement(FormTokenField, {
          multiple: true,
          suggestions: postSuggestionsInclude,
          onInputChange: function onInputChange(value) {
            setAttributes({
              searchString: value
            });
          },
          maxSuggestions: 10,
          value: this.getPostTitles(includePosts, mergedPosts),
          placeholder: __('Search by title', 'advanced-gutenberg'),
          onChange: function onChange(includePosts) {
            return _this4.getPostIds(includePosts, mergedPosts, 'include');
          }
        }) : /*#__PURE__*/React.createElement(TextareaControl, {
          help: __('Enter post IDs separated by commas (e.g., 123, 456, 789)', 'advanced-gutenberg'),
          value: this.state.postIdsInputValue || (includePosts ? includePosts.join(', ') : ''),
          onChange: function onChange(value) {
            return _this4.handlePostIdsInput(value);
          },
          placeholder: __('123, 456, 789', 'advanced-gutenberg')
        })))), /*#__PURE__*/React.createElement(React.Fragment, null)) : /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Advanced Filters', 'advanced-gutenberg'),
          className: "advgb-pro-icon"
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-promo-overlay-area"
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-blur"
        }, /*#__PURE__*/React.createElement("label", {
          className: "components-base-control__label"
        }, __('Display these posts only', 'advanced-gutenberg')), /*#__PURE__*/React.createElement("div", {
          className: "advgb-include-posts-tabs"
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-tab-buttons"
        }, /*#__PURE__*/React.createElement("button", {
          className: "advgb-tab-button active"
        }, __('Search Posts', 'advanced-gutenberg')), /*#__PURE__*/React.createElement("button", {
          className: "advgb-tab-button"
        }, __('Enter Post IDs', 'advanced-gutenberg'))), /*#__PURE__*/React.createElement("div", {
          className: "advgb-tab-content"
        }, /*#__PURE__*/React.createElement(FormTokenField, {
          multiple: true,
          maxSuggestions: 10,
          placeholder: __('Search by title', 'advanced-gutenberg')
        })))), /*#__PURE__*/React.createElement("div", {
          className: "advgb-pro-overlay-wrap"
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-pro-overlay-text advgb-tooltips ppb-tooltips-library click",
          "data-toggle": "ppbtooltip",
          "data-placement": "top"
        }, /*#__PURE__*/React.createElement("span", {
          className: "advgb-promo-text"
        }, __('Pro', 'advanced-gutenberg')), /*#__PURE__*/React.createElement("span", {
          className: "tooltip-text"
        }, /*#__PURE__*/React.createElement("p", null, __('PublishPress Blocks Pro supports filters for content.', 'advanced-gutenberg')), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("a", {
          className: "clickable",
          href: "https://publishpress.com/links/blocks-menu",
          target: "_blank"
        }, __('Upgrade to Pro', 'advanced-gutenberg'))), /*#__PURE__*/React.createElement("i", null)))))), /*#__PURE__*/React.createElement(React.Fragment, null)), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Display Settings', 'advanced-gutenberg')
        }, (postView === 'grid' || postView === 'masonry') && /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Columns', 'advanced-gutenberg'),
          value: columns,
          min: 1,
          max: 4,
          onChange: function onChange(value) {
            return setAttributes({
              columns: value
            });
          }
        }), postView === 'masonry' && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Columns (Tablet)', 'advanced-gutenberg'),
          value: columnsT,
          min: 1,
          max: 4,
          onChange: function onChange(value) {
            return setAttributes({
              columnsT: value
            });
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Columns (Mobile)', 'advanced-gutenberg'),
          value: columnsM,
          min: 1,
          max: 4,
          onChange: function onChange(value) {
            return setAttributes({
              columnsM: value
            });
          }
        })), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Display Featured Image', 'advanced-gutenberg'),
          checked: displayFeaturedImage,
          onChange: function onChange() {
            return setAttributes({
              displayFeaturedImage: !displayFeaturedImage
            });
          }
        }), displayFeaturedImage && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(SelectControl, {
          value: displayFeaturedImageFor,
          options: DISPLAY_FOR,
          onChange: function onChange(value) {
            setAttributes({
              displayFeaturedImageFor: value
            });
          },
          className: "advgb-child-select"
        }), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Enable Placeholder Image', 'advanced-gutenberg'),
          checked: enablePlaceholderImage,
          onChange: function onChange() {
            return setAttributes({
              enablePlaceholderImage: !enablePlaceholderImage
            });
          },
          className: "advgb-child-toggle",
          help: __('If a post doesn\'t have a featured image, the placeholder image will be displayed instead', 'advanced-gutenberg')
        }), postView === 'list' && /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Position', 'advanced-gutenberg'),
          value: imagePosition,
          options: [{
            label: __('Left', 'advanced-gutenberg'),
            value: 'left'
          }, {
            label: __('Right', 'advanced-gutenberg'),
            value: 'right'
          }],
          onChange: function onChange(value) {
            return setAttributes({
              imagePosition: value
            });
          },
          className: "advgb-child-select"
        }), (postView === 'frontpage' && frontpageStyle === 'headline' || postView === 'slider' && sliderStyle === 'headline') && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Image opacity', 'advanced-gutenberg'),
          value: imageOpacity,
          min: 0,
          max: 1,
          step: 0.1,
          onChange: function onChange(value) {
            return setAttributes({
              imageOpacity: value
            });
          },
          className: "advgb-child-range"
        }), /*#__PURE__*/React.createElement("div", {
          className: "advgb-child-advcolor"
        }, /*#__PURE__*/React.createElement(_0_adv_components_components_jsx__WEBPACK_IMPORTED_MODULE_1__.AdvColorControl, {
          label: __('Overlay Color', 'advanced-gutenberg'),
          value: imageOverlayColor,
          onChange: function onChange(value) {
            return setAttributes({
              imageOverlayColor: value
            });
          }
        }))), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Display Caption', 'advanced-gutenberg'),
          checked: displayFeaturedImageCaption,
          onChange: function onChange() {
            return setAttributes({
              displayFeaturedImageCaption: !displayFeaturedImageCaption
            });
          },
          className: "advgb-child-toggle"
        })), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Display Post Author', 'advanced-gutenberg'),
          checked: displayAuthor,
          onChange: function onChange() {
            return setAttributes({
              displayAuthor: !displayAuthor
            });
          }
        }), displayAuthor && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(SelectControl, {
          value: displayAuthorFor,
          options: DISPLAY_FOR,
          onChange: function onChange(value) {
            setAttributes({
              displayAuthorFor: value
            });
          },
          className: "advgb-child-select"
        }), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Open link in new tab', 'advanced-gutenberg'),
          checked: !!authorLinkNewTab,
          onChange: function onChange() {
            return setAttributes({
              authorLinkNewTab: !authorLinkNewTab
            });
          },
          className: "advgb-child-toggle"
        })), /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Display Post Date', 'advanced-gutenberg'),
          value: postDate,
          options: [{
            label: __('Hide', 'advanced-gutenberg'),
            value: 'hide'
          }, {
            label: __('Created Date', 'advanced-gutenberg'),
            value: 'created'
          }, {
            label: __('Updated Date', 'advanced-gutenberg'),
            value: 'updated'
          }],
          onChange: function onChange(value) {
            setAttributes({
              postDate: value
            });
          }
        }), postDate !== 'hide' && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(SelectControl, {
          value: postDateFor,
          options: DISPLAY_FOR,
          onChange: function onChange(value) {
            setAttributes({
              postDateFor: value
            });
          },
          className: "advgb-child-select"
        }), /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Post Date Format', 'advanced-gutenberg'),
          value: postDateFormat,
          options: [{
            label: __('Absolute', 'advanced-gutenberg'),
            value: 'absolute'
          }, {
            label: __('Relative', 'advanced-gutenberg'),
            value: 'relative'
          }],
          onChange: function onChange(value) {
            setAttributes({
              postDateFormat: value
            });
          },
          className: "advgb-child-select"
        }), postDateFormat === 'absolute' && /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Display Post Time', 'advanced-gutenberg'),
          checked: displayTime,
          onChange: function onChange() {
            return setAttributes({
              displayTime: !displayTime
            });
          },
          className: "advgb-child-toggle"
        }), this.isPro() ? /*#__PURE__*/React.createElement(React.Fragment, null, postDate !== 'hide' && postDateFormat === 'absolute' && /*#__PURE__*/React.createElement(TextControl, {
          label: __('Custom Date Format', 'advanced-gutenberg'),
          value: customDateFormat,
          placeholder: __('e.g., j F (for "9 July")', 'advanced-gutenberg'),
          onChange: function onChange(value) {
            return setAttributes({
              customDateFormat: value
            });
          },
          help: __('Use PHP date format. Leave empty for default.', 'advanced-gutenberg'),
          className: "advgb-child-text"
        }), postDate !== 'hide' && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Show Date Prefix', 'advanced-gutenberg'),
          checked: showDatePrefix,
          onChange: function onChange() {
            return setAttributes({
              showDatePrefix: !showDatePrefix
            });
          },
          className: "advgb-child-toggle"
        }), showDatePrefix && /*#__PURE__*/React.createElement(Fragment, null, postDateFormat === 'absolute' && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(TextControl, {
          label: __('Absolute Created Date Prefix', 'advanced-gutenberg'),
          value: absoluteDateCreatedPrefix,
          onChange: function onChange(value) {
            return setAttributes({
              absoluteDateCreatedPrefix: value
            });
          },
          placeholder: __('Posted on', 'advanced-gutenberg'),
          className: "advgb-child-text",
          help: __('For absolute dates (e.g., "Posted on 9 July")', 'advanced-gutenberg')
        }), /*#__PURE__*/React.createElement(TextControl, {
          label: __('Absolute Updated Date Prefix', 'advanced-gutenberg'),
          value: absoluteDateUpdatedPrefix,
          onChange: function onChange(value) {
            return setAttributes({
              absoluteDateUpdatedPrefix: value
            });
          },
          placeholder: __('Updated on', 'advanced-gutenberg'),
          className: "advgb-child-text",
          help: __('For absolute dates (e.g., "Updated on 9 July")', 'advanced-gutenberg')
        })), postDateFormat === 'relative' && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(TextControl, {
          label: __('Relative Created Date Prefix', 'advanced-gutenberg'),
          value: relativeDateCreatedPrefix,
          onChange: function onChange(value) {
            return setAttributes({
              relativeDateCreatedPrefix: value
            });
          },
          placeholder: __('Posted', 'advanced-gutenberg'),
          className: "advgb-child-text",
          help: __('For relative dates (e.g., "Posted 2 hours ago")', 'advanced-gutenberg')
        }), /*#__PURE__*/React.createElement(TextControl, {
          label: __('Relative Updated Date Prefix', 'advanced-gutenberg'),
          value: relativeDateUpdatedPrefix,
          onChange: function onChange(value) {
            return setAttributes({
              relativeDateUpdatedPrefix: value
            });
          },
          placeholder: __('Updated', 'advanced-gutenberg'),
          className: "advgb-child-text",
          help: __('For relative dates (e.g., "Updated 2 hours ago")', 'advanced-gutenberg')
        }))))) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
          className: "advgb-promo-overlay-area"
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-blur"
        }, postDate !== 'hide' && postDateFormat === 'absolute' && /*#__PURE__*/React.createElement(TextControl, {
          label: __('Custom Date Format', 'advanced-gutenberg'),
          value: customDateFormat,
          placeholder: __('e.g., j F (for "9 July")', 'advanced-gutenberg'),
          help: __('Use PHP date format. Leave empty for default.', 'advanced-gutenberg'),
          className: "advgb-child-text"
        }), postDate !== 'hide' && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Show Date Prefix', 'advanced-gutenberg'),
          checked: showDatePrefix,
          className: "advgb-child-toggle"
        }), showDatePrefix && /*#__PURE__*/React.createElement(Fragment, null, postDateFormat === 'absolute' && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(TextControl, {
          label: __('Absolute Created Date Prefix', 'advanced-gutenberg'),
          value: absoluteDateCreatedPrefix,
          placeholder: __('Posted on', 'advanced-gutenberg'),
          className: "advgb-child-text",
          help: __('For absolute dates (e.g., "Posted on 9 July")', 'advanced-gutenberg')
        }), /*#__PURE__*/React.createElement(TextControl, {
          label: __('Absolute Updated Date Prefix', 'advanced-gutenberg'),
          value: absoluteDateUpdatedPrefix,
          placeholder: __('Updated on', 'advanced-gutenberg'),
          className: "advgb-child-text",
          help: __('For absolute dates (e.g., "Updated on 9 July")', 'advanced-gutenberg')
        })), postDateFormat === 'relative' && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(TextControl, {
          label: __('Relative Created Date Prefix', 'advanced-gutenberg'),
          value: relativeDateCreatedPrefix,
          placeholder: __('Posted', 'advanced-gutenberg'),
          className: "advgb-child-text",
          help: __('For relative dates (e.g., "Posted 2 hours ago")', 'advanced-gutenberg')
        }), /*#__PURE__*/React.createElement(TextControl, {
          label: __('Relative Updated Date Prefix', 'advanced-gutenberg'),
          value: relativeDateUpdatedPrefix,
          placeholder: __('Updated', 'advanced-gutenberg'),
          className: "advgb-child-text",
          help: __('For relative dates (e.g., "Updated 2 hours ago")', 'advanced-gutenberg')
        }))))), /*#__PURE__*/React.createElement("div", {
          className: "advgb-pro-overlay-wrap"
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-pro-overlay-text advgb-tooltips ppb-tooltips-library click",
          "data-toggle": "ppbtooltip",
          "data-placement": "top"
        }, /*#__PURE__*/React.createElement("span", {
          className: "advgb-promo-text"
        }, __('Pro', 'advanced-gutenberg')), /*#__PURE__*/React.createElement("span", {
          className: "tooltip-text"
        }, /*#__PURE__*/React.createElement("p", null, __('PublishPress Blocks Pro supports changing date prefix, and setting Custom Date Format.', 'advanced-gutenberg')), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("a", {
          className: "clickable",
          href: "https://publishpress.com/links/blocks-menu",
          target: "_blank"
        }, __('Upgrade to Pro', 'advanced-gutenberg'))), /*#__PURE__*/React.createElement("i", null))))))), postType === 'post' && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Display Comment Counts', 'advanced-gutenberg'),
          checked: displayCommentCount,
          onChange: function onChange() {
            return setAttributes({
              displayCommentCount: !displayCommentCount
            });
          }
        }), displayCommentCount && /*#__PURE__*/React.createElement(SelectControl, {
          value: displayCommentCountFor,
          options: DISPLAY_FOR,
          onChange: function onChange(value) {
            setAttributes({
              displayCommentCountFor: value
            });
          },
          className: "advgb-child-select"
        })), postType === 'post' && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Display Category', 'advanced-gutenberg'),
          value: showCategories,
          options: [{
            label: __('Hide', 'advanced-gutenberg'),
            value: 'hide'
          }, {
            label: __('Show', 'advanced-gutenberg'),
            value: 'show'
          }, {
            label: __('Show & Link', 'advanced-gutenberg'),
            value: 'link'
          }],
          onChange: function onChange(value) {
            setAttributes({
              showCategories: value
            });
          }
        }), showCategories !== 'hide' && /*#__PURE__*/React.createElement(SelectControl, {
          value: showCategoriesFor,
          options: DISPLAY_FOR,
          onChange: function onChange(value) {
            setAttributes({
              showCategoriesFor: value
            });
          },
          className: "advgb-child-select"
        }), /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Display Tags', 'advanced-gutenberg'),
          value: showTags,
          options: [{
            label: __('Hide', 'advanced-gutenberg'),
            value: 'hide'
          }, {
            label: __('Show', 'advanced-gutenberg'),
            value: 'show'
          }, {
            label: __('Show & Link', 'advanced-gutenberg'),
            value: 'link'
          }],
          onChange: function onChange(value) {
            setAttributes({
              showTags: value
            });
          }
        }), showTags !== 'hide' && /*#__PURE__*/React.createElement(SelectControl, {
          value: showTagsFor,
          options: DISPLAY_FOR,
          onChange: function onChange(value) {
            setAttributes({
              showTagsFor: value
            });
          },
          className: "advgb-child-select"
        })), !INBUILT_POST_TYPES.includes(postType) && taxonomyList && taxonomyList.length > 0 && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(FormTokenField, {
          multiple: true,
          suggestions: taxonomyList && taxonomyList.length > 0 && taxonomyList.map(function (tax) {
            return decodeEntities(tax.name);
          }),
          value: showCustomTaxList,
          label: __('Display these taxonomies', 'advanced-gutenberg'),
          onChange: function onChange(value) {
            _this4.selectTaxonomies(value);
          }
        }), showCustomTaxList.length > 0 && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(SelectControl, {
          value: showCustomTaxListFor,
          options: DISPLAY_FOR,
          onChange: function onChange(value) {
            setAttributes({
              showCustomTaxListFor: value
            });
          },
          className: "advgb-child-select"
        }), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Link above taxonomies', 'advanced-gutenberg'),
          checked: linkCustomTax,
          onChange: function onChange() {
            return setAttributes({
              linkCustomTax: !linkCustomTax
            });
          },
          className: "advgb-child-toggle"
        }))), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Display Read More Link', 'advanced-gutenberg'),
          checked: displayReadMore,
          onChange: function onChange() {
            return setAttributes({
              displayReadMore: !displayReadMore
            });
          }
        }), displayReadMore && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(SelectControl, {
          value: displayReadMoreFor,
          options: DISPLAY_FOR,
          onChange: function onChange(value) {
            setAttributes({
              displayReadMoreFor: value
            });
          },
          className: "advgb-child-select"
        }), /*#__PURE__*/React.createElement(TextControl, {
          label: __('Read more text', 'advanced-gutenberg'),
          value: readMoreLbl,
          onChange: function onChange(value) {
            return setAttributes({
              readMoreLbl: value
            });
          },
          className: "advgb-child-select"
        })), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Display Post Excerpt', 'advanced-gutenberg'),
          checked: displayExcerpt,
          onChange: function onChange() {
            return setAttributes({
              displayExcerpt: !displayExcerpt
            });
          }
        }), displayExcerpt && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(SelectControl, {
          value: displayExcerptFor,
          options: DISPLAY_FOR,
          onChange: function onChange(value) {
            setAttributes({
              displayExcerptFor: value
            });
          },
          className: "advgb-child-select"
        }), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('First Post text as Excerpt', 'advanced-gutenberg'),
          help: __('Display some part of first text found in post as excerpt.', 'advanced-gutenberg'),
          checked: postTextAsExcerpt,
          onChange: function onChange() {
            return setAttributes({
              postTextAsExcerpt: !postTextAsExcerpt
            });
          },
          className: "advgb-child-toggle"
        }), postTextAsExcerpt && /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Post Text Excerpt length', 'advanced-gutenberg'),
          min: 50,
          max: 300,
          value: postTextExcerptLength,
          onChange: function onChange(value) {
            return setAttributes({
              postTextExcerptLength: value
            });
          },
          className: "advgb-child-range"
        })), /*#__PURE__*/React.createElement(TextareaControl, {
          label: __('Text after title', 'advanced-gutenberg'),
          help: __('Include text/HTML after title', 'advanced-gutenberg'),
          value: textAfterTitle,
          onChange: function onChange(value) {
            return setAttributes({
              textAfterTitle: value
            });
          }
        }), /*#__PURE__*/React.createElement(TextareaControl, {
          label: __('Text before read more', 'advanced-gutenberg'),
          help: __('Include text/HTML before read more', 'advanced-gutenberg'),
          value: textBeforeReadmore,
          onChange: function onChange(value) {
            return setAttributes({
              textBeforeReadmore: value
            });
          }
        })), /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Info Section Layout', 'advanced-gutenberg'),
          className: "advgb-pro-icon",
          initialOpen: false
        }, /*#__PURE__*/React.createElement(React.Fragment, null, this.isPro() ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Info Section Order', 'advanced-gutenberg'),
          value: infoSectionOrder.join(','),
          options: [{
            label: __('Author, Date, Comments', 'advanced-gutenberg'),
            value: 'author,date,comments'
          }, {
            label: __('Date, Author, Comments', 'advanced-gutenberg'),
            value: 'date,author,comments'
          }, {
            label: __('Author, Comments, Date', 'advanced-gutenberg'),
            value: 'author,comments,date'
          }, {
            label: __('Date, Comments, Author', 'advanced-gutenberg'),
            value: 'date,comments,author'
          }, {
            label: __('Comments, Author, Date', 'advanced-gutenberg'),
            value: 'comments,author,date'
          }, {
            label: __('Comments, Date, Author', 'advanced-gutenberg'),
            value: 'comments,date,author'
          }],
          onChange: function onChange(value) {
            return setAttributes({
              infoSectionOrder: value.split(',')
            });
          }
        }), /*#__PURE__*/React.createElement(TextControl, {
          label: __('Info Separator', 'advanced-gutenberg'),
          value: infoSectionSeparator,
          onChange: function onChange(value) {
            return setAttributes({
              infoSectionSeparator: value
            });
          },
          placeholder: __('Space', 'advanced-gutenberg'),
          help: __('Character(s) to separate info items', 'advanced-gutenberg')
        }), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Hide Separators', 'advanced-gutenberg'),
          checked: hideInfoSeparators,
          onChange: function onChange() {
            return setAttributes({
              hideInfoSeparators: !hideInfoSeparators
            });
          }
        }), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Remove Date Separator', 'advanced-gutenberg'),
          checked: removeDateTimeSeparator,
          onChange: function onChange() {
            return setAttributes({
              removeDateTimeSeparator: !removeDateTimeSeparator
            });
          },
          help: __('Removes the automatic dash before date when not first element', 'advanced-gutenberg')
        })) : /*#__PURE__*/React.createElement("div", {
          className: "advgb-promo-overlay-area"
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-blur"
        }, /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Info Section Order', 'advanced-gutenberg'),
          value: infoSectionOrder.join(','),
          options: [{
            label: __('Author, Date, Comments', 'advanced-gutenberg'),
            value: 'author,date,comments'
          }, {
            label: __('Date, Author, Comments', 'advanced-gutenberg'),
            value: 'date,author,comments'
          }, {
            label: __('Author, Comments, Date', 'advanced-gutenberg'),
            value: 'author,comments,date'
          }, {
            label: __('Date, Comments, Author', 'advanced-gutenberg'),
            value: 'date,comments,author'
          }, {
            label: __('Comments, Author, Date', 'advanced-gutenberg'),
            value: 'comments,author,date'
          }, {
            label: __('Comments, Date, Author', 'advanced-gutenberg'),
            value: 'comments,date,author'
          }]
        }), /*#__PURE__*/React.createElement(TextControl, {
          label: __('Info Separator', 'advanced-gutenberg'),
          value: infoSectionSeparator,
          placeholder: __('Space', 'advanced-gutenberg'),
          help: __('Character(s) to separate info items', 'advanced-gutenberg')
        }), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Hide Separators', 'advanced-gutenberg'),
          checked: hideInfoSeparators
        }), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Remove Date Separator', 'advanced-gutenberg'),
          checked: removeDateTimeSeparator,
          help: __('Removes the automatic dash before date when not first element', 'advanced-gutenberg')
        })), /*#__PURE__*/React.createElement("div", {
          className: "advgb-pro-overlay-wrap"
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-pro-overlay-text advgb-tooltips ppb-tooltips-library click",
          "data-toggle": "ppbtooltip",
          "data-placement": "top"
        }, /*#__PURE__*/React.createElement("span", {
          className: "advgb-promo-text"
        }, __('Pro', 'advanced-gutenberg')), /*#__PURE__*/React.createElement("span", {
          className: "tooltip-text"
        }, /*#__PURE__*/React.createElement("p", null, __('PublishPress Blocks Pro supports reorder of Author, Date, Comments, changing or hidding their separators.', 'advanced-gutenberg')), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("a", {
          className: "clickable",
          href: "https://publishpress.com/links/blocks-menu",
          target: "_blank"
        }, __('Upgrade to Pro', 'advanced-gutenberg'))), /*#__PURE__*/React.createElement("i", null))))))))), this.isPro() ? /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Reorder Sections', 'advanced-gutenberg'),
          initialOpen: false,
          className: "advgb-pro-icon"
        }, /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Sections order', 'advanced-gutenberg'),
          help: __('When the image in desktop floats next to the content, or is displayed as background, the image order is ignored. Also the image order in mobile can be ignored for some views.', 'advanced-gutenberg'),
          value: orderSections,
          options: ORDER_SECTIONS,
          onChange: function onChange(value) {
            return setAttributes({
              orderSections: value
            });
          }
        })), /*#__PURE__*/React.createElement(React.Fragment, null)) : /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Reorder Sections', 'advanced-gutenberg'),
          initialOpen: false,
          className: "advgb-pro-icon"
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-promo-overlay-area"
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-blur"
        }, /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Sections order', 'advanced-gutenberg'),
          help: __('When the image in desktop floats next to the content, or is displayed as background, the image order is ignored. Also the image order in mobile can be ignored for some views.', 'advanced-gutenberg'),
          value: "",
          options: ORDER_SECTIONS
        })), /*#__PURE__*/React.createElement("div", {
          className: "advgb-pro-overlay-wrap"
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-pro-overlay-text advgb-tooltips ppb-tooltips-library click",
          "data-toggle": "ppbtooltip",
          "data-placement": "top"
        }, /*#__PURE__*/React.createElement("span", {
          className: "advgb-promo-text"
        }, __('Pro', 'advanced-gutenberg')), /*#__PURE__*/React.createElement("span", {
          className: "tooltip-text"
        }, /*#__PURE__*/React.createElement("p", null, __('PublishPress Blocks Pro supports reordering the items in the display.', 'advanced-gutenberg')), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("a", {
          className: "clickable",
          href: "https://publishpress.com/links/blocks-menu",
          target: "_blank"
        }, __('Upgrade to Pro', 'advanced-gutenberg'))), /*#__PURE__*/React.createElement("i", null)))))), /*#__PURE__*/React.createElement(React.Fragment, null)));
        var hasPosts = Array.isArray(recentPosts) && recentPosts.length;

        // If no posts found we show this notice
        if (!hasPosts) {
          return isPreview ? /*#__PURE__*/React.createElement("img", {
            alt: __('Content Display', 'advanced-gutenberg'),
            width: "100%",
            src: previewImageData
          }) : /*#__PURE__*/React.createElement(Fragment, null, inspectorControls, /*#__PURE__*/React.createElement(Placeholder, {
            icon: advRecentPostsBlockIcon,
            label: __('Content Display Block', 'advanced-gutenberg')
          }, !Array.isArray(recentPosts) ? /*#__PURE__*/React.createElement(Spinner, null) : __('No posts found! Try to change filters or publish posts.', 'advanced-gutenberg')));
        }
        var postViewControls = [{
          icon: 'grid-view',
          title: __('Grid View', 'advanced-gutenberg'),
          onClick: function onClick() {
            return setAttributes({
              postView: 'grid'
            });
          },
          isActive: postView === 'grid'
        }, {
          icon: 'list-view',
          title: __('List View', 'advanced-gutenberg'),
          onClick: function onClick() {
            return setAttributes({
              postView: 'list'
            });
          },
          isActive: postView === 'list'
        }, {
          icon: 'slides',
          title: __('Slider View', 'advanced-gutenberg'),
          onClick: function onClick() {
            return setAttributes({
              postView: 'slider'
            });
          },
          isActive: postView === 'slider'
        }, {
          icon: 'table-row-before',
          title: __('Frontpage View', 'advanced-gutenberg'),
          onClick: function onClick() {
            return setAttributes({
              postView: 'frontpage'
            });
          },
          isActive: postView === 'frontpage'
        }, {
          icon: 'admin-site-alt3',
          title: __('Newspaper View', 'advanced-gutenberg'),
          onClick: function onClick() {
            setAttributes({
              postView: 'newspaper'
            });
            _this4.newspaperOnChangeLayout(newspaperLayout);
          },
          isActive: postView === 'newspaper'
        }, {
          icon: 'tagcloud',
          title: __('Masonry View', 'advanced-gutenberg'),
          onClick: function onClick() {
            return setAttributes({
              postView: 'masonry'
            });
          },
          isActive: postView === 'masonry'
        }];
        var blockClassName = [id, 'advgb-recent-posts-block', this.state.updating && 'loading', postView && postView + '-view', postView === 'list' && imagePosition !== 'left' && 'image-' + imagePosition, (postView === 'grid' || postView === 'masonry') && 'columns-' + columns, postView === 'masonry' && 'tbl-columns-' + columnsT + ' ' + 'mbl-columns-' + columnsM, postView === 'slider' && sliderStyle && 'style-' + sliderStyle, postView === 'frontpage' && frontpageLayout && 'layout-' + frontpageLayout, postView === 'frontpage' && frontpageLayoutT && 'tbl-layout-' + frontpageLayoutT, postView === 'frontpage' && frontpageLayoutM && 'mbl-layout-' + frontpageLayoutM, (postView === 'frontpage' || postView === 'masonry') && gap && 'gap-' + gap, postView === 'frontpage' && frontpageStyle && 'style-' + frontpageStyle, postView === 'newspaper' && newspaperLayout && 'layout-' + newspaperLayout, advgbBlocks.advgb_pro === '1' && orderSections && 'sections-' + orderSections, removeDateTimeSeparator && 'advgb-no-datetime-separator'].filter(Boolean).join(' ');
        return isPreview ? /*#__PURE__*/React.createElement("img", {
          alt: __('Content Display', 'advanced-gutenberg'),
          width: "100%",
          src: previewImageData
        }) : /*#__PURE__*/React.createElement(Fragment, null, inspectorControls, /*#__PURE__*/React.createElement(BlockControls, null, /*#__PURE__*/React.createElement(ToolbarGroup, {
          controls: postViewControls
        }), /*#__PURE__*/React.createElement(ToolbarGroup, null, /*#__PURE__*/React.createElement(ToolbarButton, {
          icon: "update",
          label: __('Refresh', 'advanced-gutenberg'),
          onClick: function onClick() {
            return setAttributes({
              myToken: Math.floor(Math.random() * Math.floor(999))
            });
          }
        }))), /*#__PURE__*/React.createElement("div", {
          className: blockClassName
        }, this.state.updating && /*#__PURE__*/React.createElement("div", {
          className: "advgb-recent-posts-loading"
        }), /*#__PURE__*/React.createElement("div", {
          className: "advgb-recent-posts"
        }, recentPosts.map(function (post, index) {
          return /*#__PURE__*/React.createElement("article", {
            key: index,
            className: "advgb-recent-post ".concat(_this4.checkElementDisplay('image', index) && (post.featured_img || enablePlaceholderImage) ? "" : "advgb-recent-post--no-image")
          }, function () {
            if (_this4.checkElementDisplay('image', index) && (post.featured_img || enablePlaceholderImage) && _this4.getDisplayImageVsOrder(attributes, index) === 'ignore-order') {
              return /*#__PURE__*/React.createElement("div", {
                className: "advgb-post-thumbnail"
              }, /*#__PURE__*/React.createElement("a", {
                href: post.link,
                target: "_blank"
              }, /*#__PURE__*/React.createElement("img", {
                src: post.featured_img ? post.featured_img : advgbBlocks.post_thumb,
                alt: __('Post Image', 'advanced-gutenberg')
              }), displayFeaturedImageCaption && post.featured_img_caption.length > 0 && /*#__PURE__*/React.createElement("span", {
                class: "advgb-post-caption"
              }, post.featured_img_caption)));
            } else if (postView === 'frontpage' && frontpageStyle === 'headline' || postView === 'slider' && sliderStyle === 'headline' && _this4.getDisplayImageVsOrder(attributes, index) === 'ignore-order') {
              return /*#__PURE__*/React.createElement("div", {
                className: "advgb-post-thumbnail advgb-post-thumbnail-no-image"
              }, /*#__PURE__*/React.createElement("a", {
                href: post.link,
                target: "_blank"
              }));
            } else {
              {/* Nothing to do here */}
            }
          }(), /*#__PURE__*/React.createElement("div", {
            className: "advgb-post-wrapper"
          }, function () {
            if (_this4.checkElementDisplay('image', index) && (post.featured_img || enablePlaceholderImage) && _this4.getDisplayImageVsOrder(attributes, index) === 'apply-order') {
              return /*#__PURE__*/React.createElement("div", {
                className: "advgb-post-thumbnail"
              }, /*#__PURE__*/React.createElement("a", {
                href: post.link,
                target: "_blank"
              }, /*#__PURE__*/React.createElement("img", {
                src: post.featured_img ? post.featured_img : advgbBlocks.post_thumb,
                alt: __('Post Image', 'advanced-gutenberg')
              }), displayFeaturedImageCaption && post.featured_img_caption.length > 0 && /*#__PURE__*/React.createElement("span", {
                class: "advgb-post-caption"
              }, post.featured_img_caption)));
            }
          }(), /*#__PURE__*/React.createElement("h2", {
            className: "advgb-post-title"
          }, /*#__PURE__*/React.createElement("a", {
            href: post.link,
            target: "_blank"
          }, decodeEntities(post.title.rendered))), textAfterTitle && /*#__PURE__*/React.createElement(RawHTML, {
            className: "advgb-text-after-title"
          }, textAfterTitle), (_this4.checkElementDisplay('author', index) && (post.coauthors && post.coauthors.length > 0 || !post.coauthors || post.coauthors.length === 0) || _this4.checkElementDisplay('date', index) || postType === 'post' && _this4.checkElementDisplay('comments', index)) && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
            className: "advgb-post-info"
          }, _this4.renderInfoSections(post, index))), (_this4.checkElementDisplay('categories', index) && post.tax_additional && post.tax_additional.categories || _this4.checkElementDisplay('tags', index) && post.tax_additional && post.tax_additional.tags || !INBUILT_POST_TYPES.includes(postType) && post.tax_additional && _this4.checkElementDisplay('customtax', index)) && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
            className: "advgb-post-tax-info"
          }, _this4.checkElementDisplay('categories', index) && post.tax_additional && post.tax_additional.categories && /*#__PURE__*/React.createElement("div", {
            className: "advgb-post-tax advgb-post-category"
          }, showCategories === 'show' && post.tax_additional.categories.unlinked.map(function (cat, index) {
            return /*#__PURE__*/React.createElement(RawHTML, null, cat);
          }), showCategories === 'link' && post.tax_additional.categories.linked.map(function (cat, index) {
            return /*#__PURE__*/React.createElement(RawHTML, null, cat);
          })), _this4.checkElementDisplay('tags', index) && post.tax_additional && post.tax_additional.tags && /*#__PURE__*/React.createElement("div", {
            className: "advgb-post-tax advgb-post-tag"
          }, showTags === 'show' && post.tax_additional.tags.unlinked.map(function (tag, index) {
            return /*#__PURE__*/React.createElement(RawHTML, null, tag);
          }), showTags === 'link' && post.tax_additional.tags.linked.map(function (tag, index) {
            return /*#__PURE__*/React.createElement(RawHTML, null, tag);
          })), !INBUILT_POST_TYPES.includes(postType) && post.tax_additional && _this4.getTaxSlugs().map(function (taxSlug) {
            return /*#__PURE__*/React.createElement("div", {
              className: "advgb-post-tax advgb-post-cpt advgb-post-" + taxSlug
            }, !linkCustomTax && post.tax_additional[taxSlug] && post.tax_additional[taxSlug].unlinked.map(function (tag, index) {
              return /*#__PURE__*/React.createElement(RawHTML, null, tag);
            }), linkCustomTax && post.tax_additional[taxSlug] && post.tax_additional[taxSlug].linked.map(function (tag, index) {
              return /*#__PURE__*/React.createElement(RawHTML, null, tag);
            }));
          }))), /*#__PURE__*/React.createElement("div", {
            className: "advgb-post-content"
          }, _this4.checkElementDisplay('excerpt', index) && /*#__PURE__*/React.createElement("div", {
            className: "advgb-post-excerpt",
            dangerouslySetInnerHTML: {
              __html: postTextAsExcerpt ? RecentPostsEdit.extractContent(post.content.rendered, postTextExcerptLength) : post.excerpt ? post.excerpt.raw : ''
            }
          }), textBeforeReadmore && /*#__PURE__*/React.createElement("div", {
            className: "advgb-text-before-readmore"
          }, /*#__PURE__*/React.createElement(RawHTML, null, textBeforeReadmore)), _this4.checkElementDisplay('readmore', index) && /*#__PURE__*/React.createElement("div", {
            className: "advgb-post-readmore"
          }, /*#__PURE__*/React.createElement("a", {
            href: post.link,
            target: "_blank"
          }, readMoreLbl ? readMoreLbl : __('Read More', 'advanced-gutenberg'))))));
        }))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("style", null, ".".concat(id, ".advgb-recent-posts-block.style-headline .advgb-recent-posts .advgb-recent-post .advgb-post-thumbnail {\n                                background: ").concat(imageOverlayColor, ";\n                            }\n                            .").concat(id, ".advgb-recent-posts-block.style-headline .advgb-recent-posts .advgb-recent-post .advgb-post-thumbnail a img {\n                                opacity: ").concat(imageOpacity, ";\n                            }"))));
      }

      /**
       * Get current include/exclude posts merged with the ones from search
       */
    }, {
      key: "getMergedPosts",
      value: function getMergedPosts() {
        var _this$props5 = this.props,
          postsToSearch = _this$props5.postsToSearch,
          postsToSearchResolved = _this$props5.postsToSearchResolved,
          postsToInclude = _this$props5.postsToInclude,
          postsToIncludeResolved = _this$props5.postsToIncludeResolved,
          postsToExclude = _this$props5.postsToExclude,
          postsToExcludeResolved = _this$props5.postsToExcludeResolved;
        var mergedPosts = null;
        if (postsToSearchResolved && !postsToIncludeResolved && !postsToExcludeResolved) {
          // Get only searchString
          mergedPosts = postsToSearch;
        } else if (postsToSearchResolved && postsToIncludeResolved && !postsToExcludeResolved) {
          // Get searchString and includePosts
          mergedPosts = postsToSearch.concat(postsToInclude);
        } else if (postsToSearchResolved && !postsToIncludeResolved && postsToExcludeResolved) {
          // Get searchString and excludePosts
          mergedPosts = postsToSearch.concat(postsToExclude);
        } else if (!postsToSearchResolved && postsToIncludeResolved && !postsToExcludeResolved) {
          // Get only includePosts
          mergedPosts = postsToInclude;
        } else if (!postsToSearchResolved && !postsToIncludeResolved && postsToExcludeResolved) {
          // Get only excludePosts
          mergedPosts = postsToExclude;
        } else {
          // Nothing to do here. mergedPosts is null
        }
        return mergedPosts;
      }

      /**
       * Get post titles for include and exclude
       */
    }, {
      key: "getPostSuggestions",
      value: function getPostSuggestions(posts, type) {
        var _this$props6 = this.props,
          postsToSearchResolved = _this$props6.postsToSearchResolved,
          postsToIncludeResolved = _this$props6.postsToIncludeResolved,
          postsToExcludeResolved = _this$props6.postsToExcludeResolved;
        if ('exclude' === type) {
          return posts !== null ? posts.map(function (post) {
            return post.title.raw;
          }) : [];
        } else if ('include' === type && this.isPro()) {
          return posts !== null && (postsToSearchResolved || postsToIncludeResolved) ? posts.map(function (post) {
            return post.title.raw;
          }) : [];
        } else {
          return null;
        }
      }
    }, {
      key: "selectCategories",
      value: function selectCategories(tokens) {
        var categoriesList = this.state.categoriesList;
        var hasNoSuggestion = tokens.some(function (token) {
          return typeof token === 'string' && !categoriesList[token];
        });
        if (hasNoSuggestion) {
          return;
        }
        var categories = tokens.map(function (token) {
          return typeof token === 'string' ? categoriesList[token] : token;
        });
        this.props.setAttributes({
          categories: categories
        });
      }
    }, {
      key: "selectTags",
      value: function selectTags(tokens) {
        var _this$state2 = this.state,
          tagsList = _this$state2.tagsList,
          tagNameVsId = _this$state2.tagNameVsId;
        var hasNoSuggestion = tokens.some(function (token) {
          return typeof token === 'string' && !tagNameVsId[token];
        });
        if (hasNoSuggestion) {
          return;
        }
        var tags = tokens.map(function (token) {
          return typeof token === 'string' && tagNameVsId[token] ? token : token;
        });
        var tagIds = tokens.map(function (token) {
          return typeof token === 'string' ? tagNameVsId[token] : token.id;
        });
        this.props.setAttributes({
          tags: tags,
          tagIds: tagIds
        });
      }
    }, {
      key: "getTagIdsForTags",
      value: function getTagIdsForTags(tags) {
        var tagNameVsId = this.state.tagNameVsId;
        return tags.map(function (tag) {
          return tagNameVsId[tag];
        });
      }
    }, {
      key: "getCategoryForBkwrdCompat",
      value: function getCategoryForBkwrdCompat(id) {
        var catIdVsName = this.state.catIdVsName;
        return {
          id: id,
          name: catIdVsName[id]
        };
      }
    }, {
      key: "getPostTitles",
      value: function getPostTitles(posts, postsToSelect) {
        var field_value = [];
        if (typeof posts !== 'undefined' && postsToSelect !== null) {
          field_value = posts.map(function (post_id) {
            var find_post = postsToSelect.find(function (post) {
              return post.id === post_id;
            });
            if (find_post === undefined || !find_post) {
              return post_id; // It should return false but creates empty selections
            }
            return find_post.title.raw;
          });
        }
        return field_value;
      }
    }, {
      key: "getPostIds",
      value: function getPostIds(posts, postsToSelect, type) {
        var posts_array = [];
        posts.map(function (post_title) {
          var matching_post = postsToSelect.find(function (post) {
            return post.title.raw === post_title;
          });
          if (matching_post !== undefined) {
            posts_array.push(matching_post.id);
          }
        });
        var selectType = type + 'Posts';
        this.props.setAttributes(_defineProperty({}, selectType, posts_array));
        if ('include' === type) {
          this.props.setAttributes({
            excludePosts: [],
            showCustomTaxList: [],
            taxonomies: {},
            categories: [],
            tags: [],
            author: '',
            onlyFromCurrentUser: false,
            offset: 0
          });
        }
      }
    }, {
      key: "handlePostIdsInput",
      value: function handlePostIdsInput(value) {
        this.setState({
          postIdsInputValue: value
        });
        if (!value || value.trim() === '') {
          this.props.setAttributes({
            includePosts: []
          });
          return;
        }
        var ids = value.split(',').map(function (id) {
          return parseInt(id.trim());
        }).filter(function (id) {
          return !isNaN(id) && id > 0;
        });
        this.props.setAttributes({
          includePosts: ids
        });
        this.props.setAttributes({
          excludePosts: [],
          showCustomTaxList: [],
          taxonomies: {},
          categories: [],
          tags: [],
          author: '',
          onlyFromCurrentUser: false,
          offset: 0
        });
      }
    }, {
      key: "selectPostByTitle",
      value: function selectPostByTitle(tokens, type) {
        var postTitleVsIdMap = this.state.postTitleVsIdMap;
        var hasNoSuggestion = tokens.some(function (token) {
          return typeof token === 'string' && (typeof postTitleVsIdMap === 'undefined' || !postTitleVsIdMap[token]);
        });
        if (hasNoSuggestion) {
          return;
        }
        var ids = tokens.map(function (token) {
          return typeof token === 'string' ? postTitleVsIdMap[token] : token.id;
        });
        var typeForQuery = type + 'Ids';
        this.props.setAttributes(_defineProperty(_defineProperty({}, type, tokens), typeForQuery, ids));

        // Exclude posts, backward compatibility 2.13.1 and lower
        this.props.setAttributes({
          exclude: [],
          excludeIds: [],
          excludePosts: ids
        });
      }
    }, {
      key: "updatePostType",
      value: function updatePostType(postType) {
        this.setState({
          taxonomyList: null
        });
        this.generateTaxFilters(postType);
        this.props.setAttributes({
          postType: postType,
          excludePosts: [],
          includePosts: [],
          offset: 0,
          showCustomTaxList: [],
          taxonomies: {},
          categories: []
        });
      }

      /* Check if PP Series plugin is active and enabled for current postType or if is a CPT to call sidebar filters  */
    }, {
      key: "generateTaxFilters",
      value: function generateTaxFilters(postType) {
        if (typeof advgbBlocks.pp_series_active !== 'undefined' && parseInt(advgbBlocks.pp_series_active) && (postType === 'post' || postType === 'page') && PP_SERIES_POST_TYPES.includes(postType)) {
          // Enable PublishPress Series taxonomy filter in post/page when enabled through Series plugin
          this.generateSeriesTax(postType);
        } else if (!INBUILT_POST_TYPES.includes(postType)) {
          // Enable CPT taxonomy filters (may include Series taxonomy)
          this.generateTaxTerms(postType);
        } else {
          // Nothing to do here
        }
      }

      /**
       * Generates PublishPress Series taxonomy list for 'post' and sets it in the state as "taxonomyList".
       */
    }, {
      key: "generateSeriesTax",
      value: function generateSeriesTax(postType) {
        var _this5 = this;
        if (!postType) {
          return;
        }

        // fetch series taxonomy
        wp.apiFetch({
          path: wp.url.addQueryArgs("wp/v2/types/".concat(postType), {
            context: 'edit'
          })
        }).then(function (typeAttributes) {
          var taxonomy = [];
          var taxId = {};
          var seriesSlug = typeof advgbBlocks.pp_series_slug !== 'undefined' ? advgbBlocks.pp_series_slug : 'series';
          wp.apiFetch({
            path: wp.url.addQueryArgs("wp/v2/taxonomies/".concat(seriesSlug), {
              context: 'edit'
            })
          }).then(function (taxAttributes) {
            // fetch all terms
            wp.apiFetch({
              path: wp.url.addQueryArgs("wp/v2/".concat(taxAttributes.rest_base, "?per_page=-1&hide_empty=true"), {
                context: 'edit'
              })
            }).then(function (terms) {
              var suggestions = [];
              var map = [];
              terms.forEach(function (term) {
                suggestions.push(decodeEntities(term.name));
                map[decodeEntities(term.name)] = term.id;
              });
              var preselectedName = _this5.props.attributes.taxonomies ? _this5.props.attributes.taxonomies[seriesSlug] : [];
              if (preselectedName) {
                var preselectedId = preselectedName.map(function (name) {
                  return map[name];
                });
                set(taxId, seriesSlug, preselectedId);
                _this5.props.setAttributes({
                  taxIds: taxId
                });
              }
              taxonomy.push({
                slug: seriesSlug,
                name: decodeEntities(taxAttributes.name),
                suggestions: suggestions,
                map: map,
                hierarchical: taxAttributes.hierarchical
              });
              _this5.setState({
                updating: true
              });
              // length === 1 due we only get the series taxonomy
              if (taxonomy.length === 1) {
                _this5.setState({
                  taxonomyList: taxonomy,
                  updating: false
                });
              }
            });
          });
        });
      }

      /**
       * Generates taxonomy list for a post type and sets it in the state as "taxonomyList".
       */
    }, {
      key: "generateTaxTerms",
      value: function generateTaxTerms(postType) {
        var _this6 = this;
        if (!postType) {
          return;
        }

        // fetch all taxonomies
        wp.apiFetch({
          path: wp.url.addQueryArgs("wp/v2/types/".concat(postType), {
            context: 'edit'
          })
        }).then(function (typeAttributes) {
          var taxonomies = [];
          var taxIds = {};
          typeAttributes.taxonomies.forEach(function (tax) {
            // fetch taxonomy attributes
            wp.apiFetch({
              path: wp.url.addQueryArgs("wp/v2/taxonomies/".concat(tax), {
                context: 'edit'
              })
            }).then(function (taxAttributes) {
              // fetch all terms
              wp.apiFetch({
                path: wp.url.addQueryArgs("wp/v2/".concat(taxAttributes.rest_base, "?per_page=-1&hide_empty=true"), {
                  context: 'edit'
                })
              }).then(function (terms) {
                var suggestions = [];
                var map = [];
                terms.forEach(function (term) {
                  suggestions.push(decodeEntities(term.name));
                  map[decodeEntities(term.name)] = term.id;
                });
                var preselectedNames = _this6.props.attributes.taxonomies ? _this6.props.attributes.taxonomies[tax] : [];
                if (preselectedNames) {
                  var preselectedIds = preselectedNames.map(function (name) {
                    return map[name];
                  });
                  set(taxIds, tax, preselectedIds);
                  _this6.props.setAttributes({
                    taxIds: taxIds
                  });
                }
                taxonomies.push({
                  slug: tax,
                  name: decodeEntities(taxAttributes.name),
                  suggestions: suggestions,
                  map: map,
                  hierarchical: taxAttributes.hierarchical
                });
                _this6.setState({
                  updating: true
                });
                if (typeAttributes.taxonomies.length === taxonomies.length) {
                  // set state only when all taxonomies have been fetched
                  // otherwise the taxonomy boxes will appear one at a time making the page jittery
                  // we will sort the taxonomies so that the boxes are always in a predictable, consistent order
                  _this6.setState({
                    taxonomyList: sortBy(taxonomies, ['slug']),
                    updating: false
                  });
                }
              });
            });
          });
        });
      }

      /**
       * Populates the taxonomy terms in the suggestions box.
       */
    }, {
      key: "populateTaxTerms",
      value: function populateTaxTerms(tax) {
        var taxonomies = this.props.attributes.taxonomies;
        return taxonomies && taxonomies[tax.slug];
      }

      /**
       * Selects the correct the taxonomy term from the suggestions and updates the "taxonomies" attribute.
       */
    }, {
      key: "selectTaxTerms",
      value: function selectTaxTerms(tax, tokens) {
        var hasNoSuggestion = tokens.some(function (token) {
          return typeof token === 'string' && !tax.map[token];
        });
        if (hasNoSuggestion) {
          return;
        }
        var suggestions = tokens.map(function (token) {
          return typeof token === 'string' && tax.map[token] ? token : token;
        });
        var ids = tokens.map(function (token) {
          return typeof token === 'string' ? tax.map[token] : token.id;
        });
        var taxonomies = this.props.attributes.taxonomies || {};
        unset(taxonomies, tax.slug);
        if (suggestions) {
          set(taxonomies, tax.slug, suggestions);
        }
        var taxIds = this.props.attributes.taxIds || {};
        unset(taxIds, tax.slug);
        if (ids) {
          set(taxIds, tax.slug, ids);
        }
        this.props.setAttributes(_defineProperty(_defineProperty({
          taxonomies: taxonomies
        }, tax.slug, suggestions), "taxIds", taxIds));
      }

      /**
       * Selects the correct taxonomy from the suggestions and updates the "showCustomTaxList" attribute.
       */
    }, {
      key: "selectTaxonomies",
      value: function selectTaxonomies(tokens) {
        var taxonomyList = this.state.taxonomyList;
        if (!taxonomyList) {
          return;
        }
        var taxList = taxonomyList && taxonomyList.length > 0 && taxonomyList.map(function (tax) {
          return decodeEntities(tax.name);
        });
        var hasNoSuggestion = tokens.some(function (token) {
          return typeof token === 'string' && !taxList.includes(token);
        });
        if (hasNoSuggestion) {
          return;
        }
        var taxes = tokens.map(function (token) {
          return typeof token === 'string' && taxList[token] ? token : token;
        });
        this.props.setAttributes({
          showCustomTaxList: taxes
        });
      }

      /**
       * Returns the tax slugs corresponding to the tax names that appear in the suggestions.
       */
    }, {
      key: "getTaxSlugs",
      value: function getTaxSlugs() {
        var taxonomyList = this.state.taxonomyList;
        var showCustomTaxList = this.props.attributes.showCustomTaxList;
        if (!taxonomyList || !showCustomTaxList || showCustomTaxList.length === 0) {
          return [];
        }
        var slugs = showCustomTaxList.map(function (taxName) {
          var tax = find(taxonomyList, {
            name: decodeEntities(taxName)
          });
          if (tax) {
            return tax.slug;
          }
        });
        return slugs;
      }

      /**
       * Check if elementFor is within the index range.
       */
    }, {
      key: "checkElementForDisplay",
      value: function checkElementForDisplay(elementFor, index) {
        return elementFor === 'all' || index < elementFor;
      }

      /**
       * Check if an element is enabled for each post.
       */
    }, {
      key: "checkElementDisplay",
      value: function checkElementDisplay(element, index) {
        var _this$props$attribute = this.props.attributes,
          displayFeaturedImage = _this$props$attribute.displayFeaturedImage,
          displayFeaturedImageFor = _this$props$attribute.displayFeaturedImageFor,
          displayAuthor = _this$props$attribute.displayAuthor,
          displayAuthorFor = _this$props$attribute.displayAuthorFor,
          displayReadMore = _this$props$attribute.displayReadMore,
          displayReadMoreFor = _this$props$attribute.displayReadMoreFor,
          displayExcerpt = _this$props$attribute.displayExcerpt,
          displayExcerptFor = _this$props$attribute.displayExcerptFor,
          displayCommentCount = _this$props$attribute.displayCommentCount,
          displayCommentCountFor = _this$props$attribute.displayCommentCountFor,
          postDate = _this$props$attribute.postDate,
          postDateFor = _this$props$attribute.postDateFor,
          showCategories = _this$props$attribute.showCategories,
          showCategoriesFor = _this$props$attribute.showCategoriesFor,
          showTags = _this$props$attribute.showTags,
          showTagsFor = _this$props$attribute.showTagsFor,
          showCustomTaxList = _this$props$attribute.showCustomTaxList,
          showCustomTaxListFor = _this$props$attribute.showCustomTaxListFor;
        switch (element) {
          case 'image':
            return displayFeaturedImage && this.checkElementForDisplay(displayFeaturedImageFor, index);
          case 'author':
            return displayAuthor && this.checkElementForDisplay(displayAuthorFor, index);
            // removed by dead control flow

          case 'readmore':
            return displayReadMore && this.checkElementForDisplay(displayReadMoreFor, index);
            // removed by dead control flow

          case 'excerpt':
            return displayExcerpt && this.checkElementForDisplay(displayExcerptFor, index);
            // removed by dead control flow

          case 'comments':
            return displayCommentCount && this.checkElementForDisplay(displayCommentCountFor, index);
            // removed by dead control flow

          case 'date':
            return postDate !== 'hide' && this.checkElementForDisplay(postDateFor, index);
            // removed by dead control flow

          case 'categories':
            return showCategories !== 'hide' && this.checkElementForDisplay(showCategoriesFor, index);
            // removed by dead control flow

          case 'tags':
            return showTags !== 'hide' && this.checkElementForDisplay(showTagsFor, index);
            // removed by dead control flow

          case 'customtax':
            return this.getTaxSlugs().length > 0 && this.checkElementForDisplay(showCustomTaxListFor, index);
            // removed by dead control flow

          default:
            return false;
            // removed by dead control flow

        }
      }

      // Skip images floating on left or right, and with headline style
    }, {
      key: "getDisplayImageVsOrder",
      value: function getDisplayImageVsOrder(attributes, index) {
        if (attributes.orderSections === 'default' || attributes.orderSections === 'image-title-info-text' || attributes.postView === 'frontpage' && attributes.frontpageStyle === 'headline' || attributes.postView === 'slider' && attributes.sliderStyle === 'headline' || attributes.postView === 'list' || attributes.postView === 'newspaper' && (['np-2', 'np-3-1', 'np-3-2', 'np-3-3'].indexOf(attributes.newspaperLayout) > -1 || index > 0) || advgbBlocks.advgb_pro === '0') {
          return 'ignore-order';
        } else {
          return 'apply-order';
        }
      }
    }, {
      key: "refreshOnChangeItems",
      value: function refreshOnChangeItems(numberOfPosts) {
        var _this$props$attribute2 = this.props.attributes,
          postView = _this$props$attribute2.postView,
          myToken = _this$props$attribute2.myToken;
        this.props.setAttributes({
          numberOfPosts: numberOfPosts
        });
        if (postView === 'masonry') {
          this.props.setAttributes({
            myToken: Math.floor(Math.random() * Math.floor(999))
          });
        }
      }
    }, {
      key: "newspaperOnChangeLayout",
      value: function newspaperOnChangeLayout(newspaperLayout) {
        var numberOfPosts = this.props.attributes.numberOfPosts;
        var currentLayout = NEWSPAPER_LAYOUTS.find(function (layout) {
          return layout.layout === newspaperLayout;
        });
        this.props.setAttributes({
          numberOfPosts: currentLayout.items
        });
      }
    }, {
      key: "getDateTime",
      value: function getDateTime(post) {
        var _this$props$attribute3 = this.props.attributes,
          postDate = _this$props$attribute3.postDate,
          postDateFormat = _this$props$attribute3.postDateFormat,
          displayTime = _this$props$attribute3.displayTime,
          customDateFormat = _this$props$attribute3.customDateFormat,
          showDatePrefix = _this$props$attribute3.showDatePrefix,
          absoluteDateCreatedPrefix = _this$props$attribute3.absoluteDateCreatedPrefix,
          absoluteDateUpdatedPrefix = _this$props$attribute3.absoluteDateUpdatedPrefix,
          relativeDateCreatedPrefix = _this$props$attribute3.relativeDateCreatedPrefix,
          relativeDateUpdatedPrefix = _this$props$attribute3.relativeDateUpdatedPrefix;
        var escapeRegex = function escapeRegex(str) {
          return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
        };
        if (postDateFormat === 'absolute') {
          if (customDateFormat && customDateFormat.trim() !== '') {
            var dateValue = postDate === 'created' ? dateI18n(customDateFormat, post.date) : dateI18n(customDateFormat, post.modified);
            if (showDatePrefix) {
              var prefix = postDate === 'created' ? absoluteDateCreatedPrefix || __('Posted on', 'advanced-gutenberg') : absoluteDateUpdatedPrefix || __('Updated on', 'advanced-gutenberg');
              return prefix + ' ' + dateValue;
            }
            return dateValue;
          }
          var dateText;
          if (postDate === 'created') {
            dateText = displayTime ? post.absolute_dates_time.created : post.absolute_dates.created;
          } else {
            dateText = displayTime ? post.absolute_dates_time.modified : post.absolute_dates.modified;
          }
          if (showDatePrefix) {
            var currentPrefix = postDate === 'created' ? __('Posted on', 'advanced-gutenberg') : __('Updated on', 'advanced-gutenberg');
            var newPrefix = postDate === 'created' ? absoluteDateCreatedPrefix || __('Posted on', 'advanced-gutenberg') : absoluteDateUpdatedPrefix || __('Updated on', 'advanced-gutenberg');
            dateText = dateText.replace(currentPrefix, newPrefix);
          } else {
            var postedPrefix = __('Posted on', 'advanced-gutenberg');
            var updatedPrefix = __('Updated on', 'advanced-gutenberg');
            var regex = new RegExp("^(".concat(escapeRegex(postedPrefix), "|").concat(escapeRegex(updatedPrefix), ")\\s+"));
            dateText = dateText.replace(regex, '');
          }
          return dateText;
        } else {
          var relativeText = postDate === 'created' ? post.relative_dates.created : post.relative_dates.modified;
          if (showDatePrefix) {
            var _currentPrefix = postDate === 'created' ? __('Posted', 'advanced-gutenberg') : __('Updated', 'advanced-gutenberg');
            var _newPrefix = postDate === 'created' ? relativeDateCreatedPrefix || __('Posted', 'advanced-gutenberg') : relativeDateUpdatedPrefix || __('Updated', 'advanced-gutenberg');
            relativeText = relativeText.replace(_currentPrefix, _newPrefix);
          } else {
            var relativePostedPrefix = __('Posted', 'advanced-gutenberg');
            var relativeUpdatedPrefix = __('Updated', 'advanced-gutenberg');
            var elativeRegex = new RegExp("^(".concat(escapeRegex(relativePostedPrefix), "|").concat(escapeRegex(relativeUpdatedPrefix), ")\\s+"));
            relativeText = relativeText.replace(elativeRegex, '');
          }
          return relativeText;
        }
      }
    }], [{
      key: "extractContent",
      value: function extractContent(html, length) {
        var span = document.createElement('span');
        span.innerHTML = html;

        // Remove script tag
        var scripts = span.getElementsByTagName('script');
        var j = scripts.length;
        while (j--) {
          scripts[j].parentNode.removeChild(scripts[j]);
        }

        // Remove style tag
        var styles = span.getElementsByTagName('style');
        var k = styles.length;
        while (k--) {
          styles[k].parentNode.removeChild(styles[k]);
        }

        // Remove PublishPress Series box
        var seriesbox = span.getElementsByClassName('seriesmeta');
        if (seriesbox.length === 1) {
          seriesbox[0].parentNode.removeChild(seriesbox[0]);
        }
        var children = span.querySelectorAll('*');
        for (var i = 0; i < children.length; i++) {
          if (children[i].textContent) children[i].textContent += ' ';else children[i].innerText += ' ';
        }
        var text = [span.textContent || span.innerText].toString().replace(/\s\s+/g, ' ');
        text = text.slice(0, length).trim();
        if (text.length) text += '…';
        return text;
      }
    }]);
  }(Component);
  registerBlockType('advgb/recent-posts', {
    apiVersion: 3,
    title: __('Content Display - PublishPress', 'advanced-gutenberg'),
    description: __('Displays your content in grid, list, slider, frontpage, newspaper, and masonry views with beautiful layouts and styles.', 'advanced-gutenberg'),
    icon: {
      src: advRecentPostsBlockIcon,
      foreground: typeof advgbBlocks !== 'undefined' ? advgbBlocks.color : undefined
    },
    category: 'advgb-category',
    keywords: [__('recent posts', 'advanced-gutenberg'), __('latest posts', 'advanced-gutenberg'), __('posts slide', 'advanced-gutenberg'), __('posts grid', 'advanced-gutenberg'), __('posts', 'advanced-gutenberg'), __('pages', 'advanced-gutenberg')],
    supports: {
      html: false
    },
    example: {
      attributes: {
        isPreview: true
      }
    },
    edit: withSelect(function (select, props) {
      var _select = select('core'),
        getEntityRecords = _select.getEntityRecords,
        hasFinishedResolution = _select.hasFinishedResolution;
      var _props$attributes = props.attributes,
        categories = _props$attributes.categories,
        tagIds = _props$attributes.tagIds,
        tags = _props$attributes.tags,
        category = _props$attributes.category,
        order = _props$attributes.order,
        orderBy = _props$attributes.orderBy,
        numberOfPosts = _props$attributes.numberOfPosts,
        myToken = _props$attributes.myToken,
        postType = _props$attributes.postType,
        excludeCurrentPost = _props$attributes.excludeCurrentPost,
        excludePosts = _props$attributes.excludePosts,
        includePosts = _props$attributes.includePosts,
        offset = _props$attributes.offset,
        author = _props$attributes.author,
        taxonomies = _props$attributes.taxonomies,
        taxIds = _props$attributes.taxIds,
        onlyFromCurrentUser = _props$attributes.onlyFromCurrentUser,
        searchString = _props$attributes.searchString;
      var catIds = categories && categories.length > 0 ? categories.map(function (cat) {
        return cat.id;
      }) : [];

      // We need to check if we're in post edit or widgets screen
      var postId = wp.data.select('core/editor') && wp.data.select('core/editor').getCurrentPostId();
      var recentPostsQuery = pickBy({
        categories: catIds,
        tags: tagIds,
        order: order,
        orderby: orderBy,
        per_page: numberOfPosts,
        token: myToken,
        exclude: excludeCurrentPost ? excludePosts ? union(excludePosts, [postId]) : postId : excludePosts,
        include: includePosts,
        offset: offset,
        author: onlyFromCurrentUser ? wp.data.select('core').getCurrentUser().id : author
      }, function (value) {
        return !isUndefined(value) && !(isArray(value) && (isNull(value) || value.length === 0));
      });
      var filterTaxNames = [];
      if (taxIds) {
        Object.keys(taxIds).map(function (taxSlug) {
          filterTaxNames.push(taxSlug);
          recentPostsQuery[taxSlug] = taxIds[taxSlug];
        });
      }
      var queryFields = ['id', 'title'];

      // Search posts
      var postsToSearchQuery = pickBy({
        _fields: queryFields,
        per_page: 10,
        search: "\"".concat(searchString, "\""),
        orderby: 'title',
        order: 'desc'
      }, function (value) {
        return !isUndefined(value);
      });
      var postsToSearch = advgbBlocks.advgb_pro !== 'undefined' && advgbBlocks.advgb_pro === '1' && typeof searchString !== 'undefined' && searchString.length > 0 ? getEntityRecords('postType', postType ? postType : 'post', postsToSearchQuery) : null;
      var postsToSearchResolved = hasFinishedResolution('getEntityRecords', ['postType', postType ? postType : 'post', postsToSearchQuery]);

      // Include posts
      var postsToIncludeQuery = pickBy({
        _fields: queryFields,
        per_page: -1,
        include: includePosts
      }, function (value) {
        return !isUndefined(value);
      });
      var postsToInclude = advgbBlocks.advgb_pro !== 'undefined' && advgbBlocks.advgb_pro === '1' && typeof includePosts !== 'undefined' && includePosts.length > 0 ? getEntityRecords('postType', postType ? postType : 'post', postsToIncludeQuery) : null;
      var postsToIncludeResolved = hasFinishedResolution('getEntityRecords', ['postType', postType ? postType : 'post', postsToIncludeQuery]);

      // Exclude posts
      var postsToExcludeQuery = pickBy({
        _fields: queryFields,
        per_page: -1,
        include: excludePosts
      }, function (value) {
        return !isUndefined(value);
      });
      var postsToExclude = typeof excludePosts !== 'undefined' && excludePosts.length > 0 ? getEntityRecords('postType', postType ? postType : 'post', postsToExcludeQuery) : null;
      var postsToExcludeResolved = hasFinishedResolution('getEntityRecords', ['postType', postType ? postType : 'post', postsToExcludeQuery]);

      // Modifying filters from main query for Exclude post suggestions
      var postSuggestionsQuery = omit(recentPostsQuery, ['exclude']);
      postSuggestionsQuery.per_page = typeof excludePosts !== 'undefined' && excludePosts.length > 0 ? numberOfPosts + excludePosts.length : numberOfPosts;
      postSuggestionsQuery._fields = queryFields;
      return {
        recentPosts: getEntityRecords('postType', postType ? postType : 'post', recentPostsQuery),
        postList: getEntityRecords('postType', postType ? postType : 'post', postSuggestionsQuery),
        postsToSearch: postsToSearch,
        postsToSearchResolved: postsToSearchResolved,
        postsToInclude: postsToInclude,
        postsToIncludeResolved: postsToIncludeResolved,
        postsToExclude: postsToExclude,
        postsToExcludeResolved: postsToExcludeResolved
      };
    })(RecentPostsEdit),
    save: function save() {
      // Render in PHP
      return null;
    }
  });
})(wp.i18n, wp.blocks, wp.element, wp.blockEditor, wp.components, wp.data, lodash, wp.htmlEntities, wp.date);

/***/ },

/***/ "./assets/blocks/recent-posts/query-controls.jsx"
/*!*******************************************************!*\
  !*** ./assets/blocks/recent-posts/query-controls.jsx ***!
  \*******************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   AuthorSelect: () => (/* binding */ AuthorSelect),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
var _excluded = ["label", "noOptionLabel", "categoriesList", "selectedCategoryId", "onChange"];
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _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(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
var __ = wp.i18n.__;
var _wp$element = wp.element,
  Component = _wp$element.Component,
  Fragment = _wp$element.Fragment;
var _wp$components = wp.components,
  TreeSelect = _wp$components.TreeSelect,
  SelectControl = _wp$components.SelectControl,
  FormTokenField = _wp$components.FormTokenField,
  RangeControl = _wp$components.RangeControl;
var _lodash = lodash,
  pickBy = _lodash.pickBy,
  isUndefined = _lodash.isUndefined,
  groupBy = _lodash.groupBy;

/**
 * Returns terms in a tree form.
 *
 * @param {Array} flatTerms  Array of terms in flat format.
 *
 * @return {Array} Array of terms in tree format.
 */
function buildTermsTree(flatTerms) {
  var flatTermsWithParentAndChildren = flatTerms.map(function (term) {
    return _objectSpread({
      children: [],
      parent: null
    }, term);
  });
  var termsByParent = groupBy(flatTermsWithParentAndChildren, 'parent');
  if (termsByParent.null && termsByParent.null.length) {
    return flatTermsWithParentAndChildren;
  }
  var fillWithChildren = function fillWithChildren(terms) {
    return terms.map(function (term) {
      var children = termsByParent[term.id];
      return _objectSpread(_objectSpread({}, term), {}, {
        children: children && children.length ? fillWithChildren(children) : []
      });
    });
  };
  return fillWithChildren(termsByParent['0'] || []);
}
function AuthorSelect(_ref) {
  var label = _ref.label,
    noOptionLabel = _ref.noOptionLabel,
    authorList = _ref.authorList,
    selectedAuthorId = _ref.selectedAuthorId,
    onChange = _ref.onChange;
  var termsTree = buildTermsTree(authorList);
  return /*#__PURE__*/React.createElement(TreeSelect, {
    label: label,
    noOptionLabel: noOptionLabel,
    onChange: onChange,
    tree: termsTree,
    selectedId: selectedAuthorId
  });
}
function CategorySelect(_ref2) {
  var label = _ref2.label,
    noOptionLabel = _ref2.noOptionLabel,
    categoriesList = _ref2.categoriesList,
    selectedCategoryId = _ref2.selectedCategoryId,
    onChange = _ref2.onChange,
    props = _objectWithoutProperties(_ref2, _excluded);
  var termsTree = buildTermsTree(categoriesList);
  return /*#__PURE__*/React.createElement(TreeSelect, _extends({
    label: label,
    noOptionLabel: noOptionLabel,
    onChange: onChange,
    tree: termsTree,
    selectedId: selectedCategoryId
  }, props));
}
var DEFAULT_MIN_ITEMS = 1;
var DEFAULT_MAX_ITEMS = 100;
var PP_SERIES_POST_TYPES = typeof advgbBlocks.pp_series_post_types !== 'undefined' ? advgbBlocks.pp_series_post_types : ['post'];
function AdvQueryControls(_ref3) {
  var categoriesList = _ref3.categoriesList,
    selectedCategoryId = _ref3.selectedCategoryId,
    numberOfItems = _ref3.numberOfItems,
    order = _ref3.order,
    orderBy = _ref3.orderBy,
    postType = _ref3.postType,
    _ref3$maxItems = _ref3.maxItems,
    maxItems = _ref3$maxItems === void 0 ? DEFAULT_MAX_ITEMS : _ref3$maxItems,
    _ref3$minItems = _ref3.minItems,
    minItems = _ref3$minItems === void 0 ? DEFAULT_MIN_ITEMS : _ref3$minItems,
    onCategoryChange = _ref3.onCategoryChange,
    onNumberOfItemsChange = _ref3.onNumberOfItemsChange,
    onOrderChange = _ref3.onOrderChange,
    onOrderByChange = _ref3.onOrderByChange;
  var orderParams = [{
    label: __('Created: Newest to oldest', 'advanced-gutenberg'),
    value: 'date/desc'
  }, {
    label: __('Created: Oldest to newest', 'advanced-gutenberg'),
    value: 'date/asc'
  }, {
    /* translators: label for ordering posts by title in ascending order */
    label: __('A → Z', 'advanced-gutenberg'),
    value: 'title/asc'
  }, {
    /* translators: label for ordering posts by title in descending order */
    label: __('Z → A', 'advanced-gutenberg'),
    value: 'title/desc'
  }, {
    label: __('Author', 'advanced-gutenberg') + ' ' + __('A → Z', 'advanced-gutenberg'),
    value: 'author/asc'
  }, {
    label: __('Author', 'advanced-gutenberg') + ' ' + __('Z → A', 'advanced-gutenberg'),
    value: 'author/desc'
  }, {
    label: __('Modified: Newest to oldest', 'advanced-gutenberg'),
    value: 'modified/desc'
  }, {
    label: __('Modified: Oldest to newest', 'advanced-gutenberg'),
    value: 'modified/asc'
  }, {
    label: __('Post ID Descending', 'advanced-gutenberg'),
    value: 'id/desc'
  }, {
    label: __('Post ID Ascending', 'advanced-gutenberg'),
    value: 'id/asc'
  }];

  // post and page supports more orderBy parameters
  if (postType === 'post' || postType === 'page') {
    orderParams = _.union(orderParams, [{
      label: __('Randomize', 'advanced-gutenberg'),
      value: 'rand/asc'
    }]);
  }

  // post support more orderBy parameters
  if (postType === 'post') {
    orderParams = _.union(orderParams, [{
      label: __('Comments, decreasing order', 'advanced-gutenberg'),
      value: 'comment_count/desc'
    }, {
      label: __('Comments, increasing order', 'advanced-gutenberg'),
      value: 'comment_count/asc'
    }]);
  }
  if (typeof advgbBlocks.pp_series_active !== 'undefined' && parseInt(advgbBlocks.pp_series_active) && PP_SERIES_POST_TYPES.includes(postType)) {
    orderParams = _.union(orderParams, [{
      label: __('Series order', 'advanced-gutenberg'),
      value: 'series_order/asc'
    }]);
  }
  return [onOrderChange && onOrderByChange && /*#__PURE__*/React.createElement(SelectControl, {
    key: "query-controls-order-select",
    label: __('Order by', 'advanced-gutenberg'),
    value: "".concat(orderBy, "/").concat(order),
    options: orderParams,
    onChange: function onChange(value) {
      var _value$split = value.split('/'),
        _value$split2 = _slicedToArray(_value$split, 2),
        newOrderBy = _value$split2[0],
        newOrder = _value$split2[1];
      if (newOrder !== order) {
        onOrderChange(newOrder);
      }
      if (newOrderBy !== orderBy) {
        onOrderByChange(newOrderBy);
      }
    }
  }), categoriesList && onCategoryChange && /*#__PURE__*/React.createElement(CategorySelect, {
    key: "query-controls-category-select",
    categoriesList: categoriesList,
    label: __('Category', 'advanced-gutenberg'),
    noOptionLabel: __('All', 'advanced-gutenberg'),
    selectedCategoryId: selectedCategoryId,
    onChange: onCategoryChange
  }), onNumberOfItemsChange && /*#__PURE__*/React.createElement(RangeControl, {
    key: "query-controls-range-control",
    label: __('Number of items', 'advanced-gutenberg'),
    value: numberOfItems,
    onChange: onNumberOfItemsChange,
    min: minItems,
    max: maxItems,
    required: true
  })];
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AdvQueryControls);


/***/ },

/***/ "./assets/blocks/search-bar/block.jsx"
/*!********************************************!*\
  !*** ./assets/blocks/search-bar/block.jsx ***!
  \********************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _0_adv_components_components_jsx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../0-adv-components/components.jsx */ "./assets/blocks/0-adv-components/components.jsx");
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }

(function (wpI18n, wpBlocks, wpElement, wpBlockEditor, wpComponents) {
  wpBlockEditor = wp.blockEditor || wp.editor;
  var __ = wpI18n.__;
  var Component = wpElement.Component,
    Fragment = wpElement.Fragment;
  var registerBlockType = wpBlocks.registerBlockType;
  var _wpBlockEditor = wpBlockEditor,
    InspectorControls = _wpBlockEditor.InspectorControls,
    RichText = _wpBlockEditor.RichText,
    PanelColorSettings = _wpBlockEditor.PanelColorSettings;
  var RangeControl = wpComponents.RangeControl,
    PanelBody = wpComponents.PanelBody,
    TextControl = wpComponents.TextControl,
    ToggleControl = wpComponents.ToggleControl;
  var searchBlockIcon = /*#__PURE__*/React.createElement("svg", {
    fill: "none",
    height: "20",
    width: "20",
    stroke: "currentColor",
    strokeWidth: "2",
    viewBox: "0 0 24 24",
    xmlns: "http://www.w3.org/2000/svg"
  }, /*#__PURE__*/React.createElement("circle", {
    fill: "none",
    cx: "11",
    cy: "11",
    r: "8"
  }), /*#__PURE__*/React.createElement("line", {
    x1: "21",
    x2: "16.65",
    y1: "21",
    y2: "16.65"
  }));
  var SEARCH_ICONS = {
    icon1: searchBlockIcon,
    icon2: /*#__PURE__*/React.createElement("svg", {
      fill: "currentColor",
      xmlns: "http://www.w3.org/2000/svg",
      width: "20",
      height: "20",
      viewBox: "0 0 24 24"
    }, /*#__PURE__*/React.createElement("path", {
      fill: "none",
      d: "M0 0h24v24H0V0zm0 0h24v24H0V0z"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M17.01 14h-.8l-.27-.27c.98-1.14 1.57-2.61 1.57-4.23 0-3.59-2.91-6.5-6.5-6.5s-6.5 3-6.5 6.5H2l3.84 4 4.16-4H6.51C6.51 7 8.53 5 11.01 5s4.5 2.01 4.5 4.5c0 2.48-2.02 4.5-4.5 4.5-.65 0-1.26-.14-1.82-.38L7.71 15.1c.97.57 2.09.9 3.3.9 1.61 0 3.08-.59 4.22-1.57l.27.27v.79l5.01 4.99L22 19l-4.99-5z"
    })),
    icon3: /*#__PURE__*/React.createElement("svg", {
      fill: "currentColor",
      xmlns: "http://www.w3.org/2000/svg",
      width: "20",
      height: "20",
      viewBox: "0 0 24 24"
    }, /*#__PURE__*/React.createElement("path", {
      d: "M0 0h24v24H0z",
      fill: "none"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M20.94 11c-.46-4.17-3.77-7.48-7.94-7.94V1h-2v2.06C6.83 3.52 3.52 6.83 3.06 11H1v2h2.06c.46 4.17 3.77 7.48 7.94 7.94V23h2v-2.06c4.17-.46 7.48-3.77 7.94-7.94H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"
    })),
    icon4: /*#__PURE__*/React.createElement("svg", {
      fill: "currentColor",
      xmlns: "http://www.w3.org/2000/svg",
      width: "20",
      height: "20",
      viewBox: "0 0 24 24"
    }, /*#__PURE__*/React.createElement("path", {
      fill: "none",
      d: "M0 0h24v24H0V0z"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M18 13v7H4V6h5.02c.05-.71.22-1.38.48-2H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-5l-2-2zm-1.5 5h-11l2.75-3.53 1.96 2.36 2.75-3.54zm2.8-9.11c.44-.7.7-1.51.7-2.39C20 4.01 17.99 2 15.5 2S11 4.01 11 6.5s2.01 4.5 4.49 4.5c.88 0 1.7-.26 2.39-.7L21 13.42 22.42 12 19.3 8.89zM15.5 9C14.12 9 13 7.88 13 6.5S14.12 4 15.5 4 18 5.12 18 6.5 16.88 9 15.5 9z"
    }), /*#__PURE__*/React.createElement("path", {
      fill: "none",
      d: "M0 0h24v24H0z"
    })),
    icon5: /*#__PURE__*/React.createElement("svg", {
      fill: "currentColor",
      xmlns: "http://www.w3.org/2000/svg",
      width: "20",
      height: "20",
      viewBox: "2 2 22 22"
    }, /*#__PURE__*/React.createElement("path", {
      d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M0 0h24v24H0z",
      fill: "none"
    })),
    icon6: /*#__PURE__*/React.createElement("svg", {
      width: "20",
      height: "20",
      viewBox: "0 0 26 26",
      xmlns: "http://www.w3.org/2000/svg"
    }, /*#__PURE__*/React.createElement("path", {
      d: "M14.9462891,1C9.4033203,1,4.8935547,5.5097656,4.8935547,11.0532227  c0,2.5022583,0.9248047,4.7885132,2.4428101,6.5498657l-6.1166382,6.1166382c-0.2929688,0.2929688-0.2929688,0.7675781,0,1.0605469  C1.3662109,24.9267578,1.5576172,25,1.75,25s0.3837891-0.0732422,0.5302734-0.2197266l6.1165771-6.1165771  c1.7612305,1.5180054,4.0474243,2.442749,6.5494385,2.442749C20.4902344,21.1064453,25,16.5966797,25,11.0532227  S20.4902344,1,14.9462891,1z M14.9462891,19.6064453c-4.7158203,0-8.5527344-3.8369141-8.5527344-8.5532227  S10.2304688,2.5,14.9462891,2.5C19.6630859,2.5,23.5,6.3369141,23.5,11.0532227S19.6630859,19.6064453,14.9462891,19.6064453z",
      fill: "currentColor"
    }))
  };
  var previewImageData = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAABNCAYAAACPI3nwAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABcFJREFUeNrs3T1P61Ycx/Fj5wHCQyqBEMoVS1VVYu9WYEDqWFhKN4TEHvUV8AaQEHNfwR0qITZadezUW3ViYkSCwsDj5SlAiN38c+3IOCexA45jw/cjHQUCN8kN/vl/zrGdoxQAAAAAAAAAAAAAAAAAAAAAAAAAAFEzoniQbDbLOwn0wNPTU/xB9wTa6OWOA4Cy293/kvAbXQTc8P07g5ADsYbd9t0XOvRGlyE3NE1pbgFEE3LbF3LbF/hQYTdChtzfzIDAA4gu6N5m6UIfFHajy5Cbbtve3v4wPT39jW3bWcuyVP3WqDf+PEAEDMOQTNX29/f/W1xc3HcC7m+hw94p6O7PTE/Is+vr61+Vy+Vf8/n8In8OoPeq1eq/a2trP21ubn6uf1vzNMtT5WWGvm2lzYSo5m4Vz25tbU0tLy9/zOVyP/D2A/HIZDIf5ufnfyyVSn/s7Ozceor0s2Cbpqmkd61jhhjDN8M+Nzf3c30n8D1vPRCveu6+XVhYWJIvnWaq53NlHZkBAfdW9EyhUJjlLQf6o1gsSpHNOUHPaMJudBt0XdgzhmEUebuB/qh3zUedgGc8QX9VRdd23ZlVB/pHjmz5KrmpQh7aNkM8vv/YOYD+Bj0TtsveHONrBv3tuu8cJ0eqOed7qCRuxzJjLsfOpYUsvNqQS351x9OzAQ/of3Agle7v79Xx8XFkV4NFaWRkRCbaVD6fl0NpjdB3EfRQ+cwGhNx4acgrlUqjAUmo5NfX14kMubi5uVG1Wk2Njo6qoaGhoKCrlxTgbi8kN7oJ+tjYGFsZ+k5CdHFxkejXKHmRbrdUdbnt0IXvFO6Wk2iaQwM2A7x1aZhbkt7G4+Njcx4h8jkANgMgGTujXoX8JV33SJyfnze6U67x8fFuxiUAkh50Cfnw8LAaGBhofP/w8KBOTk7U5ORky+9Wq9XETqD4yf+HnVU6FQqF2Lrnsk2/i6BLJXdDHhQQmSk9OztLxcYyNTUV2waD6P92cRW5fm3PsZcgOU7ol8vlGpUdwBsJ+t3dXct9EnJvlQeQ8q77xMRE4wwlOTlAqvvl5WWjO68Lu/xOWrrD7KjS6/DwMLYx+rsJugSiVCo1z5pzJ+Hk7CB/WKRLLw3opfdwBmfflljxV2o51xfAGxmjA3hjFZ2LWtBvcqaZ9+SsJAtxiWryKrpMpAFJMTg4mOjXJxN17jXpqaroTKQhKdyKLieruBeOJKnHISGXiWj3evRehJ31jvHmSaWUIMmE7+3tbaLCLqGW3oZMTsu16AGXqBJ0oFOYJEByjYVUTanwSbp0VXZE8vqkB6w7c7QfQedD45Daqi4hlzAl7fp0t4IHfWac87rtDjm0uw26biVHGUtcsskgzZW9lzPbvVbP32dNTkPttcyQ1bvxgKenp3+zuQD9cXR09I9qs0Z6UOBNzV5Dt8dorNi4urr68erq6k/eciBelUplb2Vl5TelXza5XX6bMm3GM/5FGxpLMh0cHNh7e3t/zc7O5orF4ne8/UDvnZyc/L60tPTLp0+fbtSX5ZKflH75ZLvd0QTtgMVZG927KoSM5eWg+IBzmyuXy6WZmZmv5Wf1B3cXd+Cz34FoSGit3d3d442NjQMn0FUn5I9Oq/pCb7dbIz0o6M210d2Ae5p3RccXf/47AH3QvcNmX9Crnvbk7cq3C3rYWXf3ibxhtp37Mqp11QgArwu5N3/ebvqTp4pbSj85Fy7oMqB31mDzB937Qix37E7QgdiCXmsT9I4fbJEN8YS60b2l9AuxA4i++255iq2lnk/CWSrEsfRswJMYmsDbTrgtxudArON0f7M1vQCtziswfum+e7vk/mAbBB2IJej+0D87YSbo8+iCF1BvDXunlVYJOxDtON0feNVtyEMH0wm7P/Aq4GsA0QVde1/YT5btKpiawL/6MQF0DHnLz9KyTBkAAAAAAAAAAAAAAAAAAAAAAAAAAABS738BBgAbjEeHhJ/yegAAAABJRU5ErkJggg==';
  var SearchBarEdit = /*#__PURE__*/function (_Component) {
    function SearchBarEdit() {
      var _this;
      _classCallCheck(this, SearchBarEdit);
      _this = _callSuper(this, SearchBarEdit, arguments);
      _this.state = {
        isBlockIdSet: false // @since 3.2.3
      };
      return _this;
    }
    _inherits(SearchBarEdit, _Component);
    return _createClass(SearchBarEdit, [{
      key: "componentWillMount",
      value: function componentWillMount() {
        var _this$props = this.props,
          attributes = _this$props.attributes,
          setAttributes = _this$props.setAttributes;
        var currentBlockConfig = advgbDefaultConfig['advgb-search-bar'];

        // No override attributes of blocks inserted before
        if (attributes.changed !== true) {
          if (_typeof(currentBlockConfig) === 'object' && currentBlockConfig !== null) {
            Object.keys(currentBlockConfig).map(function (attribute) {
              if (typeof attributes[attribute] === 'boolean') {
                attributes[attribute] = !!currentBlockConfig[attribute];
              } else {
                attributes[attribute] = currentBlockConfig[attribute];
              }
            });
          }

          // Finally set changed attribute to true, so we don't modify anything again
          setAttributes({
            changed: true
          });
        }
      }
    }, {
      key: "componentDidMount",
      value: function componentDidMount() {}
    }, {
      key: "componentDidUpdate",
      value: function componentDidUpdate() {
        var _this$props2 = this.props,
          clientId = _this$props2.clientId,
          attributes = _this$props2.attributes,
          setAttributes = _this$props2.setAttributes;

        // @since 3.2.3 - https://github.com/publishpress/PublishPress-Blocks/issues/1389
        if (!this.state.isBlockIdSet) {
          setAttributes({
            searchBtnId: "advgb-search-btn-".concat(clientId)
          });
          this.setState({
            isBlockIdSet: true
          });
        }
      }
    }, {
      key: "render",
      value: function render() {
        var _this$props3 = this.props,
          attributes = _this$props3.attributes,
          setAttributes = _this$props3.setAttributes,
          className = _this$props3.className;
        var fullWidth = attributes.fullWidth,
          width = attributes.width,
          textColor = attributes.textColor,
          backgroundColor = attributes.backgroundColor,
          searchIcon = attributes.searchIcon,
          searchIconOnRight = attributes.searchIconOnRight,
          searchPlaceholder = attributes.searchPlaceholder,
          searchButtonEnabled = attributes.searchButtonEnabled,
          searchButtonText = attributes.searchButtonText,
          searchButtonTextColor = attributes.searchButtonTextColor,
          searchButtonBgColor = attributes.searchButtonBgColor,
          searchButtonRadius = attributes.searchButtonRadius,
          searchButtonOnLeft = attributes.searchButtonOnLeft,
          searchBtnId = attributes.searchBtnId,
          searchBtnHoverColor = attributes.searchBtnHoverColor,
          searchBtnHoverBgColor = attributes.searchBtnHoverBgColor,
          searchBtnHoverShadow = attributes.searchBtnHoverShadow,
          searchBtnHoverShadowH = attributes.searchBtnHoverShadowH,
          searchBtnHoverShadowV = attributes.searchBtnHoverShadowV,
          searchBtnHoverShadowBlur = attributes.searchBtnHoverShadowBlur,
          searchBtnHoverShadowSpread = attributes.searchBtnHoverShadowSpread,
          searchBtnHoverOpacity = attributes.searchBtnHoverOpacity,
          searchBtnHoverTranSpeed = attributes.searchBtnHoverTranSpeed,
          isPreview = attributes.isPreview;
        var searchBarIcon = /*#__PURE__*/React.createElement("span", {
          className: "advgb-search-bar-icon"
        }, searchIcon ? SEARCH_ICONS[searchIcon] : searchBlockIcon);
        var searchBarButton = !searchButtonEnabled ? '' : /*#__PURE__*/React.createElement("div", {
          className: "advgb-search-button-wrapper"
        }, /*#__PURE__*/React.createElement("span", {
          className: "advgb-search-bar-button",
          style: {
            color: searchButtonTextColor,
            borderColor: searchButtonTextColor,
            backgroundColor: searchButtonBgColor,
            borderRadius: searchButtonRadius
          }
        }, /*#__PURE__*/React.createElement(RichText, {
          tagName: "span",
          value: searchButtonText,
          onChange: function onChange(value) {
            return setAttributes({
              searchButtonText: value.trim()
            });
          },
          onReplace: function onReplace() {
            return null;
          },
          onSplit: function onSplit() {
            return null;
          },
          placeholder: 'Search',
          keepPlaceholderOnFocus: true
        })));
        return isPreview ? /*#__PURE__*/React.createElement("img", {
          alt: __('Search Bar', 'advanced-gutenberg'),
          width: "100%",
          src: previewImageData
        }) : /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(InspectorControls, null, /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Search Bar State', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Full width', 'advanced-gutenberg'),
          checked: fullWidth,
          onChange: function onChange() {
            return setAttributes({
              fullWidth: !fullWidth
            });
          }
        }), !fullWidth && /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Width', 'advanced-gutenberg'),
          value: width,
          onChange: function onChange(value) {
            return setAttributes({
              width: value
            });
          },
          min: 300,
          max: 2000
        })), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Search Icon Settings', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Search icon on the right', 'advanced-gutenberg'),
          checked: searchIconOnRight,
          onChange: function onChange() {
            return setAttributes({
              searchIconOnRight: !searchIconOnRight
            });
          }
        }), /*#__PURE__*/React.createElement("div", {
          className: "advgb-icon-items"
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-icon-items-header"
        }, __('Search icon', 'advanced-gutenberg')), /*#__PURE__*/React.createElement("div", {
          className: "advgb-icon-items-wrapper"
        }, Object.keys(SEARCH_ICONS).map(function (icon, idx) {
          return /*#__PURE__*/React.createElement("div", {
            className: "advgb-icon-item",
            key: idx
          }, /*#__PURE__*/React.createElement("span", {
            className: icon === searchIcon ? 'active' : '',
            onClick: function onClick() {
              return setAttributes({
                searchIcon: icon
              });
            }
          }, SEARCH_ICONS[icon]));
        })))), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Search Input Settings', 'advanced-gutenberg'),
          initialOpen: false
        }, /*#__PURE__*/React.createElement(TextControl, {
          label: __('Search placeholder', 'advanced-gutenberg'),
          value: searchPlaceholder,
          onChange: function onChange(value) {
            return setAttributes({
              searchPlaceholder: value
            });
          }
        }), /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Input Color', 'advanced-gutenberg'),
          initialOpen: false,
          colorSettings: [{
            label: __('Background color', 'advanced-gutenberg'),
            value: backgroundColor,
            onChange: function onChange(value) {
              return setAttributes({
                backgroundColor: value
              });
            }
          }, {
            label: __('Text color', 'advanced-gutenberg'),
            value: textColor,
            onChange: function onChange(value) {
              return setAttributes({
                textColor: value
              });
            }
          }]
        })), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Search Button Settings', 'advanced-gutenberg'),
          initialOpen: false
        }, /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Show submit button', 'advanced-gutenberg'),
          checked: searchButtonEnabled,
          onChange: function onChange() {
            return setAttributes({
              searchButtonEnabled: !searchButtonEnabled
            });
          }
        }), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Search button on the left', 'advanced-gutenberg'),
          checked: searchButtonOnLeft,
          onChange: function onChange() {
            return setAttributes({
              searchButtonOnLeft: !searchButtonOnLeft
            });
          }
        }), searchButtonEnabled && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(_0_adv_components_components_jsx__WEBPACK_IMPORTED_MODULE_0__.AdvColorControl, {
          label: __('Background color', 'advanced-gutenberg'),
          value: searchButtonBgColor,
          onChange: function onChange(value) {
            return setAttributes({
              searchButtonBgColor: value
            });
          }
        }), /*#__PURE__*/React.createElement(_0_adv_components_components_jsx__WEBPACK_IMPORTED_MODULE_0__.AdvColorControl, {
          label: __('Text color', 'advanced-gutenberg'),
          value: searchButtonTextColor,
          onChange: function onChange(value) {
            return setAttributes({
              searchButtonTextColor: value
            });
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Border radius (px)', 'advanced-gutenberg'),
          help: __('Affect both input and button.', 'advanced-gutenberg'),
          value: searchButtonRadius,
          onChange: function onChange(value) {
            return setAttributes({
              searchButtonRadius: value
            });
          },
          min: 0,
          max: 100
        }), /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Hover Colors', 'advanced-gutenberg'),
          initialOpen: false,
          colorSettings: [{
            label: __('Background color', 'advanced-gutenberg'),
            value: searchBtnHoverBgColor,
            onChange: function onChange(value) {
              return setAttributes({
                searchBtnHoverBgColor: value
              });
            }
          }, {
            label: __('Text color', 'advanced-gutenberg'),
            value: searchBtnHoverColor,
            onChange: function onChange(value) {
              return setAttributes({
                searchBtnHoverColor: value
              });
            }
          }, {
            label: __('Shadow color', 'advanced-gutenberg'),
            value: searchBtnHoverShadow,
            onChange: function onChange(value) {
              return setAttributes({
                searchBtnHoverShadow: value
              });
            }
          }]
        }), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Hover Shadow', 'advanced-gutenberg'),
          initialOpen: false
        }, /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Opacity (%)', 'advanced-gutenberg'),
          value: searchBtnHoverOpacity,
          onChange: function onChange(value) {
            return setAttributes({
              searchBtnHoverOpacity: value
            });
          },
          min: 0,
          max: 100
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Transition speed (ms)', 'advanced-gutenberg'),
          value: searchBtnHoverTranSpeed || '',
          onChange: function onChange(value) {
            return setAttributes({
              searchBtnHoverTranSpeed: value
            });
          },
          min: 0,
          max: 3000
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Shadow H offset', 'advanced-gutenberg'),
          value: searchBtnHoverShadowH || '',
          onChange: function onChange(value) {
            return setAttributes({
              searchBtnHoverShadowH: value
            });
          },
          min: -50,
          max: 50
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Shadow V offset', 'advanced-gutenberg'),
          value: searchBtnHoverShadowV || '',
          onChange: function onChange(value) {
            return setAttributes({
              searchBtnHoverShadowV: value
            });
          },
          min: -50,
          max: 50
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Shadow blur', 'advanced-gutenberg'),
          value: searchBtnHoverShadowBlur || '',
          onChange: function onChange(value) {
            return setAttributes({
              searchBtnHoverShadowBlur: value
            });
          },
          min: 0,
          max: 50
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Shadow spread', 'advanced-gutenberg'),
          value: searchBtnHoverShadowSpread || '',
          onChange: function onChange(value) {
            return setAttributes({
              searchBtnHoverShadowSpread: value
            });
          },
          min: 0,
          max: 50
        }))))), /*#__PURE__*/React.createElement("div", {
          className: "advgb-search-bar-wrapper ".concat(className)
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-search-bar-inner",
          style: {
            width: fullWidth ? '100%' : width
          }
        }, searchButtonOnLeft && searchBarButton, /*#__PURE__*/React.createElement("div", {
          className: "advgb-search-bar",
          style: {
            backgroundColor: backgroundColor,
            color: textColor,
            borderRadius: searchButtonRadius
          }
        }, !searchIconOnRight && searchBarIcon, /*#__PURE__*/React.createElement("input", {
          type: "text",
          disabled: true,
          className: "advgb-search-bar-input",
          value: searchPlaceholder ? searchPlaceholder : 'Type to search…'
        }), searchIconOnRight && searchBarIcon), !searchButtonOnLeft && searchBarButton), /*#__PURE__*/React.createElement("style", null, ".".concat(searchBtnId, ":hover {\n                                color: ").concat(searchBtnHoverColor, " !important;\n                                background-color: ").concat(searchBtnHoverBgColor, " !important;\n                                box-shadow: ").concat(searchBtnHoverShadowH, "px ").concat(searchBtnHoverShadowV, "px ").concat(searchBtnHoverShadowBlur, "px ").concat(searchBtnHoverShadowSpread, "px ").concat(searchBtnHoverShadow, ";\n                                transition: all ").concat(searchBtnHoverTranSpeed, "s ease;\n                                opacity: ").concat(searchBtnHoverOpacity / 100, "\n                            }"))));
      }
    }]);
  }(Component);
  var blockAttrs = {
    fullWidth: {
      type: 'boolean',
      default: false
    },
    width: {
      type: 'number',
      default: 500
    },
    textColor: {
      type: 'string'
    },
    backgroundColor: {
      type: 'string'
    },
    searchIcon: {
      type: 'string',
      default: 'icon1'
    },
    searchIconOnRight: {
      type: 'boolean'
    },
    searchPlaceholder: {
      type: 'string'
    },
    searchButtonEnabled: {
      type: 'boolean',
      default: true
    },
    searchButtonText: {
      type: 'string',
      default: 'SEARCH'
    },
    searchButtonTextColor: {
      type: 'string'
    },
    searchButtonBgColor: {
      type: 'string'
    },
    searchButtonRadius: {
      type: 'number',
      default: 0
    },
    searchButtonOnLeft: {
      type: 'boolean',
      default: false
    },
    searchBtnId: {
      type: 'string'
    },
    searchBtnHoverColor: {
      type: 'string'
    },
    searchBtnHoverBgColor: {
      type: 'string'
    },
    searchBtnHoverShadow: {
      type: 'string'
    },
    searchBtnHoverShadowH: {
      type: 'number',
      default: 1
    },
    searchBtnHoverShadowV: {
      type: 'number',
      default: 1
    },
    searchBtnHoverShadowBlur: {
      type: 'number',
      default: 12
    },
    searchBtnHoverShadowSpread: {
      type: 'number',
      default: 0
    },
    searchBtnHoverOpacity: {
      type: 'number',
      default: 100
    },
    searchBtnHoverTranSpeed: {
      type: 'number',
      default: 200
    },
    changed: {
      type: 'boolean',
      default: false
    },
    isPreview: {
      type: 'boolean',
      default: false
    }
  };
  registerBlockType('advgb/search-bar', {
    apiVersion: 3,
    title: __('Search Bar - PublishPress', 'advanced-gutenberg'),
    description: __('Easy to create a search bar for your site.', 'advanced-gutenberg'),
    icon: {
      src: searchBlockIcon,
      foreground: typeof advgbBlocks !== 'undefined' ? advgbBlocks.color : undefined
    },
    category: 'advgb-category',
    keywords: [__('accordion', 'advanced-gutenberg'), __('list', 'advanced-gutenberg'), __('faq', 'advanced-gutenberg')],
    attributes: blockAttrs,
    example: {
      attributes: {
        isPreview: true
      }
    },
    supports: {
      align: true,
      anchor: true
    },
    styles: [{
      name: 'default',
      label: __('Default', 'advanced-gutenberg'),
      isDefault: true
    }, {
      name: 'classic',
      label: __('Classic', 'advanced-gutenberg')
    }],
    edit: SearchBarEdit,
    save: function save(_ref) {
      var attributes = _ref.attributes,
        className = _ref.className;
      var fullWidth = attributes.fullWidth,
        width = attributes.width,
        textColor = attributes.textColor,
        backgroundColor = attributes.backgroundColor,
        searchIcon = attributes.searchIcon,
        searchIconOnRight = attributes.searchIconOnRight,
        searchPlaceholder = attributes.searchPlaceholder,
        searchButtonEnabled = attributes.searchButtonEnabled,
        searchButtonText = attributes.searchButtonText,
        searchButtonTextColor = attributes.searchButtonTextColor,
        searchButtonBgColor = attributes.searchButtonBgColor,
        searchButtonRadius = attributes.searchButtonRadius,
        searchButtonOnLeft = attributes.searchButtonOnLeft,
        searchBtnId = attributes.searchBtnId;
      var searchBarIcon = /*#__PURE__*/React.createElement("span", {
        className: "advgb-search-bar-icon"
      }, searchIcon ? SEARCH_ICONS[searchIcon] : searchBlockIcon);
      var searchBarButton = !searchButtonEnabled ? '' : /*#__PURE__*/React.createElement("div", {
        className: "advgb-search-button-wrapper"
      }, /*#__PURE__*/React.createElement("button", {
        type: "submit",
        className: "advgb-search-bar-button ".concat(searchBtnId),
        style: {
          color: searchButtonTextColor,
          borderColor: searchButtonTextColor,
          backgroundColor: searchButtonBgColor,
          borderRadius: searchButtonRadius
        }
      }, searchButtonText));
      return /*#__PURE__*/React.createElement("div", {
        className: "advgb-search-bar-wrapper ".concat(className)
      }, /*#__PURE__*/React.createElement("form", {
        method: "get",
        action: advgbBlocks.home_url,
        className: "advgb-search-bar-form",
        role: "search"
      }, /*#__PURE__*/React.createElement("div", {
        className: "advgb-search-bar-inner",
        style: {
          width: fullWidth ? '100%' : width
        }
      }, searchButtonOnLeft && searchBarButton, /*#__PURE__*/React.createElement("div", {
        className: "advgb-search-bar",
        style: {
          backgroundColor: backgroundColor,
          color: textColor,
          borderRadius: searchButtonRadius
        }
      }, !searchIconOnRight && searchBarIcon, /*#__PURE__*/React.createElement("input", {
        type: "text",
        className: "advgb-search-bar-input",
        name: "s",
        placeholder: searchPlaceholder ? searchPlaceholder : 'Type to search…'
      }), searchIconOnRight && searchBarIcon), !searchButtonOnLeft && searchBarButton)));
    }
  });
})(wp.i18n, wp.blocks, wp.element, wp.blockEditor, wp.components);

/***/ },

/***/ "./assets/blocks/social-links/block.jsx"
/*!**********************************************!*\
  !*** ./assets/blocks/social-links/block.jsx ***!
  \**********************************************/
() {

function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _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 _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
(function (wpI18n, wpBlocks, wpElement, wpBlockEditor, wpComponents) {
  wpBlockEditor = wp.blockEditor || wp.editor;
  var __ = wpI18n.__;
  var Component = wpElement.Component,
    Fragment = wpElement.Fragment;
  var registerBlockType = wpBlocks.registerBlockType;
  var _wpBlockEditor = wpBlockEditor,
    InspectorControls = _wpBlockEditor.InspectorControls,
    BlockControls = _wpBlockEditor.BlockControls,
    MediaUpload = _wpBlockEditor.MediaUpload,
    AlignmentToolbar = _wpBlockEditor.AlignmentToolbar,
    PanelColorSettings = _wpBlockEditor.PanelColorSettings;
  var RangeControl = wpComponents.RangeControl,
    BaseControl = wpComponents.BaseControl,
    PanelBody = wpComponents.PanelBody,
    TextControl = wpComponents.TextControl,
    ToolbarButton = wpComponents.ToolbarButton,
    Button = wpComponents.Button,
    ToolbarGroup = wpComponents.ToolbarGroup,
    Tooltip = wpComponents.Tooltip;
  var socialBlockIconContent = /*#__PURE__*/React.createElement("g", {
    fill: "currentColor"
  }, /*#__PURE__*/React.createElement("path", {
    fill: "none",
    d: "M0,0h24v24H0V0z"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M18,16.08c-0.76,0-1.44,0.3-1.96,0.77L8.91,12.7C8.96,12.47,9,12.24,9,12s-0.04-0.47-0.09-0.7l7.05-4.11 C16.5,7.69,17.21,8,18,8c1.66,0,3-1.34,3-3c0-1.66-1.34-3-3-3s-3,1.34-3,3c0,0.24,0.04,0.47,0.09,0.7L8.04,9.81 C7.5,9.31,6.79,9,6,9c-1.66,0-3,1.34-3,3c0,1.66,1.34,3,3,3c0.79,0,1.5-0.31,2.04-0.81l7.12,4.16c-0.05,0.21-0.08,0.43-0.08,0.65 c0,1.61,1.31,2.92,2.92,2.92s2.92-1.31,2.92-2.92C20.92,17.39,19.61,16.08,18,16.08z M18,4c0.55,0,1,0.45,1,1s-0.45,1-1,1 s-1-0.45-1-1S17.45,4,18,4z M6,13c-0.55,0-1-0.45-1-1s0.45-1,1-1s1,0.45,1,1S6.55,13,6,13z M18,20.02c-0.55,0-1-0.45-1-1 s0.45-1,1-1s1,0.45,1,1S18.55,20.02,18,20.02z"
  }));
  var previewImageData = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAACDCAYAAACkwQY0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAACNxJREFUeNrs3U1oFGkex/GqfplOogYTkawYQhBBZkTmIARkEHYQL173sCfPC54WPOxeFvYgzGluioNXLyMMc/UwexFnRy/DwrI6BxUkG5WY+P4S81JdU7+arvj4THX1U9XVHdP9/UCRpNOpp9Pdv+f5P09Vd3seAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGAw+d3uoFarZe3H5y4GcgnbXb6xsdH/oFsB91P2R8iB7sMe2l+LBN4vIeBpG2EHug96mLJtXp4n8H7BkJtbpbX5xlfCDpQb8qaxbYY+CntYatCtkbxibqdOnWqcP3/+y/Hx8c9932+EYehHGw8ZUGQ+7fthEASv5ufnf5qbm/tPlCWFOzCCHpidgMvInifo9ihe1ba4uPiXiYmJf0Q3bjcPEVCuKMS/3L59+29Hjx693gr4hhV6p7BXcozmnhXy2sLCwunJycmvCTnQG1H2Pj1y5Mh3V65cORT9WNdFrfxVvPR1seIjujGab4b86tWrh06cOPFDFPJJHg6gt969e/fvaGr8p6iMX49+XLNG97DTXL3iEHJ7NI/Dfvz48a8IOdAfIyMjX9y6deu0Maqb62S+kdPipbtVAcRBr9frR7n7gf6Zmpr6Y6uiTjbno1uVHAH/oHyvVCqM5kAfVavVPdYc3Ty03fWI7qeU7k47B1AeHbb23q+TpZ2zUkrp3u7sNwD9YZ+U5ruU7XlLdzvwALYm7KmDbtaCHCM6sH3D7pU9ogP4eEKe5/Kugs6IDmx92J1zyIgODAGCDhB0AIOgxl1Qrmaz6b1+/dpbWVnx1tfX48vq9brXaDS88fFxr1Ipp299+fKlt7q6Gm9SrVa90dFRb8eOHXF7ZdDtf/PmTfy/BEEQX6b/Q+3s3LmTB5ugD6fnz597T548icNuUlBkaWnJ27Nnjzc5WfzsYXUiy8vLm52I/Tu1sXv37ridop2Kbr/2o87Epv9F/6c6k6mpqTj0oHQfGouLi3E47JDb1BHMz893vF67Nh49epQacrvDWVhYKNSGKgTdvrSQ26O92uh0PRD0gdFu9MsK08OHD3O18fTp09xtKIh5R3KXjsTufAg7QR94CpRG0LxUArsGRMFTJdCO5ssq1e25uW6bOghXaiMJuebi09PT8VeXjq5I9QCCvq3m5Zl3cDRPVgg1l7XnzK4hzLqeFvj27dsXz/vT5uTPnj1zHs3N/0Wdh+uim/6WUZ2gDzQtgJkUai2GJbRgpRBqdBwbG/vdSJ2smudpww66qoM7d+6k7kshTBYD87ShDkJluWtHkXUbsfVYde+ybLdLVo1s+/fvj8OuQ1Nm6ZscorL3kVUea//tymK1kbxiSR2MQpl2XQW90+q4/S6imgaoE0lun75XmJNOTHN5s2Nx6UzAiL4ttQugjmkrKApFMm9uN7J2epverBE/mZdrU9XgMp92fmJE04BkuqH963tt6rz0s6YLYEQfjl4yZU6cLJzt3bvXaS7f6U39ssJ77969eEogeVfYi0iO3ycnzYARfSi0C6FCbS5O6ft2q+adzmJTZ9Lt2XQuoXRpI+uwW5nVBAj6RydtVTop2RVwLWhpyyqPi7SRtwTvRKfO9rozAaX7tqVQ2yvOGtFdjq1PTEw4taGFsHaHrzod1nJtI1l8czlMpkVFe33CPNIAgj5wNJK5BsQudV3DoTZ03bTOI6vdZEHQlRb01GklC4c6ZCf63px6aMXdlHayDijdB44W3vLMUZNV6zxzb7WhDiVPyZ63Dd0uLe7l+Rvdpm5epAOCvn3uxCgYMzMzTqOn5tu6bpERUCffaPR0qQDURpEFMtdTX/U/q/PRbQKl+9CN7Ar7q1evvLdv38bHyDWfVWiSk066XZ3W6Llr1674eLbKbLONZJ7d7cKY9qWOQvtXO1ptV/mu/etwoDqrMl9bD4K+7SQnr/SynE3m3r1eAFOgeYMJSncABB0AQQdA0AEQdAAEHQBBBwg6AIIOgKAD+PhwCmwGvQRUb7Xc6e2egKL0WgW9iKjXzzGewRkhf/z4sXfw4EHuDPQ06Pfv3+/584zSvQ1Cjr6U1NFIrhdA9foDMPo6oqvn0ssePzZ6v7TZ2dkPLhsZGeFZiL6FfaDm6Ar5dv7onhs3bvCs7KNjx45xJ1C6AyDoAAg6MFTrANwF7g4fPsydAII+6PK83TIwtEHfTiNip085Bcp8rvX6EBtz9DZ0EoOO+wO9DvnS0pI3NjZG6b5VZboehLt373LyDHoadJ2sxbnuWzyq83FDGASU7gBBB0DQARB0AAQdAEEHQNABEHQABB0g6AAIOgCCDoCgAyDoAAg6AIIOgKADBB0AQQcwdEEPueuALRP2K+iEHeh3uiNW7kLXPFZyBnuzoSAIlrjrgf5ZW1tbLhLyoiN6HPYXL178i7se6JvmtWvXvm3lr2kNvh1VO/YElYrf+tZvdQzaaisrK/89efLkn6Pfj/IYAL0VDaw/zs3NfaNiOto2jK/N1hZmfYxY0dI9uHDhwvL169f/Gk0bVnkYgJ6W7I/OnTv3z1agAzPcZY7oZqdgjuqVy5cv///AgQM/zszM/KHRaOz3fb/KwwKUIwiClw8ePPj+7Nmzf7906dLD1giubd0Y1ZPQe81ms+2+/E6NtT4TKgm4gqwL6tH2SbJNT0+PXrx48YvZ2dnPqtVq47fFQQBFra6uvr558+bPZ86c+Z8V8DX9uvX9uhn2rNLdd2k0Crtvhb1ubJ+0wl9r/c43NgD5JSNl0yjX11M25zl6LWfDodGwGeSksarRIXiEHSgc8jAl6BvG9sEcPSvkzkE3PqjdDLrd8wQEHSgt7GbQm1bIA6Nkd1qQqxXoaTwr6KH3foGO0h0ov3Q3V9vtVfeOo3nuEbc1V/eMIFeMzTe+EnSgnKCHVrDtkDutfOcOo7EKn/ytHW6fsh0obZ7ebot/7zKaFw5jK+yeFWo/5TIAxYPu2cHOG3CvjDCmBJ6AA70JfKGA9zSURgcAoKCioQYAAAAAAAAAAAAAAAAAAAAAAAAAAABK8qsAAwCESp+/PGzWsQAAAABJRU5ErkJggg==';
  var socialBlockIcon = /*#__PURE__*/React.createElement("svg", {
    width: "20",
    height: "20",
    viewBox: "0 0 24 24"
  }, socialBlockIconContent);
  var ICONS_SET_NEW = {
    blogger: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("g", {
      fill: "currentColor",
      "fill-rule": "evenodd",
      stroke: "none",
      "stroke-width": "1"
    }, /*#__PURE__*/React.createElement("path", {
      d: "M50,25 C50,11.1928806 38.8071194,0 25,0 C11.1928806,0 0,11.1928806 0,25 C0,38.8071194 11.1928806,50 25,50 C38.8071194,50 50,38.8071194 50,25 Z M47,25 C47,12.8497349 37.1502651,3 25,3 C12.8497349,3 3,12.8497349 3,25 C3,37.1502651 12.8497349,47 25,47 C37.1502651,47 47,37.1502651 47,25 Z M14,28.8986406 C14,32.8228477 17.2049102,36 21.1539531,36 L28.8544258,36 C32.8063906,36 36,32.8228477 36,28.8986406 L36,23.8630898 C36,23.0788672 35.3675,22.4423281 34.5776484,22.4423281 L33.3700977,22.4423281 C32.5888398,22.4423281 31.9736563,21.8570938 31.9220508,21.121082 C31.9136289,17.1796445 28.7112969,14 24.7595898,14 L21.1539531,14 C17.2049102,14 14.002793,17.1796875 14,21.1041523 L14,28.8986406 Z M27,21.5001179 C27,22.3263074 26.3641346,23 25.5840879,23 L21.4159121,23 C20.6359096,23 20,22.3264017 20,21.5001179 C19.9999116,20.6705805 20.6358212,20 21.4159121,20 L25.5840879,20 C26.3641346,20 27,20.6705805 27,21.5001179 Z M31,28.4932201 C31,29.3206654 30.3988164,30 29.6624116,30 L21.3288673,30 C20.5925066,30 20,29.3206654 20,28.4932201 C20,27.6657749 20.5925947,27 21.3288673,27 L29.6624116,27 C30.3988164,27 31,27.665725 31,28.4932201 Z M31,28.4932201"
    }))),
    facebook: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("g", {
      fill: "currentColor",
      "fill-rule": "evenodd",
      stroke: "none",
      "stroke-width": "1"
    }, /*#__PURE__*/React.createElement("path", {
      d: "M25,50 C38.8071194,50 50,38.8071194 50,25 C50,11.1928806 38.8071194,0 25,0 C11.1928806,0 0,11.1928806 0,25 C0,38.8071194 11.1928806,50 25,50 Z M25,47 C37.1502651,47 47,37.1502651 47,25 C47,12.8497349 37.1502651,3 25,3 C12.8497349,3 3,12.8497349 3,25 C3,37.1502651 12.8497349,47 25,47 Z M26.8145197,36 L26.8145197,24.998712 L30.0687449,24.998712 L30.5,21.2076072 L26.8145197,21.2076072 L26.8200486,19.3101227 C26.8200486,18.3213442 26.9207209,17.7915341 28.4425538,17.7915341 L30.4769629,17.7915341 L30.4769629,14 L27.2222769,14 C23.3128757,14 21.9368678,15.8390937 21.9368678,18.9318709 L21.9368678,21.2080366 L19.5,21.2080366 L19.5,24.9991413 L21.9368678,24.9991413 L21.9368678,36 L26.8145197,36 Z M26.8145197,36"
    }))),
    flickr: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("g", {
      fill: "currentColor",
      "fill-rule": "evenodd",
      stroke: "none",
      "stroke-width": "1"
    }, /*#__PURE__*/React.createElement("path", {
      d: "M0,25 C0,38.8071194 11.1928806,50 25,50 C38.8071194,50 50,38.8071194 50,25 C50,11.1928806 38.8071194,0 25,0 C11.1928806,0 0,11.1928806 0,25 Z M3,25 C3,37.1502651 12.8497349,47 25,47 C37.1502651,47 47,37.1502651 47,25 C47,12.8497349 37.1502651,3 25,3 C12.8497349,3 3,12.8497349 3,25 Z M11,24.3933898 C11,27.9245881 13.8664452,30.7868324 17.4026552,30.7868852 C20.9389182,30.7868852 23.8053634,27.9245881 23.8053634,24.3933898 C23.8053634,20.8622443 20.9389711,17.9999472 17.4026552,18 C13.8664452,18 11,20.8622443 11,24.3933898 Z M33.4026552,30.7868852 C36.9389711,30.7868852 39.8053634,27.9245881 39.8053634,24.3933898 C39.8053634,20.8622971 36.9389182,18 33.4026552,18 C29.8663923,18 27,20.8622971 27,24.3933898 C27,27.9245881 29.8664452,30.7868852 33.4026552,30.7868852 Z M33.394864,19.9672131 C35.8394032,19.9672131 37.8210935,21.9489034 37.8210935,24.3934426 C37.8210935,26.8379818 35.8394032,28.8196721 33.394864,28.8196721 C30.9503248,28.8196721 28.9686345,26.8379818 28.9686345,24.3934426 C28.9686345,21.9489034 30.9503248,19.9672131 33.394864,19.9672131 Z M33.394864,19.9672131"
    }))),
    instagram: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("g", {
      fill: "currentColor",
      "fill-rule": "evenodd",
      stroke: "none",
      "stroke-width": "1"
    }, /*#__PURE__*/React.createElement("path", {
      d: "M25,0 C11.1928806,0 0,11.1928806 0,25 C0,38.8071194 11.1928806,50 25,50 C38.8071194,50 50,38.8071194 50,25 C50,11.1928806 38.8071194,0 25,0 Z M25,3 C12.8497349,3 3,12.8497349 3,25 C3,37.1502651 12.8497349,47 25,47 C37.1502651,47 47,37.1502651 47,25 C47,12.8497349 37.1502651,3 25,3 Z M35.9513128,34.5096659 C35.9701595,34.4075385 35.9839804,34.3037693 36,34.2013135 L36,15.7986865 C35.9846086,15.6978726 35.9714159,15.5967304 35.9525693,15.496245 C35.7600194,14.4654483 34.9467868,13.6655054 33.9482288,13.5226585 C33.9067662,13.517076 33.8662459,13.5075528 33.8254116,13.5 L16.1745884,13.5 C16.0681049,13.5200314 15.9609932,13.5351371 15.8560802,13.5600942 C14.8813947,13.7922616 14.1601965,14.6128926 14.0213595,15.6453312 C14.0157055,15.6883495 14.0072245,15.7310394 14,15.7740577 L14,34.2269275 C14.0201031,34.3438321 14.0361227,34.4617219 14.0612516,34.5779697 C14.2767315,35.5742861 15.0902783,36.3466448 16.0580534,36.4766848 C16.1048559,36.4825957 16.1519725,36.4921188 16.198775,36.5 L33.801225,36.5 C33.9155613,36.4796402 34.0302117,36.4628926 34.1432916,36.4372787 C35.0416482,36.2379497 35.775725,35.454426 35.9513128,34.5096659 Z M16.380331,33.0989292 C16.380331,33.5885494 16.7858479,34.0095374 17.254187,34.0095374 C22.4169106,34.0098658 27.5793201,34.0098658 32.7420437,34.0095374 C33.2147803,34.0095374 33.6180985,33.5892062 33.6180985,33.0959737 C33.6184126,29.6962164 33.6180985,26.2967875 33.6180985,22.8973587 L33.6180985,22.8267561 L31.5179543,22.8267561 C31.8144748,23.81749 31.9055669,24.8252998 31.7893459,25.8524843 C31.6724968,26.8799971 31.3558732,27.8362507 30.8401034,28.7192747 C30.3240195,29.6032838 29.6549637,30.3355797 28.8357629,30.9184609 C26.7123745,32.4303398 23.9167892,32.5633352 21.6636731,31.2412621 C20.5247077,30.5736579 19.6304345,29.6426899 19.0069247,28.4431039 C18.0768429,26.653084 17.9282685,24.7744003 18.4738788,22.8251142 C17.7771813,22.825771 17.0833107,22.825771 16.3800168,22.825771 L16.3800168,22.8878355 C16.3800168,26.2915334 16.3797027,29.6952313 16.380331,33.0989292 Z M24.897757,29.6581239 C27.3886549,29.7139492 29.403361,27.6333095 29.4558175,25.1027841 C29.5095304,22.4931182 27.4960808,20.3376071 25.0001571,20.339249 C22.5601451,20.3376071 20.5765359,22.3900057 20.5422979,24.9293975 C20.5071175,27.5370931 22.5039192,29.604269 24.897757,29.6581239 Z M33.6177844,18.481582 C33.6180985,17.7555254 33.6180985,17.0291405 33.6177844,16.303084 C33.6177844,15.7822673 33.2235754,15.3678469 32.7260241,15.3675186 C32.03341,15.3671902 31.3407958,15.3668618 30.6478676,15.3675186 C30.1515727,15.3681753 29.7561073,15.7835808 29.7557932,16.3043975 C29.7554791,17.0242147 29.7535944,17.744032 29.7583061,18.4641776 C29.7589343,18.5715591 29.7784092,18.6832096 29.8110767,18.7850086 C29.9354645,19.1682324 30.2712489,19.4033552 30.6824198,19.4053255 C31.0166336,19.4059823 31.3508474,19.4049971 31.6853753,19.4049971 C32.0472308,19.4007282 32.4103428,19.4079526 32.7725125,19.3987579 C33.2383386,19.3866077 33.6177844,18.9692319 33.6177844,18.481582 Z M33.6177844,18.481582"
    }))),
    linkedin: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("g", {
      fill: "currentColor",
      "fill-rule": "evenodd",
      stroke: "none",
      "stroke-width": "1"
    }, /*#__PURE__*/React.createElement("path", {
      d: "M25,50 C38.8071194,50 50,38.8071194 50,25 C50,11.1928806 38.8071194,0 25,0 C11.1928806,0 0,11.1928806 0,25 C0,38.8071194 11.1928806,50 25,50 Z M25,47 C37.1502651,47 47,37.1502651 47,25 C47,12.8497349 37.1502651,3 25,3 C12.8497349,3 3,12.8497349 3,25 C3,37.1502651 12.8497349,47 25,47 Z M14,20.1180479 L14,34.6581834 L18.7100851,34.6581834 L18.7100851,20.1180479 L14,20.1180479 Z M16.6646962,13 C15.0534058,13 14,14.0858611 14,15.5115122 C14,16.9076331 15.0222711,18.0247614 16.6035556,18.0247614 L16.6336556,18.0247614 C18.2759867,18.0247614 19.2988222,16.9076331 19.2988222,15.5115122 C19.2682519,14.0858611 18.2759867,13 16.6646962,13 Z M30.5769213,20.1180479 C28.076176,20.1180479 26.9565501,21.5293199 26.3314108,22.5193527 L26.3314108,20.4598644 L21.6207614,20.4598644 C21.6828427,21.8242356 21.6207614,35 21.6207614,35 L26.3314108,35 L26.3314108,26.8795887 C26.3314108,26.445032 26.3619812,26.0115368 26.4865199,25.7004084 C26.826932,24.83226 27.6020069,23.9334233 28.9032674,23.9334233 C30.6083381,23.9334233 31.2899149,25.2667202 31.2899149,27.2206333 L31.2899149,34.999614 L35.9998119,34.999614 L36,26.6627446 C36,22.1966439 33.6763743,20.1180479 30.5769213,20.1180479 Z M30.5769213,20.1180479"
    }))),
    mail: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("g", {
      fill: "currentColor",
      "fill-rule": "evenodd",
      stroke: "none",
      "stroke-width": "1"
    }, /*#__PURE__*/React.createElement("path", {
      d: "M25,0 C11.1928806,0 0,11.1928806 0,25 C0,38.8071194 11.1928806,50 25,50 C38.8071194,50 50,38.8071194 50,25 C50,11.1928806 38.8071194,0 25,0 Z M25,3 C12.8497349,3 3,12.8497349 3,25 C3,37.1502651 12.8497349,47 25,47 C37.1502651,47 47,37.1502651 47,25 C47,12.8497349 37.1502651,3 25,3 Z M37,31.9646738 L37,17 L28.262875,25.4642914 L37,31.9646738 Z M13,31.9646738 L21.7369375,25.4633812 L13,17 L13,31.9646738 Z M22.9140156,26.604743 L13,33 L37,33 L27.08575,26.604743 L25,28.625083 L22.9140156,26.604743 Z M13.72,17 L25,26.0581312 L36.28,17 L13.72,17 Z M13.72,17"
    }))),
    picasa: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("g", {
      fill: "currentColor",
      "fill-rule": "evenodd",
      stroke: "none",
      "stroke-width": "1"
    }, /*#__PURE__*/React.createElement("path", {
      d: "M25,50 C38.8071194,50 50,38.8071194 50,25 C50,11.1928806 38.8071194,0 25,0 C11.1928806,0 0,11.1928806 0,25 C0,38.8071194 11.1928806,50 25,50 Z M25,47 C37.1502651,47 47,37.1502651 47,25 C47,12.8497349 37.1502651,3 25,3 C12.8497349,3 3,12.8497349 3,25 C3,37.1502651 12.8497349,47 25,47 Z M18.3081608,24.9268242 L18.3081608,36.1026094 C15.8801013,34.6339648 13.9785429,32.4174648 12.9377792,29.8090352 L18.3081608,24.9268242 Z M20.4591064,12.8520586 C21.9243514,12.297832 23.4480966,12 24.9979941,12 C26.8609587,12 28.6590247,12.3973125 30.3579148,13.1656836 L30.3579148,21.8322148 L20.4591064,12.8520586 Z M12.4719619,28.3769023 C12.1682386,27.2530625 12,26.1186602 12,25 C12,20.096918 14.7097944,15.6850937 19.0744513,13.4426953 L23.9947578,17.9067734 L12.4719619,28.3769023 Z M36.6723724,30.6506328 C34.5083252,35.1147617 29.9554726,38 24.9979941,38 C23.1521937,38 21.3633699,37.6133008 19.6735189,36.8500586 L19.6735189,30.6506328 L36.6723724,30.6506328 Z M37.257729,29.2811133 L31.727437,29.2811133 L31.727437,13.9131836 C35.5955539,16.2654219 38.0001016,20.483668 38,25.0000508 C38,26.4583867 37.7438081,27.8959531 37.257729,29.2811133 Z M37.257729,29.2811133"
    }))),
    pinterest: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("g", {
      fill: "currentColor",
      "fill-rule": "evenodd",
      stroke: "none",
      "stroke-width": "1"
    }, /*#__PURE__*/React.createElement("path", {
      d: "M25,0 C11.1928806,0 0,11.1928806 0,25 C0,38.8071194 11.1928806,50 25,50 C38.8071194,50 50,38.8071194 50,25 C50,11.1928806 38.8071194,0 25,0 Z M25,3 C12.8497349,3 3,12.8497349 3,25 C3,37.1502651 12.8497349,47 25,47 C37.1502651,47 47,37.1502651 47,25 C47,12.8497349 37.1502651,3 25,3 Z M15.5,21.3293651 C15.5,23.8979841 16.4179886,26.1831362 18.3868965,27.0346983 C18.7097504,27.1745243 18.9989411,27.0395084 19.0925718,26.6608336 C19.1577063,26.3987635 19.3117743,25.737617 19.3805099,25.4622774 C19.4749236,25.0877494 19.4382854,24.9563826 19.1777477,24.629956 C18.6100133,23.9205421 18.2472332,23.0021355 18.2472332,21.7012393 C18.2472332,17.9270976 20.9127352,14.5483833 25.1881227,14.5483833 C28.9739058,14.5483833 31.0538241,16.9989049 31.0538241,20.2716301 C31.0538241,24.5777078 29.2549547,28.2120235 26.5844424,28.2120235 C25.1096795,28.2120235 24.005682,26.9199182 24.3595374,25.3352232 C24.7832244,23.4433422 25.6039811,21.4015173 25.6039811,20.0359328 C25.6039811,18.8134918 24.9845775,17.7939063 23.7027128,17.7939063 C22.1950696,17.7939063 20.983976,19.4461092 20.983976,21.6594407 C20.983976,23.0691459 21.4336542,24.0225504 21.4336542,24.0225504 C21.4336542,24.0225504 19.890782,30.9476708 19.6203801,32.1604915 C19.0817683,34.5758493 19.5394317,37.5367443 19.5781053,37.8358028 C19.6008084,38.0129489 19.8157834,38.0550792 19.9131719,37.9212244 C20.0522089,37.7289843 21.8477903,35.3806369 22.4582691,33.0341139 C22.6309694,32.36965 23.4498471,28.9290673 23.4498471,28.9290673 C23.9396081,29.9187967 25.3711567,30.7905945 26.8935179,30.7905945 C31.4253723,30.7905945 34.5,26.4138574 34.5,20.5554288 C34.5,16.1256142 30.9581579,12 25.575015,12 C18.8771271,12 15.5,17.0871462 15.5,21.3293651 Z M15.5,21.3293651"
    }))),
    reddit: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("g", {
      fill: "currentColor",
      "fill-rule": "evenodd",
      stroke: "none",
      "stroke-width": "1"
    }, /*#__PURE__*/React.createElement("path", {
      d: "M50,25 C50,11.1928806 38.8071194,0 25,0 C11.1928806,0 0,11.1928806 0,25 C0,38.8071194 11.1928806,50 25,50 C38.8071194,50 50,38.8071194 50,25 Z M47,25 C47,12.8497349 37.1502651,3 25,3 C12.8497349,3 3,12.8497349 3,25 C3,37.1502651 12.8497349,47 25,47 C37.1502651,47 47,37.1502651 47,25 Z M29.285672,25.1142857 C28.1613122,25.1142857 27.25,26.0886553 27.25,27.2907328 C27.25,28.4931237 28.1613122,29.4676812 29.285672,29.4676812 C30.4097389,29.4676812 31.3211097,28.4931237 31.3211097,27.2907328 C31.3211097,26.0886553 30.4097389,25.1142857 29.285672,25.1142857 L29.285672,25.1142857 Z M40,25.1842541 C40,23.1661499 38.4647792,21.5245722 36.5778773,21.5245722 C35.7246903,21.5245722 34.9441013,21.8609333 34.344099,22.4154154 C32.0204962,20.8025988 29.01275,19.8611259 25.7938312,19.7275339 L27.4944043,13.7975395 L32.4418455,14.9819468 C32.4417283,14.9962334 32.4399119,15.0100187 32.4399119,15.0243053 C32.4399119,16.6918871 33.7087059,18.0486732 35.2680089,18.0486732 C36.8273118,18.0486732 38.0961058,16.6919498 38.0961058,15.0243053 C38.0961058,13.3566608 36.827429,12 35.2680089,12 C34.0961293,12 33.0888402,12.7662743 32.6602252,13.8548112 L27.2437392,12.5581164 C26.969285,12.4923856 26.6939519,12.6634486 26.6115688,12.9510599 L24.6717565,19.7148765 C21.2781691,19.773088 18.0911839,20.7250878 15.6557838,22.4155407 C15.0558987,21.8611213 14.2751339,21.5246975 13.4220056,21.5246975 C11.5351037,21.5246975 10,23.1663379 10,25.1843795 C10,26.5078929 10.6604127,27.6694291 11.6472525,28.3122624 C11.5968617,28.6558922 11.5703186,29.0034695 11.5703186,29.3544932 C11.5703186,31.9771452 12.997375,34.4258518 15.5885179,36.2485809 C18.110227,38.0226854 21.4524861,39 24.9999414,39 C28.5471037,39 31.8895972,38.0224974 34.4113063,36.2485809 C37.0025078,34.4256639 38.429447,31.9771452 38.429447,29.3544932 C38.429447,29.0034695 38.4030211,28.6560801 38.3525131,28.3122624 C39.3394701,27.6693665 40,26.5077049 40,25.1842541 L40,25.1842541 Z M35.2678917,13.1509466 C36.2337548,13.1509466 37.0196173,13.9912229 37.0196173,15.0242426 C37.0196173,16.0570117 36.2337548,16.8975386 35.2678917,16.8975386 C34.3021457,16.8975386 33.5161661,16.0570117 33.5161661,15.0242426 C33.5161075,13.9912856 34.3019699,13.1509466 35.2678917,13.1509466 L35.2678917,13.1509466 Z M11.076137,25.1842541 C11.076137,23.8009626 12.1284263,22.6755815 13.4218884,22.6755815 C13.9116754,22.6755815 14.3665405,22.8374333 14.7430654,23.1128259 C13.3654038,24.2769312 12.4090914,25.6430537 11.9283278,27.1170775 C11.4083063,26.6566487 11.076137,25.9612434 11.076137,25.1842541 L11.076137,25.1842541 Z M24.9999414,37.8488654 C18.1882742,37.8488654 12.6466314,34.0382971 12.6466314,29.3543679 C12.6466314,29.15304 12.6575885,28.9535918 12.6776862,28.7556476 C12.7167684,28.3727297 12.7922961,27.9965165 12.9030387,27.6288878 C13.3168294,26.2557474 14.2139618,25.0028522 15.4665839,23.9584283 C15.7443779,23.7265221 16.0403361,23.5054561 16.3517045,23.295293 C18.5818499,21.7901897 21.6355923,20.8602464 24.9999414,20.8602464 C28.3641147,20.8602464 31.4179743,21.790315 33.6479439,23.295293 C33.9593123,23.5054561 34.2553877,23.7265847 34.5331232,23.9584283 C35.7858039,25.0027895 36.6829949,26.2557474 37.0967269,27.6288878 C37.2075282,27.9965165 37.2830558,28.3727297 37.3220794,28.7556476 C37.3423529,28.9534039 37.3530756,29.15304 37.3530756,29.3543679 C37.3530756,34.0383598 31.8114915,37.8488654 24.9999414,37.8488654 L24.9999414,37.8488654 Z M38.071555,27.1172028 C37.5909086,25.6432417 36.6344204,24.2769312 35.2567588,23.1128886 C35.6332837,22.837496 36.0880902,22.6756441 36.5778773,22.6756441 C37.8713979,22.6756441 38.9236872,23.8009626 38.9236872,25.1843168 C38.9236872,25.9612434 38.5916937,26.6566487 38.071555,27.1172028 L38.071555,27.1172028 Z M29.1000551,33.0352917 C28.0801683,33.929456 26.815593,34.3281642 24.9999414,34.3281642 C23.1841726,34.3281642 21.9196559,33.929456 20.8995934,33.0352917 C20.6583619,32.8238128 20.3022277,32.8616597 20.1045317,33.1195073 C19.9066598,33.3776056 19.9419334,33.7583304 20.183282,33.9699346 C21.4026227,35.0389841 22.9330974,35.5366958 24.9999414,35.5366958 C27.0667854,35.5366958 28.5972016,35.0389841 29.8166008,33.9699346 C30.0578323,33.7583304 30.093223,33.3776056 29.8953512,33.1195073 C29.6971863,32.8611584 29.3412865,32.8238128 29.1000551,33.0352917 L29.1000551,33.0352917 Z M22.3208167,27.2907328 C22.3208167,26.0886553 21.4096217,25.1142857 20.2855548,25.1142857 C19.1613122,25.1142857 18.25,26.0886553 18.25,27.2907328 C18.25,28.4931237 19.1613707,29.4676812 20.2855548,29.4676812 C21.4096217,29.4675559 22.3208167,28.4931237 22.3208167,27.2907328 L22.3208167,27.2907328 Z M22.3208167,27.2907328"
    }))),
    skype: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("g", {
      fill: "currentColor",
      "fill-rule": "evenodd",
      stroke: "none",
      "stroke-width": "1"
    }, /*#__PURE__*/React.createElement("path", {
      d: "M50,25 C50,11.1928806 38.8071194,0 25,0 C11.1928806,0 0,11.1928806 0,25 C0,38.8071194 11.1928806,50 25,50 C38.8071194,50 50,38.8071194 50,25 Z M47,25 C47,12.8497349 37.1502651,3 25,3 C12.8497349,3 3,12.8497349 3,25 C3,37.1502651 12.8497349,47 25,47 C37.1502651,47 47,37.1502651 47,25 Z M25.4397706,13.975276 C24.8096937,13.975276 24.1919703,14.0277875 23.5908485,14.1278564 C22.5130674,13.4152862 21.2304038,13 19.8499866,13 C16.0647401,13 13,16.1114511 13,19.9506313 C13,21.3475345 13.4052238,22.6452605 14.1030252,23.7348727 C14.0090312,24.330184 13.9609845,24.939812 13.9609845,25.5608835 C13.9609845,31.9601448 19.0985232,37.1471351 25.4397218,37.1471351 C26.1553942,37.1471351 26.8521702,37.0764923 27.5293662,36.9523474 C28.5816102,37.6146354 29.8210609,38 31.1497692,38 C34.9340392,38 38,34.8877563 38,31.0489724 C37.9998535,29.5978238 37.5625009,28.2486268 36.8112328,27.1332542 C36.879885,26.6180477 36.9193869,26.0942709 36.9193869,25.5610817 C36.9193869,19.1628112 31.7792114,13.975276 25.4397706,13.975276 Z M19.9677886,28.6935701 C21.3911596,28.5966276 22.2458078,30.338952 23.0054897,30.8236149 C23.7642429,31.3064835 26.6513076,32.4065946 28.1762921,30.6288326 C29.836859,28.6935701 27.0719846,27.6921461 25.0453354,27.3890074 C22.1517212,26.9520931 18.4983763,25.3558056 18.7825911,22.210082 C19.0669036,19.066352 21.4014725,17.454464 23.8583783,17.2270851 C26.9902148,16.9371546 29.0290341,17.7109007 30.6416535,19.1141006 C32.5063271,20.7354087 31.497377,22.5479106 30.3093446,22.693748 C29.1260044,22.8387382 27.7969155,20.0270054 25.187565,19.9847394 C22.4980576,19.941676 20.6803539,22.8387382 24.000559,23.6622764 C27.3224748,24.4849175 30.8798758,24.8228956 32.1609683,27.9196246 C33.4429406,31.0166527 30.1690701,34.305622 26.5147477,34.4997563 C22.8634067,34.6936913 21.1547457,33.8699039 19.5894873,32.3719545 C17.8414321,30.6988605 18.5436356,28.7905625 19.9677886,28.6935701 Z M19.9677886,28.6935701"
    }))),
    soundcloud: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("g", {
      fill: "currentColor",
      "fill-rule": "evenodd",
      stroke: "none",
      "stroke-width": "1"
    }, /*#__PURE__*/React.createElement("path", {
      d: "M25,0 C11.1928806,0 0,11.1928806 0,25 C0,38.8071194 11.1928806,50 25,50 C38.8071194,50 50,38.8071194 50,25 C50,11.1928806 38.8071194,0 25,0 Z M25,3 C12.8497349,3 3,12.8497349 3,25 C3,37.1502651 12.8497349,47 25,47 C37.1502651,47 47,37.1502651 47,25 C47,12.8497349 37.1502651,3 25,3 Z M11.2046957,26.4994198 L11,28.2899843 L11.2046957,30.0498224 C11.2122973,30.1238678 11.258563,30.1755611 11.3170241,30.1755611 C11.3736257,30.1755611 11.4197274,30.1243715 11.4286961,30.0505779 L11.6713997,28.2899843 L11.4286961,26.4989161 C11.4200555,26.4251226 11.3733523,26.3731145 11.3170241,26.3731145 C11.2586177,26.3731145 11.2122426,26.4251226 11.2046957,26.4994198 Z M12.8503005,25.3946571 C12.8503005,25.3952867 12.5750031,28.2897324 12.5750031,28.2897324 L12.8503005,31.1207736 C12.8580661,31.1967079 12.9071756,31.2514864 12.9668398,31.2514864 C13.0253555,31.2514864 13.0733712,31.1979672 13.0829963,31.1215921 L13.3961375,28.2897324 L13.0833791,25.3946571 C13.0737541,25.3177153 13.0258477,25.2645739 12.9668398,25.2645739 C12.9075037,25.2645739 12.8583943,25.3194783 12.8503005,25.3946571 Z M14.396866,24.761745 L14.1500608,28.2908658 L14.396866,31.7053294 C14.4034832,31.8110456 14.4745771,31.8908837 14.5613116,31.8908837 C14.6470618,31.8908837 14.7178823,31.8109197 14.7254838,31.7053294 L15.0061953,28.2908658 L14.7254838,24.7609894 C14.7179369,24.6552103 14.6471712,24.5753722 14.5613116,24.5753722 C14.4745771,24.5753722 14.403866,24.6552732 14.396866,24.761745 Z M15.9578691,25.0172521 L15.7251733,28.2909287 L15.9578691,31.7335372 C15.9645956,31.8549944 16.0449317,31.9468586 16.1461038,31.9468586 C16.2457993,31.9468586 16.3264635,31.8549314 16.3339557,31.733852 L16.5983703,28.2909287 L16.3339557,25.0157409 C16.3268463,24.8947875 16.2460727,24.8036159 16.1461038,24.8036159 C16.044877,24.8036159 15.9642128,24.8955431 15.9578691,25.0172521 Z M17.5195284,22.9658916 L17.3001764,28.292251 L17.5195284,31.7345446 C17.5252159,31.8690983 17.6326223,31.9751293 17.7456069,31.9751293 C17.85799,31.9751293 17.972123,31.8685946 17.972123,31.7337261 L18.205475,28.292251 L17.950412,22.9658916 C17.9436307,22.8306454 17.8434977,22.7241106 17.7311147,22.7241106 C17.6182395,22.7241106 17.5248877,22.8305824 17.5195284,22.9658916 Z M19.0799298,21.7485496 C19.0799298,21.7489903 18.8752888,28.2933213 18.8752888,28.2933213 L19.0803673,31.7138925 C19.085508,31.8633686 19.1890863,31.9816775 19.3161256,31.9816775 C19.4420165,31.9816775 19.5458683,31.8633686 19.5518839,31.7126332 L19.7832125,28.2933213 L19.5518839,21.7485496 C19.5455948,21.5974994 19.4419618,21.4795682 19.3160709,21.4795682 C19.1890863,21.4795682 19.085508,21.5977513 19.0799298,21.7485496 Z M20.6267141,20.9640207 L20.4502919,28.2940139 L20.6269329,31.6585473 C20.6312532,31.8388756 20.7830113,31.9814257 20.9374491,31.9814257 C21.0916135,31.9814257 21.2481294,31.8388756 21.2481294,31.657477 L21.4195204,28.2942028 L21.2073871,20.9639577 C21.2024652,20.7820553 21.064215,20.6391905 20.9103787,20.6391905 C20.7556128,20.6391905 20.6309251,20.7816146 20.6267141,20.9640207 Z M22.1736078,21.4133933 L22.025459,28.2954621 L22.1736078,31.6071059 C22.1771625,31.8179717 22.3266784,31.9846998 22.5091162,31.9846998 C22.6910072,31.9846998 22.8440778,31.8182235 22.8440778,31.6048392 L23.0066094,28.2958399 L22.8385544,21.4128896 C22.8341794,21.1998201 22.6872885,21.032966 22.5053975,21.032966 C22.3232331,21.032966 22.1771625,21.1997571 22.1736078,21.4133933 Z M23.7558296,19.3647403 L23.6005168,28.2972251 L23.7562671,31.5388532 C23.7590015,31.7759119 23.947455,31.9709107 24.1542288,31.9709107 C24.3605652,31.9709107 24.5521358,31.7757859 24.5521358,31.5353272 L24.7023627,28.2972251 L24.5239717,19.3640477 C24.5209639,19.1245334 24.341862,18.9290938 24.1355257,18.9290938 C23.9286971,18.9290938 23.7589468,19.1245334 23.7558296,19.3647403 Z M34.2236391,24.3767843 C33.9495448,20.8031482 31.3466882,18 28.1717992,18 C27.3948523,18 26.641093,18.1759838 25.9723183,18.4738655 C25.7124428,18.589593 25.6441927,18.7089094 25.6441927,18.9399865 L25.6441927,31.5248122 C25.6441927,31.7674747 25.8069977,31.9696515 26.0125684,31.9933888 C26.0213184,31.9945221 35.4956182,32 35.5570323,32 C37.4589032,32 39,30.2245469 39,28.0346031 C39,25.8446593 37.4574267,24.0688914 35.5556651,24.0688914 C35.0838752,24.0688914 34.6335774,24.1788262 34.2236391,24.3767843 Z M34.2236391,24.3767843"
    }))),
    tumblr: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("g", {
      fill: "currentColor",
      "fill-rule": "evenodd",
      stroke: "none",
      "stroke-width": "1"
    }, /*#__PURE__*/React.createElement("path", {
      d: "M25,50 C38.8071194,50 50,38.8071194 50,25 C50,11.1928806 38.8071194,0 25,0 C11.1928806,0 0,11.1928806 0,25 C0,38.8071194 11.1928806,50 25,50 Z M25,47 C37.1502651,47 47,37.1502651 47,25 C47,12.8497349 37.1502651,3 25,3 C12.8497349,3 3,12.8497349 3,25 C3,37.1502651 12.8497349,47 25,47 Z M20.1212122,23.428572 L20.1212122,29.5776397 C20.2888032,34.6055735 23.1493975,35.6536697 26.4848488,36 C28.4239345,35.9068215 30.7994507,35.2128501 32,34.291925 L32,30.807453 C30.4550907,32.2576564 26.3092334,33.6801939 25.5656572,29.5776397 L25.4949496,23.3602485 L32,23.428572 L32,19.2608705 L25.4949496,19.2608705 L25.6363634,14 L23.0202023,14.0683235 C23.2002807,18.5559785 20.7320276,19.156712 18,19.3291926 L18,23.428572 L20.1212122,23.428572 Z M20.1212122,23.428572"
    }))),
    twitter: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("g", {
      fill: "currentColor",
      "fill-rule": "evenodd",
      stroke: "none",
      "stroke-width": "1"
    }, /*#__PURE__*/React.createElement("path", {
      d: "M25,50 C38.8071194,50 50,38.8071194 50,25 C50,11.1928806 38.8071194,0 25,0 C11.1928806,0 0,11.1928806 0,25 C0,38.8071194 11.1928806,50 25,50 Z M25,47 C37.1502651,47 47,37.1502651 47,25 C47,12.8497349 37.1502651,3 25,3 C12.8497349,3 3,12.8497349 3,25 C3,37.1502651 12.8497349,47 25,47 Z M24.6822554,20.5542975 L24.729944,21.3761011 L23.9351333,21.2754721 C21.0420225,20.8897275 18.5145246,19.5815504 16.3685358,17.3844837 L15.3193857,16.2943361 L15.0491501,17.0993681 C14.4768864,18.8939188 14.8424993,20.7890985 16.0347153,22.0637326 C16.6705638,22.7681357 16.5274979,22.8687647 15.4306592,22.4494772 C15.0491501,22.3153051 14.7153296,22.2146761 14.6835371,22.2649907 C14.5722637,22.3823912 14.9537728,23.9085978 15.2558008,24.5123719 C15.6691024,25.350947 16.5116017,26.1727505 17.433582,26.6591241 L18.2124965,27.0448686 L17.2905161,27.0616401 C16.4003282,27.0616401 16.3685358,27.0784116 16.4639131,27.4306131 C16.7818374,28.5207608 18.0376382,29.6779944 19.436505,30.1811394 L20.4220701,30.533341 L19.5636746,31.070029 C18.2919776,31.8415181 16.7977335,32.2775772 15.3034895,32.3111202 C14.5881599,32.3278916 14,32.3949776 14,32.4452922 C14,32.6130071 15.939338,33.5522113 17.0679692,33.9211843 C20.4538626,35.0113319 24.4756046,34.5417298 27.4958851,32.6800932 C29.6418739,31.3551445 31.7878628,28.7220188 32.7893242,26.1727505 C33.3297954,24.8142589 33.8702667,22.3320767 33.8702667,21.1413 C33.8702667,20.369811 33.9179553,20.269182 34.8081432,19.3467494 C35.3327183,18.8100613 35.8255009,18.2230588 35.9208782,18.0553437 C36.0798403,17.7366852 36.0639442,17.7366852 35.2532373,18.0218007 C33.9020591,18.5249458 33.7113045,18.4578598 34.3789455,17.7031422 C34.8717281,17.1664541 35.459888,16.1937071 35.459888,15.9085915 C35.459888,15.858277 35.2214448,15.9421346 34.9512092,16.093078 C34.6650773,16.2607931 34.0292288,16.5123656 33.5523424,16.6633091 L32.6939469,16.9484246 L31.9150324,16.394965 C31.4858346,16.093078 30.8817786,15.757648 30.5638543,15.657019 C29.7531474,15.422218 28.5132428,15.455761 27.7820169,15.724105 C25.7949903,16.4788226 24.5391894,18.4243168 24.6822554,20.5542975 C24.6822554,20.5542975 24.5391894,18.4243168 24.6822554,20.5542975 Z M24.6822554,20.5542975"
    }))),
    vimeo: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("g", {
      fill: "currentColor",
      "fill-rule": "evenodd",
      stroke: "none",
      "stroke-width": "1"
    }, /*#__PURE__*/React.createElement("path", {
      d: "M50,25 C50,11.1928806 38.8071194,0 25,0 C11.1928806,0 0,11.1928806 0,25 C0,38.8071194 11.1928806,50 25,50 C38.8071194,50 50,38.8071194 50,25 Z M47,25 C47,12.8497349 37.1502651,3 25,3 C12.8497349,3 3,12.8497349 3,25 C3,37.1502651 12.8497349,47 25,47 C37.1502651,47 47,37.1502651 47,25 Z M17.315812,20.9060694 C17.9328006,21.6627251 20.2884417,30.7991385 21.0747632,32.4845455 C21.7610734,33.9625783 23.6542105,35.9166045 25.7302773,34.5211721 C27.8051355,33.1256949 34.7049271,27.0158598 35.9400265,19.8005667 C37.1740468,12.5875569 27.6369679,14.0985404 26.6267538,20.382799 C29.1516416,18.8105703 30.4993563,21.0216204 29.2073234,23.5249731 C27.9176213,26.0259082 26.7391965,27.657054 26.1221216,27.657054 C25.5062553,27.657054 25.0324423,25.9834215 24.3267945,23.0582023 C23.5973201,20.0339521 23.6018092,14.5864425 20.5690087,15.204043 C17.7089081,15.7862753 13.95,20.4417609 13.95,20.4417609 L14.8476851,21.6627251 C14.8476851,21.6627251 16.6987803,20.1493241 17.315812,20.9060694 Z M17.315812,20.9060694"
    }))),
    youtube: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("g", {
      fill: "currentColor",
      "fill-rule": "evenodd",
      stroke: "none",
      "stroke-width": "1"
    }, /*#__PURE__*/React.createElement("path", {
      d: "M50,25 C50,11.1928806 38.8071194,0 25,0 C11.1928806,0 0,11.1928806 0,25 C0,38.8071194 11.1928806,50 25,50 C38.8071194,50 50,38.8071194 50,25 Z M47,25 C47,12.8497349 37.1502651,3 25,3 C12.8497349,3 3,12.8497349 3,25 C3,37.1502651 12.8497349,47 25,47 C37.1502651,47 47,37.1502651 47,25 Z M36.768327,30.7654774 C36.4698281,32.0627028 35.4087162,33.0191862 34.1319129,33.1618614 C31.1074781,33.4998058 28.0463955,33.5014844 24.9984613,33.4998058 C21.9508068,33.5014844 18.8894444,33.4998058 15.8652894,33.1618614 C14.5882064,33.0191862 13.5276539,32.0627028 13.2294348,30.7654774 C12.8047662,28.9179732 12.8047662,26.9020564 12.8047662,25.0002798 C12.8047662,23.0982233 12.8098018,21.0820268 13.2341906,19.2345226 C13.5326895,17.9372972 14.5932419,16.980534 15.8700452,16.8381386 C18.89448,16.5001942 21.9555627,16.4985156 25.0034969,16.5001942 C28.0511513,16.4985156 31.1125137,16.5001942 34.1366687,16.8381386 C35.4137518,16.980534 36.4748637,17.9372972 36.7730829,19.2345226 C37.1977514,21.0820268 37.1952336,23.0982233 37.1952336,25.0002798 C37.1952336,26.9020564 37.1927158,28.9179732 36.768327,30.7654774 Z M22.8047662,20.5 L29.5547662,24.3971143 L22.8047662,28.2942286 L22.8047662,20.5 Z M22.8047662,20.5"
    })))
  };
  var AdvSocialBlock = /*#__PURE__*/function (_Component) {
    function AdvSocialBlock() {
      var _this;
      _classCallCheck(this, AdvSocialBlock);
      _this = _callSuper(this, AdvSocialBlock, arguments);
      _this.state = {
        currentSelected: 0,
        searchedText: ''
      };
      return _this;
    }
    _inherits(AdvSocialBlock, _Component);
    return _createClass(AdvSocialBlock, [{
      key: "componentWillMount",
      value: function componentWillMount() {
        var _this$props = this.props,
          attributes = _this$props.attributes,
          setAttributes = _this$props.setAttributes;
        var currentBlockConfig = advgbDefaultConfig['advgb-social-links'];

        // No override attributes of blocks inserted before
        if (attributes.changed !== true) {
          if (_typeof(currentBlockConfig) === 'object' && currentBlockConfig !== null) {
            Object.keys(currentBlockConfig).map(function (attribute) {
              if (typeof attributes[attribute] === 'boolean') {
                attributes[attribute] = !!currentBlockConfig[attribute];
              } else {
                attributes[attribute] = currentBlockConfig[attribute];
              }
            });
          }

          // Finally set changed attribute to true, so we don't modify anything again
          setAttributes({
            changed: true
          });
        }
      }
    }, {
      key: "render",
      value: function render() {
        var _this2 = this;
        var _this$props2 = this.props,
          attributes = _this$props2.attributes,
          setAttributes = _this$props2.setAttributes,
          isSelected = _this$props2.isSelected;
        var items = attributes.items,
          align = attributes.align,
          iconSize = attributes.iconSize,
          iconSpace = attributes.iconSpace,
          isPreview = attributes.isPreview;
        var _this$state = this.state,
          currentSelected = _this$state.currentSelected,
          searchedText = _this$state.searchedText;
        var matchedIcons = Object.keys(ICONS_SET_NEW).filter(function (key) {
          return key.indexOf(searchedText.toLowerCase().trim()) > -1;
        });
        return isPreview ? /*#__PURE__*/React.createElement("img", {
          alt: __('Social Links', 'advanced-gutenberg'),
          width: "100%",
          src: previewImageData
        }) : /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(BlockControls, null, /*#__PURE__*/React.createElement(ToolbarGroup, null, /*#__PURE__*/React.createElement(ToolbarButton, {
          className: "components-toolbar__control",
          icon: "plus",
          label: __('Add item', 'advanced-gutenberg'),
          onClick: function onClick() {
            return setAttributes({
              items: [].concat(_toConsumableArray(items), [{
                icon: '',
                iconID: '',
                link: '#'
              }])
            });
          }
        }), /*#__PURE__*/React.createElement(ToolbarButton, {
          className: "components-toolbar__control",
          icon: "no",
          label: __('Remove selected item', 'advanced-gutenberg'),
          onClick: function onClick() {
            _this2.setState({
              currentSelected: Math.max(currentSelected - 1, 0)
            });
            if (items.length > 1) {
              setAttributes({
                items: items.filter(function (item, index) {
                  return index !== currentSelected;
                })
              });
            } else {
              setAttributes({
                items: [{
                  icon: '',
                  iconID: '',
                  iconColor: '',
                  link: '#'
                }]
              });
            }
          }
        })), /*#__PURE__*/React.createElement(AlignmentToolbar, {
          value: align,
          onChange: function onChange(value) {
            return setAttributes({
              align: value === undefined ? 'center' : value
            });
          }
        })), /*#__PURE__*/React.createElement(InspectorControls, null, /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Preset Icons', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(TextControl, {
          placeholder: __('Type here to search…', 'advanced-gutenberg'),
          value: searchedText,
          onChange: function onChange(value) {
            return _this2.setState({
              searchedText: value
            });
          }
        }), /*#__PURE__*/React.createElement("div", {
          className: "advgb-icon-items-wrapper"
        }, matchedIcons.map(function (key, index) {
          return /*#__PURE__*/React.createElement("div", {
            className: "advgb-icon-item",
            key: index
          }, /*#__PURE__*/React.createElement(Tooltip, {
            text: key
          }, /*#__PURE__*/React.createElement("span", {
            className: key === items[currentSelected].icon ? 'active' : '',
            onClick: function onClick() {
              var newItems = items.map(function (item, index) {
                if (index === currentSelected) {
                  item = _objectSpread(_objectSpread({}, item), {}, {
                    icon: key,
                    iconID: ''
                  });
                }
                return item;
              });
              setAttributes({
                items: newItems
              });
            }
          }, /*#__PURE__*/React.createElement("svg", {
            xmlns: "http://www.w3.org/2000/svg",
            width: "24",
            height: "24",
            viewBox: "0 0 50 50"
          }, ICONS_SET_NEW[key]))));
        })), /*#__PURE__*/React.createElement(BaseControl, {
          label: __('Custom icon', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(MediaUpload, {
          allowedTypes: ["image"],
          value: items[currentSelected].iconID,
          onSelect: function onSelect(media) {
            var newItems = items.map(function (item, index) {
              if (index === currentSelected) {
                item = _objectSpread(_objectSpread({}, item), {}, {
                  icon: media.sizes.thumbnail ? media.sizes.thumbnail.url : media.sizes.full.url,
                  iconID: media.id
                });
              }
              return item;
            });
            setAttributes({
              items: newItems
            });
          },
          render: function render(_ref) {
            var open = _ref.open;
            return /*#__PURE__*/React.createElement(Button, {
              className: "button button-large",
              onClick: open
            }, __('Upload/Choose', 'advanced-gutenberg'));
          }
        })), /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Preset Icon Color', 'advanced-gutenberg'),
          initialOpen: false,
          colorSettings: [{
            label: __('Preset Icon Color', 'advanced-gutenberg'),
            value: items[currentSelected].iconColor,
            onChange: function onChange(value) {
              var newItems = items.map(function (item, index) {
                if (index === currentSelected) {
                  item = _objectSpread(_objectSpread({}, item), {}, {
                    iconColor: value
                  });
                }
                return item;
              });
              setAttributes({
                items: newItems
              });
            }
          }]
        })), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Icons settings', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Icon size', 'advanced-gutenberg'),
          value: iconSize,
          min: 20,
          max: 60,
          onChange: function onChange(value) {
            return setAttributes({
              iconSize: value
            });
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Icon space', 'advanced-gutenberg'),
          value: iconSpace,
          min: 0,
          max: 30,
          onChange: function onChange(value) {
            return setAttributes({
              iconSpace: value
            });
          }
        }))), /*#__PURE__*/React.createElement("div", {
          className: "advgb-social-links-block",
          style: {
            textAlign: align
          }
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-social-icons"
        }, items.map(function (item, index) {
          return /*#__PURE__*/React.createElement("span", {
            key: index,
            className: "advgb-social-icon ".concat(currentSelected === index ? 'selected' : ''),
            onClick: function onClick() {
              return _this2.setState({
                currentSelected: index
              });
            },
            style: {
              width: iconSize + 'px',
              height: iconSize + 'px',
              marginLeft: iconSpace + 'px',
              marginRight: iconSpace + 'px',
              color: item.iconColor
            }
          }, !!item.icon ? item.icon in ICONS_SET_NEW ? /*#__PURE__*/React.createElement("svg", {
            width: iconSize - 6,
            height: iconSize - 6,
            viewBox: "0 0 50 50"
          }, ICONS_SET_NEW[item.icon]) : /*#__PURE__*/React.createElement("img", {
            src: item.icon,
            alt: __('Social link icon', 'advanced-gutenberg')
          }) : /*#__PURE__*/React.createElement("svg", {
            width: iconSize - 6,
            height: iconSize - 6,
            viewBox: "0 0 24 24"
          }, socialBlockIconContent));
        })), isSelected && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
          className: "advgb-social-link"
        }, /*#__PURE__*/React.createElement("strong", null, __('Social link:', 'advanced-gutenberg')), /*#__PURE__*/React.createElement(TextControl, {
          placeholder: __('Enter social link…', 'advanced-gutenberg'),
          value: items[currentSelected].link,
          onChange: function onChange(value) {
            var newItems = items.map(function (vl, idx) {
              if (idx === parseInt(currentSelected)) vl = _objectSpread(_objectSpread({}, vl), {}, {
                link: value
              });
              return vl;
            });
            return setAttributes({
              items: newItems
            });
          }
        })))));
      }
    }]);
  }(Component);
  var socialBlockAttrs = {
    items: {
      type: 'array',
      default: [{
        icon: '',
        iconID: '',
        iconColor: '',
        link: '#'
      }, {
        icon: '',
        iconID: '',
        iconColor: '',
        link: '#'
      }, {
        icon: '',
        iconID: '',
        iconColor: '',
        link: '#'
      }]
    },
    align: {
      type: 'string'
    },
    iconSize: {
      type: 'number',
      default: 48
    },
    iconSpace: {
      type: 'number',
      default: 5
    },
    changed: {
      type: 'boolean',
      default: false
    },
    isPreview: {
      type: 'boolean',
      default: false
    }
  };
  registerBlockType('advgb/social-links', {
    apiVersion: 3,
    title: __('Social Links - PublishPress', 'advanced-gutenberg'),
    description: __('Create a styling display of links to your social media profiles.', 'advanced-gutenberg'),
    icon: {
      src: socialBlockIcon,
      foreground: typeof advgbBlocks !== 'undefined' ? advgbBlocks.color : undefined
    },
    category: 'advgb-category',
    keywords: [__('social icons', 'advanced-gutenberg'), __('shares', 'advanced-gutenberg'), __('icon link', 'advanced-gutenberg')],
    attributes: socialBlockAttrs,
    example: {
      attributes: {
        isPreview: true
      }
    },
    supports: {
      anchor: true
    },
    edit: AdvSocialBlock,
    save: function save(_ref2) {
      var attributes = _ref2.attributes;
      var items = attributes.items,
        align = attributes.align,
        iconSize = attributes.iconSize,
        iconSpace = attributes.iconSpace;
      return /*#__PURE__*/React.createElement("div", {
        className: "advgb-social-links-block",
        style: {
          textAlign: align
        }
      }, /*#__PURE__*/React.createElement("div", {
        className: "advgb-social-icons"
      }, items.map(function (item, index) {
        return /*#__PURE__*/React.createElement("a", {
          key: index,
          className: "advgb-social-icon",
          href: item.link || '#',
          target: "_blank",
          rel: "noopener noreferrer",
          style: {
            width: iconSize + 'px',
            height: iconSize + 'px',
            marginLeft: iconSpace + 'px',
            marginRight: iconSpace + 'px',
            color: item.iconColor
          }
        }, !!item.icon ? item.icon in ICONS_SET_NEW ? /*#__PURE__*/React.createElement("svg", {
          width: iconSize - 6,
          height: iconSize - 6,
          viewBox: "0 0 50 50"
        }, ICONS_SET_NEW[item.icon]) : /*#__PURE__*/React.createElement("img", {
          src: item.icon,
          alt: __('Social link icon', 'advanced-gutenberg')
        }) : /*#__PURE__*/React.createElement("svg", {
          width: iconSize - 6,
          height: iconSize - 6,
          viewBox: "0 0 24 24"
        }, socialBlockIconContent));
      })));
    },
    deprecated: [{
      attributes: _objectSpread(_objectSpread({}, socialBlockAttrs), {}, {
        iconSize: {
          type: "number",
          default: 24
        }
      }),
      save: function save(_ref3) {
        var attributes = _ref3.attributes;
        var items = attributes.items,
          align = attributes.align,
          iconSize = attributes.iconSize,
          iconSpace = attributes.iconSpace;
        return /*#__PURE__*/React.createElement("div", {
          className: "advgb-social-links-block",
          style: {
            textAlign: align
          }
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-social-icons"
        }, items.map(function (item, index) {
          return /*#__PURE__*/React.createElement("a", {
            key: index,
            className: "advgb-social-icon",
            href: item.link || '#',
            target: "_blank",
            rel: "noopener noreferrer",
            style: {
              width: iconSize + 'px',
              height: iconSize + 'px',
              marginLeft: iconSpace + 'px',
              marginRight: iconSpace + 'px',
              color: item.iconColor
            }
          }, !!item.icon ? item.icon in ICONS_SET_NEW ? /*#__PURE__*/React.createElement("svg", {
            width: iconSize - 6,
            height: iconSize - 6,
            viewBox: "0 0 50 50"
          }, ICONS_SET_NEW[item.icon]) : /*#__PURE__*/React.createElement("img", {
            src: item.icon,
            alt: __('Social link icon', 'advanced-gutenberg')
          }) : /*#__PURE__*/React.createElement("svg", {
            width: iconSize - 6,
            height: iconSize - 6,
            viewBox: "0 0 24 24"
          }, React.createElement(Fragment, null, React.createElement("path", {
            fill: "none",
            d: "M0,0h24v24H0V0z"
          }), React.createElement("path", {
            d: "M18,16.08c-0.76,0-1.44,0.3-1.96,0.77L8.91,12.7C8.96,12.47,9,12.24,9,12s-0.04-0.47-0.09-0.7l7.05-4.11\r C16.5,7.69,17.21,8,18,8c1.66,0,3-1.34,3-3c0-1.66-1.34-3-3-3s-3,1.34-3,3c0,0.24,0.04,0.47,0.09,0.7L8.04,9.81\r C7.5,9.31,6.79,9,6,9c-1.66,0-3,1.34-3,3c0,1.66,1.34,3,3,3c0.79,0,1.5-0.31,2.04-0.81l7.12,4.16c-0.05,0.21-0.08,0.43-0.08,0.65\r c0,1.61,1.31,2.92,2.92,2.92s2.92-1.31,2.92-2.92C20.92,17.39,19.61,16.08,18,16.08z M18,4c0.55,0,1,0.45,1,1s-0.45,1-1,1\r s-1-0.45-1-1S17.45,4,18,4z M6,13c-0.55,0-1-0.45-1-1s0.45-1,1-1s1,0.45,1,1S6.55,13,6,13z M18,20.02c-0.55,0-1-0.45-1-1\r s0.45-1,1-1s1,0.45,1,1S18.55,20.02,18,20.02z"
          }))));
        })));
      }
    }]
  });
})(wp.i18n, wp.blocks, wp.element, wp.blockEditor, wp.components);

/***/ },

/***/ "./assets/blocks/summary/block.jsx"
/*!*****************************************!*\
  !*** ./assets/blocks/summary/block.jsx ***!
  \*****************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var latinize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! latinize */ "./node_modules/latinize/latinize.js");
/* harmony import */ var latinize__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(latinize__WEBPACK_IMPORTED_MODULE_0__);
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }

(function (wpI18n, wpBlocks, wpElement, wpBlockEditor, wpComponents, wpData, wpHooks) {
  wpBlockEditor = wp.blockEditor || wp.editor;
  var __ = wpI18n.__;
  var Component = wpElement.Component,
    Fragment = wpElement.Fragment;
  var registerBlockType = wpBlocks.registerBlockType,
    getBlockContent = wpBlocks.getBlockContent,
    createBlock = wpBlocks.createBlock;
  var _wpBlockEditor = wpBlockEditor,
    BlockControls = _wpBlockEditor.BlockControls,
    InspectorControls = _wpBlockEditor.InspectorControls,
    InspectorAdvancedControls = _wpBlockEditor.InspectorAdvancedControls,
    PanelColorSettings = _wpBlockEditor.PanelColorSettings,
    BlockAlignmentToolbar = _wpBlockEditor.BlockAlignmentToolbar;
  var ToolbarButton = wpComponents.ToolbarButton,
    Placeholder = wpComponents.Placeholder,
    Button = wpComponents.Button,
    ToolbarGroup = wpComponents.ToolbarGroup,
    ToggleControl = wpComponents.ToggleControl,
    TextControl = wpComponents.TextControl,
    PanelBody = wpComponents.PanelBody;
  var select = wpData.select,
    dispatch = wpData.dispatch;
  var addFilter = wpHooks.addFilter;
  var summaryBlockIcon = /*#__PURE__*/React.createElement("svg", {
    height: "20",
    viewBox: "2 2 22 22",
    width: "20",
    xmlns: "http://www.w3.org/2000/svg"
  }, /*#__PURE__*/React.createElement("path", {
    d: "M14 17H4v2h10v-2zm6-8H4v2h16V9zM4 15h16v-2H4v2zM4 5v2h16V5H4z"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M0 0h24v24H0z",
    fill: "none"
  }));
  var previewImageData = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAADyCAYAAABkv9hQAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAACKpJREFUeNrs3UFsFHsdwPGZ3e0rrRRIm5VHrL1xIkFOpiaUePTg1USNB48kJiQeXvTGwZjAkQOBCDdCTOSuROVEMATlYEE4gKQmJYZUStxaamE7407fgtNlZtud3YVt9/NJJm3hPXaZ6be//+zsLkEAAAAAAAAAAABDJOzXH1ypVPp+G7CHxO8+qdfrgx16M+6wg9vwQ4ChDXoHvxf3KvrwIwQe5tyWyBH71q/jjN+PezHlwz5EHrbEnRW6yBH71s+zYo97Nd3DHkYe5myCh+0neesWZH1dNPawj5GXtgkfRP9h4FFO+F3FXunBsj8r7uRjaWZmpnzz5s3ZarX6zVKp9JU4jsPG9uW9bXzuWDOMwjDcDHp1dfXvly9f/v25c+dqqcjDluCjlh8OYdD+Ab3eTfTGNM+LfHM7derUZzdu3PjxoUOHftYI/HOHFnLGehy/WV9fv3n9+vWfnz59+p/NsLO2LZO9MdXjvoaeWrJnRV5OPq6srPxq375933cYYWeiKPrXvXv3fjQ3N/fnxpcbzbg38mLvNPRyp3eoMaHT0zy9VE/+rPLS0tIX+/fv/4lDBx0t58ePHDny7YWFhV/Pz8+/bXM+/77Dxg+HnXfbxfn5B9P8ypUrnx88ePCnDht0rlwuT589e/Z774Zm+nQ4yH5Quz8TvWXZXmpZspcvXbr0w8Y0/65DBsWMj4/PNJblv71z587r1iketFxbb0z1YKdTvdOJnvVst/fBT0xMfMuhguIaw3R6dnb26xlTPX2q3LEiS/e8a+eNlUfZI+zQheQy9NjY2EQq8nKQ/eSzjpbwpS7uU9b1c6BLGxsbpZxJXrixbh6Maw2+5Ekw0JPQWx8DC4MuH4zr1UTv6qcN8H9RFOW9bqT/Ez3njSS23Il3T28FimuujLeLPOxL6Nss34HehR60meAf7VH3dlMd6F7Y5hS5UOylLu6AKQ8fL/iulAbljgD9a6tkf8LeJ3QQOrAXVAb9Dq6vrwdLS0uO1AA4cODA5obQey55Gd7a2pojNQDGx8czfz05PmNjY3aQpTt71du3b4O7d+8GCwsLdobQ2avm5+c3J/qTJ0+CWq1mhwidvWZxcTF48eLF+8meRI/Q2UOSKf748eMtv5ZM9EePHtk5QmevuH///uYUb5Wcqy8vL9tBA6ZiF1DEyZMn7QSh987o6GgwPT3tSA3CN0vFXBB6v84tSiXXaME5OiB0QOggdEDogNABoQNCB4QOCB0QOgyXoXuVQvKa6Xq97sgXkLzmwOsOhL5rQvdmk8VMTU0J3dIdEDogdEDogNCBdobuUffkPego+M3iPeOEvltUq1VHHUt3QOiA0AGhA0IHhA4IHRA6CB0QOiB0QOjAJ+blSG0sLi56f7k+SN53bnp62o4w0QGhA0IHhA5CB4QO7EIur7WRvL9cFEV2RK+nS8l8EfoA8Y6xWLoDQgeEDggdEDogdEDoIHRA6MAu5JlxfVSr1YJ6vW5HdGhiYiIYGRmxI4S+e0L3VlSdS95qSuiW7oDQAaGD0AGhA0IHBpPLa33kXyPBRAeEDggdEDogdBA6IHRA6IDQAaEDQgeEDmQbmhe1LC8vBy9fvnTEOzQ1NRVMTk7aESY6IHRA6IDQAaEDQgc2Dc3lteSf+UkuFdH5fkPou+ob1jctlu6A0AGhA0IHhA4IHRA6IHRA6CB0QOiA0AGhA0IHhA4IHRA6CB0QOiB0QOiA0AGhA0IHhA5CB4QOCB0QOiB0QOiA0AGhg9DtAhA6IHRgN6gM4p1aXFwM1tbWHJ0OTU1NBZOTk3YEJjoIHRA6IHRA6IDQgb4ZyMtr1Wo1iKLI0en0YFYqdgK7J/TR0VFHBizdAaEDQgehA0IHhA4IHRA6IHSgmIF8ZlytVgvq9bqjw641aO/0M7CheysphG7pDggdEDoIHRA6IHRg8Azk5bXp6WlHBkx0QOiA0EHogNABoQNCB4QOCB0oZiCfGbe+vu4fWWRgjI2NCb0flpaWvMMMA+Po0aOW7oDQAaEDQgeEDggdaBrIy2vVatV1dNjroY+OjjoyYOkOCB0QOggdEDowfKHHdiH0RfwpQ9/uxjccH+gu8CiK4l7H3oule/xue/PmzQvHCYrb2NhYffXq1X+y+upm2pe6jHuLZ8+e/c6hguJev379t2vXri3kNFZ4wu849Hq9nnVj6Z828YULF/7UWHasOlxQzIMHD35z+/bt161tpbortKwPO/mPK5VK2Px/kh8Q5dSWPJX2s8Y20riT35mdnb3ikEFnVldX52dmZn5Qq9XeNr5s3erNLXkcLGpucWMA7yj4bpfu6W3zxufm5v7w9OnTXwYemIMdW1lZ+cv58+e/aEReT4ec+hjnnK/vSLmjdX6p9G6it26l5rb5+cWLF/96+PDhPx47duwbIyMjX3UYIVvy4NvDhw8vnDhx4he3bt16lZrYG6ktygh+005f5Vlk6R6kwk4v4UeaS/j3WyPyypkzZ752/PjxI43PP4vjOGxujjDDLnr+/Pm/r169+o/GCvi/qbjrqY/1lmV7lAo/bi7d+xJ6kDHF0+fp6S19Dp+e+GGR24Y9IuvB7Khlitdbto2W0ONOQ+/o9ejJH9qMvfVOhhnn5OllhtDhw9jbhZ63bN/S446HdA/vaNgm+NbQRY7Y80NvjTzrAbmOVArewTD1eZQxodN/gZKJDrmDMmoTe5Qx1bNOAfo20bPONaKcv0gpdU4vdMheEccZYedO806W7YVCb56n5031OOPcPMxZtgsdoWdP9bhN6B1P865iS11qS38M28QtdMgOPc6JPvMpsJ1O865jS8UetIl6u8AFz7AFHrSEnhd9TyLvSWQ5sQdtAhc2ZF9Pb/t50ch7Fl3qiTRBm6hDUxxyJ3vWsj7oReQ9DS71RJrtluYih+2D70ngfY8uY8p/1NuHXRJ30K+4P2loqckPQ60fQQMAAAAAAAAAAA3/E2AAgLPse1bmMt4AAAAASUVORK5CYII=';
  var summaryBlockTitle = __('Table of Contents - PublishPress', 'advanced-gutenberg');

  // Add button to insert summary inside table of contents component
  (function () {
    jQuery(window).on('load', function () {
      if (!dispatch('core/editor') || typeof dispatch('core/editor') === 'undefined') {
        return false;
      }
      var $ = jQuery;
      var _dispatch = dispatch('core/editor'),
        insertBlock = _dispatch.insertBlock;
      if (select('core/blocks').getBlockType('advgb/summary')) {
        var _summaryBlock = createBlock('advgb/summary');
      }
      $('#editor').find('.table-of-contents').click(function () {
        var allBlocks = select('core/block-editor').getBlocks();
        var summaryBlockExist = !!allBlocks.filter(function (block) {
          return block.name === 'advgb/summary';
        }).length;
        setTimeout(function () {
          var summaryButton = $('<button class="button" style="position: absolute; bottom: 10px; right: 15px">' + __('Insert Table of Contents', 'advanced-gutenberg') + '</button>');
          $('#editor').find('.table-of-contents__popover').find('.document-outline').append(summaryButton);
          summaryButton.unbind('click').click(function () {
            insertBlock(summaryBlock, 0);
            $('.table-of-contents__popover').hide();
          });
          if (summaryBlockExist) {
            summaryButton.prop('disabled', true);
          }
        }, 100);
      });
    });
  })();

  // Add notice for user to refresh summary if manually change heading anchor
  addFilter('editor.BlockEdit', 'advgb/addHeadingNotice', function (BlockEdit) {
    return function (props) {
      var isSelected = props.isSelected,
        blockType = props.name,
        attributes = props.attributes;
      return [/*#__PURE__*/React.createElement(BlockEdit, _extends({
        key: "block-edit-summary"
      }, props)), isSelected && blockType === 'core/heading' && attributes.nodeName !== 'H1' && /*#__PURE__*/React.createElement(InspectorAdvancedControls, {
        key: "advgb-summary-controls-hint"
      }, /*#__PURE__*/React.createElement("p", {
        style: {
          color: 'red',
          fontStyle: 'italic'
        }
      }, __('After manually changing the anchor, remember to refresh Table of Contents block to make the links work!', 'advanced-gutenberg')))];
    };
  });
  var SummaryBlock = /*#__PURE__*/function (_Component) {
    function SummaryBlock() {
      var _this;
      _classCallCheck(this, SummaryBlock);
      _this = _callSuper(this, SummaryBlock, arguments);
      _this.state = {
        isBlockIdSet: false // @since 3.2.3
      };
      _this.updateSummary = _this.updateSummary.bind(_this);
      _this.latinise = _this.latinise.bind(_this);
      return _this;
    }
    _inherits(SummaryBlock, _Component);
    return _createClass(SummaryBlock, [{
      key: "componentWillMount",
      value: function componentWillMount() {
        var _this$props = this.props,
          attributes = _this$props.attributes,
          setAttributes = _this$props.setAttributes;
        var currentBlockConfig = advgbDefaultConfig['advgb-summary'];

        // No override attributes of blocks inserted before
        if (attributes.changed !== true) {
          if (_typeof(currentBlockConfig) === 'object' && currentBlockConfig !== null) {
            Object.keys(currentBlockConfig).map(function (attribute) {
              if (typeof attributes[attribute] === 'boolean') {
                attributes[attribute] = !!currentBlockConfig[attribute];
              } else {
                attributes[attribute] = currentBlockConfig[attribute];
              }
            });
          }

          // Finally set changed attribute to true, so we don't modify anything again
          setAttributes({
            changed: true
          });
        }
      }
    }, {
      key: "componentDidMount",
      value: function componentDidMount() {}
    }, {
      key: "componentDidUpdate",
      value: function componentDidUpdate() {
        var _this$props2 = this.props,
          setAttributes = _this$props2.setAttributes,
          clientId = _this$props2.clientId;

        // @since 3.2.3 - https://github.com/publishpress/PublishPress-Blocks/issues/1389
        if (!this.state.isBlockIdSet) {
          setAttributes({
            blockIDX: "advgb-summary-".concat(clientId)
          });
          this.updateSummary();
          this.setState({
            isBlockIdSet: true
          });
        }
      }
    }, {
      key: "latinise",
      value: function latinise(str) {
        var lettersArr = str.split('');
        var result = [];
        lettersArr.map(function (letter) {
          if (typeof latinMap[letter] === "undefined") {
            result.push(letter);
          } else {
            result.push(latinMap[letter]);
          }
        });
        return result.join('');
      }
    }, {
      key: "updateSummary",
      value: function updateSummary() {
        var headingDatas = [];
        var headingBlocks = [];
        var allBlocks = select('core/block-editor').getBlocks();
        var filteredBlocks = allBlocks.filter(function (block) {
          return block.name === 'core/heading' || block.name === 'core/columns' || block.name === 'core/cover' || block.name === 'core/group' || block.name === 'advgb/accordions';
        });
        filteredBlocks.map(function (block) {
          if (block.name === 'core/columns' || block.name === 'core/cover' || block.name === 'core/group') {
            SummaryBlock.getHeadingBlocksFromColumns(block, headingBlocks);
          } else if (block.name === 'advgb/accordions' && advgbBlocks.advgb_pro === '1' // Only in Pro
          ) {
            SummaryBlock.getHeadingsfromAccordion(block, headingBlocks);
          } else {
            headingBlocks.push(block);
          }
          return block;
        });
        headingBlocks.map(function (heading) {
          var thisHead = {};
          thisHead['level'] = parseInt(heading.attributes.level);

          // We only get heading from h2
          if (thisHead['level'] > 1) {
            thisHead['level'] -= 1;
            thisHead['content'] = heading.attributes.content.length ? getBlockContent(heading).replace(/<(?:.|\n)*?>/gm, '') : '';
            var lowerHead = unescape(thisHead['content'].toLowerCase());
            var headId = lowerHead.replace(/[!@#$%^&*()\/\\,?":{}|<>]/g, "");
            headId = headId.replace(/(amp;)+/g, "");
            headId = latinize__WEBPACK_IMPORTED_MODULE_0___default()(headId).replace(/\./g, ' ').replace(/[^\w ]+/g, '').replace(/ +/g, '-');
            headId = headId + '-' + heading.clientId;
            thisHead['clientId'] = heading.clientId;
            if (heading.attributes.anchor) {
              thisHead['anchor'] = heading.attributes.anchor;
            } else {
              // Generate a random anchor for headings without it
              thisHead['anchor'] = headId;
              heading.attributes.anchor = thisHead['anchor'];
            }
            headingDatas.push(thisHead);
          }
          return heading;
        });
        this.props.setAttributes({
          headings: headingDatas
        });
      }
    }, {
      key: "render",
      value: function render() {
        var _this$props3 = this.props,
          attributes = _this$props3.attributes,
          isSelected = _this$props3.isSelected,
          setAttributes = _this$props3.setAttributes;
        var headings = attributes.headings,
          loadMinimized = attributes.loadMinimized,
          anchorColor = attributes.anchorColor,
          align = attributes.align,
          headerTitle = attributes.headerTitle,
          isPreview = attributes.isPreview;

        // No heading blocks
        var summaryContent = isPreview ? /*#__PURE__*/React.createElement("img", {
          alt: __('Table of Contents', 'advanced-gutenberg'),
          width: "100%",
          src: previewImageData
        }) : /*#__PURE__*/React.createElement(Placeholder, {
          icon: summaryBlockIcon,
          label: summaryBlockTitle,
          instructions: __('Your current post/page has no headings. Try add some headings and update this block later', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(Button, {
          onClick: this.updateSummary,
          className: 'button'
        }, __('Update', 'advanced-gutenberg')));

        // Having heading blocks
        if (headings.length > 0) {
          var _dispatch2 = dispatch('core/block-editor'),
            selectBlock = _dispatch2.selectBlock;
          summaryContent = /*#__PURE__*/React.createElement("ul", {
            className: "advgb-toc"
          }, headings.map(function (heading) {
            return /*#__PURE__*/React.createElement("li", {
              className: 'toc-level-' + heading.level,
              style: {
                marginLeft: heading.level * 20
              },
              key: heading.anchor
            }, /*#__PURE__*/React.createElement("a", {
              href: '#' + heading.anchor,
              onClick: function onClick() {
                return selectBlock(heading.clientId);
              },
              style: {
                color: anchorColor
              }
            }, heading.content));
          }));
        }
        return /*#__PURE__*/React.createElement(Fragment, null, !!headings.length && /*#__PURE__*/React.createElement(BlockControls, null, /*#__PURE__*/React.createElement(BlockAlignmentToolbar, {
          value: align,
          onChange: function onChange(align) {
            return setAttributes({
              align: align
            });
          }
        }), /*#__PURE__*/React.createElement(ToolbarGroup, null, /*#__PURE__*/React.createElement(ToolbarButton, {
          className: 'components-icon-button components-toolbar__control',
          icon: 'update',
          label: __('Update Table of Contents', 'advanced-gutenberg'),
          onClick: this.updateSummary
        }))), /*#__PURE__*/React.createElement(InspectorControls, null, /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Table of Contents settings', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Load minimized', 'advanced-gutenberg'),
          checked: !!loadMinimized,
          onChange: function onChange() {
            return setAttributes({
              loadMinimized: !loadMinimized,
              postTitle: select('core/editor').getEditedPostAttribute('title')
            });
          }
        }), loadMinimized && /*#__PURE__*/React.createElement(TextControl, {
          label: __('Table of Contents header title', 'advanced-gutenberg'),
          value: headerTitle || '',
          placeholder: __('Enter header…', 'advanced-gutenberg'),
          onChange: function onChange(value) {
            return setAttributes({
              headerTitle: value
            });
          }
        }), /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Anchor Color', 'advanced-gutenberg'),
          initialOpen: false,
          colorSettings: [{
            label: __('Anchor Color', 'advanced-gutenberg'),
            value: anchorColor,
            onChange: function onChange(value) {
              return setAttributes({
                anchorColor: value
              });
            }
          }]
        }))), summaryContent);
      }
    }], [{
      key: "getHeadingBlocksFromColumns",
      value:
      /**
       * Function to get heading blocks from columns blocks
       *
       * @param block     array Columns block to get data
       * @param storeData array Data array to store heading blocks
       *
       * @returns array   array Heading blocks from block given
       */
      function getHeadingBlocksFromColumns(block, storeData) {
        if (block.name === 'core/columns' || block.name === 'core/column' || block.name === 'core/cover' || block.name === 'core/group') {
          block.innerBlocks.map(function (bl) {
            SummaryBlock.getHeadingBlocksFromColumns(bl, storeData);
            return bl;
          });
        } else if (block.name === 'core/heading') {
          storeData.push(block);
        }
        return storeData;
      }

      /**
       * Function to get headings from accordions blocks
       *
       * @since 3.1.2
       *
       * @param block     array Columns block to get data
       * @param storeData array Data array to store heading blocks
       *
       * @returns array   array Headings from block given
       */
    }, {
      key: "getHeadingsfromAccordion",
      value: function getHeadingsfromAccordion(block, storeData) {
        block.innerBlocks.map(function (item) {
          if (item.name === 'advgb/accordion-item') {
            var content = item.attributes.header || null;
            var level = item.attributes.headerTag ? parseInt(item.attributes.headerTag.substring(1)) : 3;
            if (content) {
              // Create a valid heading block
              var block_ = wp.blocks.createBlock('core/heading', {
                content: content,
                level: level
              });

              // Add anchor attribute
              if (item.attributes.anchor) {
                block_.attributes = _extends(block_.attributes, {
                  anchor: item.attributes.anchor
                });
              }
              storeData.push(block_);
            }
          }
        });
      }
    }]);
  }(Component);
  var blockAttrs = {
    headings: {
      type: 'array',
      default: []
    },
    loadMinimized: {
      type: 'boolean',
      default: false
    },
    anchorColor: {
      type: 'string'
    },
    align: {
      type: 'string',
      default: 'none'
    },
    postTitle: {
      type: 'string'
    },
    headerTitle: {
      type: 'string'
    },
    changed: {
      type: 'boolean',
      default: false
    },
    isPreview: {
      type: 'boolean',
      default: false
    },
    blockIDX: {
      type: 'string'
    }
  };
  registerBlockType('advgb/summary', {
    apiVersion: 3,
    title: summaryBlockTitle,
    description: __('Show the table of contents of current post/page.', 'advanced-gutenberg'),
    icon: {
      src: summaryBlockIcon,
      foreground: typeof advgbBlocks !== 'undefined' ? advgbBlocks.color : undefined
    },
    category: 'advgb-category',
    keywords: [__('summary', 'advanced-gutenberg'), __('table of content', 'advanced-gutenberg'), __('table of contents', 'advanced-gutenberg'), __('list', 'advanced-gutenberg')],
    attributes: blockAttrs,
    example: {
      attributes: {
        isPreview: true
      }
    },
    supports: {
      multiple: false,
      anchor: true
    },
    edit: SummaryBlock,
    save: function save(_ref) {
      var attributes = _ref.attributes;
      var headings = attributes.headings,
        loadMinimized = attributes.loadMinimized,
        anchorColor = attributes.anchorColor,
        _attributes$align = attributes.align,
        align = _attributes$align === void 0 ? 'none' : _attributes$align,
        postTitle = attributes.postTitle,
        headerTitle = attributes.headerTitle;
      // No heading blocks
      if (headings.length < 1) {
        return null;
      }
      var blockStyle = undefined;
      if (loadMinimized) blockStyle = {
        display: 'none'
      };
      var summary = /*#__PURE__*/React.createElement("ul", {
        className: "advgb-toc align".concat(align),
        style: blockStyle
      }, headings.map(function (heading, index) {
        return /*#__PURE__*/React.createElement("li", {
          className: 'toc-level-' + heading.level,
          key: "summary-save-".concat(index)
        }, /*#__PURE__*/React.createElement("a", {
          href: '#' + heading.anchor,
          style: {
            color: anchorColor
          }
        }, heading.content));
      }));
      if (loadMinimized) {
        return /*#__PURE__*/React.createElement("div", {
          className: "align".concat(align)
        }, /*#__PURE__*/React.createElement("div", {
          className: 'advgb-toc-header collapsed'
        }, headerTitle || postTitle), summary);
      }
      return summary;
    },
    getEditWrapperProps: function getEditWrapperProps(attributes) {
      var align = attributes.align;
      var props = {
        'data-resized': true
      };
      if ('left' === align || 'right' === align || 'center' === align) {
        props['data-align'] = align;
      }
      return props;
    },
    deprecated: [{
      attributes: {
        headings: {
          type: 'array',
          default: []
        },
        loadMinimized: {
          type: 'boolean',
          default: false
        },
        anchorColor: {
          type: 'string'
        },
        align: {
          type: 'string',
          default: 'none'
        },
        postTitle: {
          type: 'string'
        },
        headerTitle: {
          type: 'string'
        },
        changed: {
          type: 'boolean',
          default: false
        },
        isPreview: {
          type: 'boolean',
          default: false
        }
      },
      save: function save(_ref2) {
        var attributes = _ref2.attributes;
        var headings = attributes.headings,
          loadMinimized = attributes.loadMinimized,
          anchorColor = attributes.anchorColor,
          _attributes$align2 = attributes.align,
          align = _attributes$align2 === void 0 ? 'none' : _attributes$align2,
          postTitle = attributes.postTitle,
          headerTitle = attributes.headerTitle;
        // No heading blocks
        if (headings.length < 1) {
          return null;
        }
        var blockStyle = undefined;
        if (loadMinimized) blockStyle = {
          display: 'none'
        };
        var summary = /*#__PURE__*/React.createElement("ul", {
          className: "advgb-toc align".concat(align),
          style: blockStyle
        }, headings.map(function (heading, index) {
          return /*#__PURE__*/React.createElement("li", {
            className: 'toc-level-' + heading.level,
            key: "summary-save-".concat(index)
          }, /*#__PURE__*/React.createElement("a", {
            href: '#' + heading.anchor,
            style: {
              color: anchorColor
            }
          }, heading.content));
        }));
        if (loadMinimized) {
          return /*#__PURE__*/React.createElement("div", {
            className: "align".concat(align)
          }, /*#__PURE__*/React.createElement("div", {
            className: 'advgb-toc-header collapsed'
          }, headerTitle || postTitle), summary);
        }
        return summary;
      }
    }, {
      attributes: blockAttrs,
      save: function save(_ref3) {
        var attributes = _ref3.attributes;
        var headings = attributes.headings,
          loadMinimized = attributes.loadMinimized,
          anchorColor = attributes.anchorColor,
          _attributes$align3 = attributes.align,
          align = _attributes$align3 === void 0 ? 'none' : _attributes$align3,
          postTitle = attributes.postTitle,
          headerTitle = attributes.headerTitle;
        // No heading blocks
        if (headings.length < 1) {
          return null;
        }
        var blockStyle = undefined;
        if (loadMinimized) blockStyle = {
          display: 'none'
        };
        var summary = /*#__PURE__*/React.createElement("ul", {
          className: "advgb-toc align".concat(align),
          style: blockStyle
        }, headings.map(function (heading, index) {
          return /*#__PURE__*/React.createElement("li", {
            className: 'toc-level-' + heading.level,
            key: "summary-save-".concat(index),
            style: {
              marginLeft: heading.level * 20
            }
          }, /*#__PURE__*/React.createElement("a", {
            href: '#' + heading.anchor
          }, heading.content));
        }), anchorColor && /*#__PURE__*/React.createElement("style", null, ".advgb-toc li a {\n                                    color: ".concat(anchorColor, ";\n                                }")));
        if (loadMinimized) {
          return /*#__PURE__*/React.createElement("div", {
            className: "align".concat(align)
          }, /*#__PURE__*/React.createElement("div", {
            className: 'advgb-toc-header collapsed'
          }, headerTitle || postTitle), summary);
        }
        return summary;
      }
    }, {
      attributes: blockAttrs,
      save: function save(_ref4) {
        var attributes = _ref4.attributes;
        var summary = /*#__PURE__*/React.createElement("ul", {
          className: "advgb-toc align".concat(align),
          style: blockStyle
        }, headings.map(function (heading, index) {
          return /*#__PURE__*/React.createElement("li", {
            className: 'toc-level-' + heading.level,
            key: "summary-save-".concat(index),
            style: {
              marginLeft: heading.level * 20
            }
          }, /*#__PURE__*/React.createElement("a", {
            href: '#' + heading.anchor,
            style: {
              color: anchorColor
            }
          }, heading.content));
        }));
      }
    }]
  });
})(wp.i18n, wp.blocks, wp.element, wp.blockEditor, wp.components, wp.data, wp.hooks);

/***/ },

/***/ "./assets/blocks/tabs/block.jsx"
/*!**************************************!*\
  !*** ./assets/blocks/tabs/block.jsx ***!
  \**************************************/
() {

function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _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 _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
(function (wpI18n, wpBlocks, wpElement, wpBlockEditor, wpComponents) {
  wpBlockEditor = wp.blockEditor || wp.editor;
  var __ = wpI18n.__;
  var Component = wpElement.Component,
    Fragment = wpElement.Fragment;
  var registerBlockType = wpBlocks.registerBlockType,
    createBlock = wpBlocks.createBlock;
  var _wpBlockEditor = wpBlockEditor,
    InspectorControls = _wpBlockEditor.InspectorControls,
    RichText = _wpBlockEditor.RichText,
    PanelColorSettings = _wpBlockEditor.PanelColorSettings;
  var Dashicon = wpComponents.Dashicon,
    Tooltip = wpComponents.Tooltip,
    PanelBody = wpComponents.PanelBody,
    RangeControl = wpComponents.RangeControl,
    SelectControl = wpComponents.SelectControl;
  var AdvTabsBlock = /*#__PURE__*/function (_Component) {
    function AdvTabsBlock() {
      _classCallCheck(this, AdvTabsBlock);
      return _callSuper(this, AdvTabsBlock, arguments);
    }
    _inherits(AdvTabsBlock, _Component);
    return _createClass(AdvTabsBlock, [{
      key: "componentWillMount",
      value: function componentWillMount() {
        var _this$props = this.props,
          attributes = _this$props.attributes,
          setAttributes = _this$props.setAttributes;
        var currentBlockConfig = advgbDefaultConfig['advgb-tabs'];

        // No override attributes of blocks inserted before
        if (attributes.changed !== true) {
          if (_typeof(currentBlockConfig) === 'object' && currentBlockConfig !== null) {
            Object.keys(currentBlockConfig).map(function (attribute) {
              if (typeof attributes[attribute] === 'boolean') {
                attributes[attribute] = !!currentBlockConfig[attribute];
              } else {
                attributes[attribute] = currentBlockConfig[attribute];
              }
            });
          }

          // Finally set changed attribute to true, so we don't modify anything again
          setAttributes({
            changed: true
          });
        }
      }
    }, {
      key: "componentDidMount",
      value: function componentDidMount() {
        var _this = this;
        setTimeout(function () {
          return _this.initTabs();
        }, 100);
        if (!this.props.attributes.blockID) {
          this.props.setAttributes({
            blockID: this.props.clientId
          });
        }
      }
    }, {
      key: "componentDidUpdate",
      value: function componentDidUpdate(prevProps) {
        var prevItems = prevProps.attributes.tabItems;
        var tabItems = this.props.attributes.tabItems;
        if (prevItems !== tabItems) {
          this.initTabs(true);
        }
        if (tabItems.length === 0) {
          this.props.setAttributes({
            tabItems: [{
              header: 'Tab 1',
              body: 'At least one tab must remaining, to remove block use "Remove Block" button from right menu.'
            }]
          });
        }
      }
    }, {
      key: "initTabs",
      value: function initTabs() {
        var refresh = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
        if (typeof jQuery !== "undefined") {
          if (!refresh) {
            jQuery("#block-".concat(this.props.clientId, " .advgb-tabs-block")).tabs();
          } else {
            jQuery("#block-".concat(this.props.clientId, " .advgb-tabs-block")).tabs('refresh');
          }
          jQuery("#block-".concat(this.props.clientId, " .advgb-tabs-block a")).on('keydown', function (e) {
            e.stopPropagation();
          });
        }
      }
    }, {
      key: "updateTabs",
      value: function updateTabs(value, index) {
        var _this$props2 = this.props,
          attributes = _this$props2.attributes,
          setAttributes = _this$props2.setAttributes;
        var tabItems = attributes.tabItems;
        var newItems = tabItems.map(function (item, thisIndex) {
          if (index === thisIndex) {
            item = _objectSpread(_objectSpread({}, item), value);
          }
          return item;
        });
        setAttributes({
          tabItems: newItems
        });
      }
    }, {
      key: "render",
      value: function render() {
        var _this2 = this;
        var _this$props3 = this.props,
          attributes = _this$props3.attributes,
          setAttributes = _this$props3.setAttributes,
          clientId = _this$props3.clientId;
        var tabItems = attributes.tabItems,
          headerBgColor = attributes.headerBgColor,
          headerTextColor = attributes.headerTextColor,
          bodyBgColor = attributes.bodyBgColor,
          bodyTextColor = attributes.bodyTextColor,
          borderStyle = attributes.borderStyle,
          borderWidth = attributes.borderWidth,
          borderColor = attributes.borderColor,
          borderRadius = attributes.borderRadius,
          blockID = attributes.blockID,
          activeTabBgColor = attributes.activeTabBgColor,
          activeTabTextColor = attributes.activeTabTextColor;
        return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(InspectorControls, null, /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Tab Colors', 'advanced-gutenberg'),
          initialOpen: false,
          colorSettings: [{
            label: __('Background Color', 'advanced-gutenberg'),
            value: headerBgColor,
            onChange: function onChange(value) {
              return setAttributes({
                headerBgColor: value === undefined ? '#000' : value
              });
            }
          }, {
            label: __('Text Color', 'advanced-gutenberg'),
            value: headerTextColor,
            onChange: function onChange(value) {
              return setAttributes({
                headerTextColor: value === undefined ? '#fff' : value
              });
            }
          }, {
            label: __('Active Tab Background Color', 'advanced-gutenberg'),
            value: activeTabBgColor,
            onChange: function onChange(value) {
              return setAttributes({
                activeTabBgColor: value
              });
            }
          }, {
            label: __('Active Tab Text Color', 'advanced-gutenberg'),
            value: activeTabTextColor,
            onChange: function onChange(value) {
              return setAttributes({
                activeTabTextColor: value
              });
            }
          }]
        }), /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Body Colors', 'advanced-gutenberg'),
          initialOpen: false,
          colorSettings: [{
            label: __('Background Color', 'advanced-gutenberg'),
            value: bodyBgColor,
            onChange: function onChange(value) {
              return setAttributes({
                bodyBgColor: value
              });
            }
          }, {
            label: __('Text Color', 'advanced-gutenberg'),
            value: bodyTextColor,
            onChange: function onChange(value) {
              return setAttributes({
                bodyTextColor: value
              });
            }
          }]
        }), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Border Settings', 'advanced-gutenberg'),
          initialOpen: false
        }, /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Border Style', 'advanced-gutenberg'),
          value: borderStyle,
          options: [{
            label: __('Solid', 'advanced-gutenberg'),
            value: 'solid'
          }, {
            label: __('Dashed', 'advanced-gutenberg'),
            value: 'dashed'
          }, {
            label: __('Dotted', 'advanced-gutenberg'),
            value: 'dotted'
          }],
          onChange: function onChange(value) {
            return setAttributes({
              borderStyle: value
            });
          }
        }), /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Border Color', 'advanced-gutenberg'),
          initialOpen: false,
          colorSettings: [{
            label: __('Border Color', 'advanced-gutenberg'),
            value: borderColor,
            onChange: function onChange(value) {
              return setAttributes({
                borderColor: value
              });
            }
          }]
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Border width', 'advanced-gutenberg'),
          value: borderWidth,
          min: 1,
          max: 10,
          onChange: function onChange(value) {
            return setAttributes({
              borderWidth: value
            });
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Border radius', 'advanced-gutenberg'),
          value: borderRadius,
          min: 0,
          max: 100,
          onChange: function onChange(value) {
            return setAttributes({
              borderRadius: value
            });
          }
        }))), /*#__PURE__*/React.createElement("div", {
          className: "advgb-tabs-block",
          style: {
            border: 'none'
          }
        }, /*#__PURE__*/React.createElement("ul", {
          className: "advgb-tabs-panel"
        }, tabItems.map(function (item, index) {
          return /*#__PURE__*/React.createElement("li", {
            key: index,
            className: "advgb-tab",
            style: {
              backgroundColor: headerBgColor,
              borderStyle: borderStyle,
              borderWidth: borderWidth + 'px',
              borderColor: borderColor,
              borderRadius: borderRadius + 'px',
              margin: "-".concat(borderWidth, "px 0 -").concat(borderWidth, "px -").concat(borderWidth, "px")
            }
          }, /*#__PURE__*/React.createElement("a", {
            href: "#advgb-tab-".concat(blockID, "-").concat(index),
            style: {
              color: headerTextColor
            }
          }, /*#__PURE__*/React.createElement(RichText, {
            tagName: "p",
            value: item.header,
            onChange: function onChange(value) {
              return _this2.updateTabs({
                header: value || ''
              }, index);
            },
            unstableOnSplit: function unstableOnSplit() {
              return null;
            },
            placeholder: __('Title…', 'advanced-gutenberg')
          })), /*#__PURE__*/React.createElement(Tooltip, {
            text: __('Remove tab', 'advanced-gutenberg')
          }, /*#__PURE__*/React.createElement("span", {
            className: "advgb-tab-remove",
            onClick: function onClick() {
              return setAttributes({
                tabItems: tabItems.filter(function (vl, idx) {
                  return idx !== index;
                })
              });
            }
          }, /*#__PURE__*/React.createElement(Dashicon, {
            icon: "no"
          }))));
        }), /*#__PURE__*/React.createElement("li", {
          className: "advgb-tab advgb-add-tab ui-state-default",
          style: {
            borderRadius: borderRadius + 'px',
            borderWidth: borderWidth + 'px',
            margin: "-".concat(borderWidth, "px 0 -").concat(borderWidth, "px -").concat(borderWidth, "px")
          }
        }, /*#__PURE__*/React.createElement(Tooltip, {
          text: __('Add tab', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement("span", {
          onClick: function onClick() {
            return setAttributes({
              tabItems: [].concat(_toConsumableArray(tabItems), [{
                header: __('New Tab', 'advanced-gutenberg'),
                body: __('Enter your content.', 'advanced-gutenberg')
              }])
            });
          }
        }, /*#__PURE__*/React.createElement(Dashicon, {
          icon: "plus-alt"
        }))))), tabItems.map(function (item, index) {
          return /*#__PURE__*/React.createElement("div", {
            key: index,
            id: "advgb-tab-".concat(blockID, "-").concat(index),
            className: "advgb-tab-body",
            style: {
              backgroundColor: bodyBgColor,
              color: bodyTextColor,
              borderStyle: borderStyle,
              borderWidth: borderWidth + 'px',
              borderColor: borderColor,
              borderRadius: borderRadius + 'px'
            }
          }, /*#__PURE__*/React.createElement(RichText, {
            tagName: "p",
            value: item.body,
            onChange: function onChange(value) {
              return _this2.updateTabs({
                body: value
              }, index);
            },
            placeholder: __('Enter text…', 'advanced-gutenberg')
          }));
        })), !!blockID && /*#__PURE__*/React.createElement("style", null, activeTabBgColor && "#block-".concat(clientId, " li.advgb-tab.ui-tabs-active {\n                                background-color: ").concat(activeTabBgColor, " !important;\n                            }"), activeTabTextColor && "#block-".concat(clientId, " li.advgb-tab.ui-tabs-active a {\n                                color: ").concat(activeTabTextColor, " !important;\n                            }")));
      }
    }]);
  }(Component);
  var tabsBlockIcon = /*#__PURE__*/React.createElement("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    width: "20",
    height: "20",
    viewBox: "0 0 24 24"
  }, /*#__PURE__*/React.createElement("path", {
    fill: "none",
    d: "M0,0h24v24H0V0z"
  }), /*#__PURE__*/React.createElement("path", {
    fill: "none",
    d: "M0,0h24v24H0V0z"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M21,3H3C1.9,3,1,3.9,1,5v14c0,1.1,0.9,2,2,2h18c1.1,0,2-0.9,2-2V5C23,3.9,22.1,3,21,3z M21,19H3V5h10v4h8V19z"
  }));
  var tabBlockAttrs = {
    tabItems: {
      type: "array",
      default: [{
        header: __('Tab 1', 'advanced-gutenberg'),
        body: __('Filler text (also placeholder text or dummy text) is text that shares some characteristics of a real written text, but is random or otherwise generated.', 'advanced-gutenberg')
      }, {
        header: __('Tab 2', 'advanced-gutenberg'),
        body: __('Filler text (also placeholder text or dummy text) is text that shares some characteristics of a real written text, but is random or otherwise generated.', 'advanced-gutenberg')
      }, {
        header: __('Tab 3', 'advanced-gutenberg'),
        body: __('Filler text (also placeholder text or dummy text) is text that shares some characteristics of a real written text, but is random or otherwise generated.', 'advanced-gutenberg')
      }]
    },
    headerBgColor: {
      type: 'string',
      default: '#000'
    },
    headerTextColor: {
      type: 'string',
      default: '#fff'
    },
    bodyBgColor: {
      type: 'string'
    },
    bodyTextColor: {
      type: 'string'
    },
    borderStyle: {
      type: 'string',
      default: 'solid'
    },
    borderWidth: {
      type: 'number',
      default: 1
    },
    borderColor: {
      type: 'string'
    },
    borderRadius: {
      type: 'number',
      default: 2
    },
    blockID: {
      type: 'string'
    },
    activeTabBgColor: {
      type: 'string'
    },
    activeTabTextColor: {
      type: 'string'
    },
    changed: {
      type: 'boolean',
      default: false
    }
  };
  registerBlockType('advgb/tabs', {
    apiVersion: 3,
    title: __('Tabs (deprecated) - PublishPress', 'advanced-gutenberg'),
    description: __('Create horizontal or vertical tabs to display your content.', 'advanced-gutenberg'),
    icon: {
      src: tabsBlockIcon,
      foreground: typeof advgbBlocks !== 'undefined' ? advgbBlocks.color : undefined
    },
    category: "advgb-category",
    keywords: [__('tabs', 'advanced-gutenberg'), __('cards', 'advanced-gutenberg')],
    attributes: tabBlockAttrs,
    supports: {
      inserter: false
    },
    edit: AdvTabsBlock,
    save: function save(_ref) {
      var attributes = _ref.attributes;
      var tabItems = attributes.tabItems,
        headerBgColor = attributes.headerBgColor,
        headerTextColor = attributes.headerTextColor,
        bodyBgColor = attributes.bodyBgColor,
        bodyTextColor = attributes.bodyTextColor,
        borderStyle = attributes.borderStyle,
        borderWidth = attributes.borderWidth,
        borderColor = attributes.borderColor,
        borderRadius = attributes.borderRadius,
        blockID = attributes.blockID,
        activeTabBgColor = attributes.activeTabBgColor,
        activeTabTextColor = attributes.activeTabTextColor;
      return /*#__PURE__*/React.createElement("div", {
        id: "advgb-tabs-".concat(blockID),
        className: "advgb-tabs-block",
        style: {
          border: 'none'
        }
      }, /*#__PURE__*/React.createElement("ul", {
        className: "advgb-tabs-panel"
      }, tabItems.map(function (item, index) {
        return /*#__PURE__*/React.createElement("li", {
          key: index,
          className: "advgb-tab",
          style: {
            backgroundColor: headerBgColor,
            borderStyle: borderStyle,
            borderWidth: borderWidth + 'px',
            borderColor: borderColor,
            borderRadius: borderRadius + 'px',
            margin: "-".concat(borderWidth, "px 0 -").concat(borderWidth, "px -").concat(borderWidth, "px")
          }
        }, /*#__PURE__*/React.createElement("a", {
          href: "#advgb-tab-".concat(blockID, "-").concat(index),
          style: {
            color: headerTextColor
          }
        }, /*#__PURE__*/React.createElement(RichText.Content, {
          tagName: "span",
          value: item.header
        })));
      })), tabItems.map(function (item, index) {
        return /*#__PURE__*/React.createElement("div", {
          key: index,
          id: "advgb-tab-".concat(blockID, "-").concat(index),
          className: "advgb-tab-body",
          style: {
            backgroundColor: bodyBgColor,
            color: bodyTextColor,
            borderStyle: borderStyle,
            borderWidth: borderWidth + 'px',
            borderColor: borderColor,
            borderRadius: borderRadius + 'px'
          }
        }, /*#__PURE__*/React.createElement(RichText.Content, {
          tagName: "p",
          value: item.body
        }));
      }), !!blockID && /*#__PURE__*/React.createElement("style", null, activeTabBgColor && "#advgb-tabs-".concat(blockID, " li.advgb-tab.ui-tabs-active {\n                                background-color: ").concat(activeTabBgColor, " !important;\n                            }\n                            "), activeTabTextColor && "#advgb-tabs-".concat(blockID, " li.advgb-tab.ui-tabs-active a {\n                                color: ").concat(activeTabTextColor, " !important;\n                            }")));
    },
    transforms: {
      to: [{
        type: 'block',
        blocks: ['advgb/adv-tabs'],
        transform: function transform(attributes) {
          var innerTabs = [];
          var tabHeaders = [];
          attributes.tabItems.map(function (item) {
            var tabContent = createBlock('core/paragraph', {
              content: item.body
            });
            var tab = createBlock('advgb/tab', {
              tabActive: 0
            }, [tabContent]);
            tabHeaders.push(item.header);
            innerTabs.push(tab);
          });
          attributes.tabItems = undefined;
          return createBlock('advgb/adv-tabs', _objectSpread(_objectSpread({}, attributes), {}, {
            tabHeaders: tabHeaders,
            pid: "advgb-tabs-".concat(attributes.blockID),
            changed: false,
            isTransform: true
          }), innerTabs);
        }
      }]
    }
  });
})(wp.i18n, wp.blocks, wp.element, wp.blockEditor, wp.components);

/***/ },

/***/ "./assets/blocks/testimonial/block.jsx"
/*!*********************************************!*\
  !*** ./assets/blocks/testimonial/block.jsx ***!
  \*********************************************/
() {

function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
(function (wpI18n, wpBlocks, wpElement, wpBlockEditor, wpComponents, lodash) {
  wpBlockEditor = wp.blockEditor || wp.editor;
  var __ = wpI18n.__;
  var Component = wpElement.Component,
    Fragment = wpElement.Fragment;
  var registerBlockType = wpBlocks.registerBlockType;
  var _wpBlockEditor = wpBlockEditor,
    InspectorControls = _wpBlockEditor.InspectorControls,
    RichText = _wpBlockEditor.RichText,
    PanelColorSettings = _wpBlockEditor.PanelColorSettings,
    MediaUpload = _wpBlockEditor.MediaUpload;
  var RangeControl = wpComponents.RangeControl,
    ToggleControl = wpComponents.ToggleControl,
    SelectControl = wpComponents.SelectControl,
    PanelBody = wpComponents.PanelBody,
    Tooltip = wpComponents.Tooltip;
  var times = lodash.times;
  var PREV_ARROW = /*#__PURE__*/React.createElement("svg", {
    fill: "currentColor",
    xmlns: "http://www.w3.org/2000/svg",
    width: "100%",
    height: "100%",
    viewBox: "0 0 24 24"
  }, /*#__PURE__*/React.createElement("path", {
    d: "M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"
  }), /*#__PURE__*/React.createElement("path", {
    fill: "none",
    d: "M0 0h24v24H0V0z"
  }));
  var NEXT_ARROW = /*#__PURE__*/React.createElement("svg", {
    fill: "currentColor",
    xmlns: "http://www.w3.org/2000/svg",
    width: "100%",
    height: "100%",
    viewBox: "0 0 24 24"
  }, /*#__PURE__*/React.createElement("path", {
    d: "M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"
  }), /*#__PURE__*/React.createElement("path", {
    fill: "none",
    d: "M0 0h24v24H0V0z"
  }));
  var previewImageData = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAACECAYAAAC5xDaMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAB2tJREFUeNrs3c9rFGccx/FndmYTVzdiE5cQEVEoiPTQU3to8FAogrQUL9VbLyXn2kPv/hVCSU+C4CVCS/HQij2m1BakF6FQk0OqqCSGTdxhs9mZ7nc7I8+OM7szs7M7++P9gseJu5NdneQz3+d55scqBQAAAAAAAAAAAAAAAEwRo59vtiwrk9cB0JMrfxweHg4v6F7AjS6vQ/CBDIId8Xc3aeCNFAH3v8+I+JqgA9kG3dWa/lzswBsJQ64HuaCF3IgIPID+gu6GNCdp2I0UIS9oQddbMOwA+g+7Hm69+Y/FCruVsItvaCE3r1y5Mnvz5s0v5ubmPjZN85Q8Js+7rsuPCOiDYRjKcZxqrVb749GjRz9eunTpby/YTS+D/tLVlukrulbN3wRc2v37999dXl5ebT3/IT8WYKAOnzx5snL+/PkfvIAfesum3pXvVtULMau53lU3b926tXTx4sWfCDkwFNa5c+e+29jY+Kr1ddFrZpIhsxmzmvshlwes1dXVr0ul0qdsf2BoXXmzXC5/YNv2nfX1dVuFzMoXCgXp7qeq6MEZ9UKlUim2xuRfsumB4WoF+Z2VlZXPvIpuqfAjX6m77h1V/cGDB5+03vAUmx0YvoWFhY+8nrip3j7ild0YvfVG77O5gXwUi8VFr5oHg676DXow7DNsbiA3esBjT8YlHqO7rssJMUBOvPwVIrrtycfo2nntHaEn6EDuIifgQnL7/+MJXtjfo7CZx5Acdtnf31f1er3dfEePHlUzMzOqXC6zkcYv6Cpu191KEHLOYx9TOzs76tWrV6HHWG3bbi+LxaI6efIkgR/PsPdkJX11Kvr4kMr9/PnzjgoepdFoqGfPnqnjx4+rSqUix2zZgKMd8kSsYbwJ8gn51tZWRxWfnZ1VJ06cUKVSqV3BZR2p6Nvb22/Wq1ar7cdPnz5N2CeIxSaYzPG4VGc95FKpFxcXO9aT4EuT52Sn4Fd+Wb58+fKt9TG+2GVPIOmuS1fcJ+PubqGVyi0VXKq8Tyq7NBB0jCDpisvsuk4m2Xr+IrTCPj8/3/GYVPWoiyRA0JGj3d3dt7rneqXuJjjjLiGnqhN0jBjprgereZIJtbB1CTpBxwh227MmE3P6eB8EHSMY9DjH0HutO4gdCAg6+ui6ByUZZwfH9760nw4Cgo4BiKrIMnveq7J3O5yWpFcAgo4BizoUJo/LCTFhQZbn5Fx4OfYepdlssnHHHGfGTdFOQMIsofbPiKvVau1qzbFyKjrGSK/j5fK8XK8sFVpCLiTwvcRZB1R0DOuH2QpxcEJOToI5duxYe9ntmLp83+vXr99c1KIzTZONS9AxKuQmEv6hMAm2nPoa96w4WU+ubJMmr6FP4MnVbqDrjhEhgZSqLRewLC0txQ552OucOXOmfVWbvB5Bp6JjxIIuV6FlNaaWHYZUeFDRMWKynjhjIo6gAyDoAAg6AIIOgKADIOgACDpA0AEQdAAEHQBBB0DQARB0AAQdQDiuR8+R3L5pb29vKv6vwQ9wBEGfGvLBCNvb2wQddN0BEHQABB0AQQemBJNxOZIbL8pdWwGCPsndKe6ZDrruAAg6AIIOgKADBB0AQQdA0AEQdAAEHQBBB0DQARB0YEpxUcuYqVar7ZanSqXSvvIOBB0DIveZs20713+D4zj8IOi6AyDoAOi6o7u5ubncb1bB+JygY8CKxWK7AXTdARB0gKADIOgACDqAETRRs+7T9DHEGDw5jDkp992fqKBP08cQY/AWFhYmJuh03QHG6ADouo/af8ay2t0tIKsxOkEfQXJq6Pz8PL+hAF13gKADIOgApiXoLpsNmPCgO47TYLMB+XBd10lTbOME3dXb48ePf2NzA/mwbfvfQC6DX2dT0a9evfpno9HYZJMDw7e5ufl7SMjTV3Q5bzysou/t7TWfPn16h00ODFez2dy9fv36z8FM6mHXcpuooruBr2V84Fy+fPn7g4ODDTY9MLSxeePevXvfPnz4sObn0Guxuu9m13JfKBjaDsHwlubOzo4yDOPXCxculMrl8nvecwAGoF6vb929e/eba9eurUvR9lrDWza1wLtRH67RNaCWZRneOqbX5PajM347e/Zs6fbt25+3lstHjhxZ7LXjABBfqxu+/+LFi7/W1tZ+uXHjxj9esA+8kMuyrgVfAu+2vsdNE3SlBV2queWFvKgtLa/5VZ/qDmTUY9eGzH6Y9aAfeI/5Vd2JGqNbKd/QD7T+eEELO4Dsg+532Rt6uFWMw2tWj66DX9X9NzO8NwgG3QwEnbAD2YTc1ap2Uwv8YTDkUdU8bkXX9xTBkb6j/UOCFZ2wA+lDrhdYvzVV5wRc7IoeK4zepJy/vh9ovYrrjZAD2YVdL6Z64DsOr0VNwqUZoxvaHsbfgwS76wYVHci0oruBsboTyKFSMc6Oix1GbQZehQSbkAODHadHnQ3ndhubq7SBjAh88LUIOpBNVQ+r8LED3ncgA4En4MCQQp8k4JkG0ws9YQcGFPA04QYAAAAAAAAAAAAAAAAAAAAAAAAAAAD69J8AAwDy4cOYWRT5RgAAAABJRU5ErkJggg==';
  var AdvTestimonial = /*#__PURE__*/function (_Component) {
    function AdvTestimonial() {
      var _this;
      _classCallCheck(this, AdvTestimonial);
      _this = _callSuper(this, AdvTestimonial, arguments);
      _this.state = {
        currentEdit: ''
      };
      return _this;
    }
    _inherits(AdvTestimonial, _Component);
    return _createClass(AdvTestimonial, [{
      key: "componentWillMount",
      value: function componentWillMount() {
        var _this$props = this.props,
          attributes = _this$props.attributes,
          setAttributes = _this$props.setAttributes;
        var currentBlockConfig = advgbDefaultConfig['advgb-testimonial'];

        // No override attributes of blocks inserted before
        if (attributes.changed !== true) {
          if (_typeof(currentBlockConfig) === 'object' && currentBlockConfig !== null) {
            Object.keys(currentBlockConfig).map(function (attribute) {
              if (typeof attributes[attribute] === 'boolean') {
                attributes[attribute] = !!currentBlockConfig[attribute];
              } else {
                attributes[attribute] = currentBlockConfig[attribute];
              }
            });
          }

          // Finally set changed attribute to true, so we don't modify anything again
          setAttributes({
            changed: true
          });
        }
      }
    }, {
      key: "componentDidMount",
      value: function componentDidMount() {
        var _this$props2 = this.props,
          attributes = _this$props2.attributes,
          setAttributes = _this$props2.setAttributes,
          clientId = _this$props2.clientId;
        var pid = attributes.pid,
          sliderView = attributes.sliderView,
          sliderColumn = attributes.sliderColumn,
          sliderCenterMode = attributes.sliderCenterMode,
          sliderPauseOnHover = attributes.sliderPauseOnHover,
          sliderInfiniteLoop = attributes.sliderInfiniteLoop,
          sliderDotsShown = attributes.sliderDotsShown,
          sliderSpeed = attributes.sliderSpeed,
          sliderArrowShown = attributes.sliderArrowShown,
          sliderItemsToScroll = attributes.sliderItemsToScroll;
        if (sliderView) {
          jQuery("#block-".concat(clientId, " .advgb-testimonial.slider-view")).slick({
            infinite: sliderInfiniteLoop,
            centerMode: sliderCenterMode,
            slidesToShow: sliderColumn,
            slidesToScroll: Math.min(sliderItemsToScroll, sliderColumn),
            pauseOnHover: sliderPauseOnHover,
            dots: sliderDotsShown,
            arrows: sliderArrowShown,
            speed: sliderSpeed,
            prevArrow: jQuery("#block-".concat(clientId, " .advgb-slider-prev")),
            nextArrow: jQuery("#block-".concat(clientId, " .advgb-slider-next"))
          });
        }
      }
    }, {
      key: "componentWillUpdate",
      value: function componentWillUpdate(nextProps) {
        var _this$props3 = this.props,
          attributes = _this$props3.attributes,
          clientId = _this$props3.clientId;
        var sliderView = attributes.sliderView;
        if (this.sliderNeedReload(nextProps.attributes, this.props.attributes)) {
          if (sliderView) {
            jQuery("#block-".concat(clientId, " .advgb-testimonial.slick-initialized")).slick('unslick');
            jQuery("#block-".concat(clientId, " .advgb-testimonial")).removeAttr('tabindex').removeAttr('role').removeAttr('aria-describedby');
          }
        }
      }
    }, {
      key: "componentDidUpdate",
      value: function componentDidUpdate(prevProps) {
        var _this$props4 = this.props,
          setAttributes = _this$props4.setAttributes,
          attributes = _this$props4.attributes,
          clientId = _this$props4.clientId;
        var sliderView = attributes.sliderView,
          sliderColumn = attributes.sliderColumn,
          sliderCenterMode = attributes.sliderCenterMode,
          sliderPauseOnHover = attributes.sliderPauseOnHover,
          sliderInfiniteLoop = attributes.sliderInfiniteLoop,
          sliderDotsShown = attributes.sliderDotsShown,
          sliderSpeed = attributes.sliderSpeed,
          sliderArrowShown = attributes.sliderArrowShown,
          sliderItemsToScroll = attributes.sliderItemsToScroll;
        var needReload = this.sliderNeedReload(prevProps.attributes, this.props.attributes);
        var needUpdate = this.sliderNeedUpdate(prevProps.attributes, this.props.attributes);
        var slider = jQuery("#block-".concat(clientId, " .advgb-testimonial.slider-view"));
        var prevElm = jQuery("#block-".concat(clientId, " .advgb-slider-prev"));
        var nextElm = jQuery("#block-".concat(clientId, " .advgb-slider-next"));

        // @since 3.2.3 - https://github.com/publishpress/PublishPress-Blocks/issues/1389
        if (!this.state.isBlockIdSet) {
          setAttributes({
            pid: "advgb-testimonial-".concat(clientId)
          });
          this.setState({
            isBlockIdSet: true
          });
        }
        if (needReload) {
          if (sliderView) {
            slider.slick({
              infinite: sliderInfiniteLoop,
              centerMode: sliderCenterMode,
              slidesToShow: sliderColumn,
              slidesToScroll: Math.min(sliderItemsToScroll, sliderColumn),
              pauseOnHover: sliderPauseOnHover,
              dots: sliderDotsShown,
              arrows: sliderArrowShown,
              speed: sliderSpeed,
              prevArrow: prevElm,
              nextArrow: nextElm
            });
          }
        }
        if (needUpdate && sliderView) {
          slider.slick('slickSetOption', 'slidesToShow', sliderColumn);
          slider.slick('slickSetOption', 'slidesToScroll', sliderItemsToScroll);
          slider.slick('slickSetOption', 'centerMode', sliderCenterMode);
          slider.slick('slickSetOption', 'pauseOnHover', sliderPauseOnHover);
          slider.slick('slickSetOption', 'infinite', sliderInfiniteLoop);
          slider.slick('slickSetOption', 'dots', sliderDotsShown);
          slider.slick('slickSetOption', 'arrows', sliderArrowShown);
          slider.slick('slickSetOption', 'speed', sliderSpeed);
          slider.slick('slickSetOption', 'prevArrow', prevElm);
          slider.slick('slickSetOption', 'nextArrow', nextElm, true);
        }
      }
    }, {
      key: "sliderNeedReload",
      value: function sliderNeedReload(pa, ca) {
        var checkReload = ['sliderView', 'columns', 'avatarPosition', 'sliderCenterMode'];
        var reload = false;
        for (var _i = 0, _checkReload = checkReload; _i < _checkReload.length; _i++) {
          var checkProp = _checkReload[_i];
          if (pa[checkProp] !== ca[checkProp]) {
            reload = true;
            break;
          }
        }
        return reload;
      }
    }, {
      key: "sliderNeedUpdate",
      value: function sliderNeedUpdate(pa, ca) {
        var checkUpdate = ['sliderColumn', 'sliderItemsToScroll', 'sliderPauseOnHover', 'sliderAutoPlay', 'sliderInfiniteLoop', 'sliderDotsShown', 'sliderSpeed', 'sliderAutoPlaySpeed', 'sliderArrowShown'];
        var update = false;
        for (var _i2 = 0, _checkUpdate = checkUpdate; _i2 < _checkUpdate.length; _i2++) {
          var checkItem = _checkUpdate[_i2];
          if (pa[checkItem] !== ca[checkItem]) {
            update = true;
            break;
          }
        }
        return update;
      }
    }, {
      key: "updateItems",
      value: function updateItems(idx, data) {
        var _this$props5 = this.props,
          attributes = _this$props5.attributes,
          setAttributes = _this$props5.setAttributes;
        var items = attributes.items;
        var newItems = items.map(function (item, index) {
          if (idx === index) item = _objectSpread(_objectSpread({}, item), data);
          return item;
        });
        setAttributes({
          items: newItems
        });
      }
    }, {
      key: "render",
      value: function render() {
        var _this2 = this;
        var currentEdit = this.state.currentEdit;
        var _this$props6 = this.props,
          attributes = _this$props6.attributes,
          setAttributes = _this$props6.setAttributes,
          isSelected = _this$props6.isSelected;
        var pid = attributes.pid,
          items = attributes.items,
          sliderView = attributes.sliderView,
          enableAvatar = attributes.enableAvatar,
          avatarColor = attributes.avatarColor,
          avatarBorderRadius = attributes.avatarBorderRadius,
          avatarBorderWidth = attributes.avatarBorderWidth,
          avatarBorderColor = attributes.avatarBorderColor,
          avatarSize = attributes.avatarSize,
          nameColor = attributes.nameColor,
          positionColor = attributes.positionColor,
          descColor = attributes.descColor,
          columns = attributes.columns,
          sliderColumn = attributes.sliderColumn,
          sliderItemsToScroll = attributes.sliderItemsToScroll,
          sliderCenterMode = attributes.sliderCenterMode,
          sliderPauseOnHover = attributes.sliderPauseOnHover,
          sliderAutoPlay = attributes.sliderAutoPlay,
          sliderInfiniteLoop = attributes.sliderInfiniteLoop,
          sliderDotsShown = attributes.sliderDotsShown,
          sliderDotsColor = attributes.sliderDotsColor,
          sliderSpeed = attributes.sliderSpeed,
          sliderAutoPlaySpeed = attributes.sliderAutoPlaySpeed,
          sliderArrowShown = attributes.sliderArrowShown,
          sliderArrowSize = attributes.sliderArrowSize,
          sliderArrowBorderSize = attributes.sliderArrowBorderSize,
          sliderArrowBorderRadius = attributes.sliderArrowBorderRadius,
          sliderArrowColor = attributes.sliderArrowColor,
          avatarPosition = attributes.avatarPosition,
          isPreview = attributes.isPreview;
        var blockClass = ['advgb-testimonial', sliderView && 'slider-view', "advgb-avatar-".concat(avatarPosition)].filter(Boolean).join(' ');
        var maxCols = sliderView ? 10 : 3;
        var minCols = sliderView ? 4 : 1;
        var i = 0;
        var validCols = columns;
        if (columns < 1) {
          validCols = 1;
        } else if (columns > 3 && !sliderView) {
          validCols = 3;
          setAttributes({
            columns: 3
          });
        } else if (columns < 4 && sliderView) {
          validCols = 4;
          setAttributes({
            columns: 4
          });
        } else if (columns > 10) {
          validCols = 10;
          setAttributes({
            columns: 10
          });
        } else if (columns === '' || !columns) {
          validCols = sliderView ? 4 : 1;
        }
        var arrowStyle = {
          color: sliderArrowColor,
          borderColor: sliderArrowColor,
          borderWidth: sliderArrowBorderSize,
          borderRadius: sliderArrowBorderRadius ? "".concat(sliderArrowBorderRadius, "%") : undefined,
          width: sliderArrowSize
        };
        return isPreview ? /*#__PURE__*/React.createElement("img", {
          alt: __('Testimonial', 'advanced-gutenberg'),
          width: "100%",
          src: previewImageData
        }) : /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(InspectorControls, null, /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Testimonial Settings', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Slider view', 'advanced-gutenberg'),
          checked: sliderView,
          onChange: function onChange() {
            return setAttributes({
              sliderView: !sliderView
            });
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: !sliderView ? __('Columns', 'advanced-gutenberg') : __('Number of items', 'advanced-gutenberg'),
          help: __('Range in Normal view is 1-3, and in Slider view is 4-10.', 'advanced-gutenberg'),
          min: minCols,
          max: maxCols,
          value: columns,
          onChange: function onChange(value) {
            return setAttributes({
              columns: value
            });
          }
        }), sliderView && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Items to show', 'advanced-gutenberg'),
          min: 1,
          max: columns,
          value: sliderColumn,
          onChange: function onChange(value) {
            return setAttributes({
              sliderColumn: value
            });
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Items to scroll', 'advanced-gutenberg'),
          min: 1,
          max: sliderColumn,
          value: sliderItemsToScroll,
          onChange: function onChange(value) {
            return setAttributes({
              sliderItemsToScroll: value
            });
          }
        }), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Slider Settings', 'advanced-gutenberg'),
          initialOpen: false
        }, /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Center mode', 'advanced-gutenberg'),
          checked: sliderCenterMode,
          onChange: function onChange() {
            return setAttributes({
              sliderCenterMode: !sliderCenterMode
            });
          }
        }), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Pause on hover', 'advanced-gutenberg'),
          checked: sliderPauseOnHover,
          onChange: function onChange() {
            return setAttributes({
              sliderPauseOnHover: !sliderPauseOnHover
            });
          }
        }), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Auto play', 'advanced-gutenberg'),
          checked: sliderAutoPlay,
          onChange: function onChange() {
            return setAttributes({
              sliderAutoPlay: !sliderAutoPlay
            });
          }
        }), sliderAutoPlay && /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Autoplay speed (ms)', 'advanced-gutenberg'),
          min: 0,
          max: 10000,
          value: sliderAutoPlaySpeed,
          onChange: function onChange(value) {
            return setAttributes({
              sliderAutoPlaySpeed: value
            });
          }
        }), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Infinite Loop', 'advanced-gutenberg'),
          checked: sliderInfiniteLoop,
          onChange: function onChange() {
            return setAttributes({
              sliderInfiniteLoop: !sliderInfiniteLoop
            });
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Transition speed (ms)', 'advanced-gutenberg'),
          min: 0,
          max: 5000,
          value: sliderSpeed,
          onChange: function onChange(value) {
            return setAttributes({
              sliderSpeed: value
            });
          }
        }), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Show dots', 'advanced-gutenberg'),
          checked: sliderDotsShown,
          onChange: function onChange() {
            return setAttributes({
              sliderDotsShown: !sliderDotsShown
            });
          }
        }), /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Show arrows', 'advanced-gutenberg'),
          checked: sliderArrowShown,
          onChange: function onChange() {
            return setAttributes({
              sliderArrowShown: !sliderArrowShown
            });
          }
        }), sliderArrowShown && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Arrow size', 'advanced-gutenberg'),
          min: 40,
          max: 150,
          value: sliderArrowSize,
          onChange: function onChange(value) {
            return setAttributes({
              sliderArrowSize: value
            });
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Arrow border size', 'advanced-gutenberg'),
          min: 0,
          max: 15,
          value: sliderArrowBorderSize,
          onChange: function onChange(value) {
            return setAttributes({
              sliderArrowBorderSize: value
            });
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Arrow border radius (%)', 'advanced-gutenberg'),
          min: 0,
          max: 100,
          value: sliderArrowBorderRadius,
          onChange: function onChange(value) {
            return setAttributes({
              sliderArrowBorderRadius: value
            });
          }
        }))), /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Slider Colors', 'advanced-gutenberg'),
          initialOpen: false,
          colorSettings: [{
            label: __('Arrow and Border Color', 'advanced-gutenberg'),
            value: sliderArrowColor,
            onChange: function onChange(value) {
              return setAttributes({
                sliderArrowColor: value
              });
            }
          }, {
            label: __('Dots Color', 'advanced-gutenberg'),
            value: sliderDotsColor,
            onChange: function onChange(value) {
              return setAttributes({
                sliderDotsColor: value
              });
            }
          }]
        })), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Avatar', 'advanced-gutenberg'),
          initialOpen: false
        }, /*#__PURE__*/React.createElement(ToggleControl, {
          label: __('Display Avatar', 'advanced-gutenberg'),
          checked: enableAvatar,
          onChange: function onChange() {
            return setAttributes({
              enableAvatar: !enableAvatar
            });
          }
        }), enableAvatar && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Avatar Colors', 'advanced-gutenberg'),
          initialOpen: false,
          colorSettings: [{
            label: __('Background Color', 'advanced-gutenberg'),
            value: avatarColor,
            onChange: function onChange(value) {
              return setAttributes({
                avatarColor: value
              });
            }
          }, {
            label: __('Border Color', 'advanced-gutenberg'),
            value: avatarBorderColor,
            onChange: function onChange(value) {
              return setAttributes({
                avatarBorderColor: value
              });
            }
          }]
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Border Radius (%)', 'advanced-gutenberg'),
          min: 0,
          max: 50,
          value: avatarBorderRadius,
          onChange: function onChange(value) {
            return setAttributes({
              avatarBorderRadius: value
            });
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Border Width', 'advanced-gutenberg'),
          min: 0,
          max: 5,
          value: avatarBorderWidth,
          onChange: function onChange(value) {
            return setAttributes({
              avatarBorderWidth: value
            });
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Avatar Size', 'advanced-gutenberg'),
          min: 50,
          max: 130,
          value: avatarSize,
          onChange: function onChange(value) {
            return setAttributes({
              avatarSize: value
            });
          }
        }), /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Avatar Position', 'advanced-gutenberg'),
          value: avatarPosition,
          options: [{
            label: __('Top', 'advanced-gutenberg'),
            value: 'top'
          }, {
            label: __('Bottom', 'advanced-gutenberg'),
            value: 'bottom'
          }, {
            label: __('Left', 'advanced-gutenberg'),
            value: 'left'
          }, {
            label: __('right', 'advanced-gutenberg'),
            value: 'right'
          }],
          onChange: function onChange(value) {
            return setAttributes({
              avatarPosition: value
            });
          }
        }))), /*#__PURE__*/React.createElement(PanelColorSettings, {
          title: __('Text Colors', 'advanced-gutenberg'),
          initialOpen: false,
          colorSettings: [{
            label: __('Name Color', 'advanced-gutenberg'),
            value: nameColor,
            onChange: function onChange(value) {
              return setAttributes({
                nameColor: value
              });
            }
          }, {
            label: __('Position Color', 'advanced-gutenberg'),
            value: positionColor,
            onChange: function onChange(value) {
              return setAttributes({
                positionColor: value
              });
            }
          }, {
            label: __('Description Color', 'advanced-gutenberg'),
            value: descColor,
            onChange: function onChange(value) {
              return setAttributes({
                descColor: value
              });
            }
          }]
        }))), /*#__PURE__*/React.createElement("div", {
          className: "advgb-testimonial-wrapper",
          id: pid
        }, /*#__PURE__*/React.createElement("div", {
          className: blockClass
        }, items.map(function (item, idx) {
          i++;
          if (i > validCols) return false;
          return /*#__PURE__*/React.createElement("div", {
            className: "advgb-testimonial-item",
            key: idx
          }, enableAvatar && /*#__PURE__*/React.createElement(MediaUpload, {
            allowedTypes: ["image"],
            onSelect: function onSelect(media) {
              return _this2.updateItems(idx, {
                avatarUrl: media.sizes.thumbnail ? media.sizes.thumbnail.url : media.sizes.full.url,
                avatarID: media.id
              });
            },
            value: item.avatarID,
            render: function render(_ref) {
              var open = _ref.open;
              return /*#__PURE__*/React.createElement("div", {
                className: "advgb-testimonial-avatar-group"
              }, /*#__PURE__*/React.createElement(Tooltip, {
                text: __('Click to change avatar', 'advanced-gutenberg')
              }, /*#__PURE__*/React.createElement("div", {
                className: "advgb-testimonial-avatar",
                onClick: open,
                style: {
                  backgroundImage: "url(".concat(item.avatarUrl ? item.avatarUrl : advgbBlocks.avatarHolder, ")"),
                  backgroundColor: avatarColor,
                  borderRadius: avatarBorderRadius + '%',
                  borderWidth: avatarBorderWidth + 'px',
                  borderColor: avatarBorderColor,
                  width: avatarSize + 'px',
                  height: avatarSize + 'px'
                }
              })), /*#__PURE__*/React.createElement(Tooltip, {
                text: __('Show default avatar', 'advanced-gutenberg')
              }, /*#__PURE__*/React.createElement("span", {
                className: "dashicons dashicons-update-alt advgb-testimonial-avatar-clear",
                onClick: function onClick() {
                  return _this2.updateItems(idx, {
                    avatarUrl: undefined,
                    avatarID: undefined
                  });
                }
              })));
            }
          }), /*#__PURE__*/React.createElement("div", {
            className: "advgb-testimonial-info"
          }, /*#__PURE__*/React.createElement(RichText, {
            tagName: "h4",
            className: "advgb-testimonial-name",
            value: item.name,
            isSelected: isSelected && currentEdit === 'name' + idx,
            unstableOnFocus: function unstableOnFocus() {
              return _this2.setState({
                currentEdit: 'name' + idx
              });
            },
            onChange: function onChange(value) {
              return _this2.updateItems(idx, {
                name: value
              });
            },
            style: {
              color: nameColor
            },
            placeholder: __('Text…', 'advanced-gutenberg'),
            allowedFormats: ['core/bold', 'core/italic']
          }), /*#__PURE__*/React.createElement(RichText, {
            tagName: "p",
            className: "advgb-testimonial-position",
            value: item.position,
            isSelected: isSelected && currentEdit === 'pos' + idx,
            unstableOnFocus: function unstableOnFocus() {
              return _this2.setState({
                currentEdit: 'pos' + idx
              });
            },
            onChange: function onChange(value) {
              return _this2.updateItems(idx, {
                position: value
              });
            },
            style: {
              color: positionColor
            },
            placeholder: __('Text…', 'advanced-gutenberg'),
            allowedFormats: ['core/bold', 'core/italic']
          }), /*#__PURE__*/React.createElement(RichText, {
            tagName: "p",
            className: "advgb-testimonial-desc",
            value: item.desc,
            isSelected: isSelected && currentEdit === 'desc' + idx,
            unstableOnFocus: function unstableOnFocus() {
              return _this2.setState({
                currentEdit: 'desc' + idx
              });
            },
            onChange: function onChange(value) {
              return _this2.updateItems(idx, {
                desc: value
              });
            },
            style: {
              color: descColor
            },
            placeholder: __('Text…', 'advanced-gutenberg')
          })));
        })), sliderView && /*#__PURE__*/React.createElement(Fragment, null, sliderArrowShown && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("button", {
          className: "advgb-slider-arrow advgb-slider-prev",
          style: arrowStyle
        }, PREV_ARROW), /*#__PURE__*/React.createElement("button", {
          className: "advgb-slider-arrow advgb-slider-next",
          style: arrowStyle
        }, NEXT_ARROW)), /*#__PURE__*/React.createElement("style", null, "#".concat(pid, " .slick-dots li.slick-active button:before {color: ").concat(sliderDotsColor, "}"), "#".concat(pid, " .slick-dots li button:before {color: ").concat(sliderDotsColor, "}")))));
      }
    }]);
  }(Component);
  var testimonialBlockIcon = /*#__PURE__*/React.createElement("svg", {
    height: "20",
    viewBox: "2 2 22 22",
    width: "20",
    xmlns: "http://www.w3.org/2000/svg"
  }, /*#__PURE__*/React.createElement("path", {
    d: "M19 2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h4l3 3 3-3h4c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 3.3c1.49 0 2.7 1.21 2.7 2.7 0 1.49-1.21 2.7-2.7 2.7-1.49 0-2.7-1.21-2.7-2.7 0-1.49 1.21-2.7 2.7-2.7zM18 16H6v-.9c0-2 4-3.1 6-3.1s6 1.1 6 3.1v.9z"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M0 0h24v24H0z",
    fill: "none"
  }));
  var blockAttrs = {
    items: {
      type: 'array',
      default: times(10, function () {
        return {
          avatarUrl: advgbBlocks.avatarHolder,
          avatarID: undefined,
          name: 'Person Name',
          position: 'Job Position',
          desc: 'A little description about this person will show up here.'
        };
      })
    },
    pid: {
      type: 'string'
    },
    sliderView: {
      type: 'boolean',
      default: false
    },
    enableAvatar: {
      type: 'boolean',
      default: true
    },
    avatarColor: {
      type: 'string'
    },
    avatarBorderRadius: {
      type: 'number',
      default: 50
    },
    avatarBorderWidth: {
      type: 'number'
    },
    avatarBorderColor: {
      type: 'string'
    },
    avatarSize: {
      type: 'number',
      default: 120
    },
    avatarPosition: {
      type: 'string',
      default: 'top'
    },
    nameColor: {
      type: 'string'
    },
    positionColor: {
      type: 'string'
    },
    descColor: {
      type: 'string'
    },
    columns: {
      type: 'number',
      default: 1
    },
    sliderColumn: {
      type: 'number',
      default: 1
    },
    sliderItemsToScroll: {
      type: 'number',
      default: 1
    },
    sliderCenterMode: {
      type: 'boolean',
      default: false
    },
    sliderPauseOnHover: {
      type: 'boolean',
      default: true
    },
    sliderAutoPlay: {
      type: 'boolean',
      default: true
    },
    sliderAutoPlaySpeed: {
      type: 'number',
      default: 2500
    },
    sliderInfiniteLoop: {
      type: 'boolean',
      default: true
    },
    sliderDotsShown: {
      type: 'boolean',
      default: true
    },
    sliderDotsColor: {
      type: 'string'
    },
    sliderArrowShown: {
      type: 'boolean',
      default: true
    },
    sliderArrowSize: {
      type: 'number',
      default: 50
    },
    sliderArrowBorderSize: {
      type: 'number'
    },
    sliderArrowBorderRadius: {
      type: 'number'
    },
    sliderArrowColor: {
      type: 'string'
    },
    sliderSpeed: {
      type: 'number',
      default: 500
    },
    changed: {
      type: 'boolean',
      default: false
    },
    isPreview: {
      type: 'boolean',
      default: false
    }
  };
  registerBlockType('advgb/testimonial', {
    apiVersion: 3,
    title: __('Testimonial - PublishPress', 'advanced-gutenberg'),
    description: __('Block for creating personal or team/group information.', 'advanced-gutenberg'),
    icon: {
      src: testimonialBlockIcon,
      foreground: typeof advgbBlocks !== 'undefined' ? advgbBlocks.color : undefined
    },
    category: 'advgb-category',
    keywords: [__('testimonial', 'advanced-gutenberg'), __('personal', 'advanced-gutenberg'), __('about', 'advanced-gutenberg')],
    attributes: blockAttrs,
    example: {
      attributes: {
        isPreview: true
      }
    },
    edit: AdvTestimonial,
    save: function save(_ref2) {
      var attributes = _ref2.attributes;
      var pid = attributes.pid,
        items = attributes.items,
        sliderView = attributes.sliderView,
        enableAvatar = attributes.enableAvatar,
        avatarColor = attributes.avatarColor,
        avatarBorderRadius = attributes.avatarBorderRadius,
        avatarBorderWidth = attributes.avatarBorderWidth,
        avatarBorderColor = attributes.avatarBorderColor,
        avatarSize = attributes.avatarSize,
        nameColor = attributes.nameColor,
        positionColor = attributes.positionColor,
        descColor = attributes.descColor,
        columns = attributes.columns,
        sliderColumn = attributes.sliderColumn,
        sliderItemsToScroll = attributes.sliderItemsToScroll,
        sliderCenterMode = attributes.sliderCenterMode,
        sliderPauseOnHover = attributes.sliderPauseOnHover,
        sliderAutoPlay = attributes.sliderAutoPlay,
        sliderInfiniteLoop = attributes.sliderInfiniteLoop,
        sliderDotsShown = attributes.sliderDotsShown,
        avatarPosition = attributes.avatarPosition,
        sliderSpeed = attributes.sliderSpeed,
        sliderAutoPlaySpeed = attributes.sliderAutoPlaySpeed,
        sliderArrowShown = attributes.sliderArrowShown,
        sliderArrowSize = attributes.sliderArrowSize,
        sliderArrowBorderSize = attributes.sliderArrowBorderSize,
        sliderArrowBorderRadius = attributes.sliderArrowBorderRadius,
        sliderArrowColor = attributes.sliderArrowColor;
      var blockClass = ['advgb-testimonial', sliderView && 'slider-view', "advgb-avatar-".concat(avatarPosition)].filter(Boolean).join(' ');
      var i = 0;
      var validCols = columns;
      if (columns < 1) {
        validCols = 1;
      } else if (columns > 3 && !sliderView) {
        validCols = 3;
      } else if (columns < 4 && sliderView) {
        validCols = 4;
      } else if (columns > 10) {
        validCols = 10;
      }
      var arrowStyle = {
        color: sliderArrowColor,
        borderColor: sliderArrowColor,
        borderWidth: sliderArrowBorderSize,
        borderRadius: sliderArrowBorderRadius ? "".concat(sliderArrowBorderRadius, "%") : undefined,
        width: sliderArrowSize
      };
      return /*#__PURE__*/React.createElement("div", {
        className: "advgb-testimonial-wrapper",
        id: pid,
        "data-col": sliderView ? sliderColumn : undefined,
        "data-scroll": sliderView ? sliderItemsToScroll : undefined,
        "data-pause": sliderView ? sliderPauseOnHover : undefined,
        "data-autoplay": sliderView ? sliderAutoPlay : undefined,
        "data-apspeed": sliderView ? sliderAutoPlaySpeed : undefined,
        "data-loop": sliderView ? sliderInfiniteLoop : undefined,
        "data-dots": sliderView ? sliderDotsShown : undefined,
        "data-speed": sliderView ? sliderSpeed : undefined,
        "data-arrows": sliderView ? sliderArrowShown : undefined,
        "data-center": sliderView ? sliderCenterMode : undefined
      }, /*#__PURE__*/React.createElement("div", {
        className: blockClass
      }, items.map(function (item, idx) {
        i++;
        if (i > validCols) return false;
        return /*#__PURE__*/React.createElement("div", {
          className: "advgb-testimonial-item",
          key: idx
        }, enableAvatar && /*#__PURE__*/React.createElement("div", {
          className: "advgb-testimonial-avatar-group"
        }, /*#__PURE__*/React.createElement("div", {
          className: "advgb-testimonial-avatar",
          style: {
            backgroundImage: "url(".concat(item.avatarUrl ? item.avatarUrl : advgbBlocks.avatarHolder, ")"),
            backgroundColor: avatarColor,
            borderRadius: avatarBorderRadius + '%',
            borderWidth: avatarBorderWidth + 'px',
            borderColor: avatarBorderColor,
            width: avatarSize + 'px',
            height: avatarSize + 'px'
          }
        })), /*#__PURE__*/React.createElement("div", {
          className: "advgb-testimonial-info"
        }, /*#__PURE__*/React.createElement(RichText.Content, {
          tagName: "h4",
          className: "advgb-testimonial-name",
          style: {
            color: nameColor
          },
          value: item.name
        }), /*#__PURE__*/React.createElement(RichText.Content, {
          tagName: "p",
          className: "advgb-testimonial-position",
          style: {
            color: positionColor
          },
          value: item.position
        }), /*#__PURE__*/React.createElement(RichText.Content, {
          tagName: "p",
          className: "advgb-testimonial-desc",
          style: {
            color: descColor
          },
          value: item.desc
        })));
      })), sliderView && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("button", {
        className: "advgb-slider-arrow advgb-slider-prev",
        style: arrowStyle
      }, PREV_ARROW), /*#__PURE__*/React.createElement("button", {
        className: "advgb-slider-arrow advgb-slider-next",
        style: arrowStyle
      }, NEXT_ARROW)));
    },
    deprecated: [{
      attributes: _objectSpread(_objectSpread({}, blockAttrs), {}, {
        avatarSize: {
          type: 'number',
          default: 70
        }
      }),
      save: function save(_ref3) {
        var attributes = _ref3.attributes;
        var items = attributes.items,
          sliderView = attributes.sliderView,
          avatarColor = attributes.avatarColor,
          avatarBorderRadius = attributes.avatarBorderRadius,
          avatarBorderWidth = attributes.avatarBorderWidth,
          avatarBorderColor = attributes.avatarBorderColor,
          avatarSize = attributes.avatarSize,
          nameColor = attributes.nameColor,
          positionColor = attributes.positionColor,
          descColor = attributes.descColor,
          columns = attributes.columns;
        var blockClass = ['advgb-testimonial', sliderView && 'slider-view'].filter(Boolean).join(' ');
        var i = 0;
        var validCols = columns;
        if (columns < 1) {
          validCols = 1;
        } else if (columns > 3 && !sliderView) {
          validCols = 3;
        } else if (columns < 4 && sliderView) {
          validCols = 4;
        } else if (columns > 10) {
          validCols = 10;
        }
        return /*#__PURE__*/React.createElement("div", {
          className: blockClass
        }, items.map(function (item, idx) {
          i++;
          if (i > validCols) return false;
          return /*#__PURE__*/React.createElement("div", {
            className: "advgb-testimonial-item",
            key: idx
          }, /*#__PURE__*/React.createElement("div", {
            className: "advgb-testimonial-avatar-group"
          }, /*#__PURE__*/React.createElement("div", {
            className: "advgb-testimonial-avatar",
            style: {
              backgroundImage: "url(".concat(item.avatarUrl ? item.avatarUrl : advgbBlocks.avatarHolder, ")"),
              backgroundColor: avatarColor,
              borderRadius: avatarBorderRadius + '%',
              borderWidth: avatarBorderWidth + 'px',
              borderColor: avatarBorderColor,
              width: avatarSize + 'px',
              height: avatarSize + 'px'
            }
          })), /*#__PURE__*/React.createElement("h4", {
            className: "advgb-testimonial-name",
            style: {
              color: nameColor
            }
          }, item.name), /*#__PURE__*/React.createElement("p", {
            className: "advgb-testimonial-position",
            style: {
              color: positionColor
            }
          }, item.position), /*#__PURE__*/React.createElement("p", {
            className: "advgb-testimonial-desc",
            style: {
              color: descColor
            }
          }, item.desc));
        }));
      }
    }]
  });
})(wp.i18n, wp.blocks, wp.element, wp.blockEditor, wp.components, lodash);

/***/ },

/***/ "./assets/blocks/woo-products/block.jsx"
/*!**********************************************!*\
  !*** ./assets/blocks/woo-products/block.jsx ***!
  \**********************************************/
() {

function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _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 _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
(function (wpI18n, wpBlocks, wpElement, wpBlockEditor, wpComponents) {
  wpBlockEditor = wp.blockEditor || wp.editor;
  var __ = wpI18n.__;
  var Component = wpElement.Component,
    Fragment = wpElement.Fragment;
  var registerBlockType = wpBlocks.registerBlockType;
  var _wpBlockEditor = wpBlockEditor,
    InspectorControls = _wpBlockEditor.InspectorControls,
    BlockControls = _wpBlockEditor.BlockControls;
  var RangeControl = wpComponents.RangeControl,
    PanelBody = wpComponents.PanelBody,
    CheckboxControl = wpComponents.CheckboxControl,
    SelectControl = wpComponents.SelectControl,
    Spinner = wpComponents.Spinner,
    ToolbarGroup = wpComponents.ToolbarGroup,
    Placeholder = wpComponents.Placeholder,
    Button = wpComponents.Button;
  var addQueryArgs = wp.url.addQueryArgs;
  var fetchingQueue = null;
  var initSlider = null;
  var previewImageData = 'data:image/png;base64, ';
  var advProductsBlockIcon = /*#__PURE__*/React.createElement("svg", {
    width: "20",
    height: "20",
    viewBox: "0 0 24 24"
  }, /*#__PURE__*/React.createElement("path", {
    fill: "none",
    d: "M0,0h24v24H0V0z"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M15.55,13c0.75,0,1.41-0.41,1.75-1.03l3.58-6.49C21.25,4.82,20.77,4,20.01,4H5.21L4.27,2H1v2h2l3.6,7.59l-1.35,2.44 C4.52,15.37,5.48,17,7,17h12v-2H7l1.1-2H15.55z M6.16,6h12.15l-2.76,5H8.53L6.16,6z"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M7,18c-1.1,0-1.99,0.9-1.99,2c0,1.1,0.89,2,1.99,2c1.1,0,2-0.9,2-2C9,18.9,8.1,18,7,18z"
  }), /*#__PURE__*/React.createElement("path", {
    d: "M17,18c-1.1,0-1.99,0.9-1.99,2c0,1.1,0.89,2,1.99,2c1.1,0,2-0.9,2-2C19,18.9,18.1,18,17,18z"
  }));
  var AdvProductsEdit = /*#__PURE__*/function (_Component) {
    function AdvProductsEdit() {
      var _this;
      _classCallCheck(this, AdvProductsEdit);
      _this = _callSuper(this, AdvProductsEdit, arguments);
      _this.state = {
        categoriesList: [],
        productsList: [],
        loading: true,
        error: false
      };
      _this.fetchProducts = _this.fetchProducts.bind(_this);
      return _this;
    }
    _inherits(AdvProductsEdit, _Component);
    return _createClass(AdvProductsEdit, [{
      key: "componentWillMount",
      value: function componentWillMount() {
        var _this$props = this.props,
          attributes = _this$props.attributes,
          setAttributes = _this$props.setAttributes;
        var currentBlockConfig = advgbDefaultConfig['advgb-woo-products'];

        // No override attributes of blocks inserted before
        if (attributes.changed !== true) {
          if (_typeof(currentBlockConfig) === 'object' && currentBlockConfig !== null) {
            Object.keys(currentBlockConfig).map(function (attribute) {
              if (typeof attributes[attribute] === 'boolean') {
                attributes[attribute] = !!currentBlockConfig[attribute];
              } else {
                attributes[attribute] = currentBlockConfig[attribute];
              }
            });
          }

          // Finally set changed attribute to true, so we don't modify anything again
          setAttributes({
            changed: true
          });
        }
        this.fetchProducts();
      }
    }, {
      key: "componentWillUpdate",
      value: function componentWillUpdate(nextProps, nextState) {
        var clientId = this.props.clientId;
        var $ = jQuery;
        if (this.checkAttrChanged(nextProps.attributes, this.props.attributes)) {
          $("#block-".concat(clientId, " .advgb-products-wrapper.slick-initialized")).slick('unslick');
          $("#block-".concat(clientId, " .advgb-product")).removeAttr('tabindex').removeAttr('role').removeAttr('aria-describedby');
          if (initSlider) {
            clearTimeout(initSlider);
          }
        }
      }
    }, {
      key: "componentDidUpdate",
      value: function componentDidUpdate(prevProps) {
        var _this2 = this;
        var categoriesList = this.state.categoriesList;
        var attributes = this.props.attributes;
        var category = attributes.category;
        if (category === 'selected' && categoriesList.length === 0) {
          wp.apiFetch({
            path: addQueryArgs('/wc/v2/products/categories', {
              per_page: -1
            })
          }).then(function (obj) {
            _this2.setState({
              categoriesList: obj
            });
          });
        }
        if (this.checkAttrChanged(prevProps.attributes, attributes)) {
          this.fetchProducts();
        }
      }
    }, {
      key: "checkAttrChanged",
      value: function checkAttrChanged(prevAttrs, curAttrs) {
        var prevView = prevAttrs.viewType,
          prevCat = prevAttrs.category,
          prevCats = prevAttrs.categories,
          prevStatus = prevAttrs.status,
          prevOrder = prevAttrs.order,
          prevOrderBy = prevAttrs.orderBy,
          prevLength = prevAttrs.numberOfProducts;
        var viewType = curAttrs.viewType,
          category = curAttrs.category,
          categories = curAttrs.categories,
          status = curAttrs.status,
          order = curAttrs.order,
          orderBy = curAttrs.orderBy,
          numberOfProducts = curAttrs.numberOfProducts;
        return category !== prevCat || categories !== prevCats || status !== prevStatus || order !== prevOrder || orderBy !== prevOrderBy || numberOfProducts !== prevLength || prevView !== viewType;
      }
    }, {
      key: "fetchProducts",
      value: function fetchProducts() {
        var self = this;
        var _this$props$attribute = this.props.attributes,
          viewType = _this$props$attribute.viewType,
          category = _this$props$attribute.category,
          categories = _this$props$attribute.categories,
          status = _this$props$attribute.status,
          order = _this$props$attribute.order,
          orderBy = _this$props$attribute.orderBy,
          numberOfProducts = _this$props$attribute.numberOfProducts;
        var query = addQueryArgs('/agwc/v1/products', {
          order: order || undefined,
          orderby: orderBy || undefined,
          per_page: numberOfProducts,
          category: category === 'selected' ? categories.join(',') : undefined,
          featured: status === 'featured' ? 1 : undefined,
          on_sale: status === 'on_sale' ? 1 : undefined
        });
        if (fetchingQueue) {
          clearTimeout(fetchingQueue);
        }
        if (this.state.error) {
          this.setState({
            error: false
          });
        }
        fetchingQueue = setTimeout(function () {
          if (!self.state.loading) {
            self.setState({
              loading: true
            });
          }
          wp.apiFetch({
            path: query
          }).then(function (obj) {
            self.setState({
              productsList: obj,
              loading: false
            });
          }).catch(function (error) {
            self.setState({
              loading: false,
              error: true
            });
          }).then(function () {
            if (viewType === 'slider') {
              var $ = jQuery;
              initSlider = setTimeout(function () {
                $("#block-".concat(self.props.clientId, " .advgb-products-block.slider-view .advgb-products-wrapper:not(.slick-initialized)")).slick({
                  dots: true,
                  adaptiveHeight: true
                });
              }, 100);
            }
          });
        }, 500);
      }
    }, {
      key: "setCategories",
      value: function setCategories(catID, willAdd) {
        var _this$props2 = this.props,
          attributes = _this$props2.attributes,
          setAttributes = _this$props2.setAttributes;
        var categories = attributes.categories;
        if (willAdd) {
          setAttributes({
            categories: [].concat(_toConsumableArray(categories), [catID])
          });
        } else {
          setAttributes({
            categories: categories.filter(function (cat) {
              return cat !== catID;
            })
          });
        }
        this.fetchProducts();
      }
    }, {
      key: "render",
      value: function render() {
        var _this3 = this;
        var _this$state = this.state,
          categoriesList = _this$state.categoriesList,
          productsList = _this$state.productsList,
          loading = _this$state.loading,
          error = _this$state.error;
        var _this$props3 = this.props,
          attributes = _this$props3.attributes,
          setAttributes = _this$props3.setAttributes;
        var viewType = attributes.viewType,
          category = attributes.category,
          categories = attributes.categories,
          status = attributes.status,
          order = attributes.order,
          orderBy = attributes.orderBy,
          numberOfProducts = attributes.numberOfProducts,
          columns = attributes.columns,
          isPreview = attributes.isPreview;
        var viewControls = [{
          icon: 'grid-view',
          title: __('Normal View', 'advanced-gutenberg'),
          onClick: function onClick() {
            return setAttributes({
              viewType: 'normal'
            });
          },
          isActive: viewType === 'normal'
        }, {
          icon: 'slides',
          title: __('Slider View', 'advanced-gutenberg'),
          onClick: function onClick() {
            return setAttributes({
              viewType: 'slider'
            });
          },
          isActive: viewType === 'slider'
        }];
        var blockClassName = ["advgb-products-block", viewType === 'slider' && 'slider-view'].filter(Boolean).join(' ');
        var blockWrapperClassName = ["advgb-products-wrapper", viewType === 'normal' && "columns-".concat(columns)].filter(Boolean).join(' ');
        return isPreview ? /*#__PURE__*/React.createElement("img", {
          alt: __('Woo Products', 'advanced-gutenberg'),
          width: "100%",
          src: previewImageData
        }) : /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(BlockControls, null, /*#__PURE__*/React.createElement(ToolbarGroup, {
          controls: viewControls
        })), /*#__PURE__*/React.createElement(InspectorControls, null, /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Products Settings', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Product Status', 'advanced-gutenberg'),
          value: status,
          options: [{
            label: __('All', 'advanced-gutenberg'),
            value: ''
          }, {
            label: __('Featured', 'advanced-gutenberg'),
            value: 'featured'
          }, {
            label: __('On Sale', 'advanced-gutenberg'),
            value: 'on_sale'
          }],
          onChange: function onChange(value) {
            return setAttributes({
              status: value
            });
          }
        }), /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Category', 'advanced-gutenberg'),
          value: category,
          options: [{
            label: __('All', 'advanced-gutenberg'),
            value: ''
          }, {
            label: __('Selected', 'advanced-gutenberg'),
            value: 'selected'
          }],
          onChange: function onChange(value) {
            return setAttributes({
              category: value
            });
          }
        }), category === 'selected' && /*#__PURE__*/React.createElement("div", {
          className: "advgb-woo-categories-list"
        }, categoriesList.map(function (cat, index) {
          return /*#__PURE__*/React.createElement(CheckboxControl, {
            key: index,
            label: [cat.name, /*#__PURE__*/React.createElement("span", {
              key: "cat-count",
              style: {
                fontSize: 'small',
                color: '#999',
                marginLeft: 5
              }
            }, "(", cat.count, ")")],
            checked: jQuery.inArray(cat.id, categories) > -1,
            onChange: function onChange(checked) {
              return _this3.setCategories(cat.id, checked);
            }
          });
        }))), /*#__PURE__*/React.createElement(PanelBody, {
          title: __('Layout Settings', 'advanced-gutenberg')
        }, viewType !== 'slider' && /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Columns', 'advanced-gutenberg'),
          value: columns,
          min: 1,
          max: 4,
          onChange: function onChange(value) {
            return setAttributes({
              columns: value
            });
          }
        }), /*#__PURE__*/React.createElement(RangeControl, {
          label: __('Number of Products', 'advanced-gutenberg'),
          value: numberOfProducts,
          min: 1,
          max: 48,
          onChange: function onChange(value) {
            return setAttributes({
              numberOfProducts: value
            });
          }
        }), /*#__PURE__*/React.createElement(SelectControl, {
          label: __('Order', 'advanced-gutenberg'),
          value: "".concat(orderBy, "-").concat(order),
          options: [{
            label: __('Newest to oldest', 'advanced-gutenberg'),
            value: 'date-desc'
          }, {
            label: __('Oldest to newest', 'advanced-gutenberg'),
            value: 'date-asc'
          }, {
            label: __('Price: high to low', 'advanced-gutenberg'),
            value: 'price-desc'
          }, {
            label: __('Price: low to high', 'advanced-gutenberg'),
            value: 'price-asc'
          }, {
            label: __('Highest Rating first', 'advanced-gutenberg'),
            value: 'rating-desc'
          }, {
            label: __('Most sale first', 'advanced-gutenberg'),
            value: 'popularity-desc'
          }, {
            label: __('Title: Alphabetical', 'advanced-gutenberg'),
            value: 'title-asc'
          }, {
            label: __('Title: Alphabetical reversed', 'advanced-gutenberg'),
            value: 'title-desc'
          }],
          onChange: function onChange(value) {
            var splitedVal = value.split('-');
            return setAttributes({
              orderBy: splitedVal[0],
              order: splitedVal[1]
            });
          }
        }))), /*#__PURE__*/React.createElement("div", {
          className: blockClassName
        }, !error ? !loading ? productsList.length > 0 ? /*#__PURE__*/React.createElement("div", {
          className: blockWrapperClassName
        }, productsList.map(function (product, idx) {
          return /*#__PURE__*/React.createElement("div", {
            key: idx,
            className: "advgb-product"
          }, /*#__PURE__*/React.createElement("div", {
            className: "advgb-product-img"
          }, /*#__PURE__*/React.createElement("img", {
            src: product.images.length ? product.images[0].src : advgbBlocks.post_thumb,
            alt: product.name
          })), /*#__PURE__*/React.createElement("div", {
            className: "advgb-product-title"
          }, product.name), /*#__PURE__*/React.createElement("div", {
            className: "advgb-product-price",
            dangerouslySetInnerHTML: {
              __html: product.price_html
            }
          }), /*#__PURE__*/React.createElement("div", {
            className: "advgb-product-add-to-cart"
          }, /*#__PURE__*/React.createElement("span", null, __('Add to cart', 'advanced-gutenberg'))));
        })) :
        /*#__PURE__*/
        // When no products found
        React.createElement("div", null, __('No products found.', 'advanced-gutenberg')) :
        /*#__PURE__*/
        // When products is fetching
        React.createElement("div", null, /*#__PURE__*/React.createElement("span", null, __('Loading', 'advanced-gutenberg')), /*#__PURE__*/React.createElement(Spinner, null)) :
        /*#__PURE__*/
        // When error
        React.createElement(Placeholder, {
          icon: advProductsBlockIcon,
          label: __('Woo Products Block', 'advanced-gutenberg')
        }, /*#__PURE__*/React.createElement("div", {
          style: {
            marginBottom: 10
          }
        }, __('WooCommerce has not been detected, make sure WooCommerce is installed and activated.', 'advanced-gutenberg')), /*#__PURE__*/React.createElement(Button, {
          className: "button button-large",
          onClick: function onClick() {
            return _this3.fetchProducts();
          }
        }, __('Try again', 'advanced-gutenberg')))));
      }
    }]);
  }(Component);
  var attributes = {
    viewType: {
      type: 'string',
      default: 'normal'
    },
    category: {
      type: 'string'
    },
    categories: {
      type: 'array',
      default: []
    },
    status: {
      type: 'string'
    },
    order: {
      type: 'string',
      default: 'desc'
    },
    orderBy: {
      type: 'string',
      default: 'date'
    },
    numberOfProducts: {
      type: 'number',
      default: 6
    },
    columns: {
      type: 'number',
      default: 3
    },
    changed: {
      type: 'boolean',
      default: false
    },
    isPreview: {
      type: 'boolean',
      default: false
    }
  };
  registerBlockType('advgb/woo-products', {
    apiVersion: 3,
    title: __('Woo Products - PublishPress', 'advanced-gutenberg'),
    description: __('Listing your products in a easy way.', 'advanced-gutenberg'),
    icon: {
      src: advProductsBlockIcon,
      foreground: typeof advgbBlocks !== 'undefined' ? advgbBlocks.color : undefined
    },
    category: 'advgb-category',
    keywords: [__('woo commerce', 'advanced-gutenberg'), __('products list', 'advanced-gutenberg'), __('price list', 'advanced-gutenberg')],
    attributes: attributes,
    example: {
      attributes: {
        isPreview: true
      }
    },
    supports: {
      anchor: true
    },
    edit: AdvProductsEdit,
    save: function save(_ref) {
      var attributes = _ref.attributes;
      var viewType = attributes.viewType,
        category = attributes.category,
        categories = attributes.categories,
        status = attributes.status,
        order = attributes.order,
        orderBy = attributes.orderBy,
        numberOfProducts = attributes.numberOfProducts,
        columns = attributes.columns;
      var listCats = categories.join(',');
      var shortCode = ['[products', "limit=\"".concat(numberOfProducts, "\""), "columns=\"".concat(columns, "\""), "orderby=\"".concat(orderBy, "\""), "order=\"".concat(order, "\""), category === 'selected' && "category=\"".concat(listCats, "\""), status === 'featured' && 'visibility="featured"', status === 'on_sale' && 'on_sale="1"', ']'].filter(Boolean).join(' ');
      var blockClassName = ['advgb-woo-products', viewType === 'slider' && 'slider-view'].filter(Boolean).join(' ');
      return /*#__PURE__*/React.createElement("div", {
        className: blockClassName
      }, shortCode);
    },
    deprecated: [{
      attributes: attributes,
      save: function save(_ref2) {
        var attributes = _ref2.attributes;
        var viewType = attributes.viewType,
          category = attributes.category,
          categories = attributes.categories,
          status = attributes.status,
          order = attributes.order,
          orderBy = attributes.orderBy,
          numberOfProducts = attributes.numberOfProducts,
          columns = attributes.columns;
        var listCats = categories.join(',');
        var shortCode = ['[products', "limit=\"".concat(numberOfProducts, "\""), "columns=\"".concat(columns, "\""), "orderby=\"".concat(orderBy, "\""), "order=\"".concat(order, "\""), category === 'selected' && "category=\"".concat(listCats, "\""), status === 'featured' && 'featured="1"', status === 'on_sale' && 'on_sale="1"', ']'].filter(Boolean).join(' ');
        var blockClassName = ['advgb-woo-products', viewType === 'slider' && 'slider-view'].filter(Boolean).join(' ');
        return /*#__PURE__*/React.createElement("div", {
          className: blockClassName
        }, shortCode);
      }
    }]
  });
})(wp.i18n, wp.blocks, wp.element, wp.blockEditor, wp.components);

/***/ },

/***/ "./node_modules/hour-convert/index.js"
/*!********************************************!*\
  !*** ./node_modules/hour-convert/index.js ***!
  \********************************************/
(module) {

"use strict";


module.exports = {

    /**
     * Convert 24-hour time to 12-hour format.
     *
     * @param {number} hour Hour to convert (0-23)
     * @return {object} { hour, meridiem } (meridian is also returned for backwards compatibility)
     */
    to12Hour: function to12Hour(hour) {
        var meridiem = hour < 12 ? 'am' : 'pm';
        return {
            hour: ((hour + 11) % 12 + 1),
            meridiem: meridiem,
            meridian: meridiem
        };
    },

    /**
     * Convert 12-hour time to 24-hour format.
     *
     * @param {object} time Time object
     * @param {number} time.hour Hour to convert (1-12)
     * @param {string} time.meridiem Hour meridiem (am/pm). 'time.meridian' is
     *  supported for backwards compatibility.
     * @return {number}
     */
    to24Hour: function to24Hour(time) {
        var meridiem = time.meridiem || time.meridian;
        return (meridiem === 'am' ? 0 : 12) + (time.hour % 12);
    }
};


/***/ },

/***/ "./node_modules/html-dom-parser/lib/constants.js"
/*!*******************************************************!*\
  !*** ./node_modules/html-dom-parser/lib/constants.js ***!
  \*******************************************************/
(module) {

/**
 * SVG elements are case-sensitive.
 *
 * @see {@link https://developer.mozilla.org/docs/Web/SVG/Element#SVG_elements_A_to_Z}
 */
var CASE_SENSITIVE_TAG_NAMES = [
  'animateMotion',
  'animateTransform',
  'clipPath',
  'feBlend',
  'feColorMatrix',
  'feComponentTransfer',
  'feComposite',
  'feConvolveMatrix',
  'feDiffuseLighting',
  'feDisplacementMap',
  'feDropShadow',
  'feFlood',
  'feFuncA',
  'feFuncB',
  'feFuncG',
  'feFuncR',
  'feGaussainBlur',
  'feImage',
  'feMerge',
  'feMergeNode',
  'feMorphology',
  'feOffset',
  'fePointLight',
  'feSpecularLighting',
  'feSpotLight',
  'feTile',
  'feTurbulence',
  'foreignObject',
  'linearGradient',
  'radialGradient',
  'textPath'
];

module.exports = {
  CASE_SENSITIVE_TAG_NAMES: CASE_SENSITIVE_TAG_NAMES
};


/***/ },

/***/ "./node_modules/html-dom-parser/lib/domparser.js"
/*!*******************************************************!*\
  !*** ./node_modules/html-dom-parser/lib/domparser.js ***!
  \*******************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

var utilities = __webpack_require__(/*! ./utilities */ "./node_modules/html-dom-parser/lib/utilities.js");

// constants
var HTML = 'html';
var HEAD = 'head';
var BODY = 'body';
var FIRST_TAG_REGEX = /<([a-zA-Z]+[0-9]?)/; // e.g., <h1>
var HEAD_TAG_REGEX = /<head.*>/i;
var BODY_TAG_REGEX = /<body.*>/i;
// http://www.w3.org/TR/html/syntax.html#void-elements
var VOID_ELEMENTS_REGEX = /<(area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)(.*?)\/?>/gi;

// detect IE browser
var isIE9 = utilities.isIE(9);
var isIE = isIE9 || utilities.isIE();

/**
 * DOMParser (performance: slow).
 *
 * @see https://developer.mozilla.org/docs/Web/API/DOMParser#Parsing_an_SVG_or_HTML_document
 */
var parseFromString;

if (typeof window.DOMParser === 'function') {
  var domParser = new window.DOMParser();

  // IE9 does not support 'text/html' MIME type
  // https://msdn.microsoft.com/en-us/library/ff975278(v=vs.85).aspx
  var mimeType = isIE9 ? 'text/xml' : 'text/html';

  /**
   * Creates an HTML document using `DOMParser.parseFromString`.
   *
   * @param  {string} html      - The HTML string.
   * @param  {string} [tagName] - The element to render the HTML (with 'body' as fallback).
   * @return {HTMLDocument}
   */
  parseFromString = function domStringParser(html, tagName) {
    if (tagName) {
      html = '<' + tagName + '>' + html + '</' + tagName + '>';
    }

    // because IE9 only supports MIME type 'text/xml', void elements need to be self-closed
    if (isIE9) {
      html = html.replace(VOID_ELEMENTS_REGEX, '<$1$2$3/>');
    }

    return domParser.parseFromString(html, mimeType);
  };
}

/**
 * DOMImplementation (performance: fair).
 *
 * @see https://developer.mozilla.org/docs/Web/API/DOMImplementation/createHTMLDocument
 */
var parseFromDocument;

if (typeof document.implementation === 'object') {
  // title parameter is required in IE
  // https://msdn.microsoft.com/en-us/library/ff975457(v=vs.85).aspx
  var doc = document.implementation.createHTMLDocument(
    isIE ? 'HTML_DOM_PARSER_TITLE' : undefined
  );

  /**
   * Use HTML document created by `document.implementation.createHTMLDocument`.
   *
   * @param  {string} html      - The HTML string.
   * @param  {string} [tagName] - The element to render the HTML (with 'body' as fallback).
   * @return {HTMLDocument}
   */
  parseFromDocument = function createHTMLDocument(html, tagName) {
    if (tagName) {
      doc.documentElement.getElementsByTagName(tagName)[0].innerHTML = html;
      return doc;
    }

    try {
      doc.documentElement.innerHTML = html;
      return doc;
      // fallback when certain elements in `documentElement` are read-only (IE9)
    } catch (err) {
      if (parseFromString) {
        return parseFromString(html);
      }
    }
  };
}

/**
 * Template (performance: fast).
 *
 * @see https://developer.mozilla.org/docs/Web/HTML/Element/template
 */
var parseFromTemplate;
var template = document.createElement('template');

if (template.content) {
  /**
   * Uses a template element (content fragment) to parse HTML.
   *
   * @param  {string} html - The HTML string.
   * @return {NodeList}
   */
  parseFromTemplate = function templateParser(html) {
    template.innerHTML = html;
    return template.content.childNodes;
  };
}

// fallback document parser
var parseWithFallback = parseFromDocument || parseFromString;

/**
 * Parses HTML string to DOM nodes.
 *
 * @param  {string} html - The HTML string.
 * @return {NodeList|Array}
 */
function domparser(html) {
  var firstTagName;
  var match = html.match(FIRST_TAG_REGEX);

  if (match && match[1]) {
    firstTagName = match[1].toLowerCase();
  }

  var doc;
  var element;
  var elements;

  switch (firstTagName) {
    case HTML:
      if (parseFromString) {
        doc = parseFromString(html);

        // the created document may come with filler head/body elements,
        // so make sure to remove them if they don't actually exist
        if (!HEAD_TAG_REGEX.test(html)) {
          element = doc.getElementsByTagName(HEAD)[0];
          if (element) {
            element.parentNode.removeChild(element);
          }
        }

        if (!BODY_TAG_REGEX.test(html)) {
          element = doc.getElementsByTagName(BODY)[0];
          if (element) {
            element.parentNode.removeChild(element);
          }
        }

        return doc.getElementsByTagName(HTML);
      }
      break;

    case HEAD:
    case BODY:
      if (parseWithFallback) {
        elements = parseWithFallback(html).getElementsByTagName(firstTagName);

        // account for possibility of sibling
        if (BODY_TAG_REGEX.test(html) && HEAD_TAG_REGEX.test(html)) {
          return elements[0].parentNode.childNodes;
        }

        return elements;
      }
      break;

    // low-level tag or text
    default:
      if (parseFromTemplate) {
        return parseFromTemplate(html);
      }

      if (parseWithFallback) {
        return parseWithFallback(html, BODY).getElementsByTagName(BODY)[0]
          .childNodes;
      }

      break;
  }

  return [];
}

module.exports = domparser;


/***/ },

/***/ "./node_modules/html-dom-parser/lib/html-to-dom-client.js"
/*!****************************************************************!*\
  !*** ./node_modules/html-dom-parser/lib/html-to-dom-client.js ***!
  \****************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

var domparser = __webpack_require__(/*! ./domparser */ "./node_modules/html-dom-parser/lib/domparser.js");
var utilities = __webpack_require__(/*! ./utilities */ "./node_modules/html-dom-parser/lib/utilities.js");

var formatDOM = utilities.formatDOM;
var isIE9 = utilities.isIE(9);

var DIRECTIVE_REGEX = /<(![a-zA-Z\s]+)>/; // e.g., <!doctype html>

/**
 * Parses HTML and reformats DOM nodes output.
 *
 * @param  {String} html - The HTML string.
 * @return {Array}       - The formatted DOM nodes.
 */
function parseDOM(html) {
  if (typeof html !== 'string') {
    throw new TypeError('First argument must be a string');
  }

  if (!html) {
    return [];
  }

  // match directive
  var match = html.match(DIRECTIVE_REGEX);
  var directive;

  if (match && match[1]) {
    directive = match[1];

    // remove directive in IE9 because DOMParser uses
    // MIME type 'text/xml' instead of 'text/html'
    if (isIE9) {
      html = html.replace(match[0], '');
    }
  }

  return formatDOM(domparser(html), null, directive);
}

module.exports = parseDOM;


/***/ },

/***/ "./node_modules/html-dom-parser/lib/utilities.js"
/*!*******************************************************!*\
  !*** ./node_modules/html-dom-parser/lib/utilities.js ***!
  \*******************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

var CASE_SENSITIVE_TAG_NAMES = (__webpack_require__(/*! ./constants */ "./node_modules/html-dom-parser/lib/constants.js").CASE_SENSITIVE_TAG_NAMES);

var caseSensitiveTagNamesMap = {};
var tagName;
for (var i = 0, len = CASE_SENSITIVE_TAG_NAMES.length; i < len; i++) {
  tagName = CASE_SENSITIVE_TAG_NAMES[i];
  caseSensitiveTagNamesMap[tagName.toLowerCase()] = tagName;
}

/**
 * Gets case-sensitive tag name.
 *
 * @param  {String}           tagName - The lowercase tag name.
 * @return {String|undefined}
 */
function getCaseSensitiveTagName(tagName) {
  return caseSensitiveTagNamesMap[tagName];
}

/**
 * Formats DOM attributes to a hash map.
 *
 * @param  {NamedNodeMap} attributes - The list of attributes.
 * @return {Object}                  - A map of attribute name to value.
 */
function formatAttributes(attributes) {
  var result = {};
  var attribute;
  // `NamedNodeMap` is array-like
  for (var i = 0, len = attributes.length; i < len; i++) {
    attribute = attributes[i];
    result[attribute.name] = attribute.value;
  }
  return result;
}

/**
 * Corrects the tag name if it is case-sensitive (SVG).
 * Otherwise, returns the lowercase tag name (HTML).
 *
 * @param  {String} tagName - The lowercase tag name.
 * @return {String}         - The formatted tag name.
 */
function formatTagName(tagName) {
  tagName = tagName.toLowerCase();
  var caseSensitiveTagName = getCaseSensitiveTagName(tagName);
  if (caseSensitiveTagName) {
    return caseSensitiveTagName;
  }
  return tagName;
}

/**
 * Formats the browser DOM nodes to mimic the output of `htmlparser2.parseDOM()`.
 *
 * @param  {NodeList} nodes        - The DOM nodes.
 * @param  {Object}   [parentObj]  - The formatted parent node.
 * @param  {String}   [directive]  - The directive.
 * @return {Object[]}              - The formatted DOM object.
 */
function formatDOM(nodes, parentObj, directive) {
  parentObj = parentObj || null;

  var result = [];
  var node;
  var prevNode;
  var nodeObj;

  // `NodeList` is array-like
  for (var i = 0, len = nodes.length; i < len; i++) {
    node = nodes[i];
    // reset
    nodeObj = {
      next: null,
      prev: result[i - 1] || null,
      parent: parentObj
    };

    // set the next node for the previous node (if applicable)
    prevNode = result[i - 1];
    if (prevNode) {
      prevNode.next = nodeObj;
    }

    // set the node name if it's not "#text" or "#comment"
    // e.g., "div"
    if (node.nodeName[0] !== '#') {
      nodeObj.name = formatTagName(node.nodeName);
      // also, nodes of type "tag" have "attribs"
      nodeObj.attribs = {}; // default
      if (node.attributes && node.attributes.length) {
        nodeObj.attribs = formatAttributes(node.attributes);
      }
    }

    // set the node type
    // e.g., "tag"
    switch (node.nodeType) {
      // 1 = element
      case 1:
        if (nodeObj.name === 'script' || nodeObj.name === 'style') {
          nodeObj.type = nodeObj.name;
        } else {
          nodeObj.type = 'tag';
        }
        // recursively format the children
        nodeObj.children = formatDOM(node.childNodes, nodeObj);
        break;
      // 2 = attribute
      // 3 = text
      case 3:
        nodeObj.type = 'text';
        nodeObj.data = node.nodeValue;
        break;
      // 8 = comment
      case 8:
        nodeObj.type = 'comment';
        nodeObj.data = node.nodeValue;
        break;
    }

    result.push(nodeObj);
  }

  if (directive) {
    result.unshift({
      name: directive.substring(0, directive.indexOf(' ')).toLowerCase(),
      data: directive,
      type: 'directive',
      next: result[0] ? result[0] : null,
      prev: null,
      parent: parentObj
    });

    if (result[1]) {
      result[1].prev = result[0];
    }
  }

  return result;
}

/**
 * Detects IE with or without version.
 *
 * @param  {Number}  [version] - The IE version to detect.
 * @return {Boolean}           - Whether IE or the version has been detected.
 */
function isIE(version) {
  if (version) {
    return document.documentMode === version;
  }
  return /(MSIE |Trident\/|Edge\/)/.test(navigator.userAgent);
}

module.exports = {
  formatAttributes: formatAttributes,
  formatDOM: formatDOM,
  isIE: isIE
};


/***/ },

/***/ "./node_modules/html-react-parser/index.js"
/*!*************************************************!*\
  !*** ./node_modules/html-react-parser/index.js ***!
  \*************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

var domToReact = __webpack_require__(/*! ./lib/dom-to-react */ "./node_modules/html-react-parser/lib/dom-to-react.js");
var htmlToDOM = __webpack_require__(/*! html-dom-parser */ "./node_modules/html-dom-parser/lib/html-to-dom-client.js");

// decode HTML entities by default for `htmlparser2`
var domParserOptions = { decodeEntities: true, lowerCaseAttributeNames: false };

/**
 * Converts HTML string to React elements.
 *
 * @param  {String}   html                    - The HTML string to parse to React.
 * @param  {Object}   [options]               - The parser options.
 * @param  {Function} [options.replace]       - The replace method.
 * @return {JSX.Element|JSX.Element[]|String} - Returns React element(s), string, or empty array.
 */
function HTMLReactParser(html, options) {
  if (typeof html !== 'string') {
    throw new TypeError('First argument must be a string');
  }
  return domToReact(htmlToDOM(html, domParserOptions), options);
}

HTMLReactParser.domToReact = domToReact;
HTMLReactParser.htmlToDOM = htmlToDOM;

// support CommonJS and ES Modules
module.exports = HTMLReactParser;
module.exports["default"] = HTMLReactParser;


/***/ },

/***/ "./node_modules/html-react-parser/lib/attributes-to-props.js"
/*!*******************************************************************!*\
  !*** ./node_modules/html-react-parser/lib/attributes-to-props.js ***!
  \*******************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

var reactProperty = __webpack_require__(/*! react-property */ "./node_modules/react-property/index.js");
var styleToObject = __webpack_require__(/*! style-to-object */ "./node_modules/style-to-object/index.js");
var utilities = __webpack_require__(/*! ./utilities */ "./node_modules/html-react-parser/lib/utilities.js");

var camelCase = utilities.camelCase;

var htmlProperties = reactProperty.html;
var svgProperties = reactProperty.svg;
var isCustomAttribute = reactProperty.isCustomAttribute;

var hasOwnProperty = Object.prototype.hasOwnProperty;

/**
 * Converts HTML/SVG DOM attributes to React props.
 *
 * @param  {Object} [attributes={}] - The HTML/SVG DOM attributes.
 * @return {Object}                 - The React props.
 */
function attributesToProps(attributes) {
  attributes = attributes || {};

  var attributeName;
  var attributeNameLowerCased;
  var attributeValue;
  var property;
  var props = {};

  for (attributeName in attributes) {
    attributeValue = attributes[attributeName];

    // ARIA (aria-*) or custom data (data-*) attribute
    if (isCustomAttribute(attributeName)) {
      props[attributeName] = attributeValue;
      continue;
    }

    // convert HTML attribute to React prop
    attributeNameLowerCased = attributeName.toLowerCase();
    if (hasOwnProperty.call(htmlProperties, attributeNameLowerCased)) {
      property = htmlProperties[attributeNameLowerCased];
      props[property.propertyName] =
        property.hasBooleanValue ||
        (property.hasOverloadedBooleanValue && !attributeValue)
          ? true
          : attributeValue;
      continue;
    }

    // convert SVG attribute to React prop
    if (hasOwnProperty.call(svgProperties, attributeName)) {
      property = svgProperties[attributeName];
      props[property.propertyName] = attributeValue;
      continue;
    }

    // preserve custom attribute if React >=16
    if (utilities.PRESERVE_CUSTOM_ATTRIBUTES) {
      props[attributeName] = attributeValue;
    }
  }

  // convert inline style to object
  if (attributes.style != null) {
    props.style = cssToJs(attributes.style);
  }

  return props;
}

/**
 * Converts inline CSS style to POJO (Plain Old JavaScript Object).
 *
 * @param  {String} style - The inline CSS style.
 * @return {Object}       - The style object.
 */
function cssToJs(style) {
  var styleObject = {};

  if (style) {
    styleToObject(style, function (property, value) {
      // skip CSS comment
      if (property && value) {
        styleObject[camelCase(property)] = value;
      }
    });
  }

  return styleObject;
}

module.exports = attributesToProps;


/***/ },

/***/ "./node_modules/html-react-parser/lib/dom-to-react.js"
/*!************************************************************!*\
  !*** ./node_modules/html-react-parser/lib/dom-to-react.js ***!
  \************************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

var attributesToProps = __webpack_require__(/*! ./attributes-to-props */ "./node_modules/html-react-parser/lib/attributes-to-props.js");
var utilities = __webpack_require__(/*! ./utilities */ "./node_modules/html-react-parser/lib/utilities.js");

/**
 * Converts DOM nodes to React elements.
 *
 * @param {DomElement[]} nodes - The DOM nodes.
 * @param {Object} [options={}] - The additional options.
 * @param {Function} [options.replace] - The replacer.
 * @param {Object} [options.library] - The library (React, Preact, etc.).
 * @return {String|ReactElement|ReactElement[]}
 */
function domToReact(nodes, options) {
  options = options || {};

  var React = options.library || __webpack_require__(/*! react */ "./node_modules/react/index.js");
  var cloneElement = React.cloneElement;
  var createElement = React.createElement;
  var isValidElement = React.isValidElement;

  var result = [];
  var node;
  var hasReplace = typeof options.replace === 'function';
  var replaceElement;
  var props;
  var children;

  for (var i = 0, len = nodes.length; i < len; i++) {
    node = nodes[i];

    // replace with custom React element (if present)
    if (hasReplace) {
      replaceElement = options.replace(node);

      if (isValidElement(replaceElement)) {
        // specify a "key" prop if element has siblings
        // https://fb.me/react-warning-keys
        if (len > 1) {
          replaceElement = cloneElement(replaceElement, {
            key: replaceElement.key || i
          });
        }
        result.push(replaceElement);
        continue;
      }
    }

    if (node.type === 'text') {
      result.push(node.data);
      continue;
    }

    props = node.attribs;
    if (!shouldPassAttributesUnaltered(node)) {
      // update values
      props = attributesToProps(node.attribs);
    }

    children = null;

    // node type for <script> is "script"
    // node type for <style> is "style"
    if (node.type === 'script' || node.type === 'style') {
      // prevent text in <script> or <style> from being escaped
      // https://facebook.github.io/react/tips/dangerously-set-inner-html.html
      if (node.children[0]) {
        props.dangerouslySetInnerHTML = {
          __html: node.children[0].data
        };
      }
    } else if (node.type === 'tag') {
      // setting textarea value in children is an antipattern in React
      // https://reactjs.org/docs/forms.html#the-textarea-tag
      if (node.name === 'textarea' && node.children[0]) {
        props.defaultValue = node.children[0].data;

        // continue recursion of creating React elements (if applicable)
      } else if (node.children && node.children.length) {
        children = domToReact(node.children, options);
      }

      // skip all other cases (e.g., comment)
    } else {
      continue;
    }

    // specify a "key" prop if element has siblings
    // https://fb.me/react-warning-keys
    if (len > 1) {
      props.key = i;
    }

    result.push(createElement(node.name, props, children));
  }

  return result.length === 1 ? result[0] : result;
}

/**
 * @param {React.ReactElement} node
 * @return {Boolean}
 */
function shouldPassAttributesUnaltered(node) {
  return (
    utilities.PRESERVE_CUSTOM_ATTRIBUTES &&
    node.type === 'tag' &&
    utilities.isCustomComponent(node.name, node.attribs)
  );
}

module.exports = domToReact;


/***/ },

/***/ "./node_modules/html-react-parser/lib/utilities.js"
/*!*********************************************************!*\
  !*** ./node_modules/html-react-parser/lib/utilities.js ***!
  \*********************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

var React = __webpack_require__(/*! react */ "./node_modules/react/index.js");
var hyphenPatternRegex = /-([a-z])/g;
var CUSTOM_PROPERTY_OR_NO_HYPHEN_REGEX = /^--[a-zA-Z0-9-]+$|^[^-]+$/;

/**
 * Converts a string to camelCase.
 *
 * @param  {String} string - The string.
 * @return {String}
 */
function camelCase(string) {
  if (typeof string !== 'string') {
    throw new TypeError('First argument must be a string');
  }

  // custom property or no hyphen found
  if (CUSTOM_PROPERTY_OR_NO_HYPHEN_REGEX.test(string)) {
    return string;
  }

  // convert to camelCase
  return string
    .toLowerCase()
    .replace(hyphenPatternRegex, function (_, character) {
      return character.toUpperCase();
    });
}

/**
 * Swap key with value in an object.
 *
 * @param  {Object}   obj        - The object.
 * @param  {Function} [override] - The override method.
 * @return {Object}              - The inverted object.
 */
function invertObject(obj, override) {
  if (!obj || typeof obj !== 'object') {
    throw new TypeError('First argument must be an object');
  }

  var key;
  var value;
  var isOverridePresent = typeof override === 'function';
  var overrides = {};
  var result = {};

  for (key in obj) {
    value = obj[key];

    if (isOverridePresent) {
      overrides = override(key, value);
      if (overrides && overrides.length === 2) {
        result[overrides[0]] = overrides[1];
        continue;
      }
    }

    if (typeof value === 'string') {
      result[value] = key;
    }
  }

  return result;
}

/**
 * Check if a given tag is a custom component.
 *
 * @see {@link https://github.com/facebook/react/blob/v16.6.3/packages/react-dom/src/shared/isCustomComponent.js}
 *
 * @param {string} tagName - The name of the html tag.
 * @param {Object} props   - The props being passed to the element.
 * @return {boolean}
 */
function isCustomComponent(tagName, props) {
  if (tagName.indexOf('-') === -1) {
    return props && typeof props.is === 'string';
  }

  switch (tagName) {
    // These are reserved SVG and MathML elements.
    // We don't mind this whitelist too much because we expect it to never grow.
    // The alternative is to track the namespace in a few places which is convoluted.
    // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts
    case 'annotation-xml':
    case 'color-profile':
    case 'font-face':
    case 'font-face-src':
    case 'font-face-uri':
    case 'font-face-format':
    case 'font-face-name':
    case 'missing-glyph':
      return false;
    default:
      return true;
  }
}

/**
 * @constant {Boolean}
 * @see {@link https://reactjs.org/blog/2017/09/08/dom-attributes-in-react-16.html}
 */
var PRESERVE_CUSTOM_ATTRIBUTES = React.version.split('.')[0] >= 16;

module.exports = {
  PRESERVE_CUSTOM_ATTRIBUTES: PRESERVE_CUSTOM_ATTRIBUTES,
  camelCase: camelCase,
  invertObject: invertObject,
  isCustomComponent: isCustomComponent
};


/***/ },

/***/ "./node_modules/inline-style-parser/index.js"
/*!***************************************************!*\
  !*** ./node_modules/inline-style-parser/index.js ***!
  \***************************************************/
(module) {

// http://www.w3.org/TR/CSS21/grammar.html
// https://github.com/visionmedia/css-parse/pull/49#issuecomment-30088027
var COMMENT_REGEX = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;

var NEWLINE_REGEX = /\n/g;
var WHITESPACE_REGEX = /^\s*/;

// declaration
var PROPERTY_REGEX = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/;
var COLON_REGEX = /^:\s*/;
var VALUE_REGEX = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/;
var SEMICOLON_REGEX = /^[;\s]*/;

// https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/Trim#Polyfill
var TRIM_REGEX = /^\s+|\s+$/g;

// strings
var NEWLINE = '\n';
var FORWARD_SLASH = '/';
var ASTERISK = '*';
var EMPTY_STRING = '';

// types
var TYPE_COMMENT = 'comment';
var TYPE_DECLARATION = 'declaration';

/**
 * @param {String} style
 * @param {Object} [options]
 * @return {Object[]}
 * @throws {TypeError}
 * @throws {Error}
 */
module.exports = function(style, options) {
  if (typeof style !== 'string') {
    throw new TypeError('First argument must be a string');
  }

  if (!style) return [];

  options = options || {};

  /**
   * Positional.
   */
  var lineno = 1;
  var column = 1;

  /**
   * Update lineno and column based on `str`.
   *
   * @param {String} str
   */
  function updatePosition(str) {
    var lines = str.match(NEWLINE_REGEX);
    if (lines) lineno += lines.length;
    var i = str.lastIndexOf(NEWLINE);
    column = ~i ? str.length - i : column + str.length;
  }

  /**
   * Mark position and patch `node.position`.
   *
   * @return {Function}
   */
  function position() {
    var start = { line: lineno, column: column };
    return function(node) {
      node.position = new Position(start);
      whitespace();
      return node;
    };
  }

  /**
   * Store position information for a node.
   *
   * @constructor
   * @property {Object} start
   * @property {Object} end
   * @property {undefined|String} source
   */
  function Position(start) {
    this.start = start;
    this.end = { line: lineno, column: column };
    this.source = options.source;
  }

  /**
   * Non-enumerable source string.
   */
  Position.prototype.content = style;

  var errorsList = [];

  /**
   * Error `msg`.
   *
   * @param {String} msg
   * @throws {Error}
   */
  function error(msg) {
    var err = new Error(
      options.source + ':' + lineno + ':' + column + ': ' + msg
    );
    err.reason = msg;
    err.filename = options.source;
    err.line = lineno;
    err.column = column;
    err.source = style;

    if (options.silent) {
      errorsList.push(err);
    } else {
      throw err;
    }
  }

  /**
   * Match `re` and return captures.
   *
   * @param {RegExp} re
   * @return {undefined|Array}
   */
  function match(re) {
    var m = re.exec(style);
    if (!m) return;
    var str = m[0];
    updatePosition(str);
    style = style.slice(str.length);
    return m;
  }

  /**
   * Parse whitespace.
   */
  function whitespace() {
    match(WHITESPACE_REGEX);
  }

  /**
   * Parse comments.
   *
   * @param {Object[]} [rules]
   * @return {Object[]}
   */
  function comments(rules) {
    var c;
    rules = rules || [];
    while ((c = comment())) {
      if (c !== false) {
        rules.push(c);
      }
    }
    return rules;
  }

  /**
   * Parse comment.
   *
   * @return {Object}
   * @throws {Error}
   */
  function comment() {
    var pos = position();
    if (FORWARD_SLASH != style.charAt(0) || ASTERISK != style.charAt(1)) return;

    var i = 2;
    while (
      EMPTY_STRING != style.charAt(i) &&
      (ASTERISK != style.charAt(i) || FORWARD_SLASH != style.charAt(i + 1))
    ) {
      ++i;
    }
    i += 2;

    if (EMPTY_STRING === style.charAt(i - 1)) {
      return error('End of comment missing');
    }

    var str = style.slice(2, i - 2);
    column += 2;
    updatePosition(str);
    style = style.slice(i);
    column += 2;

    return pos({
      type: TYPE_COMMENT,
      comment: str
    });
  }

  /**
   * Parse declaration.
   *
   * @return {Object}
   * @throws {Error}
   */
  function declaration() {
    var pos = position();

    // prop
    var prop = match(PROPERTY_REGEX);
    if (!prop) return;
    comment();

    // :
    if (!match(COLON_REGEX)) return error("property missing ':'");

    // val
    var val = match(VALUE_REGEX);

    var ret = pos({
      type: TYPE_DECLARATION,
      property: trim(prop[0].replace(COMMENT_REGEX, EMPTY_STRING)),
      value: val
        ? trim(val[0].replace(COMMENT_REGEX, EMPTY_STRING))
        : EMPTY_STRING
    });

    // ;
    match(SEMICOLON_REGEX);

    return ret;
  }

  /**
   * Parse declarations.
   *
   * @return {Object[]}
   */
  function declarations() {
    var decls = [];

    comments(decls);

    // declarations
    var decl;
    while ((decl = declaration())) {
      if (decl !== false) {
        decls.push(decl);
        comments(decls);
      }
    }

    return decls;
  }

  whitespace();
  return declarations();
};

/**
 * Trim `str`.
 *
 * @param {String} str
 * @return {String}
 */
function trim(str) {
  return str ? str.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING;
}


/***/ },

/***/ "./node_modules/latinize/latinize.js"
/*!*******************************************!*\
  !*** ./node_modules/latinize/latinize.js ***!
  \*******************************************/
(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;(function(root, factory) {
  if (true) {
    // AMD. Register as an anonymous module.
    !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
		__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
		(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
		__WEBPACK_AMD_DEFINE_FACTORY__),
		__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  } else // removed by dead control flow
{}
})(this, function() {

  function latinize(str) {
    if (typeof str === 'string') {
      return str.replace(/[^A-Za-z0-9]/g, function(x) {
        return latinize.characters[x] || x;
      });
    } else {
      return str;
    }
  }

  latinize.characters = {
    'Á': 'A',
    'Ă': 'A',
    'Ắ': 'A',
    'Ặ': 'A',
    'Ằ': 'A',
    'Ẳ': 'A',
    'Ẵ': 'A',
    'Ǎ': 'A',
    'Â': 'A',
    'Ấ': 'A',
    'Ậ': 'A',
    'Ầ': 'A',
    'Ẩ': 'A',
    'Ẫ': 'A',
    'Ä': 'A',
    'Ǟ': 'A',
    'Ȧ': 'A',
    'Ǡ': 'A',
    'Ạ': 'A',
    'Ȁ': 'A',
    'À': 'A',
    'Ả': 'A',
    'Ȃ': 'A',
    'Ā': 'A',
    'Ą': 'A',
    'Å': 'A',
    'Ǻ': 'A',
    'Ḁ': 'A',
    'Ⱥ': 'A',
    'Ã': 'A',
    'Ꜳ': 'AA',
    'Æ': 'AE',
    'Ǽ': 'AE',
    'Ǣ': 'AE',
    'Ꜵ': 'AO',
    'Ꜷ': 'AU',
    'Ꜹ': 'AV',
    'Ꜻ': 'AV',
    'Ꜽ': 'AY',
    'Ḃ': 'B',
    'Ḅ': 'B',
    'Ɓ': 'B',
    'Ḇ': 'B',
    'Ƀ': 'B',
    'Ƃ': 'B',
    'Ć': 'C',
    'Č': 'C',
    'Ç': 'C',
    'Ḉ': 'C',
    'Ĉ': 'C',
    'Ċ': 'C',
    'Ƈ': 'C',
    'Ȼ': 'C',
    'Ď': 'D',
    'Ḑ': 'D',
    'Ḓ': 'D',
    'Ḋ': 'D',
    'Ḍ': 'D',
    'Ɗ': 'D',
    'Ḏ': 'D',
    'ǲ': 'D',
    'ǅ': 'D',
    'Đ': 'D',
    'Ð': 'D',
    'Ƌ': 'D',
    'Ǳ': 'DZ',
    'Ǆ': 'DZ',
    'É': 'E',
    'Ĕ': 'E',
    'Ě': 'E',
    'Ȩ': 'E',
    'Ḝ': 'E',
    'Ê': 'E',
    'Ế': 'E',
    'Ệ': 'E',
    'Ề': 'E',
    'Ể': 'E',
    'Ễ': 'E',
    'Ḙ': 'E',
    'Ë': 'E',
    'Ė': 'E',
    'Ẹ': 'E',
    'Ȅ': 'E',
    'È': 'E',
    'Ẻ': 'E',
    'Ȇ': 'E',
    'Ē': 'E',
    'Ḗ': 'E',
    'Ḕ': 'E',
    'Ę': 'E',
    'Ɇ': 'E',
    'Ẽ': 'E',
    'Ḛ': 'E',
    'Ꝫ': 'ET',
    'Ḟ': 'F',
    'Ƒ': 'F',
    'Ǵ': 'G',
    'Ğ': 'G',
    'Ǧ': 'G',
    'Ģ': 'G',
    'Ĝ': 'G',
    'Ġ': 'G',
    'Ɠ': 'G',
    'Ḡ': 'G',
    'Ǥ': 'G',
    'Ḫ': 'H',
    'Ȟ': 'H',
    'Ḩ': 'H',
    'Ĥ': 'H',
    'Ⱨ': 'H',
    'Ḧ': 'H',
    'Ḣ': 'H',
    'Ḥ': 'H',
    'Ħ': 'H',
    'Í': 'I',
    'Ĭ': 'I',
    'Ǐ': 'I',
    'Î': 'I',
    'Ï': 'I',
    'Ḯ': 'I',
    'İ': 'I',
    'Ị': 'I',
    'Ȉ': 'I',
    'Ì': 'I',
    'Ỉ': 'I',
    'Ȋ': 'I',
    'Ī': 'I',
    'Į': 'I',
    'Ɨ': 'I',
    'Ĩ': 'I',
    'Ḭ': 'I',
    'Ꝺ': 'D',
    'Ꝼ': 'F',
    'Ᵹ': 'G',
    'Ꞃ': 'R',
    'Ꞅ': 'S',
    'Ꞇ': 'T',
    'Ꝭ': 'IS',
    'Ĵ': 'J',
    'Ɉ': 'J',
    'Ḱ': 'K',
    'Ǩ': 'K',
    'Ķ': 'K',
    'Ⱪ': 'K',
    'Ꝃ': 'K',
    'Ḳ': 'K',
    'Ƙ': 'K',
    'Ḵ': 'K',
    'Ꝁ': 'K',
    'Ꝅ': 'K',
    'Ĺ': 'L',
    'Ƚ': 'L',
    'Ľ': 'L',
    'Ļ': 'L',
    'Ḽ': 'L',
    'Ḷ': 'L',
    'Ḹ': 'L',
    'Ⱡ': 'L',
    'Ꝉ': 'L',
    'Ḻ': 'L',
    'Ŀ': 'L',
    'Ɫ': 'L',
    'ǈ': 'L',
    'Ł': 'L',
    'Ǉ': 'LJ',
    'Ḿ': 'M',
    'Ṁ': 'M',
    'Ṃ': 'M',
    'Ɱ': 'M',
    'Ń': 'N',
    'Ň': 'N',
    'Ņ': 'N',
    'Ṋ': 'N',
    'Ṅ': 'N',
    'Ṇ': 'N',
    'Ǹ': 'N',
    'Ɲ': 'N',
    'Ṉ': 'N',
    'Ƞ': 'N',
    'ǋ': 'N',
    'Ñ': 'N',
    'Ǌ': 'NJ',
    'Ó': 'O',
    'Ŏ': 'O',
    'Ǒ': 'O',
    'Ô': 'O',
    'Ố': 'O',
    'Ộ': 'O',
    'Ồ': 'O',
    'Ổ': 'O',
    'Ỗ': 'O',
    'Ö': 'O',
    'Ȫ': 'O',
    'Ȯ': 'O',
    'Ȱ': 'O',
    'Ọ': 'O',
    'Ő': 'O',
    'Ȍ': 'O',
    'Ò': 'O',
    'Ỏ': 'O',
    'Ơ': 'O',
    'Ớ': 'O',
    'Ợ': 'O',
    'Ờ': 'O',
    'Ở': 'O',
    'Ỡ': 'O',
    'Ȏ': 'O',
    'Ꝋ': 'O',
    'Ꝍ': 'O',
    'Ō': 'O',
    'Ṓ': 'O',
    'Ṑ': 'O',
    'Ɵ': 'O',
    'Ǫ': 'O',
    'Ǭ': 'O',
    'Ø': 'O',
    'Ǿ': 'O',
    'Õ': 'O',
    'Ṍ': 'O',
    'Ṏ': 'O',
    'Ȭ': 'O',
    'Ƣ': 'OI',
    'Ꝏ': 'OO',
    'Ɛ': 'E',
    'Ɔ': 'O',
    'Ȣ': 'OU',
    'Ṕ': 'P',
    'Ṗ': 'P',
    'Ꝓ': 'P',
    'Ƥ': 'P',
    'Ꝕ': 'P',
    'Ᵽ': 'P',
    'Ꝑ': 'P',
    'Ꝙ': 'Q',
    'Ꝗ': 'Q',
    'Ŕ': 'R',
    'Ř': 'R',
    'Ŗ': 'R',
    'Ṙ': 'R',
    'Ṛ': 'R',
    'Ṝ': 'R',
    'Ȑ': 'R',
    'Ȓ': 'R',
    'Ṟ': 'R',
    'Ɍ': 'R',
    'Ɽ': 'R',
    'Ꜿ': 'C',
    'Ǝ': 'E',
    'Ś': 'S',
    'Ṥ': 'S',
    'Š': 'S',
    'Ṧ': 'S',
    'Ş': 'S',
    'Ŝ': 'S',
    'Ș': 'S',
    'Ṡ': 'S',
    'Ṣ': 'S',
    'Ṩ': 'S',
    'ß': 'ss',
    'Ť': 'T',
    'Ţ': 'T',
    'Ṱ': 'T',
    'Ț': 'T',
    'Ⱦ': 'T',
    'Ṫ': 'T',
    'Ṭ': 'T',
    'Ƭ': 'T',
    'Ṯ': 'T',
    'Ʈ': 'T',
    'Ŧ': 'T',
    'Ɐ': 'A',
    'Ꞁ': 'L',
    'Ɯ': 'M',
    'Ʌ': 'V',
    'Ꜩ': 'TZ',
    'Ú': 'U',
    'Ŭ': 'U',
    'Ǔ': 'U',
    'Û': 'U',
    'Ṷ': 'U',
    'Ü': 'U',
    'Ǘ': 'U',
    'Ǚ': 'U',
    'Ǜ': 'U',
    'Ǖ': 'U',
    'Ṳ': 'U',
    'Ụ': 'U',
    'Ű': 'U',
    'Ȕ': 'U',
    'Ù': 'U',
    'Ủ': 'U',
    'Ư': 'U',
    'Ứ': 'U',
    'Ự': 'U',
    'Ừ': 'U',
    'Ử': 'U',
    'Ữ': 'U',
    'Ȗ': 'U',
    'Ū': 'U',
    'Ṻ': 'U',
    'Ų': 'U',
    'Ů': 'U',
    'Ũ': 'U',
    'Ṹ': 'U',
    'Ṵ': 'U',
    'Ꝟ': 'V',
    'Ṿ': 'V',
    'Ʋ': 'V',
    'Ṽ': 'V',
    'Ꝡ': 'VY',
    'Ẃ': 'W',
    'Ŵ': 'W',
    'Ẅ': 'W',
    'Ẇ': 'W',
    'Ẉ': 'W',
    'Ẁ': 'W',
    'Ⱳ': 'W',
    'Ẍ': 'X',
    'Ẋ': 'X',
    'Ý': 'Y',
    'Ŷ': 'Y',
    'Ÿ': 'Y',
    'Ẏ': 'Y',
    'Ỵ': 'Y',
    'Ỳ': 'Y',
    'Ƴ': 'Y',
    'Ỷ': 'Y',
    'Ỿ': 'Y',
    'Ȳ': 'Y',
    'Ɏ': 'Y',
    'Ỹ': 'Y',
    'Ź': 'Z',
    'Ž': 'Z',
    'Ẑ': 'Z',
    'Ⱬ': 'Z',
    'Ż': 'Z',
    'Ẓ': 'Z',
    'Ȥ': 'Z',
    'Ẕ': 'Z',
    'Ƶ': 'Z',
    'Þ': 'TH',
    'Ĳ': 'IJ',
    'Œ': 'OE',
    'ᴀ': 'A',
    'ᴁ': 'AE',
    'ʙ': 'B',
    'ᴃ': 'B',
    'ᴄ': 'C',
    'ᴅ': 'D',
    'ᴇ': 'E',
    'ꜰ': 'F',
    'ɢ': 'G',
    'ʛ': 'G',
    'ʜ': 'H',
    'ɪ': 'I',
    'ʁ': 'R',
    'ᴊ': 'J',
    'ᴋ': 'K',
    'ʟ': 'L',
    'ᴌ': 'L',
    'ᴍ': 'M',
    'ɴ': 'N',
    'ᴏ': 'O',
    'ɶ': 'OE',
    'ᴐ': 'O',
    'ᴕ': 'OU',
    'ᴘ': 'P',
    'ʀ': 'R',
    'ᴎ': 'N',
    'ᴙ': 'R',
    'ꜱ': 'S',
    'ᴛ': 'T',
    'ⱻ': 'E',
    'ᴚ': 'R',
    'ᴜ': 'U',
    'ᴠ': 'V',
    'ᴡ': 'W',
    'ʏ': 'Y',
    'ᴢ': 'Z',
    'á': 'a',
    'ă': 'a',
    'ắ': 'a',
    'ặ': 'a',
    'ằ': 'a',
    'ẳ': 'a',
    'ẵ': 'a',
    'ǎ': 'a',
    'â': 'a',
    'ấ': 'a',
    'ậ': 'a',
    'ầ': 'a',
    'ẩ': 'a',
    'ẫ': 'a',
    'ä': 'a',
    'ǟ': 'a',
    'ȧ': 'a',
    'ǡ': 'a',
    'ạ': 'a',
    'ȁ': 'a',
    'à': 'a',
    'ả': 'a',
    'ȃ': 'a',
    'ā': 'a',
    'ą': 'a',
    'ᶏ': 'a',
    'ẚ': 'a',
    'å': 'a',
    'ǻ': 'a',
    'ḁ': 'a',
    'ⱥ': 'a',
    'ã': 'a',
    'ꜳ': 'aa',
    'æ': 'ae',
    'ǽ': 'ae',
    'ǣ': 'ae',
    'ꜵ': 'ao',
    'ꜷ': 'au',
    'ꜹ': 'av',
    'ꜻ': 'av',
    'ꜽ': 'ay',
    'ḃ': 'b',
    'ḅ': 'b',
    'ɓ': 'b',
    'ḇ': 'b',
    'ᵬ': 'b',
    'ᶀ': 'b',
    'ƀ': 'b',
    'ƃ': 'b',
    'ɵ': 'o',
    'ć': 'c',
    'č': 'c',
    'ç': 'c',
    'ḉ': 'c',
    'ĉ': 'c',
    'ɕ': 'c',
    'ċ': 'c',
    'ƈ': 'c',
    'ȼ': 'c',
    'ď': 'd',
    'ḑ': 'd',
    'ḓ': 'd',
    'ȡ': 'd',
    'ḋ': 'd',
    'ḍ': 'd',
    'ɗ': 'd',
    'ᶑ': 'd',
    'ḏ': 'd',
    'ᵭ': 'd',
    'ᶁ': 'd',
    'đ': 'd',
    'ɖ': 'd',
    'ƌ': 'd',
    'ð': 'd',
    'ı': 'i',
    'ȷ': 'j',
    'ɟ': 'j',
    'ʄ': 'j',
    'ǳ': 'dz',
    'ǆ': 'dz',
    'é': 'e',
    'ĕ': 'e',
    'ě': 'e',
    'ȩ': 'e',
    'ḝ': 'e',
    'ê': 'e',
    'ế': 'e',
    'ệ': 'e',
    'ề': 'e',
    'ể': 'e',
    'ễ': 'e',
    'ḙ': 'e',
    'ë': 'e',
    'ė': 'e',
    'ẹ': 'e',
    'ȅ': 'e',
    'è': 'e',
    'ẻ': 'e',
    'ȇ': 'e',
    'ē': 'e',
    'ḗ': 'e',
    'ḕ': 'e',
    'ⱸ': 'e',
    'ę': 'e',
    'ᶒ': 'e',
    'ɇ': 'e',
    'ẽ': 'e',
    'ḛ': 'e',
    'ꝫ': 'et',
    'ḟ': 'f',
    'ƒ': 'f',
    'ᵮ': 'f',
    'ᶂ': 'f',
    'ǵ': 'g',
    'ğ': 'g',
    'ǧ': 'g',
    'ģ': 'g',
    'ĝ': 'g',
    'ġ': 'g',
    'ɠ': 'g',
    'ḡ': 'g',
    'ᶃ': 'g',
    'ǥ': 'g',
    'ḫ': 'h',
    'ȟ': 'h',
    'ḩ': 'h',
    'ĥ': 'h',
    'ⱨ': 'h',
    'ḧ': 'h',
    'ḣ': 'h',
    'ḥ': 'h',
    'ɦ': 'h',
    'ẖ': 'h',
    'ħ': 'h',
    'ƕ': 'hv',
    'í': 'i',
    'ĭ': 'i',
    'ǐ': 'i',
    'î': 'i',
    'ï': 'i',
    'ḯ': 'i',
    'ị': 'i',
    'ȉ': 'i',
    'ì': 'i',
    'ỉ': 'i',
    'ȋ': 'i',
    'ī': 'i',
    'į': 'i',
    'ᶖ': 'i',
    'ɨ': 'i',
    'ĩ': 'i',
    'ḭ': 'i',
    'ꝺ': 'd',
    'ꝼ': 'f',
    'ᵹ': 'g',
    'ꞃ': 'r',
    'ꞅ': 's',
    'ꞇ': 't',
    'ꝭ': 'is',
    'ǰ': 'j',
    'ĵ': 'j',
    'ʝ': 'j',
    'ɉ': 'j',
    'ḱ': 'k',
    'ǩ': 'k',
    'ķ': 'k',
    'ⱪ': 'k',
    'ꝃ': 'k',
    'ḳ': 'k',
    'ƙ': 'k',
    'ḵ': 'k',
    'ᶄ': 'k',
    'ꝁ': 'k',
    'ꝅ': 'k',
    'ĺ': 'l',
    'ƚ': 'l',
    'ɬ': 'l',
    'ľ': 'l',
    'ļ': 'l',
    'ḽ': 'l',
    'ȴ': 'l',
    'ḷ': 'l',
    'ḹ': 'l',
    'ⱡ': 'l',
    'ꝉ': 'l',
    'ḻ': 'l',
    'ŀ': 'l',
    'ɫ': 'l',
    'ᶅ': 'l',
    'ɭ': 'l',
    'ł': 'l',
    'ǉ': 'lj',
    'ſ': 's',
    'ẜ': 's',
    'ẛ': 's',
    'ẝ': 's',
    'ḿ': 'm',
    'ṁ': 'm',
    'ṃ': 'm',
    'ɱ': 'm',
    'ᵯ': 'm',
    'ᶆ': 'm',
    'ń': 'n',
    'ň': 'n',
    'ņ': 'n',
    'ṋ': 'n',
    'ȵ': 'n',
    'ṅ': 'n',
    'ṇ': 'n',
    'ǹ': 'n',
    'ɲ': 'n',
    'ṉ': 'n',
    'ƞ': 'n',
    'ᵰ': 'n',
    'ᶇ': 'n',
    'ɳ': 'n',
    'ñ': 'n',
    'ǌ': 'nj',
    'ó': 'o',
    'ŏ': 'o',
    'ǒ': 'o',
    'ô': 'o',
    'ố': 'o',
    'ộ': 'o',
    'ồ': 'o',
    'ổ': 'o',
    'ỗ': 'o',
    'ö': 'o',
    'ȫ': 'o',
    'ȯ': 'o',
    'ȱ': 'o',
    'ọ': 'o',
    'ő': 'o',
    'ȍ': 'o',
    'ò': 'o',
    'ỏ': 'o',
    'ơ': 'o',
    'ớ': 'o',
    'ợ': 'o',
    'ờ': 'o',
    'ở': 'o',
    'ỡ': 'o',
    'ȏ': 'o',
    'ꝋ': 'o',
    'ꝍ': 'o',
    'ⱺ': 'o',
    'ō': 'o',
    'ṓ': 'o',
    'ṑ': 'o',
    'ǫ': 'o',
    'ǭ': 'o',
    'ø': 'o',
    'ǿ': 'o',
    'õ': 'o',
    'ṍ': 'o',
    'ṏ': 'o',
    'ȭ': 'o',
    'ƣ': 'oi',
    'ꝏ': 'oo',
    'ɛ': 'e',
    'ᶓ': 'e',
    'ɔ': 'o',
    'ᶗ': 'o',
    'ȣ': 'ou',
    'ṕ': 'p',
    'ṗ': 'p',
    'ꝓ': 'p',
    'ƥ': 'p',
    'ᵱ': 'p',
    'ᶈ': 'p',
    'ꝕ': 'p',
    'ᵽ': 'p',
    'ꝑ': 'p',
    'ꝙ': 'q',
    'ʠ': 'q',
    'ɋ': 'q',
    'ꝗ': 'q',
    'ŕ': 'r',
    'ř': 'r',
    'ŗ': 'r',
    'ṙ': 'r',
    'ṛ': 'r',
    'ṝ': 'r',
    'ȑ': 'r',
    'ɾ': 'r',
    'ᵳ': 'r',
    'ȓ': 'r',
    'ṟ': 'r',
    'ɼ': 'r',
    'ᵲ': 'r',
    'ᶉ': 'r',
    'ɍ': 'r',
    'ɽ': 'r',
    'ↄ': 'c',
    'ꜿ': 'c',
    'ɘ': 'e',
    'ɿ': 'r',
    'ś': 's',
    'ṥ': 's',
    'š': 's',
    'ṧ': 's',
    'ş': 's',
    'ŝ': 's',
    'ș': 's',
    'ṡ': 's',
    'ṣ': 's',
    'ṩ': 's',
    'ʂ': 's',
    'ᵴ': 's',
    'ᶊ': 's',
    'ȿ': 's',
    'ɡ': 'g',
    'ᴑ': 'o',
    'ᴓ': 'o',
    'ᴝ': 'u',
    'ť': 't',
    'ţ': 't',
    'ṱ': 't',
    'ț': 't',
    'ȶ': 't',
    'ẗ': 't',
    'ⱦ': 't',
    'ṫ': 't',
    'ṭ': 't',
    'ƭ': 't',
    'ṯ': 't',
    'ᵵ': 't',
    'ƫ': 't',
    'ʈ': 't',
    'ŧ': 't',
    'ᵺ': 'th',
    'ɐ': 'a',
    'ᴂ': 'ae',
    'ǝ': 'e',
    'ᵷ': 'g',
    'ɥ': 'h',
    'ʮ': 'h',
    'ʯ': 'h',
    'ᴉ': 'i',
    'ʞ': 'k',
    'ꞁ': 'l',
    'ɯ': 'm',
    'ɰ': 'm',
    'ᴔ': 'oe',
    'ɹ': 'r',
    'ɻ': 'r',
    'ɺ': 'r',
    'ⱹ': 'r',
    'ʇ': 't',
    'ʌ': 'v',
    'ʍ': 'w',
    'ʎ': 'y',
    'ꜩ': 'tz',
    'ú': 'u',
    'ŭ': 'u',
    'ǔ': 'u',
    'û': 'u',
    'ṷ': 'u',
    'ü': 'u',
    'ǘ': 'u',
    'ǚ': 'u',
    'ǜ': 'u',
    'ǖ': 'u',
    'ṳ': 'u',
    'ụ': 'u',
    'ű': 'u',
    'ȕ': 'u',
    'ù': 'u',
    'ủ': 'u',
    'ư': 'u',
    'ứ': 'u',
    'ự': 'u',
    'ừ': 'u',
    'ử': 'u',
    'ữ': 'u',
    'ȗ': 'u',
    'ū': 'u',
    'ṻ': 'u',
    'ų': 'u',
    'ᶙ': 'u',
    'ů': 'u',
    'ũ': 'u',
    'ṹ': 'u',
    'ṵ': 'u',
    'ᵫ': 'ue',
    'ꝸ': 'um',
    'ⱴ': 'v',
    'ꝟ': 'v',
    'ṿ': 'v',
    'ʋ': 'v',
    'ᶌ': 'v',
    'ⱱ': 'v',
    'ṽ': 'v',
    'ꝡ': 'vy',
    'ẃ': 'w',
    'ŵ': 'w',
    'ẅ': 'w',
    'ẇ': 'w',
    'ẉ': 'w',
    'ẁ': 'w',
    'ⱳ': 'w',
    'ẘ': 'w',
    'ẍ': 'x',
    'ẋ': 'x',
    'ᶍ': 'x',
    'ý': 'y',
    'ŷ': 'y',
    'ÿ': 'y',
    'ẏ': 'y',
    'ỵ': 'y',
    'ỳ': 'y',
    'ƴ': 'y',
    'ỷ': 'y',
    'ỿ': 'y',
    'ȳ': 'y',
    'ẙ': 'y',
    'ɏ': 'y',
    'ỹ': 'y',
    'ź': 'z',
    'ž': 'z',
    'ẑ': 'z',
    'ʑ': 'z',
    'ⱬ': 'z',
    'ż': 'z',
    'ẓ': 'z',
    'ȥ': 'z',
    'ẕ': 'z',
    'ᵶ': 'z',
    'ᶎ': 'z',
    'ʐ': 'z',
    'ƶ': 'z',
    'ɀ': 'z',
    'þ': 'th',
    'ﬀ': 'ff',
    'ﬃ': 'ffi',
    'ﬄ': 'ffl',
    'ﬁ': 'fi',
    'ﬂ': 'fl',
    'ĳ': 'ij',
    'œ': 'oe',
    'ﬆ': 'st',
    'ₐ': 'a',
    'ₑ': 'e',
    'ᵢ': 'i',
    'ⱼ': 'j',
    'ₒ': 'o',
    'ᵣ': 'r',
    'ᵤ': 'u',
    'ᵥ': 'v',
    'ₓ': 'x',
    'Ё': 'YO',
    'Й': 'I',
    'Ц': 'TS',
    'У': 'U',
    'К': 'K',
    'Е': 'E',
    'Н': 'N',
    'Г': 'G',
    'Ш': 'SH',
    'Щ': 'SCH',
    'З': 'Z',
    'Х': 'H',
    'Ъ': "'",
    'ё': 'yo',
    'й': 'i',
    'ц': 'ts',
    'у': 'u',
    'к': 'k',
    'е': 'e',
    'н': 'n',
    'г': 'g',
    'ш': 'sh',
    'щ': 'sch',
    'з': 'z',
    'х': 'h',
    'ъ': "'",
    'Ф': 'F',
    'Ы': 'I',
    'В': 'V',
    'А': 'a',
    'П': 'P',
    'Р': 'R',
    'О': 'O',
    'Л': 'L',
    'Д': 'D',
    'Ж': 'ZH',
    'Э': 'E',
    'ф': 'f',
    'ы': 'i',
    'в': 'v',
    'а': 'a',
    'п': 'p',
    'р': 'r',
    'о': 'o',
    'л': 'l',
    'д': 'd',
    'ж': 'zh',
    'э': 'e',
    'Я': 'Ya',
    'Ч': 'CH',
    'С': 'S',
    'М': 'M',
    'И': 'I',
    'Т': 'T',
    'Ь': "'",
    'Б': 'B',
    'Ю': 'YU',
    'я': 'ya',
    'ч': 'ch',
    'с': 's',
    'м': 'm',
    'и': 'i',
    'т': 't',
    'ь': "'",
    'б': 'b',
    'ю': 'yu'
  };

  return latinize;
});


/***/ },

/***/ "./node_modules/object-assign/index.js"
/*!*********************************************!*\
  !*** ./node_modules/object-assign/index.js ***!
  \*********************************************/
(module) {

"use strict";
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/


/* eslint-disable no-unused-vars */
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
var hasOwnProperty = Object.prototype.hasOwnProperty;
var propIsEnumerable = Object.prototype.propertyIsEnumerable;

function toObject(val) {
	if (val === null || val === undefined) {
		throw new TypeError('Object.assign cannot be called with null or undefined');
	}

	return Object(val);
}

function shouldUseNative() {
	try {
		if (!Object.assign) {
			return false;
		}

		// Detect buggy property enumeration order in older V8 versions.

		// https://bugs.chromium.org/p/v8/issues/detail?id=4118
		var test1 = new String('abc');  // eslint-disable-line no-new-wrappers
		test1[5] = 'de';
		if (Object.getOwnPropertyNames(test1)[0] === '5') {
			return false;
		}

		// https://bugs.chromium.org/p/v8/issues/detail?id=3056
		var test2 = {};
		for (var i = 0; i < 10; i++) {
			test2['_' + String.fromCharCode(i)] = i;
		}
		var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
			return test2[n];
		});
		if (order2.join('') !== '0123456789') {
			return false;
		}

		// https://bugs.chromium.org/p/v8/issues/detail?id=3056
		var test3 = {};
		'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
			test3[letter] = letter;
		});
		if (Object.keys(Object.assign({}, test3)).join('') !==
				'abcdefghijklmnopqrst') {
			return false;
		}

		return true;
	} catch (err) {
		// We don't expect any of the above to throw, but better to be safe.
		return false;
	}
}

module.exports = shouldUseNative() ? Object.assign : function (target, source) {
	var from;
	var to = toObject(target);
	var symbols;

	for (var s = 1; s < arguments.length; s++) {
		from = Object(arguments[s]);

		for (var key in from) {
			if (hasOwnProperty.call(from, key)) {
				to[key] = from[key];
			}
		}

		if (getOwnPropertySymbols) {
			symbols = getOwnPropertySymbols(from);
			for (var i = 0; i < symbols.length; i++) {
				if (propIsEnumerable.call(from, symbols[i])) {
					to[symbols[i]] = from[symbols[i]];
				}
			}
		}
	}

	return to;
};


/***/ },

/***/ "./node_modules/prop-types/checkPropTypes.js"
/*!***************************************************!*\
  !*** ./node_modules/prop-types/checkPropTypes.js ***!
  \***************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";
/**
 * Copyright (c) 2013-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */



var printWarning = function() {};

if (true) {
  var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js");
  var loggedTypeFailures = {};
  var has = __webpack_require__(/*! ./lib/has */ "./node_modules/prop-types/lib/has.js");

  printWarning = function(text) {
    var message = 'Warning: ' + text;
    if (typeof console !== 'undefined') {
      console.error(message);
    }
    try {
      // --- Welcome to debugging React ---
      // This error was thrown as a convenience so that you can use this stack
      // to find the callsite that caused this warning to fire.
      throw new Error(message);
    } catch (x) { /**/ }
  };
}

/**
 * Assert that the values match with the type specs.
 * Error messages are memorized and will only be shown once.
 *
 * @param {object} typeSpecs Map of name to a ReactPropType
 * @param {object} values Runtime values that need to be type-checked
 * @param {string} location e.g. "prop", "context", "child context"
 * @param {string} componentName Name of the component for error messages.
 * @param {?Function} getStack Returns the component stack.
 * @private
 */
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
  if (true) {
    for (var typeSpecName in typeSpecs) {
      if (has(typeSpecs, typeSpecName)) {
        var error;
        // Prop type validation may throw. In case they do, we don't want to
        // fail the render phase where it didn't fail before. So we log it.
        // After these have been cleaned up, we'll let them throw.
        try {
          // This is intentionally an invariant that gets caught. It's the same
          // behavior as without this statement except with a better message.
          if (typeof typeSpecs[typeSpecName] !== 'function') {
            var err = Error(
              (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
              'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
              'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
            );
            err.name = 'Invariant Violation';
            throw err;
          }
          error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
        } catch (ex) {
          error = ex;
        }
        if (error && !(error instanceof Error)) {
          printWarning(
            (componentName || 'React class') + ': type specification of ' +
            location + ' `' + typeSpecName + '` is invalid; the type checker ' +
            'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
            'You may have forgotten to pass an argument to the type checker ' +
            'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
            'shape all require an argument).'
          );
        }
        if (error instanceof Error && !(error.message in loggedTypeFailures)) {
          // Only monitor this failure once because there tends to be a lot of the
          // same error.
          loggedTypeFailures[error.message] = true;

          var stack = getStack ? getStack() : '';

          printWarning(
            'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
          );
        }
      }
    }
  }
}

/**
 * Resets warning cache when testing.
 *
 * @private
 */
checkPropTypes.resetWarningCache = function() {
  if (true) {
    loggedTypeFailures = {};
  }
}

module.exports = checkPropTypes;


/***/ },

/***/ "./node_modules/prop-types/lib/ReactPropTypesSecret.js"
/*!*************************************************************!*\
  !*** ./node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
  \*************************************************************/
(module) {

"use strict";
/**
 * Copyright (c) 2013-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */



var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';

module.exports = ReactPropTypesSecret;


/***/ },

/***/ "./node_modules/prop-types/lib/has.js"
/*!********************************************!*\
  !*** ./node_modules/prop-types/lib/has.js ***!
  \********************************************/
(module) {

module.exports = Function.call.bind(Object.prototype.hasOwnProperty);


/***/ },

/***/ "./node_modules/react-property/index.js"
/*!**********************************************!*\
  !*** ./node_modules/react-property/index.js ***!
  \**********************************************/
(module, __unused_webpack_exports, __webpack_require__) {

var HTMLDOMPropertyConfig = __webpack_require__(/*! ./lib/HTMLDOMPropertyConfig */ "./node_modules/react-property/lib/HTMLDOMPropertyConfig.js");
var SVGDOMPropertyConfig = __webpack_require__(/*! ./lib/SVGDOMPropertyConfig */ "./node_modules/react-property/lib/SVGDOMPropertyConfig.js");
var injection = __webpack_require__(/*! ./lib/injection */ "./node_modules/react-property/lib/injection.js");

var MUST_USE_PROPERTY = injection.MUST_USE_PROPERTY;
var HAS_BOOLEAN_VALUE = injection.HAS_BOOLEAN_VALUE;
var HAS_NUMERIC_VALUE = injection.HAS_NUMERIC_VALUE;
var HAS_POSITIVE_NUMERIC_VALUE = injection.HAS_POSITIVE_NUMERIC_VALUE;
var HAS_OVERLOADED_BOOLEAN_VALUE = injection.HAS_OVERLOADED_BOOLEAN_VALUE;

/**
 * @see https://github.com/facebook/react/blob/15-stable/src/renderers/dom/shared/DOMProperty.js#L14-L16
 *
 * @param  {Number}  value
 * @param  {Number}  bitmask
 * @return {Boolean}
 */
function checkMask(value, bitmask) {
  return (value & bitmask) === bitmask;
}

/**
 * @see https://github.com/facebook/react/blob/15-stable/src/renderers/dom/shared/DOMProperty.js#L57
 *
 * @param {Object}  domPropertyConfig - HTMLDOMPropertyConfig or SVGDOMPropertyConfig
 * @param {Object}  config            - The object to be mutated
 * @param {Boolean} isSVG             - Whether the injected config is HTML or SVG (it assumes the default is HTML)
 */
function injectDOMPropertyConfig(domPropertyConfig, config, isSVG) {
  var Properties = domPropertyConfig.Properties;
  var DOMAttributeNames = domPropertyConfig.DOMAttributeNames;
  var attributeName;
  var propertyName;
  var propConfig;

  for (propertyName in Properties) {
    attributeName =
      DOMAttributeNames[propertyName] ||
      (isSVG ? propertyName : propertyName.toLowerCase());
    propConfig = Properties[propertyName];

    config[attributeName] = {
      attributeName: attributeName,
      propertyName: propertyName,
      mustUseProperty: checkMask(propConfig, MUST_USE_PROPERTY),
      hasBooleanValue: checkMask(propConfig, HAS_BOOLEAN_VALUE),
      hasNumericValue: checkMask(propConfig, HAS_NUMERIC_VALUE),
      hasPositiveNumericValue: checkMask(
        propConfig,
        HAS_POSITIVE_NUMERIC_VALUE
      ),
      hasOverloadedBooleanValue: checkMask(
        propConfig,
        HAS_OVERLOADED_BOOLEAN_VALUE
      )
    };
  }
}

/**
 * HTML properties config.
 *
 * @type {Object}
 */
var html = {};
injectDOMPropertyConfig(HTMLDOMPropertyConfig, html);

/**
 * SVG properties config.
 *
 * @type {Object}
 */
var svg = {};
injectDOMPropertyConfig(SVGDOMPropertyConfig, svg, true);

/**
 * HTML and SVG properties config.
 *
 * @type {Object}
 */
var properties = {};
injectDOMPropertyConfig(HTMLDOMPropertyConfig, properties);
injectDOMPropertyConfig(SVGDOMPropertyConfig, properties, true);

var ATTRIBUTE_NAME_START_CHAR =
  ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD';
var ATTRIBUTE_NAME_CHAR =
  ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040';

module.exports = {
  html: html,
  svg: svg,
  properties: properties,

  /**
   * Checks whether a property name is a custom attribute.
   *
   * @see https://github.com/facebook/react/blob/15-stable/src/renderers/dom/shared/HTMLDOMPropertyConfig.js#L23-L25
   *
   * @param {String}
   * @return {Boolean}
   */
  isCustomAttribute: RegExp.prototype.test.bind(
    new RegExp('^(data|aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$')
  )
};


/***/ },

/***/ "./node_modules/react-property/lib/HTMLDOMPropertyConfig.js"
/*!******************************************************************!*\
  !*** ./node_modules/react-property/lib/HTMLDOMPropertyConfig.js ***!
  \******************************************************************/
(module) {

module.exports = {
  Properties: {
    autoFocus: 4,
    accept: 0,
    acceptCharset: 0,
    accessKey: 0,
    action: 0,
    allowFullScreen: 4,
    allowTransparency: 0,
    alt: 0,
    as: 0,
    async: 4,
    autoComplete: 0,
    autoPlay: 4,
    capture: 4,
    cellPadding: 0,
    cellSpacing: 0,
    charSet: 0,
    challenge: 0,
    checked: 5,
    cite: 0,
    classID: 0,
    className: 0,
    cols: 24,
    colSpan: 0,
    content: 0,
    contentEditable: 0,
    contextMenu: 0,
    controls: 4,
    controlsList: 0,
    coords: 0,
    crossOrigin: 0,
    data: 0,
    dateTime: 0,
    default: 4,
    defer: 4,
    dir: 0,
    disabled: 4,
    download: 32,
    draggable: 0,
    encType: 0,
    form: 0,
    formAction: 0,
    formEncType: 0,
    formMethod: 0,
    formNoValidate: 4,
    formTarget: 0,
    frameBorder: 0,
    headers: 0,
    height: 0,
    hidden: 4,
    high: 0,
    href: 0,
    hrefLang: 0,
    htmlFor: 0,
    httpEquiv: 0,
    icon: 0,
    id: 0,
    inputMode: 0,
    integrity: 0,
    is: 0,
    keyParams: 0,
    keyType: 0,
    kind: 0,
    label: 0,
    lang: 0,
    list: 0,
    loop: 4,
    low: 0,
    manifest: 0,
    marginHeight: 0,
    marginWidth: 0,
    max: 0,
    maxLength: 0,
    media: 0,
    mediaGroup: 0,
    method: 0,
    min: 0,
    minLength: 0,
    multiple: 5,
    muted: 5,
    name: 0,
    nonce: 0,
    noValidate: 4,
    open: 4,
    optimum: 0,
    pattern: 0,
    placeholder: 0,
    playsInline: 4,
    poster: 0,
    preload: 0,
    profile: 0,
    radioGroup: 0,
    readOnly: 4,
    referrerPolicy: 0,
    rel: 0,
    required: 4,
    reversed: 4,
    role: 0,
    rows: 24,
    rowSpan: 8,
    sandbox: 0,
    scope: 0,
    scoped: 4,
    scrolling: 0,
    seamless: 4,
    selected: 5,
    shape: 0,
    size: 24,
    sizes: 0,
    span: 24,
    spellCheck: 0,
    src: 0,
    srcDoc: 0,
    srcLang: 0,
    srcSet: 0,
    start: 8,
    step: 0,
    style: 0,
    summary: 0,
    tabIndex: 0,
    target: 0,
    title: 0,
    type: 0,
    useMap: 0,
    value: 0,
    width: 0,
    wmode: 0,
    wrap: 0,
    about: 0,
    datatype: 0,
    inlist: 0,
    prefix: 0,
    property: 0,
    resource: 0,
    typeof: 0,
    vocab: 0,
    autoCapitalize: 0,
    autoCorrect: 0,
    autoSave: 0,
    color: 0,
    itemProp: 0,
    itemScope: 4,
    itemType: 0,
    itemID: 0,
    itemRef: 0,
    results: 0,
    security: 0,
    unselectable: 0
  },
  DOMAttributeNames: {
    acceptCharset: 'accept-charset',
    className: 'class',
    htmlFor: 'for',
    httpEquiv: 'http-equiv'
  }
};


/***/ },

/***/ "./node_modules/react-property/lib/SVGDOMPropertyConfig.js"
/*!*****************************************************************!*\
  !*** ./node_modules/react-property/lib/SVGDOMPropertyConfig.js ***!
  \*****************************************************************/
(module) {

module.exports = {
  Properties: {
    accentHeight: 0,
    accumulate: 0,
    additive: 0,
    alignmentBaseline: 0,
    allowReorder: 0,
    alphabetic: 0,
    amplitude: 0,
    arabicForm: 0,
    ascent: 0,
    attributeName: 0,
    attributeType: 0,
    autoReverse: 0,
    azimuth: 0,
    baseFrequency: 0,
    baseProfile: 0,
    baselineShift: 0,
    bbox: 0,
    begin: 0,
    bias: 0,
    by: 0,
    calcMode: 0,
    capHeight: 0,
    clip: 0,
    clipPath: 0,
    clipRule: 0,
    clipPathUnits: 0,
    colorInterpolation: 0,
    colorInterpolationFilters: 0,
    colorProfile: 0,
    colorRendering: 0,
    contentScriptType: 0,
    contentStyleType: 0,
    cursor: 0,
    cx: 0,
    cy: 0,
    d: 0,
    decelerate: 0,
    descent: 0,
    diffuseConstant: 0,
    direction: 0,
    display: 0,
    divisor: 0,
    dominantBaseline: 0,
    dur: 0,
    dx: 0,
    dy: 0,
    edgeMode: 0,
    elevation: 0,
    enableBackground: 0,
    end: 0,
    exponent: 0,
    externalResourcesRequired: 0,
    fill: 0,
    fillOpacity: 0,
    fillRule: 0,
    filter: 0,
    filterRes: 0,
    filterUnits: 0,
    floodColor: 0,
    floodOpacity: 0,
    focusable: 0,
    fontFamily: 0,
    fontSize: 0,
    fontSizeAdjust: 0,
    fontStretch: 0,
    fontStyle: 0,
    fontVariant: 0,
    fontWeight: 0,
    format: 0,
    from: 0,
    fx: 0,
    fy: 0,
    g1: 0,
    g2: 0,
    glyphName: 0,
    glyphOrientationHorizontal: 0,
    glyphOrientationVertical: 0,
    glyphRef: 0,
    gradientTransform: 0,
    gradientUnits: 0,
    hanging: 0,
    horizAdvX: 0,
    horizOriginX: 0,
    ideographic: 0,
    imageRendering: 0,
    in: 0,
    in2: 0,
    intercept: 0,
    k: 0,
    k1: 0,
    k2: 0,
    k3: 0,
    k4: 0,
    kernelMatrix: 0,
    kernelUnitLength: 0,
    kerning: 0,
    keyPoints: 0,
    keySplines: 0,
    keyTimes: 0,
    lengthAdjust: 0,
    letterSpacing: 0,
    lightingColor: 0,
    limitingConeAngle: 0,
    local: 0,
    markerEnd: 0,
    markerMid: 0,
    markerStart: 0,
    markerHeight: 0,
    markerUnits: 0,
    markerWidth: 0,
    mask: 0,
    maskContentUnits: 0,
    maskUnits: 0,
    mathematical: 0,
    mode: 0,
    numOctaves: 0,
    offset: 0,
    opacity: 0,
    operator: 0,
    order: 0,
    orient: 0,
    orientation: 0,
    origin: 0,
    overflow: 0,
    overlinePosition: 0,
    overlineThickness: 0,
    paintOrder: 0,
    panose1: 0,
    pathLength: 0,
    patternContentUnits: 0,
    patternTransform: 0,
    patternUnits: 0,
    pointerEvents: 0,
    points: 0,
    pointsAtX: 0,
    pointsAtY: 0,
    pointsAtZ: 0,
    preserveAlpha: 0,
    preserveAspectRatio: 0,
    primitiveUnits: 0,
    r: 0,
    radius: 0,
    refX: 0,
    refY: 0,
    renderingIntent: 0,
    repeatCount: 0,
    repeatDur: 0,
    requiredExtensions: 0,
    requiredFeatures: 0,
    restart: 0,
    result: 0,
    rotate: 0,
    rx: 0,
    ry: 0,
    scale: 0,
    seed: 0,
    shapeRendering: 0,
    slope: 0,
    spacing: 0,
    specularConstant: 0,
    specularExponent: 0,
    speed: 0,
    spreadMethod: 0,
    startOffset: 0,
    stdDeviation: 0,
    stemh: 0,
    stemv: 0,
    stitchTiles: 0,
    stopColor: 0,
    stopOpacity: 0,
    strikethroughPosition: 0,
    strikethroughThickness: 0,
    string: 0,
    stroke: 0,
    strokeDasharray: 0,
    strokeDashoffset: 0,
    strokeLinecap: 0,
    strokeLinejoin: 0,
    strokeMiterlimit: 0,
    strokeOpacity: 0,
    strokeWidth: 0,
    surfaceScale: 0,
    systemLanguage: 0,
    tableValues: 0,
    targetX: 0,
    targetY: 0,
    textAnchor: 0,
    textDecoration: 0,
    textRendering: 0,
    textLength: 0,
    to: 0,
    transform: 0,
    u1: 0,
    u2: 0,
    underlinePosition: 0,
    underlineThickness: 0,
    unicode: 0,
    unicodeBidi: 0,
    unicodeRange: 0,
    unitsPerEm: 0,
    vAlphabetic: 0,
    vHanging: 0,
    vIdeographic: 0,
    vMathematical: 0,
    values: 0,
    vectorEffect: 0,
    version: 0,
    vertAdvY: 0,
    vertOriginX: 0,
    vertOriginY: 0,
    viewBox: 0,
    viewTarget: 0,
    visibility: 0,
    widths: 0,
    wordSpacing: 0,
    writingMode: 0,
    x: 0,
    xHeight: 0,
    x1: 0,
    x2: 0,
    xChannelSelector: 0,
    xlinkActuate: 0,
    xlinkArcrole: 0,
    xlinkHref: 0,
    xlinkRole: 0,
    xlinkShow: 0,
    xlinkTitle: 0,
    xlinkType: 0,
    xmlBase: 0,
    xmlns: 0,
    xmlnsXlink: 0,
    xmlLang: 0,
    xmlSpace: 0,
    y: 0,
    y1: 0,
    y2: 0,
    yChannelSelector: 0,
    z: 0,
    zoomAndPan: 0
  },
  DOMAttributeNames: {
    accentHeight: 'accent-height',
    alignmentBaseline: 'alignment-baseline',
    arabicForm: 'arabic-form',
    baselineShift: 'baseline-shift',
    capHeight: 'cap-height',
    clipPath: 'clip-path',
    clipRule: 'clip-rule',
    colorInterpolation: 'color-interpolation',
    colorInterpolationFilters: 'color-interpolation-filters',
    colorProfile: 'color-profile',
    colorRendering: 'color-rendering',
    dominantBaseline: 'dominant-baseline',
    enableBackground: 'enable-background',
    fillOpacity: 'fill-opacity',
    fillRule: 'fill-rule',
    floodColor: 'flood-color',
    floodOpacity: 'flood-opacity',
    fontFamily: 'font-family',
    fontSize: 'font-size',
    fontSizeAdjust: 'font-size-adjust',
    fontStretch: 'font-stretch',
    fontStyle: 'font-style',
    fontVariant: 'font-variant',
    fontWeight: 'font-weight',
    glyphName: 'glyph-name',
    glyphOrientationHorizontal: 'glyph-orientation-horizontal',
    glyphOrientationVertical: 'glyph-orientation-vertical',
    horizAdvX: 'horiz-adv-x',
    horizOriginX: 'horiz-origin-x',
    imageRendering: 'image-rendering',
    letterSpacing: 'letter-spacing',
    lightingColor: 'lighting-color',
    markerEnd: 'marker-end',
    markerMid: 'marker-mid',
    markerStart: 'marker-start',
    overlinePosition: 'overline-position',
    overlineThickness: 'overline-thickness',
    paintOrder: 'paint-order',
    panose1: 'panose-1',
    pointerEvents: 'pointer-events',
    renderingIntent: 'rendering-intent',
    shapeRendering: 'shape-rendering',
    stopColor: 'stop-color',
    stopOpacity: 'stop-opacity',
    strikethroughPosition: 'strikethrough-position',
    strikethroughThickness: 'strikethrough-thickness',
    strokeDasharray: 'stroke-dasharray',
    strokeDashoffset: 'stroke-dashoffset',
    strokeLinecap: 'stroke-linecap',
    strokeLinejoin: 'stroke-linejoin',
    strokeMiterlimit: 'stroke-miterlimit',
    strokeOpacity: 'stroke-opacity',
    strokeWidth: 'stroke-width',
    textAnchor: 'text-anchor',
    textDecoration: 'text-decoration',
    textRendering: 'text-rendering',
    underlinePosition: 'underline-position',
    underlineThickness: 'underline-thickness',
    unicodeBidi: 'unicode-bidi',
    unicodeRange: 'unicode-range',
    unitsPerEm: 'units-per-em',
    vAlphabetic: 'v-alphabetic',
    vHanging: 'v-hanging',
    vIdeographic: 'v-ideographic',
    vMathematical: 'v-mathematical',
    vectorEffect: 'vector-effect',
    vertAdvY: 'vert-adv-y',
    vertOriginX: 'vert-origin-x',
    vertOriginY: 'vert-origin-y',
    wordSpacing: 'word-spacing',
    writingMode: 'writing-mode',
    xHeight: 'x-height',
    xlinkActuate: 'xlink:actuate',
    xlinkArcrole: 'xlink:arcrole',
    xlinkHref: 'xlink:href',
    xlinkRole: 'xlink:role',
    xlinkShow: 'xlink:show',
    xlinkTitle: 'xlink:title',
    xlinkType: 'xlink:type',
    xmlBase: 'xml:base',
    xmlnsXlink: 'xmlns:xlink',
    xmlLang: 'xml:lang',
    xmlSpace: 'xml:space'
  }
};


/***/ },

/***/ "./node_modules/react-property/lib/injection.js"
/*!******************************************************!*\
  !*** ./node_modules/react-property/lib/injection.js ***!
  \******************************************************/
(module) {

module.exports = {
  MUST_USE_PROPERTY: 1,
  HAS_BOOLEAN_VALUE: 4,
  HAS_NUMERIC_VALUE: 8,
  HAS_POSITIVE_NUMERIC_VALUE: 24,
  HAS_OVERLOADED_BOOLEAN_VALUE: 32
};


/***/ },

/***/ "./node_modules/react/cjs/react.development.js"
/*!*****************************************************!*\
  !*** ./node_modules/react/cjs/react.development.js ***!
  \*****************************************************/
(__unused_webpack_module, exports, __webpack_require__) {

"use strict";
/** @license React v16.14.0
 * react.development.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */





if (true) {
  (function() {
'use strict';

var _assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
var checkPropTypes = __webpack_require__(/*! prop-types/checkPropTypes */ "./node_modules/prop-types/checkPropTypes.js");

var ReactVersion = '16.14.0';

// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
// nor polyfill, then a plain number is used for performance.
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
var FAUX_ITERATOR_SYMBOL = '@@iterator';
function getIteratorFn(maybeIterable) {
  if (maybeIterable === null || typeof maybeIterable !== 'object') {
    return null;
  }

  var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];

  if (typeof maybeIterator === 'function') {
    return maybeIterator;
  }

  return null;
}

/**
 * Keeps track of the current dispatcher.
 */
var ReactCurrentDispatcher = {
  /**
   * @internal
   * @type {ReactComponent}
   */
  current: null
};

/**
 * Keeps track of the current batch's configuration such as how long an update
 * should suspend for if it needs to.
 */
var ReactCurrentBatchConfig = {
  suspense: null
};

/**
 * Keeps track of the current owner.
 *
 * The current owner is the component who should own any components that are
 * currently being constructed.
 */
var ReactCurrentOwner = {
  /**
   * @internal
   * @type {ReactComponent}
   */
  current: null
};

var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
function describeComponentFrame (name, source, ownerName) {
  var sourceInfo = '';

  if (source) {
    var path = source.fileName;
    var fileName = path.replace(BEFORE_SLASH_RE, '');

    {
      // In DEV, include code for a common special case:
      // prefer "folder/index.js" instead of just "index.js".
      if (/^index\./.test(fileName)) {
        var match = path.match(BEFORE_SLASH_RE);

        if (match) {
          var pathBeforeSlash = match[1];

          if (pathBeforeSlash) {
            var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');
            fileName = folderName + '/' + fileName;
          }
        }
      }
    }

    sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';
  } else if (ownerName) {
    sourceInfo = ' (created by ' + ownerName + ')';
  }

  return '\n    in ' + (name || 'Unknown') + sourceInfo;
}

var Resolved = 1;
function refineResolvedLazyComponent(lazyComponent) {
  return lazyComponent._status === Resolved ? lazyComponent._result : null;
}

function getWrappedName(outerType, innerType, wrapperName) {
  var functionName = innerType.displayName || innerType.name || '';
  return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
}

function getComponentName(type) {
  if (type == null) {
    // Host root, text node or just invalid type.
    return null;
  }

  {
    if (typeof type.tag === 'number') {
      error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
    }
  }

  if (typeof type === 'function') {
    return type.displayName || type.name || null;
  }

  if (typeof type === 'string') {
    return type;
  }

  switch (type) {
    case REACT_FRAGMENT_TYPE:
      return 'Fragment';

    case REACT_PORTAL_TYPE:
      return 'Portal';

    case REACT_PROFILER_TYPE:
      return "Profiler";

    case REACT_STRICT_MODE_TYPE:
      return 'StrictMode';

    case REACT_SUSPENSE_TYPE:
      return 'Suspense';

    case REACT_SUSPENSE_LIST_TYPE:
      return 'SuspenseList';
  }

  if (typeof type === 'object') {
    switch (type.$$typeof) {
      case REACT_CONTEXT_TYPE:
        return 'Context.Consumer';

      case REACT_PROVIDER_TYPE:
        return 'Context.Provider';

      case REACT_FORWARD_REF_TYPE:
        return getWrappedName(type, type.render, 'ForwardRef');

      case REACT_MEMO_TYPE:
        return getComponentName(type.type);

      case REACT_BLOCK_TYPE:
        return getComponentName(type.render);

      case REACT_LAZY_TYPE:
        {
          var thenable = type;
          var resolvedThenable = refineResolvedLazyComponent(thenable);

          if (resolvedThenable) {
            return getComponentName(resolvedThenable);
          }

          break;
        }
    }
  }

  return null;
}

var ReactDebugCurrentFrame = {};
var currentlyValidatingElement = null;
function setCurrentlyValidatingElement(element) {
  {
    currentlyValidatingElement = element;
  }
}

{
  // Stack implementation injected by the current renderer.
  ReactDebugCurrentFrame.getCurrentStack = null;

  ReactDebugCurrentFrame.getStackAddendum = function () {
    var stack = ''; // Add an extra top frame while an element is being validated

    if (currentlyValidatingElement) {
      var name = getComponentName(currentlyValidatingElement.type);
      var owner = currentlyValidatingElement._owner;
      stack += describeComponentFrame(name, currentlyValidatingElement._source, owner && getComponentName(owner.type));
    } // Delegate to the injected renderer-specific implementation


    var impl = ReactDebugCurrentFrame.getCurrentStack;

    if (impl) {
      stack += impl() || '';
    }

    return stack;
  };
}

/**
 * Used by act() to track whether you're inside an act() scope.
 */
var IsSomeRendererActing = {
  current: false
};

var ReactSharedInternals = {
  ReactCurrentDispatcher: ReactCurrentDispatcher,
  ReactCurrentBatchConfig: ReactCurrentBatchConfig,
  ReactCurrentOwner: ReactCurrentOwner,
  IsSomeRendererActing: IsSomeRendererActing,
  // Used by renderers to avoid bundling object-assign twice in UMD bundles:
  assign: _assign
};

{
  _assign(ReactSharedInternals, {
    // These should not be included in production.
    ReactDebugCurrentFrame: ReactDebugCurrentFrame,
    // Shim for React DOM 16.0.0 which still destructured (but not used) this.
    // TODO: remove in React 17.0.
    ReactComponentTreeHook: {}
  });
}

// by calls to these methods by a Babel plugin.
//
// In PROD (or in packages without access to React internals),
// they are left as they are instead.

function warn(format) {
  {
    for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
      args[_key - 1] = arguments[_key];
    }

    printWarning('warn', format, args);
  }
}
function error(format) {
  {
    for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
      args[_key2 - 1] = arguments[_key2];
    }

    printWarning('error', format, args);
  }
}

function printWarning(level, format, args) {
  // When changing this logic, you might want to also
  // update consoleWithStackDev.www.js as well.
  {
    var hasExistingStack = args.length > 0 && typeof args[args.length - 1] === 'string' && args[args.length - 1].indexOf('\n    in') === 0;

    if (!hasExistingStack) {
      var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
      var stack = ReactDebugCurrentFrame.getStackAddendum();

      if (stack !== '') {
        format += '%s';
        args = args.concat([stack]);
      }
    }

    var argsWithFormat = args.map(function (item) {
      return '' + item;
    }); // Careful: RN currently depends on this prefix

    argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
    // breaks IE9: https://github.com/facebook/react/issues/13610
    // eslint-disable-next-line react-internal/no-production-logging

    Function.prototype.apply.call(console[level], console, argsWithFormat);

    try {
      // --- Welcome to debugging React ---
      // This error was thrown as a convenience so that you can use this stack
      // to find the callsite that caused this warning to fire.
      var argIndex = 0;
      var message = 'Warning: ' + format.replace(/%s/g, function () {
        return args[argIndex++];
      });
      throw new Error(message);
    } catch (x) {}
  }
}

var didWarnStateUpdateForUnmountedComponent = {};

function warnNoop(publicInstance, callerName) {
  {
    var _constructor = publicInstance.constructor;
    var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';
    var warningKey = componentName + "." + callerName;

    if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
      return;
    }

    error("Can't call %s on a component that is not yet mounted. " + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);

    didWarnStateUpdateForUnmountedComponent[warningKey] = true;
  }
}
/**
 * This is the abstract API for an update queue.
 */


var ReactNoopUpdateQueue = {
  /**
   * Checks whether or not this composite component is mounted.
   * @param {ReactClass} publicInstance The instance we want to test.
   * @return {boolean} True if mounted, false otherwise.
   * @protected
   * @final
   */
  isMounted: function (publicInstance) {
    return false;
  },

  /**
   * Forces an update. This should only be invoked when it is known with
   * certainty that we are **not** in a DOM transaction.
   *
   * You may want to call this when you know that some deeper aspect of the
   * component's state has changed but `setState` was not called.
   *
   * This will not invoke `shouldComponentUpdate`, but it will invoke
   * `componentWillUpdate` and `componentDidUpdate`.
   *
   * @param {ReactClass} publicInstance The instance that should rerender.
   * @param {?function} callback Called after component is updated.
   * @param {?string} callerName name of the calling function in the public API.
   * @internal
   */
  enqueueForceUpdate: function (publicInstance, callback, callerName) {
    warnNoop(publicInstance, 'forceUpdate');
  },

  /**
   * Replaces all of the state. Always use this or `setState` to mutate state.
   * You should treat `this.state` as immutable.
   *
   * There is no guarantee that `this.state` will be immediately updated, so
   * accessing `this.state` after calling this method may return the old value.
   *
   * @param {ReactClass} publicInstance The instance that should rerender.
   * @param {object} completeState Next state.
   * @param {?function} callback Called after component is updated.
   * @param {?string} callerName name of the calling function in the public API.
   * @internal
   */
  enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {
    warnNoop(publicInstance, 'replaceState');
  },

  /**
   * Sets a subset of the state. This only exists because _pendingState is
   * internal. This provides a merging strategy that is not available to deep
   * properties which is confusing. TODO: Expose pendingState or don't use it
   * during the merge.
   *
   * @param {ReactClass} publicInstance The instance that should rerender.
   * @param {object} partialState Next partial state to be merged with state.
   * @param {?function} callback Called after component is updated.
   * @param {?string} Name of the calling function in the public API.
   * @internal
   */
  enqueueSetState: function (publicInstance, partialState, callback, callerName) {
    warnNoop(publicInstance, 'setState');
  }
};

var emptyObject = {};

{
  Object.freeze(emptyObject);
}
/**
 * Base class helpers for the updating state of a component.
 */


function Component(props, context, updater) {
  this.props = props;
  this.context = context; // If a component has string refs, we will assign a different object later.

  this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the
  // renderer.

  this.updater = updater || ReactNoopUpdateQueue;
}

Component.prototype.isReactComponent = {};
/**
 * Sets a subset of the state. Always use this to mutate
 * state. You should treat `this.state` as immutable.
 *
 * There is no guarantee that `this.state` will be immediately updated, so
 * accessing `this.state` after calling this method may return the old value.
 *
 * There is no guarantee that calls to `setState` will run synchronously,
 * as they may eventually be batched together.  You can provide an optional
 * callback that will be executed when the call to setState is actually
 * completed.
 *
 * When a function is provided to setState, it will be called at some point in
 * the future (not synchronously). It will be called with the up to date
 * component arguments (state, props, context). These values can be different
 * from this.* because your function may be called after receiveProps but before
 * shouldComponentUpdate, and this new state, props, and context will not yet be
 * assigned to this.
 *
 * @param {object|function} partialState Next partial state or function to
 *        produce next partial state to be merged with current state.
 * @param {?function} callback Called after state is updated.
 * @final
 * @protected
 */

Component.prototype.setState = function (partialState, callback) {
  if (!(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null)) {
    {
      throw Error( "setState(...): takes an object of state variables to update or a function which returns an object of state variables." );
    }
  }

  this.updater.enqueueSetState(this, partialState, callback, 'setState');
};
/**
 * Forces an update. This should only be invoked when it is known with
 * certainty that we are **not** in a DOM transaction.
 *
 * You may want to call this when you know that some deeper aspect of the
 * component's state has changed but `setState` was not called.
 *
 * This will not invoke `shouldComponentUpdate`, but it will invoke
 * `componentWillUpdate` and `componentDidUpdate`.
 *
 * @param {?function} callback Called after update is complete.
 * @final
 * @protected
 */


Component.prototype.forceUpdate = function (callback) {
  this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');
};
/**
 * Deprecated APIs. These APIs used to exist on classic React classes but since
 * we would like to deprecate them, we're not going to move them over to this
 * modern base class. Instead, we define a getter that warns if it's accessed.
 */


{
  var deprecatedAPIs = {
    isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
    replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
  };

  var defineDeprecationWarning = function (methodName, info) {
    Object.defineProperty(Component.prototype, methodName, {
      get: function () {
        warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);

        return undefined;
      }
    });
  };

  for (var fnName in deprecatedAPIs) {
    if (deprecatedAPIs.hasOwnProperty(fnName)) {
      defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
    }
  }
}

function ComponentDummy() {}

ComponentDummy.prototype = Component.prototype;
/**
 * Convenience component with default shallow equality check for sCU.
 */

function PureComponent(props, context, updater) {
  this.props = props;
  this.context = context; // If a component has string refs, we will assign a different object later.

  this.refs = emptyObject;
  this.updater = updater || ReactNoopUpdateQueue;
}

var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
pureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.

_assign(pureComponentPrototype, Component.prototype);

pureComponentPrototype.isPureReactComponent = true;

// an immutable object with a single mutable value
function createRef() {
  var refObject = {
    current: null
  };

  {
    Object.seal(refObject);
  }

  return refObject;
}

var hasOwnProperty = Object.prototype.hasOwnProperty;
var RESERVED_PROPS = {
  key: true,
  ref: true,
  __self: true,
  __source: true
};
var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;

{
  didWarnAboutStringRefs = {};
}

function hasValidRef(config) {
  {
    if (hasOwnProperty.call(config, 'ref')) {
      var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;

      if (getter && getter.isReactWarning) {
        return false;
      }
    }
  }

  return config.ref !== undefined;
}

function hasValidKey(config) {
  {
    if (hasOwnProperty.call(config, 'key')) {
      var getter = Object.getOwnPropertyDescriptor(config, 'key').get;

      if (getter && getter.isReactWarning) {
        return false;
      }
    }
  }

  return config.key !== undefined;
}

function defineKeyPropWarningGetter(props, displayName) {
  var warnAboutAccessingKey = function () {
    {
      if (!specialPropKeyWarningShown) {
        specialPropKeyWarningShown = true;

        error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);
      }
    }
  };

  warnAboutAccessingKey.isReactWarning = true;
  Object.defineProperty(props, 'key', {
    get: warnAboutAccessingKey,
    configurable: true
  });
}

function defineRefPropWarningGetter(props, displayName) {
  var warnAboutAccessingRef = function () {
    {
      if (!specialPropRefWarningShown) {
        specialPropRefWarningShown = true;

        error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);
      }
    }
  };

  warnAboutAccessingRef.isReactWarning = true;
  Object.defineProperty(props, 'ref', {
    get: warnAboutAccessingRef,
    configurable: true
  });
}

function warnIfStringRefCannotBeAutoConverted(config) {
  {
    if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {
      var componentName = getComponentName(ReactCurrentOwner.current.type);

      if (!didWarnAboutStringRefs[componentName]) {
        error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://fb.me/react-strict-mode-string-ref', getComponentName(ReactCurrentOwner.current.type), config.ref);

        didWarnAboutStringRefs[componentName] = true;
      }
    }
  }
}
/**
 * Factory method to create a new React element. This no longer adheres to
 * the class pattern, so do not use new to call it. Also, instanceof check
 * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
 * if something is a React Element.
 *
 * @param {*} type
 * @param {*} props
 * @param {*} key
 * @param {string|object} ref
 * @param {*} owner
 * @param {*} self A *temporary* helper to detect places where `this` is
 * different from the `owner` when React.createElement is called, so that we
 * can warn. We want to get rid of owner and replace string `ref`s with arrow
 * functions, and as long as `this` and owner are the same, there will be no
 * change in behavior.
 * @param {*} source An annotation object (added by a transpiler or otherwise)
 * indicating filename, line number, and/or other information.
 * @internal
 */


var ReactElement = function (type, key, ref, self, source, owner, props) {
  var element = {
    // This tag allows us to uniquely identify this as a React Element
    $$typeof: REACT_ELEMENT_TYPE,
    // Built-in properties that belong on the element
    type: type,
    key: key,
    ref: ref,
    props: props,
    // Record the component responsible for creating this element.
    _owner: owner
  };

  {
    // The validation flag is currently mutative. We put it on
    // an external backing store so that we can freeze the whole object.
    // This can be replaced with a WeakMap once they are implemented in
    // commonly used development environments.
    element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
    // the validation flag non-enumerable (where possible, which should
    // include every environment we run tests in), so the test framework
    // ignores it.

    Object.defineProperty(element._store, 'validated', {
      configurable: false,
      enumerable: false,
      writable: true,
      value: false
    }); // self and source are DEV only properties.

    Object.defineProperty(element, '_self', {
      configurable: false,
      enumerable: false,
      writable: false,
      value: self
    }); // Two elements created in two different places should be considered
    // equal for testing purposes and therefore we hide it from enumeration.

    Object.defineProperty(element, '_source', {
      configurable: false,
      enumerable: false,
      writable: false,
      value: source
    });

    if (Object.freeze) {
      Object.freeze(element.props);
      Object.freeze(element);
    }
  }

  return element;
};
/**
 * Create and return a new ReactElement of the given type.
 * See https://reactjs.org/docs/react-api.html#createelement
 */

function createElement(type, config, children) {
  var propName; // Reserved names are extracted

  var props = {};
  var key = null;
  var ref = null;
  var self = null;
  var source = null;

  if (config != null) {
    if (hasValidRef(config)) {
      ref = config.ref;

      {
        warnIfStringRefCannotBeAutoConverted(config);
      }
    }

    if (hasValidKey(config)) {
      key = '' + config.key;
    }

    self = config.__self === undefined ? null : config.__self;
    source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object

    for (propName in config) {
      if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
        props[propName] = config[propName];
      }
    }
  } // Children can be more than one argument, and those are transferred onto
  // the newly allocated props object.


  var childrenLength = arguments.length - 2;

  if (childrenLength === 1) {
    props.children = children;
  } else if (childrenLength > 1) {
    var childArray = Array(childrenLength);

    for (var i = 0; i < childrenLength; i++) {
      childArray[i] = arguments[i + 2];
    }

    {
      if (Object.freeze) {
        Object.freeze(childArray);
      }
    }

    props.children = childArray;
  } // Resolve default props


  if (type && type.defaultProps) {
    var defaultProps = type.defaultProps;

    for (propName in defaultProps) {
      if (props[propName] === undefined) {
        props[propName] = defaultProps[propName];
      }
    }
  }

  {
    if (key || ref) {
      var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;

      if (key) {
        defineKeyPropWarningGetter(props, displayName);
      }

      if (ref) {
        defineRefPropWarningGetter(props, displayName);
      }
    }
  }

  return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
}
function cloneAndReplaceKey(oldElement, newKey) {
  var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
  return newElement;
}
/**
 * Clone and return a new ReactElement using element as the starting point.
 * See https://reactjs.org/docs/react-api.html#cloneelement
 */

function cloneElement(element, config, children) {
  if (!!(element === null || element === undefined)) {
    {
      throw Error( "React.cloneElement(...): The argument must be a React element, but you passed " + element + "." );
    }
  }

  var propName; // Original props are copied

  var props = _assign({}, element.props); // Reserved names are extracted


  var key = element.key;
  var ref = element.ref; // Self is preserved since the owner is preserved.

  var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a
  // transpiler, and the original source is probably a better indicator of the
  // true owner.

  var source = element._source; // Owner will be preserved, unless ref is overridden

  var owner = element._owner;

  if (config != null) {
    if (hasValidRef(config)) {
      // Silently steal the ref from the parent.
      ref = config.ref;
      owner = ReactCurrentOwner.current;
    }

    if (hasValidKey(config)) {
      key = '' + config.key;
    } // Remaining properties override existing props


    var defaultProps;

    if (element.type && element.type.defaultProps) {
      defaultProps = element.type.defaultProps;
    }

    for (propName in config) {
      if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
        if (config[propName] === undefined && defaultProps !== undefined) {
          // Resolve default props
          props[propName] = defaultProps[propName];
        } else {
          props[propName] = config[propName];
        }
      }
    }
  } // Children can be more than one argument, and those are transferred onto
  // the newly allocated props object.


  var childrenLength = arguments.length - 2;

  if (childrenLength === 1) {
    props.children = children;
  } else if (childrenLength > 1) {
    var childArray = Array(childrenLength);

    for (var i = 0; i < childrenLength; i++) {
      childArray[i] = arguments[i + 2];
    }

    props.children = childArray;
  }

  return ReactElement(element.type, key, ref, self, source, owner, props);
}
/**
 * Verifies the object is a ReactElement.
 * See https://reactjs.org/docs/react-api.html#isvalidelement
 * @param {?object} object
 * @return {boolean} True if `object` is a ReactElement.
 * @final
 */

function isValidElement(object) {
  return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
}

var SEPARATOR = '.';
var SUBSEPARATOR = ':';
/**
 * Escape and wrap key so it is safe to use as a reactid
 *
 * @param {string} key to be escaped.
 * @return {string} the escaped key.
 */

function escape(key) {
  var escapeRegex = /[=:]/g;
  var escaperLookup = {
    '=': '=0',
    ':': '=2'
  };
  var escapedString = ('' + key).replace(escapeRegex, function (match) {
    return escaperLookup[match];
  });
  return '$' + escapedString;
}
/**
 * TODO: Test that a single child and an array with one item have the same key
 * pattern.
 */


var didWarnAboutMaps = false;
var userProvidedKeyEscapeRegex = /\/+/g;

function escapeUserProvidedKey(text) {
  return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
}

var POOL_SIZE = 10;
var traverseContextPool = [];

function getPooledTraverseContext(mapResult, keyPrefix, mapFunction, mapContext) {
  if (traverseContextPool.length) {
    var traverseContext = traverseContextPool.pop();
    traverseContext.result = mapResult;
    traverseContext.keyPrefix = keyPrefix;
    traverseContext.func = mapFunction;
    traverseContext.context = mapContext;
    traverseContext.count = 0;
    return traverseContext;
  } else {
    return {
      result: mapResult,
      keyPrefix: keyPrefix,
      func: mapFunction,
      context: mapContext,
      count: 0
    };
  }
}

function releaseTraverseContext(traverseContext) {
  traverseContext.result = null;
  traverseContext.keyPrefix = null;
  traverseContext.func = null;
  traverseContext.context = null;
  traverseContext.count = 0;

  if (traverseContextPool.length < POOL_SIZE) {
    traverseContextPool.push(traverseContext);
  }
}
/**
 * @param {?*} children Children tree container.
 * @param {!string} nameSoFar Name of the key path so far.
 * @param {!function} callback Callback to invoke with each child found.
 * @param {?*} traverseContext Used to pass information throughout the traversal
 * process.
 * @return {!number} The number of children in this subtree.
 */


function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
  var type = typeof children;

  if (type === 'undefined' || type === 'boolean') {
    // All of the above are perceived as null.
    children = null;
  }

  var invokeCallback = false;

  if (children === null) {
    invokeCallback = true;
  } else {
    switch (type) {
      case 'string':
      case 'number':
        invokeCallback = true;
        break;

      case 'object':
        switch (children.$$typeof) {
          case REACT_ELEMENT_TYPE:
          case REACT_PORTAL_TYPE:
            invokeCallback = true;
        }

    }
  }

  if (invokeCallback) {
    callback(traverseContext, children, // If it's the only child, treat the name as if it was wrapped in an array
    // so that it's consistent if the number of children grows.
    nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
    return 1;
  }

  var child;
  var nextName;
  var subtreeCount = 0; // Count of children found in the current subtree.

  var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;

  if (Array.isArray(children)) {
    for (var i = 0; i < children.length; i++) {
      child = children[i];
      nextName = nextNamePrefix + getComponentKey(child, i);
      subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
    }
  } else {
    var iteratorFn = getIteratorFn(children);

    if (typeof iteratorFn === 'function') {

      {
        // Warn about using Maps as children
        if (iteratorFn === children.entries) {
          if (!didWarnAboutMaps) {
            warn('Using Maps as children is deprecated and will be removed in ' + 'a future major release. Consider converting children to ' + 'an array of keyed ReactElements instead.');
          }

          didWarnAboutMaps = true;
        }
      }

      var iterator = iteratorFn.call(children);
      var step;
      var ii = 0;

      while (!(step = iterator.next()).done) {
        child = step.value;
        nextName = nextNamePrefix + getComponentKey(child, ii++);
        subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
      }
    } else if (type === 'object') {
      var addendum = '';

      {
        addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + ReactDebugCurrentFrame.getStackAddendum();
      }

      var childrenString = '' + children;

      {
        {
          throw Error( "Objects are not valid as a React child (found: " + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + ")." + addendum );
        }
      }
    }
  }

  return subtreeCount;
}
/**
 * Traverses children that are typically specified as `props.children`, but
 * might also be specified through attributes:
 *
 * - `traverseAllChildren(this.props.children, ...)`
 * - `traverseAllChildren(this.props.leftPanelChildren, ...)`
 *
 * The `traverseContext` is an optional argument that is passed through the
 * entire traversal. It can be used to store accumulations or anything else that
 * the callback might find relevant.
 *
 * @param {?*} children Children tree object.
 * @param {!function} callback To invoke upon traversing each child.
 * @param {?*} traverseContext Context for traversal.
 * @return {!number} The number of children in this subtree.
 */


function traverseAllChildren(children, callback, traverseContext) {
  if (children == null) {
    return 0;
  }

  return traverseAllChildrenImpl(children, '', callback, traverseContext);
}
/**
 * Generate a key string that identifies a component within a set.
 *
 * @param {*} component A component that could contain a manual key.
 * @param {number} index Index that is used if a manual key is not provided.
 * @return {string}
 */


function getComponentKey(component, index) {
  // Do some typechecking here since we call this blindly. We want to ensure
  // that we don't block potential future ES APIs.
  if (typeof component === 'object' && component !== null && component.key != null) {
    // Explicit key
    return escape(component.key);
  } // Implicit key determined by the index in the set


  return index.toString(36);
}

function forEachSingleChild(bookKeeping, child, name) {
  var func = bookKeeping.func,
      context = bookKeeping.context;
  func.call(context, child, bookKeeping.count++);
}
/**
 * Iterates through children that are typically specified as `props.children`.
 *
 * See https://reactjs.org/docs/react-api.html#reactchildrenforeach
 *
 * The provided forEachFunc(child, index) will be called for each
 * leaf child.
 *
 * @param {?*} children Children tree container.
 * @param {function(*, int)} forEachFunc
 * @param {*} forEachContext Context for forEachContext.
 */


function forEachChildren(children, forEachFunc, forEachContext) {
  if (children == null) {
    return children;
  }

  var traverseContext = getPooledTraverseContext(null, null, forEachFunc, forEachContext);
  traverseAllChildren(children, forEachSingleChild, traverseContext);
  releaseTraverseContext(traverseContext);
}

function mapSingleChildIntoContext(bookKeeping, child, childKey) {
  var result = bookKeeping.result,
      keyPrefix = bookKeeping.keyPrefix,
      func = bookKeeping.func,
      context = bookKeeping.context;
  var mappedChild = func.call(context, child, bookKeeping.count++);

  if (Array.isArray(mappedChild)) {
    mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, function (c) {
      return c;
    });
  } else if (mappedChild != null) {
    if (isValidElement(mappedChild)) {
      mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as
      // traverseAllChildren used to do for objects as children
      keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);
    }

    result.push(mappedChild);
  }
}

function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
  var escapedPrefix = '';

  if (prefix != null) {
    escapedPrefix = escapeUserProvidedKey(prefix) + '/';
  }

  var traverseContext = getPooledTraverseContext(array, escapedPrefix, func, context);
  traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
  releaseTraverseContext(traverseContext);
}
/**
 * Maps children that are typically specified as `props.children`.
 *
 * See https://reactjs.org/docs/react-api.html#reactchildrenmap
 *
 * The provided mapFunction(child, key, index) will be called for each
 * leaf child.
 *
 * @param {?*} children Children tree container.
 * @param {function(*, int)} func The map function.
 * @param {*} context Context for mapFunction.
 * @return {object} Object containing the ordered map of results.
 */


function mapChildren(children, func, context) {
  if (children == null) {
    return children;
  }

  var result = [];
  mapIntoWithKeyPrefixInternal(children, result, null, func, context);
  return result;
}
/**
 * Count the number of children that are typically specified as
 * `props.children`.
 *
 * See https://reactjs.org/docs/react-api.html#reactchildrencount
 *
 * @param {?*} children Children tree container.
 * @return {number} The number of children.
 */


function countChildren(children) {
  return traverseAllChildren(children, function () {
    return null;
  }, null);
}
/**
 * Flatten a children object (typically specified as `props.children`) and
 * return an array with appropriately re-keyed children.
 *
 * See https://reactjs.org/docs/react-api.html#reactchildrentoarray
 */


function toArray(children) {
  var result = [];
  mapIntoWithKeyPrefixInternal(children, result, null, function (child) {
    return child;
  });
  return result;
}
/**
 * Returns the first child in a collection of children and verifies that there
 * is only one child in the collection.
 *
 * See https://reactjs.org/docs/react-api.html#reactchildrenonly
 *
 * The current implementation of this function assumes that a single child gets
 * passed without a wrapper, but the purpose of this helper function is to
 * abstract away the particular structure of children.
 *
 * @param {?object} children Child collection structure.
 * @return {ReactElement} The first and only `ReactElement` contained in the
 * structure.
 */


function onlyChild(children) {
  if (!isValidElement(children)) {
    {
      throw Error( "React.Children.only expected to receive a single React element child." );
    }
  }

  return children;
}

function createContext(defaultValue, calculateChangedBits) {
  if (calculateChangedBits === undefined) {
    calculateChangedBits = null;
  } else {
    {
      if (calculateChangedBits !== null && typeof calculateChangedBits !== 'function') {
        error('createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits);
      }
    }
  }

  var context = {
    $$typeof: REACT_CONTEXT_TYPE,
    _calculateChangedBits: calculateChangedBits,
    // As a workaround to support multiple concurrent renderers, we categorize
    // some renderers as primary and others as secondary. We only expect
    // there to be two concurrent renderers at most: React Native (primary) and
    // Fabric (secondary); React DOM (primary) and React ART (secondary).
    // Secondary renderers store their context values on separate fields.
    _currentValue: defaultValue,
    _currentValue2: defaultValue,
    // Used to track how many concurrent renderers this context currently
    // supports within in a single renderer. Such as parallel server rendering.
    _threadCount: 0,
    // These are circular
    Provider: null,
    Consumer: null
  };
  context.Provider = {
    $$typeof: REACT_PROVIDER_TYPE,
    _context: context
  };
  var hasWarnedAboutUsingNestedContextConsumers = false;
  var hasWarnedAboutUsingConsumerProvider = false;

  {
    // A separate object, but proxies back to the original context object for
    // backwards compatibility. It has a different $$typeof, so we can properly
    // warn for the incorrect usage of Context as a Consumer.
    var Consumer = {
      $$typeof: REACT_CONTEXT_TYPE,
      _context: context,
      _calculateChangedBits: context._calculateChangedBits
    }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here

    Object.defineProperties(Consumer, {
      Provider: {
        get: function () {
          if (!hasWarnedAboutUsingConsumerProvider) {
            hasWarnedAboutUsingConsumerProvider = true;

            error('Rendering <Context.Consumer.Provider> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Provider> instead?');
          }

          return context.Provider;
        },
        set: function (_Provider) {
          context.Provider = _Provider;
        }
      },
      _currentValue: {
        get: function () {
          return context._currentValue;
        },
        set: function (_currentValue) {
          context._currentValue = _currentValue;
        }
      },
      _currentValue2: {
        get: function () {
          return context._currentValue2;
        },
        set: function (_currentValue2) {
          context._currentValue2 = _currentValue2;
        }
      },
      _threadCount: {
        get: function () {
          return context._threadCount;
        },
        set: function (_threadCount) {
          context._threadCount = _threadCount;
        }
      },
      Consumer: {
        get: function () {
          if (!hasWarnedAboutUsingNestedContextConsumers) {
            hasWarnedAboutUsingNestedContextConsumers = true;

            error('Rendering <Context.Consumer.Consumer> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
          }

          return context.Consumer;
        }
      }
    }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty

    context.Consumer = Consumer;
  }

  {
    context._currentRenderer = null;
    context._currentRenderer2 = null;
  }

  return context;
}

function lazy(ctor) {
  var lazyType = {
    $$typeof: REACT_LAZY_TYPE,
    _ctor: ctor,
    // React uses these fields to store the result.
    _status: -1,
    _result: null
  };

  {
    // In production, this would just set it on the object.
    var defaultProps;
    var propTypes;
    Object.defineProperties(lazyType, {
      defaultProps: {
        configurable: true,
        get: function () {
          return defaultProps;
        },
        set: function (newDefaultProps) {
          error('React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');

          defaultProps = newDefaultProps; // Match production behavior more closely:

          Object.defineProperty(lazyType, 'defaultProps', {
            enumerable: true
          });
        }
      },
      propTypes: {
        configurable: true,
        get: function () {
          return propTypes;
        },
        set: function (newPropTypes) {
          error('React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');

          propTypes = newPropTypes; // Match production behavior more closely:

          Object.defineProperty(lazyType, 'propTypes', {
            enumerable: true
          });
        }
      }
    });
  }

  return lazyType;
}

function forwardRef(render) {
  {
    if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
      error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');
    } else if (typeof render !== 'function') {
      error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);
    } else {
      if (render.length !== 0 && render.length !== 2) {
        error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.');
      }
    }

    if (render != null) {
      if (render.defaultProps != null || render.propTypes != null) {
        error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?');
      }
    }
  }

  return {
    $$typeof: REACT_FORWARD_REF_TYPE,
    render: render
  };
}

function isValidElementType(type) {
  return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
  type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
}

function memo(type, compare) {
  {
    if (!isValidElementType(type)) {
      error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);
    }
  }

  return {
    $$typeof: REACT_MEMO_TYPE,
    type: type,
    compare: compare === undefined ? null : compare
  };
}

function resolveDispatcher() {
  var dispatcher = ReactCurrentDispatcher.current;

  if (!(dispatcher !== null)) {
    {
      throw Error( "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem." );
    }
  }

  return dispatcher;
}

function useContext(Context, unstable_observedBits) {
  var dispatcher = resolveDispatcher();

  {
    if (unstable_observedBits !== undefined) {
      error('useContext() second argument is reserved for future ' + 'use in React. Passing it is not supported. ' + 'You passed: %s.%s', unstable_observedBits, typeof unstable_observedBits === 'number' && Array.isArray(arguments[2]) ? '\n\nDid you call array.map(useContext)? ' + 'Calling Hooks inside a loop is not supported. ' + 'Learn more at https://fb.me/rules-of-hooks' : '');
    } // TODO: add a more generic warning for invalid values.


    if (Context._context !== undefined) {
      var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs
      // and nobody should be using this in existing code.

      if (realContext.Consumer === Context) {
        error('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?');
      } else if (realContext.Provider === Context) {
        error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');
      }
    }
  }

  return dispatcher.useContext(Context, unstable_observedBits);
}
function useState(initialState) {
  var dispatcher = resolveDispatcher();
  return dispatcher.useState(initialState);
}
function useReducer(reducer, initialArg, init) {
  var dispatcher = resolveDispatcher();
  return dispatcher.useReducer(reducer, initialArg, init);
}
function useRef(initialValue) {
  var dispatcher = resolveDispatcher();
  return dispatcher.useRef(initialValue);
}
function useEffect(create, deps) {
  var dispatcher = resolveDispatcher();
  return dispatcher.useEffect(create, deps);
}
function useLayoutEffect(create, deps) {
  var dispatcher = resolveDispatcher();
  return dispatcher.useLayoutEffect(create, deps);
}
function useCallback(callback, deps) {
  var dispatcher = resolveDispatcher();
  return dispatcher.useCallback(callback, deps);
}
function useMemo(create, deps) {
  var dispatcher = resolveDispatcher();
  return dispatcher.useMemo(create, deps);
}
function useImperativeHandle(ref, create, deps) {
  var dispatcher = resolveDispatcher();
  return dispatcher.useImperativeHandle(ref, create, deps);
}
function useDebugValue(value, formatterFn) {
  {
    var dispatcher = resolveDispatcher();
    return dispatcher.useDebugValue(value, formatterFn);
  }
}

var propTypesMisspellWarningShown;

{
  propTypesMisspellWarningShown = false;
}

function getDeclarationErrorAddendum() {
  if (ReactCurrentOwner.current) {
    var name = getComponentName(ReactCurrentOwner.current.type);

    if (name) {
      return '\n\nCheck the render method of `' + name + '`.';
    }
  }

  return '';
}

function getSourceInfoErrorAddendum(source) {
  if (source !== undefined) {
    var fileName = source.fileName.replace(/^.*[\\\/]/, '');
    var lineNumber = source.lineNumber;
    return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
  }

  return '';
}

function getSourceInfoErrorAddendumForProps(elementProps) {
  if (elementProps !== null && elementProps !== undefined) {
    return getSourceInfoErrorAddendum(elementProps.__source);
  }

  return '';
}
/**
 * Warn if there's no key explicitly set on dynamic arrays of children or
 * object keys are not valid. This allows us to keep track of children between
 * updates.
 */


var ownerHasKeyUseWarning = {};

function getCurrentComponentErrorInfo(parentType) {
  var info = getDeclarationErrorAddendum();

  if (!info) {
    var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;

    if (parentName) {
      info = "\n\nCheck the top-level render call using <" + parentName + ">.";
    }
  }

  return info;
}
/**
 * Warn if the element doesn't have an explicit key assigned to it.
 * This element is in an array. The array could grow and shrink or be
 * reordered. All children that haven't already been validated are required to
 * have a "key" property assigned to it. Error statuses are cached so a warning
 * will only be shown once.
 *
 * @internal
 * @param {ReactElement} element Element that requires a key.
 * @param {*} parentType element's parent's type.
 */


function validateExplicitKey(element, parentType) {
  if (!element._store || element._store.validated || element.key != null) {
    return;
  }

  element._store.validated = true;
  var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);

  if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
    return;
  }

  ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
  // property, it may be the creator of the child that's responsible for
  // assigning it a key.

  var childOwner = '';

  if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
    // Give the component that originally created this child.
    childOwner = " It was passed a child from " + getComponentName(element._owner.type) + ".";
  }

  setCurrentlyValidatingElement(element);

  {
    error('Each child in a list should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.', currentComponentErrorInfo, childOwner);
  }

  setCurrentlyValidatingElement(null);
}
/**
 * Ensure that every element either is passed in a static location, in an
 * array with an explicit keys property defined, or in an object literal
 * with valid key property.
 *
 * @internal
 * @param {ReactNode} node Statically passed child of any type.
 * @param {*} parentType node's parent's type.
 */


function validateChildKeys(node, parentType) {
  if (typeof node !== 'object') {
    return;
  }

  if (Array.isArray(node)) {
    for (var i = 0; i < node.length; i++) {
      var child = node[i];

      if (isValidElement(child)) {
        validateExplicitKey(child, parentType);
      }
    }
  } else if (isValidElement(node)) {
    // This element was passed in a valid location.
    if (node._store) {
      node._store.validated = true;
    }
  } else if (node) {
    var iteratorFn = getIteratorFn(node);

    if (typeof iteratorFn === 'function') {
      // Entry iterators used to provide implicit keys,
      // but now we print a separate warning for them later.
      if (iteratorFn !== node.entries) {
        var iterator = iteratorFn.call(node);
        var step;

        while (!(step = iterator.next()).done) {
          if (isValidElement(step.value)) {
            validateExplicitKey(step.value, parentType);
          }
        }
      }
    }
  }
}
/**
 * Given an element, validate that its props follow the propTypes definition,
 * provided by the type.
 *
 * @param {ReactElement} element
 */


function validatePropTypes(element) {
  {
    var type = element.type;

    if (type === null || type === undefined || typeof type === 'string') {
      return;
    }

    var name = getComponentName(type);
    var propTypes;

    if (typeof type === 'function') {
      propTypes = type.propTypes;
    } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
    // Inner props are checked in the reconciler.
    type.$$typeof === REACT_MEMO_TYPE)) {
      propTypes = type.propTypes;
    } else {
      return;
    }

    if (propTypes) {
      setCurrentlyValidatingElement(element);
      checkPropTypes(propTypes, element.props, 'prop', name, ReactDebugCurrentFrame.getStackAddendum);
      setCurrentlyValidatingElement(null);
    } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
      propTypesMisspellWarningShown = true;

      error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', name || 'Unknown');
    }

    if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
      error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
    }
  }
}
/**
 * Given a fragment, validate that it can only be provided with fragment props
 * @param {ReactElement} fragment
 */


function validateFragmentProps(fragment) {
  {
    setCurrentlyValidatingElement(fragment);
    var keys = Object.keys(fragment.props);

    for (var i = 0; i < keys.length; i++) {
      var key = keys[i];

      if (key !== 'children' && key !== 'key') {
        error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);

        break;
      }
    }

    if (fragment.ref !== null) {
      error('Invalid attribute `ref` supplied to `React.Fragment`.');
    }

    setCurrentlyValidatingElement(null);
  }
}
function createElementWithValidation(type, props, children) {
  var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
  // succeed and there will likely be errors in render.

  if (!validType) {
    var info = '';

    if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
      info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
    }

    var sourceInfo = getSourceInfoErrorAddendumForProps(props);

    if (sourceInfo) {
      info += sourceInfo;
    } else {
      info += getDeclarationErrorAddendum();
    }

    var typeString;

    if (type === null) {
      typeString = 'null';
    } else if (Array.isArray(type)) {
      typeString = 'array';
    } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
      typeString = "<" + (getComponentName(type.type) || 'Unknown') + " />";
      info = ' Did you accidentally export a JSX literal instead of a component?';
    } else {
      typeString = typeof type;
    }

    {
      error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
    }
  }

  var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.
  // TODO: Drop this when these are no longer allowed as the type argument.

  if (element == null) {
    return element;
  } // Skip key warning if the type isn't valid since our key validation logic
  // doesn't expect a non-string/function type and can throw confusing errors.
  // We don't want exception behavior to differ between dev and prod.
  // (Rendering will throw with a helpful message and as soon as the type is
  // fixed, the key warnings will appear.)


  if (validType) {
    for (var i = 2; i < arguments.length; i++) {
      validateChildKeys(arguments[i], type);
    }
  }

  if (type === REACT_FRAGMENT_TYPE) {
    validateFragmentProps(element);
  } else {
    validatePropTypes(element);
  }

  return element;
}
var didWarnAboutDeprecatedCreateFactory = false;
function createFactoryWithValidation(type) {
  var validatedFactory = createElementWithValidation.bind(null, type);
  validatedFactory.type = type;

  {
    if (!didWarnAboutDeprecatedCreateFactory) {
      didWarnAboutDeprecatedCreateFactory = true;

      warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.');
    } // Legacy hook: remove it


    Object.defineProperty(validatedFactory, 'type', {
      enumerable: false,
      get: function () {
        warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');

        Object.defineProperty(this, 'type', {
          value: type
        });
        return type;
      }
    });
  }

  return validatedFactory;
}
function cloneElementWithValidation(element, props, children) {
  var newElement = cloneElement.apply(this, arguments);

  for (var i = 2; i < arguments.length; i++) {
    validateChildKeys(arguments[i], newElement.type);
  }

  validatePropTypes(newElement);
  return newElement;
}

{

  try {
    var frozenObject = Object.freeze({});
    var testMap = new Map([[frozenObject, null]]);
    var testSet = new Set([frozenObject]); // This is necessary for Rollup to not consider these unused.
    // https://github.com/rollup/rollup/issues/1771
    // TODO: we can remove these if Rollup fixes the bug.

    testMap.set(0, 0);
    testSet.add(0);
  } catch (e) {
  }
}

var createElement$1 =  createElementWithValidation ;
var cloneElement$1 =  cloneElementWithValidation ;
var createFactory =  createFactoryWithValidation ;
var Children = {
  map: mapChildren,
  forEach: forEachChildren,
  count: countChildren,
  toArray: toArray,
  only: onlyChild
};

exports.Children = Children;
exports.Component = Component;
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.Profiler = REACT_PROFILER_TYPE;
exports.PureComponent = PureComponent;
exports.StrictMode = REACT_STRICT_MODE_TYPE;
exports.Suspense = REACT_SUSPENSE_TYPE;
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;
exports.cloneElement = cloneElement$1;
exports.createContext = createContext;
exports.createElement = createElement$1;
exports.createFactory = createFactory;
exports.createRef = createRef;
exports.forwardRef = forwardRef;
exports.isValidElement = isValidElement;
exports.lazy = lazy;
exports.memo = memo;
exports.useCallback = useCallback;
exports.useContext = useContext;
exports.useDebugValue = useDebugValue;
exports.useEffect = useEffect;
exports.useImperativeHandle = useImperativeHandle;
exports.useLayoutEffect = useLayoutEffect;
exports.useMemo = useMemo;
exports.useReducer = useReducer;
exports.useRef = useRef;
exports.useState = useState;
exports.version = ReactVersion;
  })();
}


/***/ },

/***/ "./node_modules/react/index.js"
/*!*************************************!*\
  !*** ./node_modules/react/index.js ***!
  \*************************************/
(module, __unused_webpack_exports, __webpack_require__) {

"use strict";


if (false) // removed by dead control flow
{} else {
  module.exports = __webpack_require__(/*! ./cjs/react.development.js */ "./node_modules/react/cjs/react.development.js");
}


/***/ },

/***/ "./node_modules/style-to-object/index.js"
/*!***********************************************!*\
  !*** ./node_modules/style-to-object/index.js ***!
  \***********************************************/
(module, __unused_webpack_exports, __webpack_require__) {

var parse = __webpack_require__(/*! inline-style-parser */ "./node_modules/inline-style-parser/index.js");

/**
 * Parses inline style to object.
 *
 * @example
 * // returns { 'line-height': '42' }
 * StyleToObject('line-height: 42;');
 *
 * @param  {String}      style      - The inline style.
 * @param  {Function}    [iterator] - The iterator function.
 * @return {null|Object}
 */
function StyleToObject(style, iterator) {
  var output = null;
  if (!style || typeof style !== 'string') {
    return output;
  }

  var declaration;
  var declarations = parse(style);
  var hasIterator = typeof iterator === 'function';
  var property;
  var value;

  for (var i = 0, len = declarations.length; i < len; i++) {
    declaration = declarations[i];
    property = declaration.property;
    value = declaration.value;

    if (hasIterator) {
      iterator(property, value, declaration);
    } else if (value) {
      output || (output = {});
      output[property] = value;
    }
  }

  return output;
}

module.exports = StyleToObject;


/***/ }

/******/ 	});
/************************************************************************/
/******/ 	// 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;
/******/ 		}
/******/ 		// Check if module exists (development only)
/******/ 		if (__webpack_modules__[moduleId] === undefined) {
/******/ 			var e = new Error("Cannot find module '" + moduleId + "'");
/******/ 			e.code = 'MODULE_NOT_FOUND';
/******/ 			throw e;
/******/ 		}
/******/ 		// 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;
/******/ 	}
/******/ 	
/************************************************************************/
/******/ 	/* 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/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 });
/******/ 		};
/******/ 	})();
/******/ 	
/************************************************************************/
/******/ 	
/******/ 	// startup
/******/ 	// Load entry module and return exports
/******/ 	__webpack_require__("./assets/blocks/0-adv-components/api-version-deprecations.jsx");
/******/ 	// This entry module is referenced by other modules so it can't be inlined
/******/ 	__webpack_require__("./assets/blocks/0-adv-components/components.jsx");
/******/ 	__webpack_require__("./assets/blocks/0-adv-components/datetime.jsx");
/******/ 	__webpack_require__("./assets/blocks/0-adv-components/icon-class.jsx");
/******/ 	__webpack_require__("./assets/blocks/0-adv-components/utils.jsx");
/******/ 	__webpack_require__("./assets/blocks/accordion/block.jsx");
/******/ 	__webpack_require__("./assets/blocks/advaccordion/accordion.jsx");
/******/ 	__webpack_require__("./assets/blocks/advaccordion/block.jsx");
/******/ 	__webpack_require__("./assets/blocks/advbutton/block.jsx");
/******/ 	__webpack_require__("./assets/blocks/advicon/block.jsx");
/******/ 	__webpack_require__("./assets/blocks/advimage/block.jsx");
/******/ 	__webpack_require__("./assets/blocks/advlist/block.jsx");
/******/ 	__webpack_require__("./assets/blocks/advlist/item.jsx");
/******/ 	__webpack_require__("./assets/blocks/advtable/block.jsx");
/******/ 	__webpack_require__("./assets/blocks/advtabs/block.jsx");
/******/ 	__webpack_require__("./assets/blocks/advtabs/tab.jsx");
/******/ 	__webpack_require__("./assets/blocks/advvideo/block.jsx");
/******/ 	__webpack_require__("./assets/blocks/columns/block.jsx");
/******/ 	__webpack_require__("./assets/blocks/columns/column.jsx");
/******/ 	__webpack_require__("./assets/blocks/contact-form/block.jsx");
/******/ 	__webpack_require__("./assets/blocks/container/block.jsx");
/******/ 	__webpack_require__("./assets/blocks/count-up/block.jsx");
/******/ 	__webpack_require__("./assets/blocks/images-slider/block.jsx");
/******/ 	__webpack_require__("./assets/blocks/infobox/block.jsx");
/******/ 	__webpack_require__("./assets/blocks/login-form/block.jsx");
/******/ 	__webpack_require__("./assets/blocks/map/block.jsx");
/******/ 	__webpack_require__("./assets/blocks/newsletter/block.jsx");
/******/ 	__webpack_require__("./assets/blocks/pro-ad/shared/index.jsx");
/******/ 	__webpack_require__("./assets/blocks/recent-posts/block.jsx");
/******/ 	__webpack_require__("./assets/blocks/recent-posts/query-controls.jsx");
/******/ 	__webpack_require__("./assets/blocks/search-bar/block.jsx");
/******/ 	__webpack_require__("./assets/blocks/social-links/block.jsx");
/******/ 	__webpack_require__("./assets/blocks/summary/block.jsx");
/******/ 	__webpack_require__("./assets/blocks/tabs/block.jsx");
/******/ 	__webpack_require__("./assets/blocks/testimonial/block.jsx");
/******/ 	var __webpack_exports__ = __webpack_require__("./assets/blocks/woo-products/block.jsx");
/******/ 	
/******/ })()
;
//# sourceMappingURL=blocks.js.map