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

/***/ "./node_modules/@wordpress/icons/build-module/library/cancel-circle-filled.js":
/*!************************************************************************************!*\
  !*** ./node_modules/@wordpress/icons/build-module/library/cancel-circle-filled.js ***!
  \************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives");
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);


/**
 * WordPress dependencies
 */

const cancelCircleFilled = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, {
  viewBox: "0 0 24 24",
  xmlns: "http://www.w3.org/2000/svg"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, {
  d: "M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21ZM15.5303 8.46967C15.8232 8.76256 15.8232 9.23744 15.5303 9.53033L13.0607 12L15.5303 14.4697C15.8232 14.7626 15.8232 15.2374 15.5303 15.5303C15.2374 15.8232 14.7626 15.8232 14.4697 15.5303L12 13.0607L9.53033 15.5303C9.23744 15.8232 8.76256 15.8232 8.46967 15.5303C8.17678 15.2374 8.17678 14.7626 8.46967 14.4697L10.9393 12L8.46967 9.53033C8.17678 9.23744 8.17678 8.76256 8.46967 8.46967C8.76256 8.17678 9.23744 8.17678 9.53033 8.46967L12 10.9393L14.4697 8.46967C14.7626 8.17678 15.2374 8.17678 15.5303 8.46967Z"
}));
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cancelCircleFilled);
//# sourceMappingURL=cancel-circle-filled.js.map

/***/ }),

/***/ "./node_modules/@wordpress/icons/build-module/library/code.js":
/*!********************************************************************!*\
  !*** ./node_modules/@wordpress/icons/build-module/library/code.js ***!
  \********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives");
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);


/**
 * WordPress dependencies
 */

const code = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, {
  viewBox: "0 0 24 24",
  xmlns: "http://www.w3.org/2000/svg"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, {
  d: "M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"
}));
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);
//# sourceMappingURL=code.js.map

/***/ }),

/***/ "./node_modules/@wordpress/icons/build-module/library/plus-circle-filled.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@wordpress/icons/build-module/library/plus-circle-filled.js ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives");
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);


/**
 * WordPress dependencies
 */

const plusCircleFilled = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, {
  xmlns: "http://www.w3.org/2000/svg",
  viewBox: "0 0 24 24"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, {
  d: "M2 12C2 6.44444 6.44444 2 12 2C17.5556 2 22 6.44444 22 12C22 17.5556 17.5556 22 12 22C6.44444 22 2 17.5556 2 12ZM13 11V7H11V11H7V13H11V17H13V13H17V11H13Z"
}));
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (plusCircleFilled);
//# sourceMappingURL=plus-circle-filled.js.map

/***/ }),

/***/ "./node_modules/@wordpress/icons/build-module/library/plus.js":
/*!********************************************************************!*\
  !*** ./node_modules/@wordpress/icons/build-module/library/plus.js ***!
  \********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives");
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);


/**
 * WordPress dependencies
 */

const plus = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, {
  xmlns: "http://www.w3.org/2000/svg",
  viewBox: "0 0 24 24"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, {
  d: "M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"
}));
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (plus);
//# sourceMappingURL=plus.js.map

/***/ }),

/***/ "./node_modules/@wordpress/icons/build-module/library/rotate-left.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@wordpress/icons/build-module/library/rotate-left.js ***!
  \***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives");
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);


/**
 * WordPress dependencies
 */

const rotateLeft = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, {
  xmlns: "http://www.w3.org/2000/svg",
  viewBox: "0 0 24 24"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, {
  d: "M12 4V2.2L9 4.8l3 2.5V5.5c3.6 0 6.5 2.9 6.5 6.5 0 2.9-1.9 5.3-4.5 6.2v.2l-.1-.2c-.4.1-.7.2-1.1.2l.2 1.5c.3 0 .6-.1 1-.2 3.5-.9 6-4 6-7.7 0-4.4-3.6-8-8-8zm-7.9 7l1.5.2c.1-1.2.5-2.3 1.2-3.2l-1.1-.9C4.8 8.2 4.3 9.6 4.1 11zm1.5 1.8l-1.5.2c.1.7.3 1.4.5 2 .3.7.6 1.3 1 1.8l1.2-.8c-.3-.5-.6-1-.8-1.5s-.4-1.1-.4-1.7zm1.5 5.5c1.1.9 2.4 1.4 3.8 1.6l.2-1.5c-1.1-.1-2.2-.5-3.1-1.2l-.9 1.1z"
}));
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (rotateLeft);
//# sourceMappingURL=rotate-left.js.map

/***/ }),

/***/ "./node_modules/@wordpress/icons/build-module/library/rotate-right.js":
/*!****************************************************************************!*\
  !*** ./node_modules/@wordpress/icons/build-module/library/rotate-right.js ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives");
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);


/**
 * WordPress dependencies
 */

const rotateRight = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, {
  xmlns: "http://www.w3.org/2000/svg",
  viewBox: "0 0 24 24"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, {
  d: "M15.1 4.8l-3-2.5V4c-4.4 0-8 3.6-8 8 0 3.7 2.5 6.9 6 7.7.3.1.6.1 1 .2l.2-1.5c-.4 0-.7-.1-1.1-.2l-.1.2v-.2c-2.6-.8-4.5-3.3-4.5-6.2 0-3.6 2.9-6.5 6.5-6.5v1.8l3-2.5zM20 11c-.2-1.4-.7-2.7-1.6-3.8l-1.2.8c.7.9 1.1 2 1.3 3.1L20 11zm-1.5 1.8c-.1.5-.2 1.1-.4 1.6s-.5 1-.8 1.5l1.2.9c.4-.5.8-1.1 1-1.8s.5-1.3.5-2l-1.5-.2zm-5.6 5.6l.2 1.5c1.4-.2 2.7-.7 3.8-1.6l-.9-1.1c-.9.7-2 1.1-3.1 1.2z"
}));
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (rotateRight);
//# sourceMappingURL=rotate-right.js.map

/***/ }),

/***/ "./node_modules/@wordpress/icons/build-module/library/star-filled.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@wordpress/icons/build-module/library/star-filled.js ***!
  \***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives");
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);


/**
 * WordPress dependencies
 */

const starFilled = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, {
  xmlns: "http://www.w3.org/2000/svg",
  viewBox: "0 0 24 24"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, {
  d: "M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"
}));
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (starFilled);
//# sourceMappingURL=star-filled.js.map

/***/ }),

/***/ "./node_modules/@wordpress/icons/build-module/library/trash.js":
/*!*********************************************************************!*\
  !*** ./node_modules/@wordpress/icons/build-module/library/trash.js ***!
  \*********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives");
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);


/**
 * WordPress dependencies
 */

const trash = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, {
  xmlns: "http://www.w3.org/2000/svg",
  viewBox: "0 0 24 24"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, {
  d: "M20 5h-5.7c0-1.3-1-2.3-2.3-2.3S9.7 3.7 9.7 5H4v2h1.5v.3l1.7 11.1c.1 1 1 1.7 2 1.7h5.7c1 0 1.8-.7 2-1.7l1.7-11.1V7H20V5zm-3.2 2l-1.7 11.1c0 .1-.1.2-.3.2H9.1c-.1 0-.3-.1-.3-.2L7.2 7h9.6z"
}));
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (trash);
//# sourceMappingURL=trash.js.map

/***/ }),

/***/ "./node_modules/@wordpress/icons/build-module/library/undo.js":
/*!********************************************************************!*\
  !*** ./node_modules/@wordpress/icons/build-module/library/undo.js ***!
  \********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives");
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);


/**
 * WordPress dependencies
 */

const undo = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, {
  xmlns: "http://www.w3.org/2000/svg",
  viewBox: "0 0 24 24"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, {
  d: "M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"
}));
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (undo);
//# sourceMappingURL=undo.js.map

/***/ }),

/***/ "./node_modules/@wordpress/icons/build-module/library/warning.js":
/*!***********************************************************************!*\
  !*** ./node_modules/@wordpress/icons/build-module/library/warning.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives");
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);


/**
 * WordPress dependencies
 */

const warning = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, {
  xmlns: "http://www.w3.org/2000/svg",
  viewBox: "-2 -2 24 24"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, {
  d: "M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm1.13 9.38l.35-6.46H8.52l.35 6.46h2.26zm-.09 3.36c.24-.23.37-.55.37-.96 0-.42-.12-.74-.36-.97s-.59-.35-1.06-.35-.82.12-1.07.35-.37.55-.37.97c0 .41.13.73.38.96.26.23.61.34 1.06.34s.8-.11 1.05-.34z"
}));
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (warning);
//# sourceMappingURL=warning.js.map

/***/ }),

/***/ "./assets/apps/components/src/Common/MediaLibrary.js":
/*!***********************************************************!*\
  !*** ./assets/apps/components/src/Common/MediaLibrary.js ***!
  \***********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash");
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);


const {
  wp
} = window;
const getAttachmentsCollection = ids => {
  return wp.media.query({
    order: 'ASC',
    orderby: 'post__in',
    post__in: ids,
    posts_per_page: -1,
    query: true,
    type: 'image'
  });
};
const mustBeCropped = (flexW, flexH, dstW, dstH, imgW, imgH) => {
  // We might be working with a SVG
  if (imgW === imgH && imgW === 0) {
    return false;
  }
  // If the width and height are both flexible
  // then the user does not need to crop the image.
  if (true === flexW && true === flexH) {
    return false;
  }

  // If the width is flexible and the cropped image height matches the current image height,
  // then the user does not need to crop the image.
  if (true === flexW && dstH === imgH) {
    return false;
  }

  // If the height is flexible and the cropped image width matches the current image width,
  // then the user does not need to crop the image.
  if (true === flexH && dstW === imgW) {
    return false;
  }

  // If the cropped image width matches the current image width,
  // and the cropped image height matches the current image height
  // then the user does not need to crop the image.
  if (dstW === imgW && dstH === imgH) {
    return false;
  }

  // If the destination width is equal to or greater than the cropped image width
  // then the user does not need to crop the image...
  if (imgW <= dstW) {
    return false;
  }
  return true;
};
const calculateImageSelectOptions = (attachment, controller) => {
  const currentCropControl = controller.get('control');
  const realWidth = attachment.get('width');
  const realHeight = attachment.get('height');
  let xInit = parseInt(currentCropControl.params.width, 10);
  let yInit = parseInt(currentCropControl.params.height, 10);
  const ratio = xInit / yInit;
  controller.set('canSkipCrop', true);
  const xImg = xInit;
  const yImg = yInit;
  if (realWidth / realHeight > ratio) {
    yInit = realHeight;
    xInit = yInit * ratio;
  } else {
    xInit = realWidth;
    yInit = xInit / ratio;
  }
  const x1 = parseFloat(((realWidth - xInit) / 2).toFixed(2));
  const y1 = parseFloat(((realHeight - yInit) / 2).toFixed(2));
  return {
    handles: true,
    keys: true,
    instance: true,
    persistent: false,
    imageWidth: parseFloat(realWidth.toFixed(2)),
    imageHeight: parseFloat(realHeight.toFixed(2)),
    minWidth: xImg > xInit ? xInit : xImg,
    minHeight: yImg > yInit ? yInit : yImg,
    x1,
    y1,
    x2: parseFloat((xInit + x1).toFixed(2)),
    y2: parseFloat((yInit + y1).toFixed(2))
  };
};
const setImageFromURL = (url, attachmentId, width, height) => {
  const data = {};
  data.url = url;
  data.thumbnail_url = url;
  // eslint-disable-next-line no-undef
  data.timestamp = (0,lodash__WEBPACK_IMPORTED_MODULE_0__.now)();
  if (attachmentId) {
    data.id = attachmentId;
  }
  if (width) {
    data.width = width;
  }
  if (height) {
    data.height = height;
  }
  return data;
};
class MediaLibrary extends _wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Component {
  constructor() {
    super(...arguments);
    this.openModal = this.openModal.bind(this);
    this.onOpen = this.onOpen.bind(this);
    this.onSelect = this.onSelect.bind(this);
    this.onClose = this.onClose.bind(this);
    this.onCropped = this.onCropped.bind(this);
    this.onSkippedCrop = this.onSkippedCrop.bind(this);
    this.buildAndSetGalleryFrame();
  }
  createStates() {
    const {
      title = wp.media.view.l10n.createGalleryTitle,
      suggestedWidth = 200,
      suggestedHeight = 50,
      flexWidth = false,
      flexHeight = true
    } = this.props;
    const states = [];
    const libraryState = wp.media.controller.Library.extend({
      defaults: (0,lodash__WEBPACK_IMPORTED_MODULE_0__.defaults)({
        autoSelect: true,
        content: 'browse',
        contentUserSetting: true,
        date: false,
        describe: false,
        filterable: false,
        id: 'library',
        menu: 'default',
        multiple: false,
        syncSelection: true,
        title,
        toolbar: 'select',
        suggestedWidth,
        suggestedHeight
      }, wp.media.controller.Library.prototype.defaults)
    });
    states.push(new libraryState());
    const cropControl = {
      id: 'crop-control-id',
      params: {
        flex_width: flexWidth,
        // set to true if the width of the cropped image can be different to the width defined here
        flex_height: flexHeight,
        // set to true if the height of the cropped image can be different to the height defined here
        width: suggestedWidth,
        // set the desired width of the destination image here
        height: suggestedHeight // set the desired height of the destination image here
      }
    };
    cropControl.mustBeCropped = mustBeCropped;
    const cropState = new wp.media.controller.CustomizeImageCropper({
      imgSelectOptions: calculateImageSelectOptions,
      control: cropControl
    });
    states.push(cropState);
    return states;
  }
  buildAndSetGalleryFrame() {
    const {
      button = {
        text: wp.media.view.l10n.selectAndCrop,
        // l10n.selectAndCrop,
        close: false
      },
      multiple = false,
      value = {}
    } = this.props;
    if (this.frame) {
      this.frame.remove();
    }
    const attachments = getAttachmentsCollection(value);
    const selection = new wp.media.model.Selection(attachments.models, {
      props: attachments.props.toJSON(),
      multiple
    });
    const states = this.createStates();
    this.frame = wp.media({
      button,
      selection,
      state: 'library',
      // set the custom state as default state
      states
    });
    this.initializeListeners();
  }
  initializeListeners() {
    // When an image is selected in the media frame...
    this.frame.on('select', this.onSelect);
    this.frame.on('open', this.onOpen);
    this.frame.on('close', this.onClose);
    this.frame.on('cropped', this.onCropped);
    this.frame.on('skippedcrop', this.onSkippedCrop);
  }
  onCropped(croppedImage) {
    const {
      onSelect
    } = this.props;
    const url = croppedImage.url,
      attachmentId = croppedImage.id,
      w = croppedImage.width,
      h = croppedImage.height;
    const attachment = setImageFromURL(url, attachmentId, w, h);
    onSelect(attachment);
  }
  onSkippedCrop(selection) {
    const {
      onSelect
    } = this.props;
    const url = selection.get('url'),
      w = selection.get('width'),
      h = selection.get('height');
    const attachment = setImageFromURL(url, selection.id, w, h);
    onSelect(attachment);
  }
  onSelect() {
    const {
      onSelect,
      multiple = false,
      suggestedWidth = 200,
      suggestedHeight = 50,
      flexWidth = false,
      flexHeight = true
    } = this.props;
    // Get media attachment details from the frame state
    const attachment = this.frame.state().get('selection').toJSON();
    if (suggestedWidth === attachment.width && suggestedHeight === attachment.height && !flexWidth && !flexHeight) {
      onSelect(multiple ? attachment : attachment[0]);
      this.frame.close();
    } else {
      this.frame.setState('cropper');
    }
  }
  onOpen() {
    this.frame.setState('library');
    this.updateCollection();

    // Handle both this.props.value being either (number[]) multiple ids
    // (for galleries) or a (number) singular id (e.g. image block).
    const hasMedia = Array.isArray(this.props.value) ? !!this.props.value?.length : !!this.props.value;
    if (!hasMedia) {
      return;
    }
    if (!this.props.gallery) {
      const selection = this.frame.state().get('selection');
      (0,lodash__WEBPACK_IMPORTED_MODULE_0__.castArray)(this.props.value).forEach(id => {
        selection.add(wp.media.attachment(id));
      });
    }

    // load the images so they are available in the media modal.
    getAttachmentsCollection((0,lodash__WEBPACK_IMPORTED_MODULE_0__.castArray)(this.props.value)).more();
  }
  updateCollection() {
    const frameContent = this.frame.content.get();
    if (frameContent && frameContent.collection) {
      const collection = frameContent.collection;

      // clean all attachments we have in memory.
      collection.toArray().forEach(model => model.trigger('destroy', model));

      // reset has more flag, if library had small amount of items all items may have been loaded before.
      collection.mirroring._hasMore = true;

      // request items
      collection.more();
    }
  }
  onClose() {
    const {
      onClose
    } = this.props;
    if (onClose) {
      onClose();
    }
  }
  openModal(event) {
    event.preventDefault();
    this.buildAndSetGalleryFrame();
    this.frame.open();
  }
  render() {
    return this.props.render({
      open: this.openModal
    });
  }
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (MediaLibrary);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/background/BackgroundComponent.js":
/*!*******************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/background/BackgroundComponent.js ***!
  \*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);

/* jshint esversion: 6 */



const BackgroundComponent = ({
  control
}) => {
  const controlVal = control.setting.get();
  const {
    label,
    description
  } = control.params;
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({
    type: controlVal.type || 'color',
    imageUrl: controlVal.imageUrl || '',
    focusPoint: controlVal.focusPoint || {
      x: 0.5,
      y: 0.5
    },
    colorValue: controlVal.colorValue || '#ffffff',
    toggleElementor: controlVal.toggleElementor || false,
    colorValueElementor: controlVal.colorValueElementor || 'var(--sol-color-page-title-background)',
    overlayColorValue: controlVal.overlayColorValue || '',
    overlayOpacity: controlVal.overlayOpacity || 50,
    fixed: controlVal.fixed || false,
    useFeatured: controlVal.useFeatured || false
  });
  const updateValue = updatedValues => {
    const nextValue = {
      ...value,
      ...updatedValues
    };
    setValue(nextValue);
    control.setting.set(nextValue);
  };
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    document.addEventListener('solace-changed-customizer-value', e => {
      if (!e.detail) return false;
      if (e.detail.id !== control.id) return false;
      updateValue(e.detail.value);
    });
  }, []);
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.Background, {
    onChange: updateValue,
    value: value,
    label: label,
    description: description
  });
};
BackgroundComponent.propTypes = {
  control: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BackgroundComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/background/Control.js":
/*!*******************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/background/Control.js ***!
  \*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   BackgroundControl: () => (/* binding */ BackgroundControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _BackgroundComponent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BackgroundComponent.js */ "./assets/apps/customizer-controls/src/background/BackgroundComponent.js");

/* jshint esversion: 6 */


const BackgroundControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_BackgroundComponent_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/builder-columns/Control.js":
/*!************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/builder-columns/Control.js ***!
  \************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   BuilderColumns: () => (/* binding */ BuilderColumns)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _BuilderColumnsComponent_tsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BuilderColumnsComponent.tsx */ "./assets/apps/customizer-controls/src/builder-columns/BuilderColumnsComponent.tsx");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);

/* jshint esversion: 6 */



const BuilderColumns = wp.customize.Control.extend({
  renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_BuilderColumnsComponent_tsx__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/builder-instructions/Control.js":
/*!*****************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/builder-instructions/Control.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   InstructionsControl: () => (/* binding */ InstructionsControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _Instructions_tsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Instructions.tsx */ "./assets/apps/customizer-controls/src/builder-instructions/Instructions.tsx");

/* jshint esversion: 6 */


const InstructionsControl = wp.customize.Control.extend({
  renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Instructions_tsx__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/builder/Control.js":
/*!****************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/builder/Control.js ***!
  \****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   BuilderControl: () => (/* binding */ BuilderControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _HFGBuilderComponent_tsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./HFGBuilderComponent.tsx */ "./assets/apps/customizer-controls/src/builder/HFGBuilderComponent.tsx");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ "lodash");
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__);

/* jshint esversion: 6 */




const BuilderControl = wp.customize.Control.extend({
  renderContent() {
    const customizePreview = document.getElementById('customize-controls');
    let where = document.querySelector(`#accordion-section-${this.params.section}`);
    if (this.params.builderType === 'page_header') {
      const pageHeaderComponents = document.querySelector(`#customize-control-solace_pro_page_header_layout_components`);
      if (!(0,lodash__WEBPACK_IMPORTED_MODULE_3__.isNull)(pageHeaderComponents) && pageHeaderComponents !== 'undefined') {
        where = pageHeaderComponents;
      }
    }
    const builderPortalMount = document.createElement('div');
    builderPortalMount.classList.add('solace-builder-portal-wrap', 'solace-hfg-builder');
    customizePreview.appendChild(builderPortalMount);
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_HFGBuilderComponent_tsx__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this,
      portalMount: builderPortalMount
    }), where);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/button-appearance/ButtonAppearanceComponent.js":
/*!********************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/button-appearance/ButtonAppearanceComponent.js ***!
  \********************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__);

/*eslint camelcase: ["error", {allow: ["no_hover", "no_shadow"]}]*/




const ButtonAppearanceComponent = ({
  control
}) => {
  const controlValue = control.setting.get();
  const defaultsFromControl = {
    borderRadius: {
      top: 3,
      right: 3,
      bottom: 3,
      left: 3
    },
    borderWidth: {
      top: 1,
      right: 1,
      bottom: 1,
      left: 1
    },
    useShadow: false,
    shadowColor: 'rgba(0,0,0,0.5)',
    shadowProperties: {
      blur: 5,
      width: 0,
      height: 0
    },
    useShadowHover: false,
    shadowColorHover: 'rgba(0,0,0,0.5)',
    shadowPropertiesHover: {
      blur: 5,
      width: 0,
      height: 0
    }
  };

  // If this is the old, non-array version of radius, we convert.
  if (typeof controlValue.borderRadius === 'number') {
    controlValue.borderRadius = {
      top: controlValue.borderRadius,
      right: controlValue.borderRadius,
      bottom: controlValue.borderRadius,
      left: controlValue.borderRadius
    };
  }
  // If this is the old, non-array version of radius, we convert.
  if (typeof controlValue.borderWidth === 'number') {
    controlValue.borderWidth = {
      top: controlValue.borderWidth,
      right: controlValue.borderWidth,
      bottom: controlValue.borderWidth,
      left: controlValue.borderWidth
    };
  }
  const defaultVals = control.params.defaultVals ? {
    ...defaultsFromControl,
    ...control.params.defaultVals
  } : defaultsFromControl;
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({
    ...defaultVals,
    ...controlValue
  });
  const updateValue = (prop, propVal) => {
    const nextValue = {
      ...value,
      [prop]: propVal
    };
    setValue(nextValue);
    control.setting.set(nextValue);
  };
  const {
    label,
    no_hover,
    no_shadow
  } = control.params;
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    document.addEventListener('solace-changed-customizer-value', e => {
      if (!e.detail) return false;
      if (e.detail.id !== control.id) return false;
      // Migrate border-radius and border-width
      const r = e.detail.value.borderRadius;
      if (r && (typeof r === 'string' || typeof r === 'number')) {
        e.detail.value.borderRadius = {
          top: r,
          bottom: r,
          right: r,
          left: r
        };
      }
      const w = e.detail.value.borderWidth;
      if (w && (typeof w === 'string' || typeof w === 'number')) {
        e.detail.value.borderWidth = {
          top: w,
          bottom: w,
          right: w,
          left: w
        };
      }
      setValue({
        ...value,
        ...e.detail.value
      });
      control.setting.set(e.detail.value);
    });
  }, []);
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.ButtonAppearance, {
    defaultVals: defaultVals,
    onChange: updateValue,
    value: value,
    label: label,
    noHover: no_hover,
    noShadow: no_shadow
  });
};
ButtonAppearanceComponent.propTypes = {
  control: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ButtonAppearanceComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/button-appearance/Control.js":
/*!**************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/button-appearance/Control.js ***!
  \**************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ButtonAppearanceControl: () => (/* binding */ ButtonAppearanceControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _ButtonAppearanceComponent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ButtonAppearanceComponent.js */ "./assets/apps/customizer-controls/src/button-appearance/ButtonAppearanceComponent.js");

/* jshint esversion: 6 */



const ButtonAppearanceControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_ButtonAppearanceComponent_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/card-options-cart/CardOptionsCart.js":
/*!**********************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/card-options-cart/CardOptionsCart.js ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);

/* global SolaceReactCustomize */





const CardOptionsCart = ({
  label,
  value,
  onChange
}) => {
  const [currentDevice, setCurrentDevice] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)('desktop');
  const [visible, setVisible] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
  const [popoverCoords, setPopoverCoords] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({
    top: 0,
    left: 0
  });
  const popoverRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    const handleGetPopupClickTitle = e => {
      const controlID = 'solace_product_page_ordering_card_options__add_to_cart';
      const baseIds = ['svg', 'g', 'path1', 'path2'];
      const ids = [controlID, ...baseIds.map(prefix => `${prefix}-${controlID}`)];
      if (ids.includes(e.target.id)) {
        const rect = e.target.getBoundingClientRect();
        setPopoverCoords({
          top: rect.bottom - 25,
          left: rect.left + 50,
          y: rect.y
        });
        setVisible(true);
      }
    };
    document.addEventListener('click', handleGetPopupClickTitle);
    return () => {
      document.removeEventListener('click', handleGetPopupClickTitle);
    };
  });
  const renderAutoHide = () => {
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.NewToggle, {
      className: "solace-toggle-control new-toggle",
      checked: value.autoHide,
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Auto Hide', 'solace'),
      onChange: autoHide => {
        wp.customize.previewer.refresh();
        onChange({
          autoHide
        });
      }
    });
  };
  const renderBottomSpacing = () => {
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-white-background-control solace-range-control"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-control-header"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: "customize-control-title"
    }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Bottom Spacing', 'solace')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.ResponsiveControl, {
      hideResponsive: true
    })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "range-wrap"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.RangeControl, {
      value: value.bottomSpacing[currentDevice],
      min: 1,
      max: 250,
      step: 1,
      onChange: val => {
        const nextVal = value.bottomSpacing;
        nextVal[currentDevice] = val;
        onChange({
          value: nextVal
        });
      }
    })));
  };
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, visible && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Popover, {
    className: "popover-card-options-add-to-cart solace-remove-style-popover-transform",
    onFocusOutside: () => {
      setVisible(false);
    },
    ref: popoverRef,
    style: {
      position: 'absolute',
      top: popoverCoords.top,
      left: popoverCoords.left
    }
  }, label && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "customize-control-title"
  }, label), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-typeface-title-control solace-white-background-control",
    style: {
      position: 'absolute',
      left: popoverCoords.left - 10,
      top: popoverCoords.y - 15,
      backgroundColor: 'var(--sol-customizer-panel-bg-color)',
      color: '#fff',
      border: '1px solid var(--sol-customizer-line-color)',
      borderRadius: '10px'
    }
  }, renderAutoHide(), renderBottomSpacing())));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CardOptionsCart);
const responsiveShape = {
  mobile: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number)]),
  tablet: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number)]),
  desktop: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number)])
};
CardOptionsCart.propTypes = {
  label: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().string),
  value: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape({
    autoHide: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().bool),
    bottomSpacing: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape({
      suffix: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape(responsiveShape),
      ...responsiveShape
    })
  }),
  refreshAfterReset: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().bool),
  onChange: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func).isRequired
};

/***/ }),

/***/ "./assets/apps/customizer-controls/src/card-options-cart/CardOptionsCartComponent.js":
/*!*******************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/card-options-cart/CardOptionsCartComponent.js ***!
  \*******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _CardOptionsCart_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CardOptionsCart.js */ "./assets/apps/customizer-controls/src/card-options-cart/CardOptionsCart.js");




const CardOptionsCartComponent = ({
  control
}) => {
  let setVal = control.setting.get();
  const controlParams = control.params.input_attrs;
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({
    autoHide: setVal.autoHide,
    bottomSpacing: setVal.bottomSpacing,
    flag: false
  });
  const updateValues = nextValue => {
    setValue({
      ...value,
      ...nextValue
    });
    control.setting.set({
      ...control.setting.get(),
      ...nextValue,
      flag: !control.setting.get().flag
    });
  };
  const {
    label,
    refresh_on_reset
  } = control.params;
  const {
    bottom_spacing_override_value
  } = controlParams;
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_CardOptionsCart_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
    label: label,
    value: value,
    bottom_spacing_override_value: bottom_spacing_override_value,
    onChange: updateValues,
    refreshAfterReset: refresh_on_reset
  });
};
CardOptionsCartComponent.propTypes = {
  control: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CardOptionsCartComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/card-options-cart/Control.js":
/*!**************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/card-options-cart/Control.js ***!
  \**************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   CardOptionsCartControl: () => (/* binding */ CardOptionsCartControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _CardOptionsCartComponent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CardOptionsCartComponent.js */ "./assets/apps/customizer-controls/src/card-options-cart/CardOptionsCartComponent.js");

/* jshint esversion: 6 */


const CardOptionsCartControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_CardOptionsCartComponent_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/card-options-categories/CardOptionsCategories.js":
/*!**********************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/card-options-categories/CardOptionsCategories.js ***!
  \**********************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/code.js");

/* global SolaceReactCustomize */






const CardOptionsCategories = ({
  label,
  value,
  onChange,
  control
}) => {
  const [currentDevice, setCurrentDevice] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)('desktop');
  const [visible, setVisible] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
  const [popoverCoords, setPopoverCoords] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({
    top: 0,
    left: 0
  });
  const popoverRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
  const {
    custom
  } = control.settings;
  const updateValue = newVal => {
    const getVal = control.setting.get();
    getVal.separator = newVal;
    wp.customize.previewer.refresh();
    control.setting.set(getVal);
  };
  const handleCustomizerValueChange = e => {
    if (!e.detail || e.detail.id !== control.id) return;
    updateValue(e.detail.value);
  };
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    document.addEventListener('solace-changed-customizer-value', handleCustomizerValueChange);
    return () => {
      document.removeEventListener('solace-changed-customizer-value', handleCustomizerValueChange);
    };
  });
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    const handleGetPopupClickTitle = e => {
      const controlID = 'solace_product_page_ordering_card_options__categories';
      const baseIds = ['svg', 'g', 'path1', 'path2'];
      const ids = [controlID, ...baseIds.map(prefix => `${prefix}-${controlID}`)];
      if (ids.includes(e.target.id)) {
        const rect = e.target.getBoundingClientRect();
        setPopoverCoords({
          top: rect.bottom - 25,
          left: rect.left + 50,
          y: rect.y
        });
        setVisible(true);
      }
    };
    document.addEventListener('click', handleGetPopupClickTitle);
    return () => {
      document.removeEventListener('click', handleGetPopupClickTitle);
    };
  });
  const getChoices = () => {
    switch ('separators') {
      case 'separators':
        return {
          separator1: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Separator 1', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.SVG.separator1
          },
          separator2: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Separator 2', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.SVG.separator2
          },
          separator3: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Separator 3', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.SVG.separator3
          },
          separator4: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Separator 4', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.SVG.separator4
          }
        };
    }
  };
  const options = getChoices();
  if (custom) {
    options.custom = {
      tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Custom SVG', 'solace'),
      icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__["default"]
    };
  }
  const renderSeparator = () => {
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-white-background-control solace-card-options-radio-popup-control"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: "customize-control-title"
    }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Style', 'solace')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.RadioIcons
    // largeButtons={large_buttons}
    // showLabels={showLabels}
    , {
      value: value.separator,
      customSetting: custom,
      options: options,
      onChange: val => {
        let separator = value.separator;
        separator = val;
        wp.customize.previewer.refresh();
        onChange({
          separator
        });
      }
    }));
  };
  const renderBottomSpacing = () => {
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-white-background-control solace-range-control"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-control-header"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: "customize-control-title"
    }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Bottom Spacing', 'solace')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.ResponsiveControl, {
      hideResponsive: true
    })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "range-wrap"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.RangeControl, {
      value: value.bottomSpacing[currentDevice],
      min: 1,
      max: 250,
      step: 1,
      onChange: val => {
        const nextVal = value.bottomSpacing;
        nextVal[currentDevice] = val;
        onChange({
          value: nextVal
        });
      }
    })));
  };
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, visible && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Popover, {
    className: "popover-card-options-categories solace-remove-style-popover-transform",
    onFocusOutside: () => {
      setVisible(false);
    },
    ref: popoverRef,
    style: {
      position: 'absolute',
      top: popoverCoords.top,
      left: popoverCoords.left
    }
  }, label && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "customize-control-title"
  }, label), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-typeface-title-control solace-white-background-control",
    style: {
      position: 'absolute',
      left: popoverCoords.left - 10,
      top: popoverCoords.y - 15,
      backgroundColor: 'var(--sol-customizer-panel-bg-color)',
      color: '#fff',
      border: '1px solid var(--sol-customizer-line-color)',
      borderRadius: '10px'
    }
  }, renderSeparator(), renderBottomSpacing())));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CardOptionsCategories);
const responsiveShape = {
  mobile: prop_types__WEBPACK_IMPORTED_MODULE_5___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_5___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_5___default().number)]),
  tablet: prop_types__WEBPACK_IMPORTED_MODULE_5___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_5___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_5___default().number)]),
  desktop: prop_types__WEBPACK_IMPORTED_MODULE_5___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_5___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_5___default().number)])
};
CardOptionsCategories.propTypes = {
  label: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().string),
  value: prop_types__WEBPACK_IMPORTED_MODULE_5___default().shape({
    separator: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().string),
    bottomSpacing: prop_types__WEBPACK_IMPORTED_MODULE_5___default().shape({
      suffix: prop_types__WEBPACK_IMPORTED_MODULE_5___default().shape(responsiveShape),
      ...responsiveShape
    })
  }),
  refreshAfterReset: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().bool),
  onChange: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().func).isRequired
};

/***/ }),

/***/ "./assets/apps/customizer-controls/src/card-options-categories/CardOptionsCategoriesComponent.js":
/*!*******************************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/card-options-categories/CardOptionsCategoriesComponent.js ***!
  \*******************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _CardOptionsCategories_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CardOptionsCategories.js */ "./assets/apps/customizer-controls/src/card-options-categories/CardOptionsCategories.js");




const CardOptionsCategoriesComponent = ({
  control
}) => {
  let setVal = control.setting.get();
  const controlParams = control.params.input_attrs;
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({
    separator: setVal.separator,
    bottomSpacing: setVal.bottomSpacing,
    flag: false
  });
  const updateValues = nextValue => {
    setValue({
      ...value,
      ...nextValue
    });
    control.setting.set({
      ...control.setting.get(),
      ...nextValue,
      flag: !control.setting.get().flag
    });
  };
  const {
    label,
    refresh_on_reset
  } = control.params;
  const {
    bottom_spacing_override_value
  } = controlParams;
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_CardOptionsCategories_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
    label: label,
    value: value,
    control: control,
    bottom_spacing_override_value: bottom_spacing_override_value,
    onChange: updateValues,
    refreshAfterReset: refresh_on_reset
  });
};
CardOptionsCategoriesComponent.propTypes = {
  control: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CardOptionsCategoriesComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/card-options-categories/Control.js":
/*!********************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/card-options-categories/Control.js ***!
  \********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   CardOptionsCategoriesControl: () => (/* binding */ CardOptionsCategoriesControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _CardOptionsCategoriesComponent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CardOptionsCategoriesComponent.js */ "./assets/apps/customizer-controls/src/card-options-categories/CardOptionsCategoriesComponent.js");

/* jshint esversion: 6 */


const CardOptionsCategoriesControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_CardOptionsCategoriesComponent_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/card-options-excerpt/CardOptionsExcerpt.js":
/*!****************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/card-options-excerpt/CardOptionsExcerpt.js ***!
  \****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);

/* global SolaceReactCustomize */





const CardOptionsCart = ({
  label,
  value,
  onChange
}) => {
  const [currentDevice, setCurrentDevice] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)('desktop');
  const [visible, setVisible] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
  const [popoverCoords, setPopoverCoords] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({
    top: 0,
    left: 0
  });
  const popoverRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    const handleGetPopupClickTitle = e => {
      const controlID = 'solace_product_page_ordering_card_options__excerpt';
      const baseIds = ['svg', 'g', 'path1', 'path2'];
      const ids = [controlID, ...baseIds.map(prefix => `${prefix}-${controlID}`)];
      if (ids.includes(e.target.id)) {
        const rect = e.target.getBoundingClientRect();
        setPopoverCoords({
          top: rect.bottom - 25,
          left: rect.left + 50,
          y: rect.y
        });
        setVisible(true);
      }
    };
    document.addEventListener('click', handleGetPopupClickTitle);
    return () => {
      document.removeEventListener('click', handleGetPopupClickTitle);
    };
  });
  const renderLength = () => {
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-white-background-control solace-range-control"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-control-header"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: "customize-control-title"
    }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Length', 'solace')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.ResponsiveControl, {
      hideResponsive: true
    })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "range-wrap"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.RangeControl, {
      value: value.length[currentDevice],
      min: 1,
      max: 250,
      step: 1,
      onChange: val => {
        wp.customize.previewer.refresh();
        const nextVal = value.length;
        nextVal[currentDevice] = val;
        onChange({
          value: nextVal
        });
      }
    })));
  };
  const renderBottomSpacing = () => {
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-white-background-control solace-range-control"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-control-header"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: "customize-control-title"
    }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Bottom Spacing', 'solace')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.ResponsiveControl, {
      hideResponsive: true
    })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "range-wrap"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.RangeControl, {
      value: value.bottomSpacing[currentDevice],
      min: 1,
      max: 250,
      step: 1,
      onChange: val => {
        const nextVal = value.bottomSpacing;
        nextVal[currentDevice] = val;
        onChange({
          value: nextVal
        });
      }
    })));
  };
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, visible && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Popover, {
    className: "popover-card-options-excerpt solace-remove-style-popover-transform",
    onFocusOutside: () => {
      setVisible(false);
    },
    ref: popoverRef,
    style: {
      position: 'absolute',
      top: popoverCoords.top,
      left: popoverCoords.left
    }
  }, label && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "customize-control-title"
  }, label), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-typeface-title-control solace-white-background-control",
    style: {
      position: 'absolute',
      left: popoverCoords.left - 10,
      top: popoverCoords.y - 15,
      backgroundColor: 'var(--sol-customizer-panel-bg-color)',
      color: '#fff',
      border: '1px solid var(--sol-customizer-line-color)',
      borderRadius: '10px'
    }
  }, renderLength(), renderBottomSpacing())));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CardOptionsCart);
const responsiveShape = {
  mobile: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number)]),
  tablet: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number)]),
  desktop: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number)])
};
CardOptionsCart.propTypes = {
  label: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().string),
  value: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape({
    length: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape({
      suffix: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape(responsiveShape),
      ...responsiveShape
    }),
    bottomSpacing: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape({
      suffix: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape(responsiveShape),
      ...responsiveShape
    })
  }),
  refreshAfterReset: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().bool),
  onChange: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func).isRequired
};

/***/ }),

/***/ "./assets/apps/customizer-controls/src/card-options-excerpt/CardOptionsExcerptComponent.js":
/*!*************************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/card-options-excerpt/CardOptionsExcerptComponent.js ***!
  \*************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _CardOptionsExcerpt_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CardOptionsExcerpt.js */ "./assets/apps/customizer-controls/src/card-options-excerpt/CardOptionsExcerpt.js");




const CardOptionsExcerptComponent = ({
  control
}) => {
  let setVal = control.setting.get();
  const controlParams = control.params.input_attrs;
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({
    length: setVal.length,
    bottomSpacing: setVal.bottomSpacing,
    flag: false
  });
  const updateValues = nextValue => {
    setValue({
      ...value,
      ...nextValue
    });
    control.setting.set({
      ...control.setting.get(),
      ...nextValue,
      flag: !control.setting.get().flag
    });
  };
  const {
    label,
    refresh_on_reset
  } = control.params;
  const {
    bottom_spacing_override_value
  } = controlParams;
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_CardOptionsExcerpt_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
    label: label,
    value: value,
    bottom_spacing_override_value: bottom_spacing_override_value,
    onChange: updateValues,
    refreshAfterReset: refresh_on_reset
  });
};
CardOptionsExcerptComponent.propTypes = {
  control: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CardOptionsExcerptComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/card-options-excerpt/Control.js":
/*!*****************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/card-options-excerpt/Control.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   CardOptionsExcerptControl: () => (/* binding */ CardOptionsExcerptControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _CardOptionsExcerptComponent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CardOptionsExcerptComponent.js */ "./assets/apps/customizer-controls/src/card-options-excerpt/CardOptionsExcerptComponent.js");

/* jshint esversion: 6 */


const CardOptionsExcerptControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_CardOptionsExcerptComponent_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/card-options-price/CardOptionsPrice.js":
/*!************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/card-options-price/CardOptionsPrice.js ***!
  \************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);

/* global SolaceReactCustomize */





const CardOptionsPrice = ({
  label,
  value,
  onChange
}) => {
  const [currentDevice, setCurrentDevice] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)('desktop');
  const [visible, setVisible] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
  const [popoverCoords, setPopoverCoords] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({
    top: 0,
    left: 0
  });
  const popoverRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    const handleGetPopupClickTitle = e => {
      const controlID = 'solace_product_page_ordering_card_options__price';
      const baseIds = ['svg', 'g', 'path1', 'path2'];
      const ids = [controlID, ...baseIds.map(prefix => `${prefix}-${controlID}`)];
      if (ids.includes(e.target.id)) {
        const rect = e.target.getBoundingClientRect();
        setPopoverCoords({
          top: rect.bottom - 25,
          left: rect.left + 50,
          y: rect.y
        });
        setVisible(true);
      }
    };
    document.addEventListener('click', handleGetPopupClickTitle);
    return () => {
      document.removeEventListener('click', handleGetPopupClickTitle);
    };
  });
  const renderBottomSpacing = () => {
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-white-background-control solace-range-control"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-control-header"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: "customize-control-title"
    }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Bottom Spacing', 'solace')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.ResponsiveControl, {
      hideResponsive: true
    })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "range-wrap"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.RangeControl, {
      value: value.bottomSpacing[currentDevice],
      min: 1,
      max: 250,
      step: 1,
      onChange: val => {
        const nextVal = value.bottomSpacing;
        nextVal[currentDevice] = val;
        onChange({
          value: nextVal
        });
      }
    })));
  };
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, visible && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Popover, {
    className: "popover-card-options-price solace-remove-style-popover-transform",
    onFocusOutside: () => {
      setVisible(false);
    },
    ref: popoverRef,
    style: {
      position: 'absolute',
      top: popoverCoords.top,
      left: popoverCoords.left
    }
  }, label && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "customize-control-title"
  }, label), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-typeface-title-control solace-white-background-control",
    style: {
      position: 'absolute',
      left: popoverCoords.left - 10,
      top: popoverCoords.y - 15,
      backgroundColor: 'var(--sol-customizer-panel-bg-color)',
      color: '#fff',
      border: '1px solid var(--sol-customizer-line-color)',
      borderRadius: '10px'
    }
  }, renderBottomSpacing())));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CardOptionsPrice);
const responsiveShape = {
  mobile: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number)]),
  tablet: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number)]),
  desktop: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number)])
};
CardOptionsPrice.propTypes = {
  label: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().string),
  value: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape({
    bottomSpacing: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape({
      suffix: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape(responsiveShape),
      ...responsiveShape
    })
  }),
  refreshAfterReset: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().bool),
  onChange: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func).isRequired
};

/***/ }),

/***/ "./assets/apps/customizer-controls/src/card-options-price/CardOptionsPriceComponent.js":
/*!*********************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/card-options-price/CardOptionsPriceComponent.js ***!
  \*********************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _CardOptionsPrice_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CardOptionsPrice.js */ "./assets/apps/customizer-controls/src/card-options-price/CardOptionsPrice.js");




const CardOptionsPriceComponent = ({
  control
}) => {
  let setVal = control.setting.get();
  const controlParams = control.params.input_attrs;
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({
    bottomSpacing: setVal.bottomSpacing,
    flag: false
  });
  const updateValues = nextValue => {
    setValue({
      ...value,
      ...nextValue
    });
    control.setting.set({
      ...control.setting.get(),
      ...nextValue,
      flag: !control.setting.get().flag
    });
  };
  const {
    label,
    refresh_on_reset
  } = control.params;
  const {
    bottom_spacing_override_value
  } = controlParams;
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_CardOptionsPrice_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
    label: label,
    value: value,
    bottom_spacing_override_value: bottom_spacing_override_value,
    onChange: updateValues,
    refreshAfterReset: refresh_on_reset
  });
};
CardOptionsPriceComponent.propTypes = {
  control: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CardOptionsPriceComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/card-options-price/Control.js":
/*!***************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/card-options-price/Control.js ***!
  \***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   CardOptionsPriceControl: () => (/* binding */ CardOptionsPriceControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _CardOptionsPriceComponent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CardOptionsPriceComponent.js */ "./assets/apps/customizer-controls/src/card-options-price/CardOptionsPriceComponent.js");

/* jshint esversion: 6 */


const CardOptionsPriceControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_CardOptionsPriceComponent_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/card-options-product-image/CardOptionsProductImageComponent.js":
/*!************************************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/card-options-product-image/CardOptionsProductImageComponent.js ***!
  \************************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _CardOptionsProductImageControl_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CardOptionsProductImageControl.js */ "./assets/apps/customizer-controls/src/card-options-product-image/CardOptionsProductImageControl.js");




const CardOptionsProductImageComponent = ({
  control
}) => {
  let setVal = control.setting.get();
  const controlParams = control.params.input_attrs;
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({
    imageRatio: setVal.imageRatio,
    imageSizeOriginal: setVal.imageSizeOriginal,
    imageSizePredefined: setVal.imageSizePredefined,
    imageSizeCustom: setVal.imageSizeCustom,
    bottomSpacing: setVal.bottomSpacing,
    flag: false
  });
  const updateValues = nextValue => {
    setValue({
      ...value,
      ...nextValue
    });
    control.setting.set({
      ...control.setting.get(),
      ...nextValue,
      flag: !control.setting.get().flag
    });
  };
  const {
    label,
    refresh_on_reset
  } = control.params;
  const {
    bottom_spacing_override_value
  } = controlParams;
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_CardOptionsProductImageControl_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
    label: label,
    value: value,
    control: control,
    bottom_spacing_override_value: bottom_spacing_override_value,
    onChange: updateValues,
    refreshAfterReset: refresh_on_reset
  });
};
CardOptionsProductImageComponent.propTypes = {
  control: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CardOptionsProductImageComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/card-options-product-image/CardOptionsProductImageControl.js":
/*!**********************************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/card-options-product-image/CardOptionsProductImageControl.js ***!
  \**********************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);

/* global SolaceReactCustomize */





const CardOptionsProductImageControl = ({
  label,
  value,
  onChange,
  control
}) => {
  const [currentDevice, setCurrentDevice] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)('desktop');
  const [visible, setVisible] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
  const [popoverCoords, setPopoverCoords] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({
    top: 0,
    left: 0
  });
  const popoverRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
  const {
    custom
  } = control.settings;
  const updateValue = newVal => {
    const getVal = control.setting.get();
    getVal.separator = newVal;
    wp.customize.previewer.refresh();
    control.setting.set(getVal);
  };

  // const handleCustomizerValueChange = (e) => {
  // 	if (!e.detail || e.detail.id !== control.id) return;
  // 	updateValue(e.detail.value);
  // };

  // useEffect(() => {
  // 	document.addEventListener('solace-changed-customizer-value', handleCustomizerValueChange);

  // 	return () => {
  // 		document.removeEventListener('solace-changed-customizer-value', handleCustomizerValueChange);
  // 	};
  // }, [control.id]);	

  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    const handleGetPopupClickTitle = e => {
      const controlID = 'solace_product_page_ordering_card_options__product_image';
      const baseIds = ['svg', 'g', 'path1', 'path2'];
      const ids = [controlID, ...baseIds.map(prefix => `${prefix}-${controlID}`)];
      if (ids.includes(e.target.id)) {
        const rect = e.target.getBoundingClientRect();
        setPopoverCoords({
          top: rect.bottom - 25,
          left: rect.left + 50,
          y: rect.y
        });
        setVisible(true);
      }
    };
    document.addEventListener('click', handleGetPopupClickTitle);
    return () => {
      document.removeEventListener('click', handleGetPopupClickTitle);
    };
  });
  const getChoices = () => {
    switch ('imageRatio') {
      case 'imageRatio':
        return {
          imageRatio1: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Image Ratio 1', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.SVG.imageRatio1
          },
          imageRatio2: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Image Ratio 2', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.SVG.imageRatio2
          },
          imageRatio3: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Image Ratio 3', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.SVG.imageRatio3
          }
        };
    }
  };
  const options = getChoices();
  const renderImageRatio = () => {
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-white-background-control solace-card-options-radio-product-image-control"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: "customize-control-title"
    }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Image Ratio', 'solace')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.RadioIcons, {
      value: value.imageRatio,
      customSetting: custom,
      options: options,
      onChange: val => {
        let imageRatio = value.imageRatio;
        imageRatio = val;
        wp.customize.previewer.refresh();

        // Fix single post popup card options product image.
        jQuery('.popover-card-options-product-image').trigger('focus');
        onChange({
          imageRatio
        });
      }
    }));
  };
  const imageOriginal = () => {
    // const sample = [
    // 	{ value: 'Full', label: 'Full' },
    // 	{ value: 'Large', label: 'Large' },
    // 	{ value: 'Medium_large', label: 'Medium_large' },
    // 	{ value: 'Medium', label: 'Medium' },
    // 	{ value: 'Thumbnail', label: 'Thumbnail' },
    // ];

    const defaultOptions = control.params.list_images;
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-white-background-control solace-card-options-radio-product-image-image-size-control"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: "customize-control-title"
    }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Image Size', 'solace')), value.imageRatio === 'imageRatio1' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.__experimentalInputControl, {
      value: value.imageSizeOriginal,
      disabled: true,
      className: "original"
      // onChange={(nextValue) => {
      // 	wp.customize.previewer.refresh();
      // 	onChange({ imageSizeOriginal: nextValue });
      // }}
    }), value.imageRatio === 'imageRatio2' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.InlineSelect, {
      value: value.imageSizePredefined,
      options: defaultOptions,
      onChange: nextValue => {
        wp.customize.previewer.refresh();
        onChange({
          imageSizePredefined: nextValue
        });
      }
    }), value.imageRatio === 'imageRatio3' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.__experimentalInputControl, {
      value: value.imageSizeCustom,
      onChange: nextValue => {
        wp.customize.previewer.refresh();
        const numericValue = nextValue === '' ? '' : nextValue.replace(/[^0-9]/g, '');
        onChange({
          imageSizeCustom: numericValue
        });
      }
    }));
  };
  const renderBottomSpacing = () => {
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-white-background-control solace-range-control"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-control-header"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: "customize-control-title"
    }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Bottom Spacing', 'solace')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.ResponsiveControl, {
      hideResponsive: true
    })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "range-wrap"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.RangeControl, {
      value: value.bottomSpacing[currentDevice],
      min: 1,
      max: 250,
      step: 1,
      onChange: val => {
        const nextVal = value.bottomSpacing;
        nextVal[currentDevice] = val;
        onChange({
          value: nextVal
        });
      }
    })));
  };
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, visible && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Popover, {
    className: "popover-card-options-product-image solace-remove-style-popover-transform",
    onFocusOutside: () => {
      setVisible(false);
    },
    ref: popoverRef,
    style: {
      position: 'absolute',
      top: popoverCoords.top,
      left: popoverCoords.left
    }
  }, label && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "customize-control-title"
  }, label), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-typeface-title-control solace-white-background-control",
    style: {
      position: 'absolute',
      left: popoverCoords.left - 10,
      top: popoverCoords.y - 15,
      backgroundColor: 'var(--sol-customizer-panel-bg-color)',
      color: '#fff',
      border: '1px solid var(--sol-customizer-line-color)',
      borderRadius: '10px'
    }
  }, renderImageRatio(), imageOriginal(), renderBottomSpacing())));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CardOptionsProductImageControl);
const responsiveShape = {
  mobile: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number)]),
  tablet: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number)]),
  desktop: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number)])
};
CardOptionsProductImageControl.propTypes = {
  label: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().string),
  value: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape({
    imageRatio: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().string),
    bottomSpacing: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape({
      suffix: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape(responsiveShape),
      ...responsiveShape
    })
  }),
  refreshAfterReset: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().bool),
  onChange: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func).isRequired
};

/***/ }),

/***/ "./assets/apps/customizer-controls/src/card-options-product-image/Control.js":
/*!***********************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/card-options-product-image/Control.js ***!
  \***********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   CardOptionsProductImageControl: () => (/* binding */ CardOptionsProductImageControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _CardOptionsProductImageComponent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CardOptionsProductImageComponent.js */ "./assets/apps/customizer-controls/src/card-options-product-image/CardOptionsProductImageComponent.js");

/* jshint esversion: 6 */


const CardOptionsProductImageControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_CardOptionsProductImageComponent_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/card-options-star-rating/CardOptionsStarRating.js":
/*!***********************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/card-options-star-rating/CardOptionsStarRating.js ***!
  \***********************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);

/* global SolaceReactCustomize */





const CardOptionsStarRating = ({
  label,
  value,
  onChange
}) => {
  const [currentDevice, setCurrentDevice] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)('desktop');
  const [visible, setVisible] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
  const [popoverCoords, setPopoverCoords] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({
    top: 0,
    left: 0
  });
  const popoverRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    const handleGetPopupClickTitle = e => {
      const controlID = 'solace_product_page_ordering_card_options__star_rating';
      const baseIds = ['svg', 'g', 'path1', 'path2'];
      const ids = [controlID, ...baseIds.map(prefix => `${prefix}-${controlID}`)];
      if (ids.includes(e.target.id)) {
        const rect = e.target.getBoundingClientRect();
        setPopoverCoords({
          top: rect.bottom - 25,
          left: rect.left + 50,
          y: rect.y
        });
        setVisible(true);
      }
    };
    document.addEventListener('click', handleGetPopupClickTitle);
    return () => {
      document.removeEventListener('click', handleGetPopupClickTitle);
    };
  });
  const renderBottomSpacing = () => {
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-white-background-control solace-range-control"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-control-header"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: "customize-control-title"
    }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Bottom Spacing', 'solace')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.ResponsiveControl, {
      hideResponsive: true
    })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "range-wrap"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.RangeControl, {
      value: value.bottomSpacing[currentDevice],
      min: 1,
      max: 250,
      step: 1,
      onChange: val => {
        const nextVal = value.bottomSpacing;
        nextVal[currentDevice] = val;
        onChange({
          value: nextVal
        });
      }
    })));
  };
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, visible && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Popover, {
    className: "popover-card-options-star-rating solace-remove-style-popover-transform",
    onFocusOutside: () => {
      setVisible(false);
    },
    ref: popoverRef,
    style: {
      position: 'absolute',
      top: popoverCoords.top,
      left: popoverCoords.left
    }
  }, label && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "customize-control-title"
  }, label), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-typeface-title-control solace-white-background-control",
    style: {
      position: 'absolute',
      left: popoverCoords.left - 10,
      top: popoverCoords.y - 15,
      backgroundColor: 'var(--sol-customizer-panel-bg-color)',
      color: '#fff',
      border: '1px solid var(--sol-customizer-line-color)',
      borderRadius: '10px'
    }
  }, renderBottomSpacing())));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CardOptionsStarRating);
const responsiveShape = {
  mobile: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number)]),
  tablet: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number)]),
  desktop: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number)])
};
CardOptionsStarRating.propTypes = {
  label: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().string),
  value: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape({
    bottomSpacing: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape({
      suffix: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape(responsiveShape),
      ...responsiveShape
    })
  }),
  refreshAfterReset: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().bool),
  onChange: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func).isRequired
};

/***/ }),

/***/ "./assets/apps/customizer-controls/src/card-options-star-rating/CardOptionsStarRatingComponent.js":
/*!********************************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/card-options-star-rating/CardOptionsStarRatingComponent.js ***!
  \********************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _CardOptionsStarRating_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CardOptionsStarRating.js */ "./assets/apps/customizer-controls/src/card-options-star-rating/CardOptionsStarRating.js");




const CardOptionsStarRatingComponent = ({
  control
}) => {
  let setVal = control.setting.get();
  const controlParams = control.params.input_attrs;
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({
    bottomSpacing: setVal.bottomSpacing,
    flag: false
  });
  const updateValues = nextValue => {
    setValue({
      ...value,
      ...nextValue
    });
    control.setting.set({
      ...control.setting.get(),
      ...nextValue,
      flag: !control.setting.get().flag
    });
  };
  const {
    label,
    refresh_on_reset
  } = control.params;
  const {
    bottom_spacing_override_value
  } = controlParams;
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_CardOptionsStarRating_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
    label: label,
    value: value,
    bottom_spacing_override_value: bottom_spacing_override_value,
    onChange: updateValues,
    refreshAfterReset: refresh_on_reset
  });
};
CardOptionsStarRatingComponent.propTypes = {
  control: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CardOptionsStarRatingComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/card-options-star-rating/Control.js":
/*!*********************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/card-options-star-rating/Control.js ***!
  \*********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   CardOptionsStarRatingControl: () => (/* binding */ CardOptionsStarRatingControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _CardOptionsStarRatingComponent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CardOptionsStarRatingComponent.js */ "./assets/apps/customizer-controls/src/card-options-star-rating/CardOptionsStarRatingComponent.js");

/* jshint esversion: 6 */


const CardOptionsStarRatingControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_CardOptionsStarRatingComponent_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/card-options-title/CardOptionsTitle.js":
/*!************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/card-options-title/CardOptionsTitle.js ***!
  \************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);

/* global SolaceReactCustomize */





const CardOptionsTitle = ({
  label,
  value,
  onChange
}) => {
  const [currentDevice, setCurrentDevice] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)('desktop');
  const [visible, setVisible] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
  const [popoverCoords, setPopoverCoords] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({
    top: 0,
    left: 0
  });
  const popoverRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    const handleGetPopupClickTitle = e => {
      const controlID = 'solace_product_page_ordering_card_options__title';
      const baseIds = ['svg', 'g', 'path1', 'path2'];
      const ids = [controlID, ...baseIds.map(prefix => `${prefix}-${controlID}`)];
      if (ids.includes(e.target.id)) {
        const rect = e.target.getBoundingClientRect();
        setPopoverCoords({
          top: rect.bottom - 25,
          left: rect.left + 50,
          y: rect.y
        });
        setVisible(true);
      }
    };
    document.addEventListener('click', handleGetPopupClickTitle);
    return () => {
      document.removeEventListener('click', handleGetPopupClickTitle);
    };
  });
  const renderHeadingTag = () => {
    let {
      headingTag
    } = value;
    if (!headingTag) {
      headingTag = 'H1';
    }
    const defaultOptions = [{
      value: 'H1',
      label: 'H1'
    }, {
      value: 'H2',
      label: 'H2'
    }, {
      value: 'H3',
      label: 'H3'
    }, {
      value: 'H4',
      label: 'H4'
    }, {
      value: 'H5',
      label: 'H5'
    }, {
      value: 'H6',
      label: 'H6'
    }];
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.InlineSelect, {
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Heading Tag', 'solace'),
      value: headingTag,
      options: defaultOptions,
      onChange: nextValue => {
        onChange({
          headingTag: nextValue
        });
        wp.customize.previewer.refresh();
        if (nextValue === 'H1' && refreshAfterReset) {
          wp.customize.previewer.refresh();
        }
      }
    });
  };
  const renderBottomSpacing = () => {
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-white-background-control solace-range-control"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-control-header"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: "customize-control-title"
    }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Bottom Spacing', 'solace')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.ResponsiveControl, {
      hideResponsive: true
    })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "range-wrap"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.RangeControl, {
      value: value.bottomSpacing[currentDevice],
      min: 1,
      max: 250,
      step: 1,
      onChange: val => {
        const nextVal = value.bottomSpacing;
        nextVal[currentDevice] = val;
        onChange({
          value: nextVal
        });
      }
    })));
  };
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, visible && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Popover, {
    className: "popover-card-options-title solace-remove-style-popover-transform",
    onFocusOutside: () => {
      setVisible(false);
    },
    ref: popoverRef,
    style: {
      position: 'absolute',
      top: popoverCoords.top,
      left: popoverCoords.left
    }
  }, label && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "customize-control-title"
  }, label), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-typeface-title-control solace-white-background-control",
    style: {
      position: 'absolute',
      left: popoverCoords.left - 10,
      top: popoverCoords.y - 15,
      backgroundColor: 'var(--sol-customizer-panel-bg-color)',
      color: '#fff',
      border: '1px solid var(--sol-customizer-line-color)',
      borderRadius: '10px'
    }
  }, renderHeadingTag(), renderBottomSpacing())));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CardOptionsTitle);
const responsiveShape = {
  mobile: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number)]),
  tablet: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number)]),
  desktop: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number)])
};
CardOptionsTitle.propTypes = {
  label: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().string),
  value: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape({
    headingTag: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number)]),
    bottomSpacing: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape({
      suffix: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape(responsiveShape),
      ...responsiveShape
    })
  }),
  refreshAfterReset: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().bool),
  onChange: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func).isRequired
};

/***/ }),

/***/ "./assets/apps/customizer-controls/src/card-options-title/CardOptionsTitleComponent.js":
/*!*********************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/card-options-title/CardOptionsTitleComponent.js ***!
  \*********************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _CardOptionsTitle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CardOptionsTitle.js */ "./assets/apps/customizer-controls/src/card-options-title/CardOptionsTitle.js");




const CardOptionsTitleComponent = ({
  control
}) => {
  let setVal = control.setting.get();
  const controlParams = control.params.input_attrs;
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({
    headingTag: setVal.headingTag,
    bottomSpacing: setVal.bottomSpacing,
    flag: false
  });
  const updateValues = nextValue => {
    setValue({
      ...value,
      ...nextValue
    });
    control.setting.set({
      ...control.setting.get(),
      ...nextValue,
      flag: !control.setting.get().flag
    });
  };
  const {
    label,
    refresh_on_reset
  } = control.params;
  const {
    bottom_spacing_override_value
  } = controlParams;
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_CardOptionsTitle_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
    label: label,
    value: value,
    bottom_spacing_override_value: bottom_spacing_override_value,
    onChange: updateValues,
    refreshAfterReset: refresh_on_reset
  });
};
CardOptionsTitleComponent.propTypes = {
  control: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CardOptionsTitleComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/card-options-title/Control.js":
/*!***************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/card-options-title/Control.js ***!
  \***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   CardOptionsTitleControl: () => (/* binding */ CardOptionsTitleControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _CardOptionsTitleComponent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CardOptionsTitleComponent.js */ "./assets/apps/customizer-controls/src/card-options-title/CardOptionsTitleComponent.js");

/* jshint esversion: 6 */


const CardOptionsTitleControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_CardOptionsTitleComponent_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/color/ColorComponent.js":
/*!*********************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/color/ColorComponent.js ***!
  \*********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__);

/* jshint esversion: 6 */



const ColorComponent = ({
  control,
  children
}) => {
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(control.setting.get());
  const updateValues = newVal => {
    setValue(newVal);
    control.setting.set(newVal);
  };
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    document.addEventListener('solace-changed-customizer-value', e => {
      if (!e.detail) return false;
      if (e.detail.id !== control.id) return false;
      updateValues(e.detail.value);
    });
  }, []);
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-white-background-control solace-color-control"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.ColorControl, {
    label: control.params.label,
    idControl: control.params.settings.default,
    selectedColor: value,
    defaultValue: control.params.default,
    alphaDisabled: control.params.disableAlpha,
    onChange: updateValues,
    allowGradient: control.params.allowGradient
  }, children));
};
ColorComponent.propTypes = {
  control: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ColorComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/color/Control.js":
/*!**************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/color/Control.js ***!
  \**************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ColorControl: () => (/* binding */ ColorControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _ColorComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ColorComponent */ "./assets/apps/customizer-controls/src/color/ColorComponent.js");

/* jshint esversion: 6 */



const ColorControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_ColorComponent__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/column-and-row/Column.js":
/*!**********************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/column-and-row/Column.js ***!
  \**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives");
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_3__);






const Column = ({
  onChange,
  minColumn,
  valueColumn,
  maxColumn,
  stepColumn,
  control
}) => {
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    document.addEventListener('solace-changed-customizer-value', e => {
      alert('e ' + e);
      if (!e.detail) return false;
      if (e.detail.id !== control.id) return false;
      updateValues(e.detail.value);
    });
  }, []);
  const [internalValue, setInternalValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valueColumn);
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    setInternalValue(Number(valueColumn));
  }, [valueColumn]);
  const handleIncrement = () => {
    const newValue = Number(internalValue) + stepColumn;
    if (newValue <= maxColumn) {
      const oldVal = control.setting.get();
      const newUpdatedVal = {
        ...oldVal,
        valueColumn: newValue
      };
      try {
        setInternalValue(newValue);
        control.setting.set(newUpdatedVal);
      } catch (error) {
        console.error('Error handleIncrement setting value: ', error);
      }
    }
  };
  const handleDecrement = () => {
    const newValue = Number(internalValue) - stepColumn;
    if (newValue >= minColumn) {
      const oldVal = control.setting.get();
      const newUpdatedVal = {
        ...oldVal,
        valueColumn: newValue
      };
      try {
        setInternalValue(newValue);
        control.setting.set(newUpdatedVal);
      } catch (error) {
        console.error('Error handleDecrement setting value: ', error);
      }
    }
  };
  const updateValues = newVal => {
    const val = Number(newVal);
    const maxVal = Math.min(Math.max(val, minColumn), maxColumn);
    const oldVal = control.setting.get();
    const newUpdatedVal = {
      ...oldVal,
      valueColumn: maxVal
    };
    try {
      setInternalValue(maxVal);
      control.setting.set(newUpdatedVal);
    } catch (error) {
      console.error('Error updateValues setting value: ', error);
    }
  };
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-white-background-control solace-column-control"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-control-header"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "customize-control-title"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Columns', 'solace'))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "column-wrap"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "column"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
    className: "Decrement",
    onClick: handleDecrement
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_3__.SVG, {
    xmlns: "http://www.w3.org/2000/svg",
    width: "7",
    height: "2",
    viewBox: "0 0 7 2",
    fill: "none"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_3__.Path, {
    d: "M0.812 1.408V0.33H6.398V1.408H0.812Z",
    fill: "#001944"
  }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalNumberControl, {
    onChange: updateValues,
    value: internalValue
  }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
    className: "Increment",
    onClick: handleIncrement
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_3__.SVG, {
    xmlns: "http://www.w3.org/2000/svg",
    width: "8",
    height: "8",
    viewBox: "0 0 8 8",
    fill: "none"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_3__.Path, {
    d: "M3.186 0.305999H4.376V3.344H7.358V4.422H4.376V7.446H3.186V4.422H0.218V3.344H3.186V0.305999Z",
    fill: "#001944"
  }))))));
};
Column.propTypes = {
  onChange: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func).isRequired,
  minColumn: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number),
  valueColumn: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number),
  maxColumn: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number),
  stepColumn: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number),
  control: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Column);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/column-and-row/Control.js":
/*!***********************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/column-and-row/Control.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ColumnAndRowControl: () => (/* binding */ ColumnAndRowControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _MergeComponents_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./MergeComponents.js */ "./assets/apps/customizer-controls/src/column-and-row/MergeComponents.js");

/* jshint esversion: 6 */



const ColumnAndRowControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_MergeComponents_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/column-and-row/MergeComponents.js":
/*!*******************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/column-and-row/MergeComponents.js ***!
  \*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _Column__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Column */ "./assets/apps/customizer-controls/src/column-and-row/Column.js");
/* harmony import */ var _Row__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Row */ "./assets/apps/customizer-controls/src/column-and-row/Row.js");





const MergeComponents = ({
  control
}) => {
  const [value] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(control.setting.get());
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-box"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Column__WEBPACK_IMPORTED_MODULE_1__["default"], {
    minColumn: value.minColumn,
    valueColumn: value.valueColumn,
    maxColumn: value.maxColumn,
    stepColumn: value.stepColumn,
    control: control
  }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Row__WEBPACK_IMPORTED_MODULE_2__["default"], {
    minRow: value.minRow,
    valueRow: value.valueRow,
    maxRow: value.maxRow || 10,
    stepRow: value.stepRow,
    control: control
  })));
};
MergeComponents.propTypes = {
  control: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (MergeComponents);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/column-and-row/Row.js":
/*!*******************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/column-and-row/Row.js ***!
  \*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives");
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_3__);






const Row = ({
  onChange,
  minRow,
  valueRow,
  maxRow,
  stepRow,
  control
}) => {
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    document.addEventListener('solace-changed-customizer-value', e => {
      alert('e ' + e);
      if (!e.detail) return false;
      if (e.detail.id !== control.id) return false;
      updateValues(e.detail.value);
    });
  }, []);
  const [internalValue, setInternalValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valueRow);
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    setInternalValue(Number(valueRow));
  }, [valueRow]);
  const handleIncrement = () => {
    const newValue = Number(internalValue) + stepRow;
    if (newValue <= maxRow) {
      const oldVal = control.setting.get();
      const newUpdatedVal = {
        ...oldVal,
        valueRow: newValue
      };
      try {
        setInternalValue(newValue);
        control.setting.set(newUpdatedVal);
      } catch (error) {
        console.error('Error handleIncrement setting value: ', error);
      }
    }
  };
  const handleDecrement = () => {
    const newValue = Number(internalValue) - stepRow;
    if (newValue >= minRow) {
      const oldVal = control.setting.get();
      const newUpdatedVal = {
        ...oldVal,
        valueRow: newValue
      };
      try {
        setInternalValue(newValue);
        control.setting.set(newUpdatedVal);
      } catch (error) {
        console.error('Error handleDecrement setting value: ', error);
      }
    }
  };
  const updateValues = newVal => {
    const oldVal = control.setting.get();
    const val = Number(newVal);
    const newUpdatedVal = {
      ...oldVal,
      valueRow: val
    };
    try {
      setInternalValue(val);
      control.setting.set(newUpdatedVal);
    } catch (error) {
      console.error('Error updateValues setting value: ', error);
    }
  };
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-white-background-control solace-row-control"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-control-header"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "customize-control-title"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Rows', 'solace'))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "row-wrap"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "row"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
    className: "Decrement",
    onClick: handleDecrement
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_3__.SVG, {
    xmlns: "http://www.w3.org/2000/svg",
    width: "7",
    height: "2",
    viewBox: "0 0 7 2",
    fill: "none"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_3__.Path, {
    d: "M0.812 1.408V0.33H6.398V1.408H0.812Z",
    fill: "#001944"
  }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalNumberControl, {
    onChange: updateValues,
    value: internalValue
  }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
    className: "Increment",
    onClick: handleIncrement
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_3__.SVG, {
    xmlns: "http://www.w3.org/2000/svg",
    width: "8",
    height: "8",
    viewBox: "0 0 8 8",
    fill: "none"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_3__.Path, {
    d: "M3.186 0.305999H4.376V3.344H7.358V4.422H4.376V7.446H3.186V4.422H0.218V3.344H3.186V0.305999Z",
    fill: "#001944"
  }))))));
};
Row.propTypes = {
  onChange: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func).isRequired,
  minRow: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number),
  valueRow: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number),
  maxRow: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number),
  stepRow: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number),
  control: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Row);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/controls.js":
/*!*********************************************************!*\
  !*** ./assets/apps/customizer-controls/src/controls.js ***!
  \*********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _public_path_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./public-path.js */ "./assets/apps/customizer-controls/src/public-path.js");
/* harmony import */ var _public_path_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_public_path_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _dynamic_fields_index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./dynamic-fields/index */ "./assets/apps/customizer-controls/src/dynamic-fields/index.js");
/* harmony import */ var _toggle_Control__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./toggle/Control */ "./assets/apps/customizer-controls/src/toggle/Control.js");
/* harmony import */ var _toggle_flex_Control__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./toggle-flex/Control */ "./assets/apps/customizer-controls/src/toggle-flex/Control.js");
/* harmony import */ var _responsive_toggle_Control__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./responsive-toggle/Control */ "./assets/apps/customizer-controls/src/responsive-toggle/Control.js");
/* harmony import */ var _background_Control__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./background/Control */ "./assets/apps/customizer-controls/src/background/Control.js");
/* harmony import */ var _spacing_Control__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./spacing/Control */ "./assets/apps/customizer-controls/src/spacing/Control.js");
/* harmony import */ var _spacing_divider_Control__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./spacing-divider/Control */ "./assets/apps/customizer-controls/src/spacing-divider/Control.js");
/* harmony import */ var _typeface_title_Control__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./typeface-title/Control */ "./assets/apps/customizer-controls/src/typeface-title/Control.js");
/* harmony import */ var _card_options_cart_Control__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./card-options-cart/Control */ "./assets/apps/customizer-controls/src/card-options-cart/Control.js");
/* harmony import */ var _card_options_excerpt_Control__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./card-options-excerpt/Control */ "./assets/apps/customizer-controls/src/card-options-excerpt/Control.js");
/* harmony import */ var _card_options_star_rating_Control__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./card-options-star-rating/Control */ "./assets/apps/customizer-controls/src/card-options-star-rating/Control.js");
/* harmony import */ var _card_options_price_Control__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./card-options-price/Control */ "./assets/apps/customizer-controls/src/card-options-price/Control.js");
/* harmony import */ var _card_options_categories_Control__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./card-options-categories/Control */ "./assets/apps/customizer-controls/src/card-options-categories/Control.js");
/* harmony import */ var _card_options_title_Control__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./card-options-title/Control */ "./assets/apps/customizer-controls/src/card-options-title/Control.js");
/* harmony import */ var _card_options_product_image_Control__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./card-options-product-image/Control */ "./assets/apps/customizer-controls/src/card-options-product-image/Control.js");
/* harmony import */ var _popup_only_bottom_spacing_Control__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./popup-only-bottom-spacing/Control */ "./assets/apps/customizer-controls/src/popup-only-bottom-spacing/Control.js");
/* harmony import */ var _popup_heading_bottom_spacing_Control__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./popup-heading-bottom-spacing/Control */ "./assets/apps/customizer-controls/src/popup-heading-bottom-spacing/Control.js");
/* harmony import */ var _popup_payment_methods_Control__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./popup-payment-methods/Control */ "./assets/apps/customizer-controls/src/popup-payment-methods/Control.js");
/* harmony import */ var _popup_additional_info_Control__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./popup-additional-info/Control */ "./assets/apps/customizer-controls/src/popup-additional-info/Control.js");
/* harmony import */ var _product_element_add_to_cart_Control__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./product-element-add-to-cart/Control */ "./assets/apps/customizer-controls/src/product-element-add-to-cart/Control.js");
/* harmony import */ var _typeface_Control__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./typeface/Control */ "./assets/apps/customizer-controls/src/typeface/Control.js");
/* harmony import */ var _post_meta_Control__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./post-meta/Control */ "./assets/apps/customizer-controls/src/post-meta/Control.js");
/* harmony import */ var _font_family_Control__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./font-family/Control */ "./assets/apps/customizer-controls/src/font-family/Control.js");
/* harmony import */ var _radio_buttons_Control__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./radio-buttons/Control */ "./assets/apps/customizer-controls/src/radio-buttons/Control.js");
/* harmony import */ var _radio_popup_Control__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./radio-popup/Control */ "./assets/apps/customizer-controls/src/radio-popup/Control.js");
/* harmony import */ var _button_appearance_Control__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./button-appearance/Control */ "./assets/apps/customizer-controls/src/button-appearance/Control.js");
/* harmony import */ var _range_Control__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./range/Control */ "./assets/apps/customizer-controls/src/range/Control.js");
/* harmony import */ var _column_and_row_Control__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./column-and-row/Control */ "./assets/apps/customizer-controls/src/column-and-row/Control.js");
/* harmony import */ var _responsive_range_Control__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./responsive-range/Control */ "./assets/apps/customizer-controls/src/responsive-range/Control.js");
/* harmony import */ var _color_Control__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./color/Control */ "./assets/apps/customizer-controls/src/color/Control.js");
/* harmony import */ var _presets_selector_Control__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./presets-selector/Control */ "./assets/apps/customizer-controls/src/presets-selector/Control.js");
/* harmony import */ var _presets_footer_Control__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./presets-footer/Control */ "./assets/apps/customizer-controls/src/presets-footer/Control.js");
/* harmony import */ var _multiselect_Control__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./multiselect/Control */ "./assets/apps/customizer-controls/src/multiselect/Control.js");
/* harmony import */ var _form_token_field_Control__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./form-token-field/Control */ "./assets/apps/customizer-controls/src/form-token-field/Control.js");
/* harmony import */ var _responsive_radio_buttons_Control__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./responsive-radio-buttons/Control */ "./assets/apps/customizer-controls/src/responsive-radio-buttons/Control.js");
/* harmony import */ var _featured_image_Control__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./featured-image/Control */ "./assets/apps/customizer-controls/src/featured-image/Control.js");
/* harmony import */ var _radio_image_Control__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./radio-image/Control */ "./assets/apps/customizer-controls/src/radio-image/Control.js");
/* harmony import */ var _new_ordering_Control__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./new-ordering/Control */ "./assets/apps/customizer-controls/src/new-ordering/Control.js");
/* harmony import */ var _solace_sortable_Control__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./solace-sortable/Control */ "./assets/apps/customizer-controls/src/solace-sortable/Control.js");
/* harmony import */ var _ordering_Control__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./ordering/Control */ "./assets/apps/customizer-controls/src/ordering/Control.js");
/* harmony import */ var _global_colors_Control__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./global-colors/Control */ "./assets/apps/customizer-controls/src/global-colors/Control.js");
/* harmony import */ var _global_custom_colors_Control__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./global-custom-colors/Control */ "./assets/apps/customizer-controls/src/global-custom-colors/Control.js");
/* harmony import */ var _non_responsive_spacing_Control__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./non-responsive-spacing/Control */ "./assets/apps/customizer-controls/src/non-responsive-spacing/Control.js");
/* harmony import */ var _inline_select_Control__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./inline-select/Control */ "./assets/apps/customizer-controls/src/inline-select/Control.js");
/* harmony import */ var _link_custom_Control__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./link-custom/Control */ "./assets/apps/customizer-controls/src/link-custom/Control.js");
/* harmony import */ var _builder_Control__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./builder/Control */ "./assets/apps/customizer-controls/src/builder/Control.js");
/* harmony import */ var _builder_columns_Control__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./builder-columns/Control */ "./assets/apps/customizer-controls/src/builder-columns/Control.js");
/* harmony import */ var _builder_instructions_Control__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./builder-instructions/Control */ "./assets/apps/customizer-controls/src/builder-instructions/Control.js");
/* harmony import */ var _heading_Control__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./heading/Control */ "./assets/apps/customizer-controls/src/heading/Control.js");
/* harmony import */ var _skin_switcher_Control__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./skin-switcher/Control */ "./assets/apps/customizer-controls/src/skin-switcher/Control.js");
/* harmony import */ var _logo_palette_Control__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./logo-palette/Control */ "./assets/apps/customizer-controls/src/logo-palette/Control.js");
/* harmony import */ var _media_image_Control__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./media-image/Control */ "./assets/apps/customizer-controls/src/media-image/Control.js");
/* harmony import */ var _repeater_Control__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./repeater/Control */ "./assets/apps/customizer-controls/src/repeater/Control.js");
/* harmony import */ var _rich_text_Control__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./rich-text/Control */ "./assets/apps/customizer-controls/src/rich-text/Control.js");
/* harmony import */ var _link_Control__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ./link/Control */ "./assets/apps/customizer-controls/src/link/Control.js");
/* harmony import */ var _group_select_Control__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ./group-select/Control */ "./assets/apps/customizer-controls/src/group-select/Control.js");
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ./style.scss */ "./assets/apps/customizer-controls/src/style.scss");
/* harmony import */ var _documentation_section_Documentation_tsx__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ./documentation-section/Documentation.tsx */ "./assets/apps/customizer-controls/src/documentation-section/Documentation.tsx");
/* harmony import */ var _builder_instructions_Instructions_tsx__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ./builder-instructions/Instructions.tsx */ "./assets/apps/customizer-controls/src/builder-instructions/Instructions.tsx");
/* harmony import */ var _typography_extra_LocalGoogleFonts__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ./typography-extra/LocalGoogleFonts */ "./assets/apps/customizer-controls/src/typography-extra/LocalGoogleFonts.js");
/* harmony import */ var _customizer_search_MainSearch_tsx__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ./customizer-search/MainSearch.tsx */ "./assets/apps/customizer-controls/src/customizer-search/MainSearch.tsx");
/* harmony import */ var _typography_font_pair_Control__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ./typography-font-pair/Control */ "./assets/apps/customizer-controls/src/typography-font-pair/Control.js");

/* global CustomEvent, SolaceReactCustomize, MutationObserver */
































































const {
  controlConstructor
} = wp.customize;
controlConstructor.solace_toggle_control = _toggle_Control__WEBPACK_IMPORTED_MODULE_3__.ToggleControl;
controlConstructor.solace_toggle_control_flex = _toggle_flex_Control__WEBPACK_IMPORTED_MODULE_4__.ToggleControlFlex;
controlConstructor.solace_responsive_toggle_control = _responsive_toggle_Control__WEBPACK_IMPORTED_MODULE_5__.ResponsiveToggleControl;
controlConstructor.solace_background_control = _background_Control__WEBPACK_IMPORTED_MODULE_6__.BackgroundControl;
controlConstructor.solace_spacing = _spacing_Control__WEBPACK_IMPORTED_MODULE_7__.SpacingControl;
controlConstructor.solace_spacing_divider = _spacing_divider_Control__WEBPACK_IMPORTED_MODULE_8__.SpacingDividerControl;
controlConstructor.solace_typeface_title_control = _typeface_title_Control__WEBPACK_IMPORTED_MODULE_9__.TypefaceTitleControl;
controlConstructor.solace_card_options_cart_control = _card_options_cart_Control__WEBPACK_IMPORTED_MODULE_10__.CardOptionsCartControl;
controlConstructor.solace_card_options_excerpt_control = _card_options_excerpt_Control__WEBPACK_IMPORTED_MODULE_11__.CardOptionsExcerptControl;
controlConstructor.solace_card_options_star_rating_control = _card_options_star_rating_Control__WEBPACK_IMPORTED_MODULE_12__.CardOptionsStarRatingControl;
controlConstructor.solace_card_options_price_control = _card_options_price_Control__WEBPACK_IMPORTED_MODULE_13__.CardOptionsPriceControl;
controlConstructor.solace_card_options_categories_control = _card_options_categories_Control__WEBPACK_IMPORTED_MODULE_14__.CardOptionsCategoriesControl;
controlConstructor.solace_card_options_title_control = _card_options_title_Control__WEBPACK_IMPORTED_MODULE_15__.CardOptionsTitleControl;
controlConstructor.solace_card_options_product_image_control = _card_options_product_image_Control__WEBPACK_IMPORTED_MODULE_16__.CardOptionsProductImageControl;
controlConstructor.solace_popup_only_bottom_spacing_control = _popup_only_bottom_spacing_Control__WEBPACK_IMPORTED_MODULE_17__.PopupOnlyBottomSpacingControl;
controlConstructor.solace_popup_heading_bottom_spacing_control = _popup_heading_bottom_spacing_Control__WEBPACK_IMPORTED_MODULE_18__.PopupHeadingBottomSpacingControl;
controlConstructor.solace_popup_payment_methods_control = _popup_payment_methods_Control__WEBPACK_IMPORTED_MODULE_19__.PopupPaymentMethodsControl;
controlConstructor.solace_popup_additional_info_control = _popup_additional_info_Control__WEBPACK_IMPORTED_MODULE_20__.PopupAdditionalInfoControl;
controlConstructor.solace_product_element_add_to_cart_control = _product_element_add_to_cart_Control__WEBPACK_IMPORTED_MODULE_21__.ProductElementAddToCartControl;
controlConstructor.solace_typeface_control = _typeface_Control__WEBPACK_IMPORTED_MODULE_22__.TypefaceControl;
controlConstructor.solace_post_meta_control = _post_meta_Control__WEBPACK_IMPORTED_MODULE_23__.PostMetaControl;
controlConstructor.solace_font_family_control = _font_family_Control__WEBPACK_IMPORTED_MODULE_24__.FontFamilyControl;
controlConstructor.solace_font_pairings_control = _typography_font_pair_Control__WEBPACK_IMPORTED_MODULE_63__.FontPairControl;
controlConstructor.solace_radio_buttons_control = _radio_buttons_Control__WEBPACK_IMPORTED_MODULE_25__.RadioButtonsControl;
controlConstructor.solace_radio_popup_control = _radio_popup_Control__WEBPACK_IMPORTED_MODULE_26__.RadioPopupControl;
controlConstructor.solace_button_appearance = _button_appearance_Control__WEBPACK_IMPORTED_MODULE_27__.ButtonAppearanceControl;
controlConstructor.solace_range_control = _range_Control__WEBPACK_IMPORTED_MODULE_28__.RangeControl;
controlConstructor.solace_column_and_row_control = _column_and_row_Control__WEBPACK_IMPORTED_MODULE_29__.ColumnAndRowControl;
controlConstructor.solace_responsive_range_control = _responsive_range_Control__WEBPACK_IMPORTED_MODULE_30__.ResponsiveRangeControl;
controlConstructor.solace_color_control = _color_Control__WEBPACK_IMPORTED_MODULE_31__.ColorControl;
controlConstructor.solace_presets_selector = _presets_selector_Control__WEBPACK_IMPORTED_MODULE_32__.PresetsSelectorControl;
controlConstructor.solace_presets_footer = _presets_footer_Control__WEBPACK_IMPORTED_MODULE_33__.PresetsFooterControl;
controlConstructor.solace_multiselect = _multiselect_Control__WEBPACK_IMPORTED_MODULE_34__.MultiSelectControl;
controlConstructor.solace_form_token_field = _form_token_field_Control__WEBPACK_IMPORTED_MODULE_35__.FormTokenFieldControl;
controlConstructor.solace_group_select = _group_select_Control__WEBPACK_IMPORTED_MODULE_57__.GroupSelectControl;
controlConstructor.solace_responsive_radio_buttons_control = _responsive_radio_buttons_Control__WEBPACK_IMPORTED_MODULE_36__.ResponsiveRadioButtonsControl;
controlConstructor.solace_featured_image_control = _featured_image_Control__WEBPACK_IMPORTED_MODULE_37__.FeaturedImageControl;
controlConstructor.solace_radio_image_control = _radio_image_Control__WEBPACK_IMPORTED_MODULE_38__.RadioImageControl;
controlConstructor.solace_new_ordering_control = _new_ordering_Control__WEBPACK_IMPORTED_MODULE_39__.NewOrderingControl;
controlConstructor.solace_sortable_control = _solace_sortable_Control__WEBPACK_IMPORTED_MODULE_40__.SolaceSortableControl;
controlConstructor.solace_ordering_control = _ordering_Control__WEBPACK_IMPORTED_MODULE_41__.OrderingControl;
controlConstructor.solace_global_colors = _global_colors_Control__WEBPACK_IMPORTED_MODULE_42__.GlobalColorsControl;
controlConstructor.solace_global_custom_colors = _global_custom_colors_Control__WEBPACK_IMPORTED_MODULE_43__.GlobalCustomColorsControl;
controlConstructor.solace_non_responsive_spacing = _non_responsive_spacing_Control__WEBPACK_IMPORTED_MODULE_44__.NRSpacingControl;
controlConstructor.solace_inline_select = _inline_select_Control__WEBPACK_IMPORTED_MODULE_45__.InlineSelectControl;
controlConstructor.solace_link_custom = _link_custom_Control__WEBPACK_IMPORTED_MODULE_46__.LinkCustomControl;
controlConstructor.solace_builder_control = _builder_Control__WEBPACK_IMPORTED_MODULE_47__.BuilderControl;
controlConstructor.solace_builder_columns = _builder_columns_Control__WEBPACK_IMPORTED_MODULE_48__.BuilderColumns;
controlConstructor.hfg_instructions = _builder_instructions_Control__WEBPACK_IMPORTED_MODULE_49__.InstructionsControl;
controlConstructor.solace_customizer_heading = _heading_Control__WEBPACK_IMPORTED_MODULE_50__.HeadingControl;
controlConstructor.solace_skin_switcher = _skin_switcher_Control__WEBPACK_IMPORTED_MODULE_51__.SkinSwitcherControl;
controlConstructor.solace_logo_palette_control = _logo_palette_Control__WEBPACK_IMPORTED_MODULE_52__.LogoPaletteControl;
controlConstructor.solace_media_image_control = _media_image_Control__WEBPACK_IMPORTED_MODULE_53__.MediaImageControl;
controlConstructor.solace_repeater_control = _repeater_Control__WEBPACK_IMPORTED_MODULE_54__.RepeaterControl;
controlConstructor.solace_rich_text = _rich_text_Control__WEBPACK_IMPORTED_MODULE_55__.RichTextControl;
controlConstructor.solace_link = _link_Control__WEBPACK_IMPORTED_MODULE_56__.LinkControl;
const initDeviceSwitchers = () => {
  const deviceButtons = document.querySelector('#customize-footer-actions .devices, .hfg--cb-devices-switcher a.switch-to');
  deviceButtons.addEventListener('click', function (e) {
    const event = new CustomEvent('solaceChangedRepsonsivePreview', {
      detail: e.target.dataset.device
    });
    document.dispatchEvent(event);
  });
};
const initDocSection = () => {
  const docs = document.querySelectorAll('.control-section.solace-documentation');
  docs.forEach(node => {
    const slug = node.getAttribute('data-slug');
    const section = wp.customize.section(slug);
    if (!section) {
      return;
    }
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_documentation_section_Documentation_tsx__WEBPACK_IMPORTED_MODULE_59__["default"], {
      control: section
    }), section.container[0]);
  });
};
const initSearchCustomizer = () => {
  // will remove the search icon if another plugin or WordPress add this feature
  const callback = (mutationList, observer) => {
    for (const mutation of mutationList) {
      if (mutation.type === 'childList') {
        const searchCount = document.querySelectorAll('#customize-info .accordion-section-title .dashicons-search').length;
        if (searchCount > 1) {
          observer.disconnect();
          document.getElementById('solace-customize-search')?.remove();
        }
      }
    }
  };
  const targetNodeMutation = document.querySelector('#customize-info .accordion-section-title');
  const observer = new MutationObserver(callback);
  const config = {
    attributes: false,
    childList: true,
    subtree: false
  };
  observer.observe(targetNodeMutation, config);
  const customizePreview = document.getElementById('customize-controls');
  const mount = document.createElement('div');
  customizePreview.appendChild(mount);
  const title = document.querySelector('#customize-info .accordion-section-title');
  const customizerPanels = document.getElementById('customize-theme-controls');
  const titleSection = document.getElementById('customize-info');
  const targetNode = document.createElement('div');
  const targetFieldNode = document.createElement('div');
  const targetSearchResultsNode = document.createElement('div');
  targetNode.setAttribute('id', 'solace-customize-search');
  targetFieldNode.setAttribute('id', 'solace-customize-search-field');
  targetSearchResultsNode.setAttribute('id', 'solace-customize-search-results');
  title.append(targetNode);
  titleSection.append(targetFieldNode);
  customizerPanels.after(targetSearchResultsNode);
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_customizer_search_MainSearch_tsx__WEBPACK_IMPORTED_MODULE_62__["default"], {
    search: targetFieldNode,
    button: targetNode,
    results: targetSearchResultsNode
  }), mount);
};
const initCustomPagesFocus = () => {
  const {
    sectionsFocus
  } = window.SolaceReactCustomize;
  if (sectionsFocus !== undefined) {
    Object.keys(sectionsFocus).forEach(sectionKey => {
      wp.customize.section(sectionKey, section => {
        section.expanded.bind(isExpanded => {
          if (isExpanded) {
            wp.customize.previewer.previewUrl.set(sectionsFocus[sectionKey]);
          }
        });
      });
    });
  }
};

// const initBlogPageFocus = () => {
// 	wp.customize.section('solace_blog_archive_layout', (section) => {
// 		section.expanded.bind((isExpanded) => {
// 			const front = wp.customize.control('show_on_front').setting();
// 			let pageId = '';
// 			if (front === 'page') {
// 				pageId = wp.customize.control('page_for_posts').setting();
// 			}

// 			if (isExpanded) {
// 				wp.customize.previewer.previewUrl.set(
// 					pageId ? `/?page_id=${pageId}` : '/'
// 				);
// 			}
// 		});
// 	});
// };

const initQuickLinksSections = () => {
  const quickLinks = document.querySelectorAll('.control-section.solace-quick-links');
  quickLinks.forEach(node => {
    const slug = node.getAttribute('data-slug');
    const section = wp.customize.section(slug);
    if (!section) {
      return;
    }
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_builder_instructions_Instructions_tsx__WEBPACK_IMPORTED_MODULE_60__["default"], {
      control: section
    }), section.container[0]);
  });
};
const bindDataAttrQuickLinks = () => {
  const dataControlFocusElements = document.querySelectorAll('[data-control-focus]');
  if (!dataControlFocusElements) {
    return;
  }
  dataControlFocusElements.forEach(el => {
    el.addEventListener('click', () => {
      const attribute = el.getAttribute('data-control-focus');
      if (!attribute) {
        return;
      }
      const control = window.wp.customize.control(attribute);
      if (!control) {
        return;
      }
      control.focus();
    });
  });
};
const checkHasElementorTemplates = () => {
  if (SolaceReactCustomize.elementor.hasElementorShopTemplate) {
    window.wp.customize.section('woocommerce_product_catalog').notifications.add(new window.wp.customize.Notification('solace-custom-elementor-shop-template', {
      type: 'warning',
      message: 'Some of the settings might not work as expected because you are using a custom shop template made in Elementor.'
    }));
  }
  if (SolaceReactCustomize.elementor.hasElementorProductTemplate) {
    window.wp.customize.section('solace_single_product_layout').notifications.add(new window.wp.customize.Notification('solace-custom-elementor-product-template', {
      type: 'warning',
      message: 'Some of the settings might not work as expected because you are using a custom product template made in Elementor.'
    }));
  }
};
window.wp.customize.bind('ready', () => {
  initDocSection();
  (0,_dynamic_fields_index__WEBPACK_IMPORTED_MODULE_2__.init)();
  initQuickLinksSections();
  bindDataAttrQuickLinks();
  // initBlogPageFocus();
  initCustomPagesFocus();
  checkHasElementorTemplates();
  initDeviceSwitchers();
  // initBlogPageFocus();
  initSearchCustomizer();
  (0,_typography_extra_LocalGoogleFonts__WEBPACK_IMPORTED_MODULE_61__.initLocalGoogleFonts)();
});
window.HFG = {
  getSettings: () => {
    const usedSettings = {};
    const {
      headerControls
    } = window.SolaceReactCustomize;
    Object.keys(headerControls).forEach(modKey => {
      const control = window.wp.customize.control(modKey);
      // If the control isn't there don't do anything.
      if (!control) {
        return;
      }

      // If the value is default don't do anything.
      const value = control.setting();

      // Compare stringified versions as this can contain arrays and objects.
      if (JSON.stringify(value) === JSON.stringify(headerControls[modKey])) {
        return;
      }

      // Save key/value pair.
      usedSettings[modKey] = value;
    });
    return JSON.stringify(usedSettings);
  }
};

/***/ }),

/***/ "./assets/apps/customizer-controls/src/dynamic-fields/dynamic-field-inserter.js":
/*!**************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/dynamic-fields/dynamic-field-inserter.js ***!
  \**************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);

/* jshint esversion: 6 */



const DynamicFieldInserter = ({
  options = [],
  onSelect,
  allowedOptionsTypes
}) => {
  const getOptions = () => {
    const optionGroups = [];
    options.forEach((optionGroup, groupIndex) => {
      const children = [];
      Object.keys(optionGroup.controls).forEach((slug, index) => {
        if (!allowedOptionsTypes.includes(optionGroup.controls[slug].type)) {
          return false;
        }
        children.push((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.MenuItem, {
          key: index,
          onClick: () => {
            onSelect(slug, optionGroup.controls[slug].type);
          }
        }, optionGroup.controls[slug].label));
      });
      optionGroups.push((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.MenuGroup, {
        key: groupIndex,
        label: optionGroup.label
      }, children));
    });
    return optionGroups;
  };
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.DropdownMenu, {
    icon: "image-filter",
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Insert Dynamic Tag', 'solace')
  }, getOptions);
};
DynamicFieldInserter.propTypes = {
  allowedOptionsTypes: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().array).isRequired,
  onSelect: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().func).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DynamicFieldInserter);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/dynamic-fields/index.js":
/*!*********************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/dynamic-fields/index.js ***!
  \*********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   init: () => (/* binding */ init)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _dynamic_field_inserter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./dynamic-field-inserter.js */ "./assets/apps/customizer-controls/src/dynamic-fields/dynamic-field-inserter.js");

/* global SolaceReactCustomize, Event */




/**
 * Initialize the dynamic tag buttons.
 *
 * @return {boolean}|{void}
 */
const init = () => {
  const controls = SolaceReactCustomize?.dynamicTags?.controls || false;
  if (!controls) {
    return false;
  }
  SolaceReactCustomize.fieldSelection = {};
  Object.keys(controls).forEach(controlId => {
    const control = wp.customize.control(controlId);
    if (typeof control === 'undefined') {
      return false;
    }
    const container = control.container[0];
    const dynamicControlWrap = document.createElement('div');
    dynamicControlWrap.setAttribute('id', `dynamic-${controlId}`);
    dynamicControlWrap.classList.add('solace-dynamic-tag-selector');
    container.classList.add('solace-has-dynamic-tag-selector');
    container.appendChild(dynamicControlWrap);
    const input = document.querySelector(`[data-customize-setting-link="${control.id}"]`);
    input.addEventListener('focusout', function (e) {
      SolaceReactCustomize.fieldSelection[controlId] = {
        start: e.target.selectionStart,
        end: e.target.selectionEnd
      };
    });
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_dynamic_field_inserter_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      options: SolaceReactCustomize?.dynamicTags?.options || [],
      allowedOptionsTypes: controls[controlId],
      onSelect: (magicTag, group) => addToField(magicTag, control, group)
    }), dynamicControlWrap);
  });
};

/**
 * Add dynamic tag to input field.
 *
 * @param {string} magicTag
 * @param {Object} control
 * @param {string} optionType
 */
const addToField = function (magicTag, control, optionType) {
  let tag;
  const input = document.querySelector(`[data-customize-setting-link="${control.id}"]`);
  if (optionType === 'url' && control.params.type === 'textarea') {
    tag = `<a href="{${magicTag}}">Link</a>`;
  } else {
    tag = `{${magicTag}}`;
  }
  if (optionType === 'url' && input.value === '#') {
    input.value = tag;
  } else if (SolaceReactCustomize.fieldSelection[control.id]) {
    const {
      start,
      end
    } = SolaceReactCustomize.fieldSelection[control.id];
    const length = input.value.length;
    input.value = input.value.substring(0, start) + tag + input.value.substring(end, length);
  } else {
    input.value += tag;
  }
  SolaceReactCustomize.fieldSelection[control.id] = false;
  input.focus();
  input.dispatchEvent(new Event('change'));
};

/***/ }),

/***/ "./assets/apps/customizer-controls/src/featured-image/Control.js":
/*!***********************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/featured-image/Control.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   FeaturedImageControl: () => (/* binding */ FeaturedImageControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _FeaturedImageComponent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./FeaturedImageComponent.js */ "./assets/apps/customizer-controls/src/featured-image/FeaturedImageComponent.js");

/* jshint esversion: 6 */



const FeaturedImageControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FeaturedImageComponent_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/featured-image/FeaturedImageComponent.js":
/*!**************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/featured-image/FeaturedImageComponent.js ***!
  \**************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);

/* jshint esversion: 6 */





const FeaturedImageComponent = ({
  control
}) => {
  const {
    choices,
    label
  } = control.params;
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(control.setting.get());
  const [device, setDevice] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)('desktop');
  const [visible, setVisible] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
  const [popoverCoords, setPopoverCoords] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({
    top: 0,
    left: 0
  });
  const popoverRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
  const updateValue = newValue => {
    setValue(newValue);
    control.setting.set(newValue);
  };
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    const isMenuAlignment = control.id.indexOf('primary-menu') > -1 || control.id.indexOf('secondary-menu') > -1;
    // Migrate previously string value into responsive.
    if (typeof value === 'string') {
      setValue({
        mobile: isMenuAlignment ? 'left' : value,
        tablet: isMenuAlignment ? 'left' : value,
        desktop: value
      });
    }
    document.addEventListener('solace-changed-customizer-value', e => {
      if (!e.detail) return false;
      if (e.detail.id !== control.id) return false;
      let recievedValue = e.detail.value;

      // Migrate previously string value into responsive.
      if (typeof recievedValue === 'string') {
        recievedValue = {
          mobile: isMenuAlignment ? 'left' : recievedValue,
          tablet: isMenuAlignment ? 'left' : recievedValue,
          desktop: recievedValue
        };
      }
      updateValue(recievedValue);
    });
    const handleGetPopupClickDivider = e => {
      const controlID = 'solace_single_post_element__featured_image';
      const baseIds = ['svg', 'g', 'path1', 'path2'];
      const ids = [controlID, ...baseIds.map(prefix => `${prefix}-${controlID}`)];
      if (ids.includes(e.target.id)) {
        const rect = e.target.getBoundingClientRect();
        setPopoverCoords({
          top: rect.bottom - 25,
          left: rect.left + 50,
          y: rect.y
        });
        setVisible(true);
      }
    };
    document.addEventListener('click', handleGetPopupClickDivider);
    return () => {
      document.removeEventListener('click', handleGetPopupClickDivider);
    };
  }, [control.id, value]);
  const handleSelectChange = (event, choiceKey) => {
    const selectedValue = event.target.value;
    updateValue({
      ...value,
      [device]: {
        ...value[device],
        [choiceKey]: selectedValue
      }
    });
  };
  const handleToggleChange = imageVisibility => {
    updateValue({
      ...value,
      [device]: {
        ...value[device],
        imageVisibility: imageVisibility
      }
    });
  };

  // Function to convert camelCase to Title Case
  const camelCaseToTitleCase = str => {
    // Add a space before each uppercase letter
    return str.replace(/([A-Z])/g, ' $1')
    // Capitalize the first letter of the string
    .replace(/^./, char => char.toUpperCase());
  };
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, visible && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Popover, {
    className: "popover-featured-image solace-remove-style-popover-transform",
    onFocusOutside: () => {
      setVisible(false);
    },
    ref: popoverRef,
    style: {
      position: 'absolute',
      top: popoverCoords.top,
      left: popoverCoords.left
    }
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-component-featured-image",
    style: {
      position: 'absolute',
      left: popoverCoords.left - 10,
      top: popoverCoords.y - 15,
      backgroundColor: 'var(--sol-customizer-panel-bg-color)',
      color: '#fff',
      border: '1px solid var(--sol-customizer-line-color)',
      borderRadius: '10px'
    }
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-white-background-control"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-control-dropdown"
  }, Object.keys(choices).map(choiceKey => choiceKey !== 'imageVisibility' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    key: choiceKey,
    className: "dropdown-container"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", null, camelCaseToTitleCase(choiceKey)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("select", {
    value: value[device]?.[choiceKey] || '',
    onChange: event => handleSelectChange(event, choiceKey)
  }, Object.keys(choices[choiceKey]).map(optionKey => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("option", {
    key: optionKey,
    value: optionKey
  }, choices[choiceKey][optionKey])))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "toggle-container"
  }, Object.keys(choices).map(choiceKey => choiceKey === 'imageVisibility' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.NewToggle, {
    key: choiceKey,
    label: camelCaseToTitleCase(choiceKey),
    checked: value[device]?.imageVisibility || false,
    onChange: handleToggleChange
  }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-control-device"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.ResponsiveControl, {
    onChange: setDevice
  }))))));
};
FeaturedImageComponent.propTypes = {
  control: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (FeaturedImageComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/font-family/Control.js":
/*!********************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/font-family/Control.js ***!
  \********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   FontFamilyControl: () => (/* binding */ FontFamilyControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _FontFamilyComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./FontFamilyComponent */ "./assets/apps/customizer-controls/src/font-family/FontFamilyComponent.js");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__);

/* jshint esversion: 6 */




const FontFamilyControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.ControlWithLink, {
      link: this.params.input_attrs.link
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FontFamilyComponent__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    })), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/font-family/FontFamilyComponent.js":
/*!********************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/font-family/FontFamilyComponent.js ***!
  \********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _VariantSelector__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./VariantSelector */ "./assets/apps/customizer-controls/src/font-family/VariantSelector.js");

/* jshint esversion: 6 */
/* global SolaceReactCustomize */




const FontFamilySelector = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.lazy)(() => Promise.all(/*! import() */[__webpack_require__.e("vendors-node_modules_wordpress_icons_build-module_library_close_js-node_modules_wordpress_ico-2c346b"), __webpack_require__.e("assets_apps_customizer-controls_src_font-family_FontFamilySelector_js")]).then(__webpack_require__.bind(__webpack_require__, /*! ./FontFamilySelector */ "./assets/apps/customizer-controls/src/font-family/FontFamilySelector.js")));
const TypefaceComponent = ({
  control
}) => {
  const [fontFamily, setFontFamily] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(control.setting.get());
  const [visible, setVisible] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
  const {
    section
  } = control.params;
  const {
    variants
  } = control.settings;
  const defaultParams = {
    default_is_inherit: false
  };
  const controlParams = control.params.input_attrs ? {
    ...defaultParams,
    ...control.params.input_attrs
  } : defaultParams;
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    window.wp.customize.bind('ready', () => {
      window.wp.customize.state('expandedSection').bind(expandedSection => {
        if (!expandedSection) {
          return;
        }
        if (!expandedSection.id) {
          return;
        }
        if (expandedSection.id === section) {
          setVisible(true);
        }
      });
    });
  }, []);
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    document.addEventListener('solace-changed-customizer-value', e => {
      if (!e.detail) return false;
      if (e.detail.id !== control.id) return false;
      if (typeof e.detail.value !== 'object' || Array.isArray(e.detail.value) || e.detail.value === null) {
        return false;
      }
      if (!Object.hasOwn(e.detail.value, 'font') || !Object.hasOwn(e.detail.value, 'fontSource')) {
        return false;
      }
      const {
        font,
        fontSource
      } = e.detail.value;
      onChoseFont(fontSource, font);
    });
  }, []);
  const maybeGetTypekitFont = font => {
    const {
      typekitSlugs
    } = SolaceReactCustomize;
    if (!typekitSlugs) {
      return font;
    }
    if (!typekitSlugs[font]) {
      return font;
    }
    return typekitSlugs[font];
  };
  const onChoseFont = (fontSource, font) => {
    setFontFamily(font);
    updateControl(font, fontSource);
  };
  const updateControl = (font, fontSource) => {
    control.setting.set(maybeGetTypekitFont(font));
    if (control.id !== 'solace_fallback_font_family') {
      wp.customize.previewer.send('font-selection', {
        value: maybeGetTypekitFont(font),
        source: fontSource,
        controlId: control.id,
        type: '\\Solace\\Customizer\\Controls\\React\\Font_Family',
        inherit: controlParams.default_is_inherit
      });
    }
  };
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, control.params.label && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "customize-control-title"
  }, control.params.label), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-typeface-control solace-white-background-control",
    fonts: fontFamily
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Suspense, {
    fallback: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Spinner, null)
  }, visible && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(FontFamilySelector, {
    fonts: SolaceReactCustomize.fonts,
    selected: fontFamily,
    onFontChoice: (fontSource, font) => {
      onChoseFont(fontSource, font);
    },
    inheritDefault: controlParams.default_is_inherit,
    systemFonts: controlParams.system,
    maybeGetTypekit: maybeGetTypekitFont
  }), variants && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_VariantSelector__WEBPACK_IMPORTED_MODULE_2__.VariantSelector, {
    setting: variants,
    fontFamily: fontFamily
  })))));
};
TypefaceComponent.propTypes = {
  control: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TypefaceComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/font-family/VariantSelector.js":
/*!****************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/font-family/VariantSelector.js ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   VariantSelector: () => (/* binding */ VariantSelector)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);





function VariantSelector({
  setting,
  fontFamily
}) {
  const {
    fontVariants
  } = window.SolaceReactCustomize;
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(setting() || []);
  const updateValues = nextValues => {
    setValue(nextValues);
    setting.set(nextValues);
  };
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    if (!fontVariants[fontFamily]) {
      return;
    }
    const variants = [...fontVariants[fontFamily]];
    const nextValue = value.filter(selectedVariant => variants.includes(selectedVariant));
    updateValues(nextValue);
  }, [fontFamily]);
  if (!fontVariants[fontFamily]) {
    return null;
  }
  if (fontVariants[fontFamily].length < 1) {
    return null;
  }
  const variants = [...fontVariants[fontFamily]];
  const options = {};
  variants.forEach(variant => {
    variant = variant.toString();
    options[variant] = _solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.fontVariantMap[variant];
  });
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.MultiSelect, {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Additional Font Variants', 'solace'),
    choices: options,
    currentValue: value,
    onChange: updateValues
  });
}
VariantSelector.propTypes = {
  setting: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().func).isRequired,
  fontFamily: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().string).isRequired
};

/***/ }),

/***/ "./assets/apps/customizer-controls/src/form-token-field/Control.js":
/*!*************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/form-token-field/Control.js ***!
  \*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   FormTokenFieldControl: () => (/* binding */ FormTokenFieldControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _FormTokenFieldComponent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./FormTokenFieldComponent.js */ "./assets/apps/customizer-controls/src/form-token-field/FormTokenFieldComponent.js");

/* jshint esversion: 6 */



const FormTokenFieldControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FormTokenFieldComponent_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/form-token-field/FormTokenFieldComponent.js":
/*!*****************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/form-token-field/FormTokenFieldComponent.js ***!
  \*****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__);



const FormTokenFieldComponent = ({
  control
}) => {
  const parsedValue = (0,_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.maybeParseJson)(control.setting.get());
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(parsedValue);
  const {
    choices,
    label,
    description
  } = control.params;
  const updateValue = nextVal => {
    setValue(nextVal);
    control.setting.set(JSON.stringify(nextVal));
  };
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.FormTokenFieldControl, {
    label: label,
    description: description,
    choices: choices,
    value: value,
    onChange: updateValue
  });
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (FormTokenFieldComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/global-colors/Control.js":
/*!**********************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/global-colors/Control.js ***!
  \**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   GlobalColorsControl: () => (/* binding */ GlobalColorsControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _GlobalColorsComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GlobalColorsComponent */ "./assets/apps/customizer-controls/src/global-colors/GlobalColorsComponent.js");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__);




const GlobalColorsControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.ControlWithLink, {
      link: this.params.input_attrs.link
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_GlobalColorsComponent__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    })), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/global-colors/GlobalColors.js":
/*!***************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/global-colors/GlobalColors.js ***!
  \***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _PaletteSelector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PaletteSelector */ "./assets/apps/customizer-controls/src/global-colors/PaletteSelector.js");
/* harmony import */ var _PaletteColors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./PaletteColors */ "./assets/apps/customizer-controls/src/global-colors/PaletteColors.js");
/* harmony import */ var _PaletteForm__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./PaletteForm */ "./assets/apps/customizer-controls/src/global-colors/PaletteForm.js");




const GlobalColors = ({
  onChange,
  currentValue,
  label,
  defaultValues
}) => {
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-global-colors-wrap"
  }, label && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "customize-control-title"
  }, label), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_PaletteSelector__WEBPACK_IMPORTED_MODULE_1__["default"], {
    values: currentValue,
    save: onChange
  }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_PaletteForm__WEBPACK_IMPORTED_MODULE_3__["default"], {
    values: currentValue,
    save: onChange,
    disabled: Object.keys(currentValue.palettes).length > 5
  }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_PaletteColors__WEBPACK_IMPORTED_MODULE_2__["default"], {
    values: currentValue,
    save: onChange,
    defaults: defaultValues
  }));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (GlobalColors);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/global-colors/GlobalColorsComponent.js":
/*!************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/global-colors/GlobalColorsComponent.js ***!
  \************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _GlobalColors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GlobalColors */ "./assets/apps/customizer-controls/src/global-colors/GlobalColors.js");



const GlobalColorsComponent = ({
  control
}) => {
  const {
    label,
    defaultValues
  } = control.params;
  const [values, setValues] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({
    ...control.setting.get()
  });
  const save = nextValue => {
    //State
    setValues(nextValue);

    //Customize
    if (nextValue.flag) {
      delete nextValue.flag;
    } else {
      nextValue.flag = true;
    }
    control.setting.set(nextValue);

    //CSS Tag Update
    const cssTag = document.querySelector('#nv-css-vars-inline-css');
    const {
      activePalette,
      palettes
    } = nextValue;
    const currentPalette = palettes[activePalette];
    const {
      colors
    } = currentPalette;
    let style = ':root{';
    Object.keys(colors).map(slug => {
      style += `--${slug}:${colors[slug]};`;
      return false;
    });
    style += '}';
    cssTag.innerHTML = style;
  };
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_GlobalColors__WEBPACK_IMPORTED_MODULE_1__["default"], {
    onChange: save,
    currentValue: values,
    label: label,
    defaultValues: defaultValues
  });
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (GlobalColorsComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/global-colors/PaletteColors.js":
/*!****************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/global-colors/PaletteColors.js ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/rotate-left.js");
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ "lodash");
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_4__);







const PaletteColors = ({
  values,
  defaults,
  save
}) => {
  const {
    palettes,
    activePalette
  } = values;
  const palette = palettes[activePalette];
  const {
    colors,
    allowDeletion
  } = palette;
  const defaultColors = defaults.palettes[activePalette] ? {
    ...defaults.palettes[activePalette].colors
  } : {};
  const updateColorInPalette = (colorSlug, val) => {
    const nextValues = {
      ...values
    };
    if (nextValues.palettes[activePalette].colors[colorSlug] === val) {
      return false;
    }
    nextValues.palettes[activePalette].colors[colorSlug] = val;
    save(nextValues);
  };
  const resetPalette = () => {
    const nextValues = {
      ...values
    };
    nextValues.palettes[activePalette].colors = defaultColors;
    save(nextValues);
  };
  const paletteHasDefaultColors = Object.keys(defaultColors).filter(colorKey => {
    return defaultColors[colorKey] !== colors[colorKey];
  }).length < 1;
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_4__.Accordion, {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Palette Colors', 'solace')
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "color-array-wrap mypalette"
  }, _solace_wp_components__WEBPACK_IMPORTED_MODULE_4__.globalPaletteColors.map((group, index) => {
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
      key: activePalette + '_' + index
    }, index > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("hr", null), Object.keys(group).map((slug, index, arr) => {
      return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_4__.ColorControl, {
        disableGlobal: true,
        key: slug,
        label: group[slug],
        selectedColor: colors[slug],
        defaultValue: defaults.palettes[activePalette] ? defaults.palettes[activePalette].colors[slug] : '#FFFFFF',
        onChange: (0,lodash__WEBPACK_IMPORTED_MODULE_3__.debounce)(value => {
          updateColorInPalette(slug, value);
        }, 100)
      });
    })));
  }), !allowDeletion && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, {
    isLink: true,
    className: "reset-palette",
    onClick: resetPalette,
    disabled: paletteHasDefaultColors,
    icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__["default"]
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Reset all to default', 'solace')))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PaletteColors);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/global-colors/PaletteForm.js":
/*!**************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/global-colors/PaletteForm.js ***!
  \**************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/plus-circle-filled.js");
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ "lodash");
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__);






const PaletteForm = ({
  values,
  save,
  disabled
}) => {
  const {
    palettes
  } = values;
  const [isAdding, setIsAdding] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
  const [newPaletteName, setNewPaletteName] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)('');
  const [paletteFrom, setPaletteFrom] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)('base');
  const toggleAdding = () => {
    setIsAdding(!isAdding);
    setNewPaletteName('');
  };
  const setBasePalette = e => {
    setPaletteFrom(e.target.value);
  };
  const paletteExists = () => Object.keys(palettes).filter(item => (0,lodash__WEBPACK_IMPORTED_MODULE_3__.camelCase)(newPaletteName) === item).length > 0;
  const addNewPalette = e => {
    e.preventDefault();
    const nextValue = {
      ...values
    };
    const paletteSlug = (0,lodash__WEBPACK_IMPORTED_MODULE_3__.camelCase)(newPaletteName);
    nextValue.palettes[paletteSlug] = {
      name: newPaletteName,
      allowDeletion: true,
      colors: {
        ...nextValue.palettes[paletteFrom].colors
      }
    };
    nextValue.activePalette = paletteSlug;
    save(nextValue);
    toggleAdding();
  };
  if (!isAdding) {
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "add-palette-form"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, {
      disabled: disabled,
      style: {
        alignSelf: 'flex-start'
      },
      isSmall: true,
      isSecondary: true,
      icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__["default"],
      iconSize: 16,
      onClick: toggleAdding
    }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Add Custom Palette')));
  }
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "add-palette-form"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
    type: "text",
    placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Palette Title', 'solace'),
    onChange: e => {
      setNewPaletteName(e.target.value);
    }
  }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "customize-control-title"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Extend from:', 'solace')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("select", {
    value: paletteFrom,
    onChange: setBasePalette,
    onBlur: setBasePalette
  }, Object.keys(palettes).map((palette, index) => {
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("option", {
      key: index,
      value: palette
    }, palettes[palette].name);
  })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "actions"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, {
    isSmall: true,
    isSecondary: true,
    isDestructive: true,
    onClick: toggleAdding
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Cancel', 'solace')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, {
    isSmall: true,
    icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__["default"],
    iconSize: 16,
    isPrimary: true,
    onClick: addNewPalette,
    disabled: paletteExists() || newPaletteName.length < 1
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Add', 'solace'))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PaletteForm);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/global-colors/PaletteSelector.js":
/*!******************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/global-colors/PaletteSelector.js ***!
  \******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/trash.js");
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__);






const PaletteSelector = ({
  values,
  save
}) => {
  const {
    palettes,
    activePalette
  } = values;
  const [isOpenModal, setIsOpenModal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
  const [willDelete, setWillDelete] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)('');
  const [visible, setVisible] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
  const PREVIEW_COLORS = ['sol-color-base-font', 'sol-color-heading', 'sol-color-link-button-initial', 'sol-color-link-button-hover', 'sol-color-background', 'sol-color-page-title-background'];
  const svgIconCheck = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"/></svg>';
  const svgIconArrowBottom = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M201.4 342.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 274.7 86.6 137.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"/></svg>';
  const [isActive, setIsActive] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
  function toggleButton() {
    setIsActive(!isActive);
  }
  const deletePalette = () => {
    const nextValues = {
      ...values
    };
    if (activePalette === willDelete) {
      nextValues.activePalette = 'base';
    }
    delete nextValues.palettes[willDelete];
    setIsOpenModal(false);
    setWillDelete('');
    save(nextValues);
  };
  const setActivePalette = id => {
    const nextValues = {
      ...values
    };
    nextValues.activePalette = id;
    save(nextValues);
  };

  // Reorder the palette keys so we always have first positions used by defaults.
  const orderedPaletteKeys = [...Object.keys(values.palettes).filter(paletteSlug => !palettes[paletteSlug].allowDeletion), ...Object.keys(values.palettes).filter(paletteSlug => palettes[paletteSlug].allowDeletion)];
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: isActive ? "palettes-wrap-top active" : "palettes-wrap-top",
    onClick: () => {
      setVisible(true);
      // isActive ? setVisible(false) : setVisible(true);
    }
  }, orderedPaletteKeys.map(id => {
    const {
      colors,
      allowDeletion,
      name
    } = palettes[id];
    const colorActive = activePalette === id;
    const paletteClasses = classnames__WEBPACK_IMPORTED_MODULE_3___default()(['solace-global-color-palette-inner', {
      active: activePalette === id
    }]);
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, colorActive && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "box-color box-color-groups"
    }, PREVIEW_COLORS.map((color, index, arr) => {
      return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
        className: `${arr[index]} color`,
        key: index,
        index: index,
        dataColor: arr[index],
        style: {
          background: colors[color]
        }
      });
    })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "box-icon",
      onClick: toggleButton
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "icon",
      dangerouslySetInnerHTML: {
        __html: svgIconArrowBottom
      }
    }))));
  })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "container-solace-palettes-wrap"
  }, visible && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Popover, {
    onFocusOutside: () => {
      setVisible(false);
    }
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-palettes-wrap"
  }, orderedPaletteKeys.map(id => {
    const {
      colors,
      allowDeletion,
      name
    } = palettes[id];
    const paletteClasses = classnames__WEBPACK_IMPORTED_MODULE_3___default()(['solace-global-color-palette-inner', {
      active: activePalette === id
    }]);
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      key: id,
      className: "solace-global-color-palette"
    }, allowDeletion && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, {
      isLink: true,
      icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__["default"],
      iconSize: 21,
      className: "delete-palette",
      title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Remove Palette', 'solace'),
      onClick: () => {
        setWillDelete(id);
        setIsOpenModal(true);
      }
    }), isOpenModal && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Modal, {
      isDismissible: false,
      className: "solace-global-colors-confirm-delete-modal",
      title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.sprintf)(
      // translators: %s - name of palette that will be deleted.
      (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Are you sure you want to delete the %s palette?', 'solace'), palettes[willDelete].name)
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('If this is the currently active palette, the current palette will be switched to the Base one.', 'solace')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "actions"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, {
      isPrimary: true,
      icon: "trash",
      onClick: deletePalette
    }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Delete', 'solace')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, {
      isSecondary: true,
      onClick: () => {
        setIsOpenModal(false);
        setWillDelete('');
      }
    }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Cancel', 'solace'))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
      className: paletteClasses,
      onClick: e => {
        e.preventDefault();
        setActivePalette(id);
      },
      key: name.toLowerCase()
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "box-title"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: "title"
    }, name)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "box-color"
    }, PREVIEW_COLORS.map((color, index, arr) => {
      return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
        className: `${arr[index]} color`,
        key: index,
        index: index,
        dataColor: arr[index],
        style: {
          background: colors[color]
        }
      });
    })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "box-icon"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "icon",
      dangerouslySetInnerHTML: {
        __html: svgIconCheck
      }
    }))));
  })))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PaletteSelector);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/global-custom-colors/Control.js":
/*!*****************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/global-custom-colors/Control.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   GlobalCustomColorsControl: () => (/* binding */ GlobalCustomColorsControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _GlobalCustomColorsComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GlobalCustomColorsComponent */ "./assets/apps/customizer-controls/src/global-custom-colors/GlobalCustomColorsComponent.js");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__);




const GlobalCustomColorsControl = wp.customize.Control.extend({
  renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.ControlWithLink, {
      link: this.params.input_attrs.link
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_GlobalCustomColorsComponent__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    })), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/global-custom-colors/EditColorLabel.js":
/*!************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/global-custom-colors/EditColorLabel.js ***!
  \************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);




const EditColorLabel = ({
  currentLabel,
  slug,
  save,
  cancel
}) => {
  const [label, setLabel] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(currentLabel);
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "custom-label-edit-wrapper"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.TextControl, {
    onChange: setLabel,
    value: label,
    maxLength: 16
  }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, {
    onClick: () => {
      save(slug, label);
    },
    isSmall: true,
    variant: "primary"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Save', 'solace')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, {
    onClick: cancel,
    isSmall: true,
    variant: "secondary"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Cancel', 'solace')));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (EditColorLabel);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/global-custom-colors/GlobalCustomColors.js":
/*!****************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/global-custom-colors/GlobalCustomColors.js ***!
  \****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _PaletteColors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PaletteColors */ "./assets/apps/customizer-controls/src/global-custom-colors/PaletteColors.js");


const GlobalCustomColors = ({
  onChange,
  currentValue,
  defaultValues
}) => {
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-global-colors-wrap"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_PaletteColors__WEBPACK_IMPORTED_MODULE_1__["default"], {
    values: currentValue,
    save: onChange,
    defaults: defaultValues
  }));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (GlobalCustomColors);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/global-custom-colors/GlobalCustomColorsComponent.js":
/*!*************************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/global-custom-colors/GlobalCustomColorsComponent.js ***!
  \*************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _GlobalCustomColors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GlobalCustomColors */ "./assets/apps/customizer-controls/src/global-custom-colors/GlobalCustomColors.js");



const GlobalColorsComponent = ({
  control
}) => {
  const {
    label,
    defaultValues
  } = control.params;
  const [values, setValues] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({
    ...control.setting.get()
  });
  const save = nextValue => {
    //State
    setValues(nextValue);

    // //Customize
    if (nextValue.flag) {
      delete nextValue.flag;
    } else {
      nextValue.flag = true;
    }
    control.setting.set(nextValue);
  };
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_GlobalCustomColors__WEBPACK_IMPORTED_MODULE_1__["default"], {
    onChange: save,
    currentValue: values,
    label: label,
    defaultValues: defaultValues
  });
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (GlobalColorsComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/global-custom-colors/PaletteColors.js":
/*!***********************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/global-custom-colors/PaletteColors.js ***!
  \***********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ "lodash");
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _EditColorLabel__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./EditColorLabel */ "./assets/apps/customizer-controls/src/global-custom-colors/EditColorLabel.js");
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/plus.js");
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/warning.js");

/* global SolaceReactCustomize */







const PaletteColors = ({
  values,
  save
}) => {
  const CUSTOM_COLOR_LIMIT = Number(SolaceReactCustomize.allowedGlobalCustomColor);
  const [willDelete, setWillDelete] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)('');
  const [willEdit, setWillEdit] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)('');
  const isDeleteModalOpen = willDelete !== '';
  const closeDeleteModal = () => setWillDelete('');
  const slugs = Object.keys(values).filter(slug => slug !== 'flag');
  const limitHit = slugs.length >= CUSTOM_COLOR_LIMIT;
  const addNewColor = () => {
    const nextValues = {
      ...values
    };
    const newId = newColorSlot();
    nextValues[`custom-${newId}`] = {
      label: `Custom ${newId}`,
      val: '#fff'
    };
    save(nextValues);
  };

  // Returns available slot number for new custom color (sorts slugs which starts with "custom-")
  const newColorSlot = () => {
    if (slugs.length === 0) {
      return 1;
    }
    const customSlugs = slugs.filter(slug => {
      return slug.substring(0, 7) === 'custom-';
    });
    const customSlugNumbers = customSlugs.map(slug => {
      return parseInt(slug.substring(7));
    });
    customSlugNumbers.sort((a, b) => {
      return a - b;
    });
    return customSlugNumbers.at(-1) + 1;
  };
  const updateColorInPalette = (colorSlug, label, val) => {
    const nextValues = {
      ...values
    };
    if (nextValues[colorSlug].val === val) {
      return false;
    }
    nextValues[colorSlug].label = label;
    nextValues[colorSlug].val = val;
    save(nextValues);
  };
  const deleteColor = () => {
    if (!willDelete) {
      return;
    }
    const nextValues = {
      ...values
    };
    delete nextValues[willDelete];
    save(nextValues);
    closeDeleteModal();
  };
  const editLabel = (slug, newLabel) => {
    const nextValues = {
      ...values
    };
    if (nextValues[slug].label === newLabel) {
      setWillEdit('');
      return false;
    }
    nextValues[slug].label = newLabel;
    save(nextValues);
    setWillEdit('');
  };
  const editLabelCancel = () => setWillEdit('');
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_4__.Accordion, {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Custom Colors', 'solace')
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "color-array-wrap"
  }, slugs.map(slug => {
    if (slug === 'flag') {
      return null;
    }
    const isEditing = willEdit === slug;
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_4__.ColorControl, {
      disableGlobal: true,
      key: slug,
      label: !isEditing ? values[slug].label : null,
      selectedColor: values[slug].val,
      onChange: (0,lodash__WEBPACK_IMPORTED_MODULE_3__.debounce)(value => {
        updateColorInPalette(slug, values[slug].label, value);
      }, 100)
    }, isEditing && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_EditColorLabel__WEBPACK_IMPORTED_MODULE_5__["default"], {
      currentLabel: values[slug].label,
      slug: slug,
      save: editLabel,
      cancel: editLabelCancel
    }), !isEditing && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "action-icon-wrapper"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Icon, {
      onClick: () => {
        setWillEdit(slug);
      },
      icon: "edit"
    })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "action-icon-wrapper"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Icon, {
      onClick: () => {
        setWillDelete(slug);
      },
      icon: "trash"
    })));
  }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, {
    className: "new-custom-color",
    disabled: limitHit,
    onClick: () => {
      addNewColor();
    },
    variant: "secondary"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.sprintf)(
  // translators: %s: Context which will be added.
  (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Add %s', 'solace'), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Custom Color', 'solace')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Icon, {
    icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_6__["default"]
  })), limitHit && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "cc-limit-notice"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Icon, {
    icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_7__["default"]
  }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.sprintf)(
  // translators: %d: Allowed maximum custom color %s: Context which will be added.
  (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Maximum %1$d %2$s can be added.', 'solace'), CUSTOM_COLOR_LIMIT, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Custom Colors', 'solace').toLocaleLowerCase()))), isDeleteModalOpen && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Modal, {
    onRequestClose: closeDeleteModal,
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.sprintf)(
    // translators: %s: Context which will be deleted.
    (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Are you sure you want to delete the %s?', 'solace'), `"${values[willDelete].label}" ${(0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Color', 'solace')}`)
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('If this color is currently used anywhere on your site, it will be switched to a default color.', 'solace')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ButtonGroup, {
    className: "remove-custom-color-btn-wrapper"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, {
    variant: "primary",
    onClick: deleteColor
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Delete', 'solace')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, {
    variant: "secondary",
    onClick: closeDeleteModal
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Cancel', 'solace')))))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PaletteColors);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/group-select/Control.js":
/*!*********************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/group-select/Control.js ***!
  \*********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   GroupSelectControl: () => (/* binding */ GroupSelectControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _GroupSelectComponent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GroupSelectComponent.js */ "./assets/apps/customizer-controls/src/group-select/GroupSelectComponent.js");

/* jshint esversion: 6 */



const GroupSelectControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_GroupSelectComponent_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/group-select/GroupSelectComponent.js":
/*!**********************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/group-select/GroupSelectComponent.js ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__);



const GroupSelectComponent = ({
  control
}) => {
  const {
    options,
    label,
    disabled,
    description
  } = control.params;
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)((0,_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.maybeParseJson)(control.setting.get()));
  const onChange = nextVal => {
    setValue(nextVal);
    control.setting.set(JSON.stringify(nextVal));
  };
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.GroupSelectControl, {
    label: label,
    multiple: true,
    disabled: disabled,
    value: value,
    description: description,
    onChange: onChange,
    options: options
  });
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (GroupSelectComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/heading/Control.js":
/*!****************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/heading/Control.js ***!
  \****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   HeadingControl: () => (/* binding */ HeadingControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _HeadingComponent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./HeadingComponent.js */ "./assets/apps/customizer-controls/src/heading/HeadingComponent.js");

/* jshint esversion: 6 */



const HeadingControl = wp.customize.Control.extend({
  triggerExpandHeader: function triggerExpandHeader() {
    if (this.container[0].classList.contains('expanded')) {
      return;
    }
    this.container[0].classList.toggle('expanded');
  },
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_HeadingComponent_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/heading/Heading.js":
/*!****************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/heading/Heading.js ***!
  \****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);

const Toggle = ({
  categoryLabel,
  label,
  accordion
}) => {
  const expandHeading = e => {
    e.currentTarget.parentElement.classList.toggle('expanded');
  };
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, categoryLabel && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "customize-control-title"
  }, categoryLabel), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-customizer-heading",
    onClick: expandHeading,
    role: "button",
    tabIndex: "0",
    onKeyPress: expandHeading
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "accordion-heading"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "show-heading",
    "data-heading": label
  })), accordion && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "accordion-expand-button"
  })));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Toggle);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/heading/HeadingComponent.js":
/*!*************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/heading/HeadingComponent.js ***!
  \*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _Heading__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Heading */ "./assets/apps/customizer-controls/src/heading/Heading.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);

/* jshint esversion: 6 */


const HeadingComponent = ({
  control
}) => {
  const {
    label,
    categoryLabel,
    accordion,
    style
  } = control.params;
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Heading__WEBPACK_IMPORTED_MODULE_1__["default"], {
    categoryLabel: categoryLabel,
    label: label,
    accordion: accordion
  }), style && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("style", {
    dangerouslySetInnerHTML: {
      __html: style
    }
  }));
};
HeadingComponent.propTypes = {
  control: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (HeadingComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/inline-select/Control.js":
/*!**********************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/inline-select/Control.js ***!
  \**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   InlineSelectControl: () => (/* binding */ InlineSelectControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _InlineSelectComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./InlineSelectComponent */ "./assets/apps/customizer-controls/src/inline-select/InlineSelectComponent.js");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__);

/* jshint esversion: 6 */



const InlineSelectControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.ControlWithLink, {
      link: this.params.link
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_InlineSelectComponent__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    })), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/inline-select/InlineSelectComponent.js":
/*!************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/inline-select/InlineSelectComponent.js ***!
  \************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__);



const InlineSelectComponent = ({
  control
}) => {
  const {
    label,
    options,
    changesOn
  } = control.params;
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(control.setting());
  const defaultSettings = Object.keys(options).map(key => {
    return {
      value: key,
      label: options[key]
    };
  });
  const [settings, setSettings] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(defaultSettings);
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    if (typeof changesOn !== 'string' || changesOn !== 'solace_global_colors') {
      return;
    }
    window.wp.customize.bind('ready', () => {
      // Update select settings with current global colors
      const currentGlobalColors = window.wp.customize.control(changesOn).setting.get().palettes;
      const newSettings = Object.keys(currentGlobalColors).map(key => {
        return {
          value: key,
          label: currentGlobalColors[key].name
        };
      });
      setSettings(newSettings);
    });

    // Listen on value change and update select settings with current global colors
    wp.customize.bind('change', function (setting) {
      if (setting && setting.id === changesOn) {
        window.wp.customize.previewer.refresh();
      }
    });
    window.wp.customize.control(changesOn, customizeControl => {
      customizeControl.setting.bind('changed', nextValue => {
        const currentGlobalColors = nextValue.palettes;
        const newSettings = Object.keys(currentGlobalColors).map(key => {
          return {
            value: key,
            label: currentGlobalColors[key].name
          };
        });
        if (JSON.stringify(settings) !== JSON.stringify(newSettings)) {
          setSettings(newSettings);
          const currentValue = newSettings.find(item => item.value === value);
          if (currentValue === undefined) {
            updateValue('darkMode');
          }
        }
      });
    });
  }, [settings, value]);
  const updateValue = newValue => {
    setValue(newValue);
    control.setting.set(newValue);
  };
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-white-background-control"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.InlineSelect, {
    value: value,
    onChange: updateValue,
    options: settings,
    label: label
  }));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (InlineSelectComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/link-custom/Control.js":
/*!********************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/link-custom/Control.js ***!
  \********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   LinkCustomControl: () => (/* binding */ LinkCustomControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _LinkCustomComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./LinkCustomComponent */ "./assets/apps/customizer-controls/src/link-custom/LinkCustomComponent.js");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__);

/* jshint esversion: 6 */



const LinkCustomControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.ControlWithLink, {
      link: this.params.link
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_LinkCustomComponent__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    })), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/link-custom/LinkCustomComponent.js":
/*!********************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/link-custom/LinkCustomComponent.js ***!
  \********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);

const LinkCustomComponent = ({
  control
}) => {
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-white-background-control solace-custom-link-control"
  });
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (LinkCustomComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/link/Control.js":
/*!*************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/link/Control.js ***!
  \*************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   LinkControl: () => (/* binding */ LinkControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _Link_tsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Link.tsx */ "./assets/apps/customizer-controls/src/link/Link.tsx");



const LinkControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Link_tsx__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/logo-palette/Control.js":
/*!*********************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/logo-palette/Control.js ***!
  \*********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   LogoPaletteControl: () => (/* binding */ LogoPaletteControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _LogoPaletteComponent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./LogoPaletteComponent.js */ "./assets/apps/customizer-controls/src/logo-palette/LogoPaletteComponent.js");

/* jshint esversion: 6 */



const LogoPaletteControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_LogoPaletteComponent_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/logo-palette/LogoPaletteComponent.js":
/*!**********************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/logo-palette/LogoPaletteComponent.js ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _components_src_Common_MediaLibrary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../components/src/Common/MediaLibrary */ "./assets/apps/components/src/Common/MediaLibrary.js");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/trash.js");
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/plus-circle-filled.js");

/* jshint esversion: 6 */







const LogoPaletteComponent = ({
  control
}) => {
  const controlSetting = (0,_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.maybeParseJson)(control.setting.get());
  const {
    height,
    width,
    flexHeight,
    flexWidth,
    sameLabel,
    builderListen,
    compChange
  } = control.params.input_attrs;
  const [setting, setSetting] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(controlSetting);
  const [light, setLight] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)();
  const [dark, setDark] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)();
  const [isPaletteActive, setIsPaletteActive] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
  const hasValue = (object, value) => {
    return Object.values(object).some(function (val) {
      if (val === value) {
        return true;
      }
      if (val && typeof val === 'object') {
        return hasValue(val, value);
      }
      if (val && Object.prototype.toString.call(val) === '[object Array]') {
        return val.some(obj => {
          return hasValue(obj, value);
        });
      }
      return false;
    });
  };
  const changeOnPalette = (currentHeaderItems, componentChange) => {
    const hasPaletteComp = hasValue(currentHeaderItems, componentChange);
    setSetting((0,_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.maybeParseJson)(control.setting.get()));
    if (!hasPaletteComp) {
      toggleValue(true);
    }
    setIsPaletteActive(hasPaletteComp);
  };
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    if (typeof builderListen !== 'string' || typeof compChange !== 'string' || builderListen === '' || compChange === '') {
      return;
    }
    window.wp.customize.bind('ready', () => {
      const currentHeaderItems = (0,_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.maybeParseJson)(window.wp.customize.control(builderListen).setting.get());
      changeOnPalette(currentHeaderItems, compChange);
    });
    window.wp.customize.control(builderListen, customizeControl => {
      customizeControl.setting.bind('changed', nextValue => {
        const currentHeaderItems = (0,_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.maybeParseJson)(nextValue);
        changeOnPalette(currentHeaderItems, compChange);
      });
    });
  }, [builderListen, compChange]);
  const preloadAttachement = (id, type = 'light') => {
    if (!wp.media.attachment(id).get('url')) {
      wp.media.attachment(id).fetch().then(data => {
        if (type === 'light') {
          setLight(data);
        }
        if (type === 'dark') {
          setDark(data);
        }
      });
    }
  };
  preloadAttachement(setting.light, 'light');
  preloadAttachement(setting.dark, 'dark');
  const updateControlSetting = newSetting => {
    setSetting(newSetting);
    control.setting.set(JSON.stringify(newSetting));
  };
  const updateControlValue = (attachment, type = 'light') => {
    const nextValue = {
      ...setting
    };
    if (type === 'light') {
      setLight(attachment);
      nextValue.light = {
        ...nextValue.light
      };
      nextValue.light = attachment.id;
    }
    if (type === 'dark' || setting.same) {
      setDark(attachment);
      nextValue.dark = {
        ...nextValue.dark
      };
      nextValue.dark = attachment.id;
    }
    updateControlSetting(nextValue);
  };
  const toggleValue = val => {
    const currentSetting = (0,_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.maybeParseJson)(control.setting.get());
    const nextValue = {
      ...currentSetting
    };
    nextValue.same = val;
    updateControlSetting(nextValue);
  };
  const resetAttachment = (type = 'light') => {
    const nextValue = {
      ...setting
    };
    if (type === 'light') {
      nextValue.light = {
        ...nextValue.light
      };
      nextValue.light = 0;
      setLight(null);
    }
    if (type === 'dark') {
      nextValue.dark = {
        ...nextValue.dark
      };
      nextValue.dark = 0;
      setDark(null);
    }
    updateControlSetting(nextValue);
  };
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: `logo-wrap ${light && 'active'}`
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_src_Common_MediaLibrary__WEBPACK_IMPORTED_MODULE_2__["default"], {
    onSelect: data => {
      updateControlValue(data);
    },
    value: setting.light,
    suggestedWidth: width,
    suggestedHeight: height,
    flexWidth: flexWidth,
    flexHeight: flexHeight,
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Change Logo', 'solace'),
    render: ({
      open
    }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: `logo-select ${light && 'active'}`
    }, light && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.Button, {
      className: "remove",
      icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__["default"],
      iconSize: 20,
      onClick: () => {
        resetAttachment('light');
      }
    }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
      className: "logo-select-inner",
      onClick: open
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Select Logo', 'solace'), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("br", null))), light && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
      "aria-hidden": "true",
      alt: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Select Logo', 'solace'),
      src: light.url
    })))
  }), !setting.same && isPaletteActive && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_src_Common_MediaLibrary__WEBPACK_IMPORTED_MODULE_2__["default"], {
    onSelect: data => {
      updateControlValue(data, 'dark');
    },
    value: setting.dark,
    suggestedWidth: width,
    suggestedHeight: height,
    flexWidth: flexWidth,
    flexHeight: flexHeight,
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Change Logo', 'solace'),
    render: ({
      open
    }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "logo-select dark"
    }, dark && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.Button, {
      className: "remove",
      icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__["default"],
      iconSize: 20,
      onClick: () => {
        resetAttachment('dark');
      }
    }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
      className: "logo-select-inner",
      onClick: open
    }, !dark && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.Icon, {
      className: "add-icon",
      icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_6__["default"]
    }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Dark Palette', 'solace'), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("br", null), dark ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Change Logo', 'solace') : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Upload Logo', 'solace'))), dark && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
      "aria-hidden": "true",
      alt: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Dark Palette', 'solace'),
      src: dark.url
    })))
  })), isPaletteActive && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.Toggle, {
    label: sameLabel,
    checked: setting.same,
    onChange: toggleValue
  }));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (LogoPaletteComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/media-image/Control.js":
/*!********************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/media-image/Control.js ***!
  \********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   MediaImageControl: () => (/* binding */ MediaImageControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _MediaImageComponent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./MediaImageComponent.js */ "./assets/apps/customizer-controls/src/media-image/MediaImageComponent.js");

/* jshint esversion: 6 */



const MediaImageControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_MediaImageComponent_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/media-image/MediaImageComponent.js":
/*!********************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/media-image/MediaImageComponent.js ***!
  \********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _solace_wp_components_src_Common_MediaLibrary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @solace-wp/components/src/Common/MediaLibrary */ "./assets/apps/components/src/Common/MediaLibrary.js");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/trash.js");
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/plus-circle-filled.js");

/* jshint esversion: 6 */







const MediaImageComponent = ({
  control
}) => {
  const controlSetting = (0,_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.maybeParseJson)(control.setting.get());
  const {
    height,
    width,
    flexHeight,
    flexWidth,
    sameLabel,
    builderListen,
    compChange
  } = control.params.input_attrs;
  const [setting, setSetting] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(controlSetting);
  const [light, setLight] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)();
  const [dark, setDark] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)();
  const [isPaletteActive, setIsPaletteActive] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
  const hasValue = (object, value) => {
    return Object.values(object).some(function (val) {
      if (val === value) {
        return true;
      }
      if (val && typeof val === 'object') {
        return hasValue(val, value);
      }
      if (val && Object.prototype.toString.call(val) === '[object Array]') {
        return val.some(obj => {
          return hasValue(obj, value);
        });
      }
      return false;
    });
  };
  const changeOnPalette = (currentHeaderItems, componentChange) => {
    const hasPaletteComp = hasValue(currentHeaderItems, componentChange);
    setSetting((0,_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.maybeParseJson)(control.setting.get()));
    if (!hasPaletteComp) {
      toggleValue(true);
    }
    setIsPaletteActive(hasPaletteComp);
  };
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    if (typeof builderListen !== 'string' || typeof compChange !== 'string' || builderListen === '' || compChange === '') {
      return;
    }
    window.wp.customize.bind('ready', () => {
      const currentHeaderItems = (0,_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.maybeParseJson)(window.wp.customize.control(builderListen).setting.get());
      changeOnPalette(currentHeaderItems, compChange);
    });
    window.wp.customize.control(builderListen, customizeControl => {
      customizeControl.setting.bind('changed', nextValue => {
        const currentHeaderItems = (0,_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.maybeParseJson)(nextValue);
        changeOnPalette(currentHeaderItems, compChange);
      });
    });
  }, [builderListen, compChange]);
  const preloadAttachement = (id, type = 'light') => {
    if (!wp.media.attachment(id).get('url')) {
      wp.media.attachment(id).fetch().then(data => {
        if (type === 'light') {
          setLight(data);
        }
        if (type === 'dark') {
          setDark(data);
        }
      });
    }
  };
  preloadAttachement(setting.light, 'light');
  preloadAttachement(setting.dark, 'dark');
  const updateControlSetting = newSetting => {
    setSetting(newSetting);
    control.setting.set(JSON.stringify(newSetting));
  };
  const updateControlValue = (attachment, type = 'light') => {
    const nextValue = {
      ...setting
    };
    if (type === 'light') {
      setLight(attachment);
      nextValue.light = {
        ...nextValue.light
      };
      nextValue.light = attachment.id;
    }
    if (type === 'dark' || setting.same) {
      setDark(attachment);
      nextValue.dark = {
        ...nextValue.dark
      };
      nextValue.dark = attachment.id;
    }
    updateControlSetting(nextValue);
  };
  const toggleValue = val => {
    const currentSetting = (0,_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.maybeParseJson)(control.setting.get());
    const nextValue = {
      ...currentSetting
    };
    nextValue.same = val;
    updateControlSetting(nextValue);
  };
  const resetAttachment = (type = 'light') => {
    const nextValue = {
      ...setting
    };
    if (type === 'light') {
      nextValue.light = {
        ...nextValue.light
      };
      nextValue.light = 0;
      setLight(null);
    }
    if (type === 'dark') {
      nextValue.dark = {
        ...nextValue.dark
      };
      nextValue.dark = 0;
      setDark(null);
    }
    updateControlSetting(nextValue);
  };
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: `media-wrap ${light && 'active'}`
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components_src_Common_MediaLibrary__WEBPACK_IMPORTED_MODULE_2__["default"], {
    onSelect: data => {
      updateControlValue(data);
    },
    value: setting.light,
    suggestedWidth: width,
    suggestedHeight: height,
    flexWidth: flexWidth,
    flexHeight: flexHeight,
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Change Media', 'solace'),
    render: ({
      open
    }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: `media-select ${light && 'active'}`
    }, light && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.Button, {
      className: "remove",
      icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__["default"],
      iconSize: 20,
      onClick: () => {
        resetAttachment('light');
      }
    }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
      className: "media-select-inner",
      onClick: open
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Select Image', 'solace'), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("br", null))), light && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
      "aria-hidden": "true",
      alt: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Select Media', 'solace'),
      src: light.url
    })))
  }), !setting.same && isPaletteActive && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components_src_Common_MediaLibrary__WEBPACK_IMPORTED_MODULE_2__["default"], {
    onSelect: data => {
      updateControlValue(data, 'dark');
    },
    value: setting.dark,
    suggestedWidth: width,
    suggestedHeight: height,
    flexWidth: flexWidth,
    flexHeight: flexHeight,
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Change Media', 'solace'),
    render: ({
      open
    }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "media-select dark"
    }, dark && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.Button, {
      className: "remove",
      icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__["default"],
      iconSize: 20,
      onClick: () => {
        resetAttachment('dark');
      }
    }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
      className: "media-select-inner",
      onClick: open
    }, !dark && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.Icon, {
      className: "add-icon",
      icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_6__["default"]
    }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Dark Palette', 'solace'), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("br", null), dark ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Change Media', 'solace') : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Upload Media', 'solace'))), dark && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
      "aria-hidden": "true",
      alt: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Dark Palette', 'solace'),
      src: dark.url
    })))
  })), isPaletteActive && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.Toggle, {
    label: sameLabel,
    checked: setting.same,
    onChange: toggleValue
  }));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (MediaImageComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/multiselect/Control.js":
/*!********************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/multiselect/Control.js ***!
  \********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   MultiSelectControl: () => (/* binding */ MultiSelectControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _MultiSelectComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./MultiSelectComponent */ "./assets/apps/customizer-controls/src/multiselect/MultiSelectComponent.js");



const MultiSelectControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_MultiSelectComponent__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/multiselect/MultiSelectComponent.js":
/*!*********************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/multiselect/MultiSelectComponent.js ***!
  \*********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__);



const MultiSelectComponent = ({
  control
}) => {
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(control.setting.get());
  const {
    choices,
    label
  } = control.params;
  const updateValues = nextVal => {
    setValue(nextVal);
    control.setting.set(nextVal);
  };
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.MultiSelect, {
    label: label,
    choices: choices,
    onChange: updateValues,
    currentValue: value
  });
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (MultiSelectComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/new-ordering/Control.js":
/*!*********************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/new-ordering/Control.js ***!
  \*********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   NewOrderingControl: () => (/* binding */ NewOrderingControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _OrderingComponent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./OrderingComponent.js */ "./assets/apps/customizer-controls/src/new-ordering/OrderingComponent.js");

/* jshint esversion: 6 */



const NewOrderingControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_OrderingComponent_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/new-ordering/OrderingComponent.js":
/*!*******************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/new-ordering/OrderingComponent.js ***!
  \*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);

/* jshint esversion: 6 */




const Ordering = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.lazy)(() => __webpack_require__.e(/*! import() | order */ "order").then(__webpack_require__.bind(__webpack_require__, /*! ./Ordering */ "./assets/apps/customizer-controls/src/new-ordering/Ordering.js")));

const OrderingComponent = ({
  control
}) => {
  const {
    section,
    components,
    label
  } = control.params;
  const controlID = control.id;
  const normalizeValue = val => {
    const enabledItems = val.map(element => {
      return {
        id: element,
        visible: true
      };
    });
    return enabledItems;
  };
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(normalizeValue((0,_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.maybeParseJson)(control.setting.get())));
  const [isVisible, setVisible] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
  const updateValue = newVal => {
    const dbValue = newVal.filter(el => el.visible === true).map(el => el.id);
    setValue(newVal);
    control.setting.set(JSON.stringify(dbValue));
  };
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    window.wp.customize.bind('ready', () => {
      window.wp.customize.state('expandedSection').bind(expandedSection => {
        if (!expandedSection) {
          return;
        }
        if (!expandedSection.id) {
          return;
        }
        if (expandedSection.id === section) {
          setVisible(true);
        }
      });
    });
  }, []);
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    const regex = /solace_layout_single_(.+)_elements_order/m;
    const matches = regex.exec(control.id);
    if (matches === null) {
      return;
    }
    window.wp.customize.control('solace_' + matches[1] + '_header_layout', customizeControl => {
      customizeControl.setting.bind(nextVal => {
        let newVal = (0,_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.maybeParseJson)(control.setting.get());
        let titleMetaIndex, thumbnailIndex;
        switch (nextVal) {
          case 'cover':
            titleMetaIndex = newVal.indexOf('title-meta');
            if (titleMetaIndex !== -1) {
              newVal.splice(titleMetaIndex, 1);
            }
            thumbnailIndex = newVal.indexOf('thumbnail');
            if (thumbnailIndex !== -1) {
              newVal.splice(thumbnailIndex, 1);
            }
            delete components['title-meta'];
            delete components.thumbnail;
            break;
          case 'normal':
            if (!components['title-meta']) {
              components['title-meta'] = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Title & Meta', 'solace');
            }
            if (!components.thumbnail) {
              components.thumbnail = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Thumbnail', 'solace');
            }
            thumbnailIndex = newVal.indexOf('thumbnail');
            if (thumbnailIndex === -1) {
              newVal = ['thumbnail'].concat(newVal);
            }
            titleMetaIndex = newVal.indexOf('title-meta');
            if (titleMetaIndex === -1) {
              newVal = ['title-meta'].concat(newVal);
            }
            break;
        }
        updateValue(normalizeValue(newVal));
      });
    });
  }, []);
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-white-background-control solace-ordering-custom"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Suspense, {
    fallback: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Spinner, null)
  }, isVisible && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Ordering, {
    label: label,
    value: value,
    components: components,
    controlID: controlID,
    onUpdate: updateValue
  })));
};
OrderingComponent.propTypes = {
  control: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (OrderingComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/non-responsive-spacing/Control.js":
/*!*******************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/non-responsive-spacing/Control.js ***!
  \*******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   NRSpacingControl: () => (/* binding */ NRSpacingControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _NRSpacingComponent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./NRSpacingComponent.js */ "./assets/apps/customizer-controls/src/non-responsive-spacing/NRSpacingComponent.js");

/* jshint esversion: 6 */



const NRSpacingControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_NRSpacingComponent_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/non-responsive-spacing/NRSpacingComponent.js":
/*!******************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/non-responsive-spacing/NRSpacingComponent.js ***!
  \******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_4__);

/* jshint esversion: 6 */






const NRSpacingComponent = ({
  control
}) => {
  const {
    params = {},
    setting
  } = control;
  const controlParams = {
    min: 0,
    max: 300,
    units: ['px', 'em', 'rem', '%'],
    label: false,
    defaultVal: {
      top: 0,
      right: 0,
      bottom: 0,
      left: 0,
      unit: 'px'
    },
    ...params
  };
  const {
    min,
    max,
    units,
    label,
    defaultVal
  } = controlParams;
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({
    ...defaultVal,
    ...setting.get()
  });
  const {
    top,
    right,
    bottom,
    left,
    unit
  } = value;

  // Used for outside value changes.
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    document.addEventListener('solace-changed-customizer-value', e => {
      if (!e.detail) return false;
      if (e.detail.id !== control.id) return false;
      const nextVal = e.detail.value || defaultVal;
      handleUpdate(nextVal);
    });
  }, []);
  const options = [{
    type: 'top',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Top', 'solace'),
    value: top
  }, {
    type: 'right',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Right', 'solace'),
    value: right
  }, {
    type: 'bottom',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Bottom', 'solace'),
    value: bottom
  }, {
    type: 'left',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Left', 'solace'),
    value: left
  }];
  const handleReset = () => {
    handleUpdate(defaultVal);
  };
  const handleUpdate = nextValue => {
    setValue(nextValue);
    setting.set(nextValue);
  };
  const updateNumericValue = val => {
    handleUpdate({
      ...val,
      unit
    });
  };
  const isRelativeUnit = unitType => ['em', 'rem'].includes(unitType);
  const handleUnitChange = unitType => {
    const nextValue = {
      ...value
    };
    nextValue.unit = unitType;
    if (!isRelativeUnit(unitType)) {
      nextValue.top = parseInt(nextValue.top);
      nextValue.right = parseInt(nextValue.right);
      nextValue.bottom = parseInt(value.bottom);
      nextValue.left = parseInt(value.left);
    }
    handleUpdate(nextValue);
  };
  const Units = () => {
    if (units.length === 1) {
      return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
        isSmall: true,
        disabled: true,
        className: "active alone"
      }, units[0]);
    }
    return units.map((unitType, index) => {
      const buttonClass = classnames__WEBPACK_IMPORTED_MODULE_1___default()({
        active: unit === unitType
      });
      return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
        key: index,
        isSmall: true,
        className: buttonClass,
        onClick: () => handleUnitChange(unitType)
      }, unitType);
    });
  };
  const wrapClasses = classnames__WEBPACK_IMPORTED_MODULE_1___default()(['solace-white-background-control', 'solace-sizing']);
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: wrapClasses
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-control-header"
  }, label && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "customize-control-title"
  }, label), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-units"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Units, null))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_4__.SizingControl, {
    min: min,
    max: max,
    step: isRelativeUnit(unit) ? 0.1 : 1,
    options: options,
    defaults: defaultVal,
    onChange: updateNumericValue,
    value: value,
    onReset: handleReset
  }));
};
NRSpacingComponent.propTypes = {
  control: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (NRSpacingComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/ordering/Control.js":
/*!*****************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/ordering/Control.js ***!
  \*****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   OrderingControl: () => (/* binding */ OrderingControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _OrderingComponent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./OrderingComponent.js */ "./assets/apps/customizer-controls/src/ordering/OrderingComponent.js");

/* jshint esversion: 6 */



const OrderingControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_OrderingComponent_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/ordering/OrderingComponent.js":
/*!***************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/ordering/OrderingComponent.js ***!
  \***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);

/* jshint esversion: 6 */




const Ordering = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.lazy)(() => __webpack_require__.e(/*! import() | order */ "order").then(__webpack_require__.bind(__webpack_require__, /*! ./Ordering */ "./assets/apps/customizer-controls/src/ordering/Ordering.js")));

const OrderingComponent = ({
  control
}) => {
  const {
    section,
    components,
    label
  } = control.params;
  const normalizeValue = val => {
    const enabledItems = val.map(element => {
      return {
        id: element,
        visible: true
      };
    });
    const disabledItems = Object.keys(components).filter(componentSlug => !val.includes(componentSlug)).map(id => ({
      id,
      visible: false
    }));
    return [...enabledItems, ...disabledItems];
  };
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(normalizeValue((0,_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.maybeParseJson)(control.setting.get())));
  const [isVisible, setVisible] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
  const updateValue = newVal => {
    const dbValue = newVal.filter(el => el.visible === true).map(el => el.id);
    setValue(newVal);
    control.setting.set(JSON.stringify(dbValue));
  };
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    window.wp.customize.bind('ready', () => {
      window.wp.customize.state('expandedSection').bind(expandedSection => {
        if (!expandedSection) {
          return;
        }
        if (!expandedSection.id) {
          return;
        }
        if (expandedSection.id === section) {
          setVisible(true);
        }
      });
    });
  }, []);
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    const regex = /solace_layout_single_(.+)_elements_order/m;
    const matches = regex.exec(control.id);
    if (matches === null) {
      return;
    }
    window.wp.customize.control('solace_' + matches[1] + '_header_layout', customizeControl => {
      customizeControl.setting.bind(nextVal => {
        let newVal = (0,_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.maybeParseJson)(control.setting.get());
        let titleMetaIndex, thumbnailIndex;
        switch (nextVal) {
          case 'cover':
            titleMetaIndex = newVal.indexOf('title-meta');
            if (titleMetaIndex !== -1) {
              newVal.splice(titleMetaIndex, 1);
            }
            thumbnailIndex = newVal.indexOf('thumbnail');
            if (thumbnailIndex !== -1) {
              newVal.splice(thumbnailIndex, 1);
            }
            delete components['title-meta'];
            delete components.thumbnail;
            break;
          case 'normal':
            if (!components['title-meta']) {
              components['title-meta'] = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Title & Meta', 'solace');
            }
            if (!components.thumbnail) {
              components.thumbnail = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Thumbnail', 'solace');
            }
            thumbnailIndex = newVal.indexOf('thumbnail');
            if (thumbnailIndex === -1) {
              newVal = ['thumbnail'].concat(newVal);
            }
            titleMetaIndex = newVal.indexOf('title-meta');
            if (titleMetaIndex === -1) {
              newVal = ['title-meta'].concat(newVal);
            }
            break;
        }
        updateValue(normalizeValue(newVal));
      });
    });
  }, []);
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-white-background-control"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Suspense, {
    fallback: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Spinner, null)
  }, isVisible && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Ordering, {
    label: label,
    value: value,
    components: components,
    onUpdate: updateValue
  })));
};
OrderingComponent.propTypes = {
  control: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (OrderingComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/popup-additional-info/Control.js":
/*!******************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/popup-additional-info/Control.js ***!
  \******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   PopupAdditionalInfoControl: () => (/* binding */ PopupAdditionalInfoControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _PopupAdditionalInfoComponent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PopupAdditionalInfoComponent.js */ "./assets/apps/customizer-controls/src/popup-additional-info/PopupAdditionalInfoComponent.js");

/* jshint esversion: 6 */


const PopupAdditionalInfoControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_PopupAdditionalInfoComponent_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/popup-additional-info/PopupAdditionalInfo.js":
/*!******************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/popup-additional-info/PopupAdditionalInfo.js ***!
  \******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react_sortablejs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-sortablejs */ "./node_modules/react-sortablejs/dist/index.js");
/* harmony import */ var react_sortablejs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_sortablejs__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_5__);

/* global SolaceReactCustomize */









const PopupAdditionalInfo = ({
  label,
  value,
  onChange,
  control,
  onUpdate
}) => {
  const [inputValue, setInputValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)('');
  const [currentDevice, setCurrentDevice] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)('desktop');
  const [visible, setVisible] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
  const [popoverCoords, setPopoverCoords] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({
    top: 0,
    left: 0
  });
  const popoverRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
  let getSetting = control.setting.get();
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    const handleGetPopupClick = e => {
      const controlID = control.id;
      const baseIds = ['svg', 'g', 'path1', 'path2'];
      const ids = [controlID, ...baseIds.map(prefix => `${prefix}-${controlID}`)];
      if (ids.includes(e.target.id)) {
        const rect = e.target.getBoundingClientRect();
        if (rect.y > 300) {
          setPopoverCoords({
            top: rect.bottom - 25,
            left: rect.left + 50,
            y: 300
          });
        } else {
          setPopoverCoords({
            top: rect.bottom - 25,
            left: rect.left + 50,
            y: rect.y
          });
        }
        setVisible(true);
      }
    };
    document.addEventListener('click', handleGetPopupClick);
    return () => {
      document.removeEventListener('click', handleGetPopupClick);
    };
  });
  const normalizeValue = val => {
    const enabledItems = val.map(element => {
      return {
        id: element,
        visible: true
      };
    });
    return enabledItems;
  };
  let [valueState, setValueState] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(normalizeValue((0,_solace_wp_components__WEBPACK_IMPORTED_MODULE_5__.maybeParseJson)(getSetting.ordering)));
  valueState = valueState.map(item => {
    // Check if item.id is an object and has its own properties
    if (item.id && typeof item.id === 'object') {
      return {
        ...item.id,
        // Spread the properties of the id object into the parent object
        visible: item.visible // Retain the visible property from the parent object
      };
    }
    return item; // If item.id is not an object, return the item without changes
  });
  const handleToggle = item => {
    const newValue = getSetting.ordering.map(e => {
      if (e.id === item) {
        if (e.id.endsWith('-solhide')) {
          e.id = e.id.replace('-solhide', '');
        } else {
          e.id = e.id + '-solhide';
        }
      }
      return e;
    });

    // Fix issue focus.
    const popoverElement = document.querySelector('.solace-popup-additional-info-control .solace-input-title input.components-input-control__input');
    if (popoverElement) {
      popoverElement.focus();
    }
    handleChange(normalizeValue((0,_solace_wp_components__WEBPACK_IMPORTED_MODULE_5__.maybeParseJson)(newValue)));
  };
  const handleRemove = item => {
    // Remove data.
    const newValue = getSetting.ordering.filter(e => e.id !== item);

    // Fix issue focus.
    const popoverElement = document.querySelector('.solace-popup-additional-info-control .solace-input-title input.components-input-control__input');
    if (popoverElement) {
      popoverElement.focus();
    }
    handleChange(normalizeValue((0,_solace_wp_components__WEBPACK_IMPORTED_MODULE_5__.maybeParseJson)(newValue)));
  };
  const handleChange = newVal => {
    // Transform the ordering array to move 'id' properties to the root
    const transformedOrdering = newVal.map(item => {
      if (item.id && typeof item.id === 'object') {
        return {
          ...item.id,
          // Spread the properties of item.id into the parent object
          visible: item.visible // Keep the 'visible' property from the parent object
        };
      }
      return item; // If item.id is not an object, return the item without changes
    });

    // Create a new updateValue object with transformed ordering
    let updateValue = {
      ...getSetting,
      ordering: transformedOrdering // Use the transformed ordering array
    };
    setValueState(transformedOrdering); // Update value state with the transformed ordering

    control.setting.set(updateValue); // Update the control setting with the new value

    wp.customize.previewer.refresh(); // Refresh the previewer
  };
  const renderTitle = () => {
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-white-background-control solace-input-title solace-range-control"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-control-header"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: "customize-control-title"
    }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Title', 'solace'))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "box-input"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.__experimentalInputControl, {
      value: value.title,
      onChange: nextValue => {
        wp.customize.previewer.refresh();
        const newVal = nextValue;
        onChange({
          title: newVal
        });
      }
    })));
  };
  const renderNewItem = () => {
    /**
     * Handles the add new item button click event.
     *
     * @param {Object} e - The event object.
     * @param {string} e.preventDefault - Prevents the default action of the event.
     *
     * @returns {void}
     */
    const handleAddNewItem = () => {
      const newValue = [...getSetting.ordering];
      newValue.push({
        id: inputValue,
        visible: true,
        chosen: false,
        selected: false
      });

      // Fix issue focus.
      const popoverElement = document.querySelector('.solace-popup-additional-info-control .solace-input-title input.components-input-control__input');
      if (popoverElement) {
        popoverElement.focus();
      }
      handleChange(normalizeValue((0,_solace_wp_components__WEBPACK_IMPORTED_MODULE_5__.maybeParseJson)(newValue)));
    };
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-white-background-control solace-input-new-item solace-range-control"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "box-input"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.__experimentalInputControl, {
      onChange: val => {
        setInputValue(val);
      }
    }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: "add-new-item",
      onClick: handleAddNewItem
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
      width: "13",
      height: "13",
      viewBox: "0 0 13 13",
      fill: "none",
      xmlns: "http://www.w3.org/2000/svg"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
      "fill-rule": "evenodd",
      "clip-rule": "evenodd",
      d: "M7.42162 7.42164V12.7122L5.33424 12.7122L5.33424 7.42164L0.0436672 7.42164L0.0436671 5.33426L5.33424 5.33426L5.33353 0.0443969L7.42162 0.0436896L7.42233 5.33356L12.7122 5.33426L12.7122 7.42164L7.42162 7.42164Z",
      fill: "#FF8400"
    })))));
  };
  const renderOrdering = () => {
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(react_sortablejs__WEBPACK_IMPORTED_MODULE_1__.ReactSortable, {
      className: "items-list",
      list: valueState,
      setList: handleChange,
      animation: 300,
      handle: ".handle"
    }, valueState.map(item => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      key: item.id,
      className: classnames__WEBPACK_IMPORTED_MODULE_2___default()({
        'solace-sortable-item': true,
        disabled: item.id.includes('solhide'),
        visible: !item.id.includes('solhide')
      })
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "left"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: "button handle",
      onClick: e => {
        e.preventDefault();
        e.stopPropagation();
      }
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
      width: "15",
      height: "15",
      viewBox: "0 0 15 15",
      fill: "none",
      xmlns: "http://www.w3.org/2000/svg"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
      d: "M12.6024 6.83408L11.8344 6.06108C11.7668 5.99835 11.7125 5.92265 11.6749 5.83848C11.6372 5.75432 11.6169 5.66343 11.6152 5.57125C11.6135 5.47906 11.6303 5.38748 11.6648 5.30196C11.6993 5.21644 11.7506 5.13874 11.8158 5.07351C11.8809 5.00828 11.9586 4.95686 12.044 4.92231C12.1295 4.88776 12.2211 4.8708 12.3133 4.87244C12.4055 4.87408 12.4964 4.89429 12.5806 4.93186C12.6648 4.96942 12.7406 5.02358 12.8034 5.09108L14.7424 7.03108C14.8706 7.15969 14.9427 7.33393 14.9427 7.51558C14.9427 7.69724 14.8706 7.87148 14.7424 8.00008L12.8034 9.93908C12.7397 10.0027 12.6642 10.0532 12.5811 10.0876C12.4979 10.122 12.4088 10.1398 12.3189 10.1398C12.2289 10.1398 12.1398 10.122 12.0566 10.0876C11.9735 10.0532 11.898 10.0027 11.8344 9.93908C11.7707 9.87546 11.7203 9.79992 11.6858 9.71679C11.6514 9.63366 11.6337 9.54456 11.6337 9.45458C11.6337 9.3646 11.6514 9.27551 11.6858 9.19238C11.7203 9.10924 11.7707 9.03371 11.8344 8.97008L12.6024 8.20208H8.15635V12.6511L8.92435 11.8831C8.98798 11.8195 9.06351 11.769 9.14664 11.7346C9.22977 11.7001 9.31887 11.6824 9.40885 11.6824C9.49883 11.6824 9.58793 11.7001 9.67106 11.7346C9.75419 11.769 9.82973 11.8195 9.89335 11.8831C9.95698 11.9467 10.0074 12.0222 10.0419 12.1054C10.0763 12.1885 10.094 12.2776 10.094 12.3676C10.094 12.4576 10.0763 12.5467 10.0419 12.6298C10.0074 12.7129 9.95698 12.7885 9.89335 12.8521L7.95535 14.7921C7.82675 14.9204 7.65251 14.9924 7.47085 14.9924C7.28919 14.9924 7.11495 14.9204 6.98635 14.7921L5.04635 12.8521C4.98273 12.7885 4.93225 12.7129 4.89782 12.6298C4.86339 12.5467 4.84566 12.4576 4.84566 12.3676C4.84566 12.2776 4.86339 12.1885 4.89782 12.1054C4.93225 12.0222 4.98272 11.9467 5.04635 11.8831C5.10998 11.8195 5.18551 11.769 5.26864 11.7346C5.35177 11.7001 5.44087 11.6824 5.53085 11.6824C5.62083 11.6824 5.70993 11.7001 5.79306 11.7346C5.87619 11.769 5.95173 11.8195 6.01535 11.8831L6.78435 12.6511V8.20508H2.33935L3.10835 8.97308C3.23685 9.10158 3.30904 9.27586 3.30904 9.45758C3.30904 9.63931 3.23685 9.81359 3.10835 9.94208C2.97985 10.0706 2.80557 10.1428 2.62385 10.1428C2.44213 10.1428 2.26785 10.0706 2.13935 9.94208L0.20035 8.00408C0.0720517 7.87548 0 7.70124 0 7.51958C0 7.33793 0.0720517 7.16369 0.20035 7.03508L2.14035 5.09508C2.20315 5.02758 2.27891 4.97342 2.36312 4.93586C2.44732 4.89829 2.53823 4.87808 2.63041 4.87644C2.7226 4.8748 2.81417 4.89176 2.89965 4.92631C2.98514 4.96086 3.06278 5.01228 3.12794 5.07751C3.19311 5.14274 3.24445 5.22044 3.27891 5.30595C3.31337 5.39147 3.33023 5.48306 3.3285 5.57525C3.32676 5.66743 3.30646 5.75832 3.26881 5.84248C3.23115 5.92665 3.17692 6.00235 3.10935 6.06508L2.34035 6.83308H6.78635V2.38908L6.01635 3.16108C5.95272 3.22471 5.87719 3.27518 5.79406 3.30961C5.71093 3.34405 5.62183 3.36177 5.53185 3.36177C5.44187 3.36177 5.35277 3.34405 5.26964 3.30961C5.18651 3.27518 5.11098 3.22471 5.04735 3.16108C4.98373 3.09746 4.93325 3.02192 4.89882 2.93879C4.86439 2.85566 4.84666 2.76656 4.84666 2.67658C4.84666 2.5866 4.86439 2.49751 4.89882 2.41438C4.93325 2.33124 4.98373 2.25571 5.04735 2.19208L6.98735 0.253085C7.11595 0.124786 7.29019 0.0527344 7.47185 0.0527344C7.65351 0.0527344 7.82775 0.124786 7.95635 0.253085L9.89535 2.19308C9.96428 2.25532 10.0198 2.33092 10.0586 2.41529C10.0975 2.49966 10.1187 2.59104 10.1211 2.68388C10.1235 2.77671 10.107 2.86907 10.0726 2.95533C10.0382 3.04159 9.98658 3.11995 9.92094 3.18565C9.85531 3.25135 9.777 3.30302 9.69078 3.33752C9.60455 3.37202 9.51222 3.38862 9.41938 3.38632C9.32654 3.38403 9.23513 3.36287 9.15072 3.32415C9.06631 3.28543 8.99065 3.22995 8.92835 3.16108L8.16035 2.39308V6.83408H12.6063H12.6024Z",
      fill: "white"
    }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: "label"
    }, item.id.replace(/solhide/g, '').replace(/-/g, ' '))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "right"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.Tooltip, {
      text: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Toggle Visibility', 'solace')
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
      "aria-label": (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Toggle Visibility', 'solace'),
      className: "toggle",
      onClick: e => {
        e.preventDefault();
        e.stopPropagation();
        handleToggle(item.id);
      }
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
      width: "19",
      height: "19",
      viewBox: "0 0 19 19",
      xmlns: "http://www.w3.org/2000/svg"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("g", {
      clipPath: "url(#clip0_2561_341)"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
      d: "M9.5 3.83789C5.86985 3.83789 2.57784 5.82398 0.148665 9.04992C-0.0495551 9.31421 -0.0495551 9.68345 0.148665 9.94774C2.57784 13.1776 5.86985 15.1637 9.5 15.1637C13.1302 15.1637 16.4222 13.1776 18.8513 9.95163C19.0496 9.68733 19.0496 9.3181 18.8513 9.05381C16.4222 5.82398 13.1302 3.83789 9.5 3.83789ZM9.76041 13.4885C7.35067 13.6401 5.36069 11.654 5.51227 9.24037C5.63665 7.25039 7.24962 5.63742 9.23959 5.51305C11.6493 5.36147 13.6393 7.34756 13.4877 9.76118C13.3595 11.7473 11.7465 13.3602 9.76041 13.4885ZM9.63992 11.6462C8.34177 11.7278 7.26905 10.659 7.35456 9.36085C7.42063 8.28813 8.29124 7.4214 9.36397 7.35144C10.6621 7.26982 11.7348 8.33866 11.6493 9.63681C11.5794 10.7134 10.7088 11.5801 9.63992 11.6462Z"
    })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("clipPath", {
      id: "clip0_2561_341"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
      width: "19",
      height: "19",
      fill: "white"
    })))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.Tooltip, {
      text: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Remove', 'solace')
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
      "aria-label": (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Remove', 'solace'),
      className: "remove",
      onClick: e => {
        e.preventDefault();
        e.stopPropagation();
        handleRemove(item.id);
      }
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
      width: "18",
      height: "18",
      viewBox: "0 0 18 18",
      fill: "none",
      xmlns: "http://www.w3.org/2000/svg"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
      d: "M3.75 5.25C3.94891 5.25 4.13968 5.32902 4.28033 5.46967C4.42098 5.61032 4.5 5.80109 4.5 6V14.3933C4.52151 14.7725 4.69202 15.1279 4.97438 15.382C5.25674 15.6362 5.62807 15.7684 6.0075 15.75H11.9925C12.3719 15.7684 12.7433 15.6362 13.0256 15.382C13.308 15.1279 13.4785 14.7725 13.5 14.3933V6C13.5 5.80109 13.579 5.61032 13.7197 5.46967C13.8603 5.32902 14.0511 5.25 14.25 5.25C14.4489 5.25 14.6397 5.32902 14.7803 5.46967C14.921 5.61032 15 5.80109 15 6V14.3933C14.9786 15.1704 14.6501 15.9074 14.0864 16.4429C13.5227 16.9783 12.7697 17.2686 11.9925 17.25H6.0075C5.23025 17.2686 4.47733 16.9783 3.91364 16.4429C3.34994 15.9074 3.02141 15.1704 3 14.3933V6C3 5.80109 3.07902 5.61032 3.21967 5.46967C3.36032 5.32902 3.55109 5.25 3.75 5.25Z",
      fill: "#FF9400"
    }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
      d: "M3 3H6V1.5C6 1.30109 6.07902 1.11032 6.21967 0.96967C6.36032 0.829018 6.55109 0.75 6.75 0.75H11.25C11.4489 0.75 11.6397 0.829018 11.7803 0.96967C11.921 1.11032 12 1.30109 12 1.5V3H15C15.1989 3 15.3897 3.07902 15.5303 3.21967C15.671 3.36032 15.75 3.55109 15.75 3.75C15.75 3.94891 15.671 4.13968 15.5303 4.28033C15.3897 4.42098 15.1989 4.5 15 4.5H3C2.80109 4.5 2.61032 4.42098 2.46967 4.28033C2.32902 4.13968 2.25 3.94891 2.25 3.75C2.25 3.55109 2.32902 3.36032 2.46967 3.21967C2.61032 3.07902 2.80109 3 3 3ZM10.5 3V2.25H7.5V3H10.5Z",
      fill: "#FF9400"
    }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
      d: "M9.75 12.75V7.5C9.75 7.30109 9.82902 7.11032 9.96967 6.96967C10.1103 6.82902 10.3011 6.75 10.5 6.75C10.6989 6.75 10.8897 6.82902 11.0303 6.96967C11.171 7.11032 11.25 7.30109 11.25 7.5V12.75C11.25 12.9489 11.171 13.1397 11.0303 13.2803C10.8897 13.421 10.6989 13.5 10.5 13.5C10.3011 13.5 10.1103 13.421 9.96967 13.2803C9.82902 13.1397 9.75 12.9489 9.75 12.75Z",
      fill: "#FF9400"
    }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
      d: "M6.75 12.75V7.5C6.75 7.30109 6.82902 7.11032 6.96967 6.96967C7.11032 6.82902 7.30109 6.75 7.5 6.75C7.69891 6.75 7.88968 6.82902 8.03033 6.96967C8.17098 7.11032 8.25 7.30109 8.25 7.5V12.75C8.25 12.9489 8.17098 13.1397 8.03033 13.2803C7.88968 13.421 7.69891 13.5 7.5 13.5C7.30109 13.5 7.11032 13.421 6.96967 13.2803C6.82902 13.1397 6.75 12.9489 6.75 12.75Z",
      fill: "#FF9400"
    }))))))))));
  };
  const renderBottomSpacing = () => {
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-white-background-control solace-range-control"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-control-header"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: "customize-control-title"
    }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Bottom Spacing', 'solace')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_5__.ResponsiveControl, {
      hideResponsive: true
    })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "range-wrap"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.RangeControl, {
      value: value.bottomSpacing[currentDevice],
      min: 1,
      max: 250,
      step: 1,
      onChange: val => {
        const nextVal = value.bottomSpacing;
        nextVal[currentDevice] = val;
        onChange({
          value: nextVal
        });
        wp.customize.previewer.refresh();
      }
    })));
  };
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, visible && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.Popover, {
    className: "popover-popup-additional-info solace-remove-style-popover-transform",
    onFocusOutside: () => {
      setVisible(false);
    },
    ref: popoverRef,
    style: {
      position: 'absolute',
      top: popoverCoords.top,
      left: popoverCoords.left
    }
  }, label && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "customize-control-title"
  }, label), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-popup-additional-info-control solace-white-background-control",
    style: {
      position: 'absolute',
      left: popoverCoords.left - 10,
      top: popoverCoords.y - 15,
      backgroundColor: 'var(--sol-customizer-panel-bg-color)',
      color: '#fff',
      border: '1px solid var(--sol-customizer-line-color)',
      borderRadius: '10px'
    }
  }, renderTitle(), renderNewItem(), renderOrdering(), renderBottomSpacing())));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PopupAdditionalInfo);
const responsiveShape = {
  mobile: prop_types__WEBPACK_IMPORTED_MODULE_6___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_6___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_6___default().number)]),
  tablet: prop_types__WEBPACK_IMPORTED_MODULE_6___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_6___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_6___default().number)]),
  desktop: prop_types__WEBPACK_IMPORTED_MODULE_6___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_6___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_6___default().number)])
};
PopupAdditionalInfo.propTypes = {
  label: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().string),
  value: prop_types__WEBPACK_IMPORTED_MODULE_6___default().shape({
    title: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().string),
    ordering: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().any),
    bottomSpacing: prop_types__WEBPACK_IMPORTED_MODULE_6___default().shape({
      suffix: prop_types__WEBPACK_IMPORTED_MODULE_6___default().shape(responsiveShape),
      ...responsiveShape
    })
  }),
  onChange: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().func).isRequired,
  control: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().func).isRequired,
  onUpdate: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().func).isRequired
};

/***/ }),

/***/ "./assets/apps/customizer-controls/src/popup-additional-info/PopupAdditionalInfoComponent.js":
/*!***************************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/popup-additional-info/PopupAdditionalInfoComponent.js ***!
  \***************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _PopupAdditionalInfo_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PopupAdditionalInfo.js */ "./assets/apps/customizer-controls/src/popup-additional-info/PopupAdditionalInfo.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);




const PopupAdditionalInfoComponent = ({
  control
}) => {
  let getSetting = control.setting.get();
  let [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({
    title: getSetting.title,
    ordering: getSetting.ordering,
    bottomSpacing: getSetting.bottomSpacing
  });
  const updateValues = nextValue => {
    setValue({
      ...value,
      ...nextValue
    });
    control.setting.set({
      ...control.setting.get(),
      ...nextValue
    });
  };
  const updateValue = newVal => {};
  const {
    label
  } = control.params;
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_PopupAdditionalInfo_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
    label: label,
    value: value,
    onChange: updateValues,
    control: control,
    onUpdate: updateValue
  });
};
PopupAdditionalInfoComponent.propTypes = {
  control: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PopupAdditionalInfoComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/popup-heading-bottom-spacing/Control.js":
/*!*************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/popup-heading-bottom-spacing/Control.js ***!
  \*************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   PopupHeadingBottomSpacingControl: () => (/* binding */ PopupHeadingBottomSpacingControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _PopupHeadingBottomSpacingComponent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PopupHeadingBottomSpacingComponent.js */ "./assets/apps/customizer-controls/src/popup-heading-bottom-spacing/PopupHeadingBottomSpacingComponent.js");

/* jshint esversion: 6 */


const PopupHeadingBottomSpacingControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_PopupHeadingBottomSpacingComponent_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/popup-heading-bottom-spacing/PopupHeadingBottomSpacing.js":
/*!*******************************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/popup-heading-bottom-spacing/PopupHeadingBottomSpacing.js ***!
  \*******************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);

/* global SolaceReactCustomize */





const PopupHeadingBottomSpacing = ({
  label,
  value,
  onChange,
  relation,
  control
}) => {
  const [currentDevice, setCurrentDevice] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)('desktop');
  const [visible, setVisible] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
  const [popoverCoords, setPopoverCoords] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({
    top: 0,
    left: 0
  });
  const popoverRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    const handleGetPopupClick = e => {
      const controlID = control.id;
      const baseIds = ['svg', 'g', 'path1', 'path2'];
      const ids = [controlID, ...baseIds.map(prefix => `${prefix}-${controlID}`)];
      if (ids.includes(e.target.id)) {
        const rect = e.target.getBoundingClientRect();
        setPopoverCoords({
          top: rect.bottom - 25,
          left: rect.left + 50,
          y: rect.y
        });
        setVisible(true);
      }
    };
    document.addEventListener('click', handleGetPopupClick);
    return () => {
      document.removeEventListener('click', handleGetPopupClick);
    };
  });
  const renderHeadingTag = () => {
    let {
      headingTag
    } = value;
    if (!headingTag) {
      headingTag = 'H1';
    }
    const defaultOptions = [{
      value: 'H1',
      label: 'H1'
    }, {
      value: 'H2',
      label: 'H2'
    }, {
      value: 'H3',
      label: 'H3'
    }, {
      value: 'H4',
      label: 'H4'
    }, {
      value: 'H5',
      label: 'H5'
    }, {
      value: 'H6',
      label: 'H6'
    }];
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.InlineSelect, {
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Heading Tag', 'solace'),
      value: headingTag,
      options: defaultOptions,
      onChange: nextValue => {
        onChange({
          headingTag: nextValue
        });
        wp.customize.previewer.refresh();
        if (nextValue === 'H1' && refreshAfterReset) {
          wp.customize.previewer.refresh();
        }
      }
    });
  };
  const renderBottomSpacing = () => {
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-white-background-control solace-range-control"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-control-header"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: "customize-control-title"
    }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Bottom Spacing', 'solace')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.ResponsiveControl, {
      hideResponsive: true
    })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "range-wrap"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.RangeControl, {
      value: value.bottomSpacing[currentDevice],
      min: 1,
      max: 250,
      step: 1,
      onChange: val => {
        const nextVal = value.bottomSpacing;
        nextVal[currentDevice] = val;
        onChange({
          value: nextVal
        });
      }
    })));
  };
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, visible && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Popover, {
    className: "popover-popup-heading-bottom-spacing solace-remove-style-popover-transform",
    onFocusOutside: () => {
      setVisible(false);
    },
    ref: popoverRef
    // style={{
    // 	position: 'absolute',
    // 	top: popoverCoords.top,
    // 	left: popoverCoords.left
    // }}
  }, label && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "customize-control-title"
  }, label), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-popup-heading-bottom-spacing-control solace-white-background-control",
    style: {
      position: 'absolute',
      left: popoverCoords.left - 10,
      top: popoverCoords.y - 15,
      backgroundColor: 'var(--sol-customizer-panel-bg-color)',
      color: '#fff',
      border: '1px solid var(--sol-customizer-line-color)',
      borderRadius: '10px'
    }
  }, renderHeadingTag(), renderBottomSpacing())));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PopupHeadingBottomSpacing);
const responsiveShape = {
  mobile: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number)]),
  tablet: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number)]),
  desktop: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number)])
};
PopupHeadingBottomSpacing.propTypes = {
  label: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().string),
  value: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape({
    bottomSpacing: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape({
      suffix: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape(responsiveShape),
      ...responsiveShape
    })
  }),
  refreshAfterReset: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().bool),
  onChange: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func).isRequired
};

/***/ }),

/***/ "./assets/apps/customizer-controls/src/popup-heading-bottom-spacing/PopupHeadingBottomSpacingComponent.js":
/*!****************************************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/popup-heading-bottom-spacing/PopupHeadingBottomSpacingComponent.js ***!
  \****************************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _PopupHeadingBottomSpacing_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PopupHeadingBottomSpacing.js */ "./assets/apps/customizer-controls/src/popup-heading-bottom-spacing/PopupHeadingBottomSpacing.js");




const PopupHeadingBottomSpacingComponent = ({
  control
}) => {
  let setVal = control.setting.get();
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({
    bottomSpacing: setVal.bottomSpacing,
    flag: false
  });
  const updateValues = nextValue => {
    setValue({
      ...value,
      ...nextValue
    });
    control.setting.set({
      ...control.setting.get(),
      ...nextValue,
      flag: !control.setting.get().flag
    });
  };
  const {
    label,
    refresh_on_reset,
    relation
  } = control.params;
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_PopupHeadingBottomSpacing_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
    label: label,
    value: value,
    onChange: updateValues,
    relation: relation,
    control: control,
    refreshAfterReset: refresh_on_reset
  });
};
PopupHeadingBottomSpacingComponent.propTypes = {
  control: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PopupHeadingBottomSpacingComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/popup-only-bottom-spacing/Control.js":
/*!**********************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/popup-only-bottom-spacing/Control.js ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   PopupOnlyBottomSpacingControl: () => (/* binding */ PopupOnlyBottomSpacingControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _PopupOnlyBottomSpacingComponent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PopupOnlyBottomSpacingComponent.js */ "./assets/apps/customizer-controls/src/popup-only-bottom-spacing/PopupOnlyBottomSpacingComponent.js");

/* jshint esversion: 6 */


const PopupOnlyBottomSpacingControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_PopupOnlyBottomSpacingComponent_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/popup-only-bottom-spacing/PopupOnlyBottomSpacing.js":
/*!*************************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/popup-only-bottom-spacing/PopupOnlyBottomSpacing.js ***!
  \*************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);

/* global SolaceReactCustomize */





const PopupOnlyBottomSpacing = ({
  label,
  value,
  onChange,
  relation,
  control
}) => {
  const [currentDevice, setCurrentDevice] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)('desktop');
  const [visible, setVisible] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
  const [popoverCoords, setPopoverCoords] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({
    top: 0,
    left: 0
  });
  const popoverRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    const handleGetPopupClick = e => {
      const controlID = control.id;
      const baseIds = ['svg', 'g', 'path1', 'path2'];
      const ids = [controlID, ...baseIds.map(prefix => `${prefix}-${controlID}`)];
      if (ids.includes(e.target.id)) {
        const rect = e.target.getBoundingClientRect();
        setPopoverCoords({
          top: rect.bottom - 25,
          left: rect.left + 50,
          y: rect.y
        });
        setVisible(true);
      }
    };
    document.addEventListener('click', handleGetPopupClick);
    return () => {
      document.removeEventListener('click', handleGetPopupClick);
    };
  });
  const renderBottomSpacing = () => {
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-white-background-control solace-range-control"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-control-header"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: "customize-control-title"
    }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Bottom Spacing', 'solace')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.ResponsiveControl, {
      hideResponsive: true
    })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "range-wrap"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.RangeControl, {
      value: value.bottomSpacing[currentDevice],
      min: 1,
      max: 250,
      step: 1,
      onChange: val => {
        const nextVal = value.bottomSpacing;
        nextVal[currentDevice] = val;
        onChange({
          value: nextVal
        });
      }
    })));
  };
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, visible && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Popover, {
    className: "popover-popup-only-bottom-spacing solace-remove-style-popover-transform",
    onFocusOutside: () => {
      setVisible(false);
    },
    ref: popoverRef,
    style: {
      position: 'absolute',
      top: popoverCoords.top,
      left: popoverCoords.left
    }
  }, label && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "customize-control-title"
  }, label), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-popup-only-bottom-spacing-control solace-white-background-control",
    style: {
      position: 'absolute',
      left: popoverCoords.left - 10,
      top: popoverCoords.y - 15,
      backgroundColor: 'var(--sol-customizer-panel-bg-color)',
      color: '#fff',
      border: '1px solid var(--sol-customizer-line-color)',
      borderRadius: '10px'
    }
  }, renderBottomSpacing())));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PopupOnlyBottomSpacing);
const responsiveShape = {
  mobile: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number)]),
  tablet: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number)]),
  desktop: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number)])
};
PopupOnlyBottomSpacing.propTypes = {
  label: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().string),
  value: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape({
    bottomSpacing: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape({
      suffix: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape(responsiveShape),
      ...responsiveShape
    })
  }),
  refreshAfterReset: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().bool),
  onChange: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func).isRequired
};

/***/ }),

/***/ "./assets/apps/customizer-controls/src/popup-only-bottom-spacing/PopupOnlyBottomSpacingComponent.js":
/*!**********************************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/popup-only-bottom-spacing/PopupOnlyBottomSpacingComponent.js ***!
  \**********************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _PopupOnlyBottomSpacing_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PopupOnlyBottomSpacing.js */ "./assets/apps/customizer-controls/src/popup-only-bottom-spacing/PopupOnlyBottomSpacing.js");




const PopupOnlyBottomSpacingComponent = ({
  control
}) => {
  let setVal = control.setting.get();
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({
    bottomSpacing: setVal.bottomSpacing,
    flag: false
  });
  const updateValues = nextValue => {
    setValue({
      ...value,
      ...nextValue
    });
    control.setting.set({
      ...control.setting.get(),
      ...nextValue,
      flag: !control.setting.get().flag
    });
  };
  const {
    label,
    refresh_on_reset,
    relation
  } = control.params;
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_PopupOnlyBottomSpacing_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
    label: label,
    value: value,
    onChange: updateValues,
    relation: relation,
    control: control,
    refreshAfterReset: refresh_on_reset
  });
};
PopupOnlyBottomSpacingComponent.propTypes = {
  control: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PopupOnlyBottomSpacingComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/popup-payment-methods/Control.js":
/*!******************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/popup-payment-methods/Control.js ***!
  \******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   PopupPaymentMethodsControl: () => (/* binding */ PopupPaymentMethodsControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _PopupPaymentMethodsComponent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PopupPaymentMethodsComponent.js */ "./assets/apps/customizer-controls/src/popup-payment-methods/PopupPaymentMethodsComponent.js");

/* jshint esversion: 6 */


const PopupPaymentMethodsControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_PopupPaymentMethodsComponent_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/popup-payment-methods/PopupPaymentMethods.js":
/*!******************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/popup-payment-methods/PopupPaymentMethods.js ***!
  \******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react_sortablejs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-sortablejs */ "./node_modules/react-sortablejs/dist/index.js");
/* harmony import */ var react_sortablejs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_sortablejs__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_5__);

/* global SolaceReactCustomize */









const PopupPaymentMethods = ({
  label,
  value,
  onChange,
  control
}) => {
  const [currentDevice, setCurrentDevice] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)('desktop');
  const [visible, setVisible] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
  const [popoverCoords, setPopoverCoords] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({
    top: 0,
    left: 0
  });
  const popoverRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
  let getSetting = control.setting.get();
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    const handleGetPopupClick = e => {
      const controlID = control.id;
      const baseIds = ['svg', 'g', 'path1', 'path2'];
      const ids = [controlID, ...baseIds.map(prefix => `${prefix}-${controlID}`)];
      if (ids.includes(e.target.id)) {
        const rect = e.target.getBoundingClientRect();
        console.log('rect : ' + JSON.stringify(rect, null, 5));
        console.log(typeof rect.y);
        if (rect.y > 300) {
          setPopoverCoords({
            top: rect.bottom - 25,
            left: rect.left + 50,
            y: 300
          });
        } else {
          setPopoverCoords({
            top: rect.bottom - 25,
            left: rect.left + 50,
            y: rect.y
          });
        }
        setVisible(true);
      }
    };
    document.addEventListener('click', handleGetPopupClick);
    return () => {
      document.removeEventListener('click', handleGetPopupClick);
    };
  });
  const normalizeValue = val => {
    const enabledItems = val.map(element => {
      return {
        id: element,
        visible: true
      };
    });
    return enabledItems;
  };
  let [valueState, setValueState] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(normalizeValue((0,_solace_wp_components__WEBPACK_IMPORTED_MODULE_5__.maybeParseJson)(getSetting.ordering)));
  valueState = valueState.map(item => {
    // Check if item.id is an object and has its own properties
    if (item.id && typeof item.id === 'object') {
      return {
        ...item.id,
        // Spread the properties of the id object into the parent object
        visible: item.visible // Retain the visible property from the parent object
      };
    }
    return item; // If item.id is not an object, return the item without changes
  });
  const handleToggle = item => {
    const newValue = getSetting.ordering.map(e => {
      if (e.id === item) {
        if (e.id.endsWith('-solhide')) {
          e.id = e.id.replace('-solhide', '');
        } else {
          e.id = e.id + '-solhide';
        }
      }
      return e;
    });

    // Fix issue focus.
    const popoverElement = document.querySelector('.solace-popup-payment-methods-control .solace-input-title input.components-input-control__input');
    if (popoverElement) {
      popoverElement.focus();
    }
    handleChange(normalizeValue((0,_solace_wp_components__WEBPACK_IMPORTED_MODULE_5__.maybeParseJson)(newValue)));
  };
  const handleChange = newVal => {
    // Transform the ordering array to move 'id' properties to the root
    const transformedOrdering = newVal.map(item => {
      if (item.id && typeof item.id === 'object') {
        return {
          ...item.id,
          // Spread the properties of item.id into the parent object
          visible: item.visible // Keep the 'visible' property from the parent object
        };
      }
      return item; // If item.id is not an object, return the item without changes
    });

    // Create a new updateValue object with transformed ordering
    let updateValue = {
      ...getSetting,
      ordering: transformedOrdering // Use the transformed ordering array
    };
    setValueState(transformedOrdering); // Update value state with the transformed ordering

    control.setting.set(updateValue); // Update the control setting with the new value

    wp.customize.previewer.refresh(); // Refresh the previewer
  };
  const renderTitle = () => {
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-white-background-control solace-input-title solace-range-control"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-control-header"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: "customize-control-title"
    }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Title', 'solace'))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "box-input"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.__experimentalInputControl, {
      value: value.title,
      onChange: nextValue => {
        wp.customize.previewer.refresh();
        const newVal = nextValue;
        onChange({
          title: newVal
        });
      }
    })));
  };
  const renderOrdering = () => {
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(react_sortablejs__WEBPACK_IMPORTED_MODULE_1__.ReactSortable, {
      className: "items-list",
      list: valueState,
      setList: handleChange,
      animation: 300,
      handle: ".handle"
    }, valueState.map(item => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      key: item.id,
      className: classnames__WEBPACK_IMPORTED_MODULE_2___default()({
        'solace-sortable-item': true,
        disabled: item.id.includes('solhide'),
        visible: !item.id.includes('solhide')
      })
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "left"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: "button handle",
      onClick: e => {
        e.preventDefault();
        e.stopPropagation();
      }
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
      width: "15",
      height: "15",
      viewBox: "0 0 15 15",
      fill: "none",
      xmlns: "http://www.w3.org/2000/svg"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
      d: "M12.6024 6.83408L11.8344 6.06108C11.7668 5.99835 11.7125 5.92265 11.6749 5.83848C11.6372 5.75432 11.6169 5.66343 11.6152 5.57125C11.6135 5.47906 11.6303 5.38748 11.6648 5.30196C11.6993 5.21644 11.7506 5.13874 11.8158 5.07351C11.8809 5.00828 11.9586 4.95686 12.044 4.92231C12.1295 4.88776 12.2211 4.8708 12.3133 4.87244C12.4055 4.87408 12.4964 4.89429 12.5806 4.93186C12.6648 4.96942 12.7406 5.02358 12.8034 5.09108L14.7424 7.03108C14.8706 7.15969 14.9427 7.33393 14.9427 7.51558C14.9427 7.69724 14.8706 7.87148 14.7424 8.00008L12.8034 9.93908C12.7397 10.0027 12.6642 10.0532 12.5811 10.0876C12.4979 10.122 12.4088 10.1398 12.3189 10.1398C12.2289 10.1398 12.1398 10.122 12.0566 10.0876C11.9735 10.0532 11.898 10.0027 11.8344 9.93908C11.7707 9.87546 11.7203 9.79992 11.6858 9.71679C11.6514 9.63366 11.6337 9.54456 11.6337 9.45458C11.6337 9.3646 11.6514 9.27551 11.6858 9.19238C11.7203 9.10924 11.7707 9.03371 11.8344 8.97008L12.6024 8.20208H8.15635V12.6511L8.92435 11.8831C8.98798 11.8195 9.06351 11.769 9.14664 11.7346C9.22977 11.7001 9.31887 11.6824 9.40885 11.6824C9.49883 11.6824 9.58793 11.7001 9.67106 11.7346C9.75419 11.769 9.82973 11.8195 9.89335 11.8831C9.95698 11.9467 10.0074 12.0222 10.0419 12.1054C10.0763 12.1885 10.094 12.2776 10.094 12.3676C10.094 12.4576 10.0763 12.5467 10.0419 12.6298C10.0074 12.7129 9.95698 12.7885 9.89335 12.8521L7.95535 14.7921C7.82675 14.9204 7.65251 14.9924 7.47085 14.9924C7.28919 14.9924 7.11495 14.9204 6.98635 14.7921L5.04635 12.8521C4.98273 12.7885 4.93225 12.7129 4.89782 12.6298C4.86339 12.5467 4.84566 12.4576 4.84566 12.3676C4.84566 12.2776 4.86339 12.1885 4.89782 12.1054C4.93225 12.0222 4.98272 11.9467 5.04635 11.8831C5.10998 11.8195 5.18551 11.769 5.26864 11.7346C5.35177 11.7001 5.44087 11.6824 5.53085 11.6824C5.62083 11.6824 5.70993 11.7001 5.79306 11.7346C5.87619 11.769 5.95173 11.8195 6.01535 11.8831L6.78435 12.6511V8.20508H2.33935L3.10835 8.97308C3.23685 9.10158 3.30904 9.27586 3.30904 9.45758C3.30904 9.63931 3.23685 9.81359 3.10835 9.94208C2.97985 10.0706 2.80557 10.1428 2.62385 10.1428C2.44213 10.1428 2.26785 10.0706 2.13935 9.94208L0.20035 8.00408C0.0720517 7.87548 0 7.70124 0 7.51958C0 7.33793 0.0720517 7.16369 0.20035 7.03508L2.14035 5.09508C2.20315 5.02758 2.27891 4.97342 2.36312 4.93586C2.44732 4.89829 2.53823 4.87808 2.63041 4.87644C2.7226 4.8748 2.81417 4.89176 2.89965 4.92631C2.98514 4.96086 3.06278 5.01228 3.12794 5.07751C3.19311 5.14274 3.24445 5.22044 3.27891 5.30595C3.31337 5.39147 3.33023 5.48306 3.3285 5.57525C3.32676 5.66743 3.30646 5.75832 3.26881 5.84248C3.23115 5.92665 3.17692 6.00235 3.10935 6.06508L2.34035 6.83308H6.78635V2.38908L6.01635 3.16108C5.95272 3.22471 5.87719 3.27518 5.79406 3.30961C5.71093 3.34405 5.62183 3.36177 5.53185 3.36177C5.44187 3.36177 5.35277 3.34405 5.26964 3.30961C5.18651 3.27518 5.11098 3.22471 5.04735 3.16108C4.98373 3.09746 4.93325 3.02192 4.89882 2.93879C4.86439 2.85566 4.84666 2.76656 4.84666 2.67658C4.84666 2.5866 4.86439 2.49751 4.89882 2.41438C4.93325 2.33124 4.98373 2.25571 5.04735 2.19208L6.98735 0.253085C7.11595 0.124786 7.29019 0.0527344 7.47185 0.0527344C7.65351 0.0527344 7.82775 0.124786 7.95635 0.253085L9.89535 2.19308C9.96428 2.25532 10.0198 2.33092 10.0586 2.41529C10.0975 2.49966 10.1187 2.59104 10.1211 2.68388C10.1235 2.77671 10.107 2.86907 10.0726 2.95533C10.0382 3.04159 9.98658 3.11995 9.92094 3.18565C9.85531 3.25135 9.777 3.30302 9.69078 3.33752C9.60455 3.37202 9.51222 3.38862 9.41938 3.38632C9.32654 3.38403 9.23513 3.36287 9.15072 3.32415C9.06631 3.28543 8.99065 3.22995 8.92835 3.16108L8.16035 2.39308V6.83408H12.6063H12.6024Z",
      fill: "white"
    }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: "label"
    }, item.id.replace(/solhide/g, '').replace(/-/g, ' ').split(' ').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join(' '))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "right"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.Tooltip, {
      text: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Toggle Visibility', 'solace')
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
      "aria-label": (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Toggle Visibility', 'solace'),
      className: "toggle",
      onClick: e => {
        e.preventDefault();
        e.stopPropagation();
        handleToggle(item.id);
      }
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
      width: "19",
      height: "19",
      viewBox: "0 0 19 19",
      xmlns: "http://www.w3.org/2000/svg"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("g", {
      clipPath: "url(#clip0_2561_341)"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
      d: "M9.5 3.83789C5.86985 3.83789 2.57784 5.82398 0.148665 9.04992C-0.0495551 9.31421 -0.0495551 9.68345 0.148665 9.94774C2.57784 13.1776 5.86985 15.1637 9.5 15.1637C13.1302 15.1637 16.4222 13.1776 18.8513 9.95163C19.0496 9.68733 19.0496 9.3181 18.8513 9.05381C16.4222 5.82398 13.1302 3.83789 9.5 3.83789ZM9.76041 13.4885C7.35067 13.6401 5.36069 11.654 5.51227 9.24037C5.63665 7.25039 7.24962 5.63742 9.23959 5.51305C11.6493 5.36147 13.6393 7.34756 13.4877 9.76118C13.3595 11.7473 11.7465 13.3602 9.76041 13.4885ZM9.63992 11.6462C8.34177 11.7278 7.26905 10.659 7.35456 9.36085C7.42063 8.28813 8.29124 7.4214 9.36397 7.35144C10.6621 7.26982 11.7348 8.33866 11.6493 9.63681C11.5794 10.7134 10.7088 11.5801 9.63992 11.6462Z"
    })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("clipPath", {
      id: "clip0_2561_341"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
      width: "19",
      height: "19",
      fill: "white"
    }))))))))))));
  };
  const renderIconSize = () => {
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-white-background-control solace-range-control"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-control-header"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: "customize-control-title"
    }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Icon Size', 'solace')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_5__.ResponsiveControl, {
      hideResponsive: true
    })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "range-wrap"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.RangeControl, {
      value: value.iconSize[currentDevice],
      min: 1,
      max: 100,
      step: 1,
      onChange: val => {
        const nextVal = value.iconSize;
        nextVal[currentDevice] = val;
        onChange({
          value: nextVal
        });
        wp.customize.previewer.refresh();
      }
    })));
  };
  const renderBottomSpacing = () => {
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-white-background-control solace-range-control"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-control-header"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: "customize-control-title"
    }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Bottom Spacing', 'solace')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_5__.ResponsiveControl, {
      hideResponsive: true
    })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "range-wrap"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.RangeControl, {
      value: value.bottomSpacing[currentDevice],
      min: 1,
      max: 250,
      step: 1,
      onChange: val => {
        const nextVal = value.bottomSpacing;
        nextVal[currentDevice] = val;
        onChange({
          value: nextVal
        });
        wp.customize.previewer.refresh();
      }
    })));
  };
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, visible && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.Popover, {
    className: "solace-popup-payment-methods solace-remove-style-popover-transform",
    onFocusOutside: () => {
      setVisible(false);
    },
    ref: popoverRef,
    style: {
      position: 'absolute',
      top: popoverCoords.top,
      left: popoverCoords.left
    }
  }, label && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "customize-control-title"
  }, label), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-popup-payment-methods-control solace-white-background-control",
    style: {
      position: 'absolute',
      left: popoverCoords.left - 10,
      top: popoverCoords.y - 15,
      backgroundColor: 'var(--sol-customizer-panel-bg-color)',
      color: '#fff',
      border: '1px solid var(--sol-customizer-line-color)',
      borderRadius: '10px'
    }
  }, renderTitle(), renderOrdering(), renderIconSize(), renderBottomSpacing())));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PopupPaymentMethods);
const responsiveShape = {
  mobile: prop_types__WEBPACK_IMPORTED_MODULE_6___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_6___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_6___default().number)]),
  tablet: prop_types__WEBPACK_IMPORTED_MODULE_6___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_6___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_6___default().number)]),
  desktop: prop_types__WEBPACK_IMPORTED_MODULE_6___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_6___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_6___default().number)])
};
PopupPaymentMethods.propTypes = {
  label: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().string),
  value: prop_types__WEBPACK_IMPORTED_MODULE_6___default().shape({
    title: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().string),
    ordering: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().any),
    iconSize: prop_types__WEBPACK_IMPORTED_MODULE_6___default().shape({
      suffix: prop_types__WEBPACK_IMPORTED_MODULE_6___default().shape(responsiveShape),
      ...responsiveShape
    }),
    bottomSpacing: prop_types__WEBPACK_IMPORTED_MODULE_6___default().shape({
      suffix: prop_types__WEBPACK_IMPORTED_MODULE_6___default().shape(responsiveShape),
      ...responsiveShape
    })
  }),
  onChange: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().func).isRequired,
  control: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().func).isRequired
};

/***/ }),

/***/ "./assets/apps/customizer-controls/src/popup-payment-methods/PopupPaymentMethodsComponent.js":
/*!***************************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/popup-payment-methods/PopupPaymentMethodsComponent.js ***!
  \***************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _PopupPaymentMethods_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PopupPaymentMethods.js */ "./assets/apps/customizer-controls/src/popup-payment-methods/PopupPaymentMethods.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);




const PopupPaymentMethodsComponent = ({
  control
}) => {
  let getSetting = control.setting.get();
  let [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({
    title: getSetting.title,
    ordering: getSetting.ordering,
    iconSize: getSetting.iconSize,
    bottomSpacing: getSetting.bottomSpacing
  });
  const updateValues = nextValue => {
    setValue({
      ...value,
      ...nextValue
    });
    control.setting.set({
      ...control.setting.get(),
      ...nextValue
    });
  };
  const {
    label
  } = control.params;
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_PopupPaymentMethods_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
    label: label,
    value: value,
    onChange: updateValues,
    control: control
  });
};
PopupPaymentMethodsComponent.propTypes = {
  control: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PopupPaymentMethodsComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/post-meta/Control.js":
/*!******************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/post-meta/Control.js ***!
  \******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   PostMetaControl: () => (/* binding */ PostMetaControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _PostMetaComponent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PostMetaComponent.js */ "./assets/apps/customizer-controls/src/post-meta/PostMetaComponent.js");

/* jshint esversion: 6 */


const PostMetaControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_PostMetaComponent_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/post-meta/PostMeta.js":
/*!*******************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/post-meta/PostMeta.js ***!
  \*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);

/* global SolaceReactCustomize */





const PostMeta = props => {
  const [currentDevice, setCurrentDevice] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)('desktop');
  const [visible, setVisible] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
  const [popoverCoords, setPopoverCoords] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({
    top: 0,
    left: 0
  });
  const {
    label,
    fontFamilyControl,
    withAuthor = true,
    withPublishedDate = true,
    withComments = true,
    withAuthorLabel = true,
    withShowAvatar = true,
    withUpdatedLabel = true,
    withShowUpdatedLabel = true,
    withTextTransform = true,
    value = {
      author: true,
      publishedDate: true,
      comments: true,
      authorLabel: 'By',
      showAvatar: true,
      avatarSize: {
        value: 50,
        min: 10,
        max: 120,
        step: 1
      },
      wordsPerMinute: {
        value: 200,
        min: 50,
        max: 500,
        step: 1
      },
      updatedLabel: 'Updated on',
      showUpdatedLabel: true,
      fontSize: {
        suffix: {
          mobile: 'px',
          tablet: 'px',
          desktop: 'px'
        },
        mobile: '',
        tablet: '',
        desktop: ''
      },
      lineHeight: {
        suffix: {
          mobile: 'em',
          tablet: 'em',
          desktop: 'em'
        },
        mobile: '',
        tablet: '',
        desktop: ''
      },
      letterSpacing: {
        mobile: '',
        tablet: '',
        desktop: ''
      },
      fontWeight: 'none',
      textTransform: 'none'
    },
    onChange,
    refreshAfterReset = false,
    fSUnit = ['em', 'px'],
    lHunit = ['em', 'px', '—'],
    defaultFS = {
      suffix: {
        mobile: 'px',
        tablet: 'px',
        desktop: 'px'
      },
      mobile: '',
      tablet: '',
      desktop: ''
    },
    defaultLH = {
      suffix: {
        mobile: 'em',
        tablet: 'em',
        desktop: 'em'
      },
      mobile: '',
      tablet: '',
      desktop: ''
    },
    defaultLS = {
      mobile: '',
      tablet: '',
      desktop: ''
    }
  } = props;
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    const handleGetPopupClickPostMeta = e => {
      const controlID = 'solace_single_post_element__post_meta';
      const baseIds = ['svg', 'g', 'path1', 'path2'];
      const ids = [controlID, ...baseIds.map(prefix => `${prefix}-${controlID}`)];
      if (ids.includes(e.target.id)) {
        const rect = e.target.getBoundingClientRect();
        setPopoverCoords({
          top: rect.bottom - 25,
          left: rect.left + 50,
          y: rect.y
        });
        setVisible(true);
      }
    };
    document.addEventListener('click', handleGetPopupClickPostMeta);
    return () => {
      document.removeEventListener('click', handleGetPopupClickPostMeta);
    };
  }, []);
  const [fontFamily, setFontFamily] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(wp.customize.control(fontFamilyControl) ? wp.customize.control(fontFamilyControl).setting() : '');
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    window.wp.customize.bind('change', setting => {
      if (setting.id === fontFamilyControl) {
        setFontFamily(setting.get());
      }
    });
  }, []);
  const renderAuthor = () => {
    if (!withAuthor) {
      return;
    }
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_3__.NewToggle, {
      className: "solace-toggle-control new-toggle",
      checked: value.author,
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Author', 'solace'),
      onChange: author => {
        onChange({
          author
        });
      }
    });
  };
  const renderPublishedDate = () => {
    if (!withPublishedDate) {
      return;
    }
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_3__.NewToggle, {
      className: "solace-toggle-control new-toggle",
      checked: value.publishedDate,
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Published Date', 'solace'),
      onChange: publishedDate => {
        onChange({
          publishedDate
        });
      }
    });
  };
  const renderComments = () => {
    if (!withComments) {
      return;
    }
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_3__.NewToggle, {
      className: "solace-toggle-control new-toggle",
      checked: value.comments,
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Comments', 'solace'),
      onChange: comments => {
        onChange({
          comments
        });
      }
    });
  };
  const renderAuthorLabel = () => {
    if (!withAuthorLabel) {
      return;
    }
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.TextControl, {
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Author Label', 'solace'),
      className: "author-label solace-type-input-text",
      value: value.authorLabel,
      onChange: authorLabel => {
        onChange({
          authorLabel
        });
      }
    });
  };
  const renderShowAvatar = () => {
    if (!withShowAvatar) {
      return;
    }
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_3__.NewToggle, {
      className: "solace-toggle-control new-toggle",
      checked: value.showAvatar,
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Show Avatar', 'solace'),
      onChange: showAvatar => {
        onChange({
          showAvatar
        });
      }
    });
  };
  const renderAvatarSize = () => {
    let {
      avatarSize
    } = value;
    if (!avatarSize) {
      return;
    }
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-white-background-control solace-range-control"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-control-header"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: "customize-control-title"
    }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Avatar Size', 'solace')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_3__.ResponsiveControl
    // onChange={(device) => setCurrentDevice(device)}
    , {
      hideResponsive: true
    })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "range-wrap"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.RangeControl, {
      value: avatarSize.value,
      min: avatarSize.min,
      max: avatarSize.max,
      step: avatarSize.step,
      allowReset: true,
      onChange: nextValue => {
        const nextVal = avatarSize;
        nextVal.value = nextValue;
        onChange({
          avatarSize: nextVal
        });
      }
    })));
  };
  const renderWordsPerMinute = () => {
    let {
      wordsPerMinute
    } = value;
    if (!wordsPerMinute) {
      return;
    }
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-white-background-control solace-range-control"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-control-header"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: "customize-control-title"
    }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Words Per Minute', 'solace')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_3__.ResponsiveControl
    // onChange={(device) => setCurrentDevice(device)}
    , {
      hideResponsive: true
    })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "range-wrap"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.RangeControl, {
      value: wordsPerMinute.value,
      min: wordsPerMinute.min,
      max: wordsPerMinute.max,
      step: wordsPerMinute.step,
      allowReset: true,
      onChange: nextValue => {
        const nextVal = wordsPerMinute;
        nextVal.value = nextValue;
        onChange({
          wordsPerMinute: nextVal
        });
      }
    })));
  };
  const renderUpdatedLabel = () => {
    if (!withUpdatedLabel) {
      return;
    }
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.TextControl, {
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Label', 'solace'),
      className: "label solace-type-input-text",
      value: value.updatedLabel,
      onChange: updatedLabel => {
        onChange({
          updatedLabel
        });
      }
    });
  };
  const renderShowUpdatedLabel = () => {
    if (!withShowUpdatedLabel) {
      return;
    }
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_3__.NewToggle, {
      className: "solace-toggle-control new-toggle",
      checked: value.showUpdatedLabel,
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Show Updated Data Label', 'solace'),
      onChange: showUpdatedLabel => {
        onChange({
          showUpdatedLabel
        });
      }
    });
  };
  const renderTextTransform = () => {
    if (!withTextTransform) {
      return;
    }
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_3__.InlineSelect, {
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Transform', 'solace'),
      value: value.textTransform,
      options: [{
        value: 'none',
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('None', 'solace')
      }, {
        value: 'capitalize',
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Capitalize', 'solace')
      }, {
        value: 'lowercase',
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Lowercase', 'solace')
      }, {
        value: 'uppercase',
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Uppercase', 'solace')
      }],
      onChange: textTransform => {
        onChange({
          textTransform
        });
      }
    });
  };
  const renderFontWeight = () => {
    let {
      fontWeight
    } = value;
    if (!fontWeight) {
      fontWeight = 'none';
    }
    const {
      fontVariants,
      systemFontVariants
    } = SolaceReactCustomize;
    const allFontVariants = {
      ...fontVariants,
      ...systemFontVariants
    };
    const defaultOptions = [{
      value: 'none',
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('None', 'solace')
    }, {
      value: 100,
      label: '100'
    }, {
      value: 200,
      label: '200'
    }, {
      value: 300,
      label: '300'
    }, {
      value: 400,
      label: '400'
    }, {
      value: 500,
      label: '500'
    }, {
      value: 600,
      label: '600'
    }, {
      value: 700,
      label: '700'
    }, {
      value: 800,
      label: '800'
    }, {
      value: 900,
      label: '900'
    }];
    let options;
    if (allFontVariants[fontFamily] !== undefined) {
      options = allFontVariants[fontFamily].filter(fv => !fv.includes('italic')).reduce((acc, curr) => [...acc, {
        value: parseInt(curr),
        label: curr
      }], [{
        value: 'none',
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('None', 'solace')
      }]);
    }
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_3__.InlineSelect, {
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Weight', 'solace'),
      value: fontWeight,
      options: options ? options : defaultOptions,
      onChange: nextValue => {
        onChange({
          fontWeight: nextValue
        });
        if (nextValue === 'none' && refreshAfterReset) {
          wp.customize.previewer.refresh();
        }
      }
    });
  };
  const renderFontSize = () => {
    let {
      fontSize
    } = value;
    if (!fontSize) {
      fontSize = {
        ...defaultFS
      };
    }
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_3__.NumberControl, {
      className: "font-size",
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Font Size', 'solace'),
      default: defaultFS[currentDevice],
      value: fontSize[currentDevice],
      step: ['em', 'rem'].includes(fontSize.suffix[currentDevice]) ? 0.1 : 1,
      units: fSUnit,
      activeUnit: fontSize.suffix[currentDevice],
      hasResponsive: true,
      onChange: val => {
        const nextVal = fontSize;
        nextVal[currentDevice] = val;
        onChange({
          fontSize: nextVal
        });
      },
      onUnitChange: val => {
        const nextVal = fontSize;
        nextVal.suffix[currentDevice] = val;
        onChange({
          fontSize: nextVal
        });
      },
      onReset: () => {
        onChange({
          fontSize: defaultFS
        });
        if (refreshAfterReset) {
          wp.customize.previewer.refresh();
        }
      },
      onChangedDevice: setCurrentDevice
    });
  };
  const renderLineHeight = () => {
    let {
      lineHeight
    } = value;
    if (!lineHeight) {
      lineHeight = {
        ...defaultLH
      };
    }
    const lowerStepUnits = ['em', '—'];
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_3__.NumberControl, {
      className: "line-height",
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Line Height', 'solace'),
      step: lowerStepUnits.includes(lineHeight.suffix[currentDevice]) ? 0.1 : 1,
      default: defaultLH[currentDevice],
      value: lineHeight[currentDevice],
      units: lHunit,
      activeUnit: lineHeight.suffix[currentDevice],
      max: lineHeight.suffix[currentDevice] === 'em' ? 4 : 200,
      min: lineHeight.suffix[currentDevice] === 'em' ? 0.5 : 1,
      hasResponsive: true,
      onChange: val => {
        const nextVal = lineHeight;
        nextVal[currentDevice] = val;
        onChange({
          lineHeight: nextVal
        });
      },
      onReset: () => {
        onChange({
          lineHeight: defaultLH
        });
        if (refreshAfterReset) {
          wp.customize.previewer.refresh();
        }
      },
      onUnitChange: val => {
        const nextVal = lineHeight;
        nextVal.suffix[currentDevice] = val;
        onChange({
          lineHeight: nextVal
        });
      },
      onChangedDevice: setCurrentDevice
    });
  };
  const renderLetterSpacing = () => {
    let {
      letterSpacing
    } = value;
    if (!letterSpacing) {
      letterSpacing = {
        ...defaultLS
      };
    }
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_3__.NumberControl, {
      className: "letter-spacing",
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Letter Spacing', 'solace'),
      step: 0.1,
      default: defaultLS[currentDevice],
      value: letterSpacing && letterSpacing[currentDevice] ? letterSpacing[currentDevice] : '',
      max: 20,
      min: -5,
      units: ['px'],
      hasResponsive: true,
      onChange: val => {
        const nextVal = letterSpacing;
        nextVal[currentDevice] = val;
        onChange({
          letterSpacing: nextVal
        });
      },
      onReset: () => {
        onChange({
          letterSpacing: defaultLS
        });
        if (refreshAfterReset) {
          wp.customize.previewer.refresh();
        }
      },
      onChangedDevice: setCurrentDevice
    });
  };
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, visible && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Popover, {
    className: "popover-post-meta solace-remove-style-popover-transform",
    onFocusOutside: () => {
      setVisible(false);
    },
    style: {
      position: 'absolute',
      // top: popoverCoords.top,
      top: 15,
      left: popoverCoords.left
    }
  }, label && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "customize-control-title"
  }, label), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-post-meta-control solace-white-background-control",
    style: {
      position: 'absolute',
      left: popoverCoords.left - 10,
      // top: popoverCoords.y - 15,
      top: 100,
      backgroundColor: 'var(--sol-customizer-panel-bg-color)',
      color: '#fff',
      border: '1px solid var(--sol-customizer-line-color)',
      borderRadius: '10px'
    }
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-container-post-meta"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "customize-control-title title-post-meta"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Post Meta', 'solace')), renderAuthor(), renderPublishedDate(), renderComments(), renderShowAvatar(), renderShowUpdatedLabel()), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-container-author-settings"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "customize-control-title title-post-meta"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Author Settings', 'solace')), renderAuthorLabel(), renderAvatarSize()), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-container-reading-settings"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "customize-control-title title-post-meta"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Reading Settings', 'solace')), renderWordsPerMinute()), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-container-update-date-settings"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "customize-control-title title-post-meta"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Update Date Settings', 'solace')), renderUpdatedLabel()))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PostMeta);
const responsiveShape = {
  mobile: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number)]),
  tablet: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number)]),
  desktop: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number)])
};

// const avatarSizeShape = {
// 	value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
// 	min: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
// 	max: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
// 	step: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
// };

PostMeta.propTypes = {
  label: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().string),
  value: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape({
    author: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().bool),
    publishedDate: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().bool),
    commments: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().bool),
    authorLabel: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().string),
    showAvatar: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().bool),
    avatarSize: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().array),
    wordsPerMinute: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().array),
    updatedLabel: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().string),
    showUpdatedLabel: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().bool),
    fontSize: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape({
      suffix: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape(responsiveShape),
      ...responsiveShape
    }),
    lineHeight: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape({
      suffix: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape(responsiveShape),
      ...responsiveShape
    }),
    letterSpacing: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape(responsiveShape),
    fontWeight: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number)]),
    textTransform: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().string)
  }),
  withAuthor: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().bool),
  withPublishedDate: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().bool),
  withComments: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().bool),
  withAuthorLabel: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().bool),
  withShowAvatar: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().bool),
  withUpdatedLabel: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().bool),
  withShowUpdatedLabel: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().bool),
  withTextTransform: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().bool),
  refreshAfterReset: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().bool),
  fSUnit: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().array),
  lHunit: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().array),
  onChange: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func).isRequired,
  defaultFS: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape({
    suffix: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape(responsiveShape),
    ...responsiveShape
  }),
  defaultLH: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape({
    suffix: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape(responsiveShape),
    ...responsiveShape
  }),
  defaultLS: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape(responsiveShape)
};

/***/ }),

/***/ "./assets/apps/customizer-controls/src/post-meta/PostMetaComponent.js":
/*!****************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/post-meta/PostMetaComponent.js ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _PostMeta__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PostMeta */ "./assets/apps/customizer-controls/src/post-meta/PostMeta.js");

/*eslint camelcase: ["error", {allow: ["text_transform","weight_default","refresh_on_reset","font_family_control","letter_spacing_default","line_height_units","disable_transform","size_default","size_units","line_height_default"]}]*/



const PostMetaComponent = ({
  control
}) => {
  let setVal = control.setting.get();
  let defaultParams = {
    author: true,
    published_date: true,
    comments: true,
    author_label: 'By',
    show_avatar: true,
    avatar_size: {
      value: 50,
      min: 10,
      max: 150,
      step: 1
    },
    words_per_minute: {
      value: 200,
      min: 50,
      max: 500,
      step: 1
    },
    show_updated_label: true,
    updated_label: 'Updated on',
    size_units: ['em', 'px'],
    line_height_units: ['em', 'px', '—'],
    weight_default: 400,
    text_transform: 'none',
    size_default: {
      suffix: {
        mobile: 'px',
        tablet: 'px',
        desktop: 'px'
      },
      mobile: 15,
      tablet: 15,
      desktop: 15
    },
    line_height_default: {
      suffix: {
        mobile: 'em',
        tablet: 'em',
        desktop: 'em'
      },
      mobile: 1.6,
      tablet: 1.6,
      desktop: 1.6
    },
    letter_spacing_default: {
      mobile: 0,
      tablet: 0,
      desktop: 0
    }
  };
  const emptyValue = {
    author: true,
    publishedDate: true,
    comments: true,
    authorLabel: 'By',
    showAvatar: true,
    avatarSize: {
      value: 50,
      min: 10,
      max: 120,
      step: 1
    },
    wordsPerMinute: {
      value: 200,
      min: 50,
      max: 500,
      step: 1
    },
    updatedLabel: 'Updated on',
    showUpdatedLabel: true,
    fontSize: {
      suffix: {
        mobile: 'px',
        tablet: 'px',
        desktop: 'px'
      },
      mobile: '',
      tablet: '',
      desktop: ''
    },
    lineHeight: {
      suffix: {
        mobile: 'em',
        tablet: 'em',
        desktop: 'em'
      },
      mobile: '',
      tablet: '',
      desktop: ''
    },
    letterSpacing: {
      mobile: '',
      tablet: '',
      desktop: ''
    },
    fontWeight: 'none',
    textTransform: 'none'
  };
  const emptyDefault = {
    author: true,
    published_date: true,
    comments: true,
    author_label: 'By',
    show_avatar: true,
    avatar_size: {
      value: 50,
      min: 10,
      max: 120,
      step: 1
    },
    words_per_minute: {
      value: 200,
      min: 50,
      max: 500,
      step: 1
    },
    updated_label: 'Updated on',
    show_updated_label: true,
    size_units: ['em', 'px'],
    line_height_units: ['em', 'px', '-'],
    weight_default: 'none',
    text_transform: 'none',
    size_default: {
      suffix: {
        mobile: 'px',
        tablet: 'px',
        desktop: 'px'
      },
      mobile: '',
      tablet: '',
      desktop: ''
    },
    line_height_default: {
      suffix: {
        mobile: 'em',
        tablet: 'em',
        desktop: 'em'
      },
      mobile: '',
      tablet: '',
      desktop: ''
    },
    letter_spacing_default: {
      mobile: '',
      tablet: '',
      desktop: ''
    }
  };
  if (!setVal) {
    setVal = emptyValue;
  }
  if (typeof setVal === 'string') {
    setVal = defaultParams;
  }
  const controlParams = control.params.input_attrs ? {
    ...defaultParams,
    ...JSON.parse(control.params.input_attrs)
  } : defaultParams;
  if (control.params.input_attrs.length) {
    const inputAttrs = JSON.parse(control.params.input_attrs);
    if (inputAttrs.default_is_empty) {
      defaultParams = emptyDefault;
    }
  }

  // Added Later. Make sure we have a default value if none is selected.
  setVal.lineHeight = setVal.lineHeight || defaultParams.line_height_default;
  setVal.lineHeight.suffix = setVal.lineHeight.suffix || defaultParams.line_height_default.suffix;

  // Added Later. Make sure we have a suffix for line height.
  controlParams.line_height_default.suffix = controlParams.line_height_default.suffix || defaultParams.line_height_default.suffix;
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({
    author: setVal.author,
    publishedDate: setVal.publishedDate,
    comments: setVal.comments,
    authorLabel: setVal.authorLabel,
    showAvatar: setVal.showAvatar,
    avatarSize: setVal.avatarSize,
    wordsPerMinute: setVal.wordsPerMinute,
    updatedLabel: setVal.updatedLabel,
    showUpdatedLabel: setVal.showUpdatedLabel,
    fontSize: setVal.fontSize,
    lineHeight: setVal.lineHeight,
    letterSpacing: setVal.letterSpacing,
    fontWeight: setVal.fontWeight,
    textTransform: setVal.textTransform,
    flag: false
  });
  const updateValues = nextValue => {
    setValue({
      ...value,
      ...nextValue
    });
    control.setting.set({
      ...control.setting.get(),
      ...nextValue,
      flag: !control.setting.get().flag
    });
  };
  const {
    label,
    font_family_control,
    refresh_on_reset
  } = control.params;
  const {
    disable_transform,
    size_default,
    size_units,
    line_height_default,
    line_height_units,
    letter_spacing_default
  } = controlParams;
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_PostMeta__WEBPACK_IMPORTED_MODULE_1__["default"], {
    label: label,
    value: value,
    fontFamilyControl: font_family_control,
    withTextTransform: disable_transform,
    defaultFS: size_default,
    fSUnit: size_units,
    onChange: updateValues,
    refreshAfterReset: refresh_on_reset,
    defaultLH: line_height_default,
    lHunit: line_height_units,
    defaultLS: letter_spacing_default
  });
};
PostMetaComponent.propTypes = {
  control: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PostMetaComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/presets-footer/Control.js":
/*!***********************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/presets-footer/Control.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   PresetsFooterControl: () => (/* binding */ PresetsFooterControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _PresetsFooterComponent_tsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PresetsFooterComponent.tsx */ "./assets/apps/customizer-controls/src/presets-footer/PresetsFooterComponent.tsx");

/* jshint esversion: 6 */



const PresetsFooterControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_PresetsFooterComponent_tsx__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/presets-selector/Control.js":
/*!*************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/presets-selector/Control.js ***!
  \*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   PresetsSelectorControl: () => (/* binding */ PresetsSelectorControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _PresetsSelectorComponent_tsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PresetsSelectorComponent.tsx */ "./assets/apps/customizer-controls/src/presets-selector/PresetsSelectorComponent.tsx");

/* jshint esversion: 6 */



const PresetsSelectorControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_PresetsSelectorComponent_tsx__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/product-element-add-to-cart/Control.js":
/*!************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/product-element-add-to-cart/Control.js ***!
  \************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ProductElementAddToCartControl: () => (/* binding */ ProductElementAddToCartControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _ProductElementAddToCartComponent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ProductElementAddToCartComponent.js */ "./assets/apps/customizer-controls/src/product-element-add-to-cart/ProductElementAddToCartComponent.js");

/* jshint esversion: 6 */


const ProductElementAddToCartControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_ProductElementAddToCartComponent_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/product-element-add-to-cart/ProductElementAddToCart.js":
/*!****************************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/product-element-add-to-cart/ProductElementAddToCart.js ***!
  \****************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);

/* global SolaceReactCustomize */





const ProductElementAddToCart = ({
  label,
  value,
  onChange,
  relation,
  control
}) => {
  const [currentDevice, setCurrentDevice] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)('desktop');
  const [visible, setVisible] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
  const [popoverCoords, setPopoverCoords] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({
    top: 0,
    left: 0
  });
  const popoverRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    const handleGetPopupClick = e => {
      const controlID = control.id;
      const baseIds = ['svg', 'g', 'path1', 'path2'];
      const ids = [controlID, ...baseIds.map(prefix => `${prefix}-${controlID}`)];
      if (ids.includes(e.target.id)) {
        const rect = e.target.getBoundingClientRect();
        if (rect.y > 300) {
          setPopoverCoords({
            top: rect.bottom - 25,
            left: rect.left + 50,
            y: rect.y - 200
          });
        } else {
          setPopoverCoords({
            top: rect.bottom - 25,
            left: rect.left + 50,
            y: rect.y
          });
        }
        setVisible(true);
      }
    };
    document.addEventListener('click', handleGetPopupClick);
    return () => {
      document.removeEventListener('click', handleGetPopupClick);
    };
  });
  const renderTitle = () => {
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-white-background-control solace-range-control"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-control-header"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: "customize-control-title"
    }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Title', 'solace'))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.__experimentalInputControl, {
      value: value.title,
      onChange: nextValue => {
        wp.customize.previewer.refresh();
        const newVal = nextValue;
        onChange({
          title: newVal
        });
      }
    }));
  };
  const renderButtonWidth = () => {
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-white-background-control solace-range-control"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-control-header"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: "customize-control-title"
    }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Button Width', 'solace')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.ResponsiveControl, {
      hideResponsive: true
    })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "range-wrap"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.RangeControl, {
      value: value.buttonWidth[currentDevice],
      min: 5,
      max: 100,
      step: 1,
      onChange: val => {
        const nextVal = value.buttonWidth;
        nextVal[currentDevice] = val;
        onChange({
          value: nextVal
        });
      }
    })));
  };
  const bottomSpacing = () => {
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-white-background-control solace-range-control"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-control-header"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: "customize-control-title"
    }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Bottom Spacing', 'solace')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.ResponsiveControl, {
      hideResponsive: true
    })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "range-wrap"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.RangeControl, {
      value: value.bottomSpacing[currentDevice],
      min: 1,
      max: 250,
      step: 1,
      onChange: val => {
        const nextVal = value.bottomSpacing;
        nextVal[currentDevice] = val;
        onChange({
          value: nextVal
        });
      }
    })));
  };
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, visible && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Popover, {
    className: "popover-product-element-add-to-cart solace-remove-style-popover-transform",
    onFocusOutside: () => {
      setVisible(false);
    },
    ref: popoverRef,
    style: {
      position: 'absolute',
      top: popoverCoords.top,
      left: popoverCoords.left
    }
  }, label && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "customize-control-title"
  }, label), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-product-element-add-to-cart-control solace-white-background-control",
    style: {
      position: 'absolute',
      left: popoverCoords.left - 10,
      top: popoverCoords.y - 15,
      backgroundColor: 'var(--sol-customizer-panel-bg-color)',
      color: '#fff',
      border: '1px solid var(--sol-customizer-line-color)',
      borderRadius: '10px'
    }
  }, renderTitle(), renderButtonWidth(), bottomSpacing())));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ProductElementAddToCart);
const responsiveShape = {
  mobile: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number)]),
  tablet: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number)]),
  desktop: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number)])
};
ProductElementAddToCart.propTypes = {
  label: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().string),
  value: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape({
    buttonWidth: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape({
      suffix: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape(responsiveShape),
      ...responsiveShape
    }),
    bottomSpacing: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape({
      suffix: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape(responsiveShape),
      ...responsiveShape
    })
  }),
  refreshAfterReset: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().bool),
  onChange: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func).isRequired
};

/***/ }),

/***/ "./assets/apps/customizer-controls/src/product-element-add-to-cart/ProductElementAddToCartComponent.js":
/*!*************************************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/product-element-add-to-cart/ProductElementAddToCartComponent.js ***!
  \*************************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _ProductElementAddToCart_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ProductElementAddToCart.js */ "./assets/apps/customizer-controls/src/product-element-add-to-cart/ProductElementAddToCart.js");




const ProductElementAddToCartComponent = ({
  control
}) => {
  let setVal = control.setting.get();
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({
    buttonWidth: setVal.buttonWidth,
    bottomSpacing: setVal.bottomSpacing,
    title: setVal.title,
    flag: false
  });
  const updateValues = nextValue => {
    setValue({
      ...value,
      ...nextValue
    });
    control.setting.set({
      ...control.setting.get(),
      ...nextValue,
      flag: !control.setting.get().flag
    });
  };
  const {
    label,
    refresh_on_reset,
    relation
  } = control.params;
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_ProductElementAddToCart_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
    label: label,
    value: value,
    onChange: updateValues,
    relation: relation,
    control: control,
    refreshAfterReset: refresh_on_reset
  });
};
ProductElementAddToCartComponent.propTypes = {
  control: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ProductElementAddToCartComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/public-path.js":
/*!************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/public-path.js ***!
  \************************************************************/
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {

// eslint-disable-next-line camelcase,no-undef
__webpack_require__.p = window.SolaceReactCustomize.bundlePath;

/***/ }),

/***/ "./assets/apps/customizer-controls/src/radio-buttons/Control.js":
/*!**********************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/radio-buttons/Control.js ***!
  \**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   RadioButtonsControl: () => (/* binding */ RadioButtonsControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _RadioButtonsComponent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RadioButtonsComponent.js */ "./assets/apps/customizer-controls/src/radio-buttons/RadioButtonsComponent.js");

/* jshint esversion: 6 */



const RadioButtonsControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_RadioButtonsComponent_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/radio-buttons/RadioButtonsComponent.js":
/*!************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/radio-buttons/RadioButtonsComponent.js ***!
  \************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/code.js");

/*eslint camelcase: ["error", {allow: ["is_for","large_buttons","user_icon_style1","user_icon_style2","user_icon_style3","user_icon_style4","user_icon_style5",,"user_icon_style6","user_avatar"]}]*/





const RadioButtonsComponent = ({
  control
}) => {
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(control.setting.get());
  const {
    custom
  } = control.settings;
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    document.addEventListener('solace-changed-customizer-value', e => {
      if (!e.detail) return false;
      if (e.detail.id !== control.id) return false;
      updateValue(e.detail.value);
    });
  }, []);
  const updateValue = newVal => {
    setValue(newVal);
    control.setting.set(newVal);
  };
  const getChoices = () => {
    const {
      is_for,
      choices
    } = control.params;
    if (!is_for) {
      return choices;
    }
    switch (is_for) {
      case 'button_base':
        return {
          button1: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Button 1', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.button1
          },
          button2: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Button 2', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.button2
          }
        };
      case 'logo':
        return {
          default: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Logo Only', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.logoOnly
          },
          logoTitle: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Logo - Title & Tagline', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.logoTitle
          }
          // titleLogo: {
          // 	tooltip: __('Title & Tagline - Logo', 'solace'),
          // 	icon: SVG.titleLogo,
          // },
          // logoTopTitle: {
          // 	tooltip: __('Logo on Top', 'solace'),
          // 	icon: SVG.logoTopTitle,
          // },
        };
      case 'menu':
        return {
          'style-plain': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Plain', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.menuPlain
          },
          'style-full-height': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Background', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.menuFilled
          },
          'style-border-bottom': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Bottom Border', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.menuUnderline
          },
          'style-border-top': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Top Border', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.menuOverline
          }
        };
      case 'account_component':
        return {
          user_icon_style1: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Style 2', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.myAccountUserSolid
          },
          user_icon_style2: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Style 1', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.myAccountUserRegular
          },
          user_icon_style3: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Style 3', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.myAccountUserTagSolid
          },
          user_icon_style4: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Style 4', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.myAccountUserAltSolid
          },
          user_icon_style5: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Style 5', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.myAccountUsersSolid
          },
          user_icon_style6: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Style 6', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.myAccountUsersFirendsSolid
          },
          user_avatar: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('WordPress Avatar', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.myAccountUserAvatar
          },
          none: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('No Icon', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.myAccountNone
          }
        };
      case 'cart_component':
        return {
          'cart-icon-style1': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Style 1', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.cartIconStyle1
          },
          'cart-icon-style2': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Style 2', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.cartIconStyle2
          },
          'cart-icon-style3': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Style 3', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.cartIconStyle3
          },
          'cart-icon-style4': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Style 4', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.cartIconStyle4
          },
          'cart-icon-style5': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Style 5', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.cartIconStyle5
          },
          'cart-icon-style6': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Style 6', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.cartIconStyle6
          }
        };
      case 'palette_switch':
        return {
          contrast: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Contrast', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.paletteIconStyle1
          },
          night: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Night', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.paletteIconStyle2
          },
          toggle: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Toggle', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.paletteIconStyle3
          },
          accessibility: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Accessibility', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.paletteIconStyle4
          }
        };
      case 'account':
        return {
          account1: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Account1', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.accountIconStyle1
          },
          account2: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Account2', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.accountIconStyle2
          },
          account3: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Account3', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.accountIconStyle3
          },
          account4: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Account4', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.accountIconStyle4
          },
          account5: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Account5', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.accountIconStyle5
          }
        };
      case 'sol_search':
        return {
          search1: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Search1', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.searchIconStyle1
          },
          search2: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Search2', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.searchIconStyle2
          },
          search3: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Search3', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.searchIconStyle3
          },
          search4: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Search4', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.searchIconStyle4
          },
          search5: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Search5', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.searchIconStyle5
          }
        };
      case 'sol_cart':
        return {
          cart1: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Cart1', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.cartIconStyle1
          },
          cart2: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Cart2', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.cartIconStyle2
          },
          cart3: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Cart3', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.cartIconStyle3
          },
          cart4: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Cart4', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.cartIconStyle4
          },
          cart5: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Cart5', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.cartIconStyle5
          }
        };
      case 'sol_menu':
        return {
          menu1: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Menu1', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.menuIconStyle1
          },
          menu2: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Menu2', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.menuIconStyle2
          },
          menu3: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Menu3', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.menuIconStyle3
          },
          menu4: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Menu4', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.menuIconStyle4
          },
          menu5: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Menu5', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.menuIconStyle5
          }
        };
      case 'scroll_to_top':
        return {
          'stt-icon-style-1': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Style 1', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.sttIcon1
          },
          'stt-icon-style-2': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Style 2', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.sttIcon2
          },
          'stt-icon-style-3': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Style 3', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.sttIcon3
          },
          'stt-icon-style-4': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Style 4', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.sttIcon4
          },
          'stt-icon-style-5': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Style 5', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.sttIcon5
          },
          'stt-icon-style-6': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Style 6', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.sttIcon6
          }
        };
      case 'menu_caret':
        return {
          'mc-icon-style-1': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Style 1', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.mcIcon1
          },
          'mc-icon-style-2': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Style 2', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.mcIcon2
          },
          'mc-icon-style-3': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Style 3', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.mcIcon3
          },
          'mc-icon-style-4': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Style 4', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.mcIcon4
          },
          'mc-icon-style-5': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Style 5', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.mcIcon5
          },
          'mc-icon-style-6': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Style 6', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.mcIcon6
          }
        };
    }
  };
  const {
    label,
    large_buttons,
    showLabels
  } = control.params;
  const options = getChoices();
  if (custom) {
    options.custom = {
      tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Custom SVG', 'solace'),
      icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_3__["default"]
    };
  }
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-white-background-control"
  }, label && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "customize-control-title"
  }, label), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.RadioIcons, {
    largeButtons: large_buttons,
    showLabels: showLabels,
    value: value,
    customSetting: custom,
    options: options,
    onChange: updateValue
  }));
};
RadioButtonsComponent.propTypes = {
  control: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (RadioButtonsComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/radio-image/Control.js":
/*!********************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/radio-image/Control.js ***!
  \********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   RadioImageControl: () => (/* binding */ RadioImageControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _RadioImageComponent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RadioImageComponent.js */ "./assets/apps/customizer-controls/src/radio-image/RadioImageComponent.js");

/* jshint esversion: 6 */



const RadioImageControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_RadioImageComponent_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/radio-image/RadioImageComponent.js":
/*!********************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/radio-image/RadioImageComponent.js ***!
  \********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__);

/* jshint esversion: 6 */



const RadioImageComponent = ({
  control
}) => {
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(control.setting.get());
  const {
    choices,
    label,
    documentation
  } = control.params;
  const updateValue = newVal => {
    setValue(newVal);
    control.setting.set(newVal);
  };
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.RadioImage, {
    label: label,
    documentation: documentation,
    choices: choices,
    onClick: updateValue,
    value: value
  });
};
RadioImageComponent.propTypes = {
  control: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (RadioImageComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/radio-popup/Control.js":
/*!********************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/radio-popup/Control.js ***!
  \********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   RadioPopupControl: () => (/* binding */ RadioPopupControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _RadioPopupComponent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RadioPopupComponent.js */ "./assets/apps/customizer-controls/src/radio-popup/RadioPopupComponent.js");

/* jshint esversion: 6 */



const RadioPopupControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_RadioPopupComponent_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/radio-popup/RadioPopupComponent.js":
/*!********************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/radio-popup/RadioPopupComponent.js ***!
  \********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/code.js");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);

/*eslint camelcase: ["error", {allow: ["is_for","large_buttons","user_icon_style1","user_icon_style2","user_icon_style3","user_icon_style4","user_icon_style5",,"user_icon_style6","user_avatar"]}]*/






const RadioPopupComponent = ({
  control
}) => {
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(control.setting.get());
  const [visible, setVisible] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
  const {
    custom
  } = control.settings;
  const [popoverCoords, setPopoverCoords] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({
    top: 0,
    left: 0
  });
  const popoverRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
  const updateValue = newVal => {
    setValue(newVal);
    control.setting.set(newVal);
  };
  const handleCustomizerValueChange = e => {
    if (!e.detail || e.detail.id !== control.id) return;
    updateValue(e.detail.value);
  };
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    document.addEventListener('solace-changed-customizer-value', handleCustomizerValueChange);
    return () => {
      document.removeEventListener('solace-changed-customizer-value', handleCustomizerValueChange);
    };
  }, [control.id]);
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    const handleGetPopupClickRadioPopup = e => {
      const controlID = 'solace_single_post_element__categories';
      const baseIds = ['svg', 'g', 'path1', 'path2'];
      const ids = [controlID, ...baseIds.map(prefix => `${prefix}-${controlID}`)];
      if (ids.includes(e.target.id)) {
        const rect = e.target.getBoundingClientRect();
        setPopoverCoords({
          top: rect.bottom - 25,
          left: rect.left + 50,
          y: rect.y
        });
        setVisible(true);
      }
    };
    document.addEventListener('click', handleGetPopupClickRadioPopup);
    return () => {
      document.removeEventListener('click', handleGetPopupClickRadioPopup);
    };
  }, [control.id, value]);
  const getChoices = () => {
    const {
      is_for,
      choices
    } = control.params;
    if (!is_for) {
      return choices;
    }
    switch (is_for) {
      case 'separators':
        return {
          separator1: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Separator 1', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.separator1
          },
          separator2: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Separator 2', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.separator2
          },
          separator3: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Separator 3', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.separator3
          },
          separator4: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Separator 4', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.separator4
          }
        };
      case 'button_base':
        return {
          button1: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Button 1', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.button1
          },
          button2: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Button 2', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.button2
          }
        };
      case 'logo':
        return {
          default: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Logo Only', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.logoOnly
          },
          logoTitle: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Logo - Title & Tagline', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.logoTitle
          }
          // titleLogo: {
          // 	tooltip: __('Title & Tagline - Logo', 'solace'),
          // 	icon: SVG.titleLogo,
          // },
          // logoTopTitle: {
          // 	tooltip: __('Logo on Top', 'solace'),
          // 	icon: SVG.logoTopTitle,
          // },
        };
      case 'menu':
        return {
          'style-plain': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Plain', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.menuPlain
          },
          'style-full-height': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Background', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.menuFilled
          },
          'style-border-bottom': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Bottom Border', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.menuUnderline
          },
          'style-border-top': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Top Border', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.menuOverline
          }
        };
      case 'account_component':
        return {
          user_icon_style1: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Style 2', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.myAccountUserSolid
          },
          user_icon_style2: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Style 1', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.myAccountUserRegular
          },
          user_icon_style3: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Style 3', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.myAccountUserTagSolid
          },
          user_icon_style4: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Style 4', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.myAccountUserAltSolid
          },
          user_icon_style5: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Style 5', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.myAccountUsersSolid
          },
          user_icon_style6: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Style 6', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.myAccountUsersFirendsSolid
          },
          user_avatar: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('WordPress Avatar', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.myAccountUserAvatar
          },
          none: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('No Icon', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.myAccountNone
          }
        };
      case 'cart_component':
        return {
          'cart-icon-style1': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Style 1', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.cartIconStyle1
          },
          'cart-icon-style2': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Style 2', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.cartIconStyle2
          },
          'cart-icon-style3': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Style 3', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.cartIconStyle3
          },
          'cart-icon-style4': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Style 4', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.cartIconStyle4
          },
          'cart-icon-style5': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Style 5', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.cartIconStyle5
          },
          'cart-icon-style6': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Style 6', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.cartIconStyle6
          }
        };
      case 'palette_switch':
        return {
          contrast: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Contrast', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.paletteIconStyle1
          },
          night: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Night', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.paletteIconStyle2
          },
          toggle: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Toggle', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.paletteIconStyle3
          },
          accessibility: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Accessibility', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.paletteIconStyle4
          }
        };
      case 'account':
        return {
          account1: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Account1', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.accountIconStyle1
          },
          account2: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Account2', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.accountIconStyle2
          },
          account3: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Account3', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.accountIconStyle3
          },
          account4: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Account4', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.accountIconStyle4
          },
          account5: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Account5', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.accountIconStyle5
          }
        };
      case 'sol_search':
        return {
          search1: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Search1', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.searchIconStyle1
          },
          search2: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Search2', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.searchIconStyle2
          },
          search3: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Search3', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.searchIconStyle3
          },
          search4: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Search4', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.searchIconStyle4
          },
          search5: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Search5', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.searchIconStyle5
          }
        };
      case 'sol_cart':
        return {
          cart1: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Cart1', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.cartIconStyle1
          },
          cart2: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Cart2', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.cartIconStyle2
          },
          cart3: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Cart3', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.cartIconStyle3
          },
          cart4: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Cart4', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.cartIconStyle4
          },
          cart5: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Cart5', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.cartIconStyle5
          }
        };
      case 'sol_menu':
        return {
          menu1: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Menu1', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.menuIconStyle1
          },
          menu2: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Menu2', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.menuIconStyle2
          },
          menu3: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Menu3', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.menuIconStyle3
          },
          menu4: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Menu4', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.menuIconStyle4
          },
          menu5: {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Menu5', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.menuIconStyle5
          }
        };
      case 'scroll_to_top':
        return {
          'stt-icon-style-1': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Style 1', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.sttIcon1
          },
          'stt-icon-style-2': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Style 2', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.sttIcon2
          },
          'stt-icon-style-3': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Style 3', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.sttIcon3
          },
          'stt-icon-style-4': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Style 4', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.sttIcon4
          },
          'stt-icon-style-5': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Style 5', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.sttIcon5
          },
          'stt-icon-style-6': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Style 6', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.sttIcon6
          }
        };
      case 'menu_caret':
        return {
          'mc-icon-style-1': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Style 1', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.mcIcon1
          },
          'mc-icon-style-2': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Style 2', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.mcIcon2
          },
          'mc-icon-style-3': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Style 3', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.mcIcon3
          },
          'mc-icon-style-4': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Style 4', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.mcIcon4
          },
          'mc-icon-style-5': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Style 5', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.mcIcon5
          },
          'mc-icon-style-6': {
            tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Icon Style 6', 'solace'),
            icon: _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.SVG.mcIcon6
          }
        };
    }
  };
  const {
    label,
    large_buttons,
    showLabels
  } = control.params;
  const options = getChoices();
  if (custom) {
    options.custom = {
      tooltip: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Custom SVG', 'solace'),
      icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__["default"]
    };
  }
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, visible && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Popover, {
    className: "popover-radio-popup solace-remove-style-popover-transform",
    onFocusOutside: () => {
      setVisible(false);
    },
    ref: popoverRef,
    style: {
      position: 'absolute',
      top: popoverCoords.top,
      left: popoverCoords.left
    }
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-white-background-control solace-radio-popup-control",
    style: {
      position: 'absolute',
      left: popoverCoords.left - 10,
      top: popoverCoords.y - 15,
      backgroundColor: 'var(--sol-customizer-panel-bg-color)',
      color: '#fff',
      border: '1px solid var(--sol-customizer-line-color)',
      borderRadius: '10px'
    }
  }, label && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "customize-control-title"
  }, label), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.RadioIcons, {
    largeButtons: large_buttons,
    showLabels: showLabels,
    value: value,
    customSetting: custom,
    options: options
    // onChange={updateValue}
    ,
    onChange: newVal => {
      updateValue(newVal);
    }
  }))));
};
RadioPopupComponent.propTypes = {
  control: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (RadioPopupComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/range/Control.js":
/*!**************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/range/Control.js ***!
  \**************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   RangeControl: () => (/* binding */ RangeControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _RangeComponent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RangeComponent.js */ "./assets/apps/customizer-controls/src/range/RangeComponent.js");

/* jshint esversion: 6 */



const RangeControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_RangeComponent_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/range/Range.js":
/*!************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/range/Range.js ***!
  \************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);



const Range = ({
  label,
  defaultVal,
  value,
  onChange,
  min = 0,
  max = 100,
  step = 1
}) => {
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-white-background-control solace-range-control"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-control-header"
  }, label && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "customize-control-title"
  }, label)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "range-wrap"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.RangeControl, {
    resetFallbackValue: defaultVal === 0 ? 0 : defaultVal || '',
    value: parseInt(value) === 0 ? 0 : value || '',
    min: min < 0 ? min : 0,
    max: max,
    step: step,
    allowReset: true,
    onChange: onChange
  })));
};
Range.propTypes = {
  defaultVal: prop_types__WEBPACK_IMPORTED_MODULE_2___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_2___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_2___default().number)]),
  onChange: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().func).isRequired,
  value: prop_types__WEBPACK_IMPORTED_MODULE_2___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_2___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_2___default().number)]),
  label: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().string),
  min: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().number),
  max: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().number),
  step: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().number)
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Range);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/range/RangeComponent.js":
/*!*********************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/range/RangeComponent.js ***!
  \*********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _Range__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Range */ "./assets/apps/customizer-controls/src/range/Range.js");

/* jshint esversion: 6 */




const RangeComponent = ({
  control
}) => {
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    document.addEventListener('solace-changed-customizer-value', e => {
      if (!e.detail) return false;
      if (e.detail.id !== control.id) return false;
      updateValues(e.detail.value);
    });
  }, []);
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(control.setting.get());
  const defaults = {
    min: 0,
    max: 100,
    defaultVal: 15,
    step: 1
  };
  const controlProps = {
    ...defaults,
    ...(control.params.input_attrs || {})
  };
  const {
    label
  } = control.params;
  const {
    defaultVal,
    min,
    max,
    step
  } = controlProps;
  const updateValues = newVal => {
    setValue(newVal);
    control.setting.set(newVal);
  };
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Range__WEBPACK_IMPORTED_MODULE_1__["default"], {
    value: value,
    label: label,
    defaultVal: defaultVal,
    onChange: updateValues,
    step: step,
    min: min,
    max: max
  });
};
RangeComponent.propTypes = {
  control: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (RangeComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/repeater/Control.js":
/*!*****************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/repeater/Control.js ***!
  \*****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   RepeaterControl: () => (/* binding */ RepeaterControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _RepeaterComponent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RepeaterComponent.js */ "./assets/apps/customizer-controls/src/repeater/RepeaterComponent.js");



const RepeaterControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_RepeaterComponent_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/repeater/IconSelector.js":
/*!**********************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/repeater/IconSelector.js ***!
  \**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);





const IconsContent = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.lazy)(() => __webpack_require__.e(/*! import() */ "assets_apps_customizer-controls_src_repeater_IconsContent_js").then(__webpack_require__.bind(__webpack_require__, /*! ./IconsContent */ "./assets/apps/customizer-controls/src/repeater/IconsContent.js")));
const IconSelector = ({
  label,
  value,
  onIconChoice,
  icons
}) => {
  const [visible, setVisible] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
  const handleRemove = () => {
    onIconChoice('');
  };
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-control-header icon-control"
  }, label && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "customize-control-title"
  }, label), icons[value] && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ButtonGroup, {
    className: "icon-setter"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
    className: "repeater-icon-preview",
    onClick: () => setVisible(!visible)
  }, icons[value]), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
    className: "repeater-delete-icon",
    onClick: handleRemove
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Icon, {
    icon: "no-alt"
  }))), !icons[value] && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
    className: "add-icon-button",
    onClick: () => setVisible(!visible)
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Icon, {
    icon: "plus-alt2"
  })), visible && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Popover, {
    position: "bottom left",
    onFocusOutside: () => {
      setVisible(!visible);
    }
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Suspense, {
    fallback: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Spinner, null)
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(IconsContent, {
    onIconChoice: onIconChoice,
    setVisible: setVisible,
    icons: icons
  }))));
};
IconSelector.propTypes = {
  label: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().string).isRequired,
  value: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().string).isRequired,
  onIconChoice: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().func).isRequired,
  icons: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (IconSelector);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/repeater/Repeater.js":
/*!******************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/repeater/Repeater.js ***!
  \******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _scss_repeater_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../scss/_repeater.scss */ "./assets/apps/customizer-controls/src/scss/_repeater.scss");
/* harmony import */ var _RepeaterItem__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./RepeaterItem */ "./assets/apps/customizer-controls/src/repeater/RepeaterItem.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var react_sortablejs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-sortablejs */ "./node_modules/react-sortablejs/dist/index.js");
/* harmony import */ var react_sortablejs__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_sortablejs__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__);








const Repeater = ({
  label,
  fields,
  allowNew,
  value,
  onUpdate,
  newItemFields
}) => {
  const [sorting, setSorting] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
  const itemFields = Object.keys(newItemFields).length > 0 ? newItemFields : fields;
  const handleToggle = index => {
    const newValue = [...value];
    newValue[index].visibility = value[index].visibility === 'yes' ? 'no' : 'yes';
    onUpdate(newValue);
  };
  const handleAddItem = () => {
    const newValue = [...value];
    const newItem = {};
    for (const [field] of Object.entries(itemFields)) {
      newItem.visibility = 'yes';
      if (typeof value[0][field] === 'boolean') {
        newItem[field] = true;
        if (field === 'hide_on_mobile') {
          newItem[field] = false;
        }
        continue;
      }

      // If the type is variable, get the first type in the array.
      let type = itemFields[field].type;
      if (typeof type === 'object') {
        type = Object.values(itemFields[field].type)[0];
      }

      // If field type is select, the default value for a new field is the first item from select options
      if (type === 'select') {
        let choices = itemFields[field].choices;
        if (typeof Object.values(choices)[0] === 'object') {
          choices = Object.values(itemFields[field].choices)[0];
        }
        newItem[field] = Object.keys(choices)[0];
        continue;
      }
      newItem[field] = itemFields[field].default;
    }
    newValue.push(newItem);
    onUpdate(newValue);
  };
  const handleRemove = index => {
    const newValue = [...value];
    newValue.splice(index, 1);
    onUpdate(newValue);
  };
  const handleContentChange = (index, newItemValue) => {
    const newValue = [...value];
    newValue[index] = newItemValue;
    onUpdate(newValue);
  };
  const setList = l => {
    const final = l.map(i => {
      Object.keys(i).forEach(k => {
        if (![...Object.keys(itemFields), 'title', 'visibility', 'blocked', 'slug'].includes(k)) {
          delete i[k];
        }
      });
      return i;
    });
    onUpdate(final);
    return final;
  };
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "nv-repeater"
  }, label && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "customize-control-title"
  }, label), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(react_sortablejs__WEBPACK_IMPORTED_MODULE_4__.ReactSortable, {
    className: "nv-repeater-items-container",
    list: value,
    setList: (newItems, _, {
      dragging
    }) => {
      if (!dragging) {
        return;
      }
      setList(newItems);
    },
    animation: 300,
    forceFallback: true,
    handle: ".nv-repeater-handle"
  }, value.map((val, index) => {
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_RepeaterItem__WEBPACK_IMPORTED_MODULE_2__["default"], {
      className: "nv-repeater-item",
      newItemFields: newItemFields,
      fields: fields,
      value: value,
      itemIndex: index,
      onToggle: handleToggle,
      onContentChange: newItemValue => handleContentChange(index, newItemValue),
      onRemove: handleRemove,
      index: index,
      sorting: sorting,
      key: 'repeater-item-' + index
    });
  })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "nv-repeater-options"
  }, value.length > 1 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, {
    className: "nv-repeater-reorder-button",
    isLink: true,
    onClick: () => {
      setSorting(!sorting);
    }
  }, sorting ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Done', 'solace') : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Reorder', 'solace')), !sorting && allowNew === 'yes' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, {
    isSecondary: true,
    onClick: handleAddItem,
    className: "nv-repeater-add-item-button"
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Add Item', 'solace'))));
};
Repeater.propTypes = {
  value: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().array).isRequired,
  fields: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().object).isRequired,
  newItemFields: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().object),
  allowNew: prop_types__WEBPACK_IMPORTED_MODULE_6___default().oneOf(['no', 'yes']).isRequired,
  onUpdate: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().func).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Repeater);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/repeater/RepeaterComponent.js":
/*!***************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/repeater/RepeaterComponent.js ***!
  \***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _Repeater__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Repeater */ "./assets/apps/customizer-controls/src/repeater/Repeater.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__);

/* jshint esversion: 6 */




const RepeaterComponent = ({
  control
}) => {
  const {
    label,
    components,
    fields
  } = control.params;
  const allowNewFields = control.params.allow_new_fields;
  const newItemFields = control.params.new_item_fields;
  const normalizeValue = val => {
    if (components.length === 0) {
      return val;
    }

    /**
     * Check that value contains blocked elements only from components array.
     */
    const finalValue = val.filter(el => {
      return !(el.blocked === 'yes' && !Object.keys(components).includes(el.slug));
    });

    /**
     * Check that all components are included in the returned value.
     */
    Object.keys(components).forEach(key => {
      if (finalValue.filter(e => e.slug === key).length === 0) {
        const newItem = {
          slug: key,
          title: components[key],
          visibility: 'no',
          blocked: 'yes'
        };
        Object.keys(fields).forEach(field => {
          newItem[field] = '';
        });
        finalValue.push(newItem);
      }
    });
    if (allowNewFields === 'no') {
      return finalValue.filter(el => {
        return el.slug;
      });
    }
    return finalValue;
  };
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(normalizeValue((0,_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.maybeParseJson)(control.setting.get())));
  const allowNew = control.params.allow_new_fields;
  const updateValue = newVal => {
    setValue(newVal);
    control.setting.set(JSON.stringify(newVal));
  };
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Repeater__WEBPACK_IMPORTED_MODULE_1__["default"], {
    label: label,
    fields: fields,
    newItemFields: newItemFields,
    allowNew: allowNew,
    value: value,
    onUpdate: updateValue
  });
};
RepeaterComponent.propTypes = {
  control: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (RepeaterComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/repeater/RepeaterItem.js":
/*!**********************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/repeater/RepeaterItem.js ***!
  \**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _RepeaterItemContent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RepeaterItemContent */ "./assets/apps/customizer-controls/src/repeater/RepeaterItemContent.js");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_5__);







const Handle = () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Tooltip, {
  text: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Drag to Reorder', 'solace')
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
  "aria-label": (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Drag to Reorder', 'solace'),
  className: "nv-repeater-handle",
  onClick: e => {
    e.preventDefault();
  }
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Icon, {
  icon: "menu"
})));
const RepeaterItem = ({
  fields,
  newItemFields,
  value,
  itemIndex,
  sorting,
  onToggle,
  onContentChange,
  onRemove
}) => {
  const [expanded, setExpanded] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
  const arrowUp = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Icon, {
    icon: "arrow-up"
  });
  const arrowDown = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Icon, {
    icon: "arrow-down"
  });
  const visibleIcon = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Icon, {
    icon: "visibility"
  });
  const hiddenIcon = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Icon, {
    icon: "hidden"
  });
  const itemLabel = () => {
    let label = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Item', 'solace');
    if (value[itemIndex].title) {
      label = value[itemIndex].title;
    }
    if (value[itemIndex].field) {
      label = value[itemIndex].field;
    }
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: "repeater-item-title"
    }, label);
  };
  const toggleExpand = e => {
    e.preventDefault();
    setExpanded(!expanded);
  };
  const visible = value[itemIndex].visibility === 'yes';
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "nv-repeater-item"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: classnames__WEBPACK_IMPORTED_MODULE_3___default()(['nv-repeater-item-header', {
      'visibility-hidden': !visible
    }])
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Tooltip, {
    text: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Toggle Visibility', 'solace')
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
    "aria-label": (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Toggle Visibility', 'solace'),
    className: "repeater-visibility-button",
    onClick: e => {
      e.preventDefault();
      e.stopPropagation();
      onToggle(itemIndex);
    }
  }, visible ? visibleIcon : hiddenIcon)), !sorting && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
    className: "nv-repeater-expand-button",
    onClick: toggleExpand
  }, itemLabel(), expanded ? arrowUp : arrowDown), sorting && itemLabel(), sorting && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Handle, null)), !sorting && expanded && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_RepeaterItemContent__WEBPACK_IMPORTED_MODULE_1__["default"], {
    fields: fields,
    newItemFields: newItemFields,
    value: value,
    index: itemIndex,
    onContentChange: onContentChange,
    onRemove: index => {
      setExpanded(false);
      onRemove(index);
    }
  }));
};
RepeaterItem.propTypes = {
  fields: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().object).isRequired,
  newItemFields: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().object).isRequired,
  value: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().array).isRequired,
  itemIndex: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().number).isRequired,
  sorting: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().bool).isRequired,
  onToggle: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().func).isRequired,
  onContentChange: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().func).isRequired,
  onRemove: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().func).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (RepeaterItem);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/repeater/RepeaterItemContent.js":
/*!*****************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/repeater/RepeaterItemContent.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _IconSelector__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./IconSelector */ "./assets/apps/customizer-controls/src/repeater/IconSelector.js");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _range_Range__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../range/Range */ "./assets/apps/customizer-controls/src/range/Range.js");








const RepeaterItemContent = ({
  fields,
  newItemFields,
  value,
  index,
  onContentChange,
  onRemove
}) => {
  const isBlocked = value[index].blocked === 'yes';
  const currentFields = Object.keys(newItemFields).length > 0 && isBlocked === false ? newItemFields : fields;
  const changeContent = (type, newData) => {
    const newItemValue = {
      ...value[index]
    };
    const needsToUpdate = fields[type] ? fields[type].dependent : false;
    if (needsToUpdate) {
      let currentType = fields[needsToUpdate].type;
      if (typeof currentType === 'object') {
        currentType = currentType[newData];
      }
      if (currentType === 'select') {
        let choices = fields[needsToUpdate].choices;
        if (typeof choices === 'object') {
          choices = Object.keys(choices[newData])[0];
        }
        newItemValue[needsToUpdate] = choices;
      } else {
        newItemValue[needsToUpdate] = '';
      }
    }
    newItemValue[type] = newData;
    onContentChange(newItemValue);
  };
  const toComponent = (key, val) => {
    const currentField = {
      ...currentFields[key]
    };
    if (currentField.depends_on) {
      const currentValueOfDependent = val[currentField.depends_on];
      for (const [fieldName, fieldValue] of Object.entries(currentField)) {
        if (typeof fieldValue === 'object') {
          currentField[fieldName] = fieldValue[currentValueOfDependent];
        }
      }
    }
    switch (currentField.type) {
      case 'text':
        return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.TextControl, {
          label: currentField.label,
          value: value[index][key] || currentField.default,
          onChange: newData => changeContent(key, newData),
          key: key + index
        });
      case 'icon':
        return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_IconSelector__WEBPACK_IMPORTED_MODULE_3__["default"], {
          label: currentField.label,
          value: value[index][key],
          onIconChoice: newData => changeContent(key, newData),
          icons: (0,_solace_wp_components__WEBPACK_IMPORTED_MODULE_4__.getIcons)(18),
          key: key + index
        });
      case 'color':
        return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_4__.ColorControl, {
          className: "repeater-color-control",
          label: currentField.label,
          selectedColor: value[index][key],
          allowGradient: currentField.gradient || false,
          onChange: newData => changeContent(key, newData),
          key: key + index
        });
      case 'select':
        const defaultOption = [{
          value: '',
          label: 'Select',
          disabled: true
        }];
        return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.SelectControl, {
          label: currentField.label,
          value: value[index][key] || '',
          onChange: newData => changeContent(key, newData),
          options: defaultOption.concat(Object.entries(currentField.choices).map(([k, v]) => {
            return {
              value: k,
              label: v,
              disabled: false
            };
          })),
          key: key + index
        });
      case 'checkbox':
        return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ToggleControl, {
          label: fields[key].label,
          checked: value[index][key],
          onChange: newData => changeContent(key, newData),
          key: key + index
        });
      case 'range':
        return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_range_Range__WEBPACK_IMPORTED_MODULE_6__["default"], (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({
          label: fields[key].label,
          onChange: newVal => changeContent(key, newVal),
          key: key + index,
          value: value[index][key]
        }, fields[key]));
    }
  };
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", {
    className: "nv-repeater-content"
  }, Object.entries(currentFields).map(([key]) => {
    return toComponent(key, value[index]);
  }), value.length > 1 && !isBlocked && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
    className: "nv-repeater-remove-button",
    isDestructive: true,
    isLink: true,
    onClick: () => onRemove(index)
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Remove', 'solace')));
};
RepeaterItemContent.propTypes = {
  fields: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().object).isRequired,
  newItemFields: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().object).isRequired,
  value: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().array).isRequired,
  index: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().number).isRequired,
  onContentChange: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().func).isRequired,
  onRemove: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().func).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (RepeaterItemContent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/responsive-radio-buttons/Control.js":
/*!*********************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/responsive-radio-buttons/Control.js ***!
  \*********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ResponsiveRadioButtonsControl: () => (/* binding */ ResponsiveRadioButtonsControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _ResponsiveRadioButtonsComponent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ResponsiveRadioButtonsComponent.js */ "./assets/apps/customizer-controls/src/responsive-radio-buttons/ResponsiveRadioButtonsComponent.js");

/* jshint esversion: 6 */



const ResponsiveRadioButtonsControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_ResponsiveRadioButtonsComponent_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/responsive-radio-buttons/ResponsiveRadioButtonsComponent.js":
/*!*********************************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/responsive-radio-buttons/ResponsiveRadioButtonsComponent.js ***!
  \*********************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__);

/* jshint esversion: 6 */




const ResponsiveRadioButtonsComponent = ({
  control
}) => {
  const {
    choices,
    label
  } = control.params;
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(control.setting.get());
  const [device, setDevice] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)('desktop');
  const updateValue = newValue => {
    setValue(newValue);
    control.setting.set(newValue);
  };
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    const isMenuAlignment = control.id.indexOf('primary-menu') > -1 || control.id.indexOf('secondary-menu') > -1;
    // Migrate previously string value into responsive.
    if (typeof value === 'string') {
      setValue({
        mobile: isMenuAlignment ? 'left' : value,
        tablet: isMenuAlignment ? 'left' : value,
        desktop: value
      });
    }
    document.addEventListener('solace-changed-customizer-value', e => {
      if (!e.detail) return false;
      if (e.detail.id !== control.id) return false;
      let recievedValue = e.detail.value;

      // Migrate previously string value into responsive.
      if (typeof recievedValue === 'string') {
        recievedValue = {
          mobile: isMenuAlignment ? 'left' : recievedValue,
          tablet: isMenuAlignment ? 'left' : recievedValue,
          desktop: recievedValue
        };
      }
      updateValue(recievedValue);
    });
  }, []);
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-white-background-control"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-control-header"
  }, label && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "customize-control-title"
  }, label), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.ResponsiveControl, {
    onChange: setDevice
  })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.RadioIcons, {
    value: value[device],
    options: choices,
    onChange: newVal => {
      updateValue({
        ...value,
        [device]: newVal
      });
    }
  }));
};
ResponsiveRadioButtonsComponent.propTypes = {
  control: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ResponsiveRadioButtonsComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/responsive-range/Control.js":
/*!*************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/responsive-range/Control.js ***!
  \*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ResponsiveRangeControl: () => (/* binding */ ResponsiveRangeControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _ResponsiveRangeComponent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ResponsiveRangeComponent.js */ "./assets/apps/customizer-controls/src/responsive-range/ResponsiveRangeComponent.js");

/* jshint esversion: 6 */



const ResponsiveRangeControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_ResponsiveRangeComponent_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/responsive-range/ResponsiveRangeComponent.js":
/*!******************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/responsive-range/ResponsiveRangeComponent.js ***!
  \******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);

/* jshint esversion: 6 */






const ResponsiveRangeComponent = ({
  control
}) => {
  const parsedValue = (0,_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.maybeParseJson)(control.setting.get());
  const [currentDevice, setCurrentDevice] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)('desktop');
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(parsedValue);
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    // If a value is int, make it responsive.
    const responsiveConverted = (0,_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.getIntValAsResponsive)(control.setting.get());
    if (value !== responsiveConverted) {
      setValue(responsiveConverted);
    }
    document.addEventListener('solace-changed-customizer-value', e => {
      if (!e.detail) return false;
      if (e.detail.id !== control.id) return false;
      // Make sure we translate int values to responsive values.
      const incomingValue = (0,_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.getIntValAsResponsive)(e.detail.value);
      setValue((0,_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.maybeParseJson)(incomingValue));
      control.setting.set(JSON.stringify(incomingValue));
    });
  }, []);
  const {
    label
  } = control.params;
  const {
    hideResponsive,
    units,
    defaultVal,
    min,
    max
  } = control.params.input_attrs;
  const parsedDefaultVal = (0,_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.maybeParseJson)(defaultVal);
  const suffixValue = () => {
    const fallbackSuffix = null;
    if (!units) {
      return fallbackSuffix;
    }
    const defaultSuffix = parsedDefaultVal.suffix && parsedDefaultVal.suffix[currentDevice] ? parsedDefaultVal.suffix[currentDevice] : fallbackSuffix;
    return value.suffix && value.suffix[currentDevice] ? value.suffix[currentDevice] : defaultSuffix;
  };
  const isRelativeUnit = () => ['em', 'rem'].includes(suffixValue());
  const unitButtons = () => {
    if (!units) {
      return null;
    }
    if (units.length === 1) {
      return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, {
        isSmall: true,
        disabled: true,
        className: "active alone"
      }, units[0]);
    }
    return units.map((unit, index) => {
      const buttonClass = classnames__WEBPACK_IMPORTED_MODULE_1___default()({
        active: suffixValue() === unit
      });
      return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, {
        key: index,
        isSmall: true,
        className: buttonClass,
        onClick: () => {
          const nextValue = {
            ...value
          };
          nextValue.suffix = {
            ...nextValue.suffix
          };
          nextValue.suffix[currentDevice] = unit;
          if (!isRelativeUnit()) {
            nextValue[currentDevice] = parseInt(nextValue[currentDevice]);
          }
          setValue(nextValue);
          control.setting.set(JSON.stringify(nextValue));
        }
      }, unit);
    });
  };
  const updateValues = newValue => {
    // This happens when the reset button is pressed
    if (newValue === undefined) {
      const responsiveDefaultValue = (0,_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.getIntValAsResponsive)(parsedDefaultVal);
      setValue(responsiveDefaultValue);
      control.setting.set(JSON.stringify(responsiveDefaultValue));
      return;
    }
    const nextValue = {
      ...value
    };
    nextValue[currentDevice] = newValue;
    setValue(nextValue);
    control.setting.set(JSON.stringify(nextValue));
  };
  let displayValue = parseFloat(value[currentDevice]);
  displayValue = displayValue === 0 ? 0 : displayValue || parsedDefaultVal[currentDevice];
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-white-background-control solace-range-control"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-control-header"
  }, label && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "customize-control-title"
  }, label), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.ResponsiveControl, {
    onChange: device => setCurrentDevice(device),
    hideResponsive: hideResponsive || false
  }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-units"
  }, unitButtons())), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "range-wrap"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.RangeControl, {
    value: displayValue,
    min: min || 0,
    max: max || 100,
    step: isRelativeUnit() ? 0.1 : 1,
    allowReset: true,
    onChange: nextValue => {
      updateValues(nextValue);
    }
  })));
};
ResponsiveRangeComponent.propTypes = {
  control: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ResponsiveRangeComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/responsive-toggle/Control.js":
/*!**************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/responsive-toggle/Control.js ***!
  \**************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ResponsiveToggleControl: () => (/* binding */ ResponsiveToggleControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _ResponsiveToggleComponent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ResponsiveToggleComponent.js */ "./assets/apps/customizer-controls/src/responsive-toggle/ResponsiveToggleComponent.js");

/* jshint esversion: 6 */



const ResponsiveToggleControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_ResponsiveToggleComponent_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/responsive-toggle/ResponsiveToggleComponent.js":
/*!********************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/responsive-toggle/ResponsiveToggleComponent.js ***!
  \********************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);

/* jshint esversion: 6 */





const ResponsiveToggleComponent = ({
  control
}) => {
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    document.addEventListener('solace-changed-customizer-value', e => {
      if (!e.detail) {
        return false;
      }
      if (e.detail.id !== control.id) {
        return false;
      }
      setValue(e.detail.value);
    });
  }, []);
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(control.setting.get());
  const [device, setDevice] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)('desktop');
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-white-background-control flex-contents"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ToggleControl, {
    className: "solace-toggle-control",
    checked: value[device],
    label: control.params.label,
    onChange: newValue => {
      const nextValue = {
        ...value
      };
      nextValue[device] = newValue;
      setValue(nextValue);
      control.setting.set(nextValue);
    }
  }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.ResponsiveControl, {
    excluded: control.params.excluded || [],
    hideResponsive: control.params.hideResponsive || false,
    onChange: nextDevice => {
      setDevice(nextDevice);
    }
  }));
};
ResponsiveToggleComponent.propTypes = {
  control: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ResponsiveToggleComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/rich-text/Control.js":
/*!******************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/rich-text/Control.js ***!
  \******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   RichTextControl: () => (/* binding */ RichTextControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _RichTextComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RichTextComponent */ "./assets/apps/customizer-controls/src/rich-text/RichTextComponent.js");



const RichTextControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_RichTextComponent__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/rich-text/RichTextComponent.js":
/*!****************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/rich-text/RichTextComponent.js ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);




const RichText = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.lazy)(() => __webpack_require__.e(/*! import() */ "assets_apps_customizer-controls_src_rich-text_RichText_js").then(__webpack_require__.bind(__webpack_require__, /*! ./RichText */ "./assets/apps/customizer-controls/src/rich-text/RichText.js")));
const RichTextComponent = ({
  control
}) => {
  const [isVisible, setVisible] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
  let controlValue = control.setting.get();
  // this replaces the default line breaks for old textarea content
  controlValue = controlValue.replace(/[a-zA-Z0-9\}(?:\s)]\n/g, function (a) {
    return a + '<br/>';
  });
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(controlValue);
  const {
    id: controlId,
    params
  } = control;
  const {
    label,
    section,
    toolbars,
    allowedDynamicFields
  } = params;

  /**
   * Method to update state and trigger control setting change.
   *
   * @param {string} nextVal The next value for the control.
   */
  const updateValues = nextVal => {
    setValue(nextVal);
    control.setting.set(nextVal);
  };

  /**
   * We check here that the section is visible so that we trigger the load of the component
   */
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    window.wp.customize.bind('ready', () => {
      window.wp.customize.state('expandedSection').bind(expandedSection => {
        if (!expandedSection) {
          return;
        }
        if (!expandedSection.id) {
          return;
        }
        if (expandedSection.id === section && isVisible === false) {
          setVisible(true);
        }
      });
    });
  }, []);
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    document.addEventListener('solace-changed-customizer-value', e => {
      if (isVisible) return;
      if (!e.detail) return false;
      if (e.detail.id !== controlId) return false;
      updateValues(e.detail.value);
    });
  }, []);
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Suspense, {
    fallback: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Spinner, null)
  }, isVisible && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(RichText, {
    id: controlId,
    label: label,
    onChange: updateValues,
    toolbars: toolbars,
    allowedDynamicFields: allowedDynamicFields,
    currentValue: value
  }));
};
RichTextComponent.propTypes = {
  control: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (RichTextComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/skin-switcher/Control.js":
/*!**********************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/skin-switcher/Control.js ***!
  \**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   SkinSwitcherControl: () => (/* binding */ SkinSwitcherControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _SkinSwitcher_tsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SkinSwitcher.tsx */ "./assets/apps/customizer-controls/src/skin-switcher/SkinSwitcher.tsx");



const SkinSwitcherControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_SkinSwitcher_tsx__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/solace-sortable/Control.js":
/*!************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/solace-sortable/Control.js ***!
  \************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   SolaceSortableControl: () => (/* binding */ SolaceSortableControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _SolaceSortableComponent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SolaceSortableComponent.js */ "./assets/apps/customizer-controls/src/solace-sortable/SolaceSortableComponent.js");

/* jshint esversion: 6 */



const SolaceSortableControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_SolaceSortableComponent_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/solace-sortable/SolaceSortableComponent.js":
/*!****************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/solace-sortable/SolaceSortableComponent.js ***!
  \****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);

/* jshint esversion: 6 */




const SolaceSortableOrdering = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.lazy)(() => __webpack_require__.e(/*! import() | order */ "order").then(__webpack_require__.bind(__webpack_require__, /*! ./SolaceSortableOrdering */ "./assets/apps/customizer-controls/src/solace-sortable/SolaceSortableOrdering.js")));

const SolaceSortableComponent = ({
  control
}) => {
  const {
    section,
    components,
    label
  } = control.params;
  const controlID = control.id;
  const normalizeValue = val => {
    const enabledItems = val.map(element => {
      return {
        id: element,
        visible: true
      };
    });
    return enabledItems;
  };
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(normalizeValue((0,_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.maybeParseJson)(control.setting.get())));

  // console.log(JSON.stringify(value));
  // [{"id":"solace_single_product_product_elements-breadcrumbs","visible":true},{"id":"solace_single_product_product_elements-title","visible":true},{"id":"solace_single_product_product_elements-star-rating","visible":true},{"id":"solace_single_product_product_elements-price","visible":true},{"id":"solace_single_product_product_elements-short-description","visible":true},{"id":"solace_single_product_product_elements-divider-1","visible":true},{"id":"solace_single_product_product_elements-add-to-cart","visible":true},{"id":"solace_single_product_product_elements-divider-2","visible":true},{"id":"solace_single_product_product_elements-meta","visible":true},{"id":"solace_single_product_product_elements-payment-methods","visible":true},{"id":"solace_single_product_product_elements-additional-info","visible":true}]

  const [isVisible, setVisible] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
  const updateValue = newVal => {
    const dbValue = newVal.filter(el => el.visible === true).map(el => el.id);
    setValue(newVal);
    // console.log(JSON.stringify(newVal));
    // [{"id":"solace_single_product_product_elements-breadcrumbs","visible":true,"chosen":false,"selected":false},{"id":"solace_single_product_product_elements-title","visible":true,"chosen":false,"selected":false},{"id":"solace_single_product_product_elements-star-rating","visible":true,"chosen":false,"selected":false},{"id":"solace_single_product_product_elements-price","visible":true,"chosen":false,"selected":false},{"id":"solace_single_product_product_elements-short-description","visible":true,"chosen":false,"selected":false},{"id":"solace_single_product_product_elements-divider-1","visible":true,"chosen":false,"selected":false},{"id":"solace_single_product_product_elements-add-to-cart","visible":true,"chosen":false,"selected":false},{"id":"solace_single_product_product_elements-divider-2","visible":true,"chosen":false,"selected":false},{"id":"solace_single_product_product_elements-meta","visible":true,"chosen":false,"selected":false},{"id":"solace_single_product_product_elements-payment-methods","visible":true,"chosen":false,"selected":false},{"id":"solace_single_product_product_elements-additional-info","visible":true,"chosen":false,"selected":false}]

    control.setting.set(JSON.stringify(dbValue));
    // console.log(JSON.stringify(dbValue));
    // ["solace_single_product_product_elements-breadcrumbs","solace_single_product_product_elements-title","solace_single_product_product_elements-star-rating","solace_single_product_product_elements-price","solace_single_product_product_elements-short-description","solace_single_product_product_elements-divider-1","solace_single_product_product_elements-add-to-cart","solace_single_product_product_elements-divider-2","solace_single_product_product_elements-meta","solace_single_product_product_elements-payment-methods","solace_single_product_product_elements-additional-info"]
  };
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    window.wp.customize.bind('ready', () => {
      window.wp.customize.state('expandedSection').bind(expandedSection => {
        if (!expandedSection) {
          return;
        }
        if (!expandedSection.id) {
          return;
        }
        if (expandedSection.id === section) {
          setVisible(true);
        }
      });
    });
  }, []);
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    const regex = /solace_layout_single_(.+)_elements_order/m;
    const matches = regex.exec(control.id);
    if (matches === null) {
      return;
    }
    window.wp.customize.control('solace_' + matches[1] + '_header_layout', customizeControl => {
      customizeControl.setting.bind(nextVal => {
        let newVal = (0,_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.maybeParseJson)(control.setting.get());
        let titleMetaIndex, thumbnailIndex;
        switch (nextVal) {
          case 'cover':
            titleMetaIndex = newVal.indexOf('title-meta');
            if (titleMetaIndex !== -1) {
              newVal.splice(titleMetaIndex, 1);
            }
            thumbnailIndex = newVal.indexOf('thumbnail');
            if (thumbnailIndex !== -1) {
              newVal.splice(thumbnailIndex, 1);
            }
            delete components['title-meta'];
            delete components.thumbnail;
            break;
          case 'normal':
            if (!components['title-meta']) {
              components['title-meta'] = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Title & Meta', 'solace');
            }
            if (!components.thumbnail) {
              components.thumbnail = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Thumbnail', 'solace');
            }
            thumbnailIndex = newVal.indexOf('thumbnail');
            if (thumbnailIndex === -1) {
              newVal = ['thumbnail'].concat(newVal);
            }
            titleMetaIndex = newVal.indexOf('title-meta');
            if (titleMetaIndex === -1) {
              newVal = ['title-meta'].concat(newVal);
            }
            break;
        }
        updateValue(normalizeValue(newVal));
      });
    });
  }, []);
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-white-background-control solace-ordering-custom"
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Suspense, {
    fallback: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Spinner, null)
  }, isVisible && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(SolaceSortableOrdering, {
    label: label,
    value: value,
    components: components,
    controlID: controlID,
    onUpdate: updateValue
  })));
};
SolaceSortableComponent.propTypes = {
  control: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SolaceSortableComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/spacing-divider/Control.js":
/*!************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/spacing-divider/Control.js ***!
  \************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   SpacingDividerControl: () => (/* binding */ SpacingDividerControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _SpacingDividerComponent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SpacingDividerComponent.js */ "./assets/apps/customizer-controls/src/spacing-divider/SpacingDividerComponent.js");

/* jshint esversion: 6 */



const SpacingDividerControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_SpacingDividerComponent_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/spacing-divider/SpacingDividerComponent.js":
/*!****************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/spacing-divider/SpacingDividerComponent.js ***!
  \****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash */ "lodash");
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_5__);

/* jshint esversion: 6 */







const SpacingDividerComponent = ({
  control
}) => {
  const [visible, setVisible] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
  const [popoverCoords, setPopoverCoords] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({
    top: 0,
    left: 0
  });
  const popoverRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
  const defaultParams = {
    min: -300,
    max: 300,
    hideResponsiveButtons: false,
    units: ['px', 'em', 'rem', '%']
  };
  const controlParams = control.params.input_attrs ? {
    ...defaultParams,
    ...control.params.input_attrs
  } : defaultParams;
  const baseDefault = {
    mobile: {
      top: 0,
      right: 0,
      bottom: 0,
      left: 0
    },
    tablet: {
      top: 0,
      right: 0,
      bottom: 0,
      left: 0
    },
    desktop: {
      top: 0,
      right: 0,
      bottom: 0,
      left: 0
    },
    'mobile-unit': 'px',
    'tablet-unit': 'px',
    'desktop-unit': 'px'
  };
  const defaultValue = control.params.default ? {
    ...baseDefault,
    ...control.params.default
  } : baseDefault;
  const dbVal = control.setting.get();
  const initialVal = (0,_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.mergeDeep)(defaultValue, dbVal);
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(initialVal);
  const [currentDevice, setCurrentDevice] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)('desktop');
  const updateValueForCurrentDevice = valueForDevice => {
    const nextValue = {
      ...value
    };
    nextValue[currentDevice] = valueForDevice;
    updateControlValue(nextValue);
  };
  const updateControlValue = nextVal => {
    setValue(nextVal);
    control.setting.set(nextVal);
  };
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    document.addEventListener('solace-changed-customizer-value', e => {
      if (!e.detail) return false;
      if (e.detail.id !== control.id) return false;
      updateControlValue(e.detail.value || defaultValue);
    });
  }, []);
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    const handleGetPopupClickDivider = e => {
      const controlID = 'solace_single_post_element__divider';
      const baseIds = ['svg', 'g', 'path1', 'path2'];
      const ids = [controlID, ...baseIds.map(prefix => `${prefix}-${controlID}`)];
      if (ids.includes(e.target.id)) {
        const rect = e.target.getBoundingClientRect();
        setPopoverCoords({
          top: rect.bottom - 25,
          left: rect.left + 50,
          y: rect.y
        });
        setVisible(true);
      }
    };
    document.addEventListener('click', handleGetPopupClickDivider);
    return () => {
      document.removeEventListener('click', handleGetPopupClickDivider);
    };
  }, []);
  const isRelativeUnit = ['em', 'rem'].includes(value[currentDevice + '-unit']);
  const getButtons = () => {
    const {
      units
    } = controlParams;
    if (units.length === 1) {
      return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, {
        isSmall: true,
        disabled: true,
        className: "active alone"
      }, units[0]);
    }
    return units.map((unit, index) => {
      const buttonClass = classnames__WEBPACK_IMPORTED_MODULE_1___default()({
        active: value[currentDevice + '-unit'] === unit
      });
      return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, {
        isSmall: true,
        key: index,
        className: buttonClass,
        onClick: () => {
          const nextValue = {
            ...value
          };
          nextValue[currentDevice + '-unit'] = unit;
          if (unit !== 'em') {
            nextValue[currentDevice] = (0,lodash__WEBPACK_IMPORTED_MODULE_5__.mapValues)(nextValue[currentDevice], v => v ? parseInt(v) : v);
          }
          updateControlValue(nextValue);
        }
      }, unit);
    });
  };
  const options = [{
    type: 'top',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Top', 'solace'),
    value: value[currentDevice].top
  }, {
    type: 'right',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Right', 'solace'),
    value: value[currentDevice].right
  }, {
    type: 'bottom',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Bottom', 'solace'),
    value: value[currentDevice].bottom
  }, {
    type: 'left',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Left', 'solace'),
    value: value[currentDevice].left
  }];
  const {
    hideResponsiveButtons
  } = controlParams;
  const {
    label
  } = control.params;
  const {
    min,
    max
  } = controlParams;
  const wrapClasses = classnames__WEBPACK_IMPORTED_MODULE_1___default()(['solace-white-background-control', 'solace-sizing', 'solace-spacing-divider']);
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, visible && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Popover, {
    className: "popover-spacing-divider solace-remove-style-popover-transform",
    onFocusOutside: () => {
      setVisible(false);
    },
    ref: popoverRef,
    style: {
      position: 'absolute',
      top: popoverCoords.top,
      left: popoverCoords.left
    }
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: wrapClasses,
    style: {
      position: 'absolute',
      left: popoverCoords.left - 10,
      top: popoverCoords.y - 15,
      backgroundColor: 'var(--sol-customizer-panel-bg-color)',
      color: '#fff',
      border: '1px solid var(--sol-customizer-line-color)',
      borderRadius: '10px'
    }
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-control-header"
  }, label && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "customize-control-title"
  }, label), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.ResponsiveControl, {
    hideResponsive: hideResponsiveButtons,
    onChange: nextDevice => {
      setCurrentDevice(nextDevice);
    }
  }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-units"
  }, getButtons())), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.SizingControl, {
    min: min,
    max: max,
    step: isRelativeUnit ? 0.1 : 1,
    options: options,
    defaults: defaultValue[currentDevice],
    value: value[currentDevice],
    onChange: updateValueForCurrentDevice,
    onReset: () => {
      updateControlValue(defaultValue);
    }
  }))));
};
SpacingDividerComponent.propTypes = {
  control: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SpacingDividerComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/spacing/Control.js":
/*!****************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/spacing/Control.js ***!
  \****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   SpacingControl: () => (/* binding */ SpacingControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _SpacingComponent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SpacingComponent.js */ "./assets/apps/customizer-controls/src/spacing/SpacingComponent.js");

/* jshint esversion: 6 */



const SpacingControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_SpacingComponent_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/spacing/SpacingComponent.js":
/*!*************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/spacing/SpacingComponent.js ***!
  \*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash */ "lodash");
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_5__);

/* jshint esversion: 6 */







const SpacingComponent = ({
  control
}) => {
  const defaultParams = {
    min: -300,
    max: 300,
    hideResponsiveButtons: false,
    units: ['px', 'em', 'rem', '%']
  };
  const controlParams = control.params.input_attrs ? {
    ...defaultParams,
    ...control.params.input_attrs
  } : defaultParams;
  const baseDefault = {
    mobile: {
      top: 0,
      right: 0,
      bottom: 0,
      left: 0
    },
    tablet: {
      top: 0,
      right: 0,
      bottom: 0,
      left: 0
    },
    desktop: {
      top: 0,
      right: 0,
      bottom: 0,
      left: 0
    },
    'mobile-unit': 'px',
    'tablet-unit': 'px',
    'desktop-unit': 'px'
  };
  const defaultValue = control.params.default ? {
    ...baseDefault,
    ...control.params.default
  } : baseDefault;
  const dbVal = control.setting.get();
  const initialVal = (0,_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.mergeDeep)(defaultValue, dbVal);
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(initialVal);
  const [currentDevice, setCurrentDevice] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)('desktop');
  const updateValueForCurrentDevice = valueForDevice => {
    const nextValue = {
      ...value
    };
    nextValue[currentDevice] = valueForDevice;
    updateControlValue(nextValue);
  };
  const updateControlValue = nextVal => {
    setValue(nextVal);
    control.setting.set(nextVal);
  };
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    document.addEventListener('solace-changed-customizer-value', e => {
      if (!e.detail) return false;
      if (e.detail.id !== control.id) return false;
      updateControlValue(e.detail.value || defaultValue);
    });
  }, []);
  const isRelativeUnit = ['em', 'rem'].includes(value[currentDevice + '-unit']);
  const getButtons = () => {
    const {
      units
    } = controlParams;
    if (units.length === 1) {
      return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, {
        isSmall: true,
        disabled: true,
        className: "active alone"
      }, units[0]);
    }
    return units.map((unit, index) => {
      const buttonClass = classnames__WEBPACK_IMPORTED_MODULE_1___default()({
        active: value[currentDevice + '-unit'] === unit
      });
      return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, {
        isSmall: true,
        key: index,
        className: buttonClass,
        onClick: () => {
          const nextValue = {
            ...value
          };
          nextValue[currentDevice + '-unit'] = unit;
          if (unit !== 'em') {
            nextValue[currentDevice] = (0,lodash__WEBPACK_IMPORTED_MODULE_5__.mapValues)(nextValue[currentDevice], v => v ? parseInt(v) : v);
          }
          updateControlValue(nextValue);
        }
      }, unit);
    });
  };
  const options = [{
    type: 'top',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Top', 'solace'),
    value: value[currentDevice].top
  }, {
    type: 'right',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Right', 'solace'),
    value: value[currentDevice].right
  }, {
    type: 'bottom',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Bottom', 'solace'),
    value: value[currentDevice].bottom
  }, {
    type: 'left',
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Left', 'solace'),
    value: value[currentDevice].left
  }];
  const {
    hideResponsiveButtons
  } = controlParams;
  const {
    label
  } = control.params;
  const {
    min,
    max
  } = controlParams;
  const wrapClasses = classnames__WEBPACK_IMPORTED_MODULE_1___default()(['solace-white-background-control', 'solace-sizing']);
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: wrapClasses
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-control-header"
  }, label && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "customize-control-title"
  }, label), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.ResponsiveControl, {
    hideResponsive: hideResponsiveButtons,
    onChange: nextDevice => {
      setCurrentDevice(nextDevice);
    }
  }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-units"
  }, getButtons())), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.SizingControl, {
    min: min,
    max: max,
    step: isRelativeUnit ? 0.1 : 1,
    options: options,
    defaults: defaultValue[currentDevice],
    value: value[currentDevice],
    onChange: updateValueForCurrentDevice,
    onReset: () => {
      updateControlValue(defaultValue);
    }
  }));
};
SpacingComponent.propTypes = {
  control: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SpacingComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/toggle-flex/Control.js":
/*!********************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/toggle-flex/Control.js ***!
  \********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ToggleControlFlex: () => (/* binding */ ToggleControlFlex)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _ToggleComponent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ToggleComponent.js */ "./assets/apps/customizer-controls/src/toggle-flex/ToggleComponent.js");

/* jshint esversion: 6 */



const ToggleControlFlex = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_ToggleComponent_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/toggle-flex/ToggleComponent.js":
/*!****************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/toggle-flex/ToggleComponent.js ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);

/* jshint esversion: 6 */




const ToggleComponentFlex = ({
  control
}) => {
  const {
    label,
    description
  } = control.params;
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(control.setting.get());
  const [isActive, setIsActive] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    document.addEventListener('solace-changed-customizer-value', e => {
      if (!e.detail) return false;
      if (e.detail.id !== control.id) return false;
      if (e.detail.value === value) return false;
      toggleValue(e.detail.value);
    });
  }, []);
  const toggleValue = val => {
    setValue(val);
    control.setting.set(val);
    setIsActive(!isActive);
  };
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.Toggle, {
    description: description
    // label={isActive ? __('Hide ' + label, 'solace') : __('Show ' + label, 'solace')}
    ,
    label: label,
    checked: value,
    onChange: toggleValue
  });
};
ToggleComponentFlex.propTypes = {
  control: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ToggleComponentFlex);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/toggle/Control.js":
/*!***************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/toggle/Control.js ***!
  \***************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ToggleControl: () => (/* binding */ ToggleControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _ToggleComponent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ToggleComponent.js */ "./assets/apps/customizer-controls/src/toggle/ToggleComponent.js");

/* jshint esversion: 6 */



const ToggleControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_ToggleComponent_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/toggle/ToggleComponent.js":
/*!***********************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/toggle/ToggleComponent.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);

/* jshint esversion: 6 */



const ToggleComponent = ({
  control
}) => {
  const {
    label,
    description
  } = control.params;
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(control.setting.get());
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    document.addEventListener('solace-changed-customizer-value', e => {
      if (!e.detail) return false;
      if (e.detail.id !== control.id) return false;
      if (e.detail.value === value) return false;
      toggleValue(e.detail.value);
    });
  }, []);
  const toggleValue = val => {
    setValue(val);
    control.setting.set(val);
  };
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.Toggle, {
    description: description,
    label: label,
    checked: value,
    onChange: toggleValue
  });
};
ToggleComponent.propTypes = {
  control: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ToggleComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/typeface-title/Control.js":
/*!***********************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/typeface-title/Control.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   TypefaceTitleControl: () => (/* binding */ TypefaceTitleControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _TypefaceTitleComponent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./TypefaceTitleComponent.js */ "./assets/apps/customizer-controls/src/typeface-title/TypefaceTitleComponent.js");

/* jshint esversion: 6 */


const TypefaceTitleControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_TypefaceTitleComponent_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/typeface-title/TypefaceTitle.js":
/*!*****************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/typeface-title/TypefaceTitle.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);

/* global SolaceReactCustomize */





const TypefaceTitle = props => {
  const [currentDevice, setCurrentDevice] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)('desktop');
  const [visible, setVisible] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
  const [popoverCoords, setPopoverCoords] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({
    top: 0,
    left: 0
  });
  const popoverRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
  const {
    label,
    value = {
      fontSize: {
        suffix: {
          mobile: 'px',
          tablet: 'px',
          desktop: 'px'
        },
        mobile: '',
        tablet: '',
        desktop: ''
      },
      headingTag: 'H1'
    },
    onChange,
    refreshAfterReset = false,
    fSUnit = ['em', 'px'],
    defaultFS = {
      suffix: {
        mobile: 'px',
        tablet: 'px',
        desktop: 'px'
      },
      mobile: '',
      tablet: '',
      desktop: ''
    }
  } = props;
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    const handleGetPopupClickTitle = e => {
      const controlID = 'solace_single_post_element__title';
      const baseIds = ['svg', 'g', 'path1', 'path2'];
      const ids = [controlID, ...baseIds.map(prefix => `${prefix}-${controlID}`)];
      if (ids.includes(e.target.id)) {
        const rect = e.target.getBoundingClientRect();
        setPopoverCoords({
          top: rect.bottom - 25,
          left: rect.left + 50,
          y: rect.y
        });
        setVisible(true);
      }
    };
    document.addEventListener('click', handleGetPopupClickTitle);
    return () => {
      document.removeEventListener('click', handleGetPopupClickTitle);
    };
  });
  const renderHeadingTag = () => {
    let {
      headingTag
    } = value;
    if (!headingTag) {
      headingTag = 'H1';
    }
    const defaultOptions = [{
      value: 'H1',
      label: 'H1'
    }, {
      value: 'H2',
      label: 'H2'
    }, {
      value: 'H3',
      label: 'H3'
    }, {
      value: 'H4',
      label: 'H4'
    }, {
      value: 'H5',
      label: 'H5'
    }, {
      value: 'H6',
      label: 'H6'
    }];
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.InlineSelect, {
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Heading Tag', 'solace'),
      value: headingTag,
      options: defaultOptions,
      onChange: nextValue => {
        onChange({
          headingTag: nextValue
        });
        wp.customize.previewer.refresh();
        if (nextValue === 'H1' && refreshAfterReset) {
          wp.customize.previewer.refresh();
        }
      }
    });
  };
  const renderFontSize = () => {
    let {
      fontSize
    } = value;
    if (!fontSize) {
      fontSize = {
        ...defaultFS
      };
    }

    // return (
    // 	<NumberControl
    // 		className="font-size"
    // 		label={__('Font Size', 'solace')}
    // 		default={defaultFS[currentDevice]}
    // 		value={fontSize[currentDevice]}
    // 		step={
    // 			['em', 'rem'].includes(fontSize.suffix[currentDevice])
    // 				? 0.1
    // 				: 1
    // 		}
    // 		units={fSUnit}
    // 		activeUnit={fontSize.suffix[currentDevice]}
    // 		hasResponsive
    // 		onChange={(val) => {
    // 			const nextVal = fontSize;
    // 			nextVal[currentDevice] = val;
    // 			onChange({ fontSize: nextVal });
    // 		}}
    // 		onUnitChange={(val) => {
    // 			const nextVal = fontSize;
    // 			nextVal.suffix[currentDevice] = val;
    // 			onChange({ fontSize: nextVal });
    // 		}}
    // 		onReset={() => {
    // 			onChange({ fontSize: defaultFS });
    // 			if (refreshAfterReset) {
    // 				wp.customize.previewer.refresh();
    // 			}
    // 		}}
    // 		onChangedDevice={setCurrentDevice}
    // 	/>
    // );

    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-white-background-control solace-range-control"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "solace-control-header"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
      className: "customize-control-title"
    }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Font Size', 'solace')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.ResponsiveControl, {
      onChange: device => setCurrentDevice(device)
      // hideResponsive={hideResponsive || false}
    })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
      className: "range-wrap"
    }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.RangeControl, {
      value: fontSize[currentDevice],
      min: 10,
      max: 100,
      step: 1
      // allowReset
      ,
      onChange: val => {
        const nextVal = fontSize;
        nextVal[currentDevice] = val;
        onChange({
          fontSize: nextVal
        });
      }
    })));
  };
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, visible && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Popover, {
    className: "popover-title popover-typeface-title solace-remove-style-popover-transform",
    onFocusOutside: () => {
      setVisible(false);
    },
    ref: popoverRef,
    style: {
      position: 'absolute',
      top: popoverCoords.top,
      left: popoverCoords.left
    }
  }, label && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "customize-control-title"
  }, label), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-typeface-title-control solace-white-background-control",
    style: {
      position: 'absolute',
      left: popoverCoords.left - 10,
      top: popoverCoords.y - 15,
      backgroundColor: 'var(--sol-customizer-panel-bg-color)',
      color: '#fff',
      border: '1px solid var(--sol-customizer-line-color)',
      borderRadius: '10px'
    }
  }, renderHeadingTag(), renderFontSize())));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TypefaceTitle);
const responsiveShape = {
  mobile: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number)]),
  tablet: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number)]),
  desktop: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number)])
};
TypefaceTitle.propTypes = {
  label: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().string),
  value: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape({
    fontSize: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape({
      suffix: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape(responsiveShape),
      ...responsiveShape
    }),
    headingTag: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number)])
  }),
  refreshAfterReset: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().bool),
  fSUnit: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().array),
  onChange: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func).isRequired,
  defaultFS: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape({
    suffix: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape(responsiveShape),
    ...responsiveShape
  })
};

/***/ }),

/***/ "./assets/apps/customizer-controls/src/typeface-title/TypefaceTitleComponent.js":
/*!**************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/typeface-title/TypefaceTitleComponent.js ***!
  \**************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _TypefaceTitle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./TypefaceTitle.js */ "./assets/apps/customizer-controls/src/typeface-title/TypefaceTitle.js");

/*eslint camelcase: ["error", {allow: [heading_tag_default","refresh_on_reset", "size_default","size_units",]}]*/



const TypefaceTitleComponent = ({
  control
}) => {
  let setVal = control.setting.get();
  let defaultParams = {
    size_units: ['em', 'px'],
    heading_tag_default: 400,
    size_default: {
      suffix: {
        mobile: 'px',
        tablet: 'px',
        desktop: 'px'
      },
      mobile: 15,
      tablet: 15,
      desktop: 15
    }
  };
  const emptyValue = {
    fontSize: {
      suffix: {
        mobile: 'px',
        tablet: 'px',
        desktop: 'px'
      },
      mobile: '',
      tablet: '',
      desktop: ''
    },
    headingTag: 'H1'
  };
  const emptyDefault = {
    size_units: ['em', 'px'],
    heading_tag_default: 'H1',
    size_default: {
      suffix: {
        mobile: 'px',
        tablet: 'px',
        desktop: 'px'
      },
      mobile: '',
      tablet: '',
      desktop: ''
    }
  };
  if (!setVal) {
    setVal = emptyValue;
  }
  if (typeof setVal === 'string') {
    setVal = defaultParams;
  }
  const controlParams = control.params.input_attrs ? {
    ...defaultParams,
    ...JSON.parse(control.params.input_attrs)
  } : defaultParams;
  if (control.params.input_attrs.length) {
    const inputAttrs = JSON.parse(control.params.input_attrs);
    if (inputAttrs.default_is_empty) {
      defaultParams = emptyDefault;
    }
  }
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({
    fontSize: setVal.fontSize,
    headingTag: setVal.headingTag,
    flag: false
  });
  const updateValues = nextValue => {
    setValue({
      ...value,
      ...nextValue
    });
    control.setting.set({
      ...control.setting.get(),
      ...nextValue,
      flag: !control.setting.get().flag
    });
  };
  const {
    label,
    refresh_on_reset
  } = control.params;
  const {
    size_default,
    size_units
  } = controlParams;
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_TypefaceTitle_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
    label: label,
    value: value,
    defaultFS: size_default,
    fSUnit: size_units,
    onChange: updateValues,
    refreshAfterReset: refresh_on_reset
  });
};
TypefaceTitleComponent.propTypes = {
  control: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TypefaceTitleComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/typeface/Control.js":
/*!*****************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/typeface/Control.js ***!
  \*****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   TypefaceControl: () => (/* binding */ TypefaceControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _TypefaceComponent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./TypefaceComponent.js */ "./assets/apps/customizer-controls/src/typeface/TypefaceComponent.js");

/* jshint esversion: 6 */


const TypefaceControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_TypefaceComponent_js__WEBPACK_IMPORTED_MODULE_1__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/typeface/Typeface.js":
/*!******************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/typeface/Typeface.js ***!
  \******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);

/* global SolaceReactCustomize */




const Typeface = props => {
  const [currentDevice, setCurrentDevice] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)('desktop');
  const {
    label,
    fontFamilyControl,
    withTextTransform = true,
    value = {
      fontSize: {
        suffix: {
          mobile: 'px',
          tablet: 'px',
          desktop: 'px'
        },
        mobile: '',
        tablet: '',
        desktop: ''
      },
      lineHeight: {
        suffix: {
          mobile: 'em',
          tablet: 'em',
          desktop: 'em'
        },
        mobile: '',
        tablet: '',
        desktop: ''
      },
      letterSpacing: {
        mobile: '',
        tablet: '',
        desktop: ''
      },
      fontWeight: 'none',
      textTransform: 'none'
    },
    onChange,
    refreshAfterReset = false,
    fSUnit = ['em', 'px'],
    lHunit = ['em', 'px', '—'],
    defaultFS = {
      suffix: {
        mobile: 'px',
        tablet: 'px',
        desktop: 'px'
      },
      mobile: '',
      tablet: '',
      desktop: ''
    },
    defaultLH = {
      suffix: {
        mobile: 'em',
        tablet: 'em',
        desktop: 'em'
      },
      mobile: '',
      tablet: '',
      desktop: ''
    },
    defaultLS = {
      mobile: '',
      tablet: '',
      desktop: ''
    }
  } = props;
  const [fontFamily, setFontFamily] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(wp.customize.control(fontFamilyControl) ? wp.customize.control(fontFamilyControl).setting() : '');
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    window.wp.customize.bind('change', setting => {
      if (setting.id === fontFamilyControl) {
        setFontFamily(setting.get());
      }
    });
  }, []);
  const renderTextTransform = () => {
    if (!withTextTransform) {
      return;
    }
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.InlineSelect, {
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Transform', 'solace'),
      value: value.textTransform,
      options: [{
        value: 'none',
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('None', 'solace')
      }, {
        value: 'capitalize',
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Capitalize', 'solace')
      }, {
        value: 'lowercase',
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Lowercase', 'solace')
      }, {
        value: 'uppercase',
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Uppercase', 'solace')
      }],
      onChange: textTransform => {
        onChange({
          textTransform
        });
      }
    });
  };
  const renderFontWeight = () => {
    let {
      fontWeight
    } = value;
    if (!fontWeight) {
      fontWeight = 'none';
    }
    const {
      fontVariants,
      systemFontVariants
    } = SolaceReactCustomize;
    const allFontVariants = {
      ...fontVariants,
      ...systemFontVariants
    };
    const defaultOptions = [{
      value: 'none',
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('None', 'solace')
    }, {
      value: 100,
      label: '100'
    }, {
      value: 200,
      label: '200'
    }, {
      value: 300,
      label: '300'
    }, {
      value: 400,
      label: '400'
    }, {
      value: 500,
      label: '500'
    }, {
      value: 600,
      label: '600'
    }, {
      value: 700,
      label: '700'
    }, {
      value: 800,
      label: '800'
    }, {
      value: 900,
      label: '900'
    }];
    let options;
    if (allFontVariants[fontFamily] !== undefined) {
      options = allFontVariants[fontFamily].filter(fv => !fv.includes('italic')).reduce((acc, curr) => [...acc, {
        value: parseInt(curr),
        label: curr
      }], [{
        value: 'none',
        label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('None', 'solace')
      }]);
    }
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.InlineSelect, {
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Weight', 'solace'),
      value: fontWeight,
      options: options ? options : defaultOptions,
      onChange: nextValue => {
        onChange({
          fontWeight: nextValue
        });
        if (nextValue === 'none' && refreshAfterReset) {
          wp.customize.previewer.refresh();
        }
      }
    });
  };
  const renderFontSize = () => {
    let {
      fontSize
    } = value;
    if (!fontSize) {
      fontSize = {
        ...defaultFS
      };
    }
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.NumberControl, {
      className: "font-size",
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Font Size', 'solace'),
      default: defaultFS[currentDevice],
      value: fontSize[currentDevice],
      step: ['em', 'rem'].includes(fontSize.suffix[currentDevice]) ? 0.1 : 1,
      units: fSUnit,
      activeUnit: fontSize.suffix[currentDevice],
      hasResponsive: true,
      onChange: val => {
        const nextVal = fontSize;
        nextVal[currentDevice] = val;
        onChange({
          fontSize: nextVal
        });
      },
      onUnitChange: val => {
        const nextVal = fontSize;
        nextVal.suffix[currentDevice] = val;
        onChange({
          fontSize: nextVal
        });
      },
      onReset: () => {
        onChange({
          fontSize: defaultFS
        });
        if (refreshAfterReset) {
          wp.customize.previewer.refresh();
        }
      },
      onChangedDevice: setCurrentDevice
    });
  };
  const renderLineHeight = () => {
    let {
      lineHeight
    } = value;
    if (!lineHeight) {
      lineHeight = {
        ...defaultLH
      };
    }
    const lowerStepUnits = ['em', '—'];
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.NumberControl, {
      className: "line-height",
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Line Height', 'solace'),
      step: lowerStepUnits.includes(lineHeight.suffix[currentDevice]) ? 0.1 : 1,
      default: defaultLH[currentDevice],
      value: lineHeight[currentDevice],
      units: lHunit,
      activeUnit: lineHeight.suffix[currentDevice],
      max: lineHeight.suffix[currentDevice] === 'em' ? 4 : 200,
      min: lineHeight.suffix[currentDevice] === 'em' ? 0.5 : 1,
      hasResponsive: true,
      onChange: val => {
        const nextVal = lineHeight;
        nextVal[currentDevice] = val;
        onChange({
          lineHeight: nextVal
        });
      },
      onReset: () => {
        onChange({
          lineHeight: defaultLH
        });
        if (refreshAfterReset) {
          wp.customize.previewer.refresh();
        }
      },
      onUnitChange: val => {
        const nextVal = lineHeight;
        nextVal.suffix[currentDevice] = val;
        onChange({
          lineHeight: nextVal
        });
      },
      onChangedDevice: setCurrentDevice
    });
  };
  const renderLetterSpacing = () => {
    let {
      letterSpacing
    } = value;
    if (!letterSpacing) {
      letterSpacing = {
        ...defaultLS
      };
    }
    return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_solace_wp_components__WEBPACK_IMPORTED_MODULE_2__.NumberControl, {
      className: "letter-spacing",
      label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Letter Spacing', 'solace'),
      step: 0.1,
      default: defaultLS[currentDevice],
      value: letterSpacing && letterSpacing[currentDevice] ? letterSpacing[currentDevice] : '',
      max: 20,
      min: -5,
      units: ['px'],
      hasResponsive: true,
      onChange: val => {
        const nextVal = letterSpacing;
        nextVal[currentDevice] = val;
        onChange({
          letterSpacing: nextVal
        });
      },
      onReset: () => {
        onChange({
          letterSpacing: defaultLS
        });
        if (refreshAfterReset) {
          wp.customize.previewer.refresh();
        }
      },
      onChangedDevice: setCurrentDevice
    });
  };
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, label && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
    className: "customize-control-title"
  }, label), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
    className: "solace-typeface-control solace-white-background-control"
  }, renderTextTransform(), renderFontWeight(), renderFontSize(), renderLineHeight(), renderLetterSpacing()));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Typeface);
const responsiveShape = {
  mobile: prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_3___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_3___default().number)]),
  tablet: prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_3___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_3___default().number)]),
  desktop: prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_3___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_3___default().number)])
};
Typeface.propTypes = {
  label: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().string),
  value: prop_types__WEBPACK_IMPORTED_MODULE_3___default().shape({
    fontSize: prop_types__WEBPACK_IMPORTED_MODULE_3___default().shape({
      suffix: prop_types__WEBPACK_IMPORTED_MODULE_3___default().shape(responsiveShape),
      ...responsiveShape
    }),
    lineHeight: prop_types__WEBPACK_IMPORTED_MODULE_3___default().shape({
      suffix: prop_types__WEBPACK_IMPORTED_MODULE_3___default().shape(responsiveShape),
      ...responsiveShape
    }),
    letterSpacing: prop_types__WEBPACK_IMPORTED_MODULE_3___default().shape(responsiveShape),
    fontWeight: prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_3___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_3___default().number)]),
    textTransform: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().string)
  }),
  withTextTransform: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().bool),
  refreshAfterReset: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().bool),
  fSUnit: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().array),
  lHunit: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().array),
  onChange: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().func).isRequired,
  defaultFS: prop_types__WEBPACK_IMPORTED_MODULE_3___default().shape({
    suffix: prop_types__WEBPACK_IMPORTED_MODULE_3___default().shape(responsiveShape),
    ...responsiveShape
  }),
  defaultLH: prop_types__WEBPACK_IMPORTED_MODULE_3___default().shape({
    suffix: prop_types__WEBPACK_IMPORTED_MODULE_3___default().shape(responsiveShape),
    ...responsiveShape
  }),
  defaultLS: prop_types__WEBPACK_IMPORTED_MODULE_3___default().shape(responsiveShape)
};

/***/ }),

/***/ "./assets/apps/customizer-controls/src/typeface/TypefaceComponent.js":
/*!***************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/typeface/TypefaceComponent.js ***!
  \***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _Typeface__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Typeface */ "./assets/apps/customizer-controls/src/typeface/Typeface.js");

/*eslint camelcase: ["error", {allow: ["text_transform","weight_default","refresh_on_reset","font_family_control","letter_spacing_default","line_height_units","disable_transform","size_default","size_units","line_height_default"]}]*/



const TypefaceComponent = ({
  control
}) => {
  let setVal = control.setting.get();
  let defaultParams = {
    size_units: ['em', 'px'],
    line_height_units: ['em', 'px', '—'],
    weight_default: 400,
    text_transform: 'none',
    size_default: {
      suffix: {
        mobile: 'px',
        tablet: 'px',
        desktop: 'px'
      },
      mobile: 15,
      tablet: 15,
      desktop: 15
    },
    line_height_default: {
      suffix: {
        mobile: 'em',
        tablet: 'em',
        desktop: 'em'
      },
      mobile: 1.6,
      tablet: 1.6,
      desktop: 1.6
    },
    letter_spacing_default: {
      mobile: 0,
      tablet: 0,
      desktop: 0
    }
  };
  const emptyValue = {
    fontSize: {
      suffix: {
        mobile: 'px',
        tablet: 'px',
        desktop: 'px'
      },
      mobile: '',
      tablet: '',
      desktop: ''
    },
    lineHeight: {
      suffix: {
        mobile: 'em',
        tablet: 'em',
        desktop: 'em'
      },
      mobile: '',
      tablet: '',
      desktop: ''
    },
    letterSpacing: {
      mobile: '',
      tablet: '',
      desktop: ''
    },
    fontWeight: 'none',
    textTransform: 'none'
  };
  const emptyDefault = {
    size_units: ['em', 'px'],
    line_height_units: ['em', 'px', '-'],
    weight_default: 'none',
    text_transform: 'none',
    size_default: {
      suffix: {
        mobile: 'px',
        tablet: 'px',
        desktop: 'px'
      },
      mobile: '',
      tablet: '',
      desktop: ''
    },
    line_height_default: {
      suffix: {
        mobile: 'em',
        tablet: 'em',
        desktop: 'em'
      },
      mobile: '',
      tablet: '',
      desktop: ''
    },
    letter_spacing_default: {
      mobile: '',
      tablet: '',
      desktop: ''
    }
  };
  if (!setVal) {
    setVal = emptyValue;
  }
  if (typeof setVal === 'string') {
    setVal = defaultParams;
  }
  const controlParams = control.params.input_attrs ? {
    ...defaultParams,
    ...JSON.parse(control.params.input_attrs)
  } : defaultParams;
  if (control.params.input_attrs.length) {
    const inputAttrs = JSON.parse(control.params.input_attrs);
    if (inputAttrs.default_is_empty) {
      defaultParams = emptyDefault;
    }
  }

  // Added Later. Make sure we have a default value if none is selected.
  setVal.lineHeight = setVal.lineHeight || defaultParams.line_height_default;
  setVal.lineHeight.suffix = setVal.lineHeight.suffix || defaultParams.line_height_default.suffix;

  // Added Later. Make sure we have a suffix for line height.
  controlParams.line_height_default.suffix = controlParams.line_height_default.suffix || defaultParams.line_height_default.suffix;
  const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({
    fontSize: setVal.fontSize,
    lineHeight: setVal.lineHeight,
    letterSpacing: setVal.letterSpacing,
    fontWeight: setVal.fontWeight,
    textTransform: setVal.textTransform,
    flag: false
  });
  const updateValues = nextValue => {
    setValue({
      ...value,
      ...nextValue
    });
    control.setting.set({
      ...control.setting.get(),
      ...nextValue,
      flag: !control.setting.get().flag
    });
  };
  const {
    label,
    font_family_control,
    refresh_on_reset
  } = control.params;
  const {
    disable_transform,
    size_default,
    size_units,
    line_height_default,
    line_height_units,
    letter_spacing_default
  } = controlParams;
  return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_Typeface__WEBPACK_IMPORTED_MODULE_1__["default"], {
    label: label,
    value: value,
    fontFamilyControl: font_family_control,
    withTextTransform: disable_transform,
    defaultFS: size_default,
    fSUnit: size_units,
    onChange: updateValues,
    refreshAfterReset: refresh_on_reset,
    defaultLH: line_height_default,
    lHunit: line_height_units,
    defaultLS: letter_spacing_default
  });
};
TypefaceComponent.propTypes = {
  control: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().object).isRequired
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TypefaceComponent);

/***/ }),

/***/ "./assets/apps/customizer-controls/src/typography-extra/LocalGoogleFonts.js":
/*!**********************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/typography-extra/LocalGoogleFonts.js ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   initLocalGoogleFonts: () => (/* binding */ initLocalGoogleFonts)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _toggle_ToggleComponent__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../toggle/ToggleComponent */ "./assets/apps/customizer-controls/src/toggle/ToggleComponent.js");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);

/* global SolaceReactCustomize */




const initLocalGoogleFonts = () => {
  const node = document.querySelector('.control-section-typography_extra_section');
  if (!node) {
    return;
  }
  const slug = node.getAttribute('data-slug');
  const section = wp.customize.section(slug);
  if (!section) {
    return;
  }
  const toggleControl = new wp.customize.controlConstructor.solace_toggle_control(SolaceReactCustomize.localGoogleFonts.key, {
    section: section.id,
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Local fonts hosting', 'solace'),
    setting: SolaceReactCustomize.localGoogleFonts.key,
    description: SolaceReactCustomize.localGoogleFonts.learnMore,
    priority: 5
  });
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_toggle_ToggleComponent__WEBPACK_IMPORTED_MODULE_2__["default"], {
    control: toggleControl
  }), section.container[0]);
};


/***/ }),

/***/ "./assets/apps/customizer-controls/src/typography-font-pair/Control.js":
/*!*****************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/typography-font-pair/Control.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   FontPairControl: () => (/* binding */ FontPairControl)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _FontPairComponent_tsx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./FontPairComponent.tsx */ "./assets/apps/customizer-controls/src/typography-font-pair/FontPairComponent.tsx");




const FontPairControl = wp.customize.Control.extend({
  renderContent: function renderContent() {
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_FontPairComponent_tsx__WEBPACK_IMPORTED_MODULE_2__["default"], {
      control: this
    }), this.container[0]);
  }
});

/***/ }),

/***/ "./assets/apps/customizer-controls/src/scss/_repeater.scss":
/*!*****************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/scss/_repeater.scss ***!
  \*****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin


/***/ }),

/***/ "./assets/apps/customizer-controls/src/style.scss":
/*!********************************************************!*\
  !*** ./assets/apps/customizer-controls/src/style.scss ***!
  \********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin


/***/ }),

/***/ "./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/factoryWithTypeCheckers.js":
/*!************************************************************!*\
  !*** ./node_modules/prop-types/factoryWithTypeCheckers.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 ReactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
var assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");

var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js");
var has = __webpack_require__(/*! ./lib/has */ "./node_modules/prop-types/lib/has.js");
var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "./node_modules/prop-types/checkPropTypes.js");

var printWarning = function() {};

if (true) {
  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) {}
  };
}

function emptyFunctionThatReturnsNull() {
  return null;
}

module.exports = function(isValidElement, throwOnDirectAccess) {
  /* global Symbol */
  var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
  var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.

  /**
   * Returns the iterator method function contained on the iterable object.
   *
   * Be sure to invoke the function with the iterable as context:
   *
   *     var iteratorFn = getIteratorFn(myIterable);
   *     if (iteratorFn) {
   *       var iterator = iteratorFn.call(myIterable);
   *       ...
   *     }
   *
   * @param {?object} maybeIterable
   * @return {?function}
   */
  function getIteratorFn(maybeIterable) {
    var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
    if (typeof iteratorFn === 'function') {
      return iteratorFn;
    }
  }

  /**
   * Collection of methods that allow declaration and validation of props that are
   * supplied to React components. Example usage:
   *
   *   var Props = require('ReactPropTypes');
   *   var MyArticle = React.createClass({
   *     propTypes: {
   *       // An optional string prop named "description".
   *       description: Props.string,
   *
   *       // A required enum prop named "category".
   *       category: Props.oneOf(['News','Photos']).isRequired,
   *
   *       // A prop named "dialog" that requires an instance of Dialog.
   *       dialog: Props.instanceOf(Dialog).isRequired
   *     },
   *     render: function() { ... }
   *   });
   *
   * A more formal specification of how these methods are used:
   *
   *   type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
   *   decl := ReactPropTypes.{type}(.isRequired)?
   *
   * Each and every declaration produces a function with the same signature. This
   * allows the creation of custom validation functions. For example:
   *
   *  var MyLink = React.createClass({
   *    propTypes: {
   *      // An optional string or URI prop named "href".
   *      href: function(props, propName, componentName) {
   *        var propValue = props[propName];
   *        if (propValue != null && typeof propValue !== 'string' &&
   *            !(propValue instanceof URI)) {
   *          return new Error(
   *            'Expected a string or an URI for ' + propName + ' in ' +
   *            componentName
   *          );
   *        }
   *      }
   *    },
   *    render: function() {...}
   *  });
   *
   * @internal
   */

  var ANONYMOUS = '<<anonymous>>';

  // Important!
  // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
  var ReactPropTypes = {
    array: createPrimitiveTypeChecker('array'),
    bigint: createPrimitiveTypeChecker('bigint'),
    bool: createPrimitiveTypeChecker('boolean'),
    func: createPrimitiveTypeChecker('function'),
    number: createPrimitiveTypeChecker('number'),
    object: createPrimitiveTypeChecker('object'),
    string: createPrimitiveTypeChecker('string'),
    symbol: createPrimitiveTypeChecker('symbol'),

    any: createAnyTypeChecker(),
    arrayOf: createArrayOfTypeChecker,
    element: createElementTypeChecker(),
    elementType: createElementTypeTypeChecker(),
    instanceOf: createInstanceTypeChecker,
    node: createNodeChecker(),
    objectOf: createObjectOfTypeChecker,
    oneOf: createEnumTypeChecker,
    oneOfType: createUnionTypeChecker,
    shape: createShapeTypeChecker,
    exact: createStrictShapeTypeChecker,
  };

  /**
   * inlined Object.is polyfill to avoid requiring consumers ship their own
   * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
   */
  /*eslint-disable no-self-compare*/
  function is(x, y) {
    // SameValue algorithm
    if (x === y) {
      // Steps 1-5, 7-10
      // Steps 6.b-6.e: +0 != -0
      return x !== 0 || 1 / x === 1 / y;
    } else {
      // Step 6.a: NaN == NaN
      return x !== x && y !== y;
    }
  }
  /*eslint-enable no-self-compare*/

  /**
   * We use an Error-like object for backward compatibility as people may call
   * PropTypes directly and inspect their output. However, we don't use real
   * Errors anymore. We don't inspect their stack anyway, and creating them
   * is prohibitively expensive if they are created too often, such as what
   * happens in oneOfType() for any type before the one that matched.
   */
  function PropTypeError(message, data) {
    this.message = message;
    this.data = data && typeof data === 'object' ? data: {};
    this.stack = '';
  }
  // Make `instanceof Error` still work for returned errors.
  PropTypeError.prototype = Error.prototype;

  function createChainableTypeChecker(validate) {
    if (true) {
      var manualPropTypeCallCache = {};
      var manualPropTypeWarningCount = 0;
    }
    function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
      componentName = componentName || ANONYMOUS;
      propFullName = propFullName || propName;

      if (secret !== ReactPropTypesSecret) {
        if (throwOnDirectAccess) {
          // New behavior only for users of `prop-types` package
          var err = new Error(
            'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
            'Use `PropTypes.checkPropTypes()` to call them. ' +
            'Read more at http://fb.me/use-check-prop-types'
          );
          err.name = 'Invariant Violation';
          throw err;
        } else if ( true && typeof console !== 'undefined') {
          // Old behavior for people using React.PropTypes
          var cacheKey = componentName + ':' + propName;
          if (
            !manualPropTypeCallCache[cacheKey] &&
            // Avoid spamming the console because they are often not actionable except for lib authors
            manualPropTypeWarningCount < 3
          ) {
            printWarning(
              'You are manually calling a React.PropTypes validation ' +
              'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
              'and will throw in the standalone `prop-types` package. ' +
              'You may be seeing this warning due to a third-party PropTypes ' +
              'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
            );
            manualPropTypeCallCache[cacheKey] = true;
            manualPropTypeWarningCount++;
          }
        }
      }
      if (props[propName] == null) {
        if (isRequired) {
          if (props[propName] === null) {
            return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
          }
          return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
        }
        return null;
      } else {
        return validate(props, propName, componentName, location, propFullName);
      }
    }

    var chainedCheckType = checkType.bind(null, false);
    chainedCheckType.isRequired = checkType.bind(null, true);

    return chainedCheckType;
  }

  function createPrimitiveTypeChecker(expectedType) {
    function validate(props, propName, componentName, location, propFullName, secret) {
      var propValue = props[propName];
      var propType = getPropType(propValue);
      if (propType !== expectedType) {
        // `propValue` being instance of, say, date/regexp, pass the 'object'
        // check, but we can offer a more precise error message here rather than
        // 'of type `object`'.
        var preciseType = getPreciseType(propValue);

        return new PropTypeError(
          'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
          {expectedType: expectedType}
        );
      }
      return null;
    }
    return createChainableTypeChecker(validate);
  }

  function createAnyTypeChecker() {
    return createChainableTypeChecker(emptyFunctionThatReturnsNull);
  }

  function createArrayOfTypeChecker(typeChecker) {
    function validate(props, propName, componentName, location, propFullName) {
      if (typeof typeChecker !== 'function') {
        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
      }
      var propValue = props[propName];
      if (!Array.isArray(propValue)) {
        var propType = getPropType(propValue);
        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
      }
      for (var i = 0; i < propValue.length; i++) {
        var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
        if (error instanceof Error) {
          return error;
        }
      }
      return null;
    }
    return createChainableTypeChecker(validate);
  }

  function createElementTypeChecker() {
    function validate(props, propName, componentName, location, propFullName) {
      var propValue = props[propName];
      if (!isValidElement(propValue)) {
        var propType = getPropType(propValue);
        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
      }
      return null;
    }
    return createChainableTypeChecker(validate);
  }

  function createElementTypeTypeChecker() {
    function validate(props, propName, componentName, location, propFullName) {
      var propValue = props[propName];
      if (!ReactIs.isValidElementType(propValue)) {
        var propType = getPropType(propValue);
        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
      }
      return null;
    }
    return createChainableTypeChecker(validate);
  }

  function createInstanceTypeChecker(expectedClass) {
    function validate(props, propName, componentName, location, propFullName) {
      if (!(props[propName] instanceof expectedClass)) {
        var expectedClassName = expectedClass.name || ANONYMOUS;
        var actualClassName = getClassName(props[propName]);
        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
      }
      return null;
    }
    return createChainableTypeChecker(validate);
  }

  function createEnumTypeChecker(expectedValues) {
    if (!Array.isArray(expectedValues)) {
      if (true) {
        if (arguments.length > 1) {
          printWarning(
            'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
            'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
          );
        } else {
          printWarning('Invalid argument supplied to oneOf, expected an array.');
        }
      }
      return emptyFunctionThatReturnsNull;
    }

    function validate(props, propName, componentName, location, propFullName) {
      var propValue = props[propName];
      for (var i = 0; i < expectedValues.length; i++) {
        if (is(propValue, expectedValues[i])) {
          return null;
        }
      }

      var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
        var type = getPreciseType(value);
        if (type === 'symbol') {
          return String(value);
        }
        return value;
      });
      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
    }
    return createChainableTypeChecker(validate);
  }

  function createObjectOfTypeChecker(typeChecker) {
    function validate(props, propName, componentName, location, propFullName) {
      if (typeof typeChecker !== 'function') {
        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
      }
      var propValue = props[propName];
      var propType = getPropType(propValue);
      if (propType !== 'object') {
        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
      }
      for (var key in propValue) {
        if (has(propValue, key)) {
          var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
          if (error instanceof Error) {
            return error;
          }
        }
      }
      return null;
    }
    return createChainableTypeChecker(validate);
  }

  function createUnionTypeChecker(arrayOfTypeCheckers) {
    if (!Array.isArray(arrayOfTypeCheckers)) {
       true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : 0;
      return emptyFunctionThatReturnsNull;
    }

    for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
      var checker = arrayOfTypeCheckers[i];
      if (typeof checker !== 'function') {
        printWarning(
          'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
          'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
        );
        return emptyFunctionThatReturnsNull;
      }
    }

    function validate(props, propName, componentName, location, propFullName) {
      var expectedTypes = [];
      for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
        var checker = arrayOfTypeCheckers[i];
        var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
        if (checkerResult == null) {
          return null;
        }
        if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
          expectedTypes.push(checkerResult.data.expectedType);
        }
      }
      var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
    }
    return createChainableTypeChecker(validate);
  }

  function createNodeChecker() {
    function validate(props, propName, componentName, location, propFullName) {
      if (!isNode(props[propName])) {
        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
      }
      return null;
    }
    return createChainableTypeChecker(validate);
  }

  function invalidValidatorError(componentName, location, propFullName, key, type) {
    return new PropTypeError(
      (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
      'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
    );
  }

  function createShapeTypeChecker(shapeTypes) {
    function validate(props, propName, componentName, location, propFullName) {
      var propValue = props[propName];
      var propType = getPropType(propValue);
      if (propType !== 'object') {
        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
      }
      for (var key in shapeTypes) {
        var checker = shapeTypes[key];
        if (typeof checker !== 'function') {
          return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
        }
        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
        if (error) {
          return error;
        }
      }
      return null;
    }
    return createChainableTypeChecker(validate);
  }

  function createStrictShapeTypeChecker(shapeTypes) {
    function validate(props, propName, componentName, location, propFullName) {
      var propValue = props[propName];
      var propType = getPropType(propValue);
      if (propType !== 'object') {
        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
      }
      // We need to check all keys in case some are required but missing from props.
      var allKeys = assign({}, props[propName], shapeTypes);
      for (var key in allKeys) {
        var checker = shapeTypes[key];
        if (has(shapeTypes, key) && typeof checker !== 'function') {
          return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
        }
        if (!checker) {
          return new PropTypeError(
            'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
            '\nBad object: ' + JSON.stringify(props[propName], null, '  ') +
            '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, '  ')
          );
        }
        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
        if (error) {
          return error;
        }
      }
      return null;
    }

    return createChainableTypeChecker(validate);
  }

  function isNode(propValue) {
    switch (typeof propValue) {
      case 'number':
      case 'string':
      case 'undefined':
        return true;
      case 'boolean':
        return !propValue;
      case 'object':
        if (Array.isArray(propValue)) {
          return propValue.every(isNode);
        }
        if (propValue === null || isValidElement(propValue)) {
          return true;
        }

        var iteratorFn = getIteratorFn(propValue);
        if (iteratorFn) {
          var iterator = iteratorFn.call(propValue);
          var step;
          if (iteratorFn !== propValue.entries) {
            while (!(step = iterator.next()).done) {
              if (!isNode(step.value)) {
                return false;
              }
            }
          } else {
            // Iterator will provide entry [k,v] tuples rather than values.
            while (!(step = iterator.next()).done) {
              var entry = step.value;
              if (entry) {
                if (!isNode(entry[1])) {
                  return false;
                }
              }
            }
          }
        } else {
          return false;
        }

        return true;
      default:
        return false;
    }
  }

  function isSymbol(propType, propValue) {
    // Native Symbol.
    if (propType === 'symbol') {
      return true;
    }

    // falsy value can't be a Symbol
    if (!propValue) {
      return false;
    }

    // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
    if (propValue['@@toStringTag'] === 'Symbol') {
      return true;
    }

    // Fallback for non-spec compliant Symbols which are polyfilled.
    if (typeof Symbol === 'function' && propValue instanceof Symbol) {
      return true;
    }

    return false;
  }

  // Equivalent of `typeof` but with special handling for array and regexp.
  function getPropType(propValue) {
    var propType = typeof propValue;
    if (Array.isArray(propValue)) {
      return 'array';
    }
    if (propValue instanceof RegExp) {
      // Old webkits (at least until Android 4.0) return 'function' rather than
      // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
      // passes PropTypes.object.
      return 'object';
    }
    if (isSymbol(propType, propValue)) {
      return 'symbol';
    }
    return propType;
  }

  // This handles more types than `getPropType`. Only used for error messages.
  // See `createPrimitiveTypeChecker`.
  function getPreciseType(propValue) {
    if (typeof propValue === 'undefined' || propValue === null) {
      return '' + propValue;
    }
    var propType = getPropType(propValue);
    if (propType === 'object') {
      if (propValue instanceof Date) {
        return 'date';
      } else if (propValue instanceof RegExp) {
        return 'regexp';
      }
    }
    return propType;
  }

  // Returns a string that is postfixed to a warning about an invalid type.
  // For example, "undefined" or "of type array"
  function getPostfixForTypeWarning(value) {
    var type = getPreciseType(value);
    switch (type) {
      case 'array':
      case 'object':
        return 'an ' + type;
      case 'boolean':
      case 'date':
      case 'regexp':
        return 'a ' + type;
      default:
        return type;
    }
  }

  // Returns class name of the object, if any.
  function getClassName(propValue) {
    if (!propValue.constructor || !propValue.constructor.name) {
      return ANONYMOUS;
    }
    return propValue.constructor.name;
  }

  ReactPropTypes.checkPropTypes = checkPropTypes;
  ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
  ReactPropTypes.PropTypes = ReactPropTypes;

  return ReactPropTypes;
};


/***/ }),

/***/ "./node_modules/prop-types/index.js":
/*!******************************************!*\
  !*** ./node_modules/prop-types/index.js ***!
  \******************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

/**
 * 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.
 */

if (true) {
  var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");

  // By explicitly using `prop-types` you are opting into new development behavior.
  // http://fb.me/prop-types-in-prod
  var throwOnDirectAccess = true;
  module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "./node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess);
} else {}


/***/ }),

/***/ "./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-is/cjs/react-is.development.js":
/*!***********************************************************!*\
  !*** ./node_modules/react-is/cjs/react-is.development.js ***!
  \***********************************************************/
/***/ ((__unused_webpack_module, exports) => {

"use strict";
/** @license React v16.13.1
 * react-is.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';

// 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
// (unstable) APIs that have been removed. Can we remove the symbols?

var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
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;

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 typeOf(object) {
  if (typeof object === 'object' && object !== null) {
    var $$typeof = object.$$typeof;

    switch ($$typeof) {
      case REACT_ELEMENT_TYPE:
        var type = object.type;

        switch (type) {
          case REACT_ASYNC_MODE_TYPE:
          case REACT_CONCURRENT_MODE_TYPE:
          case REACT_FRAGMENT_TYPE:
          case REACT_PROFILER_TYPE:
          case REACT_STRICT_MODE_TYPE:
          case REACT_SUSPENSE_TYPE:
            return type;

          default:
            var $$typeofType = type && type.$$typeof;

            switch ($$typeofType) {
              case REACT_CONTEXT_TYPE:
              case REACT_FORWARD_REF_TYPE:
              case REACT_LAZY_TYPE:
              case REACT_MEMO_TYPE:
              case REACT_PROVIDER_TYPE:
                return $$typeofType;

              default:
                return $$typeof;
            }

        }

      case REACT_PORTAL_TYPE:
        return $$typeof;
    }
  }

  return undefined;
} // AsyncMode is deprecated along with isAsyncMode

var AsyncMode = REACT_ASYNC_MODE_TYPE;
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
var ContextConsumer = REACT_CONTEXT_TYPE;
var ContextProvider = REACT_PROVIDER_TYPE;
var Element = REACT_ELEMENT_TYPE;
var ForwardRef = REACT_FORWARD_REF_TYPE;
var Fragment = REACT_FRAGMENT_TYPE;
var Lazy = REACT_LAZY_TYPE;
var Memo = REACT_MEMO_TYPE;
var Portal = REACT_PORTAL_TYPE;
var Profiler = REACT_PROFILER_TYPE;
var StrictMode = REACT_STRICT_MODE_TYPE;
var Suspense = REACT_SUSPENSE_TYPE;
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated

function isAsyncMode(object) {
  {
    if (!hasWarnedAboutDeprecatedIsAsyncMode) {
      hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint

      console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
    }
  }

  return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
}
function isConcurrentMode(object) {
  return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
}
function isContextConsumer(object) {
  return typeOf(object) === REACT_CONTEXT_TYPE;
}
function isContextProvider(object) {
  return typeOf(object) === REACT_PROVIDER_TYPE;
}
function isElement(object) {
  return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
}
function isForwardRef(object) {
  return typeOf(object) === REACT_FORWARD_REF_TYPE;
}
function isFragment(object) {
  return typeOf(object) === REACT_FRAGMENT_TYPE;
}
function isLazy(object) {
  return typeOf(object) === REACT_LAZY_TYPE;
}
function isMemo(object) {
  return typeOf(object) === REACT_MEMO_TYPE;
}
function isPortal(object) {
  return typeOf(object) === REACT_PORTAL_TYPE;
}
function isProfiler(object) {
  return typeOf(object) === REACT_PROFILER_TYPE;
}
function isStrictMode(object) {
  return typeOf(object) === REACT_STRICT_MODE_TYPE;
}
function isSuspense(object) {
  return typeOf(object) === REACT_SUSPENSE_TYPE;
}

exports.AsyncMode = AsyncMode;
exports.ConcurrentMode = ConcurrentMode;
exports.ContextConsumer = ContextConsumer;
exports.ContextProvider = ContextProvider;
exports.Element = Element;
exports.ForwardRef = ForwardRef;
exports.Fragment = Fragment;
exports.Lazy = Lazy;
exports.Memo = Memo;
exports.Portal = Portal;
exports.Profiler = Profiler;
exports.StrictMode = StrictMode;
exports.Suspense = Suspense;
exports.isAsyncMode = isAsyncMode;
exports.isConcurrentMode = isConcurrentMode;
exports.isContextConsumer = isContextConsumer;
exports.isContextProvider = isContextProvider;
exports.isElement = isElement;
exports.isForwardRef = isForwardRef;
exports.isFragment = isFragment;
exports.isLazy = isLazy;
exports.isMemo = isMemo;
exports.isPortal = isPortal;
exports.isProfiler = isProfiler;
exports.isStrictMode = isStrictMode;
exports.isSuspense = isSuspense;
exports.isValidElementType = isValidElementType;
exports.typeOf = typeOf;
  })();
}


/***/ }),

/***/ "./node_modules/react-is/index.js":
/*!****************************************!*\
  !*** ./node_modules/react-is/index.js ***!
  \****************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


if (false) {} else {
  module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "./node_modules/react-is/cjs/react-is.development.js");
}


/***/ }),

/***/ "./node_modules/react-sortablejs/dist/index.js":
/*!*****************************************************!*\
  !*** ./node_modules/react-sortablejs/dist/index.js ***!
  \*****************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var $8zHUo$sortablejs = __webpack_require__(/*! sortablejs */ "./node_modules/sortablejs/modular/sortable.esm.js");
var $8zHUo$classnames = __webpack_require__(/*! classnames */ "./node_modules/react-sortablejs/node_modules/classnames/index.js");
var $8zHUo$react = __webpack_require__(/*! react */ "react");
var $8zHUo$tinyinvariant = __webpack_require__(/*! tiny-invariant */ "./node_modules/tiny-invariant/dist/tiny-invariant.esm.js");

function $parcel$interopDefault(a) {
  return a && a.__esModule ? a.default : a;
}
function $parcel$export(e, n, v, s) {
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
function $parcel$exportWildcard(dest, source) {
  Object.keys(source).forEach(function(key) {
    if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {
      return;
    }

    Object.defineProperty(dest, key, {
      enumerable: true,
      get: function get() {
        return source[key];
      }
    });
  });

  return dest;
}

$parcel$export(module.exports, "Sortable", () => $882b6d93070905b3$re_export$Sortable);
$parcel$export(module.exports, "Direction", () => $882b6d93070905b3$re_export$Direction);
$parcel$export(module.exports, "DOMRect", () => $882b6d93070905b3$re_export$DOMRect);
$parcel$export(module.exports, "GroupOptions", () => $882b6d93070905b3$re_export$GroupOptions);
$parcel$export(module.exports, "MoveEvent", () => $882b6d93070905b3$re_export$MoveEvent);
$parcel$export(module.exports, "Options", () => $882b6d93070905b3$re_export$Options);
$parcel$export(module.exports, "PullResult", () => $882b6d93070905b3$re_export$PullResult);
$parcel$export(module.exports, "PutResult", () => $882b6d93070905b3$re_export$PutResult);
$parcel$export(module.exports, "SortableEvent", () => $882b6d93070905b3$re_export$SortableEvent);
$parcel$export(module.exports, "SortableOptions", () => $882b6d93070905b3$re_export$SortableOptions);
$parcel$export(module.exports, "Utils", () => $882b6d93070905b3$re_export$Utils);
$parcel$export(module.exports, "ReactSortable", () => $7fe8e3ea572bda7a$export$11bbed9ee0012c13);





function $eb03e74f8f7db1f3$export$1d0aa160432dfea5(node) {
    if (node.parentElement !== null) node.parentElement.removeChild(node);
}
function $eb03e74f8f7db1f3$export$6d240faa51aa562f(parent, newChild, index) {
    const refChild = parent.children[index] || null;
    parent.insertBefore(newChild, refChild);
}
function $eb03e74f8f7db1f3$export$d7d742816c28cf91(customs) {
    $eb03e74f8f7db1f3$export$77f49a256021c8de(customs);
    $eb03e74f8f7db1f3$export$a6177d5829f70ebc(customs);
}
function $eb03e74f8f7db1f3$export$77f49a256021c8de(customs) {
    customs.forEach((curr)=>$eb03e74f8f7db1f3$export$1d0aa160432dfea5(curr.element));
}
function $eb03e74f8f7db1f3$export$a6177d5829f70ebc(customs) {
    customs.forEach((curr)=>{
        $eb03e74f8f7db1f3$export$6d240faa51aa562f(curr.parentElement, curr.element, curr.oldIndex);
    });
}
function $eb03e74f8f7db1f3$export$4655efe700f887a(evt, list) {
    const mode = $eb03e74f8f7db1f3$export$1fc0f6205829e19c(evt);
    const parentElement = {
        parentElement: evt.from
    };
    let custom = [];
    switch(mode){
        case "normal":
            /* eslint-disable */ const item = {
                element: evt.item,
                newIndex: evt.newIndex,
                oldIndex: evt.oldIndex,
                parentElement: evt.from
            };
            custom = [
                item
            ];
            break;
        case "swap":
            const drag = {
                element: evt.item,
                oldIndex: evt.oldIndex,
                newIndex: evt.newIndex,
                ...parentElement
            };
            const swap = {
                element: evt.swapItem,
                oldIndex: evt.newIndex,
                newIndex: evt.oldIndex,
                ...parentElement
            };
            custom = [
                drag,
                swap
            ];
            break;
        case "multidrag":
            custom = evt.oldIndicies.map((curr, index)=>({
                    element: curr.multiDragElement,
                    oldIndex: curr.index,
                    newIndex: evt.newIndicies[index].index,
                    ...parentElement
                }));
            break;
    }
    /* eslint-enable */ const customs = $eb03e74f8f7db1f3$export$bc06a3af7dc65f53(custom, list);
    return customs;
}
function $eb03e74f8f7db1f3$export$c25cf8080bd305ec(normalized, list) {
    const a = $eb03e74f8f7db1f3$export$be2da95e6167b0bd(normalized, list);
    const b = $eb03e74f8f7db1f3$export$eca851ee65ae17e4(normalized, a);
    return b;
}
function $eb03e74f8f7db1f3$export$be2da95e6167b0bd(normalized, list) {
    const newList = [
        ...list
    ];
    normalized.concat().reverse().forEach((curr)=>newList.splice(curr.oldIndex, 1));
    return newList;
}
function $eb03e74f8f7db1f3$export$eca851ee65ae17e4(normalized, list, evt, clone) {
    const newList = [
        ...list
    ];
    normalized.forEach((curr)=>{
        const newItem = clone && evt && clone(curr.item, evt);
        newList.splice(curr.newIndex, 0, newItem || curr.item);
    });
    return newList;
}
function $eb03e74f8f7db1f3$export$1fc0f6205829e19c(evt) {
    if (evt.oldIndicies && evt.oldIndicies.length > 0) return "multidrag";
    if (evt.swapItem) return "swap";
    return "normal";
}
function $eb03e74f8f7db1f3$export$bc06a3af7dc65f53(inputs, list) {
    const normalized = inputs.map((curr)=>({
            ...curr,
            item: list[curr.oldIndex]
        })).sort((a, b)=>a.oldIndex - b.oldIndex);
    return normalized;
}
function $eb03e74f8f7db1f3$export$7553c81e62e31b7e(props) {
    /* eslint-disable */ const { list: // react sortable props
    list , setList: setList , children: children , tag: tag , style: style , className: className , clone: clone , onAdd: // sortable options that have methods we want to overwrite
    onAdd , onChange: onChange , onChoose: onChoose , onClone: onClone , onEnd: onEnd , onFilter: onFilter , onRemove: onRemove , onSort: onSort , onStart: onStart , onUnchoose: onUnchoose , onUpdate: onUpdate , onMove: onMove , onSpill: onSpill , onSelect: onSelect , onDeselect: onDeselect , ...options } = props;
    /* eslint-enable */ return options;
}


/** Holds a global reference for which react element is being dragged */ // @todo - use context to manage this. How does one use 2 different providers?
const $7fe8e3ea572bda7a$var$store = {
    dragging: null
};
class $7fe8e3ea572bda7a$export$11bbed9ee0012c13 extends (0, $8zHUo$react.Component) {
    /* eslint-disable-next-line */ static defaultProps = {
        clone: (item)=>item
    };
    constructor(props){
        super(props);
        // @todo forward ref this component
        this.ref = /*#__PURE__*/ (0, $8zHUo$react.createRef)();
        // make all state false because we can't change sortable unless a mouse gesture is made.
        const newList = [
            ...props.list
        ].map((item)=>Object.assign(item, {
                chosen: false,
                selected: false
            }));
        props.setList(newList, this.sortable, $7fe8e3ea572bda7a$var$store);
        (0, ($parcel$interopDefault($8zHUo$tinyinvariant)))(//@ts-expect-error: Doesn't exist. Will deprecate soon.
        !props.plugins, `
Plugins prop is no longer supported.
Instead, mount it with "Sortable.mount(new MultiDrag())"
Please read the updated README.md at https://github.com/SortableJS/react-sortablejs.
      `);
    }
    componentDidMount() {
        if (this.ref.current === null) return;
        const newOptions = this.makeOptions();
        (0, ($parcel$interopDefault($8zHUo$sortablejs))).create(this.ref.current, newOptions);
    }
    componentDidUpdate(prevProps) {
        if (prevProps.disabled !== this.props.disabled && this.sortable) this.sortable.option("disabled", this.props.disabled);
    }
    render() {
        const { tag: tag , style: style , className: className , id: id  } = this.props;
        const classicProps = {
            style: style,
            className: className,
            id: id
        };
        // if no tag, default to a `div` element.
        const newTag = !tag || tag === null ? "div" : tag;
        return /*#__PURE__*/ (0, $8zHUo$react.createElement)(newTag, {
            // @todo - find a way (perhaps with the callback) to allow AntD components to work
            ref: this.ref,
            ...classicProps
        }, this.getChildren());
    }
    getChildren() {
        const { children: children , dataIdAttr: dataIdAttr , selectedClass: selectedClass = "sortable-selected" , chosenClass: chosenClass = "sortable-chosen" , dragClass: /* eslint-disable */ dragClass = "sortable-drag" , fallbackClass: fallbackClass = "sortable-falback" , ghostClass: ghostClass = "sortable-ghost" , swapClass: swapClass = "sortable-swap-highlight" , filter: /* eslint-enable */ filter = "sortable-filter" , list: list ,  } = this.props;
        // if no children, don't do anything.
        if (!children || children == null) return null;
        const dataid = dataIdAttr || "data-id";
        /* eslint-disable-next-line */ return (0, $8zHUo$react.Children).map(children, (child, index)=>{
            if (child === undefined) return undefined;
            const item = list[index] || {};
            const { className: prevClassName  } = child.props;
            // @todo - handle the function if avalable. I don't think anyone will be doing this soon.
            const filtered = typeof filter === "string" && {
                [filter.replace(".", "")]: !!item.filtered
            };
            const className = (0, ($parcel$interopDefault($8zHUo$classnames)))(prevClassName, {
                [selectedClass]: item.selected,
                [chosenClass]: item.chosen,
                ...filtered
            });
            return /*#__PURE__*/ (0, $8zHUo$react.cloneElement)(child, {
                [dataid]: child.key,
                className: className
            });
        });
    }
    /** Appends the `sortable` property to this component */ get sortable() {
        const el = this.ref.current;
        if (el === null) return null;
        const key = Object.keys(el).find((k)=>k.includes("Sortable"));
        if (!key) return null;
        //@ts-expect-error: fix me.
        return el[key];
    }
    /** Converts all the props from `ReactSortable` into the `options` object that `Sortable.create(el, [options])` can use. */ makeOptions() {
        const DOMHandlers = [
            "onAdd",
            "onChoose",
            "onDeselect",
            "onEnd",
            "onRemove",
            "onSelect",
            "onSpill",
            "onStart",
            "onUnchoose",
            "onUpdate", 
        ];
        const NonDOMHandlers = [
            "onChange",
            "onClone",
            "onFilter",
            "onSort", 
        ];
        const newOptions = (0, $eb03e74f8f7db1f3$export$7553c81e62e31b7e)(this.props);
        DOMHandlers.forEach((name)=>newOptions[name] = this.prepareOnHandlerPropAndDOM(name));
        NonDOMHandlers.forEach((name)=>newOptions[name] = this.prepareOnHandlerProp(name));
        /** onMove has 2 arguments and needs to be handled seperately. */ const onMove1 = (evt, originalEvt)=>{
            const { onMove: onMove  } = this.props;
            const defaultValue = evt.willInsertAfter || -1;
            if (!onMove) return defaultValue;
            const result = onMove(evt, originalEvt, this.sortable, $7fe8e3ea572bda7a$var$store);
            if (typeof result === "undefined") return false;
            return result;
        };
        return {
            ...newOptions,
            onMove: onMove1
        };
    }
    /** Prepares a method that will be used in the sortable options to call an `on[Handler]` prop & an `on[Handler]` ReactSortable method.  */ prepareOnHandlerPropAndDOM(evtName) {
        return (evt)=>{
            // call the component prop
            this.callOnHandlerProp(evt, evtName);
            // calls state change
            //@ts-expect-error: until @types multidrag item is in
            this[evtName](evt);
        };
    }
    /** Prepares a method that will be used in the sortable options to call an `on[Handler]` prop */ prepareOnHandlerProp(evtName) {
        return (evt)=>{
            // call the component prop
            this.callOnHandlerProp(evt, evtName);
        };
    }
    /** Calls the `props.on[Handler]` function */ callOnHandlerProp(evt, evtName) {
        const propEvent = this.props[evtName];
        if (propEvent) propEvent(evt, this.sortable, $7fe8e3ea572bda7a$var$store);
    }
    // SORTABLE DOM HANDLING
    onAdd(evt) {
        const { list: list , setList: setList , clone: clone  } = this.props;
        /* eslint-disable-next-line */ const otherList = [
            ...$7fe8e3ea572bda7a$var$store.dragging.props.list
        ];
        const customs = (0, $eb03e74f8f7db1f3$export$4655efe700f887a)(evt, otherList);
        (0, $eb03e74f8f7db1f3$export$77f49a256021c8de)(customs);
        const newList = (0, $eb03e74f8f7db1f3$export$eca851ee65ae17e4)(customs, list, evt, clone).map((item)=>Object.assign(item, {
                selected: false
            }));
        setList(newList, this.sortable, $7fe8e3ea572bda7a$var$store);
    }
    onRemove(evt) {
        const { list: list , setList: setList  } = this.props;
        const mode = (0, $eb03e74f8f7db1f3$export$1fc0f6205829e19c)(evt);
        const customs = (0, $eb03e74f8f7db1f3$export$4655efe700f887a)(evt, list);
        (0, $eb03e74f8f7db1f3$export$a6177d5829f70ebc)(customs);
        let newList = [
            ...list
        ];
        // remove state if not in clone mode. otherwise, keep.
        if (evt.pullMode !== "clone") newList = (0, $eb03e74f8f7db1f3$export$be2da95e6167b0bd)(customs, newList);
        else {
            // switch used to get the clone
            let customClones = customs;
            switch(mode){
                case "multidrag":
                    customClones = customs.map((item, index)=>({
                            ...item,
                            element: evt.clones[index]
                        }));
                    break;
                case "normal":
                    customClones = customs.map((item)=>({
                            ...item,
                            element: evt.clone
                        }));
                    break;
                case "swap":
                default:
                    (0, ($parcel$interopDefault($8zHUo$tinyinvariant)))(true, `mode "${mode}" cannot clone. Please remove "props.clone" from <ReactSortable/> when using the "${mode}" plugin`);
            }
            (0, $eb03e74f8f7db1f3$export$77f49a256021c8de)(customClones);
            // replace selected items with cloned items
            customs.forEach((curr)=>{
                const index = curr.oldIndex;
                /* eslint-disable-next-line */ const newItem = this.props.clone(curr.item, evt);
                newList.splice(index, 1, newItem);
            });
        }
        // remove item.selected from list
        newList = newList.map((item)=>Object.assign(item, {
                selected: false
            }));
        setList(newList, this.sortable, $7fe8e3ea572bda7a$var$store);
    }
    onUpdate(evt) {
        const { list: list , setList: setList  } = this.props;
        const customs = (0, $eb03e74f8f7db1f3$export$4655efe700f887a)(evt, list);
        (0, $eb03e74f8f7db1f3$export$77f49a256021c8de)(customs);
        (0, $eb03e74f8f7db1f3$export$a6177d5829f70ebc)(customs);
        const newList = (0, $eb03e74f8f7db1f3$export$c25cf8080bd305ec)(customs, list);
        return setList(newList, this.sortable, $7fe8e3ea572bda7a$var$store);
    }
    onStart() {
        $7fe8e3ea572bda7a$var$store.dragging = this;
    }
    onEnd() {
        $7fe8e3ea572bda7a$var$store.dragging = null;
    }
    onChoose(evt) {
        const { list: list , setList: setList  } = this.props;
        const newList = list.map((item, index)=>{
            let newItem = item;
            if (index === evt.oldIndex) newItem = Object.assign(item, {
                chosen: true
            });
            return newItem;
        });
        setList(newList, this.sortable, $7fe8e3ea572bda7a$var$store);
    }
    onUnchoose(evt) {
        const { list: list , setList: setList  } = this.props;
        const newList = list.map((item, index)=>{
            let newItem = item;
            if (index === evt.oldIndex) newItem = Object.assign(newItem, {
                chosen: false
            });
            return newItem;
        });
        setList(newList, this.sortable, $7fe8e3ea572bda7a$var$store);
    }
    onSpill(evt) {
        const { removeOnSpill: removeOnSpill , revertOnSpill: revertOnSpill  } = this.props;
        if (removeOnSpill && !revertOnSpill) (0, $eb03e74f8f7db1f3$export$1d0aa160432dfea5)(evt.item);
    }
    onSelect(evt) {
        const { list: list , setList: setList  } = this.props;
        const newList = list.map((item)=>Object.assign(item, {
                selected: false
            }));
        evt.newIndicies.forEach((curr)=>{
            const index = curr.index;
            if (index === -1) {
                console.log(`"${evt.type}" had indice of "${curr.index}", which is probably -1 and doesn't usually happen here.`);
                console.log(evt);
                return;
            }
            newList[index].selected = true;
        });
        setList(newList, this.sortable, $7fe8e3ea572bda7a$var$store);
    }
    onDeselect(evt) {
        const { list: list , setList: setList  } = this.props;
        const newList = list.map((item)=>Object.assign(item, {
                selected: false
            }));
        evt.newIndicies.forEach((curr)=>{
            const index = curr.index;
            if (index === -1) return;
            newList[index].selected = true;
        });
        setList(newList, this.sortable, $7fe8e3ea572bda7a$var$store);
    }
}


var $faefaad95e5fcca0$exports = {};


$parcel$exportWildcard(module.exports, $faefaad95e5fcca0$exports);


//# sourceMappingURL=index.js.map


/***/ }),

/***/ "./node_modules/react-sortablejs/node_modules/classnames/index.js":
/*!************************************************************************!*\
  !*** ./node_modules/react-sortablejs/node_modules/classnames/index.js ***!
  \************************************************************************/
/***/ ((module, exports) => {

var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
  Copyright (c) 2018 Jed Watson.
  Licensed under the MIT License (MIT), see
  http://jedwatson.github.io/classnames
*/
/* global define */

(function () {
	'use strict';

	var hasOwn = {}.hasOwnProperty;

	function classNames() {
		var classes = [];

		for (var i = 0; i < arguments.length; i++) {
			var arg = arguments[i];
			if (!arg) continue;

			var argType = typeof arg;

			if (argType === 'string' || argType === 'number') {
				classes.push(arg);
			} else if (Array.isArray(arg)) {
				if (arg.length) {
					var inner = classNames.apply(null, arg);
					if (inner) {
						classes.push(inner);
					}
				}
			} else if (argType === 'object') {
				if (arg.toString === Object.prototype.toString) {
					for (var key in arg) {
						if (hasOwn.call(arg, key) && arg[key]) {
							classes.push(key);
						}
					}
				} else {
					classes.push(arg.toString());
				}
			}
		}

		return classes.join(' ');
	}

	if ( true && module.exports) {
		classNames.default = classNames;
		module.exports = classNames;
	} else if (true) {
		// register as 'classnames', consistent with npm package name
		!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
			return classNames;
		}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
		__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
	} else {}
}());


/***/ }),

/***/ "./node_modules/sortablejs/modular/sortable.esm.js":
/*!*********************************************************!*\
  !*** ./node_modules/sortablejs/modular/sortable.esm.js ***!
  \*********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   MultiDrag: () => (/* binding */ MultiDragPlugin),
/* harmony export */   Sortable: () => (/* binding */ Sortable),
/* harmony export */   Swap: () => (/* binding */ SwapPlugin),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/**!
 * Sortable 1.15.3
 * @author	RubaXa   <trash@rubaxa.org>
 * @author	owenm    <owen23355@gmail.com>
 * @license MIT
 */
function ownKeys(object, enumerableOnly) {
  var keys = Object.keys(object);
  if (Object.getOwnPropertySymbols) {
    var symbols = Object.getOwnPropertySymbols(object);
    if (enumerableOnly) {
      symbols = symbols.filter(function (sym) {
        return Object.getOwnPropertyDescriptor(object, sym).enumerable;
      });
    }
    keys.push.apply(keys, symbols);
  }
  return keys;
}
function _objectSpread2(target) {
  for (var i = 1; i < arguments.length; i++) {
    var source = arguments[i] != null ? arguments[i] : {};
    if (i % 2) {
      ownKeys(Object(source), true).forEach(function (key) {
        _defineProperty(target, key, source[key]);
      });
    } else if (Object.getOwnPropertyDescriptors) {
      Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
    } else {
      ownKeys(Object(source)).forEach(function (key) {
        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
      });
    }
  }
  return target;
}
function _typeof(obj) {
  "@babel/helpers - typeof";

  if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
    _typeof = function (obj) {
      return typeof obj;
    };
  } else {
    _typeof = function (obj) {
      return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
    };
  }
  return _typeof(obj);
}
function _defineProperty(obj, key, value) {
  if (key in obj) {
    Object.defineProperty(obj, key, {
      value: value,
      enumerable: true,
      configurable: true,
      writable: true
    });
  } else {
    obj[key] = value;
  }
  return obj;
}
function _extends() {
  _extends = Object.assign || function (target) {
    for (var i = 1; i < arguments.length; i++) {
      var source = arguments[i];
      for (var key in source) {
        if (Object.prototype.hasOwnProperty.call(source, key)) {
          target[key] = source[key];
        }
      }
    }
    return target;
  };
  return _extends.apply(this, arguments);
}
function _objectWithoutPropertiesLoose(source, excluded) {
  if (source == null) return {};
  var target = {};
  var sourceKeys = Object.keys(source);
  var key, i;
  for (i = 0; i < sourceKeys.length; i++) {
    key = sourceKeys[i];
    if (excluded.indexOf(key) >= 0) continue;
    target[key] = source[key];
  }
  return target;
}
function _objectWithoutProperties(source, excluded) {
  if (source == null) return {};
  var target = _objectWithoutPropertiesLoose(source, excluded);
  var key, i;
  if (Object.getOwnPropertySymbols) {
    var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
    for (i = 0; i < sourceSymbolKeys.length; i++) {
      key = sourceSymbolKeys[i];
      if (excluded.indexOf(key) >= 0) continue;
      if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
      target[key] = source[key];
    }
  }
  return target;
}
function _toConsumableArray(arr) {
  return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
}
function _arrayWithoutHoles(arr) {
  if (Array.isArray(arr)) return _arrayLikeToArray(arr);
}
function _iterableToArray(iter) {
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
}
function _unsupportedIterableToArray(o, minLen) {
  if (!o) return;
  if (typeof o === "string") return _arrayLikeToArray(o, minLen);
  var n = Object.prototype.toString.call(o).slice(8, -1);
  if (n === "Object" && o.constructor) n = o.constructor.name;
  if (n === "Map" || n === "Set") return Array.from(o);
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
}
function _arrayLikeToArray(arr, len) {
  if (len == null || len > arr.length) len = arr.length;
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
  return arr2;
}
function _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.");
}

var version = "1.15.3";

function userAgent(pattern) {
  if (typeof window !== 'undefined' && window.navigator) {
    return !! /*@__PURE__*/navigator.userAgent.match(pattern);
  }
}
var IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i);
var Edge = userAgent(/Edge/i);
var FireFox = userAgent(/firefox/i);
var Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);
var IOS = userAgent(/iP(ad|od|hone)/i);
var ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);

var captureMode = {
  capture: false,
  passive: false
};
function on(el, event, fn) {
  el.addEventListener(event, fn, !IE11OrLess && captureMode);
}
function off(el, event, fn) {
  el.removeEventListener(event, fn, !IE11OrLess && captureMode);
}
function matches( /**HTMLElement*/el, /**String*/selector) {
  if (!selector) return;
  selector[0] === '>' && (selector = selector.substring(1));
  if (el) {
    try {
      if (el.matches) {
        return el.matches(selector);
      } else if (el.msMatchesSelector) {
        return el.msMatchesSelector(selector);
      } else if (el.webkitMatchesSelector) {
        return el.webkitMatchesSelector(selector);
      }
    } catch (_) {
      return false;
    }
  }
  return false;
}
function getParentOrHost(el) {
  return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;
}
function closest( /**HTMLElement*/el, /**String*/selector, /**HTMLElement*/ctx, includeCTX) {
  if (el) {
    ctx = ctx || document;
    do {
      if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {
        return el;
      }
      if (el === ctx) break;
      /* jshint boss:true */
    } while (el = getParentOrHost(el));
  }
  return null;
}
var R_SPACE = /\s+/g;
function toggleClass(el, name, state) {
  if (el && name) {
    if (el.classList) {
      el.classList[state ? 'add' : 'remove'](name);
    } else {
      var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' ');
      el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' ');
    }
  }
}
function css(el, prop, val) {
  var style = el && el.style;
  if (style) {
    if (val === void 0) {
      if (document.defaultView && document.defaultView.getComputedStyle) {
        val = document.defaultView.getComputedStyle(el, '');
      } else if (el.currentStyle) {
        val = el.currentStyle;
      }
      return prop === void 0 ? val : val[prop];
    } else {
      if (!(prop in style) && prop.indexOf('webkit') === -1) {
        prop = '-webkit-' + prop;
      }
      style[prop] = val + (typeof val === 'string' ? '' : 'px');
    }
  }
}
function matrix(el, selfOnly) {
  var appliedTransforms = '';
  if (typeof el === 'string') {
    appliedTransforms = el;
  } else {
    do {
      var transform = css(el, 'transform');
      if (transform && transform !== 'none') {
        appliedTransforms = transform + ' ' + appliedTransforms;
      }
      /* jshint boss:true */
    } while (!selfOnly && (el = el.parentNode));
  }
  var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
  /*jshint -W056 */
  return matrixFn && new matrixFn(appliedTransforms);
}
function find(ctx, tagName, iterator) {
  if (ctx) {
    var list = ctx.getElementsByTagName(tagName),
      i = 0,
      n = list.length;
    if (iterator) {
      for (; i < n; i++) {
        iterator(list[i], i);
      }
    }
    return list;
  }
  return [];
}
function getWindowScrollingElement() {
  var scrollingElement = document.scrollingElement;
  if (scrollingElement) {
    return scrollingElement;
  } else {
    return document.documentElement;
  }
}

/**
 * Returns the "bounding client rect" of given element
 * @param  {HTMLElement} el                       The element whose boundingClientRect is wanted
 * @param  {[Boolean]} relativeToContainingBlock  Whether the rect should be relative to the containing block of (including) the container
 * @param  {[Boolean]} relativeToNonStaticParent  Whether the rect should be relative to the relative parent of (including) the contaienr
 * @param  {[Boolean]} undoScale                  Whether the container's scale() should be undone
 * @param  {[HTMLElement]} container              The parent the element will be placed in
 * @return {Object}                               The boundingClientRect of el, with specified adjustments
 */
function getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {
  if (!el.getBoundingClientRect && el !== window) return;
  var elRect, top, left, bottom, right, height, width;
  if (el !== window && el.parentNode && el !== getWindowScrollingElement()) {
    elRect = el.getBoundingClientRect();
    top = elRect.top;
    left = elRect.left;
    bottom = elRect.bottom;
    right = elRect.right;
    height = elRect.height;
    width = elRect.width;
  } else {
    top = 0;
    left = 0;
    bottom = window.innerHeight;
    right = window.innerWidth;
    height = window.innerHeight;
    width = window.innerWidth;
  }
  if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {
    // Adjust for translate()
    container = container || el.parentNode;

    // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312)
    // Not needed on <= IE11
    if (!IE11OrLess) {
      do {
        if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) {
          var containerRect = container.getBoundingClientRect();

          // Set relative to edges of padding box of container
          top -= containerRect.top + parseInt(css(container, 'border-top-width'));
          left -= containerRect.left + parseInt(css(container, 'border-left-width'));
          bottom = top + elRect.height;
          right = left + elRect.width;
          break;
        }
        /* jshint boss:true */
      } while (container = container.parentNode);
    }
  }
  if (undoScale && el !== window) {
    // Adjust for scale()
    var elMatrix = matrix(container || el),
      scaleX = elMatrix && elMatrix.a,
      scaleY = elMatrix && elMatrix.d;
    if (elMatrix) {
      top /= scaleY;
      left /= scaleX;
      width /= scaleX;
      height /= scaleY;
      bottom = top + height;
      right = left + width;
    }
  }
  return {
    top: top,
    left: left,
    bottom: bottom,
    right: right,
    width: width,
    height: height
  };
}

/**
 * Checks if a side of an element is scrolled past a side of its parents
 * @param  {HTMLElement}  el           The element who's side being scrolled out of view is in question
 * @param  {String}       elSide       Side of the element in question ('top', 'left', 'right', 'bottom')
 * @param  {String}       parentSide   Side of the parent in question ('top', 'left', 'right', 'bottom')
 * @return {HTMLElement}               The parent scroll element that the el's side is scrolled past, or null if there is no such element
 */
function isScrolledPast(el, elSide, parentSide) {
  var parent = getParentAutoScrollElement(el, true),
    elSideVal = getRect(el)[elSide];

  /* jshint boss:true */
  while (parent) {
    var parentSideVal = getRect(parent)[parentSide],
      visible = void 0;
    if (parentSide === 'top' || parentSide === 'left') {
      visible = elSideVal >= parentSideVal;
    } else {
      visible = elSideVal <= parentSideVal;
    }
    if (!visible) return parent;
    if (parent === getWindowScrollingElement()) break;
    parent = getParentAutoScrollElement(parent, false);
  }
  return false;
}

/**
 * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)
 * and non-draggable elements
 * @param  {HTMLElement} el       The parent element
 * @param  {Number} childNum      The index of the child
 * @param  {Object} options       Parent Sortable's options
 * @return {HTMLElement}          The child at index childNum, or null if not found
 */
function getChild(el, childNum, options, includeDragEl) {
  var currentChild = 0,
    i = 0,
    children = el.children;
  while (i < children.length) {
    if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && (includeDragEl || children[i] !== Sortable.dragged) && closest(children[i], options.draggable, el, false)) {
      if (currentChild === childNum) {
        return children[i];
      }
      currentChild++;
    }
    i++;
  }
  return null;
}

/**
 * Gets the last child in the el, ignoring ghostEl or invisible elements (clones)
 * @param  {HTMLElement} el       Parent element
 * @param  {selector} selector    Any other elements that should be ignored
 * @return {HTMLElement}          The last child, ignoring ghostEl
 */
function lastChild(el, selector) {
  var last = el.lastElementChild;
  while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) {
    last = last.previousElementSibling;
  }
  return last || null;
}

/**
 * Returns the index of an element within its parent for a selected set of
 * elements
 * @param  {HTMLElement} el
 * @param  {selector} selector
 * @return {number}
 */
function index(el, selector) {
  var index = 0;
  if (!el || !el.parentNode) {
    return -1;
  }

  /* jshint boss:true */
  while (el = el.previousElementSibling) {
    if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) {
      index++;
    }
  }
  return index;
}

/**
 * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.
 * The value is returned in real pixels.
 * @param  {HTMLElement} el
 * @return {Array}             Offsets in the format of [left, top]
 */
function getRelativeScrollOffset(el) {
  var offsetLeft = 0,
    offsetTop = 0,
    winScroller = getWindowScrollingElement();
  if (el) {
    do {
      var elMatrix = matrix(el),
        scaleX = elMatrix.a,
        scaleY = elMatrix.d;
      offsetLeft += el.scrollLeft * scaleX;
      offsetTop += el.scrollTop * scaleY;
    } while (el !== winScroller && (el = el.parentNode));
  }
  return [offsetLeft, offsetTop];
}

/**
 * Returns the index of the object within the given array
 * @param  {Array} arr   Array that may or may not hold the object
 * @param  {Object} obj  An object that has a key-value pair unique to and identical to a key-value pair in the object you want to find
 * @return {Number}      The index of the object in the array, or -1
 */
function indexOfObject(arr, obj) {
  for (var i in arr) {
    if (!arr.hasOwnProperty(i)) continue;
    for (var key in obj) {
      if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);
    }
  }
  return -1;
}
function getParentAutoScrollElement(el, includeSelf) {
  // skip to window
  if (!el || !el.getBoundingClientRect) return getWindowScrollingElement();
  var elem = el;
  var gotSelf = false;
  do {
    // we don't need to get elem css if it isn't even overflowing in the first place (performance)
    if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {
      var elemCSS = css(elem);
      if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) {
        if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();
        if (gotSelf || includeSelf) return elem;
        gotSelf = true;
      }
    }
    /* jshint boss:true */
  } while (elem = elem.parentNode);
  return getWindowScrollingElement();
}
function extend(dst, src) {
  if (dst && src) {
    for (var key in src) {
      if (src.hasOwnProperty(key)) {
        dst[key] = src[key];
      }
    }
  }
  return dst;
}
function isRectEqual(rect1, rect2) {
  return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width);
}
var _throttleTimeout;
function throttle(callback, ms) {
  return function () {
    if (!_throttleTimeout) {
      var args = arguments,
        _this = this;
      if (args.length === 1) {
        callback.call(_this, args[0]);
      } else {
        callback.apply(_this, args);
      }
      _throttleTimeout = setTimeout(function () {
        _throttleTimeout = void 0;
      }, ms);
    }
  };
}
function cancelThrottle() {
  clearTimeout(_throttleTimeout);
  _throttleTimeout = void 0;
}
function scrollBy(el, x, y) {
  el.scrollLeft += x;
  el.scrollTop += y;
}
function clone(el) {
  var Polymer = window.Polymer;
  var $ = window.jQuery || window.Zepto;
  if (Polymer && Polymer.dom) {
    return Polymer.dom(el).cloneNode(true);
  } else if ($) {
    return $(el).clone(true)[0];
  } else {
    return el.cloneNode(true);
  }
}
function setRect(el, rect) {
  css(el, 'position', 'absolute');
  css(el, 'top', rect.top);
  css(el, 'left', rect.left);
  css(el, 'width', rect.width);
  css(el, 'height', rect.height);
}
function unsetRect(el) {
  css(el, 'position', '');
  css(el, 'top', '');
  css(el, 'left', '');
  css(el, 'width', '');
  css(el, 'height', '');
}
function getChildContainingRectFromElement(container, options, ghostEl) {
  var rect = {};
  Array.from(container.children).forEach(function (child) {
    var _rect$left, _rect$top, _rect$right, _rect$bottom;
    if (!closest(child, options.draggable, container, false) || child.animated || child === ghostEl) return;
    var childRect = getRect(child);
    rect.left = Math.min((_rect$left = rect.left) !== null && _rect$left !== void 0 ? _rect$left : Infinity, childRect.left);
    rect.top = Math.min((_rect$top = rect.top) !== null && _rect$top !== void 0 ? _rect$top : Infinity, childRect.top);
    rect.right = Math.max((_rect$right = rect.right) !== null && _rect$right !== void 0 ? _rect$right : -Infinity, childRect.right);
    rect.bottom = Math.max((_rect$bottom = rect.bottom) !== null && _rect$bottom !== void 0 ? _rect$bottom : -Infinity, childRect.bottom);
  });
  rect.width = rect.right - rect.left;
  rect.height = rect.bottom - rect.top;
  rect.x = rect.left;
  rect.y = rect.top;
  return rect;
}
var expando = 'Sortable' + new Date().getTime();

function AnimationStateManager() {
  var animationStates = [],
    animationCallbackId;
  return {
    captureAnimationState: function captureAnimationState() {
      animationStates = [];
      if (!this.options.animation) return;
      var children = [].slice.call(this.el.children);
      children.forEach(function (child) {
        if (css(child, 'display') === 'none' || child === Sortable.ghost) return;
        animationStates.push({
          target: child,
          rect: getRect(child)
        });
        var fromRect = _objectSpread2({}, animationStates[animationStates.length - 1].rect);

        // If animating: compensate for current animation
        if (child.thisAnimationDuration) {
          var childMatrix = matrix(child, true);
          if (childMatrix) {
            fromRect.top -= childMatrix.f;
            fromRect.left -= childMatrix.e;
          }
        }
        child.fromRect = fromRect;
      });
    },
    addAnimationState: function addAnimationState(state) {
      animationStates.push(state);
    },
    removeAnimationState: function removeAnimationState(target) {
      animationStates.splice(indexOfObject(animationStates, {
        target: target
      }), 1);
    },
    animateAll: function animateAll(callback) {
      var _this = this;
      if (!this.options.animation) {
        clearTimeout(animationCallbackId);
        if (typeof callback === 'function') callback();
        return;
      }
      var animating = false,
        animationTime = 0;
      animationStates.forEach(function (state) {
        var time = 0,
          target = state.target,
          fromRect = target.fromRect,
          toRect = getRect(target),
          prevFromRect = target.prevFromRect,
          prevToRect = target.prevToRect,
          animatingRect = state.rect,
          targetMatrix = matrix(target, true);
        if (targetMatrix) {
          // Compensate for current animation
          toRect.top -= targetMatrix.f;
          toRect.left -= targetMatrix.e;
        }
        target.toRect = toRect;
        if (target.thisAnimationDuration) {
          // Could also check if animatingRect is between fromRect and toRect
          if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) &&
          // Make sure animatingRect is on line between toRect & fromRect
          (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) {
            // If returning to same place as started from animation and on same axis
            time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);
          }
        }

        // if fromRect != toRect: animate
        if (!isRectEqual(toRect, fromRect)) {
          target.prevFromRect = fromRect;
          target.prevToRect = toRect;
          if (!time) {
            time = _this.options.animation;
          }
          _this.animate(target, animatingRect, toRect, time);
        }
        if (time) {
          animating = true;
          animationTime = Math.max(animationTime, time);
          clearTimeout(target.animationResetTimer);
          target.animationResetTimer = setTimeout(function () {
            target.animationTime = 0;
            target.prevFromRect = null;
            target.fromRect = null;
            target.prevToRect = null;
            target.thisAnimationDuration = null;
          }, time);
          target.thisAnimationDuration = time;
        }
      });
      clearTimeout(animationCallbackId);
      if (!animating) {
        if (typeof callback === 'function') callback();
      } else {
        animationCallbackId = setTimeout(function () {
          if (typeof callback === 'function') callback();
        }, animationTime);
      }
      animationStates = [];
    },
    animate: function animate(target, currentRect, toRect, duration) {
      if (duration) {
        css(target, 'transition', '');
        css(target, 'transform', '');
        var elMatrix = matrix(this.el),
          scaleX = elMatrix && elMatrix.a,
          scaleY = elMatrix && elMatrix.d,
          translateX = (currentRect.left - toRect.left) / (scaleX || 1),
          translateY = (currentRect.top - toRect.top) / (scaleY || 1);
        target.animatingX = !!translateX;
        target.animatingY = !!translateY;
        css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)');
        this.forRepaintDummy = repaint(target); // repaint

        css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));
        css(target, 'transform', 'translate3d(0,0,0)');
        typeof target.animated === 'number' && clearTimeout(target.animated);
        target.animated = setTimeout(function () {
          css(target, 'transition', '');
          css(target, 'transform', '');
          target.animated = false;
          target.animatingX = false;
          target.animatingY = false;
        }, duration);
      }
    }
  };
}
function repaint(target) {
  return target.offsetWidth;
}
function calculateRealTime(animatingRect, fromRect, toRect, options) {
  return Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) / Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2)) * options.animation;
}

var plugins = [];
var defaults = {
  initializeByDefault: true
};
var PluginManager = {
  mount: function mount(plugin) {
    // Set default static properties
    for (var option in defaults) {
      if (defaults.hasOwnProperty(option) && !(option in plugin)) {
        plugin[option] = defaults[option];
      }
    }
    plugins.forEach(function (p) {
      if (p.pluginName === plugin.pluginName) {
        throw "Sortable: Cannot mount plugin ".concat(plugin.pluginName, " more than once");
      }
    });
    plugins.push(plugin);
  },
  pluginEvent: function pluginEvent(eventName, sortable, evt) {
    var _this = this;
    this.eventCanceled = false;
    evt.cancel = function () {
      _this.eventCanceled = true;
    };
    var eventNameGlobal = eventName + 'Global';
    plugins.forEach(function (plugin) {
      if (!sortable[plugin.pluginName]) return;
      // Fire global events if it exists in this sortable
      if (sortable[plugin.pluginName][eventNameGlobal]) {
        sortable[plugin.pluginName][eventNameGlobal](_objectSpread2({
          sortable: sortable
        }, evt));
      }

      // Only fire plugin event if plugin is enabled in this sortable,
      // and plugin has event defined
      if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) {
        sortable[plugin.pluginName][eventName](_objectSpread2({
          sortable: sortable
        }, evt));
      }
    });
  },
  initializePlugins: function initializePlugins(sortable, el, defaults, options) {
    plugins.forEach(function (plugin) {
      var pluginName = plugin.pluginName;
      if (!sortable.options[pluginName] && !plugin.initializeByDefault) return;
      var initialized = new plugin(sortable, el, sortable.options);
      initialized.sortable = sortable;
      initialized.options = sortable.options;
      sortable[pluginName] = initialized;

      // Add default options from plugin
      _extends(defaults, initialized.defaults);
    });
    for (var option in sortable.options) {
      if (!sortable.options.hasOwnProperty(option)) continue;
      var modified = this.modifyOption(sortable, option, sortable.options[option]);
      if (typeof modified !== 'undefined') {
        sortable.options[option] = modified;
      }
    }
  },
  getEventProperties: function getEventProperties(name, sortable) {
    var eventProperties = {};
    plugins.forEach(function (plugin) {
      if (typeof plugin.eventProperties !== 'function') return;
      _extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name));
    });
    return eventProperties;
  },
  modifyOption: function modifyOption(sortable, name, value) {
    var modifiedValue;
    plugins.forEach(function (plugin) {
      // Plugin must exist on the Sortable
      if (!sortable[plugin.pluginName]) return;

      // If static option listener exists for this option, call in the context of the Sortable's instance of this plugin
      if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') {
        modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value);
      }
    });
    return modifiedValue;
  }
};

function dispatchEvent(_ref) {
  var sortable = _ref.sortable,
    rootEl = _ref.rootEl,
    name = _ref.name,
    targetEl = _ref.targetEl,
    cloneEl = _ref.cloneEl,
    toEl = _ref.toEl,
    fromEl = _ref.fromEl,
    oldIndex = _ref.oldIndex,
    newIndex = _ref.newIndex,
    oldDraggableIndex = _ref.oldDraggableIndex,
    newDraggableIndex = _ref.newDraggableIndex,
    originalEvent = _ref.originalEvent,
    putSortable = _ref.putSortable,
    extraEventProperties = _ref.extraEventProperties;
  sortable = sortable || rootEl && rootEl[expando];
  if (!sortable) return;
  var evt,
    options = sortable.options,
    onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1);
  // Support for new CustomEvent feature
  if (window.CustomEvent && !IE11OrLess && !Edge) {
    evt = new CustomEvent(name, {
      bubbles: true,
      cancelable: true
    });
  } else {
    evt = document.createEvent('Event');
    evt.initEvent(name, true, true);
  }
  evt.to = toEl || rootEl;
  evt.from = fromEl || rootEl;
  evt.item = targetEl || rootEl;
  evt.clone = cloneEl;
  evt.oldIndex = oldIndex;
  evt.newIndex = newIndex;
  evt.oldDraggableIndex = oldDraggableIndex;
  evt.newDraggableIndex = newDraggableIndex;
  evt.originalEvent = originalEvent;
  evt.pullMode = putSortable ? putSortable.lastPutMode : undefined;
  var allEventProperties = _objectSpread2(_objectSpread2({}, extraEventProperties), PluginManager.getEventProperties(name, sortable));
  for (var option in allEventProperties) {
    evt[option] = allEventProperties[option];
  }
  if (rootEl) {
    rootEl.dispatchEvent(evt);
  }
  if (options[onName]) {
    options[onName].call(sortable, evt);
  }
}

var _excluded = ["evt"];
var pluginEvent = function pluginEvent(eventName, sortable) {
  var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
    originalEvent = _ref.evt,
    data = _objectWithoutProperties(_ref, _excluded);
  PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread2({
    dragEl: dragEl,
    parentEl: parentEl,
    ghostEl: ghostEl,
    rootEl: rootEl,
    nextEl: nextEl,
    lastDownEl: lastDownEl,
    cloneEl: cloneEl,
    cloneHidden: cloneHidden,
    dragStarted: moved,
    putSortable: putSortable,
    activeSortable: Sortable.active,
    originalEvent: originalEvent,
    oldIndex: oldIndex,
    oldDraggableIndex: oldDraggableIndex,
    newIndex: newIndex,
    newDraggableIndex: newDraggableIndex,
    hideGhostForTarget: _hideGhostForTarget,
    unhideGhostForTarget: _unhideGhostForTarget,
    cloneNowHidden: function cloneNowHidden() {
      cloneHidden = true;
    },
    cloneNowShown: function cloneNowShown() {
      cloneHidden = false;
    },
    dispatchSortableEvent: function dispatchSortableEvent(name) {
      _dispatchEvent({
        sortable: sortable,
        name: name,
        originalEvent: originalEvent
      });
    }
  }, data));
};
function _dispatchEvent(info) {
  dispatchEvent(_objectSpread2({
    putSortable: putSortable,
    cloneEl: cloneEl,
    targetEl: dragEl,
    rootEl: rootEl,
    oldIndex: oldIndex,
    oldDraggableIndex: oldDraggableIndex,
    newIndex: newIndex,
    newDraggableIndex: newDraggableIndex
  }, info));
}
var dragEl,
  parentEl,
  ghostEl,
  rootEl,
  nextEl,
  lastDownEl,
  cloneEl,
  cloneHidden,
  oldIndex,
  newIndex,
  oldDraggableIndex,
  newDraggableIndex,
  activeGroup,
  putSortable,
  awaitingDragStarted = false,
  ignoreNextClick = false,
  sortables = [],
  tapEvt,
  touchEvt,
  lastDx,
  lastDy,
  tapDistanceLeft,
  tapDistanceTop,
  moved,
  lastTarget,
  lastDirection,
  pastFirstInvertThresh = false,
  isCircumstantialInvert = false,
  targetMoveDistance,
  // For positioning ghost absolutely
  ghostRelativeParent,
  ghostRelativeParentInitialScroll = [],
  // (left, top)

  _silent = false,
  savedInputChecked = [];

/** @const */
var documentExists = typeof document !== 'undefined',
  PositionGhostAbsolutely = IOS,
  CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float',
  // This will not pass for IE9, because IE9 DnD only works on anchors
  supportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'),
  supportCssPointerEvents = function () {
    if (!documentExists) return;
    // false when <= IE11
    if (IE11OrLess) {
      return false;
    }
    var el = document.createElement('x');
    el.style.cssText = 'pointer-events:auto';
    return el.style.pointerEvents === 'auto';
  }(),
  _detectDirection = function _detectDirection(el, options) {
    var elCSS = css(el),
      elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth),
      child1 = getChild(el, 0, options),
      child2 = getChild(el, 1, options),
      firstChildCSS = child1 && css(child1),
      secondChildCSS = child2 && css(child2),
      firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width,
      secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;
    if (elCSS.display === 'flex') {
      return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal';
    }
    if (elCSS.display === 'grid') {
      return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal';
    }
    if (child1 && firstChildCSS["float"] && firstChildCSS["float"] !== 'none') {
      var touchingSideChild2 = firstChildCSS["float"] === 'left' ? 'left' : 'right';
      return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal';
    }
    return child1 && (firstChildCSS.display === 'block' || firstChildCSS.display === 'flex' || firstChildCSS.display === 'table' || firstChildCSS.display === 'grid' || firstChildWidth >= elWidth && elCSS[CSSFloatProperty] === 'none' || child2 && elCSS[CSSFloatProperty] === 'none' && firstChildWidth + secondChildWidth > elWidth) ? 'vertical' : 'horizontal';
  },
  _dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) {
    var dragElS1Opp = vertical ? dragRect.left : dragRect.top,
      dragElS2Opp = vertical ? dragRect.right : dragRect.bottom,
      dragElOppLength = vertical ? dragRect.width : dragRect.height,
      targetS1Opp = vertical ? targetRect.left : targetRect.top,
      targetS2Opp = vertical ? targetRect.right : targetRect.bottom,
      targetOppLength = vertical ? targetRect.width : targetRect.height;
    return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;
  },
  /**
   * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.
   * @param  {Number} x      X position
   * @param  {Number} y      Y position
   * @return {HTMLElement}   Element of the first found nearest Sortable
   */
  _detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {
    var ret;
    sortables.some(function (sortable) {
      var threshold = sortable[expando].options.emptyInsertThreshold;
      if (!threshold || lastChild(sortable)) return;
      var rect = getRect(sortable),
        insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold,
        insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;
      if (insideHorizontally && insideVertically) {
        return ret = sortable;
      }
    });
    return ret;
  },
  _prepareGroup = function _prepareGroup(options) {
    function toFn(value, pull) {
      return function (to, from, dragEl, evt) {
        var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;
        if (value == null && (pull || sameGroup)) {
          // Default pull value
          // Default pull and put value if same group
          return true;
        } else if (value == null || value === false) {
          return false;
        } else if (pull && value === 'clone') {
          return value;
        } else if (typeof value === 'function') {
          return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt);
        } else {
          var otherGroup = (pull ? to : from).options.group.name;
          return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;
        }
      };
    }
    var group = {};
    var originalGroup = options.group;
    if (!originalGroup || _typeof(originalGroup) != 'object') {
      originalGroup = {
        name: originalGroup
      };
    }
    group.name = originalGroup.name;
    group.checkPull = toFn(originalGroup.pull, true);
    group.checkPut = toFn(originalGroup.put);
    group.revertClone = originalGroup.revertClone;
    options.group = group;
  },
  _hideGhostForTarget = function _hideGhostForTarget() {
    if (!supportCssPointerEvents && ghostEl) {
      css(ghostEl, 'display', 'none');
    }
  },
  _unhideGhostForTarget = function _unhideGhostForTarget() {
    if (!supportCssPointerEvents && ghostEl) {
      css(ghostEl, 'display', '');
    }
  };

// #1184 fix - Prevent click event on fallback if dragged but item not changed position
if (documentExists && !ChromeForAndroid) {
  document.addEventListener('click', function (evt) {
    if (ignoreNextClick) {
      evt.preventDefault();
      evt.stopPropagation && evt.stopPropagation();
      evt.stopImmediatePropagation && evt.stopImmediatePropagation();
      ignoreNextClick = false;
      return false;
    }
  }, true);
}
var nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) {
  if (dragEl) {
    evt = evt.touches ? evt.touches[0] : evt;
    var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);
    if (nearest) {
      // Create imitation event
      var event = {};
      for (var i in evt) {
        if (evt.hasOwnProperty(i)) {
          event[i] = evt[i];
        }
      }
      event.target = event.rootEl = nearest;
      event.preventDefault = void 0;
      event.stopPropagation = void 0;
      nearest[expando]._onDragOver(event);
    }
  }
};
var _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {
  if (dragEl) {
    dragEl.parentNode[expando]._isOutsideThisEl(evt.target);
  }
};

/**
 * @class  Sortable
 * @param  {HTMLElement}  el
 * @param  {Object}       [options]
 */
function Sortable(el, options) {
  if (!(el && el.nodeType && el.nodeType === 1)) {
    throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(el));
  }
  this.el = el; // root element
  this.options = options = _extends({}, options);

  // Export instance
  el[expando] = this;
  var defaults = {
    group: null,
    sort: true,
    disabled: false,
    store: null,
    handle: null,
    draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*',
    swapThreshold: 1,
    // percentage; 0 <= x <= 1
    invertSwap: false,
    // invert always
    invertedSwapThreshold: null,
    // will be set to same as swapThreshold if default
    removeCloneOnHide: true,
    direction: function direction() {
      return _detectDirection(el, this.options);
    },
    ghostClass: 'sortable-ghost',
    chosenClass: 'sortable-chosen',
    dragClass: 'sortable-drag',
    ignore: 'a, img',
    filter: null,
    preventOnFilter: true,
    animation: 0,
    easing: null,
    setData: function setData(dataTransfer, dragEl) {
      dataTransfer.setData('Text', dragEl.textContent);
    },
    dropBubble: false,
    dragoverBubble: false,
    dataIdAttr: 'data-id',
    delay: 0,
    delayOnTouchOnly: false,
    touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
    forceFallback: false,
    fallbackClass: 'sortable-fallback',
    fallbackOnBody: false,
    fallbackTolerance: 0,
    fallbackOffset: {
      x: 0,
      y: 0
    },
    supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && !Safari,
    emptyInsertThreshold: 5
  };
  PluginManager.initializePlugins(this, el, defaults);

  // Set default options
  for (var name in defaults) {
    !(name in options) && (options[name] = defaults[name]);
  }
  _prepareGroup(options);

  // Bind all private methods
  for (var fn in this) {
    if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
      this[fn] = this[fn].bind(this);
    }
  }

  // Setup drag mode
  this.nativeDraggable = options.forceFallback ? false : supportDraggable;
  if (this.nativeDraggable) {
    // Touch start threshold cannot be greater than the native dragstart threshold
    this.options.touchStartThreshold = 1;
  }

  // Bind events
  if (options.supportPointer) {
    on(el, 'pointerdown', this._onTapStart);
  } else {
    on(el, 'mousedown', this._onTapStart);
    on(el, 'touchstart', this._onTapStart);
  }
  if (this.nativeDraggable) {
    on(el, 'dragover', this);
    on(el, 'dragenter', this);
  }
  sortables.push(this.el);

  // Restore sorting
  options.store && options.store.get && this.sort(options.store.get(this) || []);

  // Add animation state manager
  _extends(this, AnimationStateManager());
}
Sortable.prototype = /** @lends Sortable.prototype */{
  constructor: Sortable,
  _isOutsideThisEl: function _isOutsideThisEl(target) {
    if (!this.el.contains(target) && target !== this.el) {
      lastTarget = null;
    }
  },
  _getDirection: function _getDirection(evt, target) {
    return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;
  },
  _onTapStart: function _onTapStart( /** Event|TouchEvent */evt) {
    if (!evt.cancelable) return;
    var _this = this,
      el = this.el,
      options = this.options,
      preventOnFilter = options.preventOnFilter,
      type = evt.type,
      touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === 'touch' && evt,
      target = (touch || evt).target,
      originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target,
      filter = options.filter;
    _saveInputCheckedState(el);

    // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.
    if (dragEl) {
      return;
    }
    if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {
      return; // only left button and enabled
    }

    // cancel dnd if original target is content editable
    if (originalTarget.isContentEditable) {
      return;
    }

    // Safari ignores further event handling after mousedown
    if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === 'SELECT') {
      return;
    }
    target = closest(target, options.draggable, el, false);
    if (target && target.animated) {
      return;
    }
    if (lastDownEl === target) {
      // Ignoring duplicate `down`
      return;
    }

    // Get the index of the dragged element within its parent
    oldIndex = index(target);
    oldDraggableIndex = index(target, options.draggable);

    // Check filter
    if (typeof filter === 'function') {
      if (filter.call(this, evt, target, this)) {
        _dispatchEvent({
          sortable: _this,
          rootEl: originalTarget,
          name: 'filter',
          targetEl: target,
          toEl: el,
          fromEl: el
        });
        pluginEvent('filter', _this, {
          evt: evt
        });
        preventOnFilter && evt.cancelable && evt.preventDefault();
        return; // cancel dnd
      }
    } else if (filter) {
      filter = filter.split(',').some(function (criteria) {
        criteria = closest(originalTarget, criteria.trim(), el, false);
        if (criteria) {
          _dispatchEvent({
            sortable: _this,
            rootEl: criteria,
            name: 'filter',
            targetEl: target,
            fromEl: el,
            toEl: el
          });
          pluginEvent('filter', _this, {
            evt: evt
          });
          return true;
        }
      });
      if (filter) {
        preventOnFilter && evt.cancelable && evt.preventDefault();
        return; // cancel dnd
      }
    }
    if (options.handle && !closest(originalTarget, options.handle, el, false)) {
      return;
    }

    // Prepare `dragstart`
    this._prepareDragStart(evt, touch, target);
  },
  _prepareDragStart: function _prepareDragStart( /** Event */evt, /** Touch */touch, /** HTMLElement */target) {
    var _this = this,
      el = _this.el,
      options = _this.options,
      ownerDocument = el.ownerDocument,
      dragStartFn;
    if (target && !dragEl && target.parentNode === el) {
      var dragRect = getRect(target);
      rootEl = el;
      dragEl = target;
      parentEl = dragEl.parentNode;
      nextEl = dragEl.nextSibling;
      lastDownEl = target;
      activeGroup = options.group;
      Sortable.dragged = dragEl;
      tapEvt = {
        target: dragEl,
        clientX: (touch || evt).clientX,
        clientY: (touch || evt).clientY
      };
      tapDistanceLeft = tapEvt.clientX - dragRect.left;
      tapDistanceTop = tapEvt.clientY - dragRect.top;
      this._lastX = (touch || evt).clientX;
      this._lastY = (touch || evt).clientY;
      dragEl.style['will-change'] = 'all';
      dragStartFn = function dragStartFn() {
        pluginEvent('delayEnded', _this, {
          evt: evt
        });
        if (Sortable.eventCanceled) {
          _this._onDrop();
          return;
        }
        // Delayed drag has been triggered
        // we can re-enable the events: touchmove/mousemove
        _this._disableDelayedDragEvents();
        if (!FireFox && _this.nativeDraggable) {
          dragEl.draggable = true;
        }

        // Bind the events: dragstart/dragend
        _this._triggerDragStart(evt, touch);

        // Drag start event
        _dispatchEvent({
          sortable: _this,
          name: 'choose',
          originalEvent: evt
        });

        // Chosen item
        toggleClass(dragEl, options.chosenClass, true);
      };

      // Disable "draggable"
      options.ignore.split(',').forEach(function (criteria) {
        find(dragEl, criteria.trim(), _disableDraggable);
      });
      on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent);
      on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);
      on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);
      on(ownerDocument, 'mouseup', _this._onDrop);
      on(ownerDocument, 'touchend', _this._onDrop);
      on(ownerDocument, 'touchcancel', _this._onDrop);

      // Make dragEl draggable (must be before delay for FireFox)
      if (FireFox && this.nativeDraggable) {
        this.options.touchStartThreshold = 4;
        dragEl.draggable = true;
      }
      pluginEvent('delayStart', this, {
        evt: evt
      });

      // Delay is impossible for native DnD in Edge or IE
      if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {
        if (Sortable.eventCanceled) {
          this._onDrop();
          return;
        }
        // If the user moves the pointer or let go the click or touch
        // before the delay has been reached:
        // disable the delayed drag
        on(ownerDocument, 'mouseup', _this._disableDelayedDrag);
        on(ownerDocument, 'touchend', _this._disableDelayedDrag);
        on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);
        on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);
        on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);
        options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);
        _this._dragStartTimer = setTimeout(dragStartFn, options.delay);
      } else {
        dragStartFn();
      }
    }
  },
  _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler( /** TouchEvent|PointerEvent **/e) {
    var touch = e.touches ? e.touches[0] : e;
    if (Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1))) {
      this._disableDelayedDrag();
    }
  },
  _disableDelayedDrag: function _disableDelayedDrag() {
    dragEl && _disableDraggable(dragEl);
    clearTimeout(this._dragStartTimer);
    this._disableDelayedDragEvents();
  },
  _disableDelayedDragEvents: function _disableDelayedDragEvents() {
    var ownerDocument = this.el.ownerDocument;
    off(ownerDocument, 'mouseup', this._disableDelayedDrag);
    off(ownerDocument, 'touchend', this._disableDelayedDrag);
    off(ownerDocument, 'touchcancel', this._disableDelayedDrag);
    off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);
    off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);
    off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);
  },
  _triggerDragStart: function _triggerDragStart( /** Event */evt, /** Touch */touch) {
    touch = touch || evt.pointerType == 'touch' && evt;
    if (!this.nativeDraggable || touch) {
      if (this.options.supportPointer) {
        on(document, 'pointermove', this._onTouchMove);
      } else if (touch) {
        on(document, 'touchmove', this._onTouchMove);
      } else {
        on(document, 'mousemove', this._onTouchMove);
      }
    } else {
      on(dragEl, 'dragend', this);
      on(rootEl, 'dragstart', this._onDragStart);
    }
    try {
      if (document.selection) {
        // Timeout neccessary for IE9
        _nextTick(function () {
          document.selection.empty();
        });
      } else {
        window.getSelection().removeAllRanges();
      }
    } catch (err) {}
  },
  _dragStarted: function _dragStarted(fallback, evt) {
    awaitingDragStarted = false;
    if (rootEl && dragEl) {
      pluginEvent('dragStarted', this, {
        evt: evt
      });
      if (this.nativeDraggable) {
        on(document, 'dragover', _checkOutsideTargetEl);
      }
      var options = this.options;

      // Apply effect
      !fallback && toggleClass(dragEl, options.dragClass, false);
      toggleClass(dragEl, options.ghostClass, true);
      Sortable.active = this;
      fallback && this._appendGhost();

      // Drag start event
      _dispatchEvent({
        sortable: this,
        name: 'start',
        originalEvent: evt
      });
    } else {
      this._nulling();
    }
  },
  _emulateDragOver: function _emulateDragOver() {
    if (touchEvt) {
      this._lastX = touchEvt.clientX;
      this._lastY = touchEvt.clientY;
      _hideGhostForTarget();
      var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
      var parent = target;
      while (target && target.shadowRoot) {
        target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
        if (target === parent) break;
        parent = target;
      }
      dragEl.parentNode[expando]._isOutsideThisEl(target);
      if (parent) {
        do {
          if (parent[expando]) {
            var inserted = void 0;
            inserted = parent[expando]._onDragOver({
              clientX: touchEvt.clientX,
              clientY: touchEvt.clientY,
              target: target,
              rootEl: parent
            });
            if (inserted && !this.options.dragoverBubble) {
              break;
            }
          }
          target = parent; // store last element
        }
        /* jshint boss:true */ while (parent = getParentOrHost(parent));
      }
      _unhideGhostForTarget();
    }
  },
  _onTouchMove: function _onTouchMove( /**TouchEvent*/evt) {
    if (tapEvt) {
      var options = this.options,
        fallbackTolerance = options.fallbackTolerance,
        fallbackOffset = options.fallbackOffset,
        touch = evt.touches ? evt.touches[0] : evt,
        ghostMatrix = ghostEl && matrix(ghostEl, true),
        scaleX = ghostEl && ghostMatrix && ghostMatrix.a,
        scaleY = ghostEl && ghostMatrix && ghostMatrix.d,
        relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),
        dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1),
        dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1);

      // only set the status to dragging, when we are actually dragging
      if (!Sortable.active && !awaitingDragStarted) {
        if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) {
          return;
        }
        this._onDragStart(evt, true);
      }
      if (ghostEl) {
        if (ghostMatrix) {
          ghostMatrix.e += dx - (lastDx || 0);
          ghostMatrix.f += dy - (lastDy || 0);
        } else {
          ghostMatrix = {
            a: 1,
            b: 0,
            c: 0,
            d: 1,
            e: dx,
            f: dy
          };
        }
        var cssMatrix = "matrix(".concat(ghostMatrix.a, ",").concat(ghostMatrix.b, ",").concat(ghostMatrix.c, ",").concat(ghostMatrix.d, ",").concat(ghostMatrix.e, ",").concat(ghostMatrix.f, ")");
        css(ghostEl, 'webkitTransform', cssMatrix);
        css(ghostEl, 'mozTransform', cssMatrix);
        css(ghostEl, 'msTransform', cssMatrix);
        css(ghostEl, 'transform', cssMatrix);
        lastDx = dx;
        lastDy = dy;
        touchEvt = touch;
      }
      evt.cancelable && evt.preventDefault();
    }
  },
  _appendGhost: function _appendGhost() {
    // Bug if using scale(): https://stackoverflow.com/questions/2637058
    // Not being adjusted for
    if (!ghostEl) {
      var container = this.options.fallbackOnBody ? document.body : rootEl,
        rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container),
        options = this.options;

      // Position absolutely
      if (PositionGhostAbsolutely) {
        // Get relatively positioned parent
        ghostRelativeParent = container;
        while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) {
          ghostRelativeParent = ghostRelativeParent.parentNode;
        }
        if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {
          if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement();
          rect.top += ghostRelativeParent.scrollTop;
          rect.left += ghostRelativeParent.scrollLeft;
        } else {
          ghostRelativeParent = getWindowScrollingElement();
        }
        ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);
      }
      ghostEl = dragEl.cloneNode(true);
      toggleClass(ghostEl, options.ghostClass, false);
      toggleClass(ghostEl, options.fallbackClass, true);
      toggleClass(ghostEl, options.dragClass, true);
      css(ghostEl, 'transition', '');
      css(ghostEl, 'transform', '');
      css(ghostEl, 'box-sizing', 'border-box');
      css(ghostEl, 'margin', 0);
      css(ghostEl, 'top', rect.top);
      css(ghostEl, 'left', rect.left);
      css(ghostEl, 'width', rect.width);
      css(ghostEl, 'height', rect.height);
      css(ghostEl, 'opacity', '0.8');
      css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed');
      css(ghostEl, 'zIndex', '100000');
      css(ghostEl, 'pointerEvents', 'none');
      Sortable.ghost = ghostEl;
      container.appendChild(ghostEl);

      // Set transform-origin
      css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%');
    }
  },
  _onDragStart: function _onDragStart( /**Event*/evt, /**boolean*/fallback) {
    var _this = this;
    var dataTransfer = evt.dataTransfer;
    var options = _this.options;
    pluginEvent('dragStart', this, {
      evt: evt
    });
    if (Sortable.eventCanceled) {
      this._onDrop();
      return;
    }
    pluginEvent('setupClone', this);
    if (!Sortable.eventCanceled) {
      cloneEl = clone(dragEl);
      cloneEl.removeAttribute("id");
      cloneEl.draggable = false;
      cloneEl.style['will-change'] = '';
      this._hideClone();
      toggleClass(cloneEl, this.options.chosenClass, false);
      Sortable.clone = cloneEl;
    }

    // #1143: IFrame support workaround
    _this.cloneId = _nextTick(function () {
      pluginEvent('clone', _this);
      if (Sortable.eventCanceled) return;
      if (!_this.options.removeCloneOnHide) {
        rootEl.insertBefore(cloneEl, dragEl);
      }
      _this._hideClone();
      _dispatchEvent({
        sortable: _this,
        name: 'clone'
      });
    });
    !fallback && toggleClass(dragEl, options.dragClass, true);

    // Set proper drop events
    if (fallback) {
      ignoreNextClick = true;
      _this._loopId = setInterval(_this._emulateDragOver, 50);
    } else {
      // Undo what was set in _prepareDragStart before drag started
      off(document, 'mouseup', _this._onDrop);
      off(document, 'touchend', _this._onDrop);
      off(document, 'touchcancel', _this._onDrop);
      if (dataTransfer) {
        dataTransfer.effectAllowed = 'move';
        options.setData && options.setData.call(_this, dataTransfer, dragEl);
      }
      on(document, 'drop', _this);

      // #1276 fix:
      css(dragEl, 'transform', 'translateZ(0)');
    }
    awaitingDragStarted = true;
    _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));
    on(document, 'selectstart', _this);
    moved = true;
    if (Safari) {
      css(document.body, 'user-select', 'none');
    }
  },
  // Returns true - if no further action is needed (either inserted or another condition)
  _onDragOver: function _onDragOver( /**Event*/evt) {
    var el = this.el,
      target = evt.target,
      dragRect,
      targetRect,
      revert,
      options = this.options,
      group = options.group,
      activeSortable = Sortable.active,
      isOwner = activeGroup === group,
      canSort = options.sort,
      fromSortable = putSortable || activeSortable,
      vertical,
      _this = this,
      completedFired = false;
    if (_silent) return;
    function dragOverEvent(name, extra) {
      pluginEvent(name, _this, _objectSpread2({
        evt: evt,
        isOwner: isOwner,
        axis: vertical ? 'vertical' : 'horizontal',
        revert: revert,
        dragRect: dragRect,
        targetRect: targetRect,
        canSort: canSort,
        fromSortable: fromSortable,
        target: target,
        completed: completed,
        onMove: function onMove(target, after) {
          return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after);
        },
        changed: changed
      }, extra));
    }

    // Capture animation state
    function capture() {
      dragOverEvent('dragOverAnimationCapture');
      _this.captureAnimationState();
      if (_this !== fromSortable) {
        fromSortable.captureAnimationState();
      }
    }

    // Return invocation when dragEl is inserted (or completed)
    function completed(insertion) {
      dragOverEvent('dragOverCompleted', {
        insertion: insertion
      });
      if (insertion) {
        // Clones must be hidden before folding animation to capture dragRectAbsolute properly
        if (isOwner) {
          activeSortable._hideClone();
        } else {
          activeSortable._showClone(_this);
        }
        if (_this !== fromSortable) {
          // Set ghost class to new sortable's ghost class
          toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);
          toggleClass(dragEl, options.ghostClass, true);
        }
        if (putSortable !== _this && _this !== Sortable.active) {
          putSortable = _this;
        } else if (_this === Sortable.active && putSortable) {
          putSortable = null;
        }

        // Animation
        if (fromSortable === _this) {
          _this._ignoreWhileAnimating = target;
        }
        _this.animateAll(function () {
          dragOverEvent('dragOverAnimationComplete');
          _this._ignoreWhileAnimating = null;
        });
        if (_this !== fromSortable) {
          fromSortable.animateAll();
          fromSortable._ignoreWhileAnimating = null;
        }
      }

      // Null lastTarget if it is not inside a previously swapped element
      if (target === dragEl && !dragEl.animated || target === el && !target.animated) {
        lastTarget = null;
      }

      // no bubbling and not fallback
      if (!options.dragoverBubble && !evt.rootEl && target !== document) {
        dragEl.parentNode[expando]._isOutsideThisEl(evt.target);

        // Do not detect for empty insert if already inserted
        !insertion && nearestEmptyInsertDetectEvent(evt);
      }
      !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();
      return completedFired = true;
    }

    // Call when dragEl has been inserted
    function changed() {
      newIndex = index(dragEl);
      newDraggableIndex = index(dragEl, options.draggable);
      _dispatchEvent({
        sortable: _this,
        name: 'change',
        toEl: el,
        newIndex: newIndex,
        newDraggableIndex: newDraggableIndex,
        originalEvent: evt
      });
    }
    if (evt.preventDefault !== void 0) {
      evt.cancelable && evt.preventDefault();
    }
    target = closest(target, options.draggable, el, true);
    dragOverEvent('dragOver');
    if (Sortable.eventCanceled) return completedFired;
    if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {
      return completed(false);
    }
    ignoreNextClick = false;
    if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = parentEl !== rootEl) // Reverting item into the original list
    : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {
      vertical = this._getDirection(evt, target) === 'vertical';
      dragRect = getRect(dragEl);
      dragOverEvent('dragOverValid');
      if (Sortable.eventCanceled) return completedFired;
      if (revert) {
        parentEl = rootEl; // actualization
        capture();
        this._hideClone();
        dragOverEvent('revert');
        if (!Sortable.eventCanceled) {
          if (nextEl) {
            rootEl.insertBefore(dragEl, nextEl);
          } else {
            rootEl.appendChild(dragEl);
          }
        }
        return completed(true);
      }
      var elLastChild = lastChild(el, options.draggable);
      if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {
        // Insert to end of list

        // If already at end of list: Do not insert
        if (elLastChild === dragEl) {
          return completed(false);
        }

        // if there is a last element, it is the target
        if (elLastChild && el === evt.target) {
          target = elLastChild;
        }
        if (target) {
          targetRect = getRect(target);
        }
        if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {
          capture();
          if (elLastChild && elLastChild.nextSibling) {
            // the last draggable element is not the last node
            el.insertBefore(dragEl, elLastChild.nextSibling);
          } else {
            el.appendChild(dragEl);
          }
          parentEl = el; // actualization

          changed();
          return completed(true);
        }
      } else if (elLastChild && _ghostIsFirst(evt, vertical, this)) {
        // Insert to start of list
        var firstChild = getChild(el, 0, options, true);
        if (firstChild === dragEl) {
          return completed(false);
        }
        target = firstChild;
        targetRect = getRect(target);
        if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) {
          capture();
          el.insertBefore(dragEl, firstChild);
          parentEl = el; // actualization

          changed();
          return completed(true);
        }
      } else if (target.parentNode === el) {
        targetRect = getRect(target);
        var direction = 0,
          targetBeforeFirstSwap,
          differentLevel = dragEl.parentNode !== el,
          differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical),
          side1 = vertical ? 'top' : 'left',
          scrolledPastTop = isScrolledPast(target, 'top', 'top') || isScrolledPast(dragEl, 'top', 'top'),
          scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;
        if (lastTarget !== target) {
          targetBeforeFirstSwap = targetRect[side1];
          pastFirstInvertThresh = false;
          isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;
        }
        direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);
        var sibling;
        if (direction !== 0) {
          // Check if target is beside dragEl in respective direction (ignoring hidden elements)
          var dragIndex = index(dragEl);
          do {
            dragIndex -= direction;
            sibling = parentEl.children[dragIndex];
          } while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl));
        }
        // If dragEl is already beside target: Do not insert
        if (direction === 0 || sibling === target) {
          return completed(false);
        }
        lastTarget = target;
        lastDirection = direction;
        var nextSibling = target.nextElementSibling,
          after = false;
        after = direction === 1;
        var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);
        if (moveVector !== false) {
          if (moveVector === 1 || moveVector === -1) {
            after = moveVector === 1;
          }
          _silent = true;
          setTimeout(_unsilent, 30);
          capture();
          if (after && !nextSibling) {
            el.appendChild(dragEl);
          } else {
            target.parentNode.insertBefore(dragEl, after ? nextSibling : target);
          }

          // Undo chrome's scroll adjustment (has no effect on other browsers)
          if (scrolledPastTop) {
            scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);
          }
          parentEl = dragEl.parentNode; // actualization

          // must be done before animation
          if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) {
            targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);
          }
          changed();
          return completed(true);
        }
      }
      if (el.contains(dragEl)) {
        return completed(false);
      }
    }
    return false;
  },
  _ignoreWhileAnimating: null,
  _offMoveEvents: function _offMoveEvents() {
    off(document, 'mousemove', this._onTouchMove);
    off(document, 'touchmove', this._onTouchMove);
    off(document, 'pointermove', this._onTouchMove);
    off(document, 'dragover', nearestEmptyInsertDetectEvent);
    off(document, 'mousemove', nearestEmptyInsertDetectEvent);
    off(document, 'touchmove', nearestEmptyInsertDetectEvent);
  },
  _offUpEvents: function _offUpEvents() {
    var ownerDocument = this.el.ownerDocument;
    off(ownerDocument, 'mouseup', this._onDrop);
    off(ownerDocument, 'touchend', this._onDrop);
    off(ownerDocument, 'pointerup', this._onDrop);
    off(ownerDocument, 'touchcancel', this._onDrop);
    off(document, 'selectstart', this);
  },
  _onDrop: function _onDrop( /**Event*/evt) {
    var el = this.el,
      options = this.options;

    // Get the index of the dragged element within its parent
    newIndex = index(dragEl);
    newDraggableIndex = index(dragEl, options.draggable);
    pluginEvent('drop', this, {
      evt: evt
    });
    parentEl = dragEl && dragEl.parentNode;

    // Get again after plugin event
    newIndex = index(dragEl);
    newDraggableIndex = index(dragEl, options.draggable);
    if (Sortable.eventCanceled) {
      this._nulling();
      return;
    }
    awaitingDragStarted = false;
    isCircumstantialInvert = false;
    pastFirstInvertThresh = false;
    clearInterval(this._loopId);
    clearTimeout(this._dragStartTimer);
    _cancelNextTick(this.cloneId);
    _cancelNextTick(this._dragStartId);

    // Unbind events
    if (this.nativeDraggable) {
      off(document, 'drop', this);
      off(el, 'dragstart', this._onDragStart);
    }
    this._offMoveEvents();
    this._offUpEvents();
    if (Safari) {
      css(document.body, 'user-select', '');
    }
    css(dragEl, 'transform', '');
    if (evt) {
      if (moved) {
        evt.cancelable && evt.preventDefault();
        !options.dropBubble && evt.stopPropagation();
      }
      ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);
      if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {
        // Remove clone(s)
        cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);
      }
      if (dragEl) {
        if (this.nativeDraggable) {
          off(dragEl, 'dragend', this);
        }
        _disableDraggable(dragEl);
        dragEl.style['will-change'] = '';

        // Remove classes
        // ghostClass is added in dragStarted
        if (moved && !awaitingDragStarted) {
          toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);
        }
        toggleClass(dragEl, this.options.chosenClass, false);

        // Drag stop event
        _dispatchEvent({
          sortable: this,
          name: 'unchoose',
          toEl: parentEl,
          newIndex: null,
          newDraggableIndex: null,
          originalEvent: evt
        });
        if (rootEl !== parentEl) {
          if (newIndex >= 0) {
            // Add event
            _dispatchEvent({
              rootEl: parentEl,
              name: 'add',
              toEl: parentEl,
              fromEl: rootEl,
              originalEvent: evt
            });

            // Remove event
            _dispatchEvent({
              sortable: this,
              name: 'remove',
              toEl: parentEl,
              originalEvent: evt
            });

            // drag from one list and drop into another
            _dispatchEvent({
              rootEl: parentEl,
              name: 'sort',
              toEl: parentEl,
              fromEl: rootEl,
              originalEvent: evt
            });
            _dispatchEvent({
              sortable: this,
              name: 'sort',
              toEl: parentEl,
              originalEvent: evt
            });
          }
          putSortable && putSortable.save();
        } else {
          if (newIndex !== oldIndex) {
            if (newIndex >= 0) {
              // drag & drop within the same list
              _dispatchEvent({
                sortable: this,
                name: 'update',
                toEl: parentEl,
                originalEvent: evt
              });
              _dispatchEvent({
                sortable: this,
                name: 'sort',
                toEl: parentEl,
                originalEvent: evt
              });
            }
          }
        }
        if (Sortable.active) {
          /* jshint eqnull:true */
          if (newIndex == null || newIndex === -1) {
            newIndex = oldIndex;
            newDraggableIndex = oldDraggableIndex;
          }
          _dispatchEvent({
            sortable: this,
            name: 'end',
            toEl: parentEl,
            originalEvent: evt
          });

          // Save sorting
          this.save();
        }
      }
    }
    this._nulling();
  },
  _nulling: function _nulling() {
    pluginEvent('nulling', this);
    rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable.dragged = Sortable.ghost = Sortable.clone = Sortable.active = null;
    savedInputChecked.forEach(function (el) {
      el.checked = true;
    });
    savedInputChecked.length = lastDx = lastDy = 0;
  },
  handleEvent: function handleEvent( /**Event*/evt) {
    switch (evt.type) {
      case 'drop':
      case 'dragend':
        this._onDrop(evt);
        break;
      case 'dragenter':
      case 'dragover':
        if (dragEl) {
          this._onDragOver(evt);
          _globalDragOver(evt);
        }
        break;
      case 'selectstart':
        evt.preventDefault();
        break;
    }
  },
  /**
   * Serializes the item into an array of string.
   * @returns {String[]}
   */
  toArray: function toArray() {
    var order = [],
      el,
      children = this.el.children,
      i = 0,
      n = children.length,
      options = this.options;
    for (; i < n; i++) {
      el = children[i];
      if (closest(el, options.draggable, this.el, false)) {
        order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));
      }
    }
    return order;
  },
  /**
   * Sorts the elements according to the array.
   * @param  {String[]}  order  order of the items
   */
  sort: function sort(order, useAnimation) {
    var items = {},
      rootEl = this.el;
    this.toArray().forEach(function (id, i) {
      var el = rootEl.children[i];
      if (closest(el, this.options.draggable, rootEl, false)) {
        items[id] = el;
      }
    }, this);
    useAnimation && this.captureAnimationState();
    order.forEach(function (id) {
      if (items[id]) {
        rootEl.removeChild(items[id]);
        rootEl.appendChild(items[id]);
      }
    });
    useAnimation && this.animateAll();
  },
  /**
   * Save the current sorting
   */
  save: function save() {
    var store = this.options.store;
    store && store.set && store.set(this);
  },
  /**
   * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
   * @param   {HTMLElement}  el
   * @param   {String}       [selector]  default: `options.draggable`
   * @returns {HTMLElement|null}
   */
  closest: function closest$1(el, selector) {
    return closest(el, selector || this.options.draggable, this.el, false);
  },
  /**
   * Set/get option
   * @param   {string} name
   * @param   {*}      [value]
   * @returns {*}
   */
  option: function option(name, value) {
    var options = this.options;
    if (value === void 0) {
      return options[name];
    } else {
      var modifiedValue = PluginManager.modifyOption(this, name, value);
      if (typeof modifiedValue !== 'undefined') {
        options[name] = modifiedValue;
      } else {
        options[name] = value;
      }
      if (name === 'group') {
        _prepareGroup(options);
      }
    }
  },
  /**
   * Destroy
   */
  destroy: function destroy() {
    pluginEvent('destroy', this);
    var el = this.el;
    el[expando] = null;
    off(el, 'mousedown', this._onTapStart);
    off(el, 'touchstart', this._onTapStart);
    off(el, 'pointerdown', this._onTapStart);
    if (this.nativeDraggable) {
      off(el, 'dragover', this);
      off(el, 'dragenter', this);
    }
    // Remove draggable attributes
    Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {
      el.removeAttribute('draggable');
    });
    this._onDrop();
    this._disableDelayedDragEvents();
    sortables.splice(sortables.indexOf(this.el), 1);
    this.el = el = null;
  },
  _hideClone: function _hideClone() {
    if (!cloneHidden) {
      pluginEvent('hideClone', this);
      if (Sortable.eventCanceled) return;
      css(cloneEl, 'display', 'none');
      if (this.options.removeCloneOnHide && cloneEl.parentNode) {
        cloneEl.parentNode.removeChild(cloneEl);
      }
      cloneHidden = true;
    }
  },
  _showClone: function _showClone(putSortable) {
    if (putSortable.lastPutMode !== 'clone') {
      this._hideClone();
      return;
    }
    if (cloneHidden) {
      pluginEvent('showClone', this);
      if (Sortable.eventCanceled) return;

      // show clone at dragEl or original position
      if (dragEl.parentNode == rootEl && !this.options.group.revertClone) {
        rootEl.insertBefore(cloneEl, dragEl);
      } else if (nextEl) {
        rootEl.insertBefore(cloneEl, nextEl);
      } else {
        rootEl.appendChild(cloneEl);
      }
      if (this.options.group.revertClone) {
        this.animate(dragEl, cloneEl);
      }
      css(cloneEl, 'display', '');
      cloneHidden = false;
    }
  }
};
function _globalDragOver( /**Event*/evt) {
  if (evt.dataTransfer) {
    evt.dataTransfer.dropEffect = 'move';
  }
  evt.cancelable && evt.preventDefault();
}
function _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {
  var evt,
    sortable = fromEl[expando],
    onMoveFn = sortable.options.onMove,
    retVal;
  // Support for new CustomEvent feature
  if (window.CustomEvent && !IE11OrLess && !Edge) {
    evt = new CustomEvent('move', {
      bubbles: true,
      cancelable: true
    });
  } else {
    evt = document.createEvent('Event');
    evt.initEvent('move', true, true);
  }
  evt.to = toEl;
  evt.from = fromEl;
  evt.dragged = dragEl;
  evt.draggedRect = dragRect;
  evt.related = targetEl || toEl;
  evt.relatedRect = targetRect || getRect(toEl);
  evt.willInsertAfter = willInsertAfter;
  evt.originalEvent = originalEvent;
  fromEl.dispatchEvent(evt);
  if (onMoveFn) {
    retVal = onMoveFn.call(sortable, evt, originalEvent);
  }
  return retVal;
}
function _disableDraggable(el) {
  el.draggable = false;
}
function _unsilent() {
  _silent = false;
}
function _ghostIsFirst(evt, vertical, sortable) {
  var firstElRect = getRect(getChild(sortable.el, 0, sortable.options, true));
  var childContainingRect = getChildContainingRectFromElement(sortable.el, sortable.options, ghostEl);
  var spacer = 10;
  return vertical ? evt.clientX < childContainingRect.left - spacer || evt.clientY < firstElRect.top && evt.clientX < firstElRect.right : evt.clientY < childContainingRect.top - spacer || evt.clientY < firstElRect.bottom && evt.clientX < firstElRect.left;
}
function _ghostIsLast(evt, vertical, sortable) {
  var lastElRect = getRect(lastChild(sortable.el, sortable.options.draggable));
  var childContainingRect = getChildContainingRectFromElement(sortable.el, sortable.options, ghostEl);
  var spacer = 10;
  return vertical ? evt.clientX > childContainingRect.right + spacer || evt.clientY > lastElRect.bottom && evt.clientX > lastElRect.left : evt.clientY > childContainingRect.bottom + spacer || evt.clientX > lastElRect.right && evt.clientY > lastElRect.top;
}
function _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {
  var mouseOnAxis = vertical ? evt.clientY : evt.clientX,
    targetLength = vertical ? targetRect.height : targetRect.width,
    targetS1 = vertical ? targetRect.top : targetRect.left,
    targetS2 = vertical ? targetRect.bottom : targetRect.right,
    invert = false;
  if (!invertSwap) {
    // Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold
    if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {
      // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2
      // check if past first invert threshold on side opposite of lastDirection
      if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) {
        // past first invert threshold, do not restrict inverted threshold to dragEl shadow
        pastFirstInvertThresh = true;
      }
      if (!pastFirstInvertThresh) {
        // dragEl shadow (target move distance shadow)
        if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow
        : mouseOnAxis > targetS2 - targetMoveDistance) {
          return -lastDirection;
        }
      } else {
        invert = true;
      }
    } else {
      // Regular
      if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) {
        return _getInsertDirection(target);
      }
    }
  }
  invert = invert || invertSwap;
  if (invert) {
    // Invert of regular
    if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) {
      return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;
    }
  }
  return 0;
}

/**
 * Gets the direction dragEl must be swapped relative to target in order to make it
 * seem that dragEl has been "inserted" into that element's position
 * @param  {HTMLElement} target       The target whose position dragEl is being inserted at
 * @return {Number}                   Direction dragEl must be swapped
 */
function _getInsertDirection(target) {
  if (index(dragEl) < index(target)) {
    return 1;
  } else {
    return -1;
  }
}

/**
 * Generate id
 * @param   {HTMLElement} el
 * @returns {String}
 * @private
 */
function _generateId(el) {
  var str = el.tagName + el.className + el.src + el.href + el.textContent,
    i = str.length,
    sum = 0;
  while (i--) {
    sum += str.charCodeAt(i);
  }
  return sum.toString(36);
}
function _saveInputCheckedState(root) {
  savedInputChecked.length = 0;
  var inputs = root.getElementsByTagName('input');
  var idx = inputs.length;
  while (idx--) {
    var el = inputs[idx];
    el.checked && savedInputChecked.push(el);
  }
}
function _nextTick(fn) {
  return setTimeout(fn, 0);
}
function _cancelNextTick(id) {
  return clearTimeout(id);
}

// Fixed #973:
if (documentExists) {
  on(document, 'touchmove', function (evt) {
    if ((Sortable.active || awaitingDragStarted) && evt.cancelable) {
      evt.preventDefault();
    }
  });
}

// Export utils
Sortable.utils = {
  on: on,
  off: off,
  css: css,
  find: find,
  is: function is(el, selector) {
    return !!closest(el, selector, el, false);
  },
  extend: extend,
  throttle: throttle,
  closest: closest,
  toggleClass: toggleClass,
  clone: clone,
  index: index,
  nextTick: _nextTick,
  cancelNextTick: _cancelNextTick,
  detectDirection: _detectDirection,
  getChild: getChild,
  expando: expando
};

/**
 * Get the Sortable instance of an element
 * @param  {HTMLElement} element The element
 * @return {Sortable|undefined}         The instance of Sortable
 */
Sortable.get = function (element) {
  return element[expando];
};

/**
 * Mount a plugin to Sortable
 * @param  {...SortablePlugin|SortablePlugin[]} plugins       Plugins being mounted
 */
Sortable.mount = function () {
  for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {
    plugins[_key] = arguments[_key];
  }
  if (plugins[0].constructor === Array) plugins = plugins[0];
  plugins.forEach(function (plugin) {
    if (!plugin.prototype || !plugin.prototype.constructor) {
      throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(plugin));
    }
    if (plugin.utils) Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils);
    PluginManager.mount(plugin);
  });
};

/**
 * Create sortable instance
 * @param {HTMLElement}  el
 * @param {Object}      [options]
 */
Sortable.create = function (el, options) {
  return new Sortable(el, options);
};

// Export
Sortable.version = version;

var autoScrolls = [],
  scrollEl,
  scrollRootEl,
  scrolling = false,
  lastAutoScrollX,
  lastAutoScrollY,
  touchEvt$1,
  pointerElemChangedInterval;
function AutoScrollPlugin() {
  function AutoScroll() {
    this.defaults = {
      scroll: true,
      forceAutoScrollFallback: false,
      scrollSensitivity: 30,
      scrollSpeed: 10,
      bubbleScroll: true
    };

    // Bind all private methods
    for (var fn in this) {
      if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
        this[fn] = this[fn].bind(this);
      }
    }
  }
  AutoScroll.prototype = {
    dragStarted: function dragStarted(_ref) {
      var originalEvent = _ref.originalEvent;
      if (this.sortable.nativeDraggable) {
        on(document, 'dragover', this._handleAutoScroll);
      } else {
        if (this.options.supportPointer) {
          on(document, 'pointermove', this._handleFallbackAutoScroll);
        } else if (originalEvent.touches) {
          on(document, 'touchmove', this._handleFallbackAutoScroll);
        } else {
          on(document, 'mousemove', this._handleFallbackAutoScroll);
        }
      }
    },
    dragOverCompleted: function dragOverCompleted(_ref2) {
      var originalEvent = _ref2.originalEvent;
      // For when bubbling is canceled and using fallback (fallback 'touchmove' always reached)
      if (!this.options.dragOverBubble && !originalEvent.rootEl) {
        this._handleAutoScroll(originalEvent);
      }
    },
    drop: function drop() {
      if (this.sortable.nativeDraggable) {
        off(document, 'dragover', this._handleAutoScroll);
      } else {
        off(document, 'pointermove', this._handleFallbackAutoScroll);
        off(document, 'touchmove', this._handleFallbackAutoScroll);
        off(document, 'mousemove', this._handleFallbackAutoScroll);
      }
      clearPointerElemChangedInterval();
      clearAutoScrolls();
      cancelThrottle();
    },
    nulling: function nulling() {
      touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;
      autoScrolls.length = 0;
    },
    _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {
      this._handleAutoScroll(evt, true);
    },
    _handleAutoScroll: function _handleAutoScroll(evt, fallback) {
      var _this = this;
      var x = (evt.touches ? evt.touches[0] : evt).clientX,
        y = (evt.touches ? evt.touches[0] : evt).clientY,
        elem = document.elementFromPoint(x, y);
      touchEvt$1 = evt;

      // IE does not seem to have native autoscroll,
      // Edge's autoscroll seems too conditional,
      // MACOS Safari does not have autoscroll,
      // Firefox and Chrome are good
      if (fallback || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) {
        autoScroll(evt, this.options, elem, fallback);

        // Listener for pointer element change
        var ogElemScroller = getParentAutoScrollElement(elem, true);
        if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {
          pointerElemChangedInterval && clearPointerElemChangedInterval();
          // Detect for pointer elem change, emulating native DnD behaviour
          pointerElemChangedInterval = setInterval(function () {
            var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);
            if (newElem !== ogElemScroller) {
              ogElemScroller = newElem;
              clearAutoScrolls();
            }
            autoScroll(evt, _this.options, newElem, fallback);
          }, 10);
          lastAutoScrollX = x;
          lastAutoScrollY = y;
        }
      } else {
        // if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll
        if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {
          clearAutoScrolls();
          return;
        }
        autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);
      }
    }
  };
  return _extends(AutoScroll, {
    pluginName: 'scroll',
    initializeByDefault: true
  });
}
function clearAutoScrolls() {
  autoScrolls.forEach(function (autoScroll) {
    clearInterval(autoScroll.pid);
  });
  autoScrolls = [];
}
function clearPointerElemChangedInterval() {
  clearInterval(pointerElemChangedInterval);
}
var autoScroll = throttle(function (evt, options, rootEl, isFallback) {
  // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521
  if (!options.scroll) return;
  var x = (evt.touches ? evt.touches[0] : evt).clientX,
    y = (evt.touches ? evt.touches[0] : evt).clientY,
    sens = options.scrollSensitivity,
    speed = options.scrollSpeed,
    winScroller = getWindowScrollingElement();
  var scrollThisInstance = false,
    scrollCustomFn;

  // New scroll root, set scrollEl
  if (scrollRootEl !== rootEl) {
    scrollRootEl = rootEl;
    clearAutoScrolls();
    scrollEl = options.scroll;
    scrollCustomFn = options.scrollFn;
    if (scrollEl === true) {
      scrollEl = getParentAutoScrollElement(rootEl, true);
    }
  }
  var layersOut = 0;
  var currentParent = scrollEl;
  do {
    var el = currentParent,
      rect = getRect(el),
      top = rect.top,
      bottom = rect.bottom,
      left = rect.left,
      right = rect.right,
      width = rect.width,
      height = rect.height,
      canScrollX = void 0,
      canScrollY = void 0,
      scrollWidth = el.scrollWidth,
      scrollHeight = el.scrollHeight,
      elCSS = css(el),
      scrollPosX = el.scrollLeft,
      scrollPosY = el.scrollTop;
    if (el === winScroller) {
      canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible');
      canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible');
    } else {
      canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll');
      canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll');
    }
    var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX);
    var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY);
    if (!autoScrolls[layersOut]) {
      for (var i = 0; i <= layersOut; i++) {
        if (!autoScrolls[i]) {
          autoScrolls[i] = {};
        }
      }
    }
    if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {
      autoScrolls[layersOut].el = el;
      autoScrolls[layersOut].vx = vx;
      autoScrolls[layersOut].vy = vy;
      clearInterval(autoScrolls[layersOut].pid);
      if (vx != 0 || vy != 0) {
        scrollThisInstance = true;
        /* jshint loopfunc:true */
        autoScrolls[layersOut].pid = setInterval(function () {
          // emulate drag over during autoscroll (fallback), emulating native DnD behaviour
          if (isFallback && this.layer === 0) {
            Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely
          }
          var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;
          var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;
          if (typeof scrollCustomFn === 'function') {
            if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') {
              return;
            }
          }
          scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);
        }.bind({
          layer: layersOut
        }), 24);
      }
    }
    layersOut++;
  } while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));
  scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not
}, 30);

var drop = function drop(_ref) {
  var originalEvent = _ref.originalEvent,
    putSortable = _ref.putSortable,
    dragEl = _ref.dragEl,
    activeSortable = _ref.activeSortable,
    dispatchSortableEvent = _ref.dispatchSortableEvent,
    hideGhostForTarget = _ref.hideGhostForTarget,
    unhideGhostForTarget = _ref.unhideGhostForTarget;
  if (!originalEvent) return;
  var toSortable = putSortable || activeSortable;
  hideGhostForTarget();
  var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;
  var target = document.elementFromPoint(touch.clientX, touch.clientY);
  unhideGhostForTarget();
  if (toSortable && !toSortable.el.contains(target)) {
    dispatchSortableEvent('spill');
    this.onSpill({
      dragEl: dragEl,
      putSortable: putSortable
    });
  }
};
function Revert() {}
Revert.prototype = {
  startIndex: null,
  dragStart: function dragStart(_ref2) {
    var oldDraggableIndex = _ref2.oldDraggableIndex;
    this.startIndex = oldDraggableIndex;
  },
  onSpill: function onSpill(_ref3) {
    var dragEl = _ref3.dragEl,
      putSortable = _ref3.putSortable;
    this.sortable.captureAnimationState();
    if (putSortable) {
      putSortable.captureAnimationState();
    }
    var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);
    if (nextSibling) {
      this.sortable.el.insertBefore(dragEl, nextSibling);
    } else {
      this.sortable.el.appendChild(dragEl);
    }
    this.sortable.animateAll();
    if (putSortable) {
      putSortable.animateAll();
    }
  },
  drop: drop
};
_extends(Revert, {
  pluginName: 'revertOnSpill'
});
function Remove() {}
Remove.prototype = {
  onSpill: function onSpill(_ref4) {
    var dragEl = _ref4.dragEl,
      putSortable = _ref4.putSortable;
    var parentSortable = putSortable || this.sortable;
    parentSortable.captureAnimationState();
    dragEl.parentNode && dragEl.parentNode.removeChild(dragEl);
    parentSortable.animateAll();
  },
  drop: drop
};
_extends(Remove, {
  pluginName: 'removeOnSpill'
});

var lastSwapEl;
function SwapPlugin() {
  function Swap() {
    this.defaults = {
      swapClass: 'sortable-swap-highlight'
    };
  }
  Swap.prototype = {
    dragStart: function dragStart(_ref) {
      var dragEl = _ref.dragEl;
      lastSwapEl = dragEl;
    },
    dragOverValid: function dragOverValid(_ref2) {
      var completed = _ref2.completed,
        target = _ref2.target,
        onMove = _ref2.onMove,
        activeSortable = _ref2.activeSortable,
        changed = _ref2.changed,
        cancel = _ref2.cancel;
      if (!activeSortable.options.swap) return;
      var el = this.sortable.el,
        options = this.options;
      if (target && target !== el) {
        var prevSwapEl = lastSwapEl;
        if (onMove(target) !== false) {
          toggleClass(target, options.swapClass, true);
          lastSwapEl = target;
        } else {
          lastSwapEl = null;
        }
        if (prevSwapEl && prevSwapEl !== lastSwapEl) {
          toggleClass(prevSwapEl, options.swapClass, false);
        }
      }
      changed();
      completed(true);
      cancel();
    },
    drop: function drop(_ref3) {
      var activeSortable = _ref3.activeSortable,
        putSortable = _ref3.putSortable,
        dragEl = _ref3.dragEl;
      var toSortable = putSortable || this.sortable;
      var options = this.options;
      lastSwapEl && toggleClass(lastSwapEl, options.swapClass, false);
      if (lastSwapEl && (options.swap || putSortable && putSortable.options.swap)) {
        if (dragEl !== lastSwapEl) {
          toSortable.captureAnimationState();
          if (toSortable !== activeSortable) activeSortable.captureAnimationState();
          swapNodes(dragEl, lastSwapEl);
          toSortable.animateAll();
          if (toSortable !== activeSortable) activeSortable.animateAll();
        }
      }
    },
    nulling: function nulling() {
      lastSwapEl = null;
    }
  };
  return _extends(Swap, {
    pluginName: 'swap',
    eventProperties: function eventProperties() {
      return {
        swapItem: lastSwapEl
      };
    }
  });
}
function swapNodes(n1, n2) {
  var p1 = n1.parentNode,
    p2 = n2.parentNode,
    i1,
    i2;
  if (!p1 || !p2 || p1.isEqualNode(n2) || p2.isEqualNode(n1)) return;
  i1 = index(n1);
  i2 = index(n2);
  if (p1.isEqualNode(p2) && i1 < i2) {
    i2++;
  }
  p1.insertBefore(n2, p1.children[i1]);
  p2.insertBefore(n1, p2.children[i2]);
}

var multiDragElements = [],
  multiDragClones = [],
  lastMultiDragSelect,
  // for selection with modifier key down (SHIFT)
  multiDragSortable,
  initialFolding = false,
  // Initial multi-drag fold when drag started
  folding = false,
  // Folding any other time
  dragStarted = false,
  dragEl$1,
  clonesFromRect,
  clonesHidden;
function MultiDragPlugin() {
  function MultiDrag(sortable) {
    // Bind all private methods
    for (var fn in this) {
      if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
        this[fn] = this[fn].bind(this);
      }
    }
    if (!sortable.options.avoidImplicitDeselect) {
      if (sortable.options.supportPointer) {
        on(document, 'pointerup', this._deselectMultiDrag);
      } else {
        on(document, 'mouseup', this._deselectMultiDrag);
        on(document, 'touchend', this._deselectMultiDrag);
      }
    }
    on(document, 'keydown', this._checkKeyDown);
    on(document, 'keyup', this._checkKeyUp);
    this.defaults = {
      selectedClass: 'sortable-selected',
      multiDragKey: null,
      avoidImplicitDeselect: false,
      setData: function setData(dataTransfer, dragEl) {
        var data = '';
        if (multiDragElements.length && multiDragSortable === sortable) {
          multiDragElements.forEach(function (multiDragElement, i) {
            data += (!i ? '' : ', ') + multiDragElement.textContent;
          });
        } else {
          data = dragEl.textContent;
        }
        dataTransfer.setData('Text', data);
      }
    };
  }
  MultiDrag.prototype = {
    multiDragKeyDown: false,
    isMultiDrag: false,
    delayStartGlobal: function delayStartGlobal(_ref) {
      var dragged = _ref.dragEl;
      dragEl$1 = dragged;
    },
    delayEnded: function delayEnded() {
      this.isMultiDrag = ~multiDragElements.indexOf(dragEl$1);
    },
    setupClone: function setupClone(_ref2) {
      var sortable = _ref2.sortable,
        cancel = _ref2.cancel;
      if (!this.isMultiDrag) return;
      for (var i = 0; i < multiDragElements.length; i++) {
        multiDragClones.push(clone(multiDragElements[i]));
        multiDragClones[i].sortableIndex = multiDragElements[i].sortableIndex;
        multiDragClones[i].draggable = false;
        multiDragClones[i].style['will-change'] = '';
        toggleClass(multiDragClones[i], this.options.selectedClass, false);
        multiDragElements[i] === dragEl$1 && toggleClass(multiDragClones[i], this.options.chosenClass, false);
      }
      sortable._hideClone();
      cancel();
    },
    clone: function clone(_ref3) {
      var sortable = _ref3.sortable,
        rootEl = _ref3.rootEl,
        dispatchSortableEvent = _ref3.dispatchSortableEvent,
        cancel = _ref3.cancel;
      if (!this.isMultiDrag) return;
      if (!this.options.removeCloneOnHide) {
        if (multiDragElements.length && multiDragSortable === sortable) {
          insertMultiDragClones(true, rootEl);
          dispatchSortableEvent('clone');
          cancel();
        }
      }
    },
    showClone: function showClone(_ref4) {
      var cloneNowShown = _ref4.cloneNowShown,
        rootEl = _ref4.rootEl,
        cancel = _ref4.cancel;
      if (!this.isMultiDrag) return;
      insertMultiDragClones(false, rootEl);
      multiDragClones.forEach(function (clone) {
        css(clone, 'display', '');
      });
      cloneNowShown();
      clonesHidden = false;
      cancel();
    },
    hideClone: function hideClone(_ref5) {
      var _this = this;
      var sortable = _ref5.sortable,
        cloneNowHidden = _ref5.cloneNowHidden,
        cancel = _ref5.cancel;
      if (!this.isMultiDrag) return;
      multiDragClones.forEach(function (clone) {
        css(clone, 'display', 'none');
        if (_this.options.removeCloneOnHide && clone.parentNode) {
          clone.parentNode.removeChild(clone);
        }
      });
      cloneNowHidden();
      clonesHidden = true;
      cancel();
    },
    dragStartGlobal: function dragStartGlobal(_ref6) {
      var sortable = _ref6.sortable;
      if (!this.isMultiDrag && multiDragSortable) {
        multiDragSortable.multiDrag._deselectMultiDrag();
      }
      multiDragElements.forEach(function (multiDragElement) {
        multiDragElement.sortableIndex = index(multiDragElement);
      });

      // Sort multi-drag elements
      multiDragElements = multiDragElements.sort(function (a, b) {
        return a.sortableIndex - b.sortableIndex;
      });
      dragStarted = true;
    },
    dragStarted: function dragStarted(_ref7) {
      var _this2 = this;
      var sortable = _ref7.sortable;
      if (!this.isMultiDrag) return;
      if (this.options.sort) {
        // Capture rects,
        // hide multi drag elements (by positioning them absolute),
        // set multi drag elements rects to dragRect,
        // show multi drag elements,
        // animate to rects,
        // unset rects & remove from DOM

        sortable.captureAnimationState();
        if (this.options.animation) {
          multiDragElements.forEach(function (multiDragElement) {
            if (multiDragElement === dragEl$1) return;
            css(multiDragElement, 'position', 'absolute');
          });
          var dragRect = getRect(dragEl$1, false, true, true);
          multiDragElements.forEach(function (multiDragElement) {
            if (multiDragElement === dragEl$1) return;
            setRect(multiDragElement, dragRect);
          });
          folding = true;
          initialFolding = true;
        }
      }
      sortable.animateAll(function () {
        folding = false;
        initialFolding = false;
        if (_this2.options.animation) {
          multiDragElements.forEach(function (multiDragElement) {
            unsetRect(multiDragElement);
          });
        }

        // Remove all auxiliary multidrag items from el, if sorting enabled
        if (_this2.options.sort) {
          removeMultiDragElements();
        }
      });
    },
    dragOver: function dragOver(_ref8) {
      var target = _ref8.target,
        completed = _ref8.completed,
        cancel = _ref8.cancel;
      if (folding && ~multiDragElements.indexOf(target)) {
        completed(false);
        cancel();
      }
    },
    revert: function revert(_ref9) {
      var fromSortable = _ref9.fromSortable,
        rootEl = _ref9.rootEl,
        sortable = _ref9.sortable,
        dragRect = _ref9.dragRect;
      if (multiDragElements.length > 1) {
        // Setup unfold animation
        multiDragElements.forEach(function (multiDragElement) {
          sortable.addAnimationState({
            target: multiDragElement,
            rect: folding ? getRect(multiDragElement) : dragRect
          });
          unsetRect(multiDragElement);
          multiDragElement.fromRect = dragRect;
          fromSortable.removeAnimationState(multiDragElement);
        });
        folding = false;
        insertMultiDragElements(!this.options.removeCloneOnHide, rootEl);
      }
    },
    dragOverCompleted: function dragOverCompleted(_ref10) {
      var sortable = _ref10.sortable,
        isOwner = _ref10.isOwner,
        insertion = _ref10.insertion,
        activeSortable = _ref10.activeSortable,
        parentEl = _ref10.parentEl,
        putSortable = _ref10.putSortable;
      var options = this.options;
      if (insertion) {
        // Clones must be hidden before folding animation to capture dragRectAbsolute properly
        if (isOwner) {
          activeSortable._hideClone();
        }
        initialFolding = false;
        // If leaving sort:false root, or already folding - Fold to new location
        if (options.animation && multiDragElements.length > 1 && (folding || !isOwner && !activeSortable.options.sort && !putSortable)) {
          // Fold: Set all multi drag elements's rects to dragEl's rect when multi-drag elements are invisible
          var dragRectAbsolute = getRect(dragEl$1, false, true, true);
          multiDragElements.forEach(function (multiDragElement) {
            if (multiDragElement === dragEl$1) return;
            setRect(multiDragElement, dragRectAbsolute);

            // Move element(s) to end of parentEl so that it does not interfere with multi-drag clones insertion if they are inserted
            // while folding, and so that we can capture them again because old sortable will no longer be fromSortable
            parentEl.appendChild(multiDragElement);
          });
          folding = true;
        }

        // Clones must be shown (and check to remove multi drags) after folding when interfering multiDragElements are moved out
        if (!isOwner) {
          // Only remove if not folding (folding will remove them anyways)
          if (!folding) {
            removeMultiDragElements();
          }
          if (multiDragElements.length > 1) {
            var clonesHiddenBefore = clonesHidden;
            activeSortable._showClone(sortable);

            // Unfold animation for clones if showing from hidden
            if (activeSortable.options.animation && !clonesHidden && clonesHiddenBefore) {
              multiDragClones.forEach(function (clone) {
                activeSortable.addAnimationState({
                  target: clone,
                  rect: clonesFromRect
                });
                clone.fromRect = clonesFromRect;
                clone.thisAnimationDuration = null;
              });
            }
          } else {
            activeSortable._showClone(sortable);
          }
        }
      }
    },
    dragOverAnimationCapture: function dragOverAnimationCapture(_ref11) {
      var dragRect = _ref11.dragRect,
        isOwner = _ref11.isOwner,
        activeSortable = _ref11.activeSortable;
      multiDragElements.forEach(function (multiDragElement) {
        multiDragElement.thisAnimationDuration = null;
      });
      if (activeSortable.options.animation && !isOwner && activeSortable.multiDrag.isMultiDrag) {
        clonesFromRect = _extends({}, dragRect);
        var dragMatrix = matrix(dragEl$1, true);
        clonesFromRect.top -= dragMatrix.f;
        clonesFromRect.left -= dragMatrix.e;
      }
    },
    dragOverAnimationComplete: function dragOverAnimationComplete() {
      if (folding) {
        folding = false;
        removeMultiDragElements();
      }
    },
    drop: function drop(_ref12) {
      var evt = _ref12.originalEvent,
        rootEl = _ref12.rootEl,
        parentEl = _ref12.parentEl,
        sortable = _ref12.sortable,
        dispatchSortableEvent = _ref12.dispatchSortableEvent,
        oldIndex = _ref12.oldIndex,
        putSortable = _ref12.putSortable;
      var toSortable = putSortable || this.sortable;
      if (!evt) return;
      var options = this.options,
        children = parentEl.children;

      // Multi-drag selection
      if (!dragStarted) {
        if (options.multiDragKey && !this.multiDragKeyDown) {
          this._deselectMultiDrag();
        }
        toggleClass(dragEl$1, options.selectedClass, !~multiDragElements.indexOf(dragEl$1));
        if (!~multiDragElements.indexOf(dragEl$1)) {
          multiDragElements.push(dragEl$1);
          dispatchEvent({
            sortable: sortable,
            rootEl: rootEl,
            name: 'select',
            targetEl: dragEl$1,
            originalEvent: evt
          });

          // Modifier activated, select from last to dragEl
          if (evt.shiftKey && lastMultiDragSelect && sortable.el.contains(lastMultiDragSelect)) {
            var lastIndex = index(lastMultiDragSelect),
              currentIndex = index(dragEl$1);
            if (~lastIndex && ~currentIndex && lastIndex !== currentIndex) {
              // Must include lastMultiDragSelect (select it), in case modified selection from no selection
              // (but previous selection existed)
              var n, i;
              if (currentIndex > lastIndex) {
                i = lastIndex;
                n = currentIndex;
              } else {
                i = currentIndex;
                n = lastIndex + 1;
              }
              for (; i < n; i++) {
                if (~multiDragElements.indexOf(children[i])) continue;
                toggleClass(children[i], options.selectedClass, true);
                multiDragElements.push(children[i]);
                dispatchEvent({
                  sortable: sortable,
                  rootEl: rootEl,
                  name: 'select',
                  targetEl: children[i],
                  originalEvent: evt
                });
              }
            }
          } else {
            lastMultiDragSelect = dragEl$1;
          }
          multiDragSortable = toSortable;
        } else {
          multiDragElements.splice(multiDragElements.indexOf(dragEl$1), 1);
          lastMultiDragSelect = null;
          dispatchEvent({
            sortable: sortable,
            rootEl: rootEl,
            name: 'deselect',
            targetEl: dragEl$1,
            originalEvent: evt
          });
        }
      }

      // Multi-drag drop
      if (dragStarted && this.isMultiDrag) {
        folding = false;
        // Do not "unfold" after around dragEl if reverted
        if ((parentEl[expando].options.sort || parentEl !== rootEl) && multiDragElements.length > 1) {
          var dragRect = getRect(dragEl$1),
            multiDragIndex = index(dragEl$1, ':not(.' + this.options.selectedClass + ')');
          if (!initialFolding && options.animation) dragEl$1.thisAnimationDuration = null;
          toSortable.captureAnimationState();
          if (!initialFolding) {
            if (options.animation) {
              dragEl$1.fromRect = dragRect;
              multiDragElements.forEach(function (multiDragElement) {
                multiDragElement.thisAnimationDuration = null;
                if (multiDragElement !== dragEl$1) {
                  var rect = folding ? getRect(multiDragElement) : dragRect;
                  multiDragElement.fromRect = rect;

                  // Prepare unfold animation
                  toSortable.addAnimationState({
                    target: multiDragElement,
                    rect: rect
                  });
                }
              });
            }

            // Multi drag elements are not necessarily removed from the DOM on drop, so to reinsert
            // properly they must all be removed
            removeMultiDragElements();
            multiDragElements.forEach(function (multiDragElement) {
              if (children[multiDragIndex]) {
                parentEl.insertBefore(multiDragElement, children[multiDragIndex]);
              } else {
                parentEl.appendChild(multiDragElement);
              }
              multiDragIndex++;
            });

            // If initial folding is done, the elements may have changed position because they are now
            // unfolding around dragEl, even though dragEl may not have his index changed, so update event
            // must be fired here as Sortable will not.
            if (oldIndex === index(dragEl$1)) {
              var update = false;
              multiDragElements.forEach(function (multiDragElement) {
                if (multiDragElement.sortableIndex !== index(multiDragElement)) {
                  update = true;
                  return;
                }
              });
              if (update) {
                dispatchSortableEvent('update');
                dispatchSortableEvent('sort');
              }
            }
          }

          // Must be done after capturing individual rects (scroll bar)
          multiDragElements.forEach(function (multiDragElement) {
            unsetRect(multiDragElement);
          });
          toSortable.animateAll();
        }
        multiDragSortable = toSortable;
      }

      // Remove clones if necessary
      if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {
        multiDragClones.forEach(function (clone) {
          clone.parentNode && clone.parentNode.removeChild(clone);
        });
      }
    },
    nullingGlobal: function nullingGlobal() {
      this.isMultiDrag = dragStarted = false;
      multiDragClones.length = 0;
    },
    destroyGlobal: function destroyGlobal() {
      this._deselectMultiDrag();
      off(document, 'pointerup', this._deselectMultiDrag);
      off(document, 'mouseup', this._deselectMultiDrag);
      off(document, 'touchend', this._deselectMultiDrag);
      off(document, 'keydown', this._checkKeyDown);
      off(document, 'keyup', this._checkKeyUp);
    },
    _deselectMultiDrag: function _deselectMultiDrag(evt) {
      if (typeof dragStarted !== "undefined" && dragStarted) return;

      // Only deselect if selection is in this sortable
      if (multiDragSortable !== this.sortable) return;

      // Only deselect if target is not item in this sortable
      if (evt && closest(evt.target, this.options.draggable, this.sortable.el, false)) return;

      // Only deselect if left click
      if (evt && evt.button !== 0) return;
      while (multiDragElements.length) {
        var el = multiDragElements[0];
        toggleClass(el, this.options.selectedClass, false);
        multiDragElements.shift();
        dispatchEvent({
          sortable: this.sortable,
          rootEl: this.sortable.el,
          name: 'deselect',
          targetEl: el,
          originalEvent: evt
        });
      }
    },
    _checkKeyDown: function _checkKeyDown(evt) {
      if (evt.key === this.options.multiDragKey) {
        this.multiDragKeyDown = true;
      }
    },
    _checkKeyUp: function _checkKeyUp(evt) {
      if (evt.key === this.options.multiDragKey) {
        this.multiDragKeyDown = false;
      }
    }
  };
  return _extends(MultiDrag, {
    // Static methods & properties
    pluginName: 'multiDrag',
    utils: {
      /**
       * Selects the provided multi-drag item
       * @param  {HTMLElement} el    The element to be selected
       */
      select: function select(el) {
        var sortable = el.parentNode[expando];
        if (!sortable || !sortable.options.multiDrag || ~multiDragElements.indexOf(el)) return;
        if (multiDragSortable && multiDragSortable !== sortable) {
          multiDragSortable.multiDrag._deselectMultiDrag();
          multiDragSortable = sortable;
        }
        toggleClass(el, sortable.options.selectedClass, true);
        multiDragElements.push(el);
      },
      /**
       * Deselects the provided multi-drag item
       * @param  {HTMLElement} el    The element to be deselected
       */
      deselect: function deselect(el) {
        var sortable = el.parentNode[expando],
          index = multiDragElements.indexOf(el);
        if (!sortable || !sortable.options.multiDrag || !~index) return;
        toggleClass(el, sortable.options.selectedClass, false);
        multiDragElements.splice(index, 1);
      }
    },
    eventProperties: function eventProperties() {
      var _this3 = this;
      var oldIndicies = [],
        newIndicies = [];
      multiDragElements.forEach(function (multiDragElement) {
        oldIndicies.push({
          multiDragElement: multiDragElement,
          index: multiDragElement.sortableIndex
        });

        // multiDragElements will already be sorted if folding
        var newIndex;
        if (folding && multiDragElement !== dragEl$1) {
          newIndex = -1;
        } else if (folding) {
          newIndex = index(multiDragElement, ':not(.' + _this3.options.selectedClass + ')');
        } else {
          newIndex = index(multiDragElement);
        }
        newIndicies.push({
          multiDragElement: multiDragElement,
          index: newIndex
        });
      });
      return {
        items: _toConsumableArray(multiDragElements),
        clones: [].concat(multiDragClones),
        oldIndicies: oldIndicies,
        newIndicies: newIndicies
      };
    },
    optionListeners: {
      multiDragKey: function multiDragKey(key) {
        key = key.toLowerCase();
        if (key === 'ctrl') {
          key = 'Control';
        } else if (key.length > 1) {
          key = key.charAt(0).toUpperCase() + key.substr(1);
        }
        return key;
      }
    }
  });
}
function insertMultiDragElements(clonesInserted, rootEl) {
  multiDragElements.forEach(function (multiDragElement, i) {
    var target = rootEl.children[multiDragElement.sortableIndex + (clonesInserted ? Number(i) : 0)];
    if (target) {
      rootEl.insertBefore(multiDragElement, target);
    } else {
      rootEl.appendChild(multiDragElement);
    }
  });
}

/**
 * Insert multi-drag clones
 * @param  {[Boolean]} elementsInserted  Whether the multi-drag elements are inserted
 * @param  {HTMLElement} rootEl
 */
function insertMultiDragClones(elementsInserted, rootEl) {
  multiDragClones.forEach(function (clone, i) {
    var target = rootEl.children[clone.sortableIndex + (elementsInserted ? Number(i) : 0)];
    if (target) {
      rootEl.insertBefore(clone, target);
    } else {
      rootEl.appendChild(clone);
    }
  });
}
function removeMultiDragElements() {
  multiDragElements.forEach(function (multiDragElement) {
    if (multiDragElement === dragEl$1) return;
    multiDragElement.parentNode && multiDragElement.parentNode.removeChild(multiDragElement);
  });
}

Sortable.mount(new AutoScrollPlugin());
Sortable.mount(Remove, Revert);

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



/***/ }),

/***/ "./node_modules/tiny-invariant/dist/tiny-invariant.esm.js":
/*!****************************************************************!*\
  !*** ./node_modules/tiny-invariant/dist/tiny-invariant.esm.js ***!
  \****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ invariant)
/* harmony export */ });
var isProduction = "development" === 'production';
var prefix = 'Invariant failed';
function invariant(condition, message) {
    if (condition) {
        return;
    }
    if (isProduction) {
        throw new Error(prefix);
    }
    var provided = typeof message === 'function' ? message() : message;
    var value = provided ? prefix + ": " + provided : prefix;
    throw new Error(value);
}




/***/ }),

/***/ "./assets/apps/customizer-controls/src/builder-columns/BuilderColumns.tsx":
/*!********************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/builder-columns/BuilderColumns.tsx ***!
  \********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__);
/* jshint esversion: 6 */

// @ts-ignore

const BuilderColumns = (props) => {
    const { label, value, onChange, columns, choices } = props;
    const visibleChoices = choices[columns];
    return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "solace-white-background-control" },
        label && react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "customize-control-title" }, label),
        react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_solace_wp_components__WEBPACK_IMPORTED_MODULE_1__.RadioImage, { choices: visibleChoices, value: value, onClick: onChange })));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BuilderColumns);


/***/ }),

/***/ "./assets/apps/customizer-controls/src/builder-columns/BuilderColumnsComponent.tsx":
/*!*****************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/builder-columns/BuilderColumnsComponent.tsx ***!
  \*****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _BuilderColumns__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./BuilderColumns */ "./assets/apps/customizer-controls/src/builder-columns/BuilderColumns.tsx");
/* jshint esversion: 6 */



const BuilderColumnsComponent = ({ control }) => {
    const { setting, params } = control;
    const { label, choices, columnsControl } = params;
    const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(setting.get());
    const [columnsNo, setColumnsNo] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(1);
    const onChange = (nextValue) => {
        setValue(nextValue);
        control.setting.set(nextValue);
    };
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
        window.wp.customize.bind('ready', () => {
            const colNumber = window.wp.customize
                .control(columnsControl)
                .setting.get();
            setColumnsNo(parseInt(colNumber));
        });
        window.wp.customize.control(columnsControl, (customizeControl) => {
            customizeControl.setting.bind((nextColNumber) => {
                const colNumberInt = parseInt(nextColNumber);
                const currentValue = setting.get();
                if (!Object.keys(choices[colNumberInt]).includes(currentValue)) {
                    const firstValue = Object.keys(choices[colNumberInt])[0];
                    onChange(firstValue);
                }
                setColumnsNo(colNumberInt);
            });
        });
    });
    return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_BuilderColumns__WEBPACK_IMPORTED_MODULE_2__["default"], { value: value, columns: columnsNo, onChange: onChange, label: label, choices: choices }));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BuilderColumnsComponent);


/***/ }),

/***/ "./assets/apps/customizer-controls/src/builder-instructions/HFGMigrationNotice.tsx":
/*!*****************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/builder-instructions/HFGMigrationNotice.tsx ***!
  \*****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   HFGMigrationNotice: () => (/* binding */ HFGMigrationNotice)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch");
/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/undo.js");
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/cancel-circle-filled.js");
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/rotate-right.js");
/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/star-filled.js");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_4__);






const HFGMigrationNotice = ({ alreadyMigrated, hadOldBuilder, }) => {
    const [error, setError] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_4__.useState)(false);
    const [isCustomizerSaved, setCustomizerSaved] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_4__.useState)(true);
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_4__.useEffect)(() => {
        if (alreadyMigrated && !hadOldBuilder) {
            return;
        }
        window.wp.customize.bind('ready', () => {
            window.wp.customize.state('saved').bind((status) => {
                setCustomizerSaved(status);
            });
        });
    }, []);
    if (typeof window.SolaceProReactCustomize !== 'undefined') {
        const { whiteLabel } = window.SolaceProReactCustomize;
        if (whiteLabel) {
            return null;
        }
    }
    if (!hadOldBuilder) {
        return null;
    }
    const { nonce } = window.SolaceReactCustomize;
    const getReloadUrl = () => {
        const location = window.location.href;
        const currentPanel = window.wp.customize.state('expandedPanel').get();
        if (!currentPanel)
            return location;
        const panelId = currentPanel.id;
        if (!panelId)
            return location;
        const url = new URL(location);
        url.searchParams.set('autofocus[panel]', panelId);
        return url.href;
    };
    const runMigration = (rollback = false, dismiss = false) => {
        let message = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Migrating builder data', 'solace');
        if (rollback) {
            message = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Rolling back builder', 'solace');
        }
        if (dismiss) {
            message = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Removing old data', 'solace');
        }
        window.wp.customize.notifications.add(new window.wp.customize.OverlayNotification('solace_migrating_builders', {
            message: message + '...',
            type: 'success',
            loading: true,
        }));
        const headers = { 'X-WP-Nonce': nonce };
        if (rollback) {
            headers.rollback = 'yes';
        }
        if (dismiss) {
            headers.dismiss = 'yes';
        }
        _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default()({
            path: '/nv/migration/new_header_builder',
            method: 'GET',
            headers,
        }).then((response) => {
            if (!response.success) {
                window.wp.customize.notifications.remove('solace_migrating_builders');
                setError(true);
                return false;
            }
            reloadPage();
        });
    };
    const reloadPage = () => {
        const url = getReloadUrl();
        if (window.location.href === url) {
            window.location.reload();
            return false;
        }
        window.location.href = url;
    };
    const renderErrors = () => {
        return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null,
            !isCustomizerSaved && !error && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('You must save the current customizer values before running the migration.', 'solace'))),
            error && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Something went wrong. Please reload the page and try again.', 'solace')))));
    };
    if (alreadyMigrated && hadOldBuilder) {
        return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null,
            react__WEBPACK_IMPORTED_MODULE_0___default().createElement("hr", null),
            react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Want to roll back to the old builder?', 'solace')),
            react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { style: { marginRight: 10 }, disabled: !isCustomizerSaved && !error, isSecondary: !error, isDestructive: error, icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__["default"], onClick: error ? reloadPage : () => runMigration(true) }, error ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Reload', 'solace') : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Roll Back', 'solace')),
            react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { isDestructive: true, isSecondary: true, disabled: !isCustomizerSaved, icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_6__["default"], onClick: () => {
                    runMigration(false, true);
                } }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Dismiss', 'solace')),
            renderErrors()));
    }
    return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null,
        react__WEBPACK_IMPORTED_MODULE_0___default().createElement("hr", null),
        react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("We've created a new Header/Footer Builder experience! You can always roll back to the old builder from right here.", 'solace')),
        react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", null,
            react__WEBPACK_IMPORTED_MODULE_0___default().createElement("small", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Some manual adjustments may be required.', 'solace'))),
        react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { disabled: !isCustomizerSaved && !error, isSecondary: !error, isDestructive: error, icon: error ? _wordpress_icons__WEBPACK_IMPORTED_MODULE_7__["default"] : _wordpress_icons__WEBPACK_IMPORTED_MODULE_8__["default"], onClick: error ? reloadPage : () => runMigration() }, error
            ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Reload', 'solace')
            : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Migrate Builders Data', 'solace')),
        renderErrors()));
};


/***/ }),

/***/ "./assets/apps/customizer-controls/src/builder-instructions/Instructions.tsx":
/*!***********************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/builder-instructions/Instructions.tsx ***!
  \***********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _HFGMigrationNotice__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./HFGMigrationNotice */ "./assets/apps/customizer-controls/src/builder-instructions/HFGMigrationNotice.tsx");




const Instructions = ({ control }) => {
    const { params, id } = control;
    const { options } = params;
    const { description, quickLinks, builderMigrated, hadOldBuilder } = options;
    const linkKeys = Object.keys(quickLinks);
    const expandEventHeaders = (slug) => {
        const { type } = window.wp.customize.control(slug).params;
        if (type === 'solace_customizer_heading') {
            window.wp.customize.control(slug).triggerExpandHeader();
        }
    };
    const focusControl = (slug) => {
        if (slug === 'toggle_sidebar') {
            window.wp.customize.previewer.send('header_sidebar_open');
            return;
        }
        window.wp.customize.control(slug).focus({
            completeCallback: () => {
                expandEventHeaders(slug);
            },
        });
    };
    return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "quick-links-inner" },
        description && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null,
            react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", null, description),
            react__WEBPACK_IMPORTED_MODULE_0___default().createElement("hr", null))),
        linkKeys.length && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "quick-links-wrap" },
            react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "customize-control-title" }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Quick Links', 'solace')),
            react__WEBPACK_IMPORTED_MODULE_0___default().createElement("ul", { className: "quick-links" }, linkKeys.map((settingSlug, index) => {
                const { label, icon, url } = quickLinks[settingSlug];
                return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("li", { key: index },
                    react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, { isLink: true, href: url || undefined, target: '_blank', onClick: () => {
                            if (url) {
                                return;
                            }
                            focusControl(settingSlug);
                        } },
                        react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: `dashicons ${icon}` }),
                        label)));
            })),
            id === 'hfg_header_layout_section_quick_links' && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_HFGMigrationNotice__WEBPACK_IMPORTED_MODULE_3__.HFGMigrationNotice, { hadOldBuilder: hadOldBuilder, alreadyMigrated: builderMigrated }))))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Instructions);


/***/ }),

/***/ "./assets/apps/customizer-controls/src/builder/BuilderContext.tsx":
/*!************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/builder/BuilderContext.tsx ***!
  \************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);

const BuilderContext = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createContext)({});
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BuilderContext);


/***/ }),

/***/ "./assets/apps/customizer-controls/src/builder/HFGBuilder.tsx":
/*!********************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/builder/HFGBuilder.tsx ***!
  \********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./common/utils */ "./assets/apps/customizer-controls/src/builder/common/utils.ts");
/* harmony import */ var _BuilderContext__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./BuilderContext */ "./assets/apps/customizer-controls/src/builder/BuilderContext.tsx");




const Builder = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.lazy)(() => __webpack_require__.e(/*! import() */ "assets_apps_customizer-controls_src_builder_components_Builder_tsx").then(__webpack_require__.bind(__webpack_require__, /*! ./components/Builder */ "./assets/apps/customizer-controls/src/builder/components/Builder.tsx")));
const SidebarContent = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.lazy)(() => __webpack_require__.e(/*! import() */ "assets_apps_customizer-controls_src_builder_components_SidebarContent_tsx").then(__webpack_require__.bind(__webpack_require__, /*! ./components/SidebarContent */ "./assets/apps/customizer-controls/src/builder/components/SidebarContent.tsx")));
const HFGBuilder = ({ hasColumns, builder, onChange, value, hidden, portalMount, mounted, }) => {
    const [device, setDevice] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)('desktop');
    const [dragging, setDragging] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
    const [previewSidebar, togglePreviewSidebar] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
    const [currentSection, setCurrentSection] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)('');
    const getSidebarItems = (explicitValue = null) => {
        const usedValue = explicitValue || value;
        const allItems = window.SolaceReactCustomize.HFG[builder].items;
        const usedItems = usedValue && usedValue[device]
            ? (0,_common_utils__WEBPACK_IMPORTED_MODULE_2__.getUsedItemsFromItems)(usedValue[device])
            : Object.keys(allItems);
        return Object.keys(allItems)
            .filter((key) => !usedItems.includes(key))
            .map((itemId) => {
            return { id: itemId };
        })
            .sort((a, b) => {
            return a.id < b.id ? -1 : 1;
        });
    };
    const getUsedSidebarItems = (explicitValue = null) => {
        const usedValue = explicitValue || value;
        const allItems = window.SolaceReactCustomize.HFG[builder].items;
        const usedItems = usedValue && usedValue[device]
            ? (0,_common_utils__WEBPACK_IMPORTED_MODULE_2__.getUsedItemsFromItems)(usedValue[device])
            : Object.keys(allItems);
        return Object.keys(allItems)
            .filter((key) => usedItems.includes(key))
            .map((itemId) => {
            return { id: itemId };
        })
            .sort((a, b) => {
            return a.id < b.id ? -1 : 1;
        });
    };
    const [sidebarItems, setSidebarItems] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(getSidebarItems());
    const [usedSidebarItems, setUsedSidebarItems] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(getUsedSidebarItems());
    const updateSidebarItems = () => {
        setSidebarItems([...getSidebarItems()]);
    };
    const updateUsedSidebarItems = () => {
        setUsedSidebarItems([...getUsedSidebarItems()]);
    };
    const explicitlyUpdateSidebarItemsWithThisValue = (explicitVal) => {
        setSidebarItems([...getSidebarItems(explicitVal)]);
    };
    const explicitlyUpdateUsedSidebarItemsWithThisValue = (explicitVal) => {
        setUsedSidebarItems([...getUsedSidebarItems(explicitVal)]);
    };
    const onDragStart = () => {
        setDragging(true);
    };
    const onDragEnd = () => {
        setDragging(false);
    };
    const updateLayout = (row, slot, items) => {
        onDragEnd();
        const nextItems = { ...value[device] };
        const updateItems = [...items];
        if (row === 'sidebar') {
            if ((0,_common_utils__WEBPACK_IMPORTED_MODULE_2__.arraysAreIdentical)(items, nextItems[row])) {
                return false;
            }
            nextItems[row] = updateItems;
            const finalValue = { ...value, [device]: nextItems };
            onChange(finalValue);
        }
        else {
            // Make sure row exists and has slots.
            if (!nextItems[row]) {
                nextItems[row] = _common_utils__WEBPACK_IMPORTED_MODULE_2__.ROW_SCHEMA;
            }
            if ((0,_common_utils__WEBPACK_IMPORTED_MODULE_2__.arraysAreIdentical)(items, nextItems[row][slot])) {
                return false;
            }
            const update = nextItems[row];
            if (slot === 'center' && items.length === 0 && !hasColumns) {
                const sideSlots = ['c-left', 'c-right'];
                sideSlots.forEach((sideSlot) => {
                    if (!Array.isArray(update[sideSlot])) {
                        return false;
                    }
                    if (update[sideSlot].length < 1) {
                        return false;
                    }
                    const nextSlot = sideSlot === 'c-left' ? 'left' : 'right';
                    update[sideSlot].forEach((itemToMove) => {
                        if (nextSlot === 'left') {
                            nextItems[row][nextSlot].push(itemToMove);
                        }
                        else {
                            nextItems[row][nextSlot].unshift(itemToMove);
                        }
                    });
                    nextItems[row][sideSlot] = [];
                });
            }
            update[slot] = updateItems;
            nextItems[row][slot] = updateItems;
            const finalValue = { ...value, [device]: nextItems };
            onChange(finalValue);
        }
    };
    const itemRemovedCleanup = (id) => {
        if (id === '') {
            return;
        }
        if (id === 'header_palette_switch') {
            localStorage.removeItem('solace_user_theme');
            window.wp.customize.previewer.refresh();
        }
    };
    const removeItem = (row, slot, indexToRemove) => {
        const nextItems = { ...value[device] };
        if (row === 'sidebar') {
            itemRemovedCleanup(nextItems[row][indexToRemove].id);
            nextItems[row].splice(indexToRemove, 1);
            const finalValue = { ...value, [device]: nextItems };
            onChange(finalValue);
            return false;
        }
        itemRemovedCleanup(nextItems[row][slot][indexToRemove].id);
        nextItems[row][slot].splice(indexToRemove, 1);
        if (slot === 'center' &&
            nextItems[row][slot].length === 0 &&
            !hasColumns) {
            const sideSlots = ['c-left', 'c-right'];
            sideSlots.forEach((sideSlot) => {
                if (!Array.isArray(nextItems[row][sideSlot])) {
                    return false;
                }
                if (nextItems[row][sideSlot].length < 1) {
                    return false;
                }
                const nextSlot = sideSlot === 'c-left' ? 'left' : 'right';
                nextItems[row][sideSlot].forEach((itemToMove) => {
                    if (nextSlot === 'left') {
                        nextItems[row][nextSlot].push(itemToMove);
                    }
                    else {
                        nextItems[row][nextSlot].unshift(itemToMove);
                    }
                });
                nextItems[row][sideSlot] = [];
            });
        }
        const finalValue = { ...value, [device]: nextItems };
        onChange(finalValue);
    };
    /*
     * Bind the device switchers to the device state.
     */
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
        bindDeviceSwitching();
        bindValueChanges();
    }, []);
    /*
     * Make sure we update the sidebar.
     */
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
        updateSidebarItems();
    }, [device]);
    /*
     * Make sure we update the sidebar.
     */
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
        updateUsedSidebarItems();
    }, [device]);
    const bindDeviceSwitching = () => {
        window.wp.customize.bind('ready', () => {
            window.wp.customize.previewedDevice.bind((newDevice) => {
                // No tablet context existent on builders.
                if (newDevice === 'tablet') {
                    newDevice = 'mobile';
                }
                // If we don't have a value, don't switch context.
                if (!value[newDevice]) {
                    return false;
                }
                setDevice(newDevice);
            });
            window.wp.customize
                .state('expandedSection')
                .bind((expandedSection) => {
                if (!expandedSection) {
                    setCurrentSection('');
                    return;
                }
                if (!expandedSection.id) {
                    setCurrentSection('');
                    return;
                }
                setCurrentSection(expandedSection.id);
            });
        });
    };
    const bindValueChanges = () => {
        document.addEventListener('solace-changed-builder-value', (e) => {
            const { detail } = e;
            if (!detail)
                return false;
            const { id, value: builderValue } = detail;
            let actualValue = builderValue;
            if (!actualValue) {
                actualValue = { ...value };
            }
            if (!id || id !== builder)
                return false;
            const parsed = (0,_common_utils__WEBPACK_IMPORTED_MODULE_2__.maybeParseJson)(actualValue);
            onChange(parsed);
            explicitlyUpdateSidebarItemsWithThisValue(parsed);
            explicitlyUpdateUsedSidebarItemsWithThisValue(parsed);
            return false;
        });
    };
    const actions = {
        updateLayout,
        onDragStart,
        onDragEnd,
        removeItem,
        setDevice,
        setSidebarItems,
        setUsedSidebarItems,
        togglePreviewSidebar,
        updateSidebarItems,
        updateUsedSidebarItems,
    };
    return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_BuilderContext__WEBPACK_IMPORTED_MODULE_3__["default"].Provider, { value: {
            actions,
            sidebarItems,
            usedSidebarItems,
            dragging,
            currentSection,
            builder,
            hasColumns,
            device,
            previewSidebar,
        } },
        react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", null,
            react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Suspense, { fallback: react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "components-spinner is-active" }) }, mounted && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null,
                react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: `solace-hfg-builder` },
                    react__WEBPACK_IMPORTED_MODULE_0___default().createElement(SidebarContent, { items: sidebarItems, usedItems: usedSidebarItems })),
                (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createPortal)(react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Builder, { hidden: hidden, value: value, portalMount: portalMount }), portalMount)))))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (HFGBuilder);


/***/ }),

/***/ "./assets/apps/customizer-controls/src/builder/HFGBuilderComponent.tsx":
/*!*****************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/builder/HFGBuilderComponent.tsx ***!
  \*****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./common/utils */ "./assets/apps/customizer-controls/src/builder/common/utils.ts");
/* harmony import */ var _HFGBuilder__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./HFGBuilder */ "./assets/apps/customizer-controls/src/builder/HFGBuilder.tsx");
/* jshint esversion: 6 */




const HFGBuilderComponent = ({ control, portalMount }) => {
    const { setting, params } = control;
    const builder = params.builderType;
    const hasColumns = params.columnsLayout;
    const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(
    // @ts-ignore
    (0,_common_utils__WEBPACK_IMPORTED_MODULE_2__.maybeParseJson)(setting.get()));
    const [isHidden, setHidden] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(true);
    const [isMounted, setMounted] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
    const onChange = (nextValue) => {
        const next = JSON.stringify(nextValue);
        const prev = setting.get();
        if (next === prev) {
            return;
        }
        if (next.search('header_palette_switch') === -1 &&
            localStorage.getItem('solace_user_theme')) {
            localStorage.removeItem('solace_user_theme');
            window.wp.customize.previewer.refresh();
        }
        setValue(nextValue);
        control.setting.set(next);
    };
    /**
     * Toggles builder visibility based on the migration notification.
     */
    const bindOverlayNotificationHiding = () => {
        window.wp.customize.notifications.bind('add', (data) => {
            if (data.code !== 'solace_migrating_builders') {
                return false;
            }
            setHidden(true);
        });
        window.wp.customize.notifications.bind('removed', (data) => {
            if (data.code !== 'solace_migrating_builders') {
                return false;
            }
            setHidden(false);
        });
    };
    /**
     * Shows builder when its panel is expanded.
     */
    const bindShowOnExpand = () => {
        window.wp.customize
            .state('expandedPanel')
            .bind((panel) => {
            if (panel.id && panel.id === `hfg_${builder}` && isHidden) {
                setHidden(false);
                return false;
            }
            setHidden(true);
        });
    };
    /**
     * Hides builder when customizer is collapsed.
     */
    const bindHideOnPaneCollapse = () => {
        window.wp.customize.bind('ready', () => {
            window.wp.customize
                .state('paneVisible')
                .bind((nextValue) => {
                const currentPanel = window.wp.customize
                    .state('expandedPanel')
                    .get();
                if (nextValue) {
                    if (currentPanel.id &&
                        currentPanel.id === `hfg_${builder}` &&
                        isHidden) {
                        setHidden(false);
                    }
                    return false;
                }
                setHidden(true);
            });
        });
    };
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
        bindShowOnExpand();
        bindOverlayNotificationHiding();
        bindHideOnPaneCollapse();
    }, []);
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
        window.wp.customize.bind('ready', () => {
            window.wp.customize
                .state('expandedPanel')
                .bind((activePanel) => {
                if (!activePanel) {
                    return;
                }
                if (!activePanel.id) {
                    return;
                }
                if (activePanel.id === `hfg_${builder}` &&
                    activePanel.id !== 'hfg_page_header') {
                    setMounted(true);
                }
            });
            window.wp.customize
                .state('expandedSection')
                .bind((activeSection) => {
                const currentPanel = window.wp.customize
                    .state('expandedPanel')
                    .get();
                if (currentPanel.id &&
                    currentPanel.id === 'hfg_page_header') {
                    if (!activeSection) {
                        setMounted(false);
                        return;
                    }
                    setMounted(true);
                }
            });
        });
    }, []);
    return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_HFGBuilder__WEBPACK_IMPORTED_MODULE_3__["default"], { hasColumns: hasColumns, hidden: isHidden, builder: builder, value: value, onChange: onChange, portalMount: portalMount, mounted: isMounted }));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (HFGBuilderComponent);


/***/ }),

/***/ "./assets/apps/customizer-controls/src/builder/common/utils.ts":
/*!*********************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/builder/common/utils.ts ***!
  \*********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ROW_SCHEMA: () => (/* binding */ ROW_SCHEMA),
/* harmony export */   arraysAreIdentical: () => (/* binding */ arraysAreIdentical),
/* harmony export */   getUsedItemsFromItems: () => (/* binding */ getUsedItemsFromItems),
/* harmony export */   maybeParseJson: () => (/* binding */ maybeParseJson),
/* harmony export */   slotKeys: () => (/* binding */ slotKeys)
/* harmony export */ });
const slotKeys = ['left', 'c-left', 'center', 'c-right', 'right'];
const getUsedItemsFromItems = (items) => {
    const nextItems = [];
    // Get the items currently inside the builder and save them in an array.
    Object.values(items).forEach((value) => {
        if (Array.isArray(value) && value.length) {
            value.forEach((item) => {
                if (!item.id) {
                    return false;
                }
                nextItems.push(item.id);
            });
            return false;
        }
        if (typeof value === 'object' && value !== null) {
            Object.values(value).forEach((rowSlotItems) => {
                if (Array.isArray(rowSlotItems)) {
                    rowSlotItems.forEach((item) => nextItems.push(item.id));
                }
            });
        }
    });
    return nextItems;
};
const arraysAreIdentical = (array1, array2) => {
    if (array1 === array2) {
        return true;
    }
    if (!Array.isArray(array1) || !Array.isArray(array2)) {
        return false;
    }
    if (array1 === null || array2 === null) {
        return false;
    }
    if (array1.length !== array2.length) {
        return false;
    }
    return JSON.stringify(array1) === JSON.stringify(array2);
};
const maybeParseJson = (input) => {
    if (typeof input !== 'string') {
        return input;
    }
    try {
        JSON.parse(input);
    }
    catch (error) {
        return input;
    }
    return JSON.parse(input);
};
const ROW_SCHEMA = {
    left: [],
    'c-left': [],
    center: [],
    'c-right': [],
    right: [],
};


/***/ }),

/***/ "./assets/apps/customizer-controls/src/customizer-search/MainSearch.tsx":
/*!******************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/customizer-search/MainSearch.tsx ***!
  \******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _SearchToggle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./SearchToggle */ "./assets/apps/customizer-controls/src/customizer-search/SearchToggle.tsx");
/* harmony import */ var _SearchComponent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./SearchComponent */ "./assets/apps/customizer-controls/src/customizer-search/SearchComponent.tsx");
/* harmony import */ var _SearchResults__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./SearchResults */ "./assets/apps/customizer-controls/src/customizer-search/SearchResults.tsx");





/**
 * MainSearch Component
 *
 * @param {MainSearchProps} MainSearchProps
 * @class
 */
const MainSearch = ({ search, button, results }) => {
    const [isOpened, setIsOpened] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
    const [query, setQuery] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)('');
    const [matchResults, setMatchResults] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([]);
    return (react__WEBPACK_IMPORTED_MODULE_1___default().createElement((react__WEBPACK_IMPORTED_MODULE_1___default().Fragment), null,
        (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createPortal)(react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_SearchToggle__WEBPACK_IMPORTED_MODULE_2__["default"], { onToggle: () => {
                setIsOpened(!isOpened);
            } }), button),
        (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createPortal)(react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_SearchComponent__WEBPACK_IMPORTED_MODULE_3__["default"], { isOpened: isOpened, search: query, setSearch: setQuery, matchResults: matchResults, setMatchResults: setMatchResults }), search),
        (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createPortal)(react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_SearchResults__WEBPACK_IMPORTED_MODULE_4__["default"], { matchResults: matchResults, query: query, setQuery: setQuery }), results)));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (MainSearch);


/***/ }),

/***/ "./assets/apps/customizer-controls/src/customizer-search/SearchComponent.tsx":
/*!***********************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/customizer-search/SearchComponent.tsx ***!
  \***********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__);
/* global  _wpCustomizeSettings */




/**
 * Search Component
 * Handles search input, filtering and display of results.
 *
 * @param {SearchComponentProps} SearchComponentProps
 * @class
 */
const SearchComponent = ({ isOpened, search, setSearch, matchResults, setMatchResults, }) => {
    const customizerPanels = document.getElementById('customize-theme-controls');
    const controls = Object.values(_wpCustomizeSettings.controls).map((control) => {
        Object.values(_wpCustomizeSettings.sections).forEach((section) => {
            if (control.section === section.id) {
                Object.values(_wpCustomizeSettings.panels).forEach((panel) => {
                    if ('' === section.panel) {
                        control.panelName = section.title;
                    }
                    if (section.panel === panel.id) {
                        control.sectionName = section.title;
                        control.panel = section.panel;
                        control.panelName = panel.title;
                    }
                });
            }
        });
        return control;
    });
    /**
     * This `useEffect()` is being used to bind into panel and section expand
     * to allow for search clear on transitions from other clickable elements.
     */
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useEffect)(() => {
        window.wp.customize.state('expandedPanel').bind(() => {
            clearField();
            if (customizerPanels === null || customizerPanels === void 0 ? void 0 : customizerPanels.classList.contains('search-not-found')) {
                customizerPanels === null || customizerPanels === void 0 ? void 0 : customizerPanels.classList.remove('search-not-found');
            }
        });
        window.wp.customize.state('expandedSection').bind(() => {
            clearField();
            if (customizerPanels === null || customizerPanels === void 0 ? void 0 : customizerPanels.classList.contains('search-not-found')) {
                customizerPanels === null || customizerPanels === void 0 ? void 0 : customizerPanels.classList.remove('search-not-found');
            }
        });
    }, []);
    /**
     * This `useEffect()` is being used to listen for the toggleEvent
     * from `SearchToggle` component.
     */
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useEffect)(() => {
        var _a, _b, _c;
        if (isOpened) {
            (_a = document
                .getElementById('solace-customize-search-field')) === null || _a === void 0 ? void 0 : _a.classList.add('visible');
            (_b = document.getElementById('nv-customizer-search-input')) === null || _b === void 0 ? void 0 : _b.focus();
        }
        else {
            (_c = document
                .getElementById('solace-customize-search-field')) === null || _c === void 0 ? void 0 : _c.classList.remove('visible');
            clearField();
        }
    }, [isOpened]);
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useEffect)(() => {
        if (search === '') {
            if (customizerPanels === null || customizerPanels === void 0 ? void 0 : customizerPanels.classList.contains('search-not-found')) {
                customizerPanels === null || customizerPanels === void 0 ? void 0 : customizerPanels.classList.remove('search-not-found');
            }
        }
        else if (!(customizerPanels === null || customizerPanels === void 0 ? void 0 : customizerPanels.classList.contains('search-not-found'))) {
            customizerPanels === null || customizerPanels === void 0 ? void 0 : customizerPanels.classList.add('search-not-found');
        }
        if (matchResults.length === 0) {
            if (customizerPanels === null || customizerPanels === void 0 ? void 0 : customizerPanels.classList.contains('search-not-found')) {
                customizerPanels === null || customizerPanels === void 0 ? void 0 : customizerPanels.classList.remove('search-not-found');
            }
        }
    }, [search, matchResults]);
    /**
     * Clear the search input field.
     *
     * @return {void}
     */
    const clearField = () => {
        var _a;
        setSearch('');
        (_a = document.getElementById('nv-customizer-search-input')) === null || _a === void 0 ? void 0 : _a.focus();
        customizerPanels === null || customizerPanels === void 0 ? void 0 : customizerPanels.classList.remove('search-not-found');
    };
    /**
     * Handle input field change.
     *
     * @param {Event} event
     * @param {Event.target} event.target
     * @param {string} event.target.value
     * @return {void}
     */
    const onInputChange = (event) => {
        const query = event.target.value;
        setSearch(query);
        const newResults = getControlsMatch(search);
        setMatchResults(newResults);
    };
    /**
     * Return all controls that match query.
     *
     * @param {string} query
     * @return {Control[]} controls
     */
    const getControlsMatch = (query) => {
        return controls.filter((control) => {
            if (!control.label)
                control.label = '';
            if (!control.panelName)
                control.panelName = '';
            if (!control.sectionName)
                control.sectionName = '';
            const matchQuery = query.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
            const regex = new RegExp(matchQuery, 'gi');
            return (control.label.match(regex) ||
                control.panelName.match(regex) ||
                control.sectionName.match(regex));
        });
    };
    return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null,
        react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "accordion-section" },
            react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "search-input" }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Search', 'solace') +
                ' ' +
                (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Settings', 'solace').toLowerCase()),
            react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "nv-search-wrap" },
                react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", { type: "text", placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Search', 'solace'), id: "nv-customizer-search-input", className: "nv-customizer-search-input", value: search, onChange: onInputChange }),
                react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, { label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Clear', 'solace'), isSmall: true, isSecondary: true, onClick: clearField },
                    (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Clear', 'solace'),
                    react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "screen-reader-text" }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Clear', 'solace')))))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SearchComponent);


/***/ }),

/***/ "./assets/apps/customizer-controls/src/customizer-search/SearchResults.tsx":
/*!*********************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/customizer-search/SearchResults.tsx ***!
  \*********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__);


/**
 * SearchResults Component
 *
 * @param {SearchResultsProps} params
 * @class
 */
const SearchResults = ({ matchResults, query, setQuery, }) => {
    /**
     * Handle redirect to specific section on click.
     *
     * @param {string} sectionName
     * @param {string} panelName
     * @return {void}
     */
    const expandSection = (sectionName, panelName) => {
        var _a, _b;
        if (!sectionName && !panelName) {
            return;
        }
        if (panelName) {
            (_a = wp.customize.panel(panelName)) === null || _a === void 0 ? void 0 : _a.expand();
        }
        if (sectionName) {
            (_b = wp.customize.section(sectionName)) === null || _b === void 0 ? void 0 : _b.expand();
        }
        setQuery('');
    };
    /**
     * Highlight text from search query.
     *
     * @param {string} text
     * @param {string} highlight
     */
    const getHighlightedText = (text, highlight) => {
        const matchQuery = highlight.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
        const parts = text.split(new RegExp(`(${matchQuery})`, 'gi'));
        return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", null,
            ' ',
            parts.map((part, i) => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { key: i, className: classnames__WEBPACK_IMPORTED_MODULE_1___default()({
                    hl: part.toLowerCase() === highlight.toLowerCase(),
                }), style: part.toLowerCase() === highlight.toLowerCase()
                    ? { fontWeight: 'bold' }
                    : {} }, part))),
            ' '));
    };
    return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, query !== '' && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("ul", { id: "customizer-search-results" }, matchResults.map((control) => {
        if ('' === control.label)
            return '';
        let breadcrumbs = control.panelName;
        if (breadcrumbs === null) {
            breadcrumbs = '';
        }
        if ('' !== control.sectionName) {
            breadcrumbs = `${breadcrumbs} ▸ ${control.sectionName}`;
        }
        const label = control.label;
        return (
        // eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-noninteractive-element-interactions
        react__WEBPACK_IMPORTED_MODULE_0___default().createElement("li", { id: `accordion-section-${control.section}`, className: "accordion-section control-section control-section-default", "aria-owns": `sub-accordion-section-${control.section}`, key: control.instanceNumber, onClick: (event) => {
                event.preventDefault();
                expandSection(control.section, control.panel);
            } },
            react__WEBPACK_IMPORTED_MODULE_0___default().createElement("h3", { className: "accordion-section-title", tabIndex: 0 },
                getHighlightedText(label, query),
                react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "screen-reader-text" }, "Press return or enter to open this section")),
            react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "search-setting-path" }, getHighlightedText(breadcrumbs, query))));
    })))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SearchResults);


/***/ }),

/***/ "./assets/apps/customizer-controls/src/customizer-search/SearchToggle.tsx":
/*!********************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/customizer-search/SearchToggle.tsx ***!
  \********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);



/**
 * Search Toggle.
 *
 * @param {SearchToggleProps} SearchToggleProps
 * @class
 */
const SearchToggle = ({ onToggle }) => {
    return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null,
        react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, { icon: "search", iconSize: 28, isSmall: true, isLink: true, label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Search', 'solace') + ' ' + (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Toggle', 'solace'), onClick: onToggle },
            react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "screen-reader-text" }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Search', 'solace')))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SearchToggle);


/***/ }),

/***/ "./assets/apps/customizer-controls/src/documentation-section/Documentation.tsx":
/*!*************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/documentation-section/Documentation.tsx ***!
  \*************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);



const Documentation = ({ control }) => {
    const { params } = control;
    const { title, url } = params;
    return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "documentation-inner" }, title && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "solace-customizer-heading" },
        react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "accordion-heading" }, params.title),
        url && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, { target: "_blank", rel: "external noreferrer noopener", href: url, isSecondary: true },
            (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Documentation', 'solace'),
            react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "components-visually-hidden" }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('(opens in a new tab)', 'solace'))))))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Documentation);


/***/ }),

/***/ "./assets/apps/customizer-controls/src/link/Link.tsx":
/*!***********************************************************!*\
  !*** ./assets/apps/customizer-controls/src/link/Link.tsx ***!
  \***********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);

const Link = ({ control }) => {
    const { label, url, description } = control.params;
    return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "solace-white-background-control" },
        description && description !== '' && react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", null, description),
        react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a", { href: url }, label)));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Link);


/***/ }),

/***/ "./assets/apps/customizer-controls/src/presets-footer/PresetsFooter.tsx":
/*!******************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/presets-footer/PresetsFooter.tsx ***!
  \******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
/* jshint esversion: 6 */




const PresetsFooter = ({ presets, onSelect }) => {
    const [search, setSearch] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)('');
    /**
     * You can get the value in the console with this command:
     *
     * copy(HFG.getSettings());
     *
     * @return {*}
     */
    const filtered = presets.filter((preset) => preset.label.toLowerCase().includes(search.toLowerCase()));
    return (react__WEBPACK_IMPORTED_MODULE_3___default().createElement("div", { className: "solace-preset-selector" },
        react__WEBPACK_IMPORTED_MODULE_3___default().createElement("div", { className: "search" },
            react__WEBPACK_IMPORTED_MODULE_3___default().createElement("input", { type: "search", placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Search Header Presets…', 'solace'), onChange: (e) => {
                    setSearch(e.target.value);
                } })),
        filtered.length > 0 ? (filtered.map((preset, index) => {
            const { image, label, setup } = preset;
            return (react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Tooltip, { key: index, text: label },
                react__WEBPACK_IMPORTED_MODULE_3___default().createElement("button", { onClick: (e) => {
                        e.preventDefault();
                        onSelect(setup);
                    } },
                    react__WEBPACK_IMPORTED_MODULE_3___default().createElement("img", { src: image, alt: label }))));
        })) : (react__WEBPACK_IMPORTED_MODULE_3___default().createElement("p", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('No header presets found', 'solace')))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PresetsFooter);


/***/ }),

/***/ "./assets/apps/customizer-controls/src/presets-footer/PresetsFooterComponent.tsx":
/*!***************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/presets-footer/PresetsFooterComponent.tsx ***!
  \***************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _PresetsFooter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./PresetsFooter */ "./assets/apps/customizer-controls/src/presets-footer/PresetsFooter.tsx");
/* harmony import */ var _builder_common_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../builder/common/utils */ "./assets/apps/customizer-controls/src/builder/common/utils.ts");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
/* global CustomEvent */



const PresetsFooterComponent = ({ control }) => {
    const { presets, builder } = control.params;
    const handleClick = (setup) => {
        const parsedSetup = (0,_builder_common_utils__WEBPACK_IMPORTED_MODULE_1__.maybeParseJson)(setup);
        Object.keys(parsedSetup).forEach((themeMod) => {
            if (themeMod === builder) {
                document.dispatchEvent(new CustomEvent('solace-changed-builder-value', {
                    detail: {
                        value: parsedSetup[themeMod],
                        id: 'footer',
                    },
                }));
                return false;
            }
            const controlInstance = window.wp.customize.control(themeMod);
            if (!controlInstance)
                return false;
            const { type: controlType } = controlInstance.params;
            if (['text', 'textarea', 'select'].includes(controlType)) {
                controlInstance.setting.set(parsedSetup[themeMod]);
                return false;
            }
            document.dispatchEvent(new CustomEvent('solace-changed-customizer-value', {
                detail: {
                    value: parsedSetup[themeMod] || '',
                    id: themeMod,
                },
            }));
        });
    };
    return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_PresetsFooter__WEBPACK_IMPORTED_MODULE_0__["default"], { onSelect: handleClick, presets: presets });
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PresetsFooterComponent);


/***/ }),

/***/ "./assets/apps/customizer-controls/src/presets-selector/PresetsSelector.tsx":
/*!**********************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/presets-selector/PresetsSelector.tsx ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
/* jshint esversion: 6 */




const PresetsSelector = ({ presets, onSelect }) => {
    const [search, setSearch] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)('');
    /**
     * You can get the value in the console with this command:
     *
     * copy(HFG.getSettings());
     *
     * @return {*}
     */
    const filtered = presets.filter((preset) => preset.label.toLowerCase().includes(search.toLowerCase()));
    return (react__WEBPACK_IMPORTED_MODULE_3___default().createElement("div", { className: "solace-preset-selector" },
        react__WEBPACK_IMPORTED_MODULE_3___default().createElement("div", { className: "search" },
            react__WEBPACK_IMPORTED_MODULE_3___default().createElement("input", { type: "search", placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Search Header Presets…', 'solace'), onChange: (e) => {
                    setSearch(e.target.value);
                } })),
        filtered.length > 0 ? (filtered.map((preset, index) => {
            const { image, label, setup } = preset;
            return (react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Tooltip, { key: index, text: label },
                react__WEBPACK_IMPORTED_MODULE_3___default().createElement("button", { onClick: (e) => {
                        e.preventDefault();
                        onSelect(setup);
                    } },
                    react__WEBPACK_IMPORTED_MODULE_3___default().createElement("img", { src: image, alt: label }))));
        })) : (react__WEBPACK_IMPORTED_MODULE_3___default().createElement("p", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('No header presets found', 'solace')))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PresetsSelector);


/***/ }),

/***/ "./assets/apps/customizer-controls/src/presets-selector/PresetsSelectorComponent.tsx":
/*!*******************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/presets-selector/PresetsSelectorComponent.tsx ***!
  \*******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _PresetsSelector__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./PresetsSelector */ "./assets/apps/customizer-controls/src/presets-selector/PresetsSelector.tsx");
/* harmony import */ var _builder_common_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../builder/common/utils */ "./assets/apps/customizer-controls/src/builder/common/utils.ts");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
/* global CustomEvent */



const PresetsSelectorComponent = ({ control }) => {
    const { presets, builder } = control.params;
    const handleClick = (setup) => {
        const parsedSetup = (0,_builder_common_utils__WEBPACK_IMPORTED_MODULE_1__.maybeParseJson)(setup);
        Object.keys(parsedSetup).forEach((themeMod) => {
            if (themeMod === builder) {
                document.dispatchEvent(new CustomEvent('solace-changed-builder-value', {
                    detail: {
                        value: parsedSetup[themeMod],
                        id: 'header',
                    },
                }));
                return false;
            }
            const controlInstance = window.wp.customize.control(themeMod);
            if (!controlInstance)
                return false;
            const { type: controlType } = controlInstance.params;
            if (['text', 'textarea', 'select'].includes(controlType)) {
                controlInstance.setting.set(parsedSetup[themeMod]);
                return false;
            }
            document.dispatchEvent(new CustomEvent('solace-changed-customizer-value', {
                detail: {
                    value: parsedSetup[themeMod] || '',
                    id: themeMod,
                },
            }));
        });
    };
    return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_PresetsSelector__WEBPACK_IMPORTED_MODULE_0__["default"], { onSelect: handleClick, presets: presets });
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PresetsSelectorComponent);


/***/ }),

/***/ "./assets/apps/customizer-controls/src/skin-switcher/SkinSwitcher.tsx":
/*!****************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/skin-switcher/SkinSwitcher.tsx ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @solace-wp/components */ "@solace-wp/components");
/* harmony import */ var _solace_wp_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_solace_wp_components__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__);



// @ts-ignore


const SkinSwitcher = ({ control }) => {
    const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useState)(control.setting.get());
    const [changed, setChanged] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useState)(false);
    const [switching, setSwitching] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useState)(false);
    const [customizerSaved, setCustomizerSaved] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useState)(true);
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useEffect)(() => {
        window.wp.customize.bind('ready', () => {
            setCustomizerSaved(window.wp.customize.state('saved').get());
            window.wp.customize.state('saved').bind((status) => {
                setCustomizerSaved(status);
            });
        });
    }, []);
    const options = [
        {
            value: 'old',
            label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Legacy Skin', 'solace'),
        },
        {
            value: 'new',
            label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Solace 3.0', 'solace'),
        },
    ];
    const handleChange = (newVal) => {
        setValue(newVal);
        setChanged(true);
    };
    const handleSwitch = () => {
        setSwitching(true);
        setVal(control, value).then(() => {
            window.wp.customize.previewer.save().then(() => {
                window.wp.customize.notifications.add(new window.wp.customize.OverlayNotification('solace_switching_skin', {
                    message: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Switching skin', 'solace') + '...',
                    type: 'success',
                    loading: true,
                }));
                window.location.reload();
            });
        });
    };
    return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "solace-white-background-control" },
        react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_solace_wp_components__WEBPACK_IMPORTED_MODULE_3__.InlineSelect, { disabled: !customizerSaved, label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Style', 'solace'), onChange: handleChange, options: options, value: value }),
        react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.Button, { isPrimary: true, onClick: handleSwitch, disabled: !changed ||
                !customizerSaved ||
                control.setting.get() === value }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Switch Skin', 'solace')),
        !customizerSaved && !switching && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", { className: "description" }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Please save the current customizer settings before switching skins.')))));
};
const setVal = async (control, newVal) => {
    await control.setting.set(newVal);
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SkinSwitcher);


/***/ }),

/***/ "./assets/apps/customizer-controls/src/typography-font-pair/FontPairComponent.tsx":
/*!****************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/typography-font-pair/FontPairComponent.tsx ***!
  \****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _FontPairSelector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./FontPairSelector */ "./assets/apps/customizer-controls/src/typography-font-pair/FontPairSelector.tsx");


const FontPairComponent = ({ control }) => {
    const { pairs, description } = control.params.input_attrs;
    const handleClick = (preset) => {
        window.document.dispatchEvent(new window.CustomEvent('solace-changed-customizer-value', {
            detail: {
                value: preset.bodyFont,
                id: 'solace_body_font_family',
            },
        }));
        window.document.dispatchEvent(new window.CustomEvent('solace-changed-customizer-value', {
            detail: {
                value: preset.headingFont,
                id: 'solace_headings_font_family',
            },
        }));
    };
    return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_FontPairSelector__WEBPACK_IMPORTED_MODULE_1__["default"], { description: description, onSelect: handleClick, pairs: pairs }));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (FontPairComponent);


/***/ }),

/***/ "./assets/apps/customizer-controls/src/typography-font-pair/FontPairSelector.tsx":
/*!***************************************************************************************!*\
  !*** ./assets/apps/customizer-controls/src/typography-font-pair/FontPairSelector.tsx ***!
  \***************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__);
/* jshint esversion: 6 */




const FontPairSelector = ({ description, pairs, onSelect, }) => {
    const [selected, setSelected] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)(-1);
    const [prevBody, setPrevBody] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)({
        font: '',
        fontSource: 'System',
    });
    const [prevHead, setPrevHead] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)({
        font: '',
        fontSource: 'System',
    });
    const resetFonts = () => {
        window.document.dispatchEvent(new window.CustomEvent('solace-changed-customizer-value', {
            detail: {
                value: prevBody.font !== ''
                    ? prevBody
                    : { font: false, fontSource: 'System' },
                id: 'solace_body_font_family',
            },
        }));
        window.document.dispatchEvent(new window.CustomEvent('solace-changed-customizer-value', {
            detail: {
                value: prevHead.font !== ''
                    ? prevHead
                    : { font: false, fontSource: 'System' },
                id: 'solace_headings_font_family',
            },
        }));
    };
    const getFont = (font) => {
        const result = { font: '', fontSource: 'System' };
        if (!font) {
            return result;
        }
        // @ts-ignore
        const availableFonts = SolaceReactCustomize.fonts;
        Object.keys(availableFonts).map((key) => {
            const hasResults = availableFonts[key].filter((value) => {
                return value.toLowerCase().includes(font.toLowerCase());
            });
            if (hasResults.length > 0) {
                result.font = hasResults[0];
                result.fontSource = key;
            }
            return key;
        });
        return result;
    };
    const checkSelectedFont = () => {
        const bodyFont = window.wp.customize
            .control('solace_body_font_family')
            .setting.get();
        const headingFont = window.wp.customize
            .control('solace_headings_font_family')
            .setting.get();
        if (selected === -1) {
            const selectedBody = getFont(bodyFont);
            setPrevBody(selectedBody);
        }
        if (selected === -1) {
            const selectedHeading = getFont(headingFont);
            setPrevHead(selectedHeading);
        }
        return { bodyFont, headingFont };
    };
    const updateSelected = () => {
        window.wp.customize.bind('ready', () => {
            const { bodyFont, headingFont } = checkSelectedFont();
            const index = pairs.findIndex((item) => item.headingFont.font === headingFont &&
                item.bodyFont.font === bodyFont);
            setSelected(index);
        });
    };
    (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useEffect)(() => {
        updateSelected();
    }, []);
    return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "solace-font-pair-selector" },
        description && description.text && description.link && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "description", dangerouslySetInnerHTML: {
                __html: `${description.text} ${description.link}`,
            } })),
        pairs.length > 0
            ? pairs.map((preset, index) => {
                const { bodyFont, headingFont } = preset;
                const label = `${headingFont.font} & ${bodyFont.font}`;
                const headingStyle = {
                    fontFamily: `${headingFont.font}, sans-serif`,
                };
                const bodyStyle = {
                    fontFamily: `${bodyFont.font}, sans-serif`,
                };
                if (headingFont.previewSize) {
                    if (parseInt(headingFont.previewSize.replace('px', '')) > 27) {
                        headingStyle.textOverflow = 'ellipsis';
                    }
                    headingStyle.fontSize = headingFont.previewSize;
                }
                if (bodyFont.previewSize) {
                    if (parseInt(bodyFont.previewSize.replace('px', '')) > 24) {
                        bodyStyle.textOverflow = 'ellipsis';
                    }
                    bodyStyle.fontSize = bodyFont.previewSize;
                }
                return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Tooltip, { key: index, text: label },
                    react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { className: selected === index
                            ? 'active dashicons-before dashicons-yes'
                            : undefined, onClick: (e) => {
                            e.preventDefault();
                            // if already selected do a reset to default.
                            if (selected === index) {
                                resetFonts();
                                setSelected(-1);
                                return;
                            }
                            checkSelectedFont();
                            onSelect(preset);
                            setSelected(index);
                        } },
                        react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "solace-font-preview", style: headingStyle }, "The big brown fox"),
                        react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "solace-font-preview", style: bodyStyle }, "Jumps over the lazy dog"))));
            })
            : null,
        pairs.length > 0 && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { className: "reset", onClick: (e) => {
                e.preventDefault();
                resetFonts();
                setSelected(-1);
            } },
            react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "dashicons dashicons-image-rotate" }),
            (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Reset all to default', 'solace')))));
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (FontPairSelector);


/***/ }),

/***/ "react":
/*!************************!*\
  !*** external "React" ***!
  \************************/
/***/ ((module) => {

"use strict";
module.exports = window["React"];

/***/ }),

/***/ "react-dom":
/*!***************************!*\
  !*** external "ReactDOM" ***!
  \***************************/
/***/ ((module) => {

"use strict";
module.exports = window["ReactDOM"];

/***/ }),

/***/ "lodash":
/*!*************************!*\
  !*** external "lodash" ***!
  \*************************/
/***/ ((module) => {

"use strict";
module.exports = window["lodash"];

/***/ }),

/***/ "@wordpress/api-fetch":
/*!**********************************!*\
  !*** external ["wp","apiFetch"] ***!
  \**********************************/
/***/ ((module) => {

"use strict";
module.exports = window["wp"]["apiFetch"];

/***/ }),

/***/ "@wordpress/components":
/*!************************************!*\
  !*** external ["wp","components"] ***!
  \************************************/
/***/ ((module) => {

"use strict";
module.exports = window["wp"]["components"];

/***/ }),

/***/ "@wordpress/element":
/*!*********************************!*\
  !*** external ["wp","element"] ***!
  \*********************************/
/***/ ((module) => {

"use strict";
module.exports = window["wp"]["element"];

/***/ }),

/***/ "@wordpress/i18n":
/*!******************************!*\
  !*** external ["wp","i18n"] ***!
  \******************************/
/***/ ((module) => {

"use strict";
module.exports = window["wp"]["i18n"];

/***/ }),

/***/ "@wordpress/primitives":
/*!************************************!*\
  !*** external ["wp","primitives"] ***!
  \************************************/
/***/ ((module) => {

"use strict";
module.exports = window["wp"]["primitives"];

/***/ }),

/***/ "@solace-wp/components":
/*!*********************************************!*\
  !*** external ["wp","solace","components"] ***!
  \*********************************************/
/***/ ((module) => {

"use strict";
module.exports = window["wp"]["solace"]["components"];

/***/ }),

/***/ "./node_modules/classnames/index.js":
/*!******************************************!*\
  !*** ./node_modules/classnames/index.js ***!
  \******************************************/
/***/ ((module, exports) => {

var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
	Copyright (c) 2018 Jed Watson.
	Licensed under the MIT License (MIT), see
	http://jedwatson.github.io/classnames
*/
/* global define */

(function () {
	'use strict';

	var hasOwn = {}.hasOwnProperty;

	function classNames () {
		var classes = '';

		for (var i = 0; i < arguments.length; i++) {
			var arg = arguments[i];
			if (arg) {
				classes = appendClass(classes, parseValue(arg));
			}
		}

		return classes;
	}

	function parseValue (arg) {
		if (typeof arg === 'string' || typeof arg === 'number') {
			return arg;
		}

		if (typeof arg !== 'object') {
			return '';
		}

		if (Array.isArray(arg)) {
			return classNames.apply(null, arg);
		}

		if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
			return arg.toString();
		}

		var classes = '';

		for (var key in arg) {
			if (hasOwn.call(arg, key) && arg[key]) {
				classes = appendClass(classes, key);
			}
		}

		return classes;
	}

	function appendClass (value, newClass) {
		if (!newClass) {
			return value;
		}
	
		if (value) {
			return value + ' ' + newClass;
		}
	
		return value + newClass;
	}

	if ( true && module.exports) {
		classNames.default = classNames;
		module.exports = classNames;
	} else if (true) {
		// register as 'classnames', consistent with npm package name
		!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
			return classNames;
		}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
		__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
	} else {}
}());


/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/esm/extends.js":
/*!************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/esm/extends.js ***!
  \************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ _extends)
/* harmony export */ });
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);
}


/***/ })

/******/ 	});
/************************************************************************/
/******/ 	// The module cache
/******/ 	var __webpack_module_cache__ = {};
/******/ 	
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/ 		// Check if module is in cache
/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
/******/ 		if (cachedModule !== undefined) {
/******/ 			return cachedModule.exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = __webpack_module_cache__[moduleId] = {
/******/ 			// no module.id needed
/******/ 			// no module.loaded needed
/******/ 			exports: {}
/******/ 		};
/******/ 	
/******/ 		// Execute the module function
/******/ 		__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ 	
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/ 	
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = __webpack_modules__;
/******/ 	
/************************************************************************/
/******/ 	/* webpack/runtime/chunk loaded */
/******/ 	(() => {
/******/ 		var deferred = [];
/******/ 		__webpack_require__.O = (result, chunkIds, fn, priority) => {
/******/ 			if(chunkIds) {
/******/ 				priority = priority || 0;
/******/ 				for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
/******/ 				deferred[i] = [chunkIds, fn, priority];
/******/ 				return;
/******/ 			}
/******/ 			var notFulfilled = Infinity;
/******/ 			for (var i = 0; i < deferred.length; i++) {
/******/ 				var chunkIds = deferred[i][0];
/******/ 				var fn = deferred[i][1];
/******/ 				var priority = deferred[i][2];
/******/ 				var fulfilled = true;
/******/ 				for (var j = 0; j < chunkIds.length; j++) {
/******/ 					if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
/******/ 						chunkIds.splice(j--, 1);
/******/ 					} else {
/******/ 						fulfilled = false;
/******/ 						if(priority < notFulfilled) notFulfilled = priority;
/******/ 					}
/******/ 				}
/******/ 				if(fulfilled) {
/******/ 					deferred.splice(i--, 1)
/******/ 					var r = fn();
/******/ 					if (r !== undefined) result = r;
/******/ 				}
/******/ 			}
/******/ 			return result;
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/compat get default export */
/******/ 	(() => {
/******/ 		// getDefaultExport function for compatibility with non-harmony modules
/******/ 		__webpack_require__.n = (module) => {
/******/ 			var getter = module && module.__esModule ?
/******/ 				() => (module['default']) :
/******/ 				() => (module);
/******/ 			__webpack_require__.d(getter, { a: getter });
/******/ 			return getter;
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/define property getters */
/******/ 	(() => {
/******/ 		// define getter functions for harmony exports
/******/ 		__webpack_require__.d = (exports, definition) => {
/******/ 			for(var key in definition) {
/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ 				}
/******/ 			}
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/ensure chunk */
/******/ 	(() => {
/******/ 		__webpack_require__.f = {};
/******/ 		// This file contains only the entry chunk.
/******/ 		// The chunk loading function for additional chunks
/******/ 		__webpack_require__.e = (chunkId) => {
/******/ 			return Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {
/******/ 				__webpack_require__.f[key](chunkId, promises);
/******/ 				return promises;
/******/ 			}, []));
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/get javascript chunk filename */
/******/ 	(() => {
/******/ 		// This function allow to reference async chunks
/******/ 		__webpack_require__.u = (chunkId) => {
/******/ 			// return url for filenames not based on template
/******/ 			if (chunkId === "vendors-node_modules_wordpress_icons_build-module_library_close_js-node_modules_wordpress_ico-2c346b") return "818e2d8f5c89ab4f8b69.js";
/******/ 			if (chunkId === "assets_apps_customizer-controls_src_font-family_FontFamilySelector_js") return "ca29e9e505ec82e3d3ec.js";
/******/ 			if (chunkId === "order") return "16c88f5a2452054a8ff6.js";
/******/ 			if (chunkId === "assets_apps_customizer-controls_src_builder_components_Builder_tsx") return "a2a12cb4309e627d16de.js";
/******/ 			if (chunkId === "assets_apps_customizer-controls_src_builder_components_SidebarContent_tsx") return "1d5f9b8bdb24de0196b8.js";
/******/ 			if (chunkId === "assets_apps_customizer-controls_src_repeater_IconsContent_js") return "d4ed0e0bdd0de3b845ef.js";
/******/ 			if (chunkId === "assets_apps_customizer-controls_src_rich-text_RichText_js") return "14b55e7046b4f8e4c7e8.js";
/******/ 			// return url for filenames based on template
/******/ 			return undefined;
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/get mini-css chunk filename */
/******/ 	(() => {
/******/ 		// This function allow to reference async chunks
/******/ 		__webpack_require__.miniCssF = (chunkId) => {
/******/ 			// return url for filenames based on template
/******/ 			return undefined;
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/global */
/******/ 	(() => {
/******/ 		__webpack_require__.g = (function() {
/******/ 			if (typeof globalThis === 'object') return globalThis;
/******/ 			try {
/******/ 				return this || new Function('return this')();
/******/ 			} catch (e) {
/******/ 				if (typeof window === 'object') return window;
/******/ 			}
/******/ 		})();
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
/******/ 	(() => {
/******/ 		__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/load script */
/******/ 	(() => {
/******/ 		var inProgress = {};
/******/ 		var dataWebpackPrefix = "solace:";
/******/ 		// loadScript function to load a script via script tag
/******/ 		__webpack_require__.l = (url, done, key, chunkId) => {
/******/ 			if(inProgress[url]) { inProgress[url].push(done); return; }
/******/ 			var script, needAttach;
/******/ 			if(key !== undefined) {
/******/ 				var scripts = document.getElementsByTagName("script");
/******/ 				for(var i = 0; i < scripts.length; i++) {
/******/ 					var s = scripts[i];
/******/ 					if(s.getAttribute("src") == url || s.getAttribute("data-webpack") == dataWebpackPrefix + key) { script = s; break; }
/******/ 				}
/******/ 			}
/******/ 			if(!script) {
/******/ 				needAttach = true;
/******/ 				script = document.createElement('script');
/******/ 		
/******/ 				script.charset = 'utf-8';
/******/ 				script.timeout = 120;
/******/ 				if (__webpack_require__.nc) {
/******/ 					script.setAttribute("nonce", __webpack_require__.nc);
/******/ 				}
/******/ 				script.setAttribute("data-webpack", dataWebpackPrefix + key);
/******/ 		
/******/ 				script.src = url;
/******/ 			}
/******/ 			inProgress[url] = [done];
/******/ 			var onScriptComplete = (prev, event) => {
/******/ 				// avoid mem leaks in IE.
/******/ 				script.onerror = script.onload = null;
/******/ 				clearTimeout(timeout);
/******/ 				var doneFns = inProgress[url];
/******/ 				delete inProgress[url];
/******/ 				script.parentNode && script.parentNode.removeChild(script);
/******/ 				doneFns && doneFns.forEach((fn) => (fn(event)));
/******/ 				if(prev) return prev(event);
/******/ 			}
/******/ 			var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);
/******/ 			script.onerror = onScriptComplete.bind(null, script.onerror);
/******/ 			script.onload = onScriptComplete.bind(null, script.onload);
/******/ 			needAttach && document.head.appendChild(script);
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/make namespace object */
/******/ 	(() => {
/******/ 		// define __esModule on exports
/******/ 		__webpack_require__.r = (exports) => {
/******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 			}
/******/ 			Object.defineProperty(exports, '__esModule', { value: true });
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/publicPath */
/******/ 	(() => {
/******/ 		var scriptUrl;
/******/ 		if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + "";
/******/ 		var document = __webpack_require__.g.document;
/******/ 		if (!scriptUrl && document) {
/******/ 			if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')
/******/ 				scriptUrl = document.currentScript.src;
/******/ 			if (!scriptUrl) {
/******/ 				var scripts = document.getElementsByTagName("script");
/******/ 				if(scripts.length) {
/******/ 					var i = scripts.length - 1;
/******/ 					while (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;
/******/ 				}
/******/ 			}
/******/ 		}
/******/ 		// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration
/******/ 		// or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic.
/******/ 		if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser");
/******/ 		scriptUrl = scriptUrl.replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/");
/******/ 		__webpack_require__.p = scriptUrl;
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/jsonp chunk loading */
/******/ 	(() => {
/******/ 		// no baseURI
/******/ 		
/******/ 		// object to store loaded and loading chunks
/******/ 		// undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ 		// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
/******/ 		var installedChunks = {
/******/ 			"controls": 0,
/******/ 			"style-controls": 0
/******/ 		};
/******/ 		
/******/ 		__webpack_require__.f.j = (chunkId, promises) => {
/******/ 				// JSONP chunk loading for javascript
/******/ 				var installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;
/******/ 				if(installedChunkData !== 0) { // 0 means "already installed".
/******/ 		
/******/ 					// a Promise means "currently loading".
/******/ 					if(installedChunkData) {
/******/ 						promises.push(installedChunkData[2]);
/******/ 					} else {
/******/ 						if("style-controls" != chunkId) {
/******/ 							// setup Promise in chunk cache
/******/ 							var promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));
/******/ 							promises.push(installedChunkData[2] = promise);
/******/ 		
/******/ 							// start chunk loading
/******/ 							var url = __webpack_require__.p + __webpack_require__.u(chunkId);
/******/ 							// create error before stack unwound to get useful stacktrace later
/******/ 							var error = new Error();
/******/ 							var loadingEnded = (event) => {
/******/ 								if(__webpack_require__.o(installedChunks, chunkId)) {
/******/ 									installedChunkData = installedChunks[chunkId];
/******/ 									if(installedChunkData !== 0) installedChunks[chunkId] = undefined;
/******/ 									if(installedChunkData) {
/******/ 										var errorType = event && (event.type === 'load' ? 'missing' : event.type);
/******/ 										var realSrc = event && event.target && event.target.src;
/******/ 										error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')';
/******/ 										error.name = 'ChunkLoadError';
/******/ 										error.type = errorType;
/******/ 										error.request = realSrc;
/******/ 										installedChunkData[1](error);
/******/ 									}
/******/ 								}
/******/ 							};
/******/ 							__webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId);
/******/ 						} else installedChunks[chunkId] = 0;
/******/ 					}
/******/ 				}
/******/ 		};
/******/ 		
/******/ 		// no prefetching
/******/ 		
/******/ 		// no preloaded
/******/ 		
/******/ 		// no HMR
/******/ 		
/******/ 		// no HMR manifest
/******/ 		
/******/ 		__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
/******/ 		
/******/ 		// install a JSONP callback for chunk loading
/******/ 		var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
/******/ 			var chunkIds = data[0];
/******/ 			var moreModules = data[1];
/******/ 			var runtime = data[2];
/******/ 			// add "moreModules" to the modules object,
/******/ 			// then flag all "chunkIds" as loaded and fire callback
/******/ 			var moduleId, chunkId, i = 0;
/******/ 			if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
/******/ 				for(moduleId in moreModules) {
/******/ 					if(__webpack_require__.o(moreModules, moduleId)) {
/******/ 						__webpack_require__.m[moduleId] = moreModules[moduleId];
/******/ 					}
/******/ 				}
/******/ 				if(runtime) var result = runtime(__webpack_require__);
/******/ 			}
/******/ 			if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
/******/ 			for(;i < chunkIds.length; i++) {
/******/ 				chunkId = chunkIds[i];
/******/ 				if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
/******/ 					installedChunks[chunkId][0]();
/******/ 				}
/******/ 				installedChunks[chunkId] = 0;
/******/ 			}
/******/ 			return __webpack_require__.O(result);
/******/ 		}
/******/ 		
/******/ 		var chunkLoadingGlobal = self["webpackChunksolace"] = self["webpackChunksolace"] || [];
/******/ 		chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
/******/ 		chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
/******/ 	})();
/******/ 	
/************************************************************************/
/******/ 	
/******/ 	// startup
/******/ 	// Load entry module and return exports
/******/ 	// This entry module depends on other loaded chunks and execution need to be delayed
/******/ 	var __webpack_exports__ = __webpack_require__.O(undefined, ["style-controls"], () => (__webpack_require__("./assets/apps/customizer-controls/src/controls.js")))
/******/ 	__webpack_exports__ = __webpack_require__.O(__webpack_exports__);
/******/ 	
/******/ })()
;
//# sourceMappingURL=controls.js.map