this["wp"] = this["wp"] || {}; this["wp"]["blockLibrary"] = /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 439); /******/ }) /************************************************************************/ /******/ ({ /***/ 0: /***/ (function(module, exports) { (function() { module.exports = window["wp"]["element"]; }()); /***/ }), /***/ 1: /***/ (function(module, exports) { (function() { module.exports = window["wp"]["i18n"]; }()); /***/ }), /***/ 10: /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! Copyright (c) 2017 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) && arg.length) { var inner = classNames.apply(null, arg); if (inner) { classes.push(inner); } } else if (argType === 'object') { for (var key in arg) { if (hasOwn.call(arg, key) && arg[key]) { classes.push(key); } } } } 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 {} }()); /***/ }), /***/ 11: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _slicedToArray; }); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js var arrayWithHoles = __webpack_require__(38); // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js var unsupportedIterableToArray = __webpack_require__(31); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js var nonIterableRest = __webpack_require__(39); // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js function _slicedToArray(arr, i) { return Object(arrayWithHoles["a" /* default */])(arr) || _iterableToArrayLimit(arr, i) || Object(unsupportedIterableToArray["a" /* default */])(arr, i) || Object(nonIterableRest["a" /* default */])(); } /***/ }), /***/ 114: /***/ (function(module, exports) { (function() { module.exports = window["wp"]["viewport"]; }()); /***/ }), /***/ 115: /***/ (function(module, exports) { (function() { module.exports = window["wp"]["autop"]; }()); /***/ }), /***/ 117: /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! Copyright (c) 2017 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ /* global define */ (function () { 'use strict'; var classNames = (function () { // don't inherit from Object so we can skip hasOwnProperty check later // http://stackoverflow.com/questions/15518328/creating-js-object-with-object-createnull#answer-21079232 function StorageObject() {} StorageObject.prototype = Object.create(null); function _parseArray (resultSet, array) { var length = array.length; for (var i = 0; i < length; ++i) { _parse(resultSet, array[i]); } } var hasOwn = {}.hasOwnProperty; function _parseNumber (resultSet, num) { resultSet[num] = true; } function _parseObject (resultSet, object) { for (var k in object) { if (hasOwn.call(object, k)) { // set value to false instead of deleting it to avoid changing object structure // https://www.smashingmagazine.com/2012/11/writing-fast-memory-efficient-javascript/#de-referencing-misconceptions resultSet[k] = !!object[k]; } } } var SPACE = /\s+/; function _parseString (resultSet, str) { var array = str.split(SPACE); var length = array.length; for (var i = 0; i < length; ++i) { resultSet[array[i]] = true; } } function _parse (resultSet, arg) { if (!arg) return; var argType = typeof arg; // 'foo bar' if (argType === 'string') { _parseString(resultSet, arg); // ['foo', 'bar', ...] } else if (Array.isArray(arg)) { _parseArray(resultSet, arg); // { 'foo': true, ... } } else if (argType === 'object') { _parseObject(resultSet, arg); // '130' } else if (argType === 'number') { _parseNumber(resultSet, arg); } } function _classNames () { // don't leak arguments // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments var len = arguments.length; var args = Array(len); for (var i = 0; i < len; i++) { args[i] = arguments[i]; } var classSet = new StorageObject(); _parseArray(classSet, args); var list = []; for (var k in classSet) { if (classSet[k]) { list.push(k) } } return list.join(' '); } return _classNames; })(); 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 {} }()); /***/ }), /***/ 12: /***/ (function(module, exports) { (function() { module.exports = window["wp"]["compose"]; }()); /***/ }), /***/ 13: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutProperties; }); /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44); function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(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; } /***/ }), /***/ 135: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5); /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(13); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(0); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(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; } /** * WordPress dependencies */ /** @typedef {{icon: JSX.Element, size?: number} & import('@wordpress/primitives').SVGProps} IconProps */ /** * Return an SVG icon. * * @param {IconProps} props icon is the SVG component to render * size is a number specifiying the icon size in pixels * Other props will be passed to wrapped SVG component * * @return {JSX.Element} Icon component */ function Icon(_ref) { var icon = _ref.icon, _ref$size = _ref.size, size = _ref$size === void 0 ? 24 : _ref$size, props = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_ref, ["icon", "size"]); return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["cloneElement"])(icon, _objectSpread({ width: size, height: size }, props)); } /* harmony default export */ __webpack_exports__["a"] = (Icon); /***/ }), /***/ 14: /***/ (function(module, exports) { (function() { module.exports = window["React"]; }()); /***/ }), /***/ 146: /***/ (function(module, exports) { (function() { module.exports = window["wp"]["reusableBlocks"]; }()); /***/ }), /***/ 15: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _toConsumableArray; }); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js var arrayLikeToArray = __webpack_require__(24); // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return Object(arrayLikeToArray["a" /* default */])(arr); } // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js var iterableToArray = __webpack_require__(37); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js var unsupportedIterableToArray = __webpack_require__(31); // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js 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."); } // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || Object(iterableToArray["a" /* default */])(arr) || Object(unsupportedIterableToArray["a" /* default */])(arr) || _nonIterableSpread(); } /***/ }), /***/ 159: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); /* 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__(7); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ var closeSmall = Object(_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" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { d: "M13 11.9l3.3-3.4-1.1-1-3.2 3.3-3.2-3.3-1.1 1 3.3 3.4-3.5 3.6 1 1L12 13l3.5 3.5 1-1z" })); /* harmony default export */ __webpack_exports__["a"] = (closeSmall); /***/ }), /***/ 161: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); /* 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__(7); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ var check = Object(_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" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { d: "M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z" })); /* harmony default export */ __webpack_exports__["a"] = (check); /***/ }), /***/ 17: /***/ (function(module, exports) { (function() { module.exports = window["wp"]["keycodes"]; }()); /***/ }), /***/ 18: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _assertThisInitialized; }); function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } /***/ }), /***/ 19: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _getPrototypeOf; }); function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } /***/ }), /***/ 195: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); /* 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__(7); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ var link = Object(_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" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { d: "M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z" })); /* harmony default export */ __webpack_exports__["a"] = (link); /***/ }), /***/ 2: /***/ (function(module, exports) { (function() { module.exports = window["lodash"]; }()); /***/ }), /***/ 21: /***/ (function(module, exports) { (function() { module.exports = window["wp"]["richText"]; }()); /***/ }), /***/ 215: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); /* 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__(7); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ var search = Object(_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" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { d: "M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z" })); /* harmony default export */ __webpack_exports__["a"] = (search); /***/ }), /***/ 216: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); /* 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__(7); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ var chevronRight = Object(_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" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { d: "M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z" })); /* harmony default export */ __webpack_exports__["a"] = (chevronRight); /***/ }), /***/ 217: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); /* 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__(7); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ var chevronLeft = Object(_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" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { d: "M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z" })); /* harmony default export */ __webpack_exports__["a"] = (chevronLeft); /***/ }), /***/ 218: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); /* 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__(7); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ var keyboardReturn = Object(_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" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { d: "M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z" })); /* harmony default export */ __webpack_exports__["a"] = (keyboardReturn); /***/ }), /***/ 219: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); /* 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__(7); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ var upload = Object(_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" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { d: "M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z" })); /* harmony default export */ __webpack_exports__["a"] = (upload); /***/ }), /***/ 220: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); /* 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__(7); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ var textColor = Object(_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" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { d: "M13.23 15h1.9L11 4H9L5 15h1.88l1.07-3h4.18zm-1.53-4.54H8.51L10 5.6z" })); /* harmony default export */ __webpack_exports__["a"] = (textColor); /***/ }), /***/ 221: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); /* 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__(7); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ var linkOff = Object(_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" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { d: "M15.6 7.3h-.7l1.6-3.5-.9-.4-3.9 8.5H9v1.5h2l-1.3 2.8H8.4c-2 0-3.7-1.7-3.7-3.7s1.7-3.7 3.7-3.7H10V7.3H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H9l-1.4 3.2.9.4 5.7-12.5h1.4c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.9 0 5.2-2.3 5.2-5.2 0-2.9-2.4-5.2-5.2-5.2z" })); /* harmony default export */ __webpack_exports__["a"] = (linkOff); /***/ }), /***/ 24: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayLikeToArray; }); 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; } /***/ }), /***/ 25: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _classCallCheck; }); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } /***/ }), /***/ 26: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _createClass; }); function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } /***/ }), /***/ 270: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXTERNAL MODULE: external ["wp","element"] var external_wp_element_ = __webpack_require__(0); // EXTERNAL MODULE: external ["wp","primitives"] var external_wp_primitives_ = __webpack_require__(7); // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/pencil.js /** * WordPress dependencies */ var pencil = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z" })); /* harmony default export */ var library_pencil = (pencil); // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/edit.js /** * Internal dependencies */ /* harmony default export */ var edit = __webpack_exports__["a"] = (library_pencil); /***/ }), /***/ 276: /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(309); /***/ }), /***/ 277: /***/ (function(module, exports, __webpack_require__) { /*! Fast Average Color | © 2019 Denis Seleznev | MIT License | https://github.com/hcodes/fast-average-color/ */ (function (global, factory) { true ? module.exports = factory() : undefined; }(this, (function () { 'use strict'; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } var FastAverageColor = /*#__PURE__*/ function () { function FastAverageColor() { _classCallCheck(this, FastAverageColor); } _createClass(FastAverageColor, [{ key: "getColorAsync", /** * Get asynchronously the average color from not loaded image. * * @param {HTMLImageElement} resource * @param {Function} callback * @param {Object|null} [options] * @param {Array} [options.defaultColor=[255, 255, 255, 255]] * @param {*} [options.data] * @param {string} [options.mode="speed"] "precision" or "speed" * @param {string} [options.algorithm="sqrt"] "simple", "sqrt" or "dominant" * @param {number} [options.step=1] * @param {number} [options.left=0] * @param {number} [options.top=0] * @param {number} [options.width=width of resource] * @param {number} [options.height=height of resource] */ value: function getColorAsync(resource, callback, options) { if (resource.complete) { callback.call(resource, this.getColor(resource, options), options && options.data); } else { this._bindImageEvents(resource, callback, options); } } /** * Get the average color from images, videos and canvas. * * @param {HTMLImageElement|HTMLVideoElement|HTMLCanvasElement} resource * @param {Object|null} [options] * @param {Array} [options.defaultColor=[255, 255, 255, 255]] * @param {*} [options.data] * @param {string} [options.mode="speed"] "precision" or "speed" * @param {string} [options.algorithm="sqrt"] "simple", "sqrt" or "dominant" * @param {number} [options.step=1] * @param {number} [options.left=0] * @param {number} [options.top=0] * @param {number} [options.width=width of resource] * @param {number} [options.height=height of resource] * * @returns {Object} */ }, { key: "getColor", value: function getColor(resource, options) { options = options || {}; var defaultColor = this._getDefaultColor(options), originalSize = this._getOriginalSize(resource), size = this._prepareSizeAndPosition(originalSize, options); var error = null, value = defaultColor; if (!size.srcWidth || !size.srcHeight || !size.destWidth || !size.destHeight) { return this._prepareResult(defaultColor, new Error('FastAverageColor: Incorrect sizes.')); } if (!this._ctx) { this._canvas = this._makeCanvas(); this._ctx = this._canvas.getContext && this._canvas.getContext('2d'); if (!this._ctx) { return this._prepareResult(defaultColor, new Error('FastAverageColor: Canvas Context 2D is not supported in this browser.')); } } this._canvas.width = size.destWidth; this._canvas.height = size.destHeight; try { this._ctx.clearRect(0, 0, size.destWidth, size.destHeight); this._ctx.drawImage(resource, size.srcLeft, size.srcTop, size.srcWidth, size.srcHeight, 0, 0, size.destWidth, size.destHeight); var bitmapData = this._ctx.getImageData(0, 0, size.destWidth, size.destHeight).data; value = this.getColorFromArray4(bitmapData, options); } catch (e) { // Security error, CORS // https://developer.mozilla.org/en/docs/Web/HTML/CORS_enabled_image error = e; } return this._prepareResult(value, error); } /** * Get the average color from a array when 1 pixel is 4 bytes. * * @param {Array|Uint8Array} arr * @param {Object} [options] * @param {string} [options.algorithm="sqrt"] "simple", "sqrt" or "dominant" * @param {Array} [options.defaultColor=[255, 255, 255, 255]] * @param {number} [options.step=1] * * @returns {Array} [red (0-255), green (0-255), blue (0-255), alpha (0-255)] */ }, { key: "getColorFromArray4", value: function getColorFromArray4(arr, options) { options = options || {}; var bytesPerPixel = 4, arrLength = arr.length; if (arrLength < bytesPerPixel) { return this._getDefaultColor(options); } var len = arrLength - arrLength % bytesPerPixel, preparedStep = (options.step || 1) * bytesPerPixel, algorithm = '_' + (options.algorithm || 'sqrt') + 'Algorithm'; if (typeof this[algorithm] !== 'function') { throw new Error("FastAverageColor: ".concat(options.algorithm, " is unknown algorithm.")); } return this[algorithm](arr, len, preparedStep); } /** * Destroy the instance. */ }, { key: "destroy", value: function destroy() { delete this._canvas; delete this._ctx; } }, { key: "_getDefaultColor", value: function _getDefaultColor(options) { return this._getOption(options, 'defaultColor', [255, 255, 255, 255]); } }, { key: "_getOption", value: function _getOption(options, name, defaultValue) { return typeof options[name] === 'undefined' ? defaultValue : options[name]; } }, { key: "_prepareSizeAndPosition", value: function _prepareSizeAndPosition(originalSize, options) { var srcLeft = this._getOption(options, 'left', 0), srcTop = this._getOption(options, 'top', 0), srcWidth = this._getOption(options, 'width', originalSize.width), srcHeight = this._getOption(options, 'height', originalSize.height), destWidth = srcWidth, destHeight = srcHeight; if (options.mode === 'precision') { return { srcLeft: srcLeft, srcTop: srcTop, srcWidth: srcWidth, srcHeight: srcHeight, destWidth: destWidth, destHeight: destHeight }; } var maxSize = 100, minSize = 10; var factor; if (srcWidth > srcHeight) { factor = srcWidth / srcHeight; destWidth = maxSize; destHeight = Math.round(destWidth / factor); } else { factor = srcHeight / srcWidth; destHeight = maxSize; destWidth = Math.round(destHeight / factor); } if (destWidth > srcWidth || destHeight > srcHeight || destWidth < minSize || destHeight < minSize) { destWidth = srcWidth; destHeight = srcHeight; } return { srcLeft: srcLeft, srcTop: srcTop, srcWidth: srcWidth, srcHeight: srcHeight, destWidth: destWidth, destHeight: destHeight }; } }, { key: "_simpleAlgorithm", value: function _simpleAlgorithm(arr, len, preparedStep) { var redTotal = 0, greenTotal = 0, blueTotal = 0, alphaTotal = 0, count = 0; for (var i = 0; i < len; i += preparedStep) { var alpha = arr[i + 3], red = arr[i] * alpha, green = arr[i + 1] * alpha, blue = arr[i + 2] * alpha; redTotal += red; greenTotal += green; blueTotal += blue; alphaTotal += alpha; count++; } return alphaTotal ? [Math.round(redTotal / alphaTotal), Math.round(greenTotal / alphaTotal), Math.round(blueTotal / alphaTotal), Math.round(alphaTotal / count)] : [0, 0, 0, 0]; } }, { key: "_sqrtAlgorithm", value: function _sqrtAlgorithm(arr, len, preparedStep) { var redTotal = 0, greenTotal = 0, blueTotal = 0, alphaTotal = 0, count = 0; for (var i = 0; i < len; i += preparedStep) { var red = arr[i], green = arr[i + 1], blue = arr[i + 2], alpha = arr[i + 3]; redTotal += red * red * alpha; greenTotal += green * green * alpha; blueTotal += blue * blue * alpha; alphaTotal += alpha; count++; } return alphaTotal ? [Math.round(Math.sqrt(redTotal / alphaTotal)), Math.round(Math.sqrt(greenTotal / alphaTotal)), Math.round(Math.sqrt(blueTotal / alphaTotal)), Math.round(alphaTotal / count)] : [0, 0, 0, 0]; } }, { key: "_dominantAlgorithm", value: function _dominantAlgorithm(arr, len, preparedStep) { var colorHash = {}, divider = 24; for (var i = 0; i < len; i += preparedStep) { var red = arr[i], green = arr[i + 1], blue = arr[i + 2], alpha = arr[i + 3], key = Math.round(red / divider) + ',' + Math.round(green / divider) + ',' + Math.round(blue / divider); if (colorHash[key]) { colorHash[key] = [colorHash[key][0] + red * alpha, colorHash[key][1] + green * alpha, colorHash[key][2] + blue * alpha, colorHash[key][3] + alpha, colorHash[key][4] + 1]; } else { colorHash[key] = [red * alpha, green * alpha, blue * alpha, alpha, 1]; } } var buffer = Object.keys(colorHash).map(function (key) { return colorHash[key]; }).sort(function (a, b) { var countA = a[4], countB = b[4]; return countA > countB ? -1 : countA === countB ? 0 : 1; }); var _buffer$ = _slicedToArray(buffer[0], 5), redTotal = _buffer$[0], greenTotal = _buffer$[1], blueTotal = _buffer$[2], alphaTotal = _buffer$[3], count = _buffer$[4]; return alphaTotal ? [Math.round(redTotal / alphaTotal), Math.round(greenTotal / alphaTotal), Math.round(blueTotal / alphaTotal), Math.round(alphaTotal / count)] : [0, 0, 0, 0]; } }, { key: "_bindImageEvents", value: function _bindImageEvents(resource, callback, options) { var _this = this; options = options || {}; var data = options && options.data, defaultColor = this._getDefaultColor(options), onload = function onload() { unbindEvents(); callback.call(resource, _this.getColor(resource, options), data); }, onerror = function onerror() { unbindEvents(); callback.call(resource, _this._prepareResult(defaultColor, new Error('Image error')), data); }, onabort = function onabort() { unbindEvents(); callback.call(resource, _this._prepareResult(defaultColor, new Error('Image abort')), data); }, unbindEvents = function unbindEvents() { resource.removeEventListener('load', onload); resource.removeEventListener('error', onerror); resource.removeEventListener('abort', onabort); }; resource.addEventListener('load', onload); resource.addEventListener('error', onerror); resource.addEventListener('abort', onabort); } }, { key: "_prepareResult", value: function _prepareResult(value, error) { var rgb = value.slice(0, 3), rgba = [].concat(rgb, value[3] / 255), isDark = this._isDark(value); return { error: error, value: value, rgb: 'rgb(' + rgb.join(',') + ')', rgba: 'rgba(' + rgba.join(',') + ')', hex: this._arrayToHex(rgb), hexa: this._arrayToHex(value), isDark: isDark, isLight: !isDark }; } }, { key: "_getOriginalSize", value: function _getOriginalSize(resource) { if (resource instanceof HTMLImageElement) { return { width: resource.naturalWidth, height: resource.naturalHeight }; } if (resource instanceof HTMLVideoElement) { return { width: resource.videoWidth, height: resource.videoHeight }; } return { width: resource.width, height: resource.height }; } }, { key: "_toHex", value: function _toHex(num) { var str = num.toString(16); return str.length === 1 ? '0' + str : str; } }, { key: "_arrayToHex", value: function _arrayToHex(arr) { return '#' + arr.map(this._toHex).join(''); } }, { key: "_isDark", value: function _isDark(color) { // http://www.w3.org/TR/AERT#color-contrast var result = (color[0] * 299 + color[1] * 587 + color[2] * 114) / 1000; return result < 128; } }, { key: "_makeCanvas", value: function _makeCanvas() { return typeof window === 'undefined' ? new OffscreenCanvas(1, 1) : document.createElement('canvas'); } }]); return FastAverageColor; }(); return FastAverageColor; }))); /***/ }), /***/ 28: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _inherits; }); /* harmony import */ var _babel_runtime_helpers_esm_setPrototypeOf__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(52); function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) Object(_babel_runtime_helpers_esm_setPrototypeOf__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(subClass, superClass); } /***/ }), /***/ 29: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _possibleConstructorReturn; }); /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(42); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18); function _possibleConstructorReturn(self, call) { if (call && (Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(call) === "object" || typeof call === "function")) { return call; } return Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(self); } /***/ }), /***/ 3: /***/ (function(module, exports) { (function() { module.exports = window["wp"]["components"]; }()); /***/ }), /***/ 300: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); /* 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__(7); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ var alignLeft = Object(_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" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { d: "M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z" })); /* harmony default export */ __webpack_exports__["a"] = (alignLeft); /***/ }), /***/ 301: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); /* 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__(7); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ var alignCenter = Object(_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" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { d: "M16.4 4.2H7.6v1.5h8.9V4.2zM4 11.2v1.5h16v-1.5H4zm3.6 8.6h8.9v-1.5H7.6v1.5z" })); /* harmony default export */ __webpack_exports__["a"] = (alignCenter); /***/ }), /***/ 302: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); /* 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__(7); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ var alignRight = Object(_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" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { d: "M11.1 19.8H20v-1.5h-8.9v1.5zm0-15.6v1.5H20V4.2h-8.9zM4 12.8h16v-1.5H4v1.5z" })); /* harmony default export */ __webpack_exports__["a"] = (alignRight); /***/ }), /***/ 308: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); /* 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__(7); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ var media = Object(_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" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { d: "M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z" })); /* harmony default export */ __webpack_exports__["a"] = (media); /***/ }), /***/ 309: /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule normalizeWheel * @typechecks */ var UserAgent_DEPRECATED = __webpack_require__(310); var isEventSupported = __webpack_require__(311); // Reasonable defaults var PIXEL_STEP = 10; var LINE_HEIGHT = 40; var PAGE_HEIGHT = 800; /** * Mouse wheel (and 2-finger trackpad) support on the web sucks. It is * complicated, thus this doc is long and (hopefully) detailed enough to answer * your questions. * * If you need to react to the mouse wheel in a predictable way, this code is * like your bestest friend. * hugs * * * As of today, there are 4 DOM event types you can listen to: * * 'wheel' -- Chrome(31+), FF(17+), IE(9+) * 'mousewheel' -- Chrome, IE(6+), Opera, Safari * 'MozMousePixelScroll' -- FF(3.5 only!) (2010-2013) -- don't bother! * 'DOMMouseScroll' -- FF(0.9.7+) since 2003 * * So what to do? The is the best: * * normalizeWheel.getEventType(); * * In your event callback, use this code to get sane interpretation of the * deltas. This code will return an object with properties: * * spinX -- normalized spin speed (use for zoom) - x plane * spinY -- " - y plane * pixelX -- normalized distance (to pixels) - x plane * pixelY -- " - y plane * * Wheel values are provided by the browser assuming you are using the wheel to * scroll a web page by a number of lines or pixels (or pages). Values can vary * significantly on different platforms and browsers, forgetting that you can * scroll at different speeds. Some devices (like trackpads) emit more events * at smaller increments with fine granularity, and some emit massive jumps with * linear speed or acceleration. * * This code does its best to normalize the deltas for you: * * - spin is trying to normalize how far the wheel was spun (or trackpad * dragged). This is super useful for zoom support where you want to * throw away the chunky scroll steps on the PC and make those equal to * the slow and smooth tiny steps on the Mac. Key data: This code tries to * resolve a single slow step on a wheel to 1. * * - pixel is normalizing the desired scroll delta in pixel units. You'll * get the crazy differences between browsers, but at least it'll be in * pixels! * * - positive value indicates scrolling DOWN/RIGHT, negative UP/LEFT. This * should translate to positive value zooming IN, negative zooming OUT. * This matches the newer 'wheel' event. * * Why are there spinX, spinY (or pixels)? * * - spinX is a 2-finger side drag on the trackpad, and a shift + wheel turn * with a mouse. It results in side-scrolling in the browser by default. * * - spinY is what you expect -- it's the classic axis of a mouse wheel. * * - I dropped spinZ/pixelZ. It is supported by the DOM 3 'wheel' event and * probably is by browsers in conjunction with fancy 3D controllers .. but * you know. * * Implementation info: * * Examples of 'wheel' event if you scroll slowly (down) by one step with an * average mouse: * * OS X + Chrome (mouse) - 4 pixel delta (wheelDelta -120) * OS X + Safari (mouse) - N/A pixel delta (wheelDelta -12) * OS X + Firefox (mouse) - 0.1 line delta (wheelDelta N/A) * Win8 + Chrome (mouse) - 100 pixel delta (wheelDelta -120) * Win8 + Firefox (mouse) - 3 line delta (wheelDelta -120) * * On the trackpad: * * OS X + Chrome (trackpad) - 2 pixel delta (wheelDelta -6) * OS X + Firefox (trackpad) - 1 pixel delta (wheelDelta N/A) * * On other/older browsers.. it's more complicated as there can be multiple and * also missing delta values. * * The 'wheel' event is more standard: * * http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents * * The basics is that it includes a unit, deltaMode (pixels, lines, pages), and * deltaX, deltaY and deltaZ. Some browsers provide other values to maintain * backward compatibility with older events. Those other values help us * better normalize spin speed. Example of what the browsers provide: * * | event.wheelDelta | event.detail * ------------------+------------------+-------------- * Safari v5/OS X | -120 | 0 * Safari v5/Win7 | -120 | 0 * Chrome v17/OS X | -120 | 0 * Chrome v17/Win7 | -120 | 0 * IE9/Win7 | -120 | undefined * Firefox v4/OS X | undefined | 1 * Firefox v4/Win7 | undefined | 3 * */ function normalizeWheel(/*object*/ event) /*object*/ { var sX = 0, sY = 0, // spinX, spinY pX = 0, pY = 0; // pixelX, pixelY // Legacy if ('detail' in event) { sY = event.detail; } if ('wheelDelta' in event) { sY = -event.wheelDelta / 120; } if ('wheelDeltaY' in event) { sY = -event.wheelDeltaY / 120; } if ('wheelDeltaX' in event) { sX = -event.wheelDeltaX / 120; } // side scrolling on FF with DOMMouseScroll if ( 'axis' in event && event.axis === event.HORIZONTAL_AXIS ) { sX = sY; sY = 0; } pX = sX * PIXEL_STEP; pY = sY * PIXEL_STEP; if ('deltaY' in event) { pY = event.deltaY; } if ('deltaX' in event) { pX = event.deltaX; } if ((pX || pY) && event.deltaMode) { if (event.deltaMode == 1) { // delta in LINE units pX *= LINE_HEIGHT; pY *= LINE_HEIGHT; } else { // delta in PAGE units pX *= PAGE_HEIGHT; pY *= PAGE_HEIGHT; } } // Fall-back if spin cannot be determined if (pX && !sX) { sX = (pX < 1) ? -1 : 1; } if (pY && !sY) { sY = (pY < 1) ? -1 : 1; } return { spinX : sX, spinY : sY, pixelX : pX, pixelY : pY }; } /** * The best combination if you prefer spinX + spinY normalization. It favors * the older DOMMouseScroll for Firefox, as FF does not include wheelDelta with * 'wheel' event, making spin speed determination impossible. */ normalizeWheel.getEventType = function() /*string*/ { return (UserAgent_DEPRECATED.firefox()) ? 'DOMMouseScroll' : (isEventSupported('wheel')) ? 'wheel' : 'mousewheel'; }; module.exports = normalizeWheel; /***/ }), /***/ 31: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _unsupportedIterableToArray; }); /* harmony import */ var _babel_runtime_helpers_esm_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(24); function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return Object(_babel_runtime_helpers_esm_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(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 Object(_babel_runtime_helpers_esm_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen); } /***/ }), /***/ 310: /***/ (function(module, exports) { /** * Copyright 2004-present Facebook. All Rights Reserved. * * @providesModule UserAgent_DEPRECATED */ /** * Provides entirely client-side User Agent and OS detection. You should prefer * the non-deprecated UserAgent module when possible, which exposes our * authoritative server-side PHP-based detection to the client. * * Usage is straightforward: * * if (UserAgent_DEPRECATED.ie()) { * // IE * } * * You can also do version checks: * * if (UserAgent_DEPRECATED.ie() >= 7) { * // IE7 or better * } * * The browser functions will return NaN if the browser does not match, so * you can also do version compares the other way: * * if (UserAgent_DEPRECATED.ie() < 7) { * // IE6 or worse * } * * Note that the version is a float and may include a minor version number, * so you should always use range operators to perform comparisons, not * strict equality. * * **Note:** You should **strongly** prefer capability detection to browser * version detection where it's reasonable: * * http://www.quirksmode.org/js/support.html * * Further, we have a large number of mature wrapper functions and classes * which abstract away many browser irregularities. Check the documentation, * grep for things, or ask on javascript@lists.facebook.com before writing yet * another copy of "event || window.event". * */ var _populated = false; // Browsers var _ie, _firefox, _opera, _webkit, _chrome; // Actual IE browser for compatibility mode var _ie_real_version; // Platforms var _osx, _windows, _linux, _android; // Architectures var _win64; // Devices var _iphone, _ipad, _native; var _mobile; function _populate() { if (_populated) { return; } _populated = true; // To work around buggy JS libraries that can't handle multi-digit // version numbers, Opera 10's user agent string claims it's Opera // 9, then later includes a Version/X.Y field: // // Opera/9.80 (foo) Presto/2.2.15 Version/10.10 var uas = navigator.userAgent; var agent = /(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(uas); var os = /(Mac OS X)|(Windows)|(Linux)/.exec(uas); _iphone = /\b(iPhone|iP[ao]d)/.exec(uas); _ipad = /\b(iP[ao]d)/.exec(uas); _android = /Android/i.exec(uas); _native = /FBAN\/\w+;/i.exec(uas); _mobile = /Mobile/i.exec(uas); // Note that the IE team blog would have you believe you should be checking // for 'Win64; x64'. But MSDN then reveals that you can actually be coming // from either x64 or ia64; so ultimately, you should just check for Win64 // as in indicator of whether you're in 64-bit IE. 32-bit IE on 64-bit // Windows will send 'WOW64' instead. _win64 = !!(/Win64/.exec(uas)); if (agent) { _ie = agent[1] ? parseFloat(agent[1]) : ( agent[5] ? parseFloat(agent[5]) : NaN); // IE compatibility mode if (_ie && document && document.documentMode) { _ie = document.documentMode; } // grab the "true" ie version from the trident token if available var trident = /(?:Trident\/(\d+.\d+))/.exec(uas); _ie_real_version = trident ? parseFloat(trident[1]) + 4 : _ie; _firefox = agent[2] ? parseFloat(agent[2]) : NaN; _opera = agent[3] ? parseFloat(agent[3]) : NaN; _webkit = agent[4] ? parseFloat(agent[4]) : NaN; if (_webkit) { // We do not add the regexp to the above test, because it will always // match 'safari' only since 'AppleWebKit' appears before 'Chrome' in // the userAgent string. agent = /(?:Chrome\/(\d+\.\d+))/.exec(uas); _chrome = agent && agent[1] ? parseFloat(agent[1]) : NaN; } else { _chrome = NaN; } } else { _ie = _firefox = _opera = _chrome = _webkit = NaN; } if (os) { if (os[1]) { // Detect OS X version. If no version number matches, set _osx to true. // Version examples: 10, 10_6_1, 10.7 // Parses version number as a float, taking only first two sets of // digits. If only one set of digits is found, returns just the major // version number. var ver = /(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(uas); _osx = ver ? parseFloat(ver[1].replace('_', '.')) : true; } else { _osx = false; } _windows = !!os[2]; _linux = !!os[3]; } else { _osx = _windows = _linux = false; } } var UserAgent_DEPRECATED = { /** * Check if the UA is Internet Explorer. * * * @return float|NaN Version number (if match) or NaN. */ ie: function() { return _populate() || _ie; }, /** * Check if we're in Internet Explorer compatibility mode. * * @return bool true if in compatibility mode, false if * not compatibility mode or not ie */ ieCompatibilityMode: function() { return _populate() || (_ie_real_version > _ie); }, /** * Whether the browser is 64-bit IE. Really, this is kind of weak sauce; we * only need this because Skype can't handle 64-bit IE yet. We need to remove * this when we don't need it -- tracked by #601957. */ ie64: function() { return UserAgent_DEPRECATED.ie() && _win64; }, /** * Check if the UA is Firefox. * * * @return float|NaN Version number (if match) or NaN. */ firefox: function() { return _populate() || _firefox; }, /** * Check if the UA is Opera. * * * @return float|NaN Version number (if match) or NaN. */ opera: function() { return _populate() || _opera; }, /** * Check if the UA is WebKit. * * * @return float|NaN Version number (if match) or NaN. */ webkit: function() { return _populate() || _webkit; }, /** * For Push * WILL BE REMOVED VERY SOON. Use UserAgent_DEPRECATED.webkit */ safari: function() { return UserAgent_DEPRECATED.webkit(); }, /** * Check if the UA is a Chrome browser. * * * @return float|NaN Version number (if match) or NaN. */ chrome : function() { return _populate() || _chrome; }, /** * Check if the user is running Windows. * * @return bool `true' if the user's OS is Windows. */ windows: function() { return _populate() || _windows; }, /** * Check if the user is running Mac OS X. * * @return float|bool Returns a float if a version number is detected, * otherwise true/false. */ osx: function() { return _populate() || _osx; }, /** * Check if the user is running Linux. * * @return bool `true' if the user's OS is some flavor of Linux. */ linux: function() { return _populate() || _linux; }, /** * Check if the user is running on an iPhone or iPod platform. * * @return bool `true' if the user is running some flavor of the * iPhone OS. */ iphone: function() { return _populate() || _iphone; }, mobile: function() { return _populate() || (_iphone || _ipad || _android || _mobile); }, nativeApp: function() { // webviews inside of the native apps return _populate() || _native; }, android: function() { return _populate() || _android; }, ipad: function() { return _populate() || _ipad; } }; module.exports = UserAgent_DEPRECATED; /***/ }), /***/ 311: /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule isEventSupported */ var ExecutionEnvironment = __webpack_require__(312); var useHasFeature; if (ExecutionEnvironment.canUseDOM) { useHasFeature = document.implementation && document.implementation.hasFeature && // always returns true in newer browsers as per the standard. // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature document.implementation.hasFeature('', '') !== true; } /** * Checks if an event is supported in the current execution environment. * * NOTE: This will not work correctly for non-generic events such as `change`, * `reset`, `load`, `error`, and `select`. * * Borrows from Modernizr. * * @param {string} eventNameSuffix Event name, e.g. "click". * @param {?boolean} capture Check if the capture phase is supported. * @return {boolean} True if the event is supported. * @internal * @license Modernizr 3.0.0pre (Custom Build) | MIT */ function isEventSupported(eventNameSuffix, capture) { if (!ExecutionEnvironment.canUseDOM || capture && !('addEventListener' in document)) { return false; } var eventName = 'on' + eventNameSuffix; var isSupported = eventName in document; if (!isSupported) { var element = document.createElement('div'); element.setAttribute(eventName, 'return;'); isSupported = typeof element[eventName] === 'function'; } if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') { // This is the only way to test support for the `wheel` event in IE9+. isSupported = document.implementation.hasFeature('Events.wheel', '3.0'); } return isSupported; } module.exports = isEventSupported; /***/ }), /***/ 312: /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule ExecutionEnvironment */ /*jslint evil: true */ var canUseDOM = !!( typeof window !== 'undefined' && window.document && window.document.createElement ); /** * Simple, lightweight module assisting with the detection and context of * Worker. Helps avoid circular dependencies and allows code to reason about * whether or not they are in a Worker, even if they never include the main * `ReactWorker` dependency. */ var ExecutionEnvironment = { canUseDOM: canUseDOM, canUseWorkers: typeof Worker !== 'undefined', canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent), canUseViewport: canUseDOM && !!window.screen, isInWorker: !canUseDOM // For now, this is true - might change in the future. }; module.exports = ExecutionEnvironment; /***/ }), /***/ 313: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); /* 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__(7); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ var button = Object(_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" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { d: "M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 13h8v-1.5H8V13z" })); /* harmony default export */ __webpack_exports__["a"] = (button); /***/ }), /***/ 314: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); /* 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__(7); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ var code = Object(_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" }, Object(_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 */ __webpack_exports__["a"] = (code); /***/ }), /***/ 32: /***/ (function(module, exports) { (function() { module.exports = window["wp"]["url"]; }()); /***/ }), /***/ 33: /***/ (function(module, exports) { (function() { module.exports = window["wp"]["hooks"]; }()); /***/ }), /***/ 35: /***/ (function(module, exports) { (function() { module.exports = window["wp"]["deprecated"]; }()); /***/ }), /***/ 37: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterableToArray; }); function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } /***/ }), /***/ 38: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayWithHoles; }); function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } /***/ }), /***/ 39: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _nonIterableRest; }); function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } /***/ }), /***/ 4: /***/ (function(module, exports) { (function() { module.exports = window["wp"]["data"]; }()); /***/ }), /***/ 42: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _typeof; }); function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } /***/ }), /***/ 43: /***/ (function(module, exports) { (function() { module.exports = window["wp"]["blob"]; }()); /***/ }), /***/ 439: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, "__experimentalGetCoreBlocks", function() { return /* binding */ build_module_experimentalGetCoreBlocks; }); __webpack_require__.d(__webpack_exports__, "registerCoreBlocks", function() { return /* binding */ build_module_registerCoreBlocks; }); __webpack_require__.d(__webpack_exports__, "__experimentalRegisterExperimentalCoreBlocks", function() { return /* binding */ __experimentalRegisterExperimentalCoreBlocks; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/paragraph/index.js var build_module_paragraph_namespaceObject = {}; __webpack_require__.r(build_module_paragraph_namespaceObject); __webpack_require__.d(build_module_paragraph_namespaceObject, "metadata", function() { return paragraph_metadata; }); __webpack_require__.d(build_module_paragraph_namespaceObject, "name", function() { return paragraph_name; }); __webpack_require__.d(build_module_paragraph_namespaceObject, "settings", function() { return paragraph_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/image/index.js var build_module_image_namespaceObject = {}; __webpack_require__.r(build_module_image_namespaceObject); __webpack_require__.d(build_module_image_namespaceObject, "metadata", function() { return image_metadata; }); __webpack_require__.d(build_module_image_namespaceObject, "name", function() { return image_name; }); __webpack_require__.d(build_module_image_namespaceObject, "settings", function() { return image_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/heading/index.js var build_module_heading_namespaceObject = {}; __webpack_require__.r(build_module_heading_namespaceObject); __webpack_require__.d(build_module_heading_namespaceObject, "metadata", function() { return heading_metadata; }); __webpack_require__.d(build_module_heading_namespaceObject, "name", function() { return heading_name; }); __webpack_require__.d(build_module_heading_namespaceObject, "settings", function() { return heading_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/quote/index.js var build_module_quote_namespaceObject = {}; __webpack_require__.r(build_module_quote_namespaceObject); __webpack_require__.d(build_module_quote_namespaceObject, "metadata", function() { return quote_metadata; }); __webpack_require__.d(build_module_quote_namespaceObject, "name", function() { return quote_name; }); __webpack_require__.d(build_module_quote_namespaceObject, "settings", function() { return quote_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/gallery/index.js var build_module_gallery_namespaceObject = {}; __webpack_require__.r(build_module_gallery_namespaceObject); __webpack_require__.d(build_module_gallery_namespaceObject, "metadata", function() { return gallery_metadata; }); __webpack_require__.d(build_module_gallery_namespaceObject, "name", function() { return gallery_name; }); __webpack_require__.d(build_module_gallery_namespaceObject, "settings", function() { return gallery_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/archives/index.js var archives_namespaceObject = {}; __webpack_require__.r(archives_namespaceObject); __webpack_require__.d(archives_namespaceObject, "metadata", function() { return archives_metadata; }); __webpack_require__.d(archives_namespaceObject, "name", function() { return archives_name; }); __webpack_require__.d(archives_namespaceObject, "settings", function() { return archives_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/audio/index.js var build_module_audio_namespaceObject = {}; __webpack_require__.r(build_module_audio_namespaceObject); __webpack_require__.d(build_module_audio_namespaceObject, "metadata", function() { return audio_metadata; }); __webpack_require__.d(build_module_audio_namespaceObject, "name", function() { return audio_name; }); __webpack_require__.d(build_module_audio_namespaceObject, "settings", function() { return audio_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/button/index.js var button_namespaceObject = {}; __webpack_require__.r(button_namespaceObject); __webpack_require__.d(button_namespaceObject, "metadata", function() { return button_metadata; }); __webpack_require__.d(button_namespaceObject, "name", function() { return button_name; }); __webpack_require__.d(button_namespaceObject, "settings", function() { return button_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/buttons/index.js var buttons_namespaceObject = {}; __webpack_require__.r(buttons_namespaceObject); __webpack_require__.d(buttons_namespaceObject, "metadata", function() { return buttons_metadata; }); __webpack_require__.d(buttons_namespaceObject, "name", function() { return buttons_name; }); __webpack_require__.d(buttons_namespaceObject, "settings", function() { return buttons_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/calendar/index.js var build_module_calendar_namespaceObject = {}; __webpack_require__.r(build_module_calendar_namespaceObject); __webpack_require__.d(build_module_calendar_namespaceObject, "metadata", function() { return calendar_metadata; }); __webpack_require__.d(build_module_calendar_namespaceObject, "name", function() { return calendar_name; }); __webpack_require__.d(build_module_calendar_namespaceObject, "settings", function() { return calendar_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/categories/index.js var categories_namespaceObject = {}; __webpack_require__.r(categories_namespaceObject); __webpack_require__.d(categories_namespaceObject, "metadata", function() { return categories_metadata; }); __webpack_require__.d(categories_namespaceObject, "name", function() { return categories_name; }); __webpack_require__.d(categories_namespaceObject, "settings", function() { return categories_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/code/index.js var code_namespaceObject = {}; __webpack_require__.r(code_namespaceObject); __webpack_require__.d(code_namespaceObject, "metadata", function() { return code_metadata; }); __webpack_require__.d(code_namespaceObject, "name", function() { return code_name; }); __webpack_require__.d(code_namespaceObject, "settings", function() { return code_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/columns/index.js var build_module_columns_namespaceObject = {}; __webpack_require__.r(build_module_columns_namespaceObject); __webpack_require__.d(build_module_columns_namespaceObject, "metadata", function() { return columns_metadata; }); __webpack_require__.d(build_module_columns_namespaceObject, "name", function() { return columns_name; }); __webpack_require__.d(build_module_columns_namespaceObject, "settings", function() { return columns_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/column/index.js var build_module_column_namespaceObject = {}; __webpack_require__.r(build_module_column_namespaceObject); __webpack_require__.d(build_module_column_namespaceObject, "metadata", function() { return column_metadata; }); __webpack_require__.d(build_module_column_namespaceObject, "name", function() { return column_name; }); __webpack_require__.d(build_module_column_namespaceObject, "settings", function() { return column_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/cover/index.js var build_module_cover_namespaceObject = {}; __webpack_require__.r(build_module_cover_namespaceObject); __webpack_require__.d(build_module_cover_namespaceObject, "metadata", function() { return cover_metadata; }); __webpack_require__.d(build_module_cover_namespaceObject, "name", function() { return cover_name; }); __webpack_require__.d(build_module_cover_namespaceObject, "settings", function() { return cover_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/embed/index.js var embed_namespaceObject = {}; __webpack_require__.r(embed_namespaceObject); __webpack_require__.d(embed_namespaceObject, "metadata", function() { return embed_metadata; }); __webpack_require__.d(embed_namespaceObject, "name", function() { return embed_name; }); __webpack_require__.d(embed_namespaceObject, "settings", function() { return embed_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/file/index.js var build_module_file_namespaceObject = {}; __webpack_require__.r(build_module_file_namespaceObject); __webpack_require__.d(build_module_file_namespaceObject, "metadata", function() { return file_metadata; }); __webpack_require__.d(build_module_file_namespaceObject, "name", function() { return file_name; }); __webpack_require__.d(build_module_file_namespaceObject, "settings", function() { return file_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/html/index.js var build_module_html_namespaceObject = {}; __webpack_require__.r(build_module_html_namespaceObject); __webpack_require__.d(build_module_html_namespaceObject, "metadata", function() { return html_metadata; }); __webpack_require__.d(build_module_html_namespaceObject, "name", function() { return html_name; }); __webpack_require__.d(build_module_html_namespaceObject, "settings", function() { return html_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/media-text/index.js var media_text_namespaceObject = {}; __webpack_require__.r(media_text_namespaceObject); __webpack_require__.d(media_text_namespaceObject, "metadata", function() { return media_text_metadata; }); __webpack_require__.d(media_text_namespaceObject, "name", function() { return media_text_name; }); __webpack_require__.d(media_text_namespaceObject, "settings", function() { return media_text_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/latest-comments/index.js var latest_comments_namespaceObject = {}; __webpack_require__.r(latest_comments_namespaceObject); __webpack_require__.d(latest_comments_namespaceObject, "metadata", function() { return latest_comments_metadata; }); __webpack_require__.d(latest_comments_namespaceObject, "name", function() { return latest_comments_name; }); __webpack_require__.d(latest_comments_namespaceObject, "settings", function() { return latest_comments_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/latest-posts/index.js var latest_posts_namespaceObject = {}; __webpack_require__.r(latest_posts_namespaceObject); __webpack_require__.d(latest_posts_namespaceObject, "metadata", function() { return latest_posts_metadata; }); __webpack_require__.d(latest_posts_namespaceObject, "name", function() { return latest_posts_name; }); __webpack_require__.d(latest_posts_namespaceObject, "settings", function() { return latest_posts_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/list/index.js var build_module_list_namespaceObject = {}; __webpack_require__.r(build_module_list_namespaceObject); __webpack_require__.d(build_module_list_namespaceObject, "metadata", function() { return list_metadata; }); __webpack_require__.d(build_module_list_namespaceObject, "name", function() { return list_name; }); __webpack_require__.d(build_module_list_namespaceObject, "settings", function() { return list_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/missing/index.js var missing_namespaceObject = {}; __webpack_require__.r(missing_namespaceObject); __webpack_require__.d(missing_namespaceObject, "metadata", function() { return missing_metadata; }); __webpack_require__.d(missing_namespaceObject, "name", function() { return missing_name; }); __webpack_require__.d(missing_namespaceObject, "settings", function() { return missing_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/more/index.js var build_module_more_namespaceObject = {}; __webpack_require__.r(build_module_more_namespaceObject); __webpack_require__.d(build_module_more_namespaceObject, "metadata", function() { return more_metadata; }); __webpack_require__.d(build_module_more_namespaceObject, "name", function() { return more_name; }); __webpack_require__.d(build_module_more_namespaceObject, "settings", function() { return more_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/nextpage/index.js var nextpage_namespaceObject = {}; __webpack_require__.r(nextpage_namespaceObject); __webpack_require__.d(nextpage_namespaceObject, "metadata", function() { return nextpage_metadata; }); __webpack_require__.d(nextpage_namespaceObject, "name", function() { return nextpage_name; }); __webpack_require__.d(nextpage_namespaceObject, "settings", function() { return nextpage_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/preformatted/index.js var build_module_preformatted_namespaceObject = {}; __webpack_require__.r(build_module_preformatted_namespaceObject); __webpack_require__.d(build_module_preformatted_namespaceObject, "metadata", function() { return preformatted_metadata; }); __webpack_require__.d(build_module_preformatted_namespaceObject, "name", function() { return preformatted_name; }); __webpack_require__.d(build_module_preformatted_namespaceObject, "settings", function() { return preformatted_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/pullquote/index.js var build_module_pullquote_namespaceObject = {}; __webpack_require__.r(build_module_pullquote_namespaceObject); __webpack_require__.d(build_module_pullquote_namespaceObject, "metadata", function() { return pullquote_metadata; }); __webpack_require__.d(build_module_pullquote_namespaceObject, "name", function() { return pullquote_name; }); __webpack_require__.d(build_module_pullquote_namespaceObject, "settings", function() { return pullquote_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/block/index.js var block_namespaceObject = {}; __webpack_require__.r(block_namespaceObject); __webpack_require__.d(block_namespaceObject, "metadata", function() { return block_metadata; }); __webpack_require__.d(block_namespaceObject, "name", function() { return block_name; }); __webpack_require__.d(block_namespaceObject, "settings", function() { return block_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/rss/index.js var build_module_rss_namespaceObject = {}; __webpack_require__.r(build_module_rss_namespaceObject); __webpack_require__.d(build_module_rss_namespaceObject, "metadata", function() { return rss_metadata; }); __webpack_require__.d(build_module_rss_namespaceObject, "name", function() { return rss_name; }); __webpack_require__.d(build_module_rss_namespaceObject, "settings", function() { return rss_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/search/index.js var search_namespaceObject = {}; __webpack_require__.r(search_namespaceObject); __webpack_require__.d(search_namespaceObject, "metadata", function() { return search_metadata; }); __webpack_require__.d(search_namespaceObject, "name", function() { return search_name; }); __webpack_require__.d(search_namespaceObject, "settings", function() { return search_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/group/index.js var build_module_group_namespaceObject = {}; __webpack_require__.r(build_module_group_namespaceObject); __webpack_require__.d(build_module_group_namespaceObject, "metadata", function() { return group_metadata; }); __webpack_require__.d(build_module_group_namespaceObject, "name", function() { return group_name; }); __webpack_require__.d(build_module_group_namespaceObject, "settings", function() { return group_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/separator/index.js var build_module_separator_namespaceObject = {}; __webpack_require__.r(build_module_separator_namespaceObject); __webpack_require__.d(build_module_separator_namespaceObject, "metadata", function() { return separator_metadata; }); __webpack_require__.d(build_module_separator_namespaceObject, "name", function() { return separator_name; }); __webpack_require__.d(build_module_separator_namespaceObject, "settings", function() { return build_module_separator_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/shortcode/index.js var build_module_shortcode_namespaceObject = {}; __webpack_require__.r(build_module_shortcode_namespaceObject); __webpack_require__.d(build_module_shortcode_namespaceObject, "metadata", function() { return shortcode_metadata; }); __webpack_require__.d(build_module_shortcode_namespaceObject, "name", function() { return shortcode_name; }); __webpack_require__.d(build_module_shortcode_namespaceObject, "settings", function() { return shortcode_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/spacer/index.js var spacer_namespaceObject = {}; __webpack_require__.r(spacer_namespaceObject); __webpack_require__.d(spacer_namespaceObject, "metadata", function() { return spacer_metadata; }); __webpack_require__.d(spacer_namespaceObject, "name", function() { return spacer_name; }); __webpack_require__.d(spacer_namespaceObject, "settings", function() { return spacer_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/subhead/index.js var subhead_namespaceObject = {}; __webpack_require__.r(subhead_namespaceObject); __webpack_require__.d(subhead_namespaceObject, "metadata", function() { return subhead_metadata; }); __webpack_require__.d(subhead_namespaceObject, "name", function() { return subhead_name; }); __webpack_require__.d(subhead_namespaceObject, "settings", function() { return subhead_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/table/index.js var build_module_table_namespaceObject = {}; __webpack_require__.r(build_module_table_namespaceObject); __webpack_require__.d(build_module_table_namespaceObject, "metadata", function() { return table_metadata; }); __webpack_require__.d(build_module_table_namespaceObject, "name", function() { return table_name; }); __webpack_require__.d(build_module_table_namespaceObject, "settings", function() { return table_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/text-columns/index.js var text_columns_namespaceObject = {}; __webpack_require__.r(text_columns_namespaceObject); __webpack_require__.d(text_columns_namespaceObject, "metadata", function() { return text_columns_metadata; }); __webpack_require__.d(text_columns_namespaceObject, "name", function() { return text_columns_name; }); __webpack_require__.d(text_columns_namespaceObject, "settings", function() { return text_columns_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/verse/index.js var build_module_verse_namespaceObject = {}; __webpack_require__.r(build_module_verse_namespaceObject); __webpack_require__.d(build_module_verse_namespaceObject, "metadata", function() { return verse_metadata; }); __webpack_require__.d(build_module_verse_namespaceObject, "name", function() { return verse_name; }); __webpack_require__.d(build_module_verse_namespaceObject, "settings", function() { return verse_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/video/index.js var build_module_video_namespaceObject = {}; __webpack_require__.r(build_module_video_namespaceObject); __webpack_require__.d(build_module_video_namespaceObject, "metadata", function() { return video_metadata; }); __webpack_require__.d(build_module_video_namespaceObject, "name", function() { return video_name; }); __webpack_require__.d(build_module_video_namespaceObject, "settings", function() { return video_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/tag-cloud/index.js var tag_cloud_namespaceObject = {}; __webpack_require__.r(tag_cloud_namespaceObject); __webpack_require__.d(tag_cloud_namespaceObject, "metadata", function() { return tag_cloud_metadata; }); __webpack_require__.d(tag_cloud_namespaceObject, "name", function() { return tag_cloud_name; }); __webpack_require__.d(tag_cloud_namespaceObject, "settings", function() { return tag_cloud_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/freeform/index.js var freeform_namespaceObject = {}; __webpack_require__.r(freeform_namespaceObject); __webpack_require__.d(freeform_namespaceObject, "metadata", function() { return freeform_metadata; }); __webpack_require__.d(freeform_namespaceObject, "name", function() { return freeform_name; }); __webpack_require__.d(freeform_namespaceObject, "settings", function() { return freeform_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/social-links/index.js var social_links_namespaceObject = {}; __webpack_require__.r(social_links_namespaceObject); __webpack_require__.d(social_links_namespaceObject, "metadata", function() { return social_links_metadata; }); __webpack_require__.d(social_links_namespaceObject, "name", function() { return social_links_name; }); __webpack_require__.d(social_links_namespaceObject, "settings", function() { return social_links_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/social-link/index.js var social_link_namespaceObject = {}; __webpack_require__.r(social_link_namespaceObject); __webpack_require__.d(social_link_namespaceObject, "metadata", function() { return social_link_metadata; }); __webpack_require__.d(social_link_namespaceObject, "name", function() { return social_link_name; }); __webpack_require__.d(social_link_namespaceObject, "settings", function() { return social_link_settings; }); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules var toConsumableArray = __webpack_require__(15); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js var defineProperty = __webpack_require__(5); // EXTERNAL MODULE: external ["wp","coreData"] var external_wp_coreData_ = __webpack_require__(57); // EXTERNAL MODULE: external ["wp","blockEditor"] var external_wp_blockEditor_ = __webpack_require__(6); // EXTERNAL MODULE: external ["wp","blocks"] var external_wp_blocks_ = __webpack_require__(9); // EXTERNAL MODULE: external "lodash" var external_lodash_ = __webpack_require__(2); // EXTERNAL MODULE: external ["wp","i18n"] var external_wp_i18n_ = __webpack_require__(1); // EXTERNAL MODULE: external ["wp","element"] var external_wp_element_ = __webpack_require__(0); // EXTERNAL MODULE: external ["wp","primitives"] var external_wp_primitives_ = __webpack_require__(7); // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/paragraph.js /** * WordPress dependencies */ var paragraph = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M18.3 4H9.9v-.1l-.9.2c-2.3.4-4 2.4-4 4.8s1.7 4.4 4 4.8l.7.1V20h1.5V5.5h2.9V20h1.5V5.5h2.7V4z" })); /* harmony default export */ var library_paragraph = (paragraph); // EXTERNAL MODULE: ./node_modules/classnames/index.js var classnames = __webpack_require__(10); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/paragraph/deprecated.js function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(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; } /** * External dependencies */ /** * WordPress dependencies */ var supports = { className: false }; var deprecated_blockAttributes = { align: { type: 'string' }, content: { type: 'string', source: 'html', selector: 'p', default: '' }, dropCap: { type: 'boolean', default: false }, placeholder: { type: 'string' }, textColor: { type: 'string' }, backgroundColor: { type: 'string' }, fontSize: { type: 'string' }, direction: { type: 'string', enum: ['ltr', 'rtl'] }, style: { type: 'object' } }; var deprecated_migrateCustomColorsAndFontSizes = function migrateCustomColorsAndFontSizes(attributes) { if (!attributes.customTextColor && !attributes.customBackgroundColor && !attributes.customFontSize) { return attributes; } var style = {}; if (attributes.customTextColor || attributes.customBackgroundColor) { style.color = {}; } if (attributes.customTextColor) { style.color.text = attributes.customTextColor; } if (attributes.customBackgroundColor) { style.color.background = attributes.customBackgroundColor; } if (attributes.customFontSize) { style.typography = { fontSize: attributes.customFontSize }; } return _objectSpread(_objectSpread({}, Object(external_lodash_["omit"])(attributes, ['customTextColor', 'customBackgroundColor', 'customFontSize'])), {}, { style: style }); }; var deprecated = [{ supports: supports, attributes: _objectSpread(_objectSpread({}, Object(external_lodash_["omit"])(deprecated_blockAttributes, ['style'])), {}, { customTextColor: { type: 'string' }, customBackgroundColor: { type: 'string' }, customFontSize: { type: 'number' } }), migrate: deprecated_migrateCustomColorsAndFontSizes, save: function save(_ref) { var _classnames; var attributes = _ref.attributes; var align = attributes.align, content = attributes.content, dropCap = attributes.dropCap, backgroundColor = attributes.backgroundColor, textColor = attributes.textColor, customBackgroundColor = attributes.customBackgroundColor, customTextColor = attributes.customTextColor, fontSize = attributes.fontSize, customFontSize = attributes.customFontSize, direction = attributes.direction; var textClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor); var backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor); var fontSizeClass = Object(external_wp_blockEditor_["getFontSizeClass"])(fontSize); var className = classnames_default()((_classnames = { 'has-text-color': textColor || customTextColor, 'has-background': backgroundColor || customBackgroundColor, 'has-drop-cap': dropCap }, Object(defineProperty["a" /* default */])(_classnames, "has-text-align-".concat(align), align), Object(defineProperty["a" /* default */])(_classnames, fontSizeClass, fontSizeClass), Object(defineProperty["a" /* default */])(_classnames, textClass, textClass), Object(defineProperty["a" /* default */])(_classnames, backgroundClass, backgroundClass), _classnames)); var styles = { backgroundColor: backgroundClass ? undefined : customBackgroundColor, color: textClass ? undefined : customTextColor, fontSize: fontSizeClass ? undefined : customFontSize }; return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "p", style: styles, className: className ? className : undefined, value: content, dir: direction }); } }, { supports: supports, attributes: _objectSpread(_objectSpread({}, Object(external_lodash_["omit"])(deprecated_blockAttributes, ['style'])), {}, { customTextColor: { type: 'string' }, customBackgroundColor: { type: 'string' }, customFontSize: { type: 'number' } }), migrate: deprecated_migrateCustomColorsAndFontSizes, save: function save(_ref2) { var _classnames2; var attributes = _ref2.attributes; var align = attributes.align, content = attributes.content, dropCap = attributes.dropCap, backgroundColor = attributes.backgroundColor, textColor = attributes.textColor, customBackgroundColor = attributes.customBackgroundColor, customTextColor = attributes.customTextColor, fontSize = attributes.fontSize, customFontSize = attributes.customFontSize, direction = attributes.direction; var textClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor); var backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor); var fontSizeClass = Object(external_wp_blockEditor_["getFontSizeClass"])(fontSize); var className = classnames_default()((_classnames2 = { 'has-text-color': textColor || customTextColor, 'has-background': backgroundColor || customBackgroundColor, 'has-drop-cap': dropCap }, Object(defineProperty["a" /* default */])(_classnames2, fontSizeClass, fontSizeClass), Object(defineProperty["a" /* default */])(_classnames2, textClass, textClass), Object(defineProperty["a" /* default */])(_classnames2, backgroundClass, backgroundClass), _classnames2)); var styles = { backgroundColor: backgroundClass ? undefined : customBackgroundColor, color: textClass ? undefined : customTextColor, fontSize: fontSizeClass ? undefined : customFontSize, textAlign: align }; return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "p", style: styles, className: className ? className : undefined, value: content, dir: direction }); } }, { supports: supports, attributes: _objectSpread(_objectSpread({}, Object(external_lodash_["omit"])(deprecated_blockAttributes, ['style'])), {}, { customTextColor: { type: 'string' }, customBackgroundColor: { type: 'string' }, customFontSize: { type: 'number' }, width: { type: 'string' } }), migrate: deprecated_migrateCustomColorsAndFontSizes, save: function save(_ref3) { var _classnames3; var attributes = _ref3.attributes; var width = attributes.width, align = attributes.align, content = attributes.content, dropCap = attributes.dropCap, backgroundColor = attributes.backgroundColor, textColor = attributes.textColor, customBackgroundColor = attributes.customBackgroundColor, customTextColor = attributes.customTextColor, fontSize = attributes.fontSize, customFontSize = attributes.customFontSize; var textClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor); var backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor); var fontSizeClass = fontSize && "is-".concat(fontSize, "-text"); var className = classnames_default()((_classnames3 = {}, Object(defineProperty["a" /* default */])(_classnames3, "align".concat(width), width), Object(defineProperty["a" /* default */])(_classnames3, 'has-background', backgroundColor || customBackgroundColor), Object(defineProperty["a" /* default */])(_classnames3, 'has-drop-cap', dropCap), Object(defineProperty["a" /* default */])(_classnames3, fontSizeClass, fontSizeClass), Object(defineProperty["a" /* default */])(_classnames3, textClass, textClass), Object(defineProperty["a" /* default */])(_classnames3, backgroundClass, backgroundClass), _classnames3)); var styles = { backgroundColor: backgroundClass ? undefined : customBackgroundColor, color: textClass ? undefined : customTextColor, fontSize: fontSizeClass ? undefined : customFontSize, textAlign: align }; return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "p", style: styles, className: className ? className : undefined, value: content }); } }, { supports: supports, attributes: Object(external_lodash_["omit"])(_objectSpread(_objectSpread({}, deprecated_blockAttributes), {}, { fontSize: { type: 'number' } }), ['style']), save: function save(_ref4) { var _classnames4; var attributes = _ref4.attributes; var width = attributes.width, align = attributes.align, content = attributes.content, dropCap = attributes.dropCap, backgroundColor = attributes.backgroundColor, textColor = attributes.textColor, fontSize = attributes.fontSize; var className = classnames_default()((_classnames4 = {}, Object(defineProperty["a" /* default */])(_classnames4, "align".concat(width), width), Object(defineProperty["a" /* default */])(_classnames4, 'has-background', backgroundColor), Object(defineProperty["a" /* default */])(_classnames4, 'has-drop-cap', dropCap), _classnames4)); var styles = { backgroundColor: backgroundColor, color: textColor, fontSize: fontSize, textAlign: align }; return Object(external_wp_element_["createElement"])("p", { style: styles, className: className ? className : undefined }, content); }, migrate: function migrate(attributes) { return deprecated_migrateCustomColorsAndFontSizes(Object(external_lodash_["omit"])(_objectSpread(_objectSpread({}, attributes), {}, { customFontSize: Object(external_lodash_["isFinite"])(attributes.fontSize) ? attributes.fontSize : undefined, customTextColor: attributes.textColor && '#' === attributes.textColor[0] ? attributes.textColor : undefined, customBackgroundColor: attributes.backgroundColor && '#' === attributes.backgroundColor[0] ? attributes.backgroundColor : undefined })), ['fontSize', 'textColor', 'backgroundColor', 'style']); } }, { supports: supports, attributes: _objectSpread(_objectSpread({}, deprecated_blockAttributes), {}, { content: { type: 'string', source: 'html', default: '' } }), save: function save(_ref5) { var attributes = _ref5.attributes; return Object(external_wp_element_["createElement"])(external_wp_element_["RawHTML"], null, attributes.content); }, migrate: function migrate(attributes) { return attributes; } }]; /* harmony default export */ var paragraph_deprecated = (deprecated); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js var esm_extends = __webpack_require__(8); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules var slicedToArray = __webpack_require__(11); // EXTERNAL MODULE: external ["wp","components"] var external_wp_components_ = __webpack_require__(3); // EXTERNAL MODULE: external ["wp","data"] var external_wp_data_ = __webpack_require__(4); // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-ltr.js /** * WordPress dependencies */ var formatLtr = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "-2 -2 24 24" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M5.52 2h7.43c.55 0 1 .45 1 1s-.45 1-1 1h-1v13c0 .55-.45 1-1 1s-1-.45-1-1V5c0-.55-.45-1-1-1s-1 .45-1 1v12c0 .55-.45 1-1 1s-1-.45-1-1v-5.96h-.43C3.02 11.04 1 9.02 1 6.52S3.02 2 5.52 2zM14 14l5-4-5-4v8z" })); /* harmony default export */ var format_ltr = (formatLtr); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/paragraph/edit.js function edit_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 edit_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { edit_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { edit_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } /** * External dependencies */ /** * WordPress dependencies */ function getComputedStyle(node, pseudo) { return node.ownerDocument.defaultView.getComputedStyle(node, pseudo); } var edit_name = 'core/paragraph'; function ParagraphRTLToolbar(_ref) { var direction = _ref.direction, setDirection = _ref.setDirection; return Object(external_wp_i18n_["isRTL"])() && Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], { controls: [{ icon: format_ltr, title: Object(external_wp_i18n_["_x"])('Left to right', 'editor button'), isActive: direction === 'ltr', onClick: function onClick() { setDirection(direction === 'ltr' ? undefined : 'ltr'); } }] }); } function useDropCapMinHeight(ref, isDisabled, dependencies) { var _useState = Object(external_wp_element_["useState"])(), _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2), minHeight = _useState2[0], setMinHeight = _useState2[1]; Object(external_wp_element_["useEffect"])(function () { if (isDisabled) { setMinHeight(); return; } setMinHeight(getComputedStyle(ref.current, 'first-letter').lineHeight); }, [isDisabled].concat(Object(toConsumableArray["a" /* default */])(dependencies))); return minHeight; } function ParagraphBlock(_ref2) { var attributes = _ref2.attributes, mergeBlocks = _ref2.mergeBlocks, onReplace = _ref2.onReplace, onRemove = _ref2.onRemove, setAttributes = _ref2.setAttributes; var align = attributes.align, content = attributes.content, direction = attributes.direction, dropCap = attributes.dropCap, placeholder = attributes.placeholder, fontSize = attributes.fontSize, style = attributes.style; var isDropCapFeatureEnabled = Object(external_wp_blockEditor_["__experimentalUseEditorFeature"])('typography.dropCap'); var ref = Object(external_wp_element_["useRef"])(); var inlineFontSize = style === null || style === void 0 ? void 0 : style.fontSize; var size = Object(external_wp_data_["useSelect"])(function (select) { var _select$getSettings = select('core/block-editor').getSettings(), fontSizes = _select$getSettings.fontSizes; return Object(external_wp_blockEditor_["getFontSize"])(fontSizes, fontSize, inlineFontSize).size; }, [fontSize, inlineFontSize]); var hasDropCap = isDropCapFeatureEnabled && dropCap; var minHeight = useDropCapMinHeight(ref, !hasDropCap, [size]); var blockProps = Object(external_wp_blockEditor_["useBlockProps"])({ ref: ref, className: classnames_default()(Object(defineProperty["a" /* default */])({ 'has-drop-cap': dropCap }, "has-text-align-".concat(align), align)), style: { direction: direction, minHeight: minHeight } }); return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["AlignmentToolbar"], { value: align, onChange: function onChange(newAlign) { return setAttributes({ align: newAlign }); } }), Object(external_wp_element_["createElement"])(ParagraphRTLToolbar, { direction: direction, setDirection: function setDirection(newDirection) { return setAttributes({ direction: newDirection }); } })), isDropCapFeatureEnabled && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], { title: Object(external_wp_i18n_["__"])('Text settings') }, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { label: Object(external_wp_i18n_["__"])('Drop cap'), checked: !!dropCap, onChange: function onChange() { return setAttributes({ dropCap: !dropCap }); }, help: dropCap ? Object(external_wp_i18n_["__"])('Showing large initial letter.') : Object(external_wp_i18n_["__"])('Toggle to show a large initial letter.') }))), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], Object(esm_extends["a" /* default */])({ identifier: "content", tagName: "p" }, blockProps, { value: content, onChange: function onChange(newContent) { return setAttributes({ content: newContent }); }, onSplit: function onSplit(value) { if (!value) { return Object(external_wp_blocks_["createBlock"])(edit_name); } return Object(external_wp_blocks_["createBlock"])(edit_name, edit_objectSpread(edit_objectSpread({}, attributes), {}, { content: value })); }, onMerge: mergeBlocks, onReplace: onReplace, onRemove: onRemove, "aria-label": content ? Object(external_wp_i18n_["__"])('Paragraph block') : Object(external_wp_i18n_["__"])('Empty block; start writing or type forward slash to choose a block'), placeholder: placeholder || Object(external_wp_i18n_["__"])('Start writing or type / to choose a block'), __unstableEmbedURLOnPaste: true, __unstableAllowPrefixTransformations: true }))); } /* harmony default export */ var edit = (ParagraphBlock); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/paragraph/save.js /** * External dependencies */ /** * WordPress dependencies */ function save_save(_ref) { var attributes = _ref.attributes; var align = attributes.align, content = attributes.content, dropCap = attributes.dropCap, direction = attributes.direction; var className = classnames_default()(Object(defineProperty["a" /* default */])({ 'has-drop-cap': dropCap }, "has-text-align-".concat(align), align)); return Object(external_wp_element_["createElement"])("p", external_wp_blockEditor_["useBlockProps"].save({ className: className, dir: direction }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { value: content })); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/paragraph/transforms.js /** * WordPress dependencies */ /** * Internal dependencies */ var _apiVersion$name$cate = { apiVersion: 2, name: "core/paragraph", category: "text", attributes: { align: { type: "string" }, content: { type: "string", source: "html", selector: "p", "default": "" }, dropCap: { type: "boolean", "default": false }, placeholder: { type: "string" }, direction: { type: "string", "enum": ["ltr", "rtl"] } }, supports: { anchor: true, className: false, color: { link: true }, fontSize: true, lineHeight: true, __experimentalSelector: "p", __unstablePasteTextInline: true }, editorStyle: "wp-block-paragraph-editor", style: "wp-block-paragraph" }, transforms_name = _apiVersion$name$cate.name; var transforms = { from: [{ type: 'raw', // Paragraph is a fallback and should be matched last. priority: 20, selector: 'p', schema: function schema(_ref) { var phrasingContentSchema = _ref.phrasingContentSchema, isPaste = _ref.isPaste; return { p: { children: phrasingContentSchema, attributes: isPaste ? [] : ['style', 'id'] } }; }, transform: function transform(node) { var attributes = Object(external_wp_blocks_["getBlockAttributes"])(transforms_name, node.outerHTML); var _ref2 = node.style || {}, textAlign = _ref2.textAlign; if (textAlign === 'left' || textAlign === 'center' || textAlign === 'right') { attributes.align = textAlign; } return Object(external_wp_blocks_["createBlock"])(transforms_name, attributes); } }] }; /* harmony default export */ var paragraph_transforms = (transforms); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/paragraph/index.js /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ var paragraph_metadata = { apiVersion: 2, name: "core/paragraph", category: "text", attributes: { align: { type: "string" }, content: { type: "string", source: "html", selector: "p", "default": "" }, dropCap: { type: "boolean", "default": false }, placeholder: { type: "string" }, direction: { type: "string", "enum": ["ltr", "rtl"] } }, supports: { anchor: true, className: false, color: { link: true }, fontSize: true, lineHeight: true, __experimentalSelector: "p", __unstablePasteTextInline: true }, editorStyle: "wp-block-paragraph-editor", style: "wp-block-paragraph" }; var paragraph_name = paragraph_metadata.name; var paragraph_settings = { title: Object(external_wp_i18n_["_x"])('Paragraph', 'block title'), description: Object(external_wp_i18n_["__"])('Start with the building block of all narrative.'), icon: library_paragraph, keywords: [Object(external_wp_i18n_["__"])('text')], example: { attributes: { content: Object(external_wp_i18n_["__"])('In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing.'), style: { typography: { fontSize: 28 } }, dropCap: true } }, __experimentalLabel: function __experimentalLabel(attributes, _ref) { var context = _ref.context; if (context === 'accessibility') { var content = attributes.content; return Object(external_lodash_["isEmpty"])(content) ? Object(external_wp_i18n_["__"])('Empty') : content; } }, transforms: paragraph_transforms, deprecated: paragraph_deprecated, merge: function merge(attributes, attributesToMerge) { return { content: (attributes.content || '') + (attributesToMerge.content || '') }; }, edit: edit, save: save_save }; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/image.js /** * WordPress dependencies */ var image_image = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z" })); /* harmony default export */ var library_image = (image_image); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/deprecated.js /** * External dependencies */ /** * WordPress dependencies */ var image_deprecated_blockAttributes = { align: { type: 'string' }, url: { type: 'string', source: 'attribute', selector: 'img', attribute: 'src' }, alt: { type: 'string', source: 'attribute', selector: 'img', attribute: 'alt', default: '' }, caption: { type: 'string', source: 'html', selector: 'figcaption' }, href: { type: 'string', source: 'attribute', selector: 'figure > a', attribute: 'href' }, rel: { type: 'string', source: 'attribute', selector: 'figure > a', attribute: 'rel' }, linkClass: { type: 'string', source: 'attribute', selector: 'figure > a', attribute: 'class' }, id: { type: 'number' }, width: { type: 'number' }, height: { type: 'number' }, linkDestination: { type: 'string' }, linkTarget: { type: 'string', source: 'attribute', selector: 'figure > a', attribute: 'target' } }; var deprecated_deprecated = [{ attributes: image_deprecated_blockAttributes, save: function save(_ref) { var _classnames; var attributes = _ref.attributes; var url = attributes.url, alt = attributes.alt, caption = attributes.caption, align = attributes.align, href = attributes.href, width = attributes.width, height = attributes.height, id = attributes.id; var classes = classnames_default()((_classnames = {}, Object(defineProperty["a" /* default */])(_classnames, "align".concat(align), align), Object(defineProperty["a" /* default */])(_classnames, 'is-resized', width || height), _classnames)); var image = Object(external_wp_element_["createElement"])("img", { src: url, alt: alt, className: id ? "wp-image-".concat(id) : null, width: width, height: height }); return Object(external_wp_element_["createElement"])("figure", { className: classes }, href ? Object(external_wp_element_["createElement"])("a", { href: href }, image) : image, !external_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "figcaption", value: caption })); } }, { attributes: image_deprecated_blockAttributes, save: function save(_ref2) { var attributes = _ref2.attributes; var url = attributes.url, alt = attributes.alt, caption = attributes.caption, align = attributes.align, href = attributes.href, width = attributes.width, height = attributes.height, id = attributes.id; var image = Object(external_wp_element_["createElement"])("img", { src: url, alt: alt, className: id ? "wp-image-".concat(id) : null, width: width, height: height }); return Object(external_wp_element_["createElement"])("figure", { className: align ? "align".concat(align) : null }, href ? Object(external_wp_element_["createElement"])("a", { href: href }, image) : image, !external_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "figcaption", value: caption })); } }, { attributes: image_deprecated_blockAttributes, save: function save(_ref3) { var attributes = _ref3.attributes; var url = attributes.url, alt = attributes.alt, caption = attributes.caption, align = attributes.align, href = attributes.href, width = attributes.width, height = attributes.height; var extraImageProps = width || height ? { width: width, height: height } : {}; var image = Object(external_wp_element_["createElement"])("img", Object(esm_extends["a" /* default */])({ src: url, alt: alt }, extraImageProps)); var figureStyle = {}; if (width) { figureStyle = { width: width }; } else if (align === 'left' || align === 'right') { figureStyle = { maxWidth: '50%' }; } return Object(external_wp_element_["createElement"])("figure", { className: align ? "align".concat(align) : null, style: figureStyle }, href ? Object(external_wp_element_["createElement"])("a", { href: href }, image) : image, !external_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "figcaption", value: caption })); } }]; /* harmony default export */ var image_deprecated = (deprecated_deprecated); // EXTERNAL MODULE: external ["wp","blob"] var external_wp_blob_ = __webpack_require__(43); // EXTERNAL MODULE: external ["wp","compose"] var external_wp_compose_ = __webpack_require__(12); // EXTERNAL MODULE: external ["wp","url"] var external_wp_url_ = __webpack_require__(32); // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/crop.js /** * WordPress dependencies */ var crop_crop = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M17.5 7v8H19V7c0-1.1-.9-2-2-2H9v1.5h8c.3 0 .5.2.5.5zM7 17.5c-.3 0-.5-.2-.5-.5V1H5v4H1v1.5h4V17c0 1.1.9 2 2 2h10.5v4H19v-4h4v-1.5H7z" })); /* harmony default export */ var library_crop = (crop_crop); // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/upload.js var upload = __webpack_require__(219); // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/text-color.js var text_color = __webpack_require__(220); // EXTERNAL MODULE: external ["wp","notices"] var external_wp_notices_ = __webpack_require__(51); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/constants.js var ASPECT_RATIOS = [// Common video resolutions. { ratio: '2.33', className: 'wp-embed-aspect-21-9' }, { ratio: '2.00', className: 'wp-embed-aspect-18-9' }, { ratio: '1.78', className: 'wp-embed-aspect-16-9' }, { ratio: '1.33', className: 'wp-embed-aspect-4-3' }, // Vertical video and instagram square video support. { ratio: '1.00', className: 'wp-embed-aspect-1-1' }, { ratio: '0.56', className: 'wp-embed-aspect-9-16' }, { ratio: '0.50', className: 'wp-embed-aspect-1-2' }]; var WP_EMBED_TYPE = 'wp-embed'; // EXTERNAL MODULE: ./node_modules/classnames/dedupe.js var dedupe = __webpack_require__(117); var dedupe_default = /*#__PURE__*/__webpack_require__.n(dedupe); // EXTERNAL MODULE: ./node_modules/memize/index.js var memize = __webpack_require__(71); var memize_default = /*#__PURE__*/__webpack_require__.n(memize); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/util.js function util_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 util_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { util_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { util_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } /** * Internal dependencies */ /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ var util_metadata = { apiVersion: 2, name: "core/embed", category: "embed", attributes: { url: { type: "string" }, caption: { type: "string", source: "html", selector: "figcaption" }, type: { type: "string" }, providerNameSlug: { type: "string" }, allowResponsive: { type: "boolean", "default": true }, responsive: { type: "boolean", "default": false }, previewable: { type: "boolean", "default": true } }, supports: { align: true }, editorStyle: "wp-block-embed-editor", style: "wp-block-embed" }; var DEFAULT_EMBED_BLOCK = util_metadata.name; /** @typedef {import('@wordpress/blocks').WPBlockVariation} WPBlockVariation */ /** * Returns the embed block's information by matching the provided service provider * * @param {string} provider The embed block's provider * @return {WPBlockVariation} The embed block's information */ var util_getEmbedInfoByProvider = function getEmbedInfoByProvider(provider) { var _getBlockVariations; return (_getBlockVariations = Object(external_wp_blocks_["getBlockVariations"])(DEFAULT_EMBED_BLOCK)) === null || _getBlockVariations === void 0 ? void 0 : _getBlockVariations.find(function (_ref) { var name = _ref.name; return name === provider; }); }; /** * Returns true if any of the regular expressions match the URL. * * @param {string} url The URL to test. * @param {Array} patterns The list of regular expressions to test agains. * @return {boolean} True if any of the regular expressions match the URL. */ var matchesPatterns = function matchesPatterns(url) { var patterns = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; return patterns.some(function (pattern) { return url.match(pattern); }); }; /** * Finds the block variation that should be used for the URL, * based on the provided URL and the variation's patterns. * * @param {string} url The URL to test. * @return {WPBlockVariation} The block variation that should be used for this URL */ var util_findMoreSuitableBlock = function findMoreSuitableBlock(url) { var _getBlockVariations2; return (_getBlockVariations2 = Object(external_wp_blocks_["getBlockVariations"])(DEFAULT_EMBED_BLOCK)) === null || _getBlockVariations2 === void 0 ? void 0 : _getBlockVariations2.find(function (_ref2) { var patterns = _ref2.patterns; return matchesPatterns(url, patterns); }); }; var isFromWordPress = function isFromWordPress(html) { return html && html.includes('class="wp-embedded-content"'); }; var util_getPhotoHtml = function getPhotoHtml(photo) { // 100% width for the preview so it fits nicely into the document, some "thumbnails" are // actually the full size photo. If thumbnails not found, use full image. var imageUrl = photo.thumbnail_url || photo.url; var photoPreview = Object(external_wp_element_["createElement"])("p", null, Object(external_wp_element_["createElement"])("img", { src: imageUrl, alt: photo.title, width: "100%" })); return Object(external_wp_element_["renderToString"])(photoPreview); }; /** * Creates a more suitable embed block based on the passed in props * and attributes generated from an embed block's preview. * * We require `attributesFromPreview` to be generated from the latest attributes * and preview, and because of the way the react lifecycle operates, we can't * guarantee that the attributes contained in the block's props are the latest * versions, so we require that these are generated separately. * See `getAttributesFromPreview` in the generated embed edit component. * * @param {Object} props The block's props. * @param {Object} [attributesFromPreview] Attributes generated from the block's most up to date preview. * @return {Object|undefined} A more suitable embed block if one exists. */ var util_createUpgradedEmbedBlock = function createUpgradedEmbedBlock(props) { var _getBlockVariations3; var attributesFromPreview = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var preview = props.preview, _props$attributes = props.attributes; _props$attributes = _props$attributes === void 0 ? {} : _props$attributes; var url = _props$attributes.url, providerNameSlug = _props$attributes.providerNameSlug, type = _props$attributes.type; if (!url || !Object(external_wp_blocks_["getBlockType"])(DEFAULT_EMBED_BLOCK)) return; var matchedBlock = util_findMoreSuitableBlock(url); // WordPress blocks can work on multiple sites, and so don't have patterns, // so if we're in a WordPress block, assume the user has chosen it for a WordPress URL. var isCurrentBlockWP = providerNameSlug === 'wordpress' || type === WP_EMBED_TYPE; // if current block is not WordPress and a more suitable block found // that is different from the current one, create the new matched block var shouldCreateNewBlock = !isCurrentBlockWP && matchedBlock && (matchedBlock.attributes.providerNameSlug !== providerNameSlug || !providerNameSlug); if (shouldCreateNewBlock) { return Object(external_wp_blocks_["createBlock"])(DEFAULT_EMBED_BLOCK, util_objectSpread({ url: url }, matchedBlock.attributes)); } var wpVariation = (_getBlockVariations3 = Object(external_wp_blocks_["getBlockVariations"])(DEFAULT_EMBED_BLOCK)) === null || _getBlockVariations3 === void 0 ? void 0 : _getBlockVariations3.find(function (_ref3) { var name = _ref3.name; return name === 'wordpress'; }); // We can't match the URL for WordPress embeds, we have to check the HTML instead. if (!wpVariation || !preview || !isFromWordPress(preview.html) || isCurrentBlockWP) { return; } // This is not the WordPress embed block so transform it into one. return Object(external_wp_blocks_["createBlock"])(DEFAULT_EMBED_BLOCK, util_objectSpread(util_objectSpread({ url: url }, wpVariation.attributes), attributesFromPreview)); }; /** * Removes all previously set aspect ratio related classes and return the rest * existing class names. * * @param {string} existingClassNames Any existing class names. * @return {string} The class names without any aspect ratio related class. */ var util_removeAspectRatioClasses = function removeAspectRatioClasses(existingClassNames) { var aspectRatioClassNames = ASPECT_RATIOS.reduce(function (accumulator, _ref4) { var className = _ref4.className; accumulator[className] = false; return accumulator; }, { 'wp-has-aspect-ratio': false }); return dedupe_default()(existingClassNames, aspectRatioClassNames); }; /** * Returns class names with any relevant responsive aspect ratio names. * * @param {string} html The preview HTML that possibly contains an iframe with width and height set. * @param {string} existingClassNames Any existing class names. * @param {boolean} allowResponsive If the responsive class names should be added, or removed. * @return {string} Deduped class names. */ function getClassNames(html) { var existingClassNames = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; var allowResponsive = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; if (!allowResponsive) { return util_removeAspectRatioClasses(existingClassNames); } var previewDocument = document.implementation.createHTMLDocument(''); previewDocument.body.innerHTML = html; var iframe = previewDocument.body.querySelector('iframe'); // If we have a fixed aspect iframe, and it's a responsive embed block. if (iframe && iframe.height && iframe.width) { var aspectRatio = (iframe.width / iframe.height).toFixed(2); // Given the actual aspect ratio, find the widest ratio to support it. for (var ratioIndex = 0; ratioIndex < ASPECT_RATIOS.length; ratioIndex++) { var potentialRatio = ASPECT_RATIOS[ratioIndex]; if (aspectRatio >= potentialRatio.ratio) { return dedupe_default()(util_removeAspectRatioClasses(existingClassNames), potentialRatio.className, 'wp-has-aspect-ratio'); } } } return existingClassNames; } /** * Fallback behaviour for unembeddable URLs. * Creates a paragraph block containing a link to the URL, and calls `onReplace`. * * @param {string} url The URL that could not be embedded. * @param {Function} onReplace Function to call with the created fallback block. */ function util_fallback(url, onReplace) { var link = Object(external_wp_element_["createElement"])("a", { href: url }, url); onReplace(Object(external_wp_blocks_["createBlock"])('core/paragraph', { content: Object(external_wp_element_["renderToString"])(link) })); } /*** * Gets block attributes based on the preview and responsive state. * * @param {Object} preview The preview data. * @param {string} title The block's title, e.g. Twitter. * @param {Object} currentClassNames The block's current class names. * @param {boolean} isResponsive Boolean indicating if the block supports responsive content. * @param {boolean} allowResponsive Apply responsive classes to fixed size content. * @return {Object} Attributes and values. */ var getAttributesFromPreview = memize_default()(function (preview, title, currentClassNames, isResponsive) { var allowResponsive = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true; if (!preview) { return {}; } var attributes = {}; // Some plugins only return HTML with no type info, so default this to 'rich'. var _preview$type = preview.type, type = _preview$type === void 0 ? 'rich' : _preview$type; // If we got a provider name from the API, use it for the slug, otherwise we use the title, // because not all embed code gives us a provider name. var html = preview.html, providerName = preview.provider_name; var providerNameSlug = Object(external_lodash_["kebabCase"])((providerName || title).toLowerCase()); if (isFromWordPress(html)) { type = WP_EMBED_TYPE; } if (html || 'photo' === type) { attributes.type = type; attributes.providerNameSlug = providerNameSlug; } attributes.className = getClassNames(html, currentClassNames, isResponsive && allowResponsive); return attributes; }); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/use-client-width.js /** * WordPress dependencies */ function useClientWidth(ref, dependencies) { var _useState = Object(external_wp_element_["useState"])(), _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2), clientWidth = _useState2[0], setClientWidth = _useState2[1]; function calculateClientWidth() { setClientWidth(ref.current.clientWidth); } Object(external_wp_element_["useEffect"])(calculateClientWidth, dependencies); Object(external_wp_element_["useEffect"])(function () { var defaultView = ref.current.ownerDocument.defaultView; defaultView.addEventListener('resize', calculateClientWidth); return function () { defaultView.removeEventListener('resize', calculateClientWidth); }; }, []); return clientWidth; } // CONCATENATED MODULE: ./node_modules/react-easy-crop/node_modules/tslib/tslib.es6.js /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ /* global Reflect, Promise */ var extendStatics = function(d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; function __extends(d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); } var __assign = function() { __assign = Object.assign || function __assign(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; } return __assign.apply(this, arguments); } function __rest(s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; } function __decorate(decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; } function __param(paramIndex, decorator) { return function (target, key) { decorator(target, key, paramIndex); } } function __metadata(metadataKey, metadataValue) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); } function __awaiter(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); } function __generator(thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); while (_) try { if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; if (y = 0, t) op = [op[0] & 2, t.value]; switch (op[0]) { case 0: case 1: t = op; break; case 4: _.label++; return { value: op[1], done: false }; case 5: _.label++; y = op[1]; op = [0]; continue; case 7: op = _.ops.pop(); _.trys.pop(); continue; default: if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } if (t[2]) _.ops.pop(); _.trys.pop(); continue; } op = body.call(thisArg, _); } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } } var __createBinding = Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; }); function __exportStar(m, o) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); } function __values(o) { var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; if (m) return m.call(o); if (o && typeof o.length === "number") return { next: function () { if (o && i >= o.length) o = void 0; return { value: o && o[i++], done: !o }; } }; throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); } function __read(o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; var i = m.call(o), r, ar = [], e; try { while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); } catch (error) { e = { error: error }; } finally { try { if (r && !r.done && (m = i["return"])) m.call(i); } finally { if (e) throw e.error; } } return ar; } function __spread() { for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); return ar; } function __spreadArrays() { for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j]; return r; }; function __await(v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } function __asyncGenerator(thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } function fulfill(value) { resume("next", value); } function reject(value) { resume("throw", value); } function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } } function __asyncDelegator(o) { var i, p; return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } } function __asyncValues(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } } function __makeTemplateObject(cooked, raw) { if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } return cooked; }; var __setModuleDefault = Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }; function __importStar(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; } function __importDefault(mod) { return (mod && mod.__esModule) ? mod : { default: mod }; } function __classPrivateFieldGet(receiver, privateMap) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return privateMap.get(receiver); } function __classPrivateFieldSet(receiver, privateMap, value) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to set private field on non-instance"); } privateMap.set(receiver, value); return value; } // EXTERNAL MODULE: external "React" var external_React_ = __webpack_require__(14); var external_React_default = /*#__PURE__*/__webpack_require__.n(external_React_); // EXTERNAL MODULE: ./node_modules/normalize-wheel/index.js var normalize_wheel = __webpack_require__(276); var normalize_wheel_default = /*#__PURE__*/__webpack_require__.n(normalize_wheel); // CONCATENATED MODULE: ./node_modules/react-easy-crop/index.module.js /** * Compute the dimension of the crop area based on media size, * aspect ratio and optionally rotation */ function getCropSize(mediaWidth, mediaHeight, containerWidth, containerHeight, aspect, rotation) { if (rotation === void 0) { rotation = 0; } var _a = translateSize(mediaWidth, mediaHeight, rotation), width = _a.width, height = _a.height; var fittingWidth = Math.min(width, containerWidth); var fittingHeight = Math.min(height, containerHeight); if (fittingWidth > fittingHeight * aspect) { return { width: fittingHeight * aspect, height: fittingHeight }; } return { width: fittingWidth, height: fittingWidth / aspect }; } /** * Ensure a new media position stays in the crop area. */ function index_module_restrictPosition(position, mediaSize, cropSize, zoom, rotation) { if (rotation === void 0) { rotation = 0; } var _a = translateSize(mediaSize.width, mediaSize.height, rotation), width = _a.width, height = _a.height; return { x: restrictPositionCoord(position.x, width, cropSize.width, zoom), y: restrictPositionCoord(position.y, height, cropSize.height, zoom) }; } function restrictPositionCoord(position, mediaSize, cropSize, zoom) { var maxPosition = mediaSize * zoom / 2 - cropSize / 2; return Math.min(maxPosition, Math.max(position, -maxPosition)); } function getDistanceBetweenPoints(pointA, pointB) { return Math.sqrt(Math.pow(pointA.y - pointB.y, 2) + Math.pow(pointA.x - pointB.x, 2)); } function getRotationBetweenPoints(pointA, pointB) { return Math.atan2(pointB.y - pointA.y, pointB.x - pointA.x) * 180 / Math.PI; } /** * Compute the output cropped area of the media in percentages and pixels. * x/y are the top-left coordinates on the src media */ function computeCroppedArea(crop, mediaSize, cropSize, aspect, zoom, rotation, restrictPosition) { if (rotation === void 0) { rotation = 0; } if (restrictPosition === void 0) { restrictPosition = true; } // if the media is rotated by the user, we cannot limit the position anymore // as it might need to be negative. var limitAreaFn = restrictPosition && rotation === 0 ? limitArea : noOp; var croppedAreaPercentages = { x: limitAreaFn(100, ((mediaSize.width - cropSize.width / zoom) / 2 - crop.x / zoom) / mediaSize.width * 100), y: limitAreaFn(100, ((mediaSize.height - cropSize.height / zoom) / 2 - crop.y / zoom) / mediaSize.height * 100), width: limitAreaFn(100, cropSize.width / mediaSize.width * 100 / zoom), height: limitAreaFn(100, cropSize.height / mediaSize.height * 100 / zoom) }; // we compute the pixels size naively var widthInPixels = Math.round(limitAreaFn(mediaSize.naturalWidth, croppedAreaPercentages.width * mediaSize.naturalWidth / 100)); var heightInPixels = Math.round(limitAreaFn(mediaSize.naturalHeight, croppedAreaPercentages.height * mediaSize.naturalHeight / 100)); var isImgWiderThanHigh = mediaSize.naturalWidth >= mediaSize.naturalHeight * aspect; // then we ensure the width and height exactly match the aspect (to avoid rounding approximations) // if the media is wider than high, when zoom is 0, the crop height will be equals to iamge height // thus we want to compute the width from the height and aspect for accuracy. // Otherwise, we compute the height from width and aspect. var sizePixels = isImgWiderThanHigh ? { width: Math.round(heightInPixels * aspect), height: heightInPixels } : { width: widthInPixels, height: Math.round(widthInPixels / aspect) }; var croppedAreaPixels = __assign(__assign({}, sizePixels), { x: Math.round(limitAreaFn(mediaSize.naturalWidth - sizePixels.width, croppedAreaPercentages.x * mediaSize.naturalWidth / 100)), y: Math.round(limitAreaFn(mediaSize.naturalHeight - sizePixels.height, croppedAreaPercentages.y * mediaSize.naturalHeight / 100)) }); return { croppedAreaPercentages: croppedAreaPercentages, croppedAreaPixels: croppedAreaPixels }; } /** * Ensure the returned value is between 0 and max */ function limitArea(max, value) { return Math.min(max, Math.max(0, value)); } function noOp(_max, value) { return value; } /** * Compute the crop and zoom from the croppedAreaPixels */ function getZoomFromCroppedAreaPixels(croppedAreaPixels, mediaSize, cropSize) { var mediaZoom = mediaSize.width / mediaSize.naturalWidth; if (cropSize) { var isHeightMaxSize_1 = cropSize.height > cropSize.width; return isHeightMaxSize_1 ? cropSize.height / mediaZoom / croppedAreaPixels.height : cropSize.width / mediaZoom / croppedAreaPixels.width; } var aspect = croppedAreaPixels.width / croppedAreaPixels.height; var isHeightMaxSize = mediaSize.naturalWidth >= mediaSize.naturalHeight * aspect; return isHeightMaxSize ? mediaSize.naturalHeight / croppedAreaPixels.height : mediaSize.naturalWidth / croppedAreaPixels.width; } /** * Compute the crop and zoom from the croppedAreaPixels */ function getInitialCropFromCroppedAreaPixels(croppedAreaPixels, mediaSize, cropSize) { var mediaZoom = mediaSize.width / mediaSize.naturalWidth; var zoom = getZoomFromCroppedAreaPixels(croppedAreaPixels, mediaSize, cropSize); var cropZoom = mediaZoom * zoom; var crop = { x: ((mediaSize.naturalWidth - croppedAreaPixels.width) / 2 - croppedAreaPixels.x) * cropZoom, y: ((mediaSize.naturalHeight - croppedAreaPixels.height) / 2 - croppedAreaPixels.y) * cropZoom }; return { crop: crop, zoom: zoom }; } /** * Return the point that is the center of point a and b */ function getCenter(a, b) { return { x: (b.x + a.x) / 2, y: (b.y + a.y) / 2 }; } /** * * Returns an x,y point once rotated around xMid,yMid */ function rotateAroundMidPoint(x, y, xMid, yMid, degrees) { var cos = Math.cos; var sin = Math.sin; var radian = degrees * Math.PI / 180; // Convert to radians // Subtract midpoints, so that midpoint is translated to origin // and add it in the end again var xr = (x - xMid) * cos(radian) - (y - yMid) * sin(radian) + xMid; var yr = (x - xMid) * sin(radian) + (y - yMid) * cos(radian) + yMid; return [xr, yr]; } /** * Returns the new bounding area of a rotated rectangle. */ function translateSize(width, height, rotation) { var centerX = width / 2; var centerY = height / 2; var outerBounds = [rotateAroundMidPoint(0, 0, centerX, centerY, rotation), rotateAroundMidPoint(width, 0, centerX, centerY, rotation), rotateAroundMidPoint(width, height, centerX, centerY, rotation), rotateAroundMidPoint(0, height, centerX, centerY, rotation)]; var minX = Math.min.apply(Math, outerBounds.map(function (p) { return p[0]; })); var maxX = Math.max.apply(Math, outerBounds.map(function (p) { return p[0]; })); var minY = Math.min.apply(Math, outerBounds.map(function (p) { return p[1]; })); var maxY = Math.max.apply(Math, outerBounds.map(function (p) { return p[1]; })); return { width: maxX - minX, height: maxY - minY }; } /** * Combine multiple class names into a single string. */ function index_module_classNames() { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } return args.filter(function (value) { if (typeof value === 'string' && value.length > 0) { return true; } return false; }).join(' ').trim(); } var css_248z = ".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n user-select: none;\n touch-action: none;\n cursor: move;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_CropArea {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: 1px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n box-shadow: 0 0 0 9999em;\n color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 0;\n bottom: 0;\n left: 33.33%;\n right: 33.33%;\n border-top: 0;\n border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 33.33%;\n bottom: 33.33%;\n left: 0;\n right: 0;\n border-left: 0;\n border-right: 0;\n}\n"; var MIN_ZOOM = 1; var MAX_ZOOM = 3; var index_module_Cropper = /** @class */ function (_super) { __extends(Cropper, _super); function Cropper() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.imageRef = null; _this.videoRef = null; _this.containerRef = null; _this.styleRef = null; _this.containerRect = null; _this.mediaSize = { width: 0, height: 0, naturalWidth: 0, naturalHeight: 0 }; _this.dragStartPosition = { x: 0, y: 0 }; _this.dragStartCrop = { x: 0, y: 0 }; _this.lastPinchDistance = 0; _this.lastPinchRotation = 0; _this.rafDragTimeout = null; _this.rafPinchTimeout = null; _this.wheelTimer = null; _this.state = { cropSize: null, hasWheelJustStarted: false }; // this is to prevent Safari on iOS >= 10 to zoom the page _this.preventZoomSafari = function (e) { return e.preventDefault(); }; _this.cleanEvents = function () { document.removeEventListener('mousemove', _this.onMouseMove); document.removeEventListener('mouseup', _this.onDragStopped); document.removeEventListener('touchmove', _this.onTouchMove); document.removeEventListener('touchend', _this.onDragStopped); }; _this.clearScrollEvent = function () { if (_this.containerRef) _this.containerRef.removeEventListener('wheel', _this.onWheel); if (_this.wheelTimer) { clearTimeout(_this.wheelTimer); } }; _this.onMediaLoad = function () { _this.computeSizes(); _this.emitCropData(); _this.setInitialCrop(); if (_this.props.onMediaLoaded) { _this.props.onMediaLoaded(_this.mediaSize); } }; _this.setInitialCrop = function () { var _a = _this.props, initialCroppedAreaPixels = _a.initialCroppedAreaPixels, cropSize = _a.cropSize; if (!initialCroppedAreaPixels) { return; } var _b = getInitialCropFromCroppedAreaPixels(initialCroppedAreaPixels, _this.mediaSize, cropSize), crop = _b.crop, zoom = _b.zoom; _this.props.onCropChange(crop); _this.props.onZoomChange && _this.props.onZoomChange(zoom); }; _this.computeSizes = function () { var _a, _b, _c, _d, _e, _f; var mediaRef = _this.imageRef || _this.videoRef; if (mediaRef && _this.containerRef) { _this.containerRect = _this.containerRef.getBoundingClientRect(); _this.mediaSize = { width: mediaRef.offsetWidth, height: mediaRef.offsetHeight, naturalWidth: ((_a = _this.imageRef) === null || _a === void 0 ? void 0 : _a.naturalWidth) || ((_b = _this.videoRef) === null || _b === void 0 ? void 0 : _b.videoWidth) || 0, naturalHeight: ((_c = _this.imageRef) === null || _c === void 0 ? void 0 : _c.naturalHeight) || ((_d = _this.videoRef) === null || _d === void 0 ? void 0 : _d.videoHeight) || 0 }; var cropSize = _this.props.cropSize ? _this.props.cropSize : getCropSize(mediaRef.offsetWidth, mediaRef.offsetHeight, _this.containerRect.width, _this.containerRect.height, _this.props.aspect, _this.props.rotation); if (((_e = _this.state.cropSize) === null || _e === void 0 ? void 0 : _e.height) !== cropSize.height || ((_f = _this.state.cropSize) === null || _f === void 0 ? void 0 : _f.width) !== cropSize.width) { _this.props.onCropSizeChange && _this.props.onCropSizeChange(cropSize); } _this.setState({ cropSize: cropSize }, _this.recomputeCropPosition); } }; _this.onMouseDown = function (e) { e.preventDefault(); document.addEventListener('mousemove', _this.onMouseMove); document.addEventListener('mouseup', _this.onDragStopped); _this.onDragStart(Cropper.getMousePoint(e)); }; _this.onMouseMove = function (e) { return _this.onDrag(Cropper.getMousePoint(e)); }; _this.onTouchStart = function (e) { e.preventDefault(); document.addEventListener('touchmove', _this.onTouchMove, { passive: false }); // iOS 11 now defaults to passive: true document.addEventListener('touchend', _this.onDragStopped); if (e.touches.length === 2) { _this.onPinchStart(e); } else if (e.touches.length === 1) { _this.onDragStart(Cropper.getTouchPoint(e.touches[0])); } }; _this.onTouchMove = function (e) { // Prevent whole page from scrolling on iOS. e.preventDefault(); if (e.touches.length === 2) { _this.onPinchMove(e); } else if (e.touches.length === 1) { _this.onDrag(Cropper.getTouchPoint(e.touches[0])); } }; _this.onDragStart = function (_a) { var _b, _c; var x = _a.x, y = _a.y; _this.dragStartPosition = { x: x, y: y }; _this.dragStartCrop = __assign({}, _this.props.crop); (_c = (_b = _this.props).onInteractionStart) === null || _c === void 0 ? void 0 : _c.call(_b); }; _this.onDrag = function (_a) { var x = _a.x, y = _a.y; if (_this.rafDragTimeout) window.cancelAnimationFrame(_this.rafDragTimeout); _this.rafDragTimeout = window.requestAnimationFrame(function () { if (!_this.state.cropSize) return; if (x === undefined || y === undefined) return; var offsetX = x - _this.dragStartPosition.x; var offsetY = y - _this.dragStartPosition.y; var requestedPosition = { x: _this.dragStartCrop.x + offsetX, y: _this.dragStartCrop.y + offsetY }; var newPosition = _this.props.restrictPosition ? index_module_restrictPosition(requestedPosition, _this.mediaSize, _this.state.cropSize, _this.props.zoom, _this.props.rotation) : requestedPosition; _this.props.onCropChange(newPosition); }); }; _this.onDragStopped = function () { var _a, _b; _this.cleanEvents(); _this.emitCropData(); (_b = (_a = _this.props).onInteractionEnd) === null || _b === void 0 ? void 0 : _b.call(_a); }; _this.onWheel = function (e) { e.preventDefault(); var point = Cropper.getMousePoint(e); var pixelY = normalize_wheel_default()(e).pixelY; var newZoom = _this.props.zoom - pixelY * _this.props.zoomSpeed / 200; _this.setNewZoom(newZoom, point); if (!_this.state.hasWheelJustStarted) { _this.setState({ hasWheelJustStarted: true }, function () { var _a, _b; return (_b = (_a = _this.props).onInteractionStart) === null || _b === void 0 ? void 0 : _b.call(_a); }); } if (_this.wheelTimer) { clearTimeout(_this.wheelTimer); } _this.wheelTimer = window.setTimeout(function () { return _this.setState({ hasWheelJustStarted: false }, function () { var _a, _b; return (_b = (_a = _this.props).onInteractionEnd) === null || _b === void 0 ? void 0 : _b.call(_a); }); }, 250); }; _this.getPointOnContainer = function (_a) { var x = _a.x, y = _a.y; if (!_this.containerRect) { throw new Error('The Cropper is not mounted'); } return { x: _this.containerRect.width / 2 - (x - _this.containerRect.left), y: _this.containerRect.height / 2 - (y - _this.containerRect.top) }; }; _this.getPointOnMedia = function (_a) { var x = _a.x, y = _a.y; var _b = _this.props, crop = _b.crop, zoom = _b.zoom; return { x: (x + crop.x) / zoom, y: (y + crop.y) / zoom }; }; _this.setNewZoom = function (zoom, point) { if (!_this.state.cropSize || !_this.props.onZoomChange) return; var zoomPoint = _this.getPointOnContainer(point); var zoomTarget = _this.getPointOnMedia(zoomPoint); var newZoom = Math.min(_this.props.maxZoom, Math.max(zoom, _this.props.minZoom)); var requestedPosition = { x: zoomTarget.x * newZoom - zoomPoint.x, y: zoomTarget.y * newZoom - zoomPoint.y }; var newPosition = _this.props.restrictPosition ? index_module_restrictPosition(requestedPosition, _this.mediaSize, _this.state.cropSize, newZoom, _this.props.rotation) : requestedPosition; _this.props.onCropChange(newPosition); _this.props.onZoomChange(newZoom); }; _this.getCropData = function () { if (!_this.state.cropSize) { return null; } // this is to ensure the crop is correctly restricted after a zoom back (https://github.com/ricardo-ch/react-easy-crop/issues/6) var restrictedPosition = _this.props.restrictPosition ? index_module_restrictPosition(_this.props.crop, _this.mediaSize, _this.state.cropSize, _this.props.zoom, _this.props.rotation) : _this.props.crop; return computeCroppedArea(restrictedPosition, _this.mediaSize, _this.state.cropSize, _this.getAspect(), _this.props.zoom, _this.props.rotation, _this.props.restrictPosition); }; _this.emitCropData = function () { var cropData = _this.getCropData(); if (!cropData) return; var croppedAreaPercentages = cropData.croppedAreaPercentages, croppedAreaPixels = cropData.croppedAreaPixels; if (_this.props.onCropComplete) { _this.props.onCropComplete(croppedAreaPercentages, croppedAreaPixels); } if (_this.props.onCropAreaChange) { _this.props.onCropAreaChange(croppedAreaPercentages, croppedAreaPixels); } }; _this.emitCropAreaChange = function () { var cropData = _this.getCropData(); if (!cropData) return; var croppedAreaPercentages = cropData.croppedAreaPercentages, croppedAreaPixels = cropData.croppedAreaPixels; if (_this.props.onCropAreaChange) { _this.props.onCropAreaChange(croppedAreaPercentages, croppedAreaPixels); } }; _this.recomputeCropPosition = function () { if (!_this.state.cropSize) return; var newPosition = _this.props.restrictPosition ? index_module_restrictPosition(_this.props.crop, _this.mediaSize, _this.state.cropSize, _this.props.zoom, _this.props.rotation) : _this.props.crop; _this.props.onCropChange(newPosition); _this.emitCropData(); }; return _this; } Cropper.prototype.componentDidMount = function () { window.addEventListener('resize', this.computeSizes); if (this.containerRef) { this.props.zoomWithScroll && this.containerRef.addEventListener('wheel', this.onWheel, { passive: false }); this.containerRef.addEventListener('gesturestart', this.preventZoomSafari); this.containerRef.addEventListener('gesturechange', this.preventZoomSafari); } if (!this.props.disableAutomaticStylesInjection) { this.styleRef = document.createElement('style'); this.styleRef.setAttribute('type', 'text/css'); this.styleRef.innerHTML = css_248z; document.head.appendChild(this.styleRef); } // when rendered via SSR, the image can already be loaded and its onLoad callback will never be called if (this.imageRef && this.imageRef.complete) { this.onMediaLoad(); } }; Cropper.prototype.componentWillUnmount = function () { window.removeEventListener('resize', this.computeSizes); if (this.containerRef) { this.containerRef.removeEventListener('gesturestart', this.preventZoomSafari); this.containerRef.removeEventListener('gesturechange', this.preventZoomSafari); } if (this.styleRef) { this.styleRef.remove(); } this.cleanEvents(); this.props.zoomWithScroll && this.clearScrollEvent(); }; Cropper.prototype.componentDidUpdate = function (prevProps) { var _a, _b, _c, _d, _e, _f, _g, _h; if (prevProps.rotation !== this.props.rotation) { this.computeSizes(); this.recomputeCropPosition(); } else if (prevProps.aspect !== this.props.aspect) { this.computeSizes(); } else if (prevProps.zoom !== this.props.zoom) { this.recomputeCropPosition(); } else if (((_a = prevProps.cropSize) === null || _a === void 0 ? void 0 : _a.height) !== ((_b = this.props.cropSize) === null || _b === void 0 ? void 0 : _b.height) || ((_c = prevProps.cropSize) === null || _c === void 0 ? void 0 : _c.width) !== ((_d = this.props.cropSize) === null || _d === void 0 ? void 0 : _d.width)) { this.computeSizes(); } else if (((_e = prevProps.crop) === null || _e === void 0 ? void 0 : _e.x) !== ((_f = this.props.crop) === null || _f === void 0 ? void 0 : _f.x) || ((_g = prevProps.crop) === null || _g === void 0 ? void 0 : _g.y) !== ((_h = this.props.crop) === null || _h === void 0 ? void 0 : _h.y)) { this.emitCropAreaChange(); } if (prevProps.zoomWithScroll !== this.props.zoomWithScroll && this.containerRef) { this.props.zoomWithScroll ? this.containerRef.addEventListener('wheel', this.onWheel, { passive: false }) : this.clearScrollEvent(); } }; Cropper.prototype.getAspect = function () { var _a = this.props, cropSize = _a.cropSize, aspect = _a.aspect; if (cropSize) { return cropSize.width / cropSize.height; } return aspect; }; Cropper.prototype.onPinchStart = function (e) { var pointA = Cropper.getTouchPoint(e.touches[0]); var pointB = Cropper.getTouchPoint(e.touches[1]); this.lastPinchDistance = getDistanceBetweenPoints(pointA, pointB); this.lastPinchRotation = getRotationBetweenPoints(pointA, pointB); this.onDragStart(getCenter(pointA, pointB)); }; Cropper.prototype.onPinchMove = function (e) { var _this = this; var pointA = Cropper.getTouchPoint(e.touches[0]); var pointB = Cropper.getTouchPoint(e.touches[1]); var center = getCenter(pointA, pointB); this.onDrag(center); if (this.rafPinchTimeout) window.cancelAnimationFrame(this.rafPinchTimeout); this.rafPinchTimeout = window.requestAnimationFrame(function () { var distance = getDistanceBetweenPoints(pointA, pointB); var newZoom = _this.props.zoom * (distance / _this.lastPinchDistance); _this.setNewZoom(newZoom, center); _this.lastPinchDistance = distance; var rotation = getRotationBetweenPoints(pointA, pointB); var newRotation = _this.props.rotation + (rotation - _this.lastPinchRotation); _this.props.onRotationChange && _this.props.onRotationChange(newRotation); _this.lastPinchRotation = rotation; }); }; Cropper.prototype.render = function () { var _this = this; var _a = this.props, image = _a.image, video = _a.video, mediaProps = _a.mediaProps, transform = _a.transform, _b = _a.crop, x = _b.x, y = _b.y, rotation = _a.rotation, zoom = _a.zoom, cropShape = _a.cropShape, showGrid = _a.showGrid, _c = _a.style, containerStyle = _c.containerStyle, cropAreaStyle = _c.cropAreaStyle, mediaStyle = _c.mediaStyle, _d = _a.classes, containerClassName = _d.containerClassName, cropAreaClassName = _d.cropAreaClassName, mediaClassName = _d.mediaClassName; return /*#__PURE__*/external_React_default.a.createElement("div", { onMouseDown: this.onMouseDown, onTouchStart: this.onTouchStart, ref: function ref(el) { return _this.containerRef = el; }, "data-testid": "container", style: containerStyle, className: index_module_classNames('reactEasyCrop_Container', containerClassName) }, image ? /*#__PURE__*/external_React_default.a.createElement("img", __assign({ alt: "", className: index_module_classNames('reactEasyCrop_Image', mediaClassName) }, mediaProps, { src: image, ref: function ref(el) { return _this.imageRef = el; }, style: __assign(__assign({}, mediaStyle), { transform: transform || "translate(" + x + "px, " + y + "px) rotate(" + rotation + "deg) scale(" + zoom + ")" }), onLoad: this.onMediaLoad })) : video && /*#__PURE__*/external_React_default.a.createElement("video", __assign({ autoPlay: true, loop: true, muted: true, className: index_module_classNames('reactEasyCrop_Video', mediaClassName) }, mediaProps, { src: video, ref: function ref(el) { return _this.videoRef = el; }, onLoadedMetadata: this.onMediaLoad, style: __assign(__assign({}, mediaStyle), { transform: transform || "translate(" + x + "px, " + y + "px) rotate(" + rotation + "deg) scale(" + zoom + ")" }), controls: false })), this.state.cropSize && /*#__PURE__*/external_React_default.a.createElement("div", { style: __assign(__assign({}, cropAreaStyle), { width: this.state.cropSize.width, height: this.state.cropSize.height }), "data-testid": "cropper", className: index_module_classNames('reactEasyCrop_CropArea', cropShape === 'round' && 'reactEasyCrop_CropAreaRound', showGrid && 'reactEasyCrop_CropAreaGrid', cropAreaClassName) })); }; Cropper.defaultProps = { zoom: 1, rotation: 0, aspect: 4 / 3, maxZoom: MAX_ZOOM, minZoom: MIN_ZOOM, cropShape: 'rect', showGrid: true, style: {}, classes: {}, mediaProps: {}, zoomSpeed: 1, restrictPosition: true, zoomWithScroll: true }; Cropper.getMousePoint = function (e) { return { x: Number(e.clientX), y: Number(e.clientY) }; }; Cropper.getTouchPoint = function (touch) { return { x: Number(touch.clientX), y: Number(touch.clientY) }; }; return Cropper; }(external_React_default.a.Component); /* harmony default export */ var index_module = (index_module_Cropper); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/image-editing/constants.js var constants_MIN_ZOOM = 100; var constants_MAX_ZOOM = 300; var constants_POPOVER_PROPS = { position: 'bottom right', isAlternate: true }; // EXTERNAL MODULE: external ["wp","apiFetch"] var external_wp_apiFetch_ = __webpack_require__(50); var external_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_wp_apiFetch_); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/image-editing/use-save-image.js /** * WordPress dependencies */ function useSaveImage(_ref) { var crop = _ref.crop, rotation = _ref.rotation, height = _ref.height, width = _ref.width, aspect = _ref.aspect, url = _ref.url, id = _ref.id, onSaveImage = _ref.onSaveImage, onFinishEditing = _ref.onFinishEditing; var _useDispatch = Object(external_wp_data_["useDispatch"])(external_wp_notices_["store"]), createErrorNotice = _useDispatch.createErrorNotice; var _useState = Object(external_wp_element_["useState"])(false), _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2), isInProgress = _useState2[0], setIsInProgress = _useState2[1]; var cancel = Object(external_wp_element_["useCallback"])(function () { setIsInProgress(false); onFinishEditing(); }, [setIsInProgress, onFinishEditing]); var apply = Object(external_wp_element_["useCallback"])(function () { setIsInProgress(true); var attrs = {}; // The crop script may return some very small, sub-pixel values when the image was not cropped. // Crop only when the new size has changed by more than 0.1%. if (crop.width < 99.9 || crop.height < 99.9) { attrs = crop; } if (rotation > 0) { attrs.rotation = rotation; } attrs.src = url; external_wp_apiFetch_default()({ path: "/wp/v2/media/".concat(id, "/edit"), method: 'POST', data: attrs }).then(function (response) { onSaveImage({ id: response.id, url: response.source_url, height: height && width ? width / aspect : undefined }); }).catch(function (error) { createErrorNotice(Object(external_wp_i18n_["sprintf"])( /* translators: 1. Error message */ Object(external_wp_i18n_["__"])('Could not edit image. %s'), error.message), { id: 'image-editing-error', type: 'snackbar' }); }).finally(function () { setIsInProgress(false); onFinishEditing(); }); }, [setIsInProgress, crop, rotation, height, width, aspect, url, onSaveImage, createErrorNotice, setIsInProgress, onFinishEditing]); return Object(external_wp_element_["useMemo"])(function () { return { isInProgress: isInProgress, apply: apply, cancel: cancel }; }, [isInProgress, apply, cancel]); } // EXTERNAL MODULE: external ["wp","hooks"] var external_wp_hooks_ = __webpack_require__(33); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/image-editing/use-transform-image.js /** * WordPress dependencies */ function useTransformState(_ref) { var url = _ref.url, naturalWidth = _ref.naturalWidth, naturalHeight = _ref.naturalHeight; var _useState = Object(external_wp_element_["useState"])(), _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2), editedUrl = _useState2[0], setEditedUrl = _useState2[1]; var _useState3 = Object(external_wp_element_["useState"])(), _useState4 = Object(slicedToArray["a" /* default */])(_useState3, 2), crop = _useState4[0], setCrop = _useState4[1]; var _useState5 = Object(external_wp_element_["useState"])({ x: 0, y: 0 }), _useState6 = Object(slicedToArray["a" /* default */])(_useState5, 2), position = _useState6[0], setPosition = _useState6[1]; var _useState7 = Object(external_wp_element_["useState"])(), _useState8 = Object(slicedToArray["a" /* default */])(_useState7, 2), zoom = _useState8[0], setZoom = _useState8[1]; var _useState9 = Object(external_wp_element_["useState"])(), _useState10 = Object(slicedToArray["a" /* default */])(_useState9, 2), rotation = _useState10[0], setRotation = _useState10[1]; var _useState11 = Object(external_wp_element_["useState"])(), _useState12 = Object(slicedToArray["a" /* default */])(_useState11, 2), aspect = _useState12[0], setAspect = _useState12[1]; var _useState13 = Object(external_wp_element_["useState"])(), _useState14 = Object(slicedToArray["a" /* default */])(_useState13, 2), defaultAspect = _useState14[0], setDefaultAspect = _useState14[1]; var initializeTransformValues = Object(external_wp_element_["useCallback"])(function () { setPosition({ x: 0, y: 0 }); setZoom(100); setRotation(0); setAspect(naturalWidth / naturalHeight); setDefaultAspect(naturalWidth / naturalHeight); }, [naturalWidth, naturalHeight, setPosition, setZoom, setRotation, setAspect, setDefaultAspect]); var rotateClockwise = Object(external_wp_element_["useCallback"])(function () { var angle = (rotation + 90) % 360; var naturalAspectRatio = naturalWidth / naturalHeight; if (rotation % 180 === 90) { naturalAspectRatio = naturalHeight / naturalWidth; } if (angle === 0) { setEditedUrl(); setRotation(angle); setAspect(1 / aspect); setPosition({ x: -(position.y * naturalAspectRatio), y: position.x * naturalAspectRatio }); return; } function editImage(event) { var canvas = document.createElement('canvas'); var translateX = 0; var translateY = 0; if (angle % 180) { canvas.width = event.target.height; canvas.height = event.target.width; } else { canvas.width = event.target.width; canvas.height = event.target.height; } if (angle === 90 || angle === 180) { translateX = canvas.width; } if (angle === 270 || angle === 180) { translateY = canvas.height; } var context = canvas.getContext('2d'); context.translate(translateX, translateY); context.rotate(angle * Math.PI / 180); context.drawImage(event.target, 0, 0); canvas.toBlob(function (blob) { setEditedUrl(URL.createObjectURL(blob)); setRotation(angle); setAspect(1 / aspect); setPosition({ x: -(position.y * naturalAspectRatio), y: position.x * naturalAspectRatio }); }); } var el = new window.Image(); el.src = url; el.onload = editImage; var imgCrossOrigin = Object(external_wp_hooks_["applyFilters"])('media.crossOrigin', undefined, url); if (typeof imgCrossOrigin === 'string') { el.crossOrigin = imgCrossOrigin; } }, [rotation, naturalWidth, naturalHeight, setEditedUrl, setRotation, setAspect, setPosition]); return Object(external_wp_element_["useMemo"])(function () { return { editedUrl: editedUrl, setEditedUrl: setEditedUrl, crop: crop, setCrop: setCrop, position: position, setPosition: setPosition, zoom: zoom, setZoom: setZoom, rotation: rotation, setRotation: setRotation, rotateClockwise: rotateClockwise, aspect: aspect, setAspect: setAspect, defaultAspect: defaultAspect, initializeTransformValues: initializeTransformValues }; }, [editedUrl, setEditedUrl, crop, setCrop, position, setPosition, zoom, setZoom, rotation, setRotation, rotateClockwise, aspect, setAspect, defaultAspect, initializeTransformValues]); } function useTransformImage(imageProperties, isEditing) { var transformState = useTransformState(imageProperties); var initializeTransformValues = transformState.initializeTransformValues; Object(external_wp_element_["useEffect"])(function () { if (isEditing) { initializeTransformValues(); } }, [isEditing, initializeTransformValues]); return transformState; } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/image-editing/context.js function context_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 context_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { context_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { context_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } /** * WordPress dependencies */ /** * Internal dependencies */ var ImageEditingContext = Object(external_wp_element_["createContext"])({}); var context_useImageEditingContext = function useImageEditingContext() { return Object(external_wp_element_["useContext"])(ImageEditingContext); }; function ImageEditingProvider(_ref) { var id = _ref.id, url = _ref.url, naturalWidth = _ref.naturalWidth, naturalHeight = _ref.naturalHeight, isEditing = _ref.isEditing, onFinishEditing = _ref.onFinishEditing, onSaveImage = _ref.onSaveImage, children = _ref.children; var transformImage = useTransformImage({ url: url, naturalWidth: naturalWidth, naturalHeight: naturalHeight }, isEditing); var saveImage = useSaveImage(context_objectSpread({ id: id, url: url, onSaveImage: onSaveImage, onFinishEditing: onFinishEditing }, transformImage)); var providerValue = Object(external_wp_element_["useMemo"])(function () { return context_objectSpread(context_objectSpread({}, transformImage), saveImage); }, [transformImage, saveImage]); return Object(external_wp_element_["createElement"])(ImageEditingContext.Provider, { value: providerValue }, children); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/image-editing/cropper.js /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ function ImageCropper(_ref) { var url = _ref.url, width = _ref.width, height = _ref.height, clientWidth = _ref.clientWidth, naturalHeight = _ref.naturalHeight, naturalWidth = _ref.naturalWidth; var _useImageEditingConte = context_useImageEditingContext(), isInProgress = _useImageEditingConte.isInProgress, editedUrl = _useImageEditingConte.editedUrl, position = _useImageEditingConte.position, zoom = _useImageEditingConte.zoom, aspect = _useImageEditingConte.aspect, setPosition = _useImageEditingConte.setPosition, setCrop = _useImageEditingConte.setCrop, setZoom = _useImageEditingConte.setZoom, rotation = _useImageEditingConte.rotation; var editedHeight = height || clientWidth * naturalHeight / naturalWidth; if (rotation % 180 === 90) { editedHeight = clientWidth * naturalWidth / naturalHeight; } return Object(external_wp_element_["createElement"])("div", { className: classnames_default()('wp-block-image__crop-area', { 'is-applying': isInProgress }), style: { width: width || clientWidth, height: editedHeight } }, Object(external_wp_element_["createElement"])(index_module, { image: editedUrl || url, disabled: isInProgress, minZoom: constants_MIN_ZOOM / 100, maxZoom: constants_MAX_ZOOM / 100, crop: position, zoom: zoom / 100, aspect: aspect, onCropChange: setPosition, onCropComplete: function onCropComplete(newCropPercent) { setCrop(newCropPercent); }, onZoomChange: function onZoomChange(newZoom) { setZoom(newZoom * 100); } }), isInProgress && Object(external_wp_element_["createElement"])(external_wp_components_["Spinner"], null)); } // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/search.js var search = __webpack_require__(215); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/image-editing/zoom-dropdown.js /** * WordPress dependencies */ /** * Internal dependencies */ function ZoomDropdown() { var _useImageEditingConte = context_useImageEditingContext(), isInProgress = _useImageEditingConte.isInProgress, zoom = _useImageEditingConte.zoom, setZoom = _useImageEditingConte.setZoom; return Object(external_wp_element_["createElement"])(external_wp_components_["Dropdown"], { contentClassName: "wp-block-image__zoom", popoverProps: constants_POPOVER_PROPS, renderToggle: function renderToggle(_ref) { var isOpen = _ref.isOpen, onToggle = _ref.onToggle; return Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], { icon: search["a" /* default */], label: Object(external_wp_i18n_["__"])('Zoom'), onClick: onToggle, "aria-expanded": isOpen, disabled: isInProgress }); }, renderContent: function renderContent() { return Object(external_wp_element_["createElement"])(external_wp_components_["RangeControl"], { label: Object(external_wp_i18n_["__"])('Zoom'), min: constants_MIN_ZOOM, max: constants_MAX_ZOOM, value: Math.round(zoom), onChange: setZoom }); } }); } // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/check.js var check = __webpack_require__(161); // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/aspect-ratio.js /** * WordPress dependencies */ var aspect_ratio_aspectRatio = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M18.5 5.5h-13c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2v-9c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5h-13c-.3 0-.5-.2-.5-.5v-9c0-.3.2-.5.5-.5h13c.3 0 .5.2.5.5v9zM6.5 12H8v-2h2V8.5H6.5V12zm9.5 2h-2v1.5h3.5V12H16v2z" })); /* harmony default export */ var aspect_ratio = (aspect_ratio_aspectRatio); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/image-editing/aspect-ratio-dropdown.js /** * WordPress dependencies */ /** * Internal dependencies */ function AspectGroup(_ref) { var aspectRatios = _ref.aspectRatios, isDisabled = _ref.isDisabled, label = _ref.label, _onClick = _ref.onClick, value = _ref.value; return Object(external_wp_element_["createElement"])(external_wp_components_["MenuGroup"], { label: label }, aspectRatios.map(function (_ref2) { var title = _ref2.title, aspect = _ref2.aspect; return Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], { key: aspect, disabled: isDisabled, onClick: function onClick() { _onClick(aspect); }, role: "menuitemradio", isSelected: aspect === value, icon: aspect === value ? check["a" /* default */] : undefined }, title); })); } function AspectRatioDropdown(_ref3) { var toggleProps = _ref3.toggleProps; var _useImageEditingConte = context_useImageEditingContext(), isInProgress = _useImageEditingConte.isInProgress, aspect = _useImageEditingConte.aspect, setAspect = _useImageEditingConte.setAspect, defaultAspect = _useImageEditingConte.defaultAspect; return Object(external_wp_element_["createElement"])(external_wp_components_["DropdownMenu"], { icon: aspect_ratio, label: Object(external_wp_i18n_["__"])('Aspect Ratio'), popoverProps: constants_POPOVER_PROPS, toggleProps: toggleProps, className: "wp-block-image__aspect-ratio" }, function (_ref4) { var onClose = _ref4.onClose; return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(AspectGroup, { isDisabled: isInProgress, onClick: function onClick(newAspect) { setAspect(newAspect); onClose(); }, value: aspect, aspectRatios: [{ title: Object(external_wp_i18n_["__"])('Original'), aspect: defaultAspect }, { title: Object(external_wp_i18n_["__"])('Square'), aspect: 1 }] }), Object(external_wp_element_["createElement"])(AspectGroup, { label: Object(external_wp_i18n_["__"])('Landscape'), isDisabled: isInProgress, onClick: function onClick(newAspect) { setAspect(newAspect); onClose(); }, value: aspect, aspectRatios: [{ title: Object(external_wp_i18n_["__"])('16:10'), aspect: 16 / 10 }, { title: Object(external_wp_i18n_["__"])('16:9'), aspect: 16 / 9 }, { title: Object(external_wp_i18n_["__"])('4:3'), aspect: 4 / 3 }, { title: Object(external_wp_i18n_["__"])('3:2'), aspect: 3 / 2 }] }), Object(external_wp_element_["createElement"])(AspectGroup, { label: Object(external_wp_i18n_["__"])('Portrait'), isDisabled: isInProgress, onClick: function onClick(newAspect) { setAspect(newAspect); onClose(); }, value: aspect, aspectRatios: [{ title: Object(external_wp_i18n_["__"])('10:16'), aspect: 10 / 16 }, { title: Object(external_wp_i18n_["__"])('9:16'), aspect: 9 / 16 }, { title: Object(external_wp_i18n_["__"])('3:4'), aspect: 3 / 4 }, { title: Object(external_wp_i18n_["__"])('2:3'), aspect: 2 / 3 }] })); }); } // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/rotate-right.js /** * WordPress dependencies */ var rotateRight = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["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 */ var rotate_right = (rotateRight); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/image-editing/rotation-button.js /** * WordPress dependencies */ /** * Internal dependencies */ function RotationButton() { var _useImageEditingConte = context_useImageEditingContext(), isInProgress = _useImageEditingConte.isInProgress, rotateClockwise = _useImageEditingConte.rotateClockwise; return Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], { icon: rotate_right, label: Object(external_wp_i18n_["__"])('Rotate'), onClick: rotateClockwise, disabled: isInProgress }); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/image-editing/form-controls.js /** * WordPress dependencies */ /** * Internal dependencies */ function FormControls() { var _useImageEditingConte = context_useImageEditingContext(), isInProgress = _useImageEditingConte.isInProgress, apply = _useImageEditingConte.apply, cancel = _useImageEditingConte.cancel; return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], { onClick: apply, disabled: isInProgress }, Object(external_wp_i18n_["__"])('Apply')), Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], { onClick: cancel }, Object(external_wp_i18n_["__"])('Cancel'))); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/image-editing/index.js /** * WordPress dependencies */ /** * Internal dependencies */ function ImageEditor(_ref) { var url = _ref.url, width = _ref.width, height = _ref.height, clientWidth = _ref.clientWidth, naturalHeight = _ref.naturalHeight, naturalWidth = _ref.naturalWidth; return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(ImageCropper, { url: url, width: width, height: height, clientWidth: clientWidth, naturalHeight: naturalHeight, naturalWidth: naturalWidth }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], null, Object(external_wp_element_["createElement"])(ZoomDropdown, null), Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarItem"], null, function (toggleProps) { return Object(external_wp_element_["createElement"])(AspectRatioDropdown, { toggleProps: toggleProps }); })), Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], null, Object(external_wp_element_["createElement"])(RotationButton, null)), Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], null, Object(external_wp_element_["createElement"])(FormControls, null)))); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/constants.js var MIN_SIZE = 20; var LINK_DESTINATION_NONE = 'none'; var LINK_DESTINATION_MEDIA = 'media'; var LINK_DESTINATION_ATTACHMENT = 'attachment'; var LINK_DESTINATION_CUSTOM = 'custom'; var NEW_TAB_REL = ['noreferrer', 'noopener']; var ALLOWED_MEDIA_TYPES = ['image']; var DEFAULT_SIZE_SLUG = 'large'; // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/image.js /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ /** * Module constants */ function getFilename(url) { var path = Object(external_wp_url_["getPath"])(url); if (path) { return Object(external_lodash_["last"])(path.split('/')); } } function Image(_ref) { var _ref$attributes = _ref.attributes, _ref$attributes$url = _ref$attributes.url, url = _ref$attributes$url === void 0 ? '' : _ref$attributes$url, alt = _ref$attributes.alt, caption = _ref$attributes.caption, align = _ref$attributes.align, id = _ref$attributes.id, href = _ref$attributes.href, rel = _ref$attributes.rel, linkClass = _ref$attributes.linkClass, linkDestination = _ref$attributes.linkDestination, title = _ref$attributes.title, width = _ref$attributes.width, height = _ref$attributes.height, linkTarget = _ref$attributes.linkTarget, sizeSlug = _ref$attributes.sizeSlug, setAttributes = _ref.setAttributes, isSelected = _ref.isSelected, insertBlocksAfter = _ref.insertBlocksAfter, onReplace = _ref.onReplace, onSelectImage = _ref.onSelectImage, onSelectURL = _ref.onSelectURL, onUploadError = _ref.onUploadError, containerRef = _ref.containerRef; var captionRef = Object(external_wp_element_["useRef"])(); var prevUrl = Object(external_wp_compose_["usePrevious"])(url); var _useSelect = Object(external_wp_data_["useSelect"])(function (select) { var _select = select('core'), getMedia = _select.getMedia; var _select2 = select('core/block-editor'), getMultiSelectedBlockClientIds = _select2.getMultiSelectedBlockClientIds, getBlockName = _select2.getBlockName, getSelectedBlock = _select2.getSelectedBlock, getSelectedBlockClientId = _select2.getSelectedBlockClientId; var multiSelectedClientIds = getMultiSelectedBlockClientIds(); return { block: getSelectedBlock(), currentId: getSelectedBlockClientId(), image: id && isSelected ? getMedia(id) : null, multiImageSelection: multiSelectedClientIds.length && multiSelectedClientIds.every(function (clientId) { return getBlockName(clientId) === 'core/image'; }) }; }, [id, isSelected]), block = _useSelect.block, currentId = _useSelect.currentId, image = _useSelect.image, multiImageSelection = _useSelect.multiImageSelection; var _useSelect2 = Object(external_wp_data_["useSelect"])(function (select) { var _select3 = select('core/block-editor'), getSettings = _select3.getSettings; return Object(external_lodash_["pick"])(getSettings(), ['imageEditing', 'imageSizes', 'maxWidth', 'mediaUpload']); }), imageEditing = _useSelect2.imageEditing, imageSizes = _useSelect2.imageSizes, maxWidth = _useSelect2.maxWidth, mediaUpload = _useSelect2.mediaUpload; var _useDispatch = Object(external_wp_data_["useDispatch"])('core/block-editor'), replaceBlocks = _useDispatch.replaceBlocks, toggleSelection = _useDispatch.toggleSelection; var _useDispatch2 = Object(external_wp_data_["useDispatch"])(external_wp_notices_["store"]), createErrorNotice = _useDispatch2.createErrorNotice, createSuccessNotice = _useDispatch2.createSuccessNotice; var isLargeViewport = Object(external_wp_compose_["useViewportMatch"])('medium'); var _useState = Object(external_wp_element_["useState"])(false), _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2), captionFocused = _useState2[0], setCaptionFocused = _useState2[1]; var isWideAligned = Object(external_lodash_["includes"])(['wide', 'full'], align); var _useState3 = Object(external_wp_element_["useState"])({}), _useState4 = Object(slicedToArray["a" /* default */])(_useState3, 2), _useState4$ = _useState4[0], naturalWidth = _useState4$.naturalWidth, naturalHeight = _useState4$.naturalHeight, setNaturalSize = _useState4[1]; var _useState5 = Object(external_wp_element_["useState"])(false), _useState6 = Object(slicedToArray["a" /* default */])(_useState5, 2), isEditingImage = _useState6[0], setIsEditingImage = _useState6[1]; var _useState7 = Object(external_wp_element_["useState"])(), _useState8 = Object(slicedToArray["a" /* default */])(_useState7, 2), externalBlob = _useState8[0], setExternalBlob = _useState8[1]; var clientWidth = useClientWidth(containerRef, [align]); var isResizable = !isWideAligned && isLargeViewport; var imageSizeOptions = Object(external_lodash_["map"])(Object(external_lodash_["filter"])(imageSizes, function (_ref2) { var slug = _ref2.slug; return Object(external_lodash_["get"])(image, ['media_details', 'sizes', slug, 'source_url']); }), function (_ref3) { var name = _ref3.name, slug = _ref3.slug; return { value: slug, label: name }; }); // Check if the cover block is registered. var coverBlockExists = !!Object(external_wp_blocks_["getBlockType"])('core/cover'); Object(external_wp_element_["useEffect"])(function () { if (!isSelected) { setCaptionFocused(false); } }, [isSelected]); // If an image is externally hosted, try to fetch the image data. This may // fail if the image host doesn't allow CORS with the domain. If it works, // we can enable a button in the toolbar to upload the image. Object(external_wp_element_["useEffect"])(function () { if (!edit_isExternalImage(id, url) || !isSelected || externalBlob) { return; } window.fetch(url).then(function (response) { return response.blob(); }).then(function (blob) { return setExternalBlob(blob); }); }, [id, url, isSelected, externalBlob]); // Focus the caption after inserting an image from the placeholder. This is // done to preserve the behaviour of focussing the first tabbable element // when a block is mounted. Previously, the image block would remount when // the placeholder is removed. Maybe this behaviour could be removed. Object(external_wp_element_["useEffect"])(function () { if (url && !prevUrl && isSelected) { captionRef.current.focus(); } }, [url, prevUrl]); function onResizeStart() { toggleSelection(false); } function _onResizeStop() { toggleSelection(true); } function onImageError() { // Check if there's an embed block that handles this URL. var embedBlock = util_createUpgradedEmbedBlock({ attributes: { url: url } }); if (undefined !== embedBlock) { onReplace(embedBlock); } } function onSetHref(props) { setAttributes(props); } function onSetTitle(value) { // This is the HTML title attribute, separate from the media object // title. setAttributes({ title: value }); } function onFocusCaption() { if (!captionFocused) { setCaptionFocused(true); } } function onImageClick() { if (captionFocused) { setCaptionFocused(false); } } function updateAlt(newAlt) { setAttributes({ alt: newAlt }); } function updateImage(newSizeSlug) { var newUrl = Object(external_lodash_["get"])(image, ['media_details', 'sizes', newSizeSlug, 'source_url']); if (!newUrl) { return null; } setAttributes({ url: newUrl, width: undefined, height: undefined, sizeSlug: newSizeSlug }); } function uploadExternal() { mediaUpload({ filesList: [externalBlob], onFileChange: function onFileChange(_ref4) { var _ref5 = Object(slicedToArray["a" /* default */])(_ref4, 1), img = _ref5[0]; onSelectImage(img); if (Object(external_wp_blob_["isBlobURL"])(img.url)) { return; } setExternalBlob(); createSuccessNotice(Object(external_wp_i18n_["__"])('Image uploaded.'), { type: 'snackbar' }); }, allowedTypes: ALLOWED_MEDIA_TYPES, onError: function onError(message) { createErrorNotice(message, { type: 'snackbar' }); } }); } Object(external_wp_element_["useEffect"])(function () { if (!isSelected) { setIsEditingImage(false); } }, [isSelected]); var canEditImage = id && naturalWidth && naturalHeight && imageEditing; var allowCrop = !multiImageSelection && canEditImage && !isEditingImage; var controls = Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], null, !multiImageSelection && !isEditingImage && Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalImageURLInputUI"], { url: href || '', onChangeUrl: onSetHref, linkDestination: linkDestination, mediaUrl: image && image.source_url || url, mediaLink: image && image.link, linkTarget: linkTarget, linkClass: linkClass, rel: rel })), allowCrop && Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], { onClick: function onClick() { return setIsEditingImage(true); }, icon: library_crop, label: Object(external_wp_i18n_["__"])('Crop') })), externalBlob && Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], { onClick: uploadExternal, icon: upload["a" /* default */], label: Object(external_wp_i18n_["__"])('Upload external image') })), !multiImageSelection && !isEditingImage && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaReplaceFlow"], { mediaId: id, mediaURL: url, allowedTypes: ALLOWED_MEDIA_TYPES, accept: "image/*", onSelect: onSelectImage, onSelectURL: onSelectURL, onError: onUploadError }), !multiImageSelection && coverBlockExists && Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], { icon: text_color["a" /* default */], label: Object(external_wp_i18n_["__"])('Add text over image'), onClick: function onClick() { return replaceBlocks(currentId, Object(external_wp_blocks_["switchToBlockType"])(block, 'core/cover')); } }))), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], { title: Object(external_wp_i18n_["__"])('Image settings') }, !multiImageSelection && Object(external_wp_element_["createElement"])(external_wp_components_["TextareaControl"], { label: Object(external_wp_i18n_["__"])('Alt text (alternative text)'), value: alt, onChange: updateAlt, help: Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ExternalLink"], { href: "https://www.w3.org/WAI/tutorials/images/decision-tree" }, Object(external_wp_i18n_["__"])('Describe the purpose of the image')), Object(external_wp_i18n_["__"])('Leave empty if the image is purely decorative.')) }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalImageSizeControl"], { onChangeImage: updateImage, onChange: function onChange(value) { return setAttributes(value); }, slug: sizeSlug, width: width, height: height, imageSizeOptions: imageSizeOptions, isResizable: isResizable, imageWidth: naturalWidth, imageHeight: naturalHeight }))), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorAdvancedControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"], { label: Object(external_wp_i18n_["__"])('Title attribute'), value: title || '', onChange: onSetTitle, help: Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_i18n_["__"])('Describe the role of this image on the page.'), Object(external_wp_element_["createElement"])(external_wp_components_["ExternalLink"], { href: "https://www.w3.org/TR/html52/dom.html#the-title-attribute" }, Object(external_wp_i18n_["__"])('(Note: many devices and browsers do not display this text.)'))) }))); var filename = getFilename(url); var defaultedAlt; if (alt) { defaultedAlt = alt; } else if (filename) { defaultedAlt = Object(external_wp_i18n_["sprintf"])( /* translators: %s: file name */ Object(external_wp_i18n_["__"])('This image has an empty alt attribute; its file name is %s'), filename); } else { defaultedAlt = Object(external_wp_i18n_["__"])('This image has an empty alt attribute'); } var img = // Disable reason: Image itself is not meant to be interactive, but // should direct focus to block. /* eslint-disable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */ Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("img", { src: url, alt: defaultedAlt, onClick: onImageClick, onError: function onError() { return onImageError(); }, onLoad: function onLoad(event) { setNaturalSize(Object(external_lodash_["pick"])(event.target, ['naturalWidth', 'naturalHeight'])); } }), Object(external_wp_blob_["isBlobURL"])(url) && Object(external_wp_element_["createElement"])(external_wp_components_["Spinner"], null)) /* eslint-enable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */ ; var imageWidthWithinContainer; var imageHeightWithinContainer; if (clientWidth && naturalWidth && naturalHeight) { var exceedMaxWidth = naturalWidth > clientWidth; var ratio = naturalHeight / naturalWidth; imageWidthWithinContainer = exceedMaxWidth ? clientWidth : naturalWidth; imageHeightWithinContainer = exceedMaxWidth ? clientWidth * ratio : naturalHeight; } if (canEditImage && isEditingImage) { img = Object(external_wp_element_["createElement"])(ImageEditor, { url: url, width: width, height: height, clientWidth: clientWidth, naturalHeight: naturalHeight, naturalWidth: naturalWidth }); } else if (!isResizable || !imageWidthWithinContainer) { img = Object(external_wp_element_["createElement"])("div", { style: { width: width, height: height } }, img); } else { var currentWidth = width || imageWidthWithinContainer; var currentHeight = height || imageHeightWithinContainer; var _ratio = naturalWidth / naturalHeight; var minWidth = naturalWidth < naturalHeight ? MIN_SIZE : MIN_SIZE * _ratio; var minHeight = naturalHeight < naturalWidth ? MIN_SIZE : MIN_SIZE / _ratio; // With the current implementation of ResizableBox, an image needs an // explicit pixel value for the max-width. In absence of being able to // set the content-width, this max-width is currently dictated by the // vanilla editor style. The following variable adds a buffer to this // vanilla style, so 3rd party themes have some wiggleroom. This does, // in most cases, allow you to scale the image beyond the width of the // main column, though not infinitely. // @todo It would be good to revisit this once a content-width variable // becomes available. var maxWidthBuffer = maxWidth * 2.5; var showRightHandle = false; var showLeftHandle = false; /* eslint-disable no-lonely-if */ // See https://github.com/WordPress/gutenberg/issues/7584. if (align === 'center') { // When the image is centered, show both handles. showRightHandle = true; showLeftHandle = true; } else if (Object(external_wp_i18n_["isRTL"])()) { // In RTL mode the image is on the right by default. // Show the right handle and hide the left handle only when it is // aligned left. Otherwise always show the left handle. if (align === 'left') { showRightHandle = true; } else { showLeftHandle = true; } } else { // Show the left handle and hide the right handle only when the // image is aligned right. Otherwise always show the right handle. if (align === 'right') { showLeftHandle = true; } else { showRightHandle = true; } } /* eslint-enable no-lonely-if */ img = Object(external_wp_element_["createElement"])(external_wp_components_["ResizableBox"], { size: { width: width, height: height }, showHandle: isSelected, minWidth: minWidth, maxWidth: maxWidthBuffer, minHeight: minHeight, maxHeight: maxWidthBuffer / _ratio, lockAspectRatio: true, enable: { top: false, right: showRightHandle, bottom: true, left: showLeftHandle }, onResizeStart: onResizeStart, onResizeStop: function onResizeStop(event, direction, elt, delta) { _onResizeStop(); setAttributes({ width: parseInt(currentWidth + delta.width, 10), height: parseInt(currentHeight + delta.height, 10) }); } }, img); } return Object(external_wp_element_["createElement"])(ImageEditingProvider, { id: id, url: url, naturalWidth: naturalWidth, naturalHeight: naturalHeight, clientWidth: clientWidth, onSaveImage: function onSaveImage(imageAttributes) { return setAttributes(imageAttributes); }, isEditing: isEditingImage, onFinishEditing: function onFinishEditing() { return setIsEditingImage(false); } }, controls, img, (!external_wp_blockEditor_["RichText"].isEmpty(caption) || isSelected) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], { ref: captionRef, tagName: "figcaption", "aria-label": Object(external_wp_i18n_["__"])('Image caption text'), placeholder: Object(external_wp_i18n_["__"])('Write caption…'), value: caption, unstableOnFocus: onFocusCaption, onChange: function onChange(value) { return setAttributes({ caption: value }); }, isSelected: captionFocused, inlineToolbar: true, __unstableOnSplitAtEnd: function __unstableOnSplitAtEnd() { return insertBlocksAfter(Object(external_wp_blocks_["createBlock"])('core/paragraph')); } })); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/edit.js function image_edit_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 image_edit_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { image_edit_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { image_edit_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } /** * External dependencies */ /** * WordPress dependencies */ /* global wp */ /** * Internal dependencies */ /** * Module constants */ var edit_pickRelevantMediaFiles = function pickRelevantMediaFiles(image) { var imageProps = Object(external_lodash_["pick"])(image, ['alt', 'id', 'link', 'caption']); imageProps.url = Object(external_lodash_["get"])(image, ['sizes', 'large', 'url']) || Object(external_lodash_["get"])(image, ['media_details', 'sizes', 'large', 'source_url']) || image.url; return imageProps; }; /** * Is the URL a temporary blob URL? A blob URL is one that is used temporarily * while the image is being uploaded and will not have an id yet allocated. * * @param {number=} id The id of the image. * @param {string=} url The url of the image. * * @return {boolean} Is the URL a Blob URL */ var edit_isTemporaryImage = function isTemporaryImage(id, url) { return !id && Object(external_wp_blob_["isBlobURL"])(url); }; /** * Is the url for the image hosted externally. An externally hosted image has no * id and is not a blob url. * * @param {number=} id The id of the image. * @param {string=} url The url of the image. * * @return {boolean} Is the url an externally hosted url? */ var edit_isExternalImage = function isExternalImage(id, url) { return url && !id && !Object(external_wp_blob_["isBlobURL"])(url); }; function ImageEdit(_ref) { var attributes = _ref.attributes, setAttributes = _ref.setAttributes, isSelected = _ref.isSelected, className = _ref.className, noticeUI = _ref.noticeUI, insertBlocksAfter = _ref.insertBlocksAfter, noticeOperations = _ref.noticeOperations, onReplace = _ref.onReplace; var _attributes$url = attributes.url, url = _attributes$url === void 0 ? '' : _attributes$url, alt = attributes.alt, caption = attributes.caption, align = attributes.align, id = attributes.id, width = attributes.width, height = attributes.height, sizeSlug = attributes.sizeSlug; var altRef = Object(external_wp_element_["useRef"])(); Object(external_wp_element_["useEffect"])(function () { altRef.current = alt; }, [alt]); var captionRef = Object(external_wp_element_["useRef"])(); Object(external_wp_element_["useEffect"])(function () { captionRef.current = caption; }, [caption]); var ref = Object(external_wp_element_["useRef"])(); var mediaUpload = Object(external_wp_data_["useSelect"])(function (select) { var _select = select('core/block-editor'), getSettings = _select.getSettings; return getSettings().mediaUpload; }); function onUploadError(message) { noticeOperations.removeAllNotices(); noticeOperations.createErrorNotice(message); } function onSelectImage(media) { var _wp, _wp$media, _wp$media$view, _wp$media$view$settin, _wp$media$view$settin2; if (!media || !media.url) { setAttributes({ url: undefined, alt: undefined, id: undefined, title: undefined, caption: undefined }); return; } var mediaAttributes = edit_pickRelevantMediaFiles(media); // If the current image is temporary but an alt text was meanwhile // written by the user, make sure the text is not overwritten. if (edit_isTemporaryImage(id, url)) { if (altRef.current) { mediaAttributes = Object(external_lodash_["omit"])(mediaAttributes, ['alt']); } } // If a caption text was meanwhile written by the user, // make sure the text is not overwritten by empty captions. if (captionRef.current && !Object(external_lodash_["get"])(mediaAttributes, ['caption'])) { mediaAttributes = Object(external_lodash_["omit"])(mediaAttributes, ['caption']); } var additionalAttributes; // Reset the dimension attributes if changing to a different image. if (!media.id || media.id !== id) { additionalAttributes = { width: undefined, height: undefined, sizeSlug: DEFAULT_SIZE_SLUG }; } else { // Keep the same url when selecting the same file, so "Image Size" // option is not changed. additionalAttributes = { url: url }; } // Check if default link setting should be used. var linkDestination = attributes.linkDestination; if (!linkDestination) { // Use the WordPress option to determine the proper default. // The constants used in Gutenberg do not match WP options so a little more complicated than ideal. // TODO: fix this in a follow up PR, requires updating media-text and ui component. switch (((_wp = wp) === null || _wp === void 0 ? void 0 : (_wp$media = _wp.media) === null || _wp$media === void 0 ? void 0 : (_wp$media$view = _wp$media.view) === null || _wp$media$view === void 0 ? void 0 : (_wp$media$view$settin = _wp$media$view.settings) === null || _wp$media$view$settin === void 0 ? void 0 : (_wp$media$view$settin2 = _wp$media$view$settin.defaultProps) === null || _wp$media$view$settin2 === void 0 ? void 0 : _wp$media$view$settin2.link) || LINK_DESTINATION_NONE) { case 'file': case LINK_DESTINATION_MEDIA: linkDestination = LINK_DESTINATION_MEDIA; break; case 'post': case LINK_DESTINATION_ATTACHMENT: linkDestination = LINK_DESTINATION_ATTACHMENT; break; case LINK_DESTINATION_CUSTOM: linkDestination = LINK_DESTINATION_CUSTOM; break; case LINK_DESTINATION_NONE: linkDestination = LINK_DESTINATION_NONE; break; } } // Check if the image is linked to it's media. var href; switch (linkDestination) { case LINK_DESTINATION_MEDIA: href = media.url; break; case LINK_DESTINATION_ATTACHMENT: href = media.link; break; } mediaAttributes.href = href; setAttributes(image_edit_objectSpread(image_edit_objectSpread(image_edit_objectSpread({}, mediaAttributes), additionalAttributes), {}, { linkDestination: linkDestination })); } function onSelectURL(newURL) { if (newURL !== url) { setAttributes({ url: newURL, id: undefined, sizeSlug: DEFAULT_SIZE_SLUG }); } } function updateAlignment(nextAlign) { var extraUpdatedAttributes = ['wide', 'full'].includes(nextAlign) ? { width: undefined, height: undefined } : {}; setAttributes(image_edit_objectSpread(image_edit_objectSpread({}, extraUpdatedAttributes), {}, { align: nextAlign })); } var isTemp = edit_isTemporaryImage(id, url); // Upload a temporary image on mount. Object(external_wp_element_["useEffect"])(function () { if (!isTemp) { return; } var file = Object(external_wp_blob_["getBlobByURL"])(url); if (file) { mediaUpload({ filesList: [file], onFileChange: function onFileChange(_ref2) { var _ref3 = Object(slicedToArray["a" /* default */])(_ref2, 1), img = _ref3[0]; onSelectImage(img); }, allowedTypes: ALLOWED_MEDIA_TYPES, onError: function onError(message) { noticeOperations.createErrorNotice(message); setAttributes({ src: undefined, id: undefined, url: undefined }); } }); } }, []); // If an image is temporary, revoke the Blob url when it is uploaded (and is // no longer temporary). Object(external_wp_element_["useEffect"])(function () { if (!isTemp) { return; } return function () { Object(external_wp_blob_["revokeBlobURL"])(url); }; }, [isTemp]); var isExternal = edit_isExternalImage(id, url); var controls = Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockAlignmentToolbar"], { value: align, onChange: updateAlignment })); var src = isExternal ? url : undefined; var mediaPreview = !!url && Object(external_wp_element_["createElement"])("img", { alt: Object(external_wp_i18n_["__"])('Edit image'), title: Object(external_wp_i18n_["__"])('Edit image'), className: 'edit-image-preview', src: url }); var mediaPlaceholder = Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaPlaceholder"], { icon: Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockIcon"], { icon: library_image }), onSelect: onSelectImage, onSelectURL: onSelectURL, notices: noticeUI, onError: onUploadError, accept: "image/*", allowedTypes: ALLOWED_MEDIA_TYPES, value: { id: id, src: src }, mediaPreview: mediaPreview, disableMediaButtons: url }); var classes = classnames_default()(className, Object(defineProperty["a" /* default */])({ 'is-transient': Object(external_wp_blob_["isBlobURL"])(url), 'is-resized': !!width || !!height, 'is-focused': isSelected }, "size-".concat(sizeSlug), sizeSlug)); var blockProps = Object(external_wp_blockEditor_["useBlockProps"])({ ref: ref, className: classes }); return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, controls, Object(external_wp_element_["createElement"])("figure", blockProps, url && Object(external_wp_element_["createElement"])(Image, { attributes: attributes, setAttributes: setAttributes, isSelected: isSelected, insertBlocksAfter: insertBlocksAfter, onReplace: onReplace, onSelectImage: onSelectImage, onSelectURL: onSelectURL, onUploadError: onUploadError, containerRef: ref }), mediaPlaceholder)); } /* harmony default export */ var image_edit = (Object(external_wp_components_["withNotices"])(ImageEdit)); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/save.js /** * External dependencies */ /** * WordPress dependencies */ function image_save_save(_ref) { var _classnames; var attributes = _ref.attributes; var url = attributes.url, alt = attributes.alt, caption = attributes.caption, align = attributes.align, href = attributes.href, rel = attributes.rel, linkClass = attributes.linkClass, width = attributes.width, height = attributes.height, id = attributes.id, linkTarget = attributes.linkTarget, sizeSlug = attributes.sizeSlug, title = attributes.title; var newRel = Object(external_lodash_["isEmpty"])(rel) ? undefined : rel; var classes = classnames_default()((_classnames = {}, Object(defineProperty["a" /* default */])(_classnames, "align".concat(align), align), Object(defineProperty["a" /* default */])(_classnames, "size-".concat(sizeSlug), sizeSlug), Object(defineProperty["a" /* default */])(_classnames, 'is-resized', width || height), _classnames)); var image = Object(external_wp_element_["createElement"])("img", { src: url, alt: alt, className: id ? "wp-image-".concat(id) : null, width: width, height: height, title: title }); var figure = Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, href ? Object(external_wp_element_["createElement"])("a", { className: linkClass, href: href, target: linkTarget, rel: newRel }, image) : image, !external_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "figcaption", value: caption })); if ('left' === align || 'right' === align || 'center' === align) { return Object(external_wp_element_["createElement"])("div", external_wp_blockEditor_["useBlockProps"].save(), Object(external_wp_element_["createElement"])("figure", { className: classes }, figure)); } return Object(external_wp_element_["createElement"])("figure", external_wp_blockEditor_["useBlockProps"].save({ className: classes }), figure); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/transforms.js function transforms_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 transforms_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { transforms_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { transforms_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } /** * WordPress dependencies */ function stripFirstImage(attributes, _ref) { var shortcode = _ref.shortcode; var _document$implementat = document.implementation.createHTMLDocument(''), body = _document$implementat.body; body.innerHTML = shortcode.content; var nodeToRemove = body.querySelector('img'); // if an image has parents, find the topmost node to remove while (nodeToRemove && nodeToRemove.parentNode && nodeToRemove.parentNode !== body) { nodeToRemove = nodeToRemove.parentNode; } if (nodeToRemove) { nodeToRemove.parentNode.removeChild(nodeToRemove); } return body.innerHTML.trim(); } function getFirstAnchorAttributeFormHTML(html, attributeName) { var _document$implementat2 = document.implementation.createHTMLDocument(''), body = _document$implementat2.body; body.innerHTML = html; var firstElementChild = body.firstElementChild; if (firstElementChild && firstElementChild.nodeName === 'A') { return firstElementChild.getAttribute(attributeName) || undefined; } } var imageSchema = { img: { attributes: ['src', 'alt', 'title'], classes: ['alignleft', 'aligncenter', 'alignright', 'alignnone', /^wp-image-\d+$/] } }; var schema = function schema(_ref2) { var phrasingContentSchema = _ref2.phrasingContentSchema; return { figure: { require: ['img'], children: transforms_objectSpread(transforms_objectSpread({}, imageSchema), {}, { a: { attributes: ['href', 'rel', 'target'], children: imageSchema }, figcaption: { children: phrasingContentSchema } }) } }; }; var transforms_transforms = { from: [{ type: 'raw', isMatch: function isMatch(node) { return node.nodeName === 'FIGURE' && !!node.querySelector('img'); }, schema: schema, transform: function transform(node) { // Search both figure and image classes. Alignment could be // set on either. ID is set on the image. var className = node.className + ' ' + node.querySelector('img').className; var alignMatches = /(?:^|\s)align(left|center|right)(?:$|\s)/.exec(className); var anchor = node.id === '' ? undefined : node.id; var align = alignMatches ? alignMatches[1] : undefined; var idMatches = /(?:^|\s)wp-image-(\d+)(?:$|\s)/.exec(className); var id = idMatches ? Number(idMatches[1]) : undefined; var anchorElement = node.querySelector('a'); var linkDestination = anchorElement && anchorElement.href ? 'custom' : undefined; var href = anchorElement && anchorElement.href ? anchorElement.href : undefined; var rel = anchorElement && anchorElement.rel ? anchorElement.rel : undefined; var linkClass = anchorElement && anchorElement.className ? anchorElement.className : undefined; var attributes = Object(external_wp_blocks_["getBlockAttributes"])('core/image', node.outerHTML, { align: align, id: id, linkDestination: linkDestination, href: href, rel: rel, linkClass: linkClass, anchor: anchor }); return Object(external_wp_blocks_["createBlock"])('core/image', attributes); } }, { type: 'files', isMatch: function isMatch(files) { return files.length === 1 && files[0].type.indexOf('image/') === 0; }, transform: function transform(files) { var file = files[0]; // We don't need to upload the media directly here // It's already done as part of the `componentDidMount` // int the image block return Object(external_wp_blocks_["createBlock"])('core/image', { url: Object(external_wp_blob_["createBlobURL"])(file) }); } }, { type: 'shortcode', tag: 'caption', attributes: { url: { type: 'string', source: 'attribute', attribute: 'src', selector: 'img' }, alt: { type: 'string', source: 'attribute', attribute: 'alt', selector: 'img' }, caption: { shortcode: stripFirstImage }, href: { shortcode: function shortcode(attributes, _ref3) { var _shortcode = _ref3.shortcode; return getFirstAnchorAttributeFormHTML(_shortcode.content, 'href'); } }, rel: { shortcode: function shortcode(attributes, _ref4) { var _shortcode2 = _ref4.shortcode; return getFirstAnchorAttributeFormHTML(_shortcode2.content, 'rel'); } }, linkClass: { shortcode: function shortcode(attributes, _ref5) { var _shortcode3 = _ref5.shortcode; return getFirstAnchorAttributeFormHTML(_shortcode3.content, 'class'); } }, id: { type: 'number', shortcode: function shortcode(_ref6) { var id = _ref6.named.id; if (!id) { return; } return parseInt(id.replace('attachment_', ''), 10); } }, align: { type: 'string', shortcode: function shortcode(_ref7) { var _ref7$named$align = _ref7.named.align, align = _ref7$named$align === void 0 ? 'alignnone' : _ref7$named$align; return align.replace('align', ''); } } } }] }; /* harmony default export */ var image_transforms = (transforms_transforms); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/index.js /** * WordPress dependencies */ /** * Internal dependencies */ var image_metadata = { apiVersion: 2, name: "core/image", category: "media", attributes: { align: { type: "string" }, url: { type: "string", source: "attribute", selector: "img", attribute: "src" }, alt: { type: "string", source: "attribute", selector: "img", attribute: "alt", "default": "" }, caption: { type: "string", source: "html", selector: "figcaption" }, title: { type: "string", source: "attribute", selector: "img", attribute: "title" }, href: { type: "string", source: "attribute", selector: "figure > a", attribute: "href" }, rel: { type: "string", source: "attribute", selector: "figure > a", attribute: "rel" }, linkClass: { type: "string", source: "attribute", selector: "figure > a", attribute: "class" }, id: { type: "number" }, width: { type: "number" }, height: { type: "number" }, sizeSlug: { type: "string" }, linkDestination: { type: "string" }, linkTarget: { type: "string", source: "attribute", selector: "figure > a", attribute: "target" } }, supports: { anchor: true, __experimentalBorder: { radius: true } }, editorStyle: "wp-block-image-editor", style: "wp-block-image" }; var image_name = image_metadata.name; var image_settings = { title: Object(external_wp_i18n_["_x"])('Image', 'block title'), description: Object(external_wp_i18n_["__"])('Insert an image to make a visual statement.'), icon: library_image, keywords: ['img', // "img" is not translated as it is intended to reflect the HTML tag. Object(external_wp_i18n_["__"])('photo'), Object(external_wp_i18n_["__"])('picture')], example: { attributes: { sizeSlug: 'large', url: 'https://s.w.org/images/core/5.3/MtBlanc1.jpg', // translators: Caption accompanying an image of the Mont Blanc, which serves as an example for the Image block. caption: Object(external_wp_i18n_["__"])('Mont Blanc appears—still, snowy, and serene.') } }, styles: [{ name: 'default', label: Object(external_wp_i18n_["_x"])('Default', 'block style'), isDefault: true }, { name: 'rounded', label: Object(external_wp_i18n_["_x"])('Rounded', 'block style') }], __experimentalLabel: function __experimentalLabel(attributes, _ref) { var context = _ref.context; if (context === 'accessibility') { var caption = attributes.caption, alt = attributes.alt, url = attributes.url; if (!url) { return Object(external_wp_i18n_["__"])('Empty'); } if (!alt) { return caption || ''; } // This is intended to be read by a screen reader. // A period simply means a pause, no need to translate it. return alt + (caption ? '. ' + caption : ''); } }, getEditWrapperProps: function getEditWrapperProps(attributes) { return { 'data-align': attributes.align }; }, transforms: image_transforms, edit: image_edit, save: image_save_save, deprecated: image_deprecated }; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/heading.js /** * WordPress dependencies */ var heading = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M6.2 5.2v13.4l5.8-4.8 5.8 4.8V5.2z" })); /* harmony default export */ var library_heading = (heading); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js var objectWithoutProperties = __webpack_require__(13); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/deprecated.js function deprecated_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 deprecated_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { deprecated_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { deprecated_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } /** * External dependencies */ /** * WordPress dependencies */ var blockSupports = { className: false, anchor: true }; var heading_deprecated_blockAttributes = { align: { type: 'string' }, content: { type: 'string', source: 'html', selector: 'h1,h2,h3,h4,h5,h6', default: '' }, level: { type: 'number', default: 2 }, placeholder: { type: 'string' } }; var deprecated_migrateCustomColors = function migrateCustomColors(attributes) { if (!attributes.customTextColor) { return attributes; } var style = { color: { text: attributes.customTextColor } }; return deprecated_objectSpread(deprecated_objectSpread({}, Object(external_lodash_["omit"])(attributes, ['customTextColor'])), {}, { style: style }); }; var TEXT_ALIGN_OPTIONS = ['left', 'right', 'center']; var deprecated_migrateTextAlign = function migrateTextAlign(attributes) { var align = attributes.align, rest = Object(objectWithoutProperties["a" /* default */])(attributes, ["align"]); return TEXT_ALIGN_OPTIONS.includes(align) ? deprecated_objectSpread(deprecated_objectSpread({}, rest), {}, { textAlign: align }) : attributes; }; var heading_deprecated_deprecated = [{ supports: { align: ['wide', 'full'], anchor: true, className: false, color: { link: true }, fontSize: true, lineHeight: true, __experimentalSelector: { 'core/heading/h1': 'h1', 'core/heading/h2': 'h2', 'core/heading/h3': 'h3', 'core/heading/h4': 'h4', 'core/heading/h5': 'h5', 'core/heading/h6': 'h6' }, __unstablePasteTextInline: true }, attributes: heading_deprecated_blockAttributes, isEligible: function isEligible(_ref) { var align = _ref.align; return TEXT_ALIGN_OPTIONS.includes(align); }, migrate: deprecated_migrateTextAlign, save: function save(_ref2) { var attributes = _ref2.attributes; var align = attributes.align, content = attributes.content, level = attributes.level; var TagName = 'h' + level; var className = classnames_default()(Object(defineProperty["a" /* default */])({}, "has-text-align-".concat(align), align)); return Object(external_wp_element_["createElement"])(TagName, external_wp_blockEditor_["useBlockProps"].save({ className: className }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { value: content })); } }, { supports: blockSupports, attributes: deprecated_objectSpread(deprecated_objectSpread({}, heading_deprecated_blockAttributes), {}, { customTextColor: { type: 'string' }, textColor: { type: 'string' } }), migrate: function migrate(attributes) { return deprecated_migrateCustomColors(deprecated_migrateTextAlign(attributes)); }, save: function save(_ref3) { var _classnames2; var attributes = _ref3.attributes; var align = attributes.align, content = attributes.content, customTextColor = attributes.customTextColor, level = attributes.level, textColor = attributes.textColor; var tagName = 'h' + level; var textClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor); var className = classnames_default()((_classnames2 = {}, Object(defineProperty["a" /* default */])(_classnames2, textClass, textClass), Object(defineProperty["a" /* default */])(_classnames2, 'has-text-color', textColor || customTextColor), Object(defineProperty["a" /* default */])(_classnames2, "has-text-align-".concat(align), align), _classnames2)); return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { className: className ? className : undefined, tagName: tagName, style: { color: textClass ? undefined : customTextColor }, value: content }); } }, { attributes: deprecated_objectSpread(deprecated_objectSpread({}, heading_deprecated_blockAttributes), {}, { customTextColor: { type: 'string' }, textColor: { type: 'string' } }), migrate: function migrate(attributes) { return deprecated_migrateCustomColors(deprecated_migrateTextAlign(attributes)); }, save: function save(_ref4) { var _classnames3; var attributes = _ref4.attributes; var align = attributes.align, content = attributes.content, customTextColor = attributes.customTextColor, level = attributes.level, textColor = attributes.textColor; var tagName = 'h' + level; var textClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor); var className = classnames_default()((_classnames3 = {}, Object(defineProperty["a" /* default */])(_classnames3, textClass, textClass), Object(defineProperty["a" /* default */])(_classnames3, "has-text-align-".concat(align), align), _classnames3)); return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { className: className ? className : undefined, tagName: tagName, style: { color: textClass ? undefined : customTextColor }, value: content }); }, supports: blockSupports }, { supports: blockSupports, attributes: deprecated_objectSpread(deprecated_objectSpread({}, heading_deprecated_blockAttributes), {}, { customTextColor: { type: 'string' }, textColor: { type: 'string' } }), migrate: function migrate(attributes) { return deprecated_migrateCustomColors(deprecated_migrateTextAlign(attributes)); }, save: function save(_ref5) { var attributes = _ref5.attributes; var align = attributes.align, level = attributes.level, content = attributes.content, textColor = attributes.textColor, customTextColor = attributes.customTextColor; var tagName = 'h' + level; var textClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor); var className = classnames_default()(Object(defineProperty["a" /* default */])({}, textClass, textClass)); return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { className: className ? className : undefined, tagName: tagName, style: { textAlign: align, color: textClass ? undefined : customTextColor }, value: content }); } }]; /* harmony default export */ var heading_deprecated = (heading_deprecated_deprecated); // EXTERNAL MODULE: external ["wp","keycodes"] var external_wp_keycodes_ = __webpack_require__(17); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/heading-level-icon.js /** * WordPress dependencies */ /** @typedef {import('@wordpress/element').WPComponent} WPComponent */ /** * HeadingLevelIcon props. * * @typedef WPHeadingLevelIconProps * * @property {number} level The heading level to show an icon for. * @property {?boolean} isPressed Whether or not the icon should appear pressed; default: false. */ /** * Heading level icon. * * @param {WPHeadingLevelIconProps} props Component props. * * @return {?WPComponent} The icon. */ function HeadingLevelIcon(_ref) { var level = _ref.level, _ref$isPressed = _ref.isPressed, isPressed = _ref$isPressed === void 0 ? false : _ref$isPressed; var levelToPath = { 1: 'M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z', 2: 'M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z', 3: 'M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z', 4: 'M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z', 5: 'M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z', 6: 'M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z' }; if (!levelToPath.hasOwnProperty(level)) { return null; } return Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], { width: "24", height: "24", viewBox: "0 0 20 20", xmlns: "http://www.w3.org/2000/svg", isPressed: isPressed }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], { d: levelToPath[level] })); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/heading-level-dropdown.js /** * WordPress dependencies */ /** * Internal dependencies */ var HEADING_LEVELS = [1, 2, 3, 4, 5, 6]; var heading_level_dropdown_POPOVER_PROPS = { className: 'block-library-heading-level-dropdown', isAlternate: true }; /** @typedef {import('@wordpress/element').WPComponent} WPComponent */ /** * HeadingLevelDropdown props. * * @typedef WPHeadingLevelDropdownProps * * @property {number} selectedLevel The chosen heading level. * @property {(newValue:number)=>any} onChange Callback to run when * toolbar value is changed. */ /** * Dropdown for selecting a heading level (1 through 6). * * @param {WPHeadingLevelDropdownProps} props Component props. * * @return {WPComponent} The toolbar. */ function HeadingLevelDropdown(_ref) { var selectedLevel = _ref.selectedLevel, onChange = _ref.onChange; return Object(external_wp_element_["createElement"])(external_wp_components_["Dropdown"], { popoverProps: heading_level_dropdown_POPOVER_PROPS, renderToggle: function renderToggle(_ref2) { var onToggle = _ref2.onToggle, isOpen = _ref2.isOpen; var openOnArrowDown = function openOnArrowDown(event) { if (!isOpen && event.keyCode === external_wp_keycodes_["DOWN"]) { event.preventDefault(); event.stopPropagation(); onToggle(); } }; return Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], { "aria-expanded": isOpen, "aria-haspopup": "true", icon: Object(external_wp_element_["createElement"])(HeadingLevelIcon, { level: selectedLevel }), label: Object(external_wp_i18n_["__"])('Change heading level'), onClick: onToggle, onKeyDown: openOnArrowDown, showTooltip: true }); }, renderContent: function renderContent() { return Object(external_wp_element_["createElement"])(external_wp_components_["Toolbar"], { className: "block-library-heading-level-toolbar", label: Object(external_wp_i18n_["__"])('Change heading level') }, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], { isCollapsed: false, controls: HEADING_LEVELS.map(function (targetLevel) { var isActive = targetLevel === selectedLevel; return { icon: Object(external_wp_element_["createElement"])(HeadingLevelIcon, { level: targetLevel, isPressed: isActive }), title: Object(external_wp_i18n_["sprintf"])( // translators: %s: heading level e.g: "1", "2", "3" Object(external_wp_i18n_["__"])('Heading %d'), targetLevel), isActive: isActive, onClick: function onClick() { onChange(targetLevel); } }; }) })); } }); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/edit.js function heading_edit_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 heading_edit_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { heading_edit_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { heading_edit_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ function HeadingEdit(_ref) { var attributes = _ref.attributes, setAttributes = _ref.setAttributes, mergeBlocks = _ref.mergeBlocks, onReplace = _ref.onReplace, mergedStyle = _ref.mergedStyle; var textAlign = attributes.textAlign, content = attributes.content, level = attributes.level, placeholder = attributes.placeholder; var tagName = 'h' + level; var blockProps = Object(external_wp_blockEditor_["useBlockProps"])({ className: classnames_default()(Object(defineProperty["a" /* default */])({}, "has-text-align-".concat(textAlign), textAlign)), style: mergedStyle }); return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], null, Object(external_wp_element_["createElement"])(HeadingLevelDropdown, { selectedLevel: level, onChange: function onChange(newLevel) { return setAttributes({ level: newLevel }); } })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["AlignmentToolbar"], { value: textAlign, onChange: function onChange(nextAlign) { setAttributes({ textAlign: nextAlign }); } })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], Object(esm_extends["a" /* default */])({ identifier: "content", tagName: tagName, value: content, onChange: function onChange(value) { return setAttributes({ content: value }); }, onMerge: mergeBlocks, onSplit: function onSplit(value) { if (!value) { return Object(external_wp_blocks_["createBlock"])('core/paragraph'); } return Object(external_wp_blocks_["createBlock"])('core/heading', heading_edit_objectSpread(heading_edit_objectSpread({}, attributes), {}, { content: value })); }, onReplace: onReplace, onRemove: function onRemove() { return onReplace([]); }, "aria-label": Object(external_wp_i18n_["__"])('Heading text'), placeholder: placeholder || Object(external_wp_i18n_["__"])('Write heading…'), textAlign: textAlign }, blockProps))); } /* harmony default export */ var heading_edit = (HeadingEdit); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/save.js /** * External dependencies */ /** * WordPress dependencies */ function heading_save_save(_ref) { var attributes = _ref.attributes; var textAlign = attributes.textAlign, content = attributes.content, level = attributes.level; var TagName = 'h' + level; var className = classnames_default()(Object(defineProperty["a" /* default */])({}, "has-text-align-".concat(textAlign), textAlign)); return Object(external_wp_element_["createElement"])(TagName, external_wp_blockEditor_["useBlockProps"].save({ className: className }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { value: content })); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/shared.js /** * Given a node name string for a heading node, returns its numeric level. * * @param {string} nodeName Heading node name. * * @return {number} Heading level. */ function getLevelFromHeadingNodeName(nodeName) { return Number(nodeName.substr(1)); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/transforms.js /** * WordPress dependencies */ /** * Internal dependencies */ var transforms_apiVersion$name$cate = { apiVersion: 2, name: "core/heading", category: "text", attributes: { textAlign: { type: "string" }, content: { type: "string", source: "html", selector: "h1,h2,h3,h4,h5,h6", "default": "" }, level: { type: "number", "default": 2 }, placeholder: { type: "string" } }, supports: { align: ["wide", "full"], anchor: true, className: false, color: { link: true }, fontSize: true, lineHeight: true, __experimentalSelector: { "core/heading/h1": { selector: "h1", title: "h1", attributes: { level: 1 } }, "core/heading/h2": { selector: "h2", title: "h2", attributes: { level: 2 } }, "core/heading/h3": { selector: "h3", title: "h3", attributes: { level: 3 } }, "core/heading/h4": { selector: "h4", title: "h4", attributes: { level: 4 } }, "core/heading/h5": { selector: "h5", title: "h5", attributes: { level: 5 } }, "core/heading/h6": { selector: "h6", title: "h6", attributes: { level: 6 } } }, __unstablePasteTextInline: true }, editorStyle: "wp-block-heading-editor", style: "wp-block-heading" }, heading_transforms_name = transforms_apiVersion$name$cate.name; var heading_transforms_transforms = { from: [{ type: 'block', isMultiBlock: true, blocks: ['core/paragraph'], transform: function transform(attributes) { return attributes.map(function (_ref) { var content = _ref.content, anchor = _ref.anchor; return Object(external_wp_blocks_["createBlock"])(heading_transforms_name, { content: content, anchor: anchor }); }); } }, { type: 'raw', selector: 'h1,h2,h3,h4,h5,h6', schema: function schema(_ref2) { var phrasingContentSchema = _ref2.phrasingContentSchema, isPaste = _ref2.isPaste; var schema = { children: phrasingContentSchema, attributes: isPaste ? [] : ['style', 'id'] }; return { h1: schema, h2: schema, h3: schema, h4: schema, h5: schema, h6: schema }; }, transform: function transform(node) { var attributes = Object(external_wp_blocks_["getBlockAttributes"])(heading_transforms_name, node.outerHTML); var _ref3 = node.style || {}, textAlign = _ref3.textAlign; attributes.level = getLevelFromHeadingNodeName(node.nodeName); if (textAlign === 'left' || textAlign === 'center' || textAlign === 'right') { attributes.align = textAlign; } return Object(external_wp_blocks_["createBlock"])(heading_transforms_name, attributes); } }].concat(Object(toConsumableArray["a" /* default */])([1, 2, 3, 4, 5, 6].map(function (level) { return { type: 'prefix', prefix: Array(level + 1).join('#'), transform: function transform(content) { return Object(external_wp_blocks_["createBlock"])(heading_transforms_name, { level: level, content: content }); } }; })), Object(toConsumableArray["a" /* default */])([1, 2, 3, 4, 5, 6].map(function (level) { return { type: 'enter', regExp: new RegExp("^/(h|H)".concat(level, "$")), transform: function transform(content) { return Object(external_wp_blocks_["createBlock"])(heading_transforms_name, { level: level, content: content }); } }; }))), to: [{ type: 'block', isMultiBlock: true, blocks: ['core/paragraph'], transform: function transform(attributes) { return attributes.map(function (_ref4) { var content = _ref4.content, anchor = _ref4.anchor; return Object(external_wp_blocks_["createBlock"])('core/paragraph', { content: content, anchor: anchor }); }); } }] }; /* harmony default export */ var heading_transforms = (heading_transforms_transforms); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/index.js /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ var heading_metadata = { apiVersion: 2, name: "core/heading", category: "text", attributes: { textAlign: { type: "string" }, content: { type: "string", source: "html", selector: "h1,h2,h3,h4,h5,h6", "default": "" }, level: { type: "number", "default": 2 }, placeholder: { type: "string" } }, supports: { align: ["wide", "full"], anchor: true, className: false, color: { link: true }, fontSize: true, lineHeight: true, __experimentalSelector: { "core/heading/h1": { selector: "h1", title: "h1", attributes: { level: 1 } }, "core/heading/h2": { selector: "h2", title: "h2", attributes: { level: 2 } }, "core/heading/h3": { selector: "h3", title: "h3", attributes: { level: 3 } }, "core/heading/h4": { selector: "h4", title: "h4", attributes: { level: 4 } }, "core/heading/h5": { selector: "h5", title: "h5", attributes: { level: 5 } }, "core/heading/h6": { selector: "h6", title: "h6", attributes: { level: 6 } } }, __unstablePasteTextInline: true }, editorStyle: "wp-block-heading-editor", style: "wp-block-heading" }; var heading_name = heading_metadata.name; var heading_settings = { title: Object(external_wp_i18n_["_x"])('Heading', 'block title'), description: Object(external_wp_i18n_["__"])('Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content.'), icon: library_heading, keywords: [Object(external_wp_i18n_["__"])('title'), Object(external_wp_i18n_["__"])('subtitle')], example: { attributes: { content: Object(external_wp_i18n_["__"])('Code is Poetry'), level: 2 } }, __experimentalLabel: function __experimentalLabel(attributes, _ref) { var context = _ref.context; if (context === 'accessibility') { var content = attributes.content, level = attributes.level; return Object(external_lodash_["isEmpty"])(content) ? Object(external_wp_i18n_["sprintf"])( /* translators: accessibility text. %s: heading level. */ Object(external_wp_i18n_["__"])('Level %s. Empty.'), level) : Object(external_wp_i18n_["sprintf"])( /* translators: accessibility text. 1: heading level. 2: heading content. */ Object(external_wp_i18n_["__"])('Level %1$s. %2$s'), level, content); } }, transforms: heading_transforms, deprecated: heading_deprecated, merge: function merge(attributes, attributesToMerge) { return { content: (attributes.content || '') + (attributesToMerge.content || '') }; }, edit: heading_edit, save: heading_save_save }; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/quote.js /** * WordPress dependencies */ var quote = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M13 6v6h5.2v4c0 .8-.2 1.4-.5 1.7-.6.6-1.6.6-2.5.5h-.3v1.5h.5c1 0 2.3-.1 3.3-1 .6-.6 1-1.6 1-2.8V6H13zm-9 6h5.2v4c0 .8-.2 1.4-.5 1.7-.6.6-1.6.6-2.5.5h-.3v1.5h.5c1 0 2.3-.1 3.3-1 .6-.6 1-1.6 1-2.8V6H4v6z" })); /* harmony default export */ var library_quote = (quote); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/quote/deprecated.js function quote_deprecated_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 quote_deprecated_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { quote_deprecated_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { quote_deprecated_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } /** * External dependencies */ /** * WordPress dependencies */ var quote_deprecated_blockAttributes = { value: { type: 'string', source: 'html', selector: 'blockquote', multiline: 'p', default: '' }, citation: { type: 'string', source: 'html', selector: 'cite', default: '' }, align: { type: 'string' } }; var quote_deprecated_deprecated = [{ attributes: quote_deprecated_blockAttributes, save: function save(_ref) { var attributes = _ref.attributes; var align = attributes.align, value = attributes.value, citation = attributes.citation; return Object(external_wp_element_["createElement"])("blockquote", { style: { textAlign: align ? align : null } }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { multiline: true, value: value }), !external_wp_blockEditor_["RichText"].isEmpty(citation) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "cite", value: citation })); } }, { attributes: quote_deprecated_objectSpread(quote_deprecated_objectSpread({}, quote_deprecated_blockAttributes), {}, { style: { type: 'number', default: 1 } }), migrate: function migrate(attributes) { if (attributes.style === 2) { return quote_deprecated_objectSpread(quote_deprecated_objectSpread({}, Object(external_lodash_["omit"])(attributes, ['style'])), {}, { className: attributes.className ? attributes.className + ' is-style-large' : 'is-style-large' }); } return attributes; }, save: function save(_ref2) { var attributes = _ref2.attributes; var align = attributes.align, value = attributes.value, citation = attributes.citation, style = attributes.style; return Object(external_wp_element_["createElement"])("blockquote", { className: style === 2 ? 'is-large' : '', style: { textAlign: align ? align : null } }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { multiline: true, value: value }), !external_wp_blockEditor_["RichText"].isEmpty(citation) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "cite", value: citation })); } }, { attributes: quote_deprecated_objectSpread(quote_deprecated_objectSpread({}, quote_deprecated_blockAttributes), {}, { citation: { type: 'string', source: 'html', selector: 'footer', default: '' }, style: { type: 'number', default: 1 } }), save: function save(_ref3) { var attributes = _ref3.attributes; var align = attributes.align, value = attributes.value, citation = attributes.citation, style = attributes.style; return Object(external_wp_element_["createElement"])("blockquote", { className: "blocks-quote-style-".concat(style), style: { textAlign: align ? align : null } }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { multiline: true, value: value }), !external_wp_blockEditor_["RichText"].isEmpty(citation) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "footer", value: citation })); } }]; /* harmony default export */ var quote_deprecated = (quote_deprecated_deprecated); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/quote/edit.js function quote_edit_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 quote_edit_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { quote_edit_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { quote_edit_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } /** * External dependencies */ /** * WordPress dependencies */ function QuoteEdit(_ref) { var attributes = _ref.attributes, setAttributes = _ref.setAttributes, isSelected = _ref.isSelected, mergeBlocks = _ref.mergeBlocks, onReplace = _ref.onReplace, className = _ref.className, insertBlocksAfter = _ref.insertBlocksAfter, mergedStyle = _ref.mergedStyle; var align = attributes.align, value = attributes.value, citation = attributes.citation; var blockProps = Object(external_wp_blockEditor_["useBlockProps"])({ className: classnames_default()(className, Object(defineProperty["a" /* default */])({}, "has-text-align-".concat(align), align)), style: mergedStyle }); return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["AlignmentToolbar"], { value: align, onChange: function onChange(nextAlign) { setAttributes({ align: nextAlign }); } })), Object(external_wp_element_["createElement"])(external_wp_components_["BlockQuotation"], blockProps, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], { identifier: "value", multiline: true, value: value, onChange: function onChange(nextValue) { return setAttributes({ value: nextValue }); }, onMerge: mergeBlocks, onRemove: function onRemove(forward) { var hasEmptyCitation = !citation || citation.length === 0; if (!forward && hasEmptyCitation) { onReplace([]); } }, "aria-label": Object(external_wp_i18n_["__"])('Quote text'), placeholder: // translators: placeholder text used for the quote Object(external_wp_i18n_["__"])('Write quote…'), onReplace: onReplace, onSplit: function onSplit(piece) { return Object(external_wp_blocks_["createBlock"])('core/quote', quote_edit_objectSpread(quote_edit_objectSpread({}, attributes), {}, { value: piece })); }, __unstableOnSplitMiddle: function __unstableOnSplitMiddle() { return Object(external_wp_blocks_["createBlock"])('core/paragraph'); }, textAlign: align }), (!external_wp_blockEditor_["RichText"].isEmpty(citation) || isSelected) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], { identifier: "citation", value: citation, onChange: function onChange(nextCitation) { return setAttributes({ citation: nextCitation }); }, __unstableMobileNoFocusOnMount: true, "aria-label": Object(external_wp_i18n_["__"])('Quote citation text'), placeholder: // translators: placeholder text used for the citation Object(external_wp_i18n_["__"])('Write citation…'), className: "wp-block-quote__citation", textAlign: align, __unstableOnSplitAtEnd: function __unstableOnSplitAtEnd() { return insertBlocksAfter(Object(external_wp_blocks_["createBlock"])('core/paragraph')); } }))); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/quote/save.js /** * External dependencies */ /** * WordPress dependencies */ function quote_save_save(_ref) { var attributes = _ref.attributes; var align = attributes.align, value = attributes.value, citation = attributes.citation; var className = classnames_default()(Object(defineProperty["a" /* default */])({}, "has-text-align-".concat(align), align)); return Object(external_wp_element_["createElement"])("blockquote", external_wp_blockEditor_["useBlockProps"].save({ className: className }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { multiline: true, value: value }), !external_wp_blockEditor_["RichText"].isEmpty(citation) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "cite", value: citation })); } // EXTERNAL MODULE: external ["wp","richText"] var external_wp_richText_ = __webpack_require__(21); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/quote/transforms.js function quote_transforms_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 quote_transforms_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { quote_transforms_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { quote_transforms_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } /** * WordPress dependencies */ var quote_transforms_transforms = { from: [{ type: 'block', isMultiBlock: true, blocks: ['core/paragraph'], transform: function transform(attributes) { return Object(external_wp_blocks_["createBlock"])('core/quote', { value: Object(external_wp_richText_["toHTMLString"])({ value: Object(external_wp_richText_["join"])(attributes.map(function (_ref) { var content = _ref.content; return Object(external_wp_richText_["create"])({ html: content }); }), "\u2028"), multilineTag: 'p' }), anchor: attributes.anchor }); } }, { type: 'block', blocks: ['core/heading'], transform: function transform(_ref2) { var content = _ref2.content, anchor = _ref2.anchor; return Object(external_wp_blocks_["createBlock"])('core/quote', { value: "
".concat(content, "
"), anchor: anchor }); } }, { type: 'block', blocks: ['core/pullquote'], transform: function transform(_ref3) { var value = _ref3.value, citation = _ref3.citation, anchor = _ref3.anchor; return Object(external_wp_blocks_["createBlock"])('core/quote', { value: value, citation: citation, anchor: anchor }); } }, { type: 'prefix', prefix: '>', transform: function transform(content) { return Object(external_wp_blocks_["createBlock"])('core/quote', { value: "".concat(content, "
") }); } }, { type: 'raw', isMatch: function isMatch(node) { var isParagraphOrSingleCite = function () { var hasCitation = false; return function (child) { // Child is a paragraph. if (child.nodeName === 'P') { return true; } // Child is a cite and no other cite child exists before it. if (!hasCitation && child.nodeName === 'CITE') { hasCitation = true; return true; } }; }(); return node.nodeName === 'BLOCKQUOTE' && // The quote block can only handle multiline paragraph // content with an optional cite child. Array.from(node.childNodes).every(isParagraphOrSingleCite); }, schema: function schema(_ref4) { var phrasingContentSchema = _ref4.phrasingContentSchema; return { blockquote: { children: { p: { children: phrasingContentSchema }, cite: { children: phrasingContentSchema } } } }; } }], to: [{ type: 'block', blocks: ['core/paragraph'], transform: function transform(_ref5) { var value = _ref5.value, citation = _ref5.citation; var paragraphs = []; if (value && value !== '') { paragraphs.push.apply(paragraphs, Object(toConsumableArray["a" /* default */])(Object(external_wp_richText_["split"])(Object(external_wp_richText_["create"])({ html: value, multilineTag: 'p' }), "\u2028").map(function (piece) { return Object(external_wp_blocks_["createBlock"])('core/paragraph', { content: Object(external_wp_richText_["toHTMLString"])({ value: piece }) }); }))); } if (citation && citation !== '') { paragraphs.push(Object(external_wp_blocks_["createBlock"])('core/paragraph', { content: citation })); } if (paragraphs.length === 0) { return Object(external_wp_blocks_["createBlock"])('core/paragraph', { content: '' }); } return paragraphs; } }, { type: 'block', blocks: ['core/heading'], transform: function transform(_ref6) { var value = _ref6.value, citation = _ref6.citation, attrs = Object(objectWithoutProperties["a" /* default */])(_ref6, ["value", "citation"]); // If there is no quote content, use the citation as the // content of the resulting heading. A nonexistent citation // will result in an empty heading. if (value === '') { return Object(external_wp_blocks_["createBlock"])('core/heading', { content: citation }); } var pieces = Object(external_wp_richText_["split"])(Object(external_wp_richText_["create"])({ html: value, multilineTag: 'p' }), "\u2028"); var headingBlock = Object(external_wp_blocks_["createBlock"])('core/heading', { content: Object(external_wp_richText_["toHTMLString"])({ value: pieces[0] }) }); if (!citation && pieces.length === 1) { return headingBlock; } var quotePieces = pieces.slice(1); var quoteBlock = Object(external_wp_blocks_["createBlock"])('core/quote', quote_transforms_objectSpread(quote_transforms_objectSpread({}, attrs), {}, { citation: citation, value: Object(external_wp_richText_["toHTMLString"])({ value: quotePieces.length ? Object(external_wp_richText_["join"])(pieces.slice(1), "\u2028") : Object(external_wp_richText_["create"])(), multilineTag: 'p' }) })); return [headingBlock, quoteBlock]; } }, { type: 'block', blocks: ['core/pullquote'], transform: function transform(_ref7) { var value = _ref7.value, citation = _ref7.citation, anchor = _ref7.anchor; return Object(external_wp_blocks_["createBlock"])('core/pullquote', { value: value, citation: citation, anchor: anchor }); } }] }; /* harmony default export */ var quote_transforms = (quote_transforms_transforms); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/quote/index.js function quote_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 quote_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { quote_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { quote_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } /** * WordPress dependencies */ /** * Internal dependencies */ var quote_metadata = { apiVersion: 2, name: "core/quote", category: "text", attributes: { value: { type: "string", source: "html", selector: "blockquote", multiline: "p", "default": "" }, citation: { type: "string", source: "html", selector: "cite", "default": "" }, align: { type: "string" } }, supports: { anchor: true }, editorStyle: "wp-block-quote-editor", style: "wp-block-quote" }; var quote_name = quote_metadata.name; var quote_settings = { title: Object(external_wp_i18n_["_x"])('Quote', 'block title'), description: Object(external_wp_i18n_["__"])('Give quoted text visual emphasis. "In quoting others, we cite ourselves." — Julio Cortázar'), icon: library_quote, keywords: [Object(external_wp_i18n_["__"])('blockquote'), Object(external_wp_i18n_["__"])('cite')], example: { attributes: { value: '' + Object(external_wp_i18n_["__"])('In quoting others, we cite ourselves.') + '
', citation: 'Julio Cortázar', className: 'is-style-large' } }, styles: [{ name: 'default', label: Object(external_wp_i18n_["_x"])('Default', 'block style'), isDefault: true }, { name: 'large', label: Object(external_wp_i18n_["_x"])('Large', 'block style') }], transforms: quote_transforms, edit: QuoteEdit, save: quote_save_save, merge: function merge(attributes, _ref) { var value = _ref.value, citation = _ref.citation; // Quote citations cannot be merged. Pick the second one unless it's // empty. if (!citation) { citation = attributes.citation; } if (!value || value === '') { return quote_objectSpread(quote_objectSpread({}, attributes), {}, { citation: citation }); } return quote_objectSpread(quote_objectSpread({}, attributes), {}, { value: attributes.value + value, citation: citation }); }, deprecated: quote_deprecated }; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/gallery.js /** * WordPress dependencies */ var gallery = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M20.2 8v11c0 .7-.6 1.2-1.2 1.2H6v1.5h13c1.5 0 2.7-1.2 2.7-2.8V8h-1.5zM18 16.4V4.6c0-.9-.7-1.6-1.6-1.6H4.6C3.7 3 3 3.7 3 4.6v11.8c0 .9.7 1.6 1.6 1.6h11.8c.9 0 1.6-.7 1.6-1.6zM4.5 4.6c0-.1.1-.1.1-.1h11.8c.1 0 .1.1.1.1V12l-2.3-1.7c-.3-.2-.6-.2-.9 0l-2.9 2.1L8 11.3c-.2-.1-.5-.1-.7 0l-2.9 1.5V4.6zm0 11.8v-1.8l3.2-1.7 2.4 1.2c.2.1.5.1.8-.1l2.8-2 2.8 2v2.5c0 .1-.1.1-.1.1H4.6c0-.1-.1-.2-.1-.2z" })); /* harmony default export */ var library_gallery = (gallery); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/shared.js /** * External dependencies */ function defaultColumnsNumber(attributes) { return Math.min(3, attributes.images.length); } var shared_pickRelevantMediaFiles = function pickRelevantMediaFiles(image) { var sizeSlug = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'large'; var imageProps = Object(external_lodash_["pick"])(image, ['alt', 'id', 'link', 'caption']); imageProps.url = Object(external_lodash_["get"])(image, ['sizes', sizeSlug, 'url']) || Object(external_lodash_["get"])(image, ['media_details', 'sizes', sizeSlug, 'source_url']) || image.url; var fullUrl = Object(external_lodash_["get"])(image, ['sizes', 'full', 'url']) || Object(external_lodash_["get"])(image, ['media_details', 'sizes', 'full', 'source_url']); if (fullUrl) { imageProps.fullUrl = fullUrl; } return imageProps; }; // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/deprecated.js function gallery_deprecated_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 gallery_deprecated_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { gallery_deprecated_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { gallery_deprecated_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ var gallery_deprecated_deprecated = [{ attributes: { images: { type: 'array', default: [], source: 'query', selector: '.blocks-gallery-item', query: { url: { type: 'string', source: 'attribute', selector: 'img', attribute: 'src' }, fullUrl: { type: 'string', source: 'attribute', selector: 'img', attribute: 'data-full-url' }, link: { type: 'string', source: 'attribute', selector: 'img', attribute: 'data-link' }, alt: { type: 'string', source: 'attribute', selector: 'img', attribute: 'alt', default: '' }, id: { type: 'string', source: 'attribute', selector: 'img', attribute: 'data-id' }, caption: { type: 'string', source: 'html', selector: '.blocks-gallery-item__caption' } } }, ids: { type: 'array', items: { type: 'number' }, default: [] }, columns: { type: 'number', minimum: 1, maximum: 8 }, caption: { type: 'string', source: 'html', selector: '.blocks-gallery-caption' }, imageCrop: { type: 'boolean', default: true }, linkTo: { type: 'string', default: 'none' }, sizeSlug: { type: 'string', default: 'large' } }, supports: { align: true }, isEligible: function isEligible(_ref) { var linkTo = _ref.linkTo; return !linkTo || linkTo === 'attachment' || linkTo === 'media'; }, migrate: function migrate(attributes) { var linkTo = attributes.linkTo; if (!attributes.linkTo) { linkTo = 'none'; } else if (attributes.linkTo === 'attachment') { linkTo = 'post'; } else if (attributes.linkTo === 'media') { linkTo = 'file'; } return gallery_deprecated_objectSpread(gallery_deprecated_objectSpread({}, attributes), {}, { linkTo: linkTo }); }, save: function save(_ref2) { var attributes = _ref2.attributes; var images = attributes.images, _attributes$columns = attributes.columns, columns = _attributes$columns === void 0 ? defaultColumnsNumber(attributes) : _attributes$columns, imageCrop = attributes.imageCrop, caption = attributes.caption, linkTo = attributes.linkTo; return Object(external_wp_element_["createElement"])("figure", { className: "columns-".concat(columns, " ").concat(imageCrop ? 'is-cropped' : '') }, Object(external_wp_element_["createElement"])("ul", { className: "blocks-gallery-grid" }, images.map(function (image) { var href; switch (linkTo) { case 'media': href = image.fullUrl || image.url; break; case 'attachment': href = image.link; break; } var img = Object(external_wp_element_["createElement"])("img", { src: image.url, alt: image.alt, "data-id": image.id, "data-full-url": image.fullUrl, "data-link": image.link, className: image.id ? "wp-image-".concat(image.id) : null }); return Object(external_wp_element_["createElement"])("li", { key: image.id || image.url, className: "blocks-gallery-item" }, Object(external_wp_element_["createElement"])("figure", null, href ? Object(external_wp_element_["createElement"])("a", { href: href }, img) : img, !external_wp_blockEditor_["RichText"].isEmpty(image.caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "figcaption", className: "blocks-gallery-item__caption", value: image.caption }))); })), !external_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "figcaption", className: "blocks-gallery-caption", value: caption })); } }, { attributes: { images: { type: 'array', default: [], source: 'query', selector: '.blocks-gallery-item', query: { url: { source: 'attribute', selector: 'img', attribute: 'src' }, fullUrl: { source: 'attribute', selector: 'img', attribute: 'data-full-url' }, link: { source: 'attribute', selector: 'img', attribute: 'data-link' }, alt: { source: 'attribute', selector: 'img', attribute: 'alt', default: '' }, id: { source: 'attribute', selector: 'img', attribute: 'data-id' }, caption: { type: 'string', source: 'html', selector: '.blocks-gallery-item__caption' } } }, ids: { type: 'array', default: [] }, columns: { type: 'number' }, caption: { type: 'string', source: 'html', selector: '.blocks-gallery-caption' }, imageCrop: { type: 'boolean', default: true }, linkTo: { type: 'string', default: 'none' } }, supports: { align: true }, isEligible: function isEligible(_ref3) { var ids = _ref3.ids; return ids && ids.some(function (id) { return typeof id === 'string'; }); }, migrate: function migrate(attributes) { return gallery_deprecated_objectSpread(gallery_deprecated_objectSpread({}, attributes), {}, { ids: Object(external_lodash_["map"])(attributes.ids, function (id) { var parsedId = parseInt(id, 10); return Number.isInteger(parsedId) ? parsedId : null; }) }); }, save: function save(_ref4) { var attributes = _ref4.attributes; var images = attributes.images, _attributes$columns2 = attributes.columns, columns = _attributes$columns2 === void 0 ? defaultColumnsNumber(attributes) : _attributes$columns2, imageCrop = attributes.imageCrop, caption = attributes.caption, linkTo = attributes.linkTo; return Object(external_wp_element_["createElement"])("figure", { className: "columns-".concat(columns, " ").concat(imageCrop ? 'is-cropped' : '') }, Object(external_wp_element_["createElement"])("ul", { className: "blocks-gallery-grid" }, images.map(function (image) { var href; switch (linkTo) { case 'media': href = image.fullUrl || image.url; break; case 'attachment': href = image.link; break; } var img = Object(external_wp_element_["createElement"])("img", { src: image.url, alt: image.alt, "data-id": image.id, "data-full-url": image.fullUrl, "data-link": image.link, className: image.id ? "wp-image-".concat(image.id) : null }); return Object(external_wp_element_["createElement"])("li", { key: image.id || image.url, className: "blocks-gallery-item" }, Object(external_wp_element_["createElement"])("figure", null, href ? Object(external_wp_element_["createElement"])("a", { href: href }, img) : img, !external_wp_blockEditor_["RichText"].isEmpty(image.caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "figcaption", className: "blocks-gallery-item__caption", value: image.caption }))); })), !external_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "figcaption", className: "blocks-gallery-caption", value: caption })); } }, { attributes: { images: { type: 'array', default: [], source: 'query', selector: 'ul.wp-block-gallery .blocks-gallery-item', query: { url: { source: 'attribute', selector: 'img', attribute: 'src' }, fullUrl: { source: 'attribute', selector: 'img', attribute: 'data-full-url' }, alt: { source: 'attribute', selector: 'img', attribute: 'alt', default: '' }, id: { source: 'attribute', selector: 'img', attribute: 'data-id' }, link: { source: 'attribute', selector: 'img', attribute: 'data-link' }, caption: { type: 'array', source: 'children', selector: 'figcaption' } } }, ids: { type: 'array', default: [] }, columns: { type: 'number' }, imageCrop: { type: 'boolean', default: true }, linkTo: { type: 'string', default: 'none' } }, supports: { align: true }, save: function save(_ref5) { var attributes = _ref5.attributes; var images = attributes.images, _attributes$columns3 = attributes.columns, columns = _attributes$columns3 === void 0 ? defaultColumnsNumber(attributes) : _attributes$columns3, imageCrop = attributes.imageCrop, linkTo = attributes.linkTo; return Object(external_wp_element_["createElement"])("ul", { className: "columns-".concat(columns, " ").concat(imageCrop ? 'is-cropped' : '') }, images.map(function (image) { var href; switch (linkTo) { case 'media': href = image.fullUrl || image.url; break; case 'attachment': href = image.link; break; } var img = Object(external_wp_element_["createElement"])("img", { src: image.url, alt: image.alt, "data-id": image.id, "data-full-url": image.fullUrl, "data-link": image.link, className: image.id ? "wp-image-".concat(image.id) : null }); return Object(external_wp_element_["createElement"])("li", { key: image.id || image.url, className: "blocks-gallery-item" }, Object(external_wp_element_["createElement"])("figure", null, href ? Object(external_wp_element_["createElement"])("a", { href: href }, img) : img, image.caption && image.caption.length > 0 && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "figcaption", value: image.caption }))); })); } }, { attributes: { images: { type: 'array', default: [], source: 'query', selector: 'ul.wp-block-gallery .blocks-gallery-item', query: { url: { source: 'attribute', selector: 'img', attribute: 'src' }, alt: { source: 'attribute', selector: 'img', attribute: 'alt', default: '' }, id: { source: 'attribute', selector: 'img', attribute: 'data-id' }, link: { source: 'attribute', selector: 'img', attribute: 'data-link' }, caption: { type: 'array', source: 'children', selector: 'figcaption' } } }, columns: { type: 'number' }, imageCrop: { type: 'boolean', default: true }, linkTo: { type: 'string', default: 'none' } }, isEligible: function isEligible(_ref6) { var images = _ref6.images, ids = _ref6.ids; return images && images.length > 0 && (!ids && images || ids && images && ids.length !== images.length || Object(external_lodash_["some"])(images, function (id, index) { if (!id && ids[index] !== null) { return true; } return parseInt(id, 10) !== ids[index]; })); }, migrate: function migrate(attributes) { return gallery_deprecated_objectSpread(gallery_deprecated_objectSpread({}, attributes), {}, { ids: Object(external_lodash_["map"])(attributes.images, function (_ref7) { var id = _ref7.id; if (!id) { return null; } return parseInt(id, 10); }) }); }, supports: { align: true }, save: function save(_ref8) { var attributes = _ref8.attributes; var images = attributes.images, _attributes$columns4 = attributes.columns, columns = _attributes$columns4 === void 0 ? defaultColumnsNumber(attributes) : _attributes$columns4, imageCrop = attributes.imageCrop, linkTo = attributes.linkTo; return Object(external_wp_element_["createElement"])("ul", { className: "columns-".concat(columns, " ").concat(imageCrop ? 'is-cropped' : '') }, images.map(function (image) { var href; switch (linkTo) { case 'media': href = image.url; break; case 'attachment': href = image.link; break; } var img = Object(external_wp_element_["createElement"])("img", { src: image.url, alt: image.alt, "data-id": image.id, "data-link": image.link, className: image.id ? "wp-image-".concat(image.id) : null }); return Object(external_wp_element_["createElement"])("li", { key: image.id || image.url, className: "blocks-gallery-item" }, Object(external_wp_element_["createElement"])("figure", null, href ? Object(external_wp_element_["createElement"])("a", { href: href }, img) : img, image.caption && image.caption.length > 0 && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "figcaption", value: image.caption }))); })); } }, { attributes: { images: { type: 'array', default: [], source: 'query', selector: 'div.wp-block-gallery figure.blocks-gallery-image img', query: { url: { source: 'attribute', attribute: 'src' }, alt: { source: 'attribute', attribute: 'alt', default: '' }, id: { source: 'attribute', attribute: 'data-id' } } }, columns: { type: 'number' }, imageCrop: { type: 'boolean', default: true }, linkTo: { type: 'string', default: 'none' }, align: { type: 'string', default: 'none' } }, supports: { align: true }, save: function save(_ref9) { var attributes = _ref9.attributes; var images = attributes.images, _attributes$columns5 = attributes.columns, columns = _attributes$columns5 === void 0 ? defaultColumnsNumber(attributes) : _attributes$columns5, align = attributes.align, imageCrop = attributes.imageCrop, linkTo = attributes.linkTo; var className = classnames_default()("columns-".concat(columns), { alignnone: align === 'none', 'is-cropped': imageCrop }); return Object(external_wp_element_["createElement"])("div", { className: className }, images.map(function (image) { var href; switch (linkTo) { case 'media': href = image.url; break; case 'attachment': href = image.link; break; } var img = Object(external_wp_element_["createElement"])("img", { src: image.url, alt: image.alt, "data-id": image.id }); return Object(external_wp_element_["createElement"])("figure", { key: image.id || image.url, className: "blocks-gallery-image" }, href ? Object(external_wp_element_["createElement"])("a", { href: href }, img) : img); })); } }]; /* harmony default export */ var gallery_deprecated = (gallery_deprecated_deprecated); // EXTERNAL MODULE: external ["wp","viewport"] var external_wp_viewport_ = __webpack_require__(114); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/shared-icon.js /** * WordPress dependencies */ var sharedIcon = Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockIcon"], { icon: library_gallery }); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js var classCallCheck = __webpack_require__(25); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js var createClass = __webpack_require__(26); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js var assertThisInitialized = __webpack_require__(18); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js var inherits = __webpack_require__(28); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js var possibleConstructorReturn = __webpack_require__(29); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js var getPrototypeOf = __webpack_require__(19); // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-left.js var chevron_left = __webpack_require__(217); // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-right.js var chevron_right = __webpack_require__(216); // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/edit.js + 1 modules var library_edit = __webpack_require__(270); // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/close-small.js var close_small = __webpack_require__(159); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/constants.js var constants_LINK_DESTINATION_NONE = 'none'; var constants_LINK_DESTINATION_MEDIA = 'file'; var constants_LINK_DESTINATION_ATTACHMENT = 'post'; // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/gallery-image.js function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ var gallery_image_isTemporaryImage = function isTemporaryImage(id, url) { return !id && Object(external_wp_blob_["isBlobURL"])(url); }; var gallery_image_GalleryImage = /*#__PURE__*/function (_Component) { Object(inherits["a" /* default */])(GalleryImage, _Component); var _super = _createSuper(GalleryImage); function GalleryImage() { var _this; Object(classCallCheck["a" /* default */])(this, GalleryImage); _this = _super.apply(this, arguments); _this.onSelectImage = _this.onSelectImage.bind(Object(assertThisInitialized["a" /* default */])(_this)); _this.onSelectCaption = _this.onSelectCaption.bind(Object(assertThisInitialized["a" /* default */])(_this)); _this.onRemoveImage = _this.onRemoveImage.bind(Object(assertThisInitialized["a" /* default */])(_this)); _this.bindContainer = _this.bindContainer.bind(Object(assertThisInitialized["a" /* default */])(_this)); _this.onEdit = _this.onEdit.bind(Object(assertThisInitialized["a" /* default */])(_this)); _this.onSelectImageFromLibrary = _this.onSelectImageFromLibrary.bind(Object(assertThisInitialized["a" /* default */])(_this)); _this.onSelectCustomURL = _this.onSelectCustomURL.bind(Object(assertThisInitialized["a" /* default */])(_this)); _this.state = { captionSelected: false, isEditing: false }; return _this; } Object(createClass["a" /* default */])(GalleryImage, [{ key: "bindContainer", value: function bindContainer(ref) { this.container = ref; } }, { key: "onSelectCaption", value: function onSelectCaption() { if (!this.state.captionSelected) { this.setState({ captionSelected: true }); } if (!this.props.isSelected) { this.props.onSelect(); } } }, { key: "onSelectImage", value: function onSelectImage() { if (!this.props.isSelected) { this.props.onSelect(); } if (this.state.captionSelected) { this.setState({ captionSelected: false }); } } }, { key: "onRemoveImage", value: function onRemoveImage(event) { if (this.container === this.container.ownerDocument.activeElement && this.props.isSelected && [external_wp_keycodes_["BACKSPACE"], external_wp_keycodes_["DELETE"]].indexOf(event.keyCode) !== -1) { event.stopPropagation(); event.preventDefault(); this.props.onRemove(); } } }, { key: "onEdit", value: function onEdit() { this.setState({ isEditing: true }); } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { var _this$props = this.props, isSelected = _this$props.isSelected, image = _this$props.image, url = _this$props.url, __unstableMarkNextChangeAsNotPersistent = _this$props.__unstableMarkNextChangeAsNotPersistent; if (image && !url) { __unstableMarkNextChangeAsNotPersistent(); this.props.setAttributes({ url: image.source_url, alt: image.alt_text }); } // unselect the caption so when the user selects other image and comeback // the caption is not immediately selected if (this.state.captionSelected && !isSelected && prevProps.isSelected) { this.setState({ captionSelected: false }); } } }, { key: "deselectOnBlur", value: function deselectOnBlur() { this.props.onDeselect(); } }, { key: "onSelectImageFromLibrary", value: function onSelectImageFromLibrary(media) { var _this$props2 = this.props, setAttributes = _this$props2.setAttributes, id = _this$props2.id, url = _this$props2.url, alt = _this$props2.alt, caption = _this$props2.caption, sizeSlug = _this$props2.sizeSlug; if (!media || !media.url) { return; } var mediaAttributes = shared_pickRelevantMediaFiles(media, sizeSlug); // If the current image is temporary but an alt text was meanwhile // written by the user, make sure the text is not overwritten. if (gallery_image_isTemporaryImage(id, url)) { if (alt) { mediaAttributes = Object(external_lodash_["omit"])(mediaAttributes, ['alt']); } } // If a caption text was meanwhile written by the user, // make sure the text is not overwritten by empty captions. if (caption && !Object(external_lodash_["get"])(mediaAttributes, ['caption'])) { mediaAttributes = Object(external_lodash_["omit"])(mediaAttributes, ['caption']); } setAttributes(mediaAttributes); this.setState({ isEditing: false }); } }, { key: "onSelectCustomURL", value: function onSelectCustomURL(newURL) { var _this$props3 = this.props, setAttributes = _this$props3.setAttributes, url = _this$props3.url; if (newURL !== url) { setAttributes({ url: newURL, id: undefined }); this.setState({ isEditing: false }); } } }, { key: "render", value: function render() { var _this$props4 = this.props, url = _this$props4.url, alt = _this$props4.alt, id = _this$props4.id, linkTo = _this$props4.linkTo, link = _this$props4.link, isFirstItem = _this$props4.isFirstItem, isLastItem = _this$props4.isLastItem, isSelected = _this$props4.isSelected, caption = _this$props4.caption, onRemove = _this$props4.onRemove, onMoveForward = _this$props4.onMoveForward, onMoveBackward = _this$props4.onMoveBackward, setAttributes = _this$props4.setAttributes, ariaLabel = _this$props4['aria-label']; var isEditing = this.state.isEditing; var href; switch (linkTo) { case constants_LINK_DESTINATION_MEDIA: href = url; break; case constants_LINK_DESTINATION_ATTACHMENT: href = link; break; } var img = // Disable reason: Image itself is not meant to be interactive, but should // direct image selection and unfocus caption fields. /* eslint-disable jsx-a11y/no-noninteractive-element-interactions */ Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("img", { src: url, alt: alt, "data-id": id, onClick: this.onSelectImage, onFocus: this.onSelectImage, onKeyDown: this.onRemoveImage, tabIndex: "0", "aria-label": ariaLabel, ref: this.bindContainer }), Object(external_wp_blob_["isBlobURL"])(url) && Object(external_wp_element_["createElement"])(external_wp_components_["Spinner"], null)) /* eslint-enable jsx-a11y/no-noninteractive-element-interactions */ ; var className = classnames_default()({ 'is-selected': isSelected, 'is-transient': Object(external_wp_blob_["isBlobURL"])(url) }); return Object(external_wp_element_["createElement"])("figure", { className: className }, !isEditing && (href ? Object(external_wp_element_["createElement"])("a", { href: href }, img) : img), isEditing && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaPlaceholder"], { labels: { title: Object(external_wp_i18n_["__"])('Edit gallery image') }, icon: library_image, onSelect: this.onSelectImageFromLibrary, onSelectURL: this.onSelectCustomURL, accept: "image/*", allowedTypes: ['image'], value: { id: id, src: url } }), Object(external_wp_element_["createElement"])(external_wp_components_["ButtonGroup"], { className: "block-library-gallery-item__inline-menu is-left" }, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { icon: chevron_left["a" /* default */], onClick: isFirstItem ? undefined : onMoveBackward, label: Object(external_wp_i18n_["__"])('Move image backward'), "aria-disabled": isFirstItem, disabled: !isSelected }), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { icon: chevron_right["a" /* default */], onClick: isLastItem ? undefined : onMoveForward, label: Object(external_wp_i18n_["__"])('Move image forward'), "aria-disabled": isLastItem, disabled: !isSelected })), Object(external_wp_element_["createElement"])(external_wp_components_["ButtonGroup"], { className: "block-library-gallery-item__inline-menu is-right" }, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { icon: library_edit["a" /* default */], onClick: this.onEdit, label: Object(external_wp_i18n_["__"])('Replace image'), disabled: !isSelected }), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { icon: close_small["a" /* default */], onClick: onRemove, label: Object(external_wp_i18n_["__"])('Remove image'), disabled: !isSelected })), !isEditing && (isSelected || caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], { tagName: "figcaption", "aria-label": Object(external_wp_i18n_["__"])('Image caption text'), placeholder: isSelected ? Object(external_wp_i18n_["__"])('Write caption…') : null, value: caption, isSelected: this.state.captionSelected, onChange: function onChange(newCaption) { return setAttributes({ caption: newCaption }); }, unstableOnFocus: this.onSelectCaption, inlineToolbar: true })); } }]); return GalleryImage; }(external_wp_element_["Component"]); /* harmony default export */ var gallery_image = (Object(external_wp_compose_["compose"])([Object(external_wp_data_["withSelect"])(function (select, ownProps) { var _select = select('core'), getMedia = _select.getMedia; var id = ownProps.id; return { image: id ? getMedia(parseInt(id, 10)) : null }; }), Object(external_wp_data_["withDispatch"])(function (dispatch) { var _dispatch = dispatch('core/block-editor'), __unstableMarkNextChangeAsNotPersistent = _dispatch.__unstableMarkNextChangeAsNotPersistent; return { __unstableMarkNextChangeAsNotPersistent: __unstableMarkNextChangeAsNotPersistent }; })])(gallery_image_GalleryImage)); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/gallery.js /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ var gallery_Gallery = function Gallery(props) { var _classnames; var attributes = props.attributes, isSelected = props.isSelected, setAttributes = props.setAttributes, selectedImage = props.selectedImage, mediaPlaceholder = props.mediaPlaceholder, onMoveBackward = props.onMoveBackward, onMoveForward = props.onMoveForward, onRemoveImage = props.onRemoveImage, onSelectImage = props.onSelectImage, onDeselectImage = props.onDeselectImage, onSetImageAttributes = props.onSetImageAttributes, onFocusGalleryCaption = props.onFocusGalleryCaption, insertBlocksAfter = props.insertBlocksAfter, blockProps = props.blockProps; var align = attributes.align, _attributes$columns = attributes.columns, columns = _attributes$columns === void 0 ? defaultColumnsNumber(attributes) : _attributes$columns, caption = attributes.caption, imageCrop = attributes.imageCrop, images = attributes.images; return Object(external_wp_element_["createElement"])("figure", Object(esm_extends["a" /* default */])({}, blockProps, { className: classnames_default()(blockProps.className, (_classnames = {}, Object(defineProperty["a" /* default */])(_classnames, "align".concat(align), align), Object(defineProperty["a" /* default */])(_classnames, "columns-".concat(columns), columns), Object(defineProperty["a" /* default */])(_classnames, 'is-cropped', imageCrop), _classnames)) }), Object(external_wp_element_["createElement"])("ul", { className: "blocks-gallery-grid" }, images.map(function (img, index) { var ariaLabel = Object(external_wp_i18n_["sprintf"])( /* translators: 1: the order number of the image. 2: the total number of images. */ Object(external_wp_i18n_["__"])('image %1$d of %2$d in gallery'), index + 1, images.length); return Object(external_wp_element_["createElement"])("li", { className: "blocks-gallery-item", key: img.id || img.url }, Object(external_wp_element_["createElement"])(gallery_image, { url: img.url, alt: img.alt, id: img.id, isFirstItem: index === 0, isLastItem: index + 1 === images.length, isSelected: isSelected && selectedImage === index, onMoveBackward: onMoveBackward(index), onMoveForward: onMoveForward(index), onRemove: onRemoveImage(index), onSelect: onSelectImage(index), onDeselect: onDeselectImage(index), setAttributes: function setAttributes(attrs) { return onSetImageAttributes(index, attrs); }, caption: img.caption, "aria-label": ariaLabel, sizeSlug: attributes.sizeSlug })); })), mediaPlaceholder, Object(external_wp_element_["createElement"])(RichTextVisibilityHelper, { isHidden: !isSelected && external_wp_blockEditor_["RichText"].isEmpty(caption), tagName: "figcaption", className: "blocks-gallery-caption", "aria-label": Object(external_wp_i18n_["__"])('Gallery caption text'), placeholder: Object(external_wp_i18n_["__"])('Write gallery caption…'), value: caption, unstableOnFocus: onFocusGalleryCaption, onChange: function onChange(value) { return setAttributes({ caption: value }); }, inlineToolbar: true, __unstableOnSplitAtEnd: function __unstableOnSplitAtEnd() { return insertBlocksAfter(Object(external_wp_blocks_["createBlock"])('core/paragraph')); } })); }; function RichTextVisibilityHelper(_ref) { var isHidden = _ref.isHidden, richTextProps = Object(objectWithoutProperties["a" /* default */])(_ref, ["isHidden"]); return isHidden ? Object(external_wp_element_["createElement"])(external_wp_components_["VisuallyHidden"], Object(esm_extends["a" /* default */])({ as: external_wp_blockEditor_["RichText"] }, richTextProps)) : Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], richTextProps); } /* harmony default export */ var gallery_gallery = (gallery_Gallery); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/edit.js function gallery_edit_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 gallery_edit_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { gallery_edit_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { gallery_edit_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ var MAX_COLUMNS = 8; var linkOptions = [{ value: constants_LINK_DESTINATION_ATTACHMENT, label: Object(external_wp_i18n_["__"])('Attachment Page') }, { value: constants_LINK_DESTINATION_MEDIA, label: Object(external_wp_i18n_["__"])('Media File') }, { value: constants_LINK_DESTINATION_NONE, label: Object(external_wp_i18n_["__"])('None') }]; var edit_ALLOWED_MEDIA_TYPES = ['image']; var PLACEHOLDER_TEXT = external_wp_element_["Platform"].select({ web: Object(external_wp_i18n_["__"])('Drag images, upload new ones or select files from your library.'), native: Object(external_wp_i18n_["__"])('ADD MEDIA') }); var MOBILE_CONTROL_PROPS_RANGE_CONTROL = external_wp_element_["Platform"].select({ web: {}, native: { type: 'stepper' } }); function GalleryEdit(props) { var attributes = props.attributes, isSelected = props.isSelected, noticeUI = props.noticeUI, noticeOperations = props.noticeOperations, mediaUpload = props.mediaUpload, imageSizes = props.imageSizes, resizedImages = props.resizedImages, onFocus = props.onFocus; var _attributes$columns = attributes.columns, columns = _attributes$columns === void 0 ? defaultColumnsNumber(attributes) : _attributes$columns, imageCrop = attributes.imageCrop, images = attributes.images, linkTo = attributes.linkTo, sizeSlug = attributes.sizeSlug; var _useState = Object(external_wp_element_["useState"])(), _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2), selectedImage = _useState2[0], setSelectedImage = _useState2[1]; var _useState3 = Object(external_wp_element_["useState"])(), _useState4 = Object(slicedToArray["a" /* default */])(_useState3, 2), attachmentCaptions = _useState4[0], setAttachmentCaptions = _useState4[1]; var _useDispatch = Object(external_wp_data_["useDispatch"])('core/block-editor'), __unstableMarkNextChangeAsNotPersistent = _useDispatch.__unstableMarkNextChangeAsNotPersistent; function setAttributes(newAttrs) { if (newAttrs.ids) { throw new Error('The "ids" attribute should not be changed directly. It is managed automatically when "images" attribute changes'); } if (newAttrs.images) { newAttrs = gallery_edit_objectSpread(gallery_edit_objectSpread({}, newAttrs), {}, { // Unlike images[ n ].id which is a string, always ensure the // ids array contains numbers as per its attribute type. ids: Object(external_lodash_["map"])(newAttrs.images, function (_ref) { var id = _ref.id; return parseInt(id, 10); }) }); } props.setAttributes(newAttrs); } function onSelectImage(index) { return function () { setSelectedImage(index); }; } function onDeselectImage() { return function () { setSelectedImage(); }; } function onMove(oldIndex, newIndex) { var newImages = Object(toConsumableArray["a" /* default */])(images); newImages.splice(newIndex, 1, images[oldIndex]); newImages.splice(oldIndex, 1, images[newIndex]); setSelectedImage(newIndex); setAttributes({ images: newImages }); } function onMoveForward(oldIndex) { return function () { if (oldIndex === images.length - 1) { return; } onMove(oldIndex, oldIndex + 1); }; } function onMoveBackward(oldIndex) { return function () { if (oldIndex === 0) { return; } onMove(oldIndex, oldIndex - 1); }; } function onRemoveImage(index) { return function () { var newImages = Object(external_lodash_["filter"])(images, function (img, i) { return index !== i; }); setSelectedImage(); setAttributes({ images: newImages, columns: attributes.columns ? Math.min(newImages.length, attributes.columns) : attributes.columns }); }; } function selectCaption(newImage) { // The image id in both the images and attachmentCaptions arrays is a // string, so ensure comparison works correctly by converting the // newImage.id to a string. var newImageId = Object(external_lodash_["toString"])(newImage.id); var currentImage = Object(external_lodash_["find"])(images, { id: newImageId }); var currentImageCaption = currentImage ? currentImage.caption : newImage.caption; if (!attachmentCaptions) { return currentImageCaption; } var attachment = Object(external_lodash_["find"])(attachmentCaptions, { id: newImageId }); // if the attachment caption is updated if (attachment && attachment.caption !== newImage.caption) { return newImage.caption; } return currentImageCaption; } function onSelectImages(newImages) { setAttachmentCaptions(newImages.map(function (newImage) { return { // Store the attachmentCaption id as a string for consistency // with the type of the id in the images attribute. id: Object(external_lodash_["toString"])(newImage.id), caption: newImage.caption }; })); setAttributes({ images: newImages.map(function (newImage) { return gallery_edit_objectSpread(gallery_edit_objectSpread({}, shared_pickRelevantMediaFiles(newImage, sizeSlug)), {}, { caption: selectCaption(newImage, images, attachmentCaptions), // The id value is stored in a data attribute, so when the // block is parsed it's converted to a string. Converting // to a string here ensures it's type is consistent. id: Object(external_lodash_["toString"])(newImage.id) }); }), columns: attributes.columns ? Math.min(newImages.length, attributes.columns) : attributes.columns }); } function onUploadError(message) { noticeOperations.removeAllNotices(); noticeOperations.createErrorNotice(message); } function setLinkTo(value) { setAttributes({ linkTo: value }); } function setColumnsNumber(value) { setAttributes({ columns: value }); } function toggleImageCrop() { setAttributes({ imageCrop: !imageCrop }); } function getImageCropHelp(checked) { return checked ? Object(external_wp_i18n_["__"])('Thumbnails are cropped to align.') : Object(external_wp_i18n_["__"])('Thumbnails are not cropped.'); } function onFocusGalleryCaption() { setSelectedImage(); } function setImageAttributes(index, newAttributes) { if (!images[index]) { return; } setAttributes({ images: [].concat(Object(toConsumableArray["a" /* default */])(images.slice(0, index)), [gallery_edit_objectSpread(gallery_edit_objectSpread({}, images[index]), newAttributes)], Object(toConsumableArray["a" /* default */])(images.slice(index + 1))) }); } function getImagesSizeOptions() { return Object(external_lodash_["map"])(Object(external_lodash_["filter"])(imageSizes, function (_ref2) { var slug = _ref2.slug; return Object(external_lodash_["some"])(resizedImages, function (sizes) { return sizes[slug]; }); }), function (_ref3) { var name = _ref3.name, slug = _ref3.slug; return { value: slug, label: name }; }); } function updateImagesSize(newSizeSlug) { var updatedImages = Object(external_lodash_["map"])(images, function (image) { if (!image.id) { return image; } var url = Object(external_lodash_["get"])(resizedImages, [parseInt(image.id, 10), newSizeSlug]); return gallery_edit_objectSpread(gallery_edit_objectSpread({}, image), url && { url: url }); }); setAttributes({ images: updatedImages, sizeSlug: newSizeSlug }); } Object(external_wp_element_["useEffect"])(function () { if (external_wp_element_["Platform"].OS === 'web' && images && images.length > 0 && Object(external_lodash_["every"])(images, function (_ref4) { var url = _ref4.url; return Object(external_wp_blob_["isBlobURL"])(url); })) { var filesList = Object(external_lodash_["map"])(images, function (_ref5) { var url = _ref5.url; return Object(external_wp_blob_["getBlobByURL"])(url); }); Object(external_lodash_["forEach"])(images, function (_ref6) { var url = _ref6.url; return Object(external_wp_blob_["revokeBlobURL"])(url); }); mediaUpload({ filesList: filesList, onFileChange: onSelectImages, allowedTypes: ['image'] }); } }, []); Object(external_wp_element_["useEffect"])(function () { // Deselect images when deselecting the block if (!isSelected) { setSelectedImage(); } }, [isSelected]); Object(external_wp_element_["useEffect"])(function () { // linkTo attribute must be saved so blocks don't break when changing // image_default_link_type in options.php if (!linkTo) { var _window, _window$wp, _window$wp$media, _window$wp$media$view, _window$wp$media$view2, _window$wp$media$view3; __unstableMarkNextChangeAsNotPersistent(); setAttributes({ linkTo: ((_window = window) === null || _window === void 0 ? void 0 : (_window$wp = _window.wp) === null || _window$wp === void 0 ? void 0 : (_window$wp$media = _window$wp.media) === null || _window$wp$media === void 0 ? void 0 : (_window$wp$media$view = _window$wp$media.view) === null || _window$wp$media$view === void 0 ? void 0 : (_window$wp$media$view2 = _window$wp$media$view.settings) === null || _window$wp$media$view2 === void 0 ? void 0 : (_window$wp$media$view3 = _window$wp$media$view2.defaultProps) === null || _window$wp$media$view3 === void 0 ? void 0 : _window$wp$media$view3.link) || constants_LINK_DESTINATION_NONE }); } }, [linkTo]); var hasImages = !!images.length; var mediaPlaceholder = Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaPlaceholder"], { addToGallery: hasImages, isAppender: hasImages, disableMediaButtons: hasImages && !isSelected, icon: !hasImages && sharedIcon, labels: { title: !hasImages && Object(external_wp_i18n_["__"])('Gallery'), instructions: !hasImages && PLACEHOLDER_TEXT }, onSelect: onSelectImages, accept: "image/*", allowedTypes: edit_ALLOWED_MEDIA_TYPES, multiple: true, value: images, onError: onUploadError, notices: hasImages ? undefined : noticeUI, onFocus: onFocus }); var blockProps = Object(external_wp_blockEditor_["useBlockProps"])(); if (!hasImages) { return Object(external_wp_element_["createElement"])(external_wp_primitives_["View"], blockProps, mediaPlaceholder); } var imageSizeOptions = getImagesSizeOptions(); var shouldShowSizeOptions = hasImages && !Object(external_lodash_["isEmpty"])(imageSizeOptions); return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], { title: Object(external_wp_i18n_["__"])('Gallery settings') }, images.length > 1 && Object(external_wp_element_["createElement"])(external_wp_components_["RangeControl"], Object(esm_extends["a" /* default */])({ label: Object(external_wp_i18n_["__"])('Columns'), value: columns, onChange: setColumnsNumber, min: 1, max: Math.min(MAX_COLUMNS, images.length) }, MOBILE_CONTROL_PROPS_RANGE_CONTROL, { required: true })), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { label: Object(external_wp_i18n_["__"])('Crop images'), checked: !!imageCrop, onChange: toggleImageCrop, help: getImageCropHelp }), Object(external_wp_element_["createElement"])(external_wp_components_["SelectControl"], { label: Object(external_wp_i18n_["__"])('Link to'), value: linkTo, onChange: setLinkTo, options: linkOptions }), shouldShowSizeOptions && Object(external_wp_element_["createElement"])(external_wp_components_["SelectControl"], { label: Object(external_wp_i18n_["__"])('Image size'), value: sizeSlug, options: imageSizeOptions, onChange: updateImagesSize }))), noticeUI, Object(external_wp_element_["createElement"])(gallery_gallery, Object(esm_extends["a" /* default */])({}, props, { selectedImage: selectedImage, mediaPlaceholder: mediaPlaceholder, onMoveBackward: onMoveBackward, onMoveForward: onMoveForward, onRemoveImage: onRemoveImage, onSelectImage: onSelectImage, onDeselectImage: onDeselectImage, onSetImageAttributes: setImageAttributes, onFocusGalleryCaption: onFocusGalleryCaption, blockProps: blockProps }))); } /* harmony default export */ var gallery_edit = (Object(external_wp_compose_["compose"])([Object(external_wp_data_["withSelect"])(function (select, _ref7) { var ids = _ref7.attributes.ids, isSelected = _ref7.isSelected; var _select = select('core'), getMedia = _select.getMedia; var _select2 = select('core/block-editor'), getSettings = _select2.getSettings; var _getSettings = getSettings(), imageSizes = _getSettings.imageSizes, mediaUpload = _getSettings.mediaUpload; var resizedImages = Object(external_wp_element_["useMemo"])(function () { if (isSelected) { return Object(external_lodash_["reduce"])(ids, function (currentResizedImages, id) { if (!id) { return currentResizedImages; } var image = getMedia(id); var sizes = Object(external_lodash_["reduce"])(imageSizes, function (currentSizes, size) { var defaultUrl = Object(external_lodash_["get"])(image, ['sizes', size.slug, 'url']); var mediaDetailsUrl = Object(external_lodash_["get"])(image, ['media_details', 'sizes', size.slug, 'source_url']); return gallery_edit_objectSpread(gallery_edit_objectSpread({}, currentSizes), {}, Object(defineProperty["a" /* default */])({}, size.slug, defaultUrl || mediaDetailsUrl)); }, {}); return gallery_edit_objectSpread(gallery_edit_objectSpread({}, currentResizedImages), {}, Object(defineProperty["a" /* default */])({}, parseInt(id, 10), sizes)); }, {}); } return {}; }, [isSelected, ids, imageSizes]); return { imageSizes: imageSizes, mediaUpload: mediaUpload, resizedImages: resizedImages }; }), external_wp_components_["withNotices"], Object(external_wp_viewport_["withViewportMatch"])({ isNarrow: '< small' })])(GalleryEdit)); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/save.js /** * WordPress dependencies */ /** * Internal dependencies */ function gallery_save_save(_ref) { var attributes = _ref.attributes; var images = attributes.images, _attributes$columns = attributes.columns, columns = _attributes$columns === void 0 ? defaultColumnsNumber(attributes) : _attributes$columns, imageCrop = attributes.imageCrop, caption = attributes.caption, linkTo = attributes.linkTo; var className = "columns-".concat(columns, " ").concat(imageCrop ? 'is-cropped' : ''); return Object(external_wp_element_["createElement"])("figure", external_wp_blockEditor_["useBlockProps"].save({ className: className }), Object(external_wp_element_["createElement"])("ul", { className: "blocks-gallery-grid" }, images.map(function (image) { var href; switch (linkTo) { case constants_LINK_DESTINATION_MEDIA: href = image.fullUrl || image.url; break; case constants_LINK_DESTINATION_ATTACHMENT: href = image.link; break; } var img = Object(external_wp_element_["createElement"])("img", { src: image.url, alt: image.alt, "data-id": image.id, "data-full-url": image.fullUrl, "data-link": image.link, className: image.id ? "wp-image-".concat(image.id) : null }); return Object(external_wp_element_["createElement"])("li", { key: image.id || image.url, className: "blocks-gallery-item" }, Object(external_wp_element_["createElement"])("figure", null, href ? Object(external_wp_element_["createElement"])("a", { href: href }, img) : img, !external_wp_blockEditor_["RichText"].isEmpty(image.caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "figcaption", className: "blocks-gallery-item__caption", value: image.caption }))); })), !external_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "figcaption", className: "blocks-gallery-caption", value: caption })); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/transforms.js /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ var parseShortcodeIds = function parseShortcodeIds(ids) { if (!ids) { return []; } return ids.split(',').map(function (id) { return parseInt(id, 10); }); }; var gallery_transforms_transforms = { from: [{ type: 'block', isMultiBlock: true, blocks: ['core/image'], transform: function transform(attributes) { // Init the align and size from the first item which may be either the placeholder or an image. var _attributes$ = attributes[0], align = _attributes$.align, sizeSlug = _attributes$.sizeSlug; // Loop through all the images and check if they have the same align and size. align = Object(external_lodash_["every"])(attributes, ['align', align]) ? align : undefined; sizeSlug = Object(external_lodash_["every"])(attributes, ['sizeSlug', sizeSlug]) ? sizeSlug : undefined; var validImages = Object(external_lodash_["filter"])(attributes, function (_ref) { var url = _ref.url; return url; }); return Object(external_wp_blocks_["createBlock"])('core/gallery', { images: validImages.map(function (_ref2) { var id = _ref2.id, url = _ref2.url, alt = _ref2.alt, caption = _ref2.caption; return { id: Object(external_lodash_["toString"])(id), url: url, alt: alt, caption: caption }; }), ids: validImages.map(function (_ref3) { var id = _ref3.id; return parseInt(id, 10); }), align: align, sizeSlug: sizeSlug }); } }, { type: 'shortcode', tag: 'gallery', attributes: { images: { type: 'array', shortcode: function shortcode(_ref4) { var ids = _ref4.named.ids; return parseShortcodeIds(ids).map(function (id) { return { id: Object(external_lodash_["toString"])(id) }; }); } }, ids: { type: 'array', shortcode: function shortcode(_ref5) { var ids = _ref5.named.ids; return parseShortcodeIds(ids); } }, columns: { type: 'number', shortcode: function shortcode(_ref6) { var _ref6$named$columns = _ref6.named.columns, columns = _ref6$named$columns === void 0 ? '3' : _ref6$named$columns; return parseInt(columns, 10); } }, linkTo: { type: 'string', shortcode: function shortcode(_ref7) { var _ref7$named$link = _ref7.named.link, link = _ref7$named$link === void 0 ? constants_LINK_DESTINATION_ATTACHMENT : _ref7$named$link; return link; } } }, isMatch: function isMatch(_ref8) { var named = _ref8.named; return undefined !== named.ids; } }, { // When created by drag and dropping multiple files on an insertion point type: 'files', isMatch: function isMatch(files) { return files.length !== 1 && Object(external_lodash_["every"])(files, function (file) { return file.type.indexOf('image/') === 0; }); }, transform: function transform(files) { var block = Object(external_wp_blocks_["createBlock"])('core/gallery', { images: files.map(function (file) { return shared_pickRelevantMediaFiles({ url: Object(external_wp_blob_["createBlobURL"])(file) }); }) }); return block; } }], to: [{ type: 'block', blocks: ['core/image'], transform: function transform(_ref9) { var images = _ref9.images, align = _ref9.align, sizeSlug = _ref9.sizeSlug, ids = _ref9.ids; if (images.length > 0) { return images.map(function (_ref10, index) { var url = _ref10.url, alt = _ref10.alt, caption = _ref10.caption; return Object(external_wp_blocks_["createBlock"])('core/image', { id: ids[index], url: url, alt: alt, caption: caption, align: align, sizeSlug: sizeSlug }); }); } return Object(external_wp_blocks_["createBlock"])('core/image', { align: align }); } }] }; /* harmony default export */ var gallery_transforms = (gallery_transforms_transforms); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/index.js /** * WordPress dependencies */ /** * Internal dependencies */ var gallery_metadata = { apiVersion: 2, name: "core/gallery", category: "media", attributes: { images: { type: "array", "default": [], source: "query", selector: ".blocks-gallery-item", query: { url: { type: "string", source: "attribute", selector: "img", attribute: "src" }, fullUrl: { type: "string", source: "attribute", selector: "img", attribute: "data-full-url" }, link: { type: "string", source: "attribute", selector: "img", attribute: "data-link" }, alt: { type: "string", source: "attribute", selector: "img", attribute: "alt", "default": "" }, id: { type: "string", source: "attribute", selector: "img", attribute: "data-id" }, caption: { type: "string", source: "html", selector: ".blocks-gallery-item__caption" } } }, ids: { type: "array", items: { type: "number" }, "default": [] }, columns: { type: "number", minimum: 1, maximum: 8 }, caption: { type: "string", source: "html", selector: ".blocks-gallery-caption" }, imageCrop: { type: "boolean", "default": true }, linkTo: { type: "string" }, sizeSlug: { type: "string", "default": "large" } }, supports: { anchor: true, align: true }, editorStyle: "wp-block-gallery-editor", style: "wp-block-gallery" }; var gallery_name = gallery_metadata.name; var gallery_settings = { title: Object(external_wp_i18n_["_x"])('Gallery', 'block title'), description: Object(external_wp_i18n_["__"])('Display multiple images in a rich gallery.'), icon: library_gallery, keywords: [Object(external_wp_i18n_["__"])('images'), Object(external_wp_i18n_["__"])('photos')], example: { attributes: { columns: 2, images: [{ url: 'https://s.w.org/images/core/5.3/Glacial_lakes%2C_Bhutan.jpg' }, { url: 'https://s.w.org/images/core/5.3/Sediment_off_the_Yucatan_Peninsula.jpg' }] } }, transforms: gallery_transforms, edit: gallery_edit, save: gallery_save_save, deprecated: gallery_deprecated }; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/archive.js /** * WordPress dependencies */ var archive = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M19 6.2h-5.9l-.6-1.1c-.3-.7-1-1.1-1.8-1.1H5c-1.1 0-2 .9-2 2v11.8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8.2c0-1.1-.9-2-2-2zm.5 11.6c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h5.8c.2 0 .4.1.4.3l1 2H19c.3 0 .5.2.5.5v9.5zM8 12.8h8v-1.5H8v1.5zm0 3h8v-1.5H8v1.5z" })); /* harmony default export */ var library_archive = (archive); // EXTERNAL MODULE: external ["wp","serverSideRender"] var external_wp_serverSideRender_ = __webpack_require__(80); var external_wp_serverSideRender_default = /*#__PURE__*/__webpack_require__.n(external_wp_serverSideRender_); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/archives/edit.js /** * WordPress dependencies */ function ArchivesEdit(_ref) { var attributes = _ref.attributes, setAttributes = _ref.setAttributes; var showPostCounts = attributes.showPostCounts, displayAsDropdown = attributes.displayAsDropdown; return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], { title: Object(external_wp_i18n_["__"])('Archives settings') }, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { label: Object(external_wp_i18n_["__"])('Display as dropdown'), checked: displayAsDropdown, onChange: function onChange() { return setAttributes({ displayAsDropdown: !displayAsDropdown }); } }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { label: Object(external_wp_i18n_["__"])('Show post counts'), checked: showPostCounts, onChange: function onChange() { return setAttributes({ showPostCounts: !showPostCounts }); } }))), Object(external_wp_element_["createElement"])("div", Object(external_wp_blockEditor_["useBlockProps"])(), Object(external_wp_element_["createElement"])(external_wp_components_["Disabled"], null, Object(external_wp_element_["createElement"])(external_wp_serverSideRender_default.a, { block: "core/archives", attributes: attributes })))); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/archives/index.js /** * WordPress dependencies */ /** * Internal dependencies */ var archives_metadata = { apiVersion: 2, name: "core/archives", category: "widgets", attributes: { displayAsDropdown: { type: "boolean", "default": false }, showPostCounts: { type: "boolean", "default": false } }, supports: { align: true, html: false }, editorStyle: "wp-block-archives-editor" }; var archives_name = archives_metadata.name; var archives_settings = { title: Object(external_wp_i18n_["_x"])('Archives', 'block title'), description: Object(external_wp_i18n_["__"])('Display a monthly archive of your posts.'), icon: library_archive, example: {}, edit: ArchivesEdit }; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/audio.js /** * WordPress dependencies */ var audio = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M17.7 4.3c-1.2 0-2.8 0-3.8 1-.6.6-.9 1.5-.9 2.6V14c-.6-.6-1.5-1-2.5-1C8.6 13 7 14.6 7 16.5S8.6 20 10.5 20c1.5 0 2.8-1 3.3-2.3.5-.8.7-1.8.7-2.5V7.9c0-.7.2-1.2.5-1.6.6-.6 1.8-.6 2.8-.6h.3V4.3h-.4z" })); /* harmony default export */ var library_audio = (audio); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/audio/deprecated.js /** * WordPress dependencies */ /* harmony default export */ var audio_deprecated = ([{ attributes: { src: { type: 'string', source: 'attribute', selector: 'audio', attribute: 'src' }, caption: { type: 'string', source: 'html', selector: 'figcaption' }, id: { type: 'number' }, autoplay: { type: 'boolean', source: 'attribute', selector: 'audio', attribute: 'autoplay' }, loop: { type: 'boolean', source: 'attribute', selector: 'audio', attribute: 'loop' }, preload: { type: 'string', source: 'attribute', selector: 'audio', attribute: 'preload' } }, supports: { align: true }, save: function save(_ref) { var attributes = _ref.attributes; var autoplay = attributes.autoplay, caption = attributes.caption, loop = attributes.loop, preload = attributes.preload, src = attributes.src; return Object(external_wp_element_["createElement"])("figure", null, Object(external_wp_element_["createElement"])("audio", { controls: "controls", src: src, autoPlay: autoplay, loop: loop, preload: preload }), !external_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "figcaption", value: caption })); } }]); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/audio/edit.js /** * WordPress dependencies */ /** * Internal dependencies */ var audio_edit_ALLOWED_MEDIA_TYPES = ['audio']; function AudioEdit(_ref) { var attributes = _ref.attributes, noticeOperations = _ref.noticeOperations, setAttributes = _ref.setAttributes, onReplace = _ref.onReplace, isSelected = _ref.isSelected, noticeUI = _ref.noticeUI, insertBlocksAfter = _ref.insertBlocksAfter; var id = attributes.id, autoplay = attributes.autoplay, caption = attributes.caption, loop = attributes.loop, preload = attributes.preload, src = attributes.src; var blockProps = Object(external_wp_blockEditor_["useBlockProps"])(); var mediaUpload = Object(external_wp_data_["useSelect"])(function (select) { var _select = select('core/block-editor'), getSettings = _select.getSettings; return getSettings().mediaUpload; }, []); Object(external_wp_element_["useEffect"])(function () { if (!id && Object(external_wp_blob_["isBlobURL"])(src)) { var file = Object(external_wp_blob_["getBlobByURL"])(src); if (file) { mediaUpload({ filesList: [file], onFileChange: function onFileChange(_ref2) { var _ref3 = Object(slicedToArray["a" /* default */])(_ref2, 1), _ref3$ = _ref3[0], mediaId = _ref3$.id, url = _ref3$.url; setAttributes({ id: mediaId, src: url }); }, onError: function onError(e) { setAttributes({ src: undefined, id: undefined }); noticeOperations.createErrorNotice(e); }, allowedTypes: audio_edit_ALLOWED_MEDIA_TYPES }); } } }, []); function toggleAttribute(attribute) { return function (newValue) { setAttributes(Object(defineProperty["a" /* default */])({}, attribute, newValue)); }; } function onSelectURL(newSrc) { // Set the block's src from the edit component's state, and switch off // the editing UI. if (newSrc !== src) { // Check if there's an embed block that handles this URL. var embedBlock = util_createUpgradedEmbedBlock({ attributes: { url: newSrc } }); if (undefined !== embedBlock) { onReplace(embedBlock); return; } setAttributes({ src: newSrc, id: undefined }); } } function onUploadError(message) { noticeOperations.removeAllNotices(); noticeOperations.createErrorNotice(message); } function getAutoplayHelp(checked) { return checked ? Object(external_wp_i18n_["__"])('Note: Autoplaying audio may cause usability issues for some visitors.') : null; } // const { setAttributes, isSelected, noticeUI } = this.props; function onSelectAudio(media) { if (!media || !media.url) { // in this case there was an error and we should continue in the editing state // previous attributes should be removed because they may be temporary blob urls setAttributes({ src: undefined, id: undefined }); return; } // sets the block's attribute and updates the edit component from the // selected media, then switches off the editing UI setAttributes({ src: media.url, id: media.id }); } if (!src) { return Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaPlaceholder"], { icon: Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockIcon"], { icon: library_audio }), onSelect: onSelectAudio, onSelectURL: onSelectURL, accept: "audio/*", allowedTypes: audio_edit_ALLOWED_MEDIA_TYPES, value: attributes, notices: noticeUI, onError: onUploadError })); } return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaReplaceFlow"], { mediaId: id, mediaURL: src, allowedTypes: audio_edit_ALLOWED_MEDIA_TYPES, accept: "audio/*", onSelect: onSelectAudio, onSelectURL: onSelectURL, onError: onUploadError })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], { title: Object(external_wp_i18n_["__"])('Audio settings') }, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { label: Object(external_wp_i18n_["__"])('Autoplay'), onChange: toggleAttribute('autoplay'), checked: autoplay, help: getAutoplayHelp }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { label: Object(external_wp_i18n_["__"])('Loop'), onChange: toggleAttribute('loop'), checked: loop }), Object(external_wp_element_["createElement"])(external_wp_components_["SelectControl"], { label: Object(external_wp_i18n_["__"])('Preload'), value: preload || '' // `undefined` is required for the preload attribute to be unset. , onChange: function onChange(value) { return setAttributes({ preload: value || undefined }); }, options: [{ value: '', label: Object(external_wp_i18n_["__"])('Browser default') }, { value: 'auto', label: Object(external_wp_i18n_["__"])('Auto') }, { value: 'metadata', label: Object(external_wp_i18n_["__"])('Metadata') }, { value: 'none', label: Object(external_wp_i18n_["__"])('None') }] }))), Object(external_wp_element_["createElement"])("figure", blockProps, Object(external_wp_element_["createElement"])(external_wp_components_["Disabled"], null, Object(external_wp_element_["createElement"])("audio", { controls: "controls", src: src })), (!external_wp_blockEditor_["RichText"].isEmpty(caption) || isSelected) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], { tagName: "figcaption", "aria-label": Object(external_wp_i18n_["__"])('Audio caption text'), placeholder: Object(external_wp_i18n_["__"])('Write caption…'), value: caption, onChange: function onChange(value) { return setAttributes({ caption: value }); }, inlineToolbar: true, __unstableOnSplitAtEnd: function __unstableOnSplitAtEnd() { return insertBlocksAfter(Object(external_wp_blocks_["createBlock"])('core/paragraph')); } }))); } /* harmony default export */ var audio_edit = (Object(external_wp_components_["withNotices"])(AudioEdit)); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/audio/save.js /** * WordPress dependencies */ function audio_save_save(_ref) { var attributes = _ref.attributes; var autoplay = attributes.autoplay, caption = attributes.caption, loop = attributes.loop, preload = attributes.preload, src = attributes.src; return src && Object(external_wp_element_["createElement"])("figure", external_wp_blockEditor_["useBlockProps"].save(), Object(external_wp_element_["createElement"])("audio", { controls: "controls", src: src, autoPlay: autoplay, loop: loop, preload: preload }), !external_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "figcaption", value: caption })); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/audio/transforms.js /** * WordPress dependencies */ var audio_transforms_transforms = { from: [{ type: 'files', isMatch: function isMatch(files) { return files.length === 1 && files[0].type.indexOf('audio/') === 0; }, transform: function transform(files) { var file = files[0]; // We don't need to upload the media directly here // It's already done as part of the `componentDidMount` // in the audio block var block = Object(external_wp_blocks_["createBlock"])('core/audio', { src: Object(external_wp_blob_["createBlobURL"])(file) }); return block; } }, { type: 'shortcode', tag: 'audio', attributes: { src: { type: 'string', shortcode: function shortcode(_ref) { var _ref$named = _ref.named, src = _ref$named.src, mp3 = _ref$named.mp3, m4a = _ref$named.m4a, ogg = _ref$named.ogg, wav = _ref$named.wav, wma = _ref$named.wma; return src || mp3 || m4a || ogg || wav || wma; } }, loop: { type: 'string', shortcode: function shortcode(_ref2) { var loop = _ref2.named.loop; return loop; } }, autoplay: { type: 'string', shortcode: function shortcode(_ref3) { var autoplay = _ref3.named.autoplay; return autoplay; } }, preload: { type: 'string', shortcode: function shortcode(_ref4) { var preload = _ref4.named.preload; return preload; } } } }] }; /* harmony default export */ var audio_transforms = (audio_transforms_transforms); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/audio/index.js /** * WordPress dependencies */ /** * Internal dependencies */ var audio_metadata = { apiVersion: 2, name: "core/audio", category: "media", attributes: { src: { type: "string", source: "attribute", selector: "audio", attribute: "src" }, caption: { type: "string", source: "html", selector: "figcaption" }, id: { type: "number" }, autoplay: { type: "boolean", source: "attribute", selector: "audio", attribute: "autoplay" }, loop: { type: "boolean", source: "attribute", selector: "audio", attribute: "loop" }, preload: { type: "string", source: "attribute", selector: "audio", attribute: "preload" } }, supports: { anchor: true, align: true }, editorStyle: "wp-block-audio-editor", style: "wp-block-audio" }; var audio_name = audio_metadata.name; var audio_settings = { title: Object(external_wp_i18n_["_x"])('Audio', 'block title'), description: Object(external_wp_i18n_["__"])('Embed a simple audio player.'), keywords: [Object(external_wp_i18n_["__"])('music'), Object(external_wp_i18n_["__"])('sound'), Object(external_wp_i18n_["__"])('podcast'), Object(external_wp_i18n_["__"])('recording')], icon: library_audio, transforms: audio_transforms, deprecated: audio_deprecated, edit: audio_edit, save: audio_save_save }; // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/button.js var library_button = __webpack_require__(313); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/buttons/deprecated.js function buttons_deprecated_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 buttons_deprecated_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { buttons_deprecated_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { buttons_deprecated_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } /** * WordPress dependencies */ var buttons_deprecated_deprecated = [{ supports: { align: ['center', 'left', 'right'], anchor: true }, save: function save() { return Object(external_wp_element_["createElement"])("div", null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null)); }, isEligible: function isEligible(_ref) { var align = _ref.align; return align && ['center', 'left', 'right'].includes(align); }, migrate: function migrate(attributes) { return buttons_deprecated_objectSpread(buttons_deprecated_objectSpread({}, attributes), {}, { align: undefined, // Floating Buttons blocks shouldn't have been supported in the // first place. Most users using them probably expected them to // act like content justification controls, so these blocks are // migrated to use content justification. // As for center-aligned Buttons blocks, the content justification // equivalent will create an identical end result in most cases. contentJustification: attributes.align }); } }]; /* harmony default export */ var buttons_deprecated = (buttons_deprecated_deprecated); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/buttons/transforms.js /** * WordPress dependencies */ /** * Internal dependencies */ var buttons_transforms_apiVersion$name$cate = { apiVersion: 2, name: "core/buttons", category: "design", attributes: { contentJustification: { type: "string" }, orientation: { type: "string", "default": "horizontal" } }, supports: { anchor: true, align: ["wide", "full"] }, editorStyle: "wp-block-buttons-editor", style: "wp-block-buttons" }, buttons_transforms_name = buttons_transforms_apiVersion$name$cate.name; var buttons_transforms_transforms = { from: [{ type: 'block', isMultiBlock: true, blocks: ['core/button'], transform: function transform(buttons) { return (// Creates the buttons block Object(external_wp_blocks_["createBlock"])(buttons_transforms_name, {}, // Loop the selected buttons buttons.map(function (attributes) { return (// Create singular button in the buttons block Object(external_wp_blocks_["createBlock"])('core/button', attributes) ); })) ); } }] }; /* harmony default export */ var buttons_transforms = (buttons_transforms_transforms); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/button/deprecated.js function button_deprecated_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 button_deprecated_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { button_deprecated_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { button_deprecated_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } /** * External dependencies */ /** * WordPress dependencies */ var deprecated_migrateCustomColorsAndGradients = function migrateCustomColorsAndGradients(attributes) { if (!attributes.customTextColor && !attributes.customBackgroundColor && !attributes.customGradient) { return attributes; } var style = { color: {} }; if (attributes.customTextColor) { style.color.text = attributes.customTextColor; } if (attributes.customBackgroundColor) { style.color.background = attributes.customBackgroundColor; } if (attributes.customGradient) { style.color.gradient = attributes.customGradient; } return button_deprecated_objectSpread(button_deprecated_objectSpread({}, Object(external_lodash_["omit"])(attributes, ['customTextColor', 'customBackgroundColor', 'customGradient'])), {}, { style: style }); }; var deprecated_oldColorsMigration = function oldColorsMigration(attributes) { return deprecated_migrateCustomColorsAndGradients(Object(external_lodash_["omit"])(button_deprecated_objectSpread(button_deprecated_objectSpread({}, attributes), {}, { customTextColor: attributes.textColor && '#' === attributes.textColor[0] ? attributes.textColor : undefined, customBackgroundColor: attributes.color && '#' === attributes.color[0] ? attributes.color : undefined }), ['color', 'textColor'])); }; var button_deprecated_blockAttributes = { url: { type: 'string', source: 'attribute', selector: 'a', attribute: 'href' }, title: { type: 'string', source: 'attribute', selector: 'a', attribute: 'title' }, text: { type: 'string', source: 'html', selector: 'a' } }; var button_deprecated_deprecated = [{ supports: { align: true, alignWide: false, color: { gradients: true } }, attributes: button_deprecated_objectSpread(button_deprecated_objectSpread({}, button_deprecated_blockAttributes), {}, { linkTarget: { type: 'string', source: 'attribute', selector: 'a', attribute: 'target' }, rel: { type: 'string', source: 'attribute', selector: 'a', attribute: 'rel' }, placeholder: { type: 'string' }, borderRadius: { type: 'number' }, backgroundColor: { type: 'string' }, textColor: { type: 'string' }, gradient: { type: 'string' }, style: { type: 'object' } }), save: function save(_ref) { var attributes = _ref.attributes; var borderRadius = attributes.borderRadius, linkTarget = attributes.linkTarget, rel = attributes.rel, text = attributes.text, title = attributes.title, url = attributes.url; var buttonClasses = classnames_default()('wp-block-button__link', { 'no-border-radius': borderRadius === 0 }); var buttonStyle = { borderRadius: borderRadius ? borderRadius + 'px' : undefined }; return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "a", className: buttonClasses, href: url, title: title, style: buttonStyle, value: text, target: linkTarget, rel: rel }); } }, { supports: { align: true, alignWide: false }, attributes: button_deprecated_objectSpread(button_deprecated_objectSpread({}, button_deprecated_blockAttributes), {}, { linkTarget: { type: 'string', source: 'attribute', selector: 'a', attribute: 'target' }, rel: { type: 'string', source: 'attribute', selector: 'a', attribute: 'rel' }, placeholder: { type: 'string' }, borderRadius: { type: 'number' }, backgroundColor: { type: 'string' }, textColor: { type: 'string' }, customBackgroundColor: { type: 'string' }, customTextColor: { type: 'string' }, customGradient: { type: 'string' }, gradient: { type: 'string' } }), isEligible: function isEligible(attributes) { return !!attributes.customTextColor || !!attributes.customBackgroundColor || !!attributes.customGradient; }, migrate: deprecated_migrateCustomColorsAndGradients, save: function save(_ref2) { var _classnames; var attributes = _ref2.attributes; var backgroundColor = attributes.backgroundColor, borderRadius = attributes.borderRadius, customBackgroundColor = attributes.customBackgroundColor, customTextColor = attributes.customTextColor, customGradient = attributes.customGradient, linkTarget = attributes.linkTarget, gradient = attributes.gradient, rel = attributes.rel, text = attributes.text, textColor = attributes.textColor, title = attributes.title, url = attributes.url; var textClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor); var backgroundClass = !customGradient && Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor); var gradientClass = Object(external_wp_blockEditor_["__experimentalGetGradientClass"])(gradient); var buttonClasses = classnames_default()('wp-block-button__link', (_classnames = { 'has-text-color': textColor || customTextColor }, Object(defineProperty["a" /* default */])(_classnames, textClass, textClass), Object(defineProperty["a" /* default */])(_classnames, 'has-background', backgroundColor || customBackgroundColor || customGradient || gradient), Object(defineProperty["a" /* default */])(_classnames, backgroundClass, backgroundClass), Object(defineProperty["a" /* default */])(_classnames, 'no-border-radius', borderRadius === 0), Object(defineProperty["a" /* default */])(_classnames, gradientClass, gradientClass), _classnames)); var buttonStyle = { background: customGradient ? customGradient : undefined, backgroundColor: backgroundClass || customGradient || gradient ? undefined : customBackgroundColor, color: textClass ? undefined : customTextColor, borderRadius: borderRadius ? borderRadius + 'px' : undefined }; // The use of a `title` attribute here is soft-deprecated, but still applied // if it had already been assigned, for the sake of backward-compatibility. // A title will no longer be assigned for new or updated button block links. return Object(external_wp_element_["createElement"])("div", null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "a", className: buttonClasses, href: url, title: title, style: buttonStyle, value: text, target: linkTarget, rel: rel })); } }, { attributes: button_deprecated_objectSpread(button_deprecated_objectSpread({}, button_deprecated_blockAttributes), {}, { align: { type: 'string', default: 'none' }, backgroundColor: { type: 'string' }, textColor: { type: 'string' }, customBackgroundColor: { type: 'string' }, customTextColor: { type: 'string' }, linkTarget: { type: 'string', source: 'attribute', selector: 'a', attribute: 'target' }, rel: { type: 'string', source: 'attribute', selector: 'a', attribute: 'rel' }, placeholder: { type: 'string' } }), isEligible: function isEligible(attribute) { return attribute.className && attribute.className.includes('is-style-squared'); }, migrate: function migrate(attributes) { var newClassName = attributes.className; if (newClassName) { newClassName = newClassName.replace(/is-style-squared[\s]?/, '').trim(); } return deprecated_migrateCustomColorsAndGradients(button_deprecated_objectSpread(button_deprecated_objectSpread({}, attributes), {}, { className: newClassName ? newClassName : undefined, borderRadius: 0 })); }, save: function save(_ref3) { var _classnames2; var attributes = _ref3.attributes; var backgroundColor = attributes.backgroundColor, customBackgroundColor = attributes.customBackgroundColor, customTextColor = attributes.customTextColor, linkTarget = attributes.linkTarget, rel = attributes.rel, text = attributes.text, textColor = attributes.textColor, title = attributes.title, url = attributes.url; var textClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor); var backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor); var buttonClasses = classnames_default()('wp-block-button__link', (_classnames2 = { 'has-text-color': textColor || customTextColor }, Object(defineProperty["a" /* default */])(_classnames2, textClass, textClass), Object(defineProperty["a" /* default */])(_classnames2, 'has-background', backgroundColor || customBackgroundColor), Object(defineProperty["a" /* default */])(_classnames2, backgroundClass, backgroundClass), _classnames2)); var buttonStyle = { backgroundColor: backgroundClass ? undefined : customBackgroundColor, color: textClass ? undefined : customTextColor }; return Object(external_wp_element_["createElement"])("div", null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "a", className: buttonClasses, href: url, title: title, style: buttonStyle, value: text, target: linkTarget, rel: rel })); } }, { attributes: button_deprecated_objectSpread(button_deprecated_objectSpread({}, button_deprecated_blockAttributes), {}, { align: { type: 'string', default: 'none' }, backgroundColor: { type: 'string' }, textColor: { type: 'string' }, customBackgroundColor: { type: 'string' }, customTextColor: { type: 'string' } }), migrate: deprecated_oldColorsMigration, save: function save(_ref4) { var _classnames3; var attributes = _ref4.attributes; var url = attributes.url, text = attributes.text, title = attributes.title, backgroundColor = attributes.backgroundColor, textColor = attributes.textColor, customBackgroundColor = attributes.customBackgroundColor, customTextColor = attributes.customTextColor; var textClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor); var backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor); var buttonClasses = classnames_default()('wp-block-button__link', (_classnames3 = { 'has-text-color': textColor || customTextColor }, Object(defineProperty["a" /* default */])(_classnames3, textClass, textClass), Object(defineProperty["a" /* default */])(_classnames3, 'has-background', backgroundColor || customBackgroundColor), Object(defineProperty["a" /* default */])(_classnames3, backgroundClass, backgroundClass), _classnames3)); var buttonStyle = { backgroundColor: backgroundClass ? undefined : customBackgroundColor, color: textClass ? undefined : customTextColor }; return Object(external_wp_element_["createElement"])("div", null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "a", className: buttonClasses, href: url, title: title, style: buttonStyle, value: text })); } }, { attributes: button_deprecated_objectSpread(button_deprecated_objectSpread({}, button_deprecated_blockAttributes), {}, { color: { type: 'string' }, textColor: { type: 'string' }, align: { type: 'string', default: 'none' } }), save: function save(_ref5) { var attributes = _ref5.attributes; var url = attributes.url, text = attributes.text, title = attributes.title, align = attributes.align, color = attributes.color, textColor = attributes.textColor; var buttonStyle = { backgroundColor: color, color: textColor }; var linkClass = 'wp-block-button__link'; return Object(external_wp_element_["createElement"])("div", { className: "align".concat(align) }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "a", className: linkClass, href: url, title: title, style: buttonStyle, value: text })); }, migrate: deprecated_oldColorsMigration }, { attributes: button_deprecated_objectSpread(button_deprecated_objectSpread({}, button_deprecated_blockAttributes), {}, { color: { type: 'string' }, textColor: { type: 'string' }, align: { type: 'string', default: 'none' } }), save: function save(_ref6) { var attributes = _ref6.attributes; var url = attributes.url, text = attributes.text, title = attributes.title, align = attributes.align, color = attributes.color, textColor = attributes.textColor; return Object(external_wp_element_["createElement"])("div", { className: "align".concat(align), style: { backgroundColor: color } }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "a", href: url, title: title, style: { color: textColor }, value: text })); }, migrate: deprecated_oldColorsMigration }]; /* harmony default export */ var button_deprecated = (button_deprecated_deprecated); // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/link.js var library_link = __webpack_require__(195); // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/link-off.js var link_off = __webpack_require__(221); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/button/color-edit.js function color_edit_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 color_edit_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { color_edit_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { color_edit_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ var EMPTY_ARRAY = []; var isWebPlatform = external_wp_element_["Platform"].OS === 'web'; function color_edit_getComputedStyle(node) { return node.ownerDocument.defaultView.getComputedStyle(node); } // The code in this file is copied entirely from the "color" and "style" support flags // The flag can't be used at the moment because of the extra wrapper around // the button block markup. function getBlockDOMNode(clientId) { return document.getElementById('block-' + clientId); } /** * Removed undefined values from nested object. * * @param {*} object * @return {*} Object cleaned from undefined values */ var color_edit_cleanEmptyObject = function cleanEmptyObject(object) { if (!Object(external_lodash_["isObject"])(object)) { return object; } var cleanedNestedObjects = Object(external_lodash_["pickBy"])(Object(external_lodash_["mapValues"])(object, cleanEmptyObject), external_lodash_["identity"]); return Object(external_lodash_["isEqual"])(cleanedNestedObjects, {}) ? undefined : cleanedNestedObjects; }; function ColorPanel(_ref) { var settings = _ref.settings, clientId = _ref.clientId, _ref$enableContrastCh = _ref.enableContrastChecking, enableContrastChecking = _ref$enableContrastCh === void 0 ? true : _ref$enableContrastCh; var _useState = Object(external_wp_element_["useState"])(), _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2), detectedBackgroundColor = _useState2[0], setDetectedBackgroundColor = _useState2[1]; var _useState3 = Object(external_wp_element_["useState"])(), _useState4 = Object(slicedToArray["a" /* default */])(_useState3, 2), detectedColor = _useState4[0], setDetectedColor = _useState4[1]; var title = isWebPlatform ? Object(external_wp_i18n_["__"])('Color settings') : Object(external_wp_i18n_["__"])('Color Settings'); Object(external_wp_element_["useEffect"])(function () { if (isWebPlatform && !enableContrastChecking) { return; } var colorsDetectionElement = getBlockDOMNode(clientId); if (!colorsDetectionElement) { return; } setDetectedColor(color_edit_getComputedStyle(colorsDetectionElement).color); var backgroundColorNode = colorsDetectionElement; var backgroundColor = color_edit_getComputedStyle(backgroundColorNode).backgroundColor; while (backgroundColor === 'rgba(0, 0, 0, 0)' && backgroundColorNode.parentNode && backgroundColorNode.parentNode.nodeType === backgroundColorNode.parentNode.ELEMENT_NODE) { backgroundColorNode = backgroundColorNode.parentNode; backgroundColor = color_edit_getComputedStyle(backgroundColorNode).backgroundColor; } setDetectedBackgroundColor(backgroundColor); }); return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalPanelColorGradientSettings"], { title: title, initialOpen: false, settings: settings }, isWebPlatform && enableContrastChecking && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["ContrastChecker"], { backgroundColor: detectedBackgroundColor, textColor: detectedColor }))); } /** * Inspector control panel containing the color related configuration * * @param {Object} props * * @return {WPElement} Color edit element. */ function ColorEdit(props) { var _style$color2, _style$color3, _style$color4; var attributes = props.attributes; var colors = Object(external_wp_blockEditor_["__experimentalUseEditorFeature"])('color.palette') || EMPTY_ARRAY; var gradients = Object(external_wp_blockEditor_["__experimentalUseEditorFeature"])('color.gradients') || EMPTY_ARRAY; // Shouldn't be needed but right now the ColorGradientsPanel // can trigger both onChangeColor and onChangeBackground // synchronously causing our two callbacks to override changes // from each other. var localAttributes = Object(external_wp_element_["useRef"])(attributes); Object(external_wp_element_["useEffect"])(function () { localAttributes.current = attributes; }, [attributes]); var style = attributes.style, textColor = attributes.textColor, backgroundColor = attributes.backgroundColor, gradient = attributes.gradient; var gradientValue; if (gradient) { gradientValue = Object(external_wp_blockEditor_["getGradientValueBySlug"])(gradients, gradient); } else { var _style$color; gradientValue = style === null || style === void 0 ? void 0 : (_style$color = style.color) === null || _style$color === void 0 ? void 0 : _style$color.gradient; } var onChangeColor = function onChangeColor(name) { return function (value) { var _localAttributes$curr, _localAttributes$curr2; var colorObject = Object(external_wp_blockEditor_["getColorObjectByColorValue"])(colors, value); var attributeName = name + 'Color'; var newStyle = color_edit_objectSpread(color_edit_objectSpread({}, localAttributes.current.style), {}, { color: color_edit_objectSpread(color_edit_objectSpread({}, (_localAttributes$curr = localAttributes.current) === null || _localAttributes$curr === void 0 ? void 0 : (_localAttributes$curr2 = _localAttributes$curr.style) === null || _localAttributes$curr2 === void 0 ? void 0 : _localAttributes$curr2.color), {}, Object(defineProperty["a" /* default */])({}, name, colorObject !== null && colorObject !== void 0 && colorObject.slug ? undefined : value)) }); var newNamedColor = colorObject !== null && colorObject !== void 0 && colorObject.slug ? colorObject.slug : undefined; var newAttributes = Object(defineProperty["a" /* default */])({ style: color_edit_cleanEmptyObject(newStyle) }, attributeName, newNamedColor); props.setAttributes(newAttributes); localAttributes.current = color_edit_objectSpread(color_edit_objectSpread({}, localAttributes.current), newAttributes); }; }; var onChangeGradient = function onChangeGradient(value) { var slug = Object(external_wp_blockEditor_["getGradientSlugByValue"])(gradients, value); var newAttributes; if (slug) { var _localAttributes$curr3, _localAttributes$curr4, _localAttributes$curr5; var newStyle = color_edit_objectSpread(color_edit_objectSpread({}, (_localAttributes$curr3 = localAttributes.current) === null || _localAttributes$curr3 === void 0 ? void 0 : _localAttributes$curr3.style), {}, { color: color_edit_objectSpread(color_edit_objectSpread({}, (_localAttributes$curr4 = localAttributes.current) === null || _localAttributes$curr4 === void 0 ? void 0 : (_localAttributes$curr5 = _localAttributes$curr4.style) === null || _localAttributes$curr5 === void 0 ? void 0 : _localAttributes$curr5.color), {}, { gradient: undefined }) }); newAttributes = { style: color_edit_cleanEmptyObject(newStyle), gradient: slug }; } else { var _localAttributes$curr6, _localAttributes$curr7, _localAttributes$curr8; var _newStyle = color_edit_objectSpread(color_edit_objectSpread({}, (_localAttributes$curr6 = localAttributes.current) === null || _localAttributes$curr6 === void 0 ? void 0 : _localAttributes$curr6.style), {}, { color: color_edit_objectSpread(color_edit_objectSpread({}, (_localAttributes$curr7 = localAttributes.current) === null || _localAttributes$curr7 === void 0 ? void 0 : (_localAttributes$curr8 = _localAttributes$curr7.style) === null || _localAttributes$curr8 === void 0 ? void 0 : _localAttributes$curr8.color), {}, { gradient: value }) }); newAttributes = { style: color_edit_cleanEmptyObject(_newStyle), gradient: undefined }; } props.setAttributes(newAttributes); localAttributes.current = color_edit_objectSpread(color_edit_objectSpread({}, localAttributes.current), newAttributes); }; return Object(external_wp_element_["createElement"])(ColorPanel, { enableContrastChecking: !gradient && !(style !== null && style !== void 0 && (_style$color2 = style.color) !== null && _style$color2 !== void 0 && _style$color2.gradient), clientId: props.clientId, settings: [{ label: Object(external_wp_i18n_["__"])('Text Color'), onColorChange: onChangeColor('text'), colorValue: Object(external_wp_blockEditor_["getColorObjectByAttributeValues"])(colors, textColor, style === null || style === void 0 ? void 0 : (_style$color3 = style.color) === null || _style$color3 === void 0 ? void 0 : _style$color3.text).color }, { label: Object(external_wp_i18n_["__"])('Background Color'), onColorChange: onChangeColor('background'), colorValue: Object(external_wp_blockEditor_["getColorObjectByAttributeValues"])(colors, backgroundColor, style === null || style === void 0 ? void 0 : (_style$color4 = style.color) === null || _style$color4 === void 0 ? void 0 : _style$color4.background).color, gradientValue: gradientValue, onGradientChange: onChangeGradient }] }); } /* harmony default export */ var color_edit = (ColorEdit); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/button/color-props.js /** * External dependencies */ /** * WordPress dependencies */ // The code in this file is copied entirely from the "color" and "style" support flags // The flag can't be used at the moment because of the extra wrapper around // the button block markup. function getColorAndStyleProps(attributes, colors) { var _style$color, _style$color2, _style$color3, _style$color4, _classnames, _style$color5, _style$color6, _style$color7, _style$color8, _style$color9, _style$color10; var isEdit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; // I'd have prefered to avoid the "style" attribute usage here var backgroundColor = attributes.backgroundColor, textColor = attributes.textColor, gradient = attributes.gradient, style = attributes.style; var backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor); var gradientClass = Object(external_wp_blockEditor_["__experimentalGetGradientClass"])(gradient); var textClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor); var className = classnames_default()(textClass, gradientClass, (_classnames = {}, Object(defineProperty["a" /* default */])(_classnames, backgroundClass, !(style !== null && style !== void 0 && (_style$color = style.color) !== null && _style$color !== void 0 && _style$color.gradient) && !!backgroundClass), Object(defineProperty["a" /* default */])(_classnames, 'has-text-color', textColor || (style === null || style === void 0 ? void 0 : (_style$color2 = style.color) === null || _style$color2 === void 0 ? void 0 : _style$color2.text)), Object(defineProperty["a" /* default */])(_classnames, 'has-background', backgroundColor || (style === null || style === void 0 ? void 0 : (_style$color3 = style.color) === null || _style$color3 === void 0 ? void 0 : _style$color3.background) || gradient || (style === null || style === void 0 ? void 0 : (_style$color4 = style.color) === null || _style$color4 === void 0 ? void 0 : _style$color4.gradient)), _classnames)); var styleProp = style !== null && style !== void 0 && (_style$color5 = style.color) !== null && _style$color5 !== void 0 && _style$color5.background || style !== null && style !== void 0 && (_style$color6 = style.color) !== null && _style$color6 !== void 0 && _style$color6.text || style !== null && style !== void 0 && (_style$color7 = style.color) !== null && _style$color7 !== void 0 && _style$color7.gradient ? { background: style !== null && style !== void 0 && (_style$color8 = style.color) !== null && _style$color8 !== void 0 && _style$color8.gradient ? style.color.gradient : undefined, backgroundColor: style !== null && style !== void 0 && (_style$color9 = style.color) !== null && _style$color9 !== void 0 && _style$color9.background ? style.color.background : undefined, color: style !== null && style !== void 0 && (_style$color10 = style.color) !== null && _style$color10 !== void 0 && _style$color10.text ? style.color.text : undefined } : {}; // This is needed only for themes that don't load their color stylesheets in the editor // We force an inline style to apply the color. if (isEdit) { if (backgroundColor) { var backgroundColorObject = Object(external_wp_blockEditor_["getColorObjectByAttributeValues"])(colors, backgroundColor); styleProp.backgroundColor = backgroundColorObject.color; } if (textColor) { var textColorObject = Object(external_wp_blockEditor_["getColorObjectByAttributeValues"])(colors, textColor); styleProp.color = textColorObject.color; } } return { className: !!className ? className : undefined, style: styleProp }; } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/button/edit.js function button_edit_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 button_edit_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { button_edit_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { button_edit_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ var edit_NEW_TAB_REL = 'noreferrer noopener'; var MIN_BORDER_RADIUS_VALUE = 0; var MAX_BORDER_RADIUS_VALUE = 50; var INITIAL_BORDER_RADIUS_POSITION = 5; var edit_EMPTY_ARRAY = []; function BorderPanel(_ref) { var _ref$borderRadius = _ref.borderRadius, borderRadius = _ref$borderRadius === void 0 ? '' : _ref$borderRadius, setAttributes = _ref.setAttributes; var initialBorderRadius = borderRadius; var setBorderRadius = Object(external_wp_element_["useCallback"])(function (newBorderRadius) { if (newBorderRadius === undefined) setAttributes({ borderRadius: initialBorderRadius });else setAttributes({ borderRadius: newBorderRadius }); }, [setAttributes]); return Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], { title: Object(external_wp_i18n_["__"])('Border settings') }, Object(external_wp_element_["createElement"])(external_wp_components_["RangeControl"], { value: borderRadius, label: Object(external_wp_i18n_["__"])('Border radius'), min: MIN_BORDER_RADIUS_VALUE, max: MAX_BORDER_RADIUS_VALUE, initialPosition: INITIAL_BORDER_RADIUS_POSITION, allowReset: true, onChange: setBorderRadius })); } function WidthPanel(_ref2) { var selectedWidth = _ref2.selectedWidth, setAttributes = _ref2.setAttributes; function handleChange(newWidth) { // Check if we are toggling the width off var width = selectedWidth === newWidth ? undefined : newWidth; // Update attributes setAttributes({ width: width }); } return Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], { title: Object(external_wp_i18n_["__"])('Width settings') }, Object(external_wp_element_["createElement"])(external_wp_components_["ButtonGroup"], { "aria-label": Object(external_wp_i18n_["__"])('Button width') }, [25, 50, 75, 100].map(function (widthValue) { return Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { key: widthValue, isSmall: true, isPrimary: widthValue === selectedWidth, onClick: function onClick() { return handleChange(widthValue); } }, widthValue, "%"); }))); } function URLPicker(_ref3) { var _ref5; var isSelected = _ref3.isSelected, url = _ref3.url, setAttributes = _ref3.setAttributes, opensInNewTab = _ref3.opensInNewTab, onToggleOpenInNewTab = _ref3.onToggleOpenInNewTab, anchorRef = _ref3.anchorRef; var _useState = Object(external_wp_element_["useState"])(false), _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2), isURLPickerOpen = _useState2[0], setIsURLPickerOpen = _useState2[1]; var urlIsSet = !!url; var urlIsSetandSelected = urlIsSet && isSelected; var openLinkControl = function openLinkControl() { setIsURLPickerOpen(true); return false; // prevents default behaviour for event }; var unlinkButton = function unlinkButton() { setAttributes({ url: undefined, linkTarget: undefined, rel: undefined }); setIsURLPickerOpen(false); }; var linkControl = (isURLPickerOpen || urlIsSetandSelected) && Object(external_wp_element_["createElement"])(external_wp_components_["Popover"], { position: "bottom center", onClose: function onClose() { return setIsURLPickerOpen(false); }, anchorRef: anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.current }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalLinkControl"], { className: "wp-block-navigation-link__inline-link-input", value: { url: url, opensInNewTab: opensInNewTab }, onChange: function onChange(_ref4) { var _ref4$url = _ref4.url, newURL = _ref4$url === void 0 ? '' : _ref4$url, newOpensInNewTab = _ref4.opensInNewTab; setAttributes({ url: newURL }); if (opensInNewTab !== newOpensInNewTab) { onToggleOpenInNewTab(newOpensInNewTab); } } })); return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], null, !urlIsSet && Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], { name: "link", icon: library_link["a" /* default */], title: Object(external_wp_i18n_["__"])('Link'), shortcut: external_wp_keycodes_["displayShortcut"].primary('k'), onClick: openLinkControl }), urlIsSetandSelected && Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], { name: "link", icon: link_off["a" /* default */], title: Object(external_wp_i18n_["__"])('Unlink'), shortcut: external_wp_keycodes_["displayShortcut"].primaryShift('k'), onClick: unlinkButton, isActive: true }))), isSelected && Object(external_wp_element_["createElement"])(external_wp_components_["KeyboardShortcuts"], { bindGlobal: true, shortcuts: (_ref5 = {}, Object(defineProperty["a" /* default */])(_ref5, external_wp_keycodes_["rawShortcut"].primary('k'), openLinkControl), Object(defineProperty["a" /* default */])(_ref5, external_wp_keycodes_["rawShortcut"].primaryShift('k'), unlinkButton), _ref5) }), linkControl); } function ButtonEdit(props) { var attributes = props.attributes, setAttributes = props.setAttributes, className = props.className, isSelected = props.isSelected, onReplace = props.onReplace, mergeBlocks = props.mergeBlocks; var borderRadius = attributes.borderRadius, linkTarget = attributes.linkTarget, placeholder = attributes.placeholder, rel = attributes.rel, text = attributes.text, url = attributes.url, width = attributes.width; var onSetLinkRel = Object(external_wp_element_["useCallback"])(function (value) { setAttributes({ rel: value }); }, [setAttributes]); var colors = Object(external_wp_blockEditor_["__experimentalUseEditorFeature"])('color.palette') || edit_EMPTY_ARRAY; var onToggleOpenInNewTab = Object(external_wp_element_["useCallback"])(function (value) { var newLinkTarget = value ? '_blank' : undefined; var updatedRel = rel; if (newLinkTarget && !rel) { updatedRel = edit_NEW_TAB_REL; } else if (!newLinkTarget && rel === edit_NEW_TAB_REL) { updatedRel = undefined; } setAttributes({ linkTarget: newLinkTarget, rel: updatedRel }); }, [rel, setAttributes]); var colorProps = getColorAndStyleProps(attributes, colors, true); var blockProps = Object(external_wp_blockEditor_["useBlockProps"])(); return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(color_edit, props), Object(external_wp_element_["createElement"])("div", Object(esm_extends["a" /* default */])({}, blockProps, { className: classnames_default()(blockProps.className, Object(defineProperty["a" /* default */])({}, "has-custom-width wp-block-button__width-".concat(width), width)) }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], { "aria-label": Object(external_wp_i18n_["__"])('Button text'), placeholder: placeholder || Object(external_wp_i18n_["__"])('Add text…'), value: text, onChange: function onChange(value) { return setAttributes({ text: value }); }, withoutInteractiveFormatting: true, className: classnames_default()(className, 'wp-block-button__link', colorProps.className, { 'no-border-radius': borderRadius === 0 }), style: button_edit_objectSpread({ borderRadius: borderRadius ? borderRadius + 'px' : undefined }, colorProps.style), onSplit: function onSplit(value) { return Object(external_wp_blocks_["createBlock"])('core/button', button_edit_objectSpread(button_edit_objectSpread({}, attributes), {}, { text: value })); }, onReplace: onReplace, onMerge: mergeBlocks, identifier: "text" })), Object(external_wp_element_["createElement"])(URLPicker, { url: url, setAttributes: setAttributes, isSelected: isSelected, opensInNewTab: linkTarget === '_blank', onToggleOpenInNewTab: onToggleOpenInNewTab, anchorRef: blockProps.ref }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(BorderPanel, { borderRadius: borderRadius, setAttributes: setAttributes }), Object(external_wp_element_["createElement"])(WidthPanel, { selectedWidth: width, setAttributes: setAttributes }), Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], { title: Object(external_wp_i18n_["__"])('Link settings') }, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { label: Object(external_wp_i18n_["__"])('Open in new tab'), onChange: onToggleOpenInNewTab, checked: linkTarget === '_blank' }), Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"], { label: Object(external_wp_i18n_["__"])('Link rel'), value: rel || '', onChange: onSetLinkRel })))); } /* harmony default export */ var button_edit = (ButtonEdit); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/button/save.js function save_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 save_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { save_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { save_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ function button_save_save(_ref) { var attributes = _ref.attributes, className = _ref.className; var borderRadius = attributes.borderRadius, linkTarget = attributes.linkTarget, rel = attributes.rel, text = attributes.text, title = attributes.title, url = attributes.url, width = attributes.width; var colorProps = getColorAndStyleProps(attributes); var buttonClasses = classnames_default()('wp-block-button__link', colorProps.className, { 'no-border-radius': borderRadius === 0 }); var buttonStyle = save_objectSpread({ borderRadius: borderRadius ? borderRadius + 'px' : undefined }, colorProps.style); // The use of a `title` attribute here is soft-deprecated, but still applied // if it had already been assigned, for the sake of backward-compatibility. // A title will no longer be assigned for new or updated button block links. var wrapperClasses = classnames_default()(className, Object(defineProperty["a" /* default */])({}, "has-custom-width wp-block-button__width-".concat(width), width)); return Object(external_wp_element_["createElement"])("div", external_wp_blockEditor_["useBlockProps"].save({ className: wrapperClasses }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "a", className: buttonClasses, href: url, title: title, style: buttonStyle, value: text, target: linkTarget, rel: rel })); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/button/index.js function button_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 button_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { button_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { button_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } /** * WordPress dependencies */ /** * Internal dependencies */ var button_metadata = { apiVersion: 2, name: "core/button", category: "design", parent: ["core/buttons"], attributes: { url: { type: "string", source: "attribute", selector: "a", attribute: "href" }, title: { type: "string", source: "attribute", selector: "a", attribute: "title" }, text: { type: "string", source: "html", selector: "a" }, linkTarget: { type: "string", source: "attribute", selector: "a", attribute: "target" }, rel: { type: "string", source: "attribute", selector: "a", attribute: "rel" }, placeholder: { type: "string" }, borderRadius: { type: "number" }, style: { type: "object" }, backgroundColor: { type: "string" }, textColor: { type: "string" }, gradient: { type: "string" }, width: { type: "number" } }, supports: { anchor: true, align: true, alignWide: false, reusable: false, __experimentalSelector: ".wp-block-button > a" }, editorStyle: "wp-block-button-editor", style: "wp-block-button" }; var button_name = button_metadata.name; var button_settings = { title: Object(external_wp_i18n_["_x"])('Button', 'block title'), description: Object(external_wp_i18n_["__"])('Prompt visitors to take action with a button-style link.'), icon: library_button["a" /* default */], keywords: [Object(external_wp_i18n_["__"])('link')], example: { attributes: { className: 'is-style-fill', backgroundColor: 'vivid-green-cyan', text: Object(external_wp_i18n_["__"])('Call to Action') } }, styles: [{ name: 'fill', label: Object(external_wp_i18n_["__"])('Fill'), isDefault: true }, { name: 'outline', label: Object(external_wp_i18n_["__"])('Outline') }], edit: button_edit, save: button_save_save, deprecated: button_deprecated, merge: function merge(a, _ref) { var _ref$text = _ref.text, text = _ref$text === void 0 ? '' : _ref$text; return button_objectSpread(button_objectSpread({}, a), {}, { text: (a.text || '') + text }); } }; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/justify-left.js /** * WordPress dependencies */ var justifyLeft = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M9 9v6h11V9H9zM4 20h1.5V4H4v16z" })); /* harmony default export */ var justify_left = (justifyLeft); // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/justify-center.js /** * WordPress dependencies */ var justifyCenter = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M20 9h-7.2V4h-1.6v5H4v6h7.2v5h1.6v-5H20z" })); /* harmony default export */ var justify_center = (justifyCenter); // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/justify-right.js /** * WordPress dependencies */ var justifyRight = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z" })); /* harmony default export */ var justify_right = (justifyRight); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/buttons/content-justification-dropdown.js function content_justification_dropdown_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 content_justification_dropdown_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { content_justification_dropdown_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { content_justification_dropdown_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } /** * WordPress dependencies */ var DEFAULT_ALLOWED_VALUES = ['left', 'center', 'right']; var CONTROLS = { left: { icon: justify_left, title: Object(external_wp_i18n_["__"])('Justify content left') }, center: { icon: justify_center, title: Object(external_wp_i18n_["__"])('Justify content center') }, right: { icon: justify_right, title: Object(external_wp_i18n_["__"])('Justify content right') } }; var DEFAULT_ICON = CONTROLS.left.icon; /** * Dropdown for selecting a content justification option. * * @param {Object} props Component props. * @param {string[]} [props.allowedValues] List of options to include. Default: * ['left', 'center', 'right']. * @param {()=>void} props.onChange Callback to run when an option is * selected in the dropdown. * @param {Object} props.toggleProps Props to pass to the dropdown toggle. * @param {string} props.value The current content justification * value. * * @return {WPComponent} The component. */ function ContentJustificationDropdown(_ref) { var _CONTROLS$value$icon, _CONTROLS$value; var onChange = _ref.onChange, _ref$allowedValues = _ref.allowedValues, allowedValues = _ref$allowedValues === void 0 ? DEFAULT_ALLOWED_VALUES : _ref$allowedValues, toggleProps = _ref.toggleProps, value = _ref.value; return Object(external_wp_element_["createElement"])(external_wp_components_["DropdownMenu"], { icon: (_CONTROLS$value$icon = (_CONTROLS$value = CONTROLS[value]) === null || _CONTROLS$value === void 0 ? void 0 : _CONTROLS$value.icon) !== null && _CONTROLS$value$icon !== void 0 ? _CONTROLS$value$icon : DEFAULT_ICON, label: Object(external_wp_i18n_["__"])('Change content justification'), controls: allowedValues.map(function (allowedValue) { return content_justification_dropdown_objectSpread(content_justification_dropdown_objectSpread({}, CONTROLS[allowedValue]), {}, { isActive: value === allowedValue, role: 'menuitemradio', onClick: function onClick() { return onChange(value === allowedValue ? undefined : allowedValue); } }); }), toggleProps: toggleProps }); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/buttons/edit.js /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ var ALLOWED_BLOCKS = [button_name]; var BUTTONS_TEMPLATE = [['core/button']]; function ButtonsEdit(_ref) { var _classnames; var _ref$attributes = _ref.attributes, contentJustification = _ref$attributes.contentJustification, orientation = _ref$attributes.orientation, setAttributes = _ref.setAttributes; var blockProps = Object(external_wp_blockEditor_["useBlockProps"])({ className: classnames_default()((_classnames = {}, Object(defineProperty["a" /* default */])(_classnames, "is-content-justification-".concat(contentJustification), contentJustification), Object(defineProperty["a" /* default */])(_classnames, 'is-vertical', orientation === 'vertical'), _classnames)) }); var innerBlocksProps = Object(external_wp_blockEditor_["__experimentalUseInnerBlocksProps"])(blockProps, { allowedBlocks: ALLOWED_BLOCKS, template: BUTTONS_TEMPLATE, orientation: orientation, __experimentalLayout: { type: 'default', alignments: [] }, templateInsertUpdatesSelection: true }); return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarItem"], null, function (toggleProps) { return Object(external_wp_element_["createElement"])(ContentJustificationDropdown, { toggleProps: toggleProps, value: contentJustification, onChange: function onChange(updatedValue) { setAttributes({ contentJustification: updatedValue }); } }); }))), Object(external_wp_element_["createElement"])("div", innerBlocksProps)); } /* harmony default export */ var buttons_edit = (ButtonsEdit); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/buttons/save.js /** * External dependencies */ /** * WordPress dependencies */ function buttons_save_save(_ref) { var _classnames; var _ref$attributes = _ref.attributes, contentJustification = _ref$attributes.contentJustification, orientation = _ref$attributes.orientation; return Object(external_wp_element_["createElement"])("div", external_wp_blockEditor_["useBlockProps"].save({ className: classnames_default()((_classnames = {}, Object(defineProperty["a" /* default */])(_classnames, "is-content-justification-".concat(contentJustification), contentJustification), Object(defineProperty["a" /* default */])(_classnames, 'is-vertical', orientation === 'vertical'), _classnames)) }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null)); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/buttons/variations.js /** * WordPress dependencies */ var variations_variations = [{ name: 'buttons-horizontal', isDefault: true, title: Object(external_wp_i18n_["__"])('Horizontal'), description: Object(external_wp_i18n_["__"])('Buttons shown in a row.'), attributes: { orientation: 'horizontal' }, scope: ['transform'] }, { name: 'buttons-vertical', title: Object(external_wp_i18n_["__"])('Vertical'), description: Object(external_wp_i18n_["__"])('Buttons shown in a column.'), attributes: { orientation: 'vertical' }, scope: ['transform'] }]; /* harmony default export */ var buttons_variations = (variations_variations); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/buttons/index.js /** * WordPress dependencies */ /** * Internal dependencies */ var buttons_metadata = { apiVersion: 2, name: "core/buttons", category: "design", attributes: { contentJustification: { type: "string" }, orientation: { type: "string", "default": "horizontal" } }, supports: { anchor: true, align: ["wide", "full"] }, editorStyle: "wp-block-buttons-editor", style: "wp-block-buttons" }; var buttons_name = buttons_metadata.name; var buttons_settings = { title: Object(external_wp_i18n_["_x"])('Buttons', 'block title'), description: Object(external_wp_i18n_["__"])('Prompt visitors to take action with a group of button-style links.'), icon: library_button["a" /* default */], keywords: [Object(external_wp_i18n_["__"])('link')], example: { innerBlocks: [{ name: 'core/button', attributes: { text: Object(external_wp_i18n_["__"])('Find out more') } }, { name: 'core/button', attributes: { text: Object(external_wp_i18n_["__"])('Contact us') } }] }, deprecated: buttons_deprecated, transforms: buttons_transforms, edit: buttons_edit, save: buttons_save_save, variations: buttons_variations }; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/calendar.js /** * WordPress dependencies */ var calendar = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7h15v12zM9 10H7v2h2v-2zm0 4H7v2h2v-2zm4-4h-2v2h2v-2zm4 0h-2v2h2v-2zm-4 4h-2v2h2v-2zm4 0h-2v2h2v-2z" })); /* harmony default export */ var library_calendar = (calendar); // EXTERNAL MODULE: external "moment" var external_moment_ = __webpack_require__(45); var external_moment_default = /*#__PURE__*/__webpack_require__.n(external_moment_); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/calendar/edit.js function calendar_edit_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 calendar_edit_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { calendar_edit_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { calendar_edit_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } /** * External dependencies */ /** * WordPress dependencies */ var getYearMonth = memize_default()(function (date) { if (!date) { return {}; } var momentDate = external_moment_default()(date); return { year: momentDate.year(), month: momentDate.month() + 1 }; }); function CalendarEdit(_ref) { var attributes = _ref.attributes; var date = Object(external_wp_data_["useSelect"])(function (select) { var _select = select('core/editor'), getEditedPostAttribute = _select.getEditedPostAttribute; var postType = getEditedPostAttribute('type'); // Dates are used to overwrite year and month used on the calendar. // This overwrite should only happen for 'post' post types. // For other post types the calendar always displays the current month. return postType === 'post' ? getEditedPostAttribute('date') : undefined; }, []); return Object(external_wp_element_["createElement"])("div", Object(external_wp_blockEditor_["useBlockProps"])(), Object(external_wp_element_["createElement"])(external_wp_components_["Disabled"], null, Object(external_wp_element_["createElement"])(external_wp_serverSideRender_default.a, { block: "core/calendar", attributes: calendar_edit_objectSpread(calendar_edit_objectSpread({}, attributes), getYearMonth(date)) }))); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/calendar/index.js /** * WordPress dependencies */ /** * Internal dependencies */ var calendar_metadata = { apiVersion: 2, name: "core/calendar", category: "widgets", attributes: { month: { type: "integer" }, year: { type: "integer" } }, supports: { align: true }, style: "wp-block-calendar" }; var calendar_name = calendar_metadata.name; var calendar_settings = { title: Object(external_wp_i18n_["_x"])('Calendar', 'block title'), description: Object(external_wp_i18n_["__"])('A calendar of your site’s posts.'), icon: library_calendar, keywords: [Object(external_wp_i18n_["__"])('posts'), Object(external_wp_i18n_["__"])('archive')], example: {}, edit: CalendarEdit }; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/category.js /** * WordPress dependencies */ var category_category = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7h15v12zM9 10H7v2h2v-2zm0 4H7v2h2v-2zm4-4h-2v2h2v-2zm4 0h-2v2h2v-2zm-4 4h-2v2h2v-2zm4 0h-2v2h2v-2z" })); /* harmony default export */ var library_category = (category_category); // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/pin.js /** * WordPress dependencies */ var pin = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "-2 -2 24 24" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M10.44 3.02l1.82-1.82 6.36 6.35-1.83 1.82c-1.05-.68-2.48-.57-3.41.36l-.75.75c-.92.93-1.04 2.35-.35 3.41l-1.83 1.82-2.41-2.41-2.8 2.79c-.42.42-3.38 2.71-3.8 2.29s1.86-3.39 2.28-3.81l2.79-2.79L4.1 9.36l1.83-1.82c1.05.69 2.48.57 3.4-.36l.75-.75c.93-.92 1.05-2.35.36-3.41z" })); /* harmony default export */ var library_pin = (pin); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/categories/edit.js /** * External dependencies */ /** * WordPress dependencies */ function CategoriesEdit(_ref) { var _ref$attributes = _ref.attributes, displayAsDropdown = _ref$attributes.displayAsDropdown, showHierarchy = _ref$attributes.showHierarchy, showPostCounts = _ref$attributes.showPostCounts, setAttributes = _ref.setAttributes; var selectId = Object(external_wp_compose_["useInstanceId"])(CategoriesEdit, 'blocks-category-select'); var _useSelect = Object(external_wp_data_["useSelect"])(function (select) { var _select = select('core'), getEntityRecords = _select.getEntityRecords; var _select2 = select('core/data'), isResolving = _select2.isResolving; var query = { per_page: -1, hide_empty: true }; return { categories: getEntityRecords('taxonomy', 'category', query), isRequesting: isResolving('core', 'getEntityRecords', ['taxonomy', 'category', query]) }; }, []), categories = _useSelect.categories, isRequesting = _useSelect.isRequesting; var getCategoriesList = function getCategoriesList(parentId) { if (!(categories !== null && categories !== void 0 && categories.length)) { return []; } if (parentId === null) { return categories; } return categories.filter(function (_ref2) { var parent = _ref2.parent; return parent === parentId; }); }; var getCategoryListClassName = function getCategoryListClassName(level) { return "wp-block-categories__list wp-block-categories__list-level-".concat(level); }; var toggleAttribute = function toggleAttribute(attributeName) { return function (newValue) { return setAttributes(Object(defineProperty["a" /* default */])({}, attributeName, newValue)); }; }; var renderCategoryName = function renderCategoryName(name) { return !name ? Object(external_wp_i18n_["__"])('(Untitled)') : Object(external_lodash_["unescape"])(name).trim(); }; var renderCategoryList = function renderCategoryList() { var parentId = showHierarchy ? 0 : null; var categoriesList = getCategoriesList(parentId); return Object(external_wp_element_["createElement"])("ul", { className: getCategoryListClassName(0) }, categoriesList.map(function (category) { return renderCategoryListItem(category, 0); })); }; var renderCategoryListItem = function renderCategoryListItem(category, level) { var childCategories = getCategoriesList(category.id); var id = category.id, link = category.link, count = category.count, name = category.name; return Object(external_wp_element_["createElement"])("li", { key: id }, Object(external_wp_element_["createElement"])("a", { href: link, target: "_blank", rel: "noreferrer noopener" }, renderCategoryName(name)), showPostCounts && Object(external_wp_element_["createElement"])("span", { className: "wp-block-categories__post-count" }, " (".concat(count, ")")), showHierarchy && !!childCategories.length && Object(external_wp_element_["createElement"])("ul", { className: getCategoryListClassName(level + 1) }, childCategories.map(function (childCategory) { return renderCategoryListItem(childCategory, level + 1); }))); }; var renderCategoryDropdown = function renderCategoryDropdown() { var parentId = showHierarchy ? 0 : null; var categoriesList = getCategoriesList(parentId); return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["VisuallyHidden"], { as: "label", htmlFor: selectId }, Object(external_wp_i18n_["__"])('Categories')), Object(external_wp_element_["createElement"])("select", { id: selectId, className: "wp-block-categories__dropdown" }, categoriesList.map(function (category) { return renderCategoryDropdownItem(category, 0); }))); }; var renderCategoryDropdownItem = function renderCategoryDropdownItem(category, level) { var id = category.id, count = category.count, name = category.name; var childCategories = getCategoriesList(id); return [Object(external_wp_element_["createElement"])("option", { key: id }, Object(external_lodash_["times"])(level * 3, function () { return '\xa0'; }), renderCategoryName(name), showPostCounts && " (".concat(count, ")")), showHierarchy && !!childCategories.length && childCategories.map(function (childCategory) { return renderCategoryDropdownItem(childCategory, level + 1); })]; }; return Object(external_wp_element_["createElement"])("div", Object(external_wp_blockEditor_["useBlockProps"])(), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], { title: Object(external_wp_i18n_["__"])('Categories settings') }, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { label: Object(external_wp_i18n_["__"])('Display as dropdown'), checked: displayAsDropdown, onChange: toggleAttribute('displayAsDropdown') }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { label: Object(external_wp_i18n_["__"])('Show hierarchy'), checked: showHierarchy, onChange: toggleAttribute('showHierarchy') }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { label: Object(external_wp_i18n_["__"])('Show post counts'), checked: showPostCounts, onChange: toggleAttribute('showPostCounts') }))), isRequesting && Object(external_wp_element_["createElement"])(external_wp_components_["Placeholder"], { icon: library_pin, label: Object(external_wp_i18n_["__"])('Categories') }, Object(external_wp_element_["createElement"])(external_wp_components_["Spinner"], null)), !isRequesting && (displayAsDropdown ? renderCategoryDropdown() : renderCategoryList())); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/categories/index.js /** * WordPress dependencies */ /** * Internal dependencies */ var categories_metadata = { apiVersion: 2, name: "core/categories", category: "widgets", attributes: { displayAsDropdown: { type: "boolean", "default": false }, showHierarchy: { type: "boolean", "default": false }, showPostCounts: { type: "boolean", "default": false } }, supports: { align: true, html: false }, editorStyle: "wp-block-categories-editor", style: "wp-block-categories" }; var categories_name = categories_metadata.name; var categories_settings = { title: Object(external_wp_i18n_["_x"])('Categories', 'block title'), description: Object(external_wp_i18n_["__"])('Display a list of all categories.'), icon: library_category, example: {}, edit: CategoriesEdit }; // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/code.js var code = __webpack_require__(314); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/code/edit.js /** * WordPress dependencies */ function CodeEdit(_ref) { var attributes = _ref.attributes, setAttributes = _ref.setAttributes, onRemove = _ref.onRemove; var blockProps = Object(external_wp_blockEditor_["useBlockProps"])(); return Object(external_wp_element_["createElement"])("pre", blockProps, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], { tagName: "code", value: attributes.content, onChange: function onChange(content) { return setAttributes({ content: content }); }, onRemove: onRemove, placeholder: Object(external_wp_i18n_["__"])('Write code…'), "aria-label": Object(external_wp_i18n_["__"])('Code'), preserveWhiteSpace: true, __unstablePastePlainText: true })); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/code/utils.js /** * External dependencies */ /** * Escapes ampersands, shortcodes, and links. * * @param {string} content The content of a code block. * @return {string} The given content with some characters escaped. */ function utils_escape(content) { return Object(external_lodash_["flow"])(escapeOpeningSquareBrackets, escapeProtocolInIsolatedUrls)(content || ''); } /** * Returns the given content with all opening shortcode characters converted * into their HTML entity counterpart (i.e. [ => [). For instance, a * shortcode like [embed] becomes [embed] * * This function replicates the escaping of HTML tags, where a tag like * becomes <strong>. * * @param {string} content The content of a code block. * @return {string} The given content with its opening shortcode characters * converted into their HTML entity counterpart * (i.e. [ => [) */ function escapeOpeningSquareBrackets(content) { return content.replace(/\[/g, '['); } /** * Converts the first two forward slashes of any isolated URL into their HTML * counterparts (i.e. // => //). For instance, https://youtube.com/watch?x * becomes https://youtube.com/watch?x. * * An isolated URL is a URL that sits in its own line, surrounded only by spacing * characters. * * See https://github.com/WordPress/wordpress-develop/blob/5.1.1/src/wp-includes/class-wp-embed.php#L403 * * @param {string} content The content of a code block. * @return {string} The given content with its ampersands converted into * their HTML entity counterpart (i.e. & => &) */ function escapeProtocolInIsolatedUrls(content) { return content.replace(/^(\s*https?:)\/\/([^\s<>"]+\s*)$/m, '$1//$2'); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/code/save.js /** * WordPress dependencies */ /** * Internal dependencies */ function code_save_save(_ref) { var attributes = _ref.attributes; return Object(external_wp_element_["createElement"])("pre", external_wp_blockEditor_["useBlockProps"].save(), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "code", value: utils_escape(attributes.content) })); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/code/transforms.js /** * WordPress dependencies */ var code_transforms_transforms = { from: [{ type: 'enter', regExp: /^```$/, transform: function transform() { return Object(external_wp_blocks_["createBlock"])('core/code'); } }, { type: 'block', blocks: ['core/html'], transform: function transform(_ref) { var content = _ref.content; return Object(external_wp_blocks_["createBlock"])('core/code', { content: content }); } }, { type: 'raw', isMatch: function isMatch(node) { return node.nodeName === 'PRE' && node.children.length === 1 && node.firstChild.nodeName === 'CODE'; }, schema: { pre: { children: { code: { children: { '#text': {} } } } } } }] }; /* harmony default export */ var code_transforms = (code_transforms_transforms); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/code/index.js /** * WordPress dependencies */ /** * Internal dependencies */ var code_metadata = { apiVersion: 2, name: "core/code", category: "text", attributes: { content: { type: "string", source: "html", selector: "code" } }, supports: { anchor: true, fontSize: true }, style: "wp-block-code" }; var code_name = code_metadata.name; var code_settings = { title: Object(external_wp_i18n_["_x"])('Code', 'block title'), description: Object(external_wp_i18n_["__"])('Display code snippets that respect your spacing and tabs.'), icon: code["a" /* default */], example: { attributes: { /* eslint-disable @wordpress/i18n-no-collapsible-whitespace */ // translators: Preserve \n markers for line breaks content: Object(external_wp_i18n_["__"])('// A "block" is the abstract term used\n// to describe units of markup that\n// when composed together, form the\n// content or layout of a page.\nregisterBlockType( name, settings );') /* eslint-enable @wordpress/i18n-no-collapsible-whitespace */ } }, transforms: code_transforms, edit: CodeEdit, save: code_save_save }; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/columns.js /** * WordPress dependencies */ var columns_columns = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M19 6H6c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-4.1 1.5v10H10v-10h4.9zM5.5 17V8c0-.3.2-.5.5-.5h2.5v10H6c-.3 0-.5-.2-.5-.5zm14 0c0 .3-.2.5-.5.5h-2.6v-10H19c.3 0 .5.2.5.5v9z" })); /* harmony default export */ var library_columns = (columns_columns); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/columns/deprecated.js function columns_deprecated_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 columns_deprecated_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { columns_deprecated_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { columns_deprecated_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } /** * External dependencies */ /** * WordPress dependencies */ /** * Given an HTML string for a deprecated columns inner block, returns the * column index to which the migrated inner block should be assigned. Returns * undefined if the inner block was not assigned to a column. * * @param {string} originalContent Deprecated Columns inner block HTML. * * @return {?number} Column to which inner block is to be assigned. */ function getDeprecatedLayoutColumn(originalContent) { var doc = getDeprecatedLayoutColumn.doc; if (!doc) { doc = document.implementation.createHTMLDocument(''); getDeprecatedLayoutColumn.doc = doc; } var columnMatch; doc.body.innerHTML = originalContent; var _iterator = _createForOfIteratorHelper(doc.body.firstChild.classList), _step; try { for (_iterator.s(); !(_step = _iterator.n()).done;) { var classListItem = _step.value; if (columnMatch = classListItem.match(/^layout-column-(\d+)$/)) { return Number(columnMatch[1]) - 1; } } } catch (err) { _iterator.e(err); } finally { _iterator.f(); } } var columns_deprecated_migrateCustomColors = function migrateCustomColors(attributes) { if (!attributes.customTextColor && !attributes.customBackgroundColor) { return attributes; } var style = { color: {} }; if (attributes.customTextColor) { style.color.text = attributes.customTextColor; } if (attributes.customBackgroundColor) { style.color.background = attributes.customBackgroundColor; } return columns_deprecated_objectSpread(columns_deprecated_objectSpread({}, Object(external_lodash_["omit"])(attributes, ['customTextColor', 'customBackgroundColor'])), {}, { style: style }); }; /* harmony default export */ var columns_deprecated = ([{ attributes: { verticalAlignment: { type: 'string' }, backgroundColor: { type: 'string' }, customBackgroundColor: { type: 'string' }, customTextColor: { type: 'string' }, textColor: { type: 'string' } }, migrate: columns_deprecated_migrateCustomColors, save: function save(_ref) { var _classnames; var attributes = _ref.attributes; var verticalAlignment = attributes.verticalAlignment, backgroundColor = attributes.backgroundColor, customBackgroundColor = attributes.customBackgroundColor, textColor = attributes.textColor, customTextColor = attributes.customTextColor; var backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor); var textClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor); var className = classnames_default()((_classnames = { 'has-background': backgroundColor || customBackgroundColor, 'has-text-color': textColor || customTextColor }, Object(defineProperty["a" /* default */])(_classnames, backgroundClass, backgroundClass), Object(defineProperty["a" /* default */])(_classnames, textClass, textClass), Object(defineProperty["a" /* default */])(_classnames, "are-vertically-aligned-".concat(verticalAlignment), verticalAlignment), _classnames)); var style = { backgroundColor: backgroundClass ? undefined : customBackgroundColor, color: textClass ? undefined : customTextColor }; return Object(external_wp_element_["createElement"])("div", { className: className ? className : undefined, style: style }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null)); } }, { attributes: { columns: { type: 'number', default: 2 } }, isEligible: function isEligible(attributes, innerBlocks) { // Since isEligible is called on every valid instance of the // Columns block and a deprecation is the unlikely case due to // its subsequent migration, optimize for the `false` condition // by performing a naive, inaccurate pass at inner blocks. var isFastPassEligible = innerBlocks.some(function (innerBlock) { return /layout-column-\d+/.test(innerBlock.originalContent); }); if (!isFastPassEligible) { return false; } // Only if the fast pass is considered eligible is the more // accurate, durable, slower condition performed. return innerBlocks.some(function (innerBlock) { return getDeprecatedLayoutColumn(innerBlock.originalContent) !== undefined; }); }, migrate: function migrate(attributes, innerBlocks) { var columns = innerBlocks.reduce(function (accumulator, innerBlock) { var originalContent = innerBlock.originalContent; var columnIndex = getDeprecatedLayoutColumn(originalContent); if (columnIndex === undefined) { columnIndex = 0; } if (!accumulator[columnIndex]) { accumulator[columnIndex] = []; } accumulator[columnIndex].push(innerBlock); return accumulator; }, []); var migratedInnerBlocks = columns.map(function (columnBlocks) { return Object(external_wp_blocks_["createBlock"])('core/column', {}, columnBlocks); }); return [Object(external_lodash_["omit"])(attributes, ['columns']), migratedInnerBlocks]; }, save: function save(_ref2) { var attributes = _ref2.attributes; var columns = attributes.columns; return Object(external_wp_element_["createElement"])("div", { className: "has-".concat(columns, "-columns") }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null)); } }, { attributes: { columns: { type: 'number', default: 2 } }, migrate: function migrate(attributes, innerBlocks) { attributes = Object(external_lodash_["omit"])(attributes, ['columns']); return [attributes, innerBlocks]; }, save: function save(_ref3) { var attributes = _ref3.attributes; var verticalAlignment = attributes.verticalAlignment, columns = attributes.columns; var wrapperClasses = classnames_default()("has-".concat(columns, "-columns"), Object(defineProperty["a" /* default */])({}, "are-vertically-aligned-".concat(verticalAlignment), verticalAlignment)); return Object(external_wp_element_["createElement"])("div", { className: wrapperClasses }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null)); } }]); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/columns/utils.js /** * External dependencies */ /** * WordPress dependencies */ /** * Returns a column width attribute value rounded to standard precision. * Returns `undefined` if the value is not a valid finite number. * * @param {?number} value Raw value. * * @return {number} Value rounded to standard precision. */ var toWidthPrecision = function toWidthPrecision(value) { var unitlessValue = parseFloat(value); return Number.isFinite(unitlessValue) ? parseFloat(unitlessValue.toFixed(2)) : undefined; }; /** * Returns an effective width for a given block. An effective width is equal to * its attribute value if set, or a computed value assuming equal distribution. * * @param {WPBlock} block Block object. * @param {number} totalBlockCount Total number of blocks in Columns. * * @return {number} Effective column width. */ function getEffectiveColumnWidth(block, totalBlockCount) { var _block$attributes$wid = block.attributes.width, width = _block$attributes$wid === void 0 ? 100 / totalBlockCount : _block$attributes$wid; return toWidthPrecision(width); } /** * Returns the total width occupied by the given set of column blocks. * * @param {WPBlock[]} blocks Block objects. * @param {?number} totalBlockCount Total number of blocks in Columns. * Defaults to number of blocks passed. * * @return {number} Total width occupied by blocks. */ function getTotalColumnsWidth(blocks) { var totalBlockCount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : blocks.length; return Object(external_lodash_["sumBy"])(blocks, function (block) { return getEffectiveColumnWidth(block, totalBlockCount); }); } /** * Returns an object of `clientId` → `width` of effective column widths. * * @param {WPBlock[]} blocks Block objects. * @param {?number} totalBlockCount Total number of blocks in Columns. * Defaults to number of blocks passed. * * @return {Object".concat(content, "
"), anchor: anchor }); } }], to: [{ type: 'block', blocks: ['core/paragraph'], transform: function transform(_ref3) { var value = _ref3.value, citation = _ref3.citation; var paragraphs = []; if (value && value !== '') { paragraphs.push.apply(paragraphs, Object(toConsumableArray["a" /* default */])(Object(external_wp_richText_["split"])(Object(external_wp_richText_["create"])({ html: value, multilineTag: 'p' }), "\u2028").map(function (piece) { return Object(external_wp_blocks_["createBlock"])('core/paragraph', { content: Object(external_wp_richText_["toHTMLString"])({ value: piece }) }); }))); } if (citation && citation !== '') { paragraphs.push(Object(external_wp_blocks_["createBlock"])('core/paragraph', { content: citation })); } if (paragraphs.length === 0) { return Object(external_wp_blocks_["createBlock"])('core/paragraph', { content: '' }); } return paragraphs; } }, { type: 'block', blocks: ['core/heading'], transform: function transform(_ref4) { var value = _ref4.value, citation = _ref4.citation, attrs = Object(objectWithoutProperties["a" /* default */])(_ref4, ["value", "citation"]); // If there is no pullquote content, use the citation as the // content of the resulting heading. A nonexistent citation // will result in an empty heading. if (value === '') { return Object(external_wp_blocks_["createBlock"])('core/heading', { content: citation }); } var pieces = Object(external_wp_richText_["split"])(Object(external_wp_richText_["create"])({ html: value, multilineTag: 'p' }), "\u2028"); var headingBlock = Object(external_wp_blocks_["createBlock"])('core/heading', { content: Object(external_wp_richText_["toHTMLString"])({ value: pieces[0] }) }); if (!citation && pieces.length === 1) { return headingBlock; } var quotePieces = pieces.slice(1); var pullquoteBlock = Object(external_wp_blocks_["createBlock"])('core/pullquote', pullquote_transforms_objectSpread(pullquote_transforms_objectSpread({}, attrs), {}, { citation: citation, value: Object(external_wp_richText_["toHTMLString"])({ value: quotePieces.length ? Object(external_wp_richText_["join"])(pieces.slice(1), "\u2028") : Object(external_wp_richText_["create"])(), multilineTag: 'p' }) })); return [headingBlock, pullquoteBlock]; } }] }; /* harmony default export */ var pullquote_transforms = (pullquote_transforms_transforms); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/pullquote/index.js /** * WordPress dependencies */ /** * Internal dependencies */ var pullquote_metadata = { apiVersion: 2, name: "core/pullquote", category: "text", attributes: { value: { type: "string", source: "html", selector: "blockquote", multiline: "p" }, citation: { type: "string", source: "html", selector: "cite", "default": "" }, mainColor: { type: "string" }, customMainColor: { type: "string" }, textColor: { type: "string" }, customTextColor: { type: "string" } }, supports: { anchor: true, align: ["left", "right", "wide", "full"] }, editorStyle: "wp-block-pullquote-editor", style: "wp-block-pullquote" }; var pullquote_name = pullquote_metadata.name; var pullquote_settings = { title: Object(external_wp_i18n_["_x"])('Pullquote', 'block title'), description: Object(external_wp_i18n_["__"])('Give special visual emphasis to a quote from your text.'), icon: library_pullquote, example: { attributes: { value: '' + // translators: Quote serving as example for the Pullquote block. Attributed to Matt Mullenweg. Object(external_wp_i18n_["__"])('One of the hardest things to do in technology is disrupt yourself.') + '
', citation: Object(external_wp_i18n_["__"])('Matt Mullenweg') } }, styles: [{ name: 'default', label: Object(external_wp_i18n_["_x"])('Default', 'block style'), isDefault: true }, { name: SOLID_COLOR_STYLE_NAME, label: Object(external_wp_i18n_["__"])('Solid color') }], transforms: pullquote_transforms, edit: pullquote_edit, save: pullquote_save_save, deprecated: pullquote_deprecated }; // EXTERNAL MODULE: external ["wp","reusableBlocks"] var external_wp_reusableBlocks_ = __webpack_require__(146); // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/ungroup.js /** * WordPress dependencies */ var ungroup = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M18 4h-7c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5h-7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7zm-5 5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h1V9H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-1h-1.5v1z" })); /* harmony default export */ var library_ungroup = (ungroup); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/block/edit.js /** * WordPress dependencies */ function ReusableBlockEdit(_ref) { var ref = _ref.attributes.ref, clientId = _ref.clientId; var _useNoRecursiveRender = Object(external_wp_blockEditor_["__experimentalUseNoRecursiveRenders"])(ref), _useNoRecursiveRender2 = Object(slicedToArray["a" /* default */])(_useNoRecursiveRender, 2), hasAlreadyRendered = _useNoRecursiveRender2[0], RecursionProvider = _useNoRecursiveRender2[1]; var _useSelect = Object(external_wp_data_["useSelect"])(function (select) { var persistedBlock = select(external_wp_coreData_["store"]).getEntityRecord('postType', 'wp_block', ref); var hasResolvedBlock = select(external_wp_coreData_["store"]).hasFinishedResolution('getEntityRecord', ['postType', 'wp_block', ref]); return { hasResolved: hasResolvedBlock, isMissing: hasResolvedBlock && !persistedBlock }; }, [ref, clientId]), isMissing = _useSelect.isMissing, hasResolved = _useSelect.hasResolved; var _useDispatch = Object(external_wp_data_["useDispatch"])(external_wp_reusableBlocks_["store"]), convertBlockToStatic = _useDispatch.__experimentalConvertBlockToStatic; var _useEntityBlockEditor = Object(external_wp_coreData_["useEntityBlockEditor"])('postType', 'wp_block', { id: ref }), _useEntityBlockEditor2 = Object(slicedToArray["a" /* default */])(_useEntityBlockEditor, 3), blocks = _useEntityBlockEditor2[0], onInput = _useEntityBlockEditor2[1], onChange = _useEntityBlockEditor2[2]; var _useEntityProp = Object(external_wp_coreData_["useEntityProp"])('postType', 'wp_block', 'title', ref), _useEntityProp2 = Object(slicedToArray["a" /* default */])(_useEntityProp, 2), title = _useEntityProp2[0], setTitle = _useEntityProp2[1]; var innerBlocksProps = Object(external_wp_blockEditor_["__experimentalUseInnerBlocksProps"])({}, { value: blocks, onInput: onInput, onChange: onChange, renderAppender: blocks !== null && blocks !== void 0 && blocks.length ? undefined : external_wp_blockEditor_["InnerBlocks"].ButtonBlockAppender }); var blockProps = Object(external_wp_blockEditor_["useBlockProps"])(); if (hasAlreadyRendered) { return Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["Warning"], null, Object(external_wp_i18n_["__"])('Block cannot be rendered inside itself.'))); } if (isMissing) { return Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["Warning"], null, Object(external_wp_i18n_["__"])('Block has been deleted or is unavailable.'))); } if (!hasResolved) { return Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])(external_wp_components_["Placeholder"], null, Object(external_wp_element_["createElement"])(external_wp_components_["Spinner"], null))); } return Object(external_wp_element_["createElement"])(RecursionProvider, null, Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], { onClick: function onClick() { return convertBlockToStatic(clientId); }, label: Object(external_wp_i18n_["__"])('Convert to regular blocks'), icon: library_ungroup, showTooltip: true }))), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], null, Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"], { label: Object(external_wp_i18n_["__"])('Name'), value: title, onChange: setTitle }))), Object(external_wp_element_["createElement"])("div", { className: "block-library-block__reusable-block-container" }, Object(external_wp_element_["createElement"])("div", innerBlocksProps)))); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/block/index.js /** * WordPress dependencies */ /** * Internal dependencies */ var block_metadata = { apiVersion: 2, name: "core/block", category: "reusable", attributes: { ref: { type: "number" } }, supports: { customClassName: false, html: false, inserter: false }, editorStyle: "wp-block-editor" }; var block_name = block_metadata.name; var block_settings = { title: Object(external_wp_i18n_["_x"])('Reusable Block', 'block title'), description: Object(external_wp_i18n_["__"])('Create and save content to reuse across your site. Update the block, and the changes apply everywhere it’s used.'), edit: ReusableBlockEdit }; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/rss.js /** * WordPress dependencies */ var rss = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M5 10.2h-.8v1.5H5c1.9 0 3.8.8 5.1 2.1 1.4 1.4 2.1 3.2 2.1 5.1v.8h1.5V19c0-2.3-.9-4.5-2.6-6.2-1.6-1.6-3.8-2.6-6.1-2.6zm10.4-1.6C12.6 5.8 8.9 4.2 5 4.2h-.8v1.5H5c3.5 0 6.9 1.4 9.4 3.9s3.9 5.8 3.9 9.4v.8h1.5V19c0-3.9-1.6-7.6-4.4-10.4zM4 20h3v-3H4v3z" })); /* harmony default export */ var library_rss = (rss); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/rss/edit.js /** * WordPress dependencies */ var DEFAULT_MIN_ITEMS = 1; var DEFAULT_MAX_ITEMS = 10; function RSSEdit(_ref) { var attributes = _ref.attributes, setAttributes = _ref.setAttributes; var _useState = Object(external_wp_element_["useState"])(!attributes.feedURL), _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2), isEditing = _useState2[0], setIsEditing = _useState2[1]; var blockLayout = attributes.blockLayout, columns = attributes.columns, displayAuthor = attributes.displayAuthor, displayDate = attributes.displayDate, displayExcerpt = attributes.displayExcerpt, excerptLength = attributes.excerptLength, feedURL = attributes.feedURL, itemsToShow = attributes.itemsToShow; function toggleAttribute(propName) { return function () { var value = attributes[propName]; setAttributes(Object(defineProperty["a" /* default */])({}, propName, !value)); }; } function onSubmitURL(event) { event.preventDefault(); if (feedURL) { setIsEditing(false); } } var blockProps = Object(external_wp_blockEditor_["useBlockProps"])(); if (isEditing) { return Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])(external_wp_components_["Placeholder"], { icon: library_rss, label: "RSS" }, Object(external_wp_element_["createElement"])("form", { onSubmit: onSubmitURL, className: "wp-block-rss__placeholder-form" }, Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"], { placeholder: Object(external_wp_i18n_["__"])('Enter URL here…'), value: feedURL, onChange: function onChange(value) { return setAttributes({ feedURL: value }); }, className: "wp-block-rss__placeholder-input" }), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { isPrimary: true, type: "submit" }, Object(external_wp_i18n_["__"])('Use URL'))))); } var toolbarControls = [{ icon: library_edit["a" /* default */], title: Object(external_wp_i18n_["__"])('Edit RSS URL'), onClick: function onClick() { return setIsEditing(true); } }, { icon: library_list, title: Object(external_wp_i18n_["__"])('List view'), onClick: function onClick() { return setAttributes({ blockLayout: 'list' }); }, isActive: blockLayout === 'list' }, { icon: library_grid, title: Object(external_wp_i18n_["__"])('Grid view'), onClick: function onClick() { return setAttributes({ blockLayout: 'grid' }); }, isActive: blockLayout === 'grid' }]; return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], { controls: toolbarControls })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], { title: Object(external_wp_i18n_["__"])('RSS settings') }, Object(external_wp_element_["createElement"])(external_wp_components_["RangeControl"], { label: Object(external_wp_i18n_["__"])('Number of items'), value: itemsToShow, onChange: function onChange(value) { return setAttributes({ itemsToShow: value }); }, min: DEFAULT_MIN_ITEMS, max: DEFAULT_MAX_ITEMS, required: true }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { label: Object(external_wp_i18n_["__"])('Display author'), checked: displayAuthor, onChange: toggleAttribute('displayAuthor') }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { label: Object(external_wp_i18n_["__"])('Display date'), checked: displayDate, onChange: toggleAttribute('displayDate') }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { label: Object(external_wp_i18n_["__"])('Display excerpt'), checked: displayExcerpt, onChange: toggleAttribute('displayExcerpt') }), displayExcerpt && Object(external_wp_element_["createElement"])(external_wp_components_["RangeControl"], { label: Object(external_wp_i18n_["__"])('Max number of words in excerpt'), value: excerptLength, onChange: function onChange(value) { return setAttributes({ excerptLength: value }); }, min: 10, max: 100, required: true }), blockLayout === 'grid' && Object(external_wp_element_["createElement"])(external_wp_components_["RangeControl"], { label: Object(external_wp_i18n_["__"])('Columns'), value: columns, onChange: function onChange(value) { return setAttributes({ columns: value }); }, min: 2, max: 6, required: true }))), Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])(external_wp_components_["Disabled"], null, Object(external_wp_element_["createElement"])(external_wp_serverSideRender_default.a, { block: "core/rss", attributes: attributes })))); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/rss/index.js /** * WordPress dependencies */ /** * Internal dependencies */ var rss_metadata = { apiVersion: 2, name: "core/rss", category: "widgets", attributes: { columns: { type: "number", "default": 2 }, blockLayout: { type: "string", "default": "list" }, feedURL: { type: "string", "default": "" }, itemsToShow: { type: "number", "default": 5 }, displayExcerpt: { type: "boolean", "default": false }, displayAuthor: { type: "boolean", "default": false }, displayDate: { type: "boolean", "default": false }, excerptLength: { type: "number", "default": 55 } }, supports: { align: true, html: false }, editorStyle: "wp-block-rss-editor", style: "wp-block-rss" }; var rss_name = rss_metadata.name; var rss_settings = { title: Object(external_wp_i18n_["_x"])('RSS', 'block title'), description: Object(external_wp_i18n_["__"])('Display entries from any RSS or Atom feed.'), icon: library_rss, keywords: [Object(external_wp_i18n_["__"])('atom'), Object(external_wp_i18n_["__"])('feed')], example: { attributes: { feedURL: 'https://wordpress.org' } }, edit: RSSEdit }; // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/search/icons.js /** * WordPress dependencies */ var buttonOnly = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(external_wp_element_["createElement"])(external_wp_components_["Rect"], { x: "7", y: "10", width: "10", height: "4", rx: "1", fill: "currentColor" })); var buttonOutside = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(external_wp_element_["createElement"])(external_wp_components_["Rect"], { x: "4.75", y: "15.25", width: "6.5", height: "9.5", transform: "rotate(-90 4.75 15.25)", stroke: "currentColor", strokeWidth: "1.5", fill: "none" }), Object(external_wp_element_["createElement"])(external_wp_components_["Rect"], { x: "16", y: "10", width: "4", height: "4", rx: "1", fill: "currentColor" })); var buttonInside = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(external_wp_element_["createElement"])(external_wp_components_["Rect"], { x: "4.75", y: "15.25", width: "6.5", height: "14.5", transform: "rotate(-90 4.75 15.25)", stroke: "currentColor", strokeWidth: "1.5", fill: "none" }), Object(external_wp_element_["createElement"])(external_wp_components_["Rect"], { x: "14", y: "10", width: "4", height: "4", rx: "1", fill: "currentColor" })); var noButton = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(external_wp_element_["createElement"])(external_wp_components_["Rect"], { x: "4.75", y: "15.25", width: "6.5", height: "14.5", transform: "rotate(-90 4.75 15.25)", stroke: "currentColor", fill: "none", strokeWidth: "1.5" })); var buttonWithIcon = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(external_wp_element_["createElement"])(external_wp_components_["Rect"], { x: "4.75", y: "7.75", width: "14.5", height: "8.5", rx: "1.25", stroke: "currentColor", fill: "none", strokeWidth: "1.5" }), Object(external_wp_element_["createElement"])(external_wp_components_["Rect"], { x: "8", y: "11", width: "8", height: "2", fill: "currentColor" })); var toggleLabel = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(external_wp_element_["createElement"])(external_wp_components_["Rect"], { x: "4.75", y: "17.25", width: "5.5", height: "14.5", transform: "rotate(-90 4.75 17.25)", stroke: "currentColor", fill: "none", strokeWidth: "1.5" }), Object(external_wp_element_["createElement"])(external_wp_components_["Rect"], { x: "4", y: "7", width: "10", height: "2", fill: "currentColor" })); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/search/edit.js /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ /** * Constants */ var MIN_WIDTH = 220; var MIN_WIDTH_UNIT = 'px'; var PC_WIDTH_DEFAULT = 50; var PX_WIDTH_DEFAULT = 350; var edit_CSS_UNITS = [{ value: '%', label: '%', default: PC_WIDTH_DEFAULT }, { value: 'px', label: 'px', default: PX_WIDTH_DEFAULT }]; function SearchEdit(_ref) { var className = _ref.className, attributes = _ref.attributes, setAttributes = _ref.setAttributes, toggleSelection = _ref.toggleSelection, isSelected = _ref.isSelected; var label = attributes.label, showLabel = attributes.showLabel, placeholder = attributes.placeholder, width = attributes.width, widthUnit = attributes.widthUnit, align = attributes.align, buttonText = attributes.buttonText, buttonPosition = attributes.buttonPosition, buttonUseIcon = attributes.buttonUseIcon; var unitControlInstanceId = Object(external_wp_compose_["useInstanceId"])(external_wp_blockEditor_["__experimentalUnitControl"]); var unitControlInputId = "wp-block-search__width-".concat(unitControlInstanceId); var getBlockClassNames = function getBlockClassNames() { return classnames_default()(className, 'button-inside' === buttonPosition ? 'wp-block-search__button-inside' : undefined, 'button-outside' === buttonPosition ? 'wp-block-search__button-outside' : undefined, 'no-button' === buttonPosition ? 'wp-block-search__no-button' : undefined, 'button-only' === buttonPosition ? 'wp-block-search__button-only' : undefined, !buttonUseIcon && 'no-button' !== buttonPosition ? 'wp-block-search__text-button' : undefined, buttonUseIcon && 'no-button' !== buttonPosition ? 'wp-block-search__icon-button' : undefined); }; var getButtonPositionIcon = function getButtonPositionIcon() { switch (buttonPosition) { case 'button-inside': return buttonInside; case 'button-outside': return buttonOutside; case 'no-button': return noButton; case 'button-only': return buttonOnly; } }; var getResizableSides = function getResizableSides() { if ('button-only' === buttonPosition) { return {}; } return { right: align === 'right' ? false : true, left: align === 'right' ? true : false }; }; var renderTextField = function renderTextField() { return Object(external_wp_element_["createElement"])("input", { className: "wp-block-search__input", "aria-label": Object(external_wp_i18n_["__"])('Optional placeholder text') // We hide the placeholder field's placeholder when there is a value. This // stops screen readers from reading the placeholder field's placeholder // which is confusing. , placeholder: placeholder ? undefined : Object(external_wp_i18n_["__"])('Optional placeholder…'), value: placeholder, onChange: function onChange(event) { return setAttributes({ placeholder: event.target.value }); } }); }; var renderButton = function renderButton() { return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, buttonUseIcon && Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { icon: search["a" /* default */], className: "wp-block-search__button" }), !buttonUseIcon && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], { className: "wp-block-search__button", "aria-label": Object(external_wp_i18n_["__"])('Button text'), placeholder: Object(external_wp_i18n_["__"])('Add button text…'), withoutInteractiveFormatting: true, value: buttonText, onChange: function onChange(html) { return setAttributes({ buttonText: html }); } })); }; var controls = Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], { title: Object(external_wp_i18n_["__"])('Toggle search label'), icon: toggleLabel, onClick: function onClick() { setAttributes({ showLabel: !showLabel }); }, className: showLabel ? 'is-pressed' : undefined }), Object(external_wp_element_["createElement"])(external_wp_components_["DropdownMenu"], { icon: getButtonPositionIcon(), label: Object(external_wp_i18n_["__"])('Change button position') }, function (_ref2) { var onClose = _ref2.onClose; return Object(external_wp_element_["createElement"])(external_wp_components_["MenuGroup"], { className: "wp-block-search__button-position-menu" }, Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], { icon: noButton, onClick: function onClick() { setAttributes({ buttonPosition: 'no-button' }); onClose(); } }, Object(external_wp_i18n_["__"])('No Button')), Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], { icon: buttonOutside, onClick: function onClick() { setAttributes({ buttonPosition: 'button-outside' }); onClose(); } }, Object(external_wp_i18n_["__"])('Button Outside')), Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], { icon: buttonInside, onClick: function onClick() { setAttributes({ buttonPosition: 'button-inside' }); onClose(); } }, Object(external_wp_i18n_["__"])('Button Inside'))); }), 'no-button' !== buttonPosition && Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], { title: Object(external_wp_i18n_["__"])('Use button with icon'), icon: buttonWithIcon, onClick: function onClick() { setAttributes({ buttonUseIcon: !buttonUseIcon }); }, className: buttonUseIcon ? 'is-pressed' : undefined }))), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], { title: Object(external_wp_i18n_["__"])('Display Settings') }, Object(external_wp_element_["createElement"])(external_wp_components_["BaseControl"], { label: Object(external_wp_i18n_["__"])('Width'), id: unitControlInputId }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalUnitControl"], { id: unitControlInputId, min: "".concat(MIN_WIDTH).concat(MIN_WIDTH_UNIT), onChange: function onChange(newWidth) { var filteredWidth = widthUnit === '%' && parseInt(newWidth, 10) > 100 ? 100 : newWidth; setAttributes({ width: parseInt(filteredWidth, 10) }); }, onUnitChange: function onUnitChange(newUnit) { setAttributes({ width: '%' === newUnit ? PC_WIDTH_DEFAULT : PX_WIDTH_DEFAULT, widthUnit: newUnit }); }, style: { maxWidth: 80 }, value: "".concat(width).concat(widthUnit), unit: widthUnit, units: edit_CSS_UNITS }), Object(external_wp_element_["createElement"])(external_wp_components_["ButtonGroup"], { className: "wp-block-search__components-button-group", "aria-label": Object(external_wp_i18n_["__"])('Percentage Width') }, [25, 50, 75, 100].map(function (widthValue) { return Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { key: widthValue, isSmall: true, isPrimary: "".concat(widthValue, "%") === "".concat(width).concat(widthUnit), onClick: function onClick() { return setAttributes({ width: widthValue, widthUnit: '%' }); } }, widthValue, "%"); })))))); var blockProps = Object(external_wp_blockEditor_["useBlockProps"])({ className: getBlockClassNames() }); return Object(external_wp_element_["createElement"])("div", blockProps, controls, showLabel && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], { className: "wp-block-search__label", "aria-label": Object(external_wp_i18n_["__"])('Label text'), placeholder: Object(external_wp_i18n_["__"])('Add label…'), withoutInteractiveFormatting: true, value: label, onChange: function onChange(html) { return setAttributes({ label: html }); } }), Object(external_wp_element_["createElement"])(external_wp_components_["ResizableBox"], { size: { width: "".concat(width).concat(widthUnit) }, className: "wp-block-search__inside-wrapper", minWidth: MIN_WIDTH, enable: getResizableSides(), onResizeStart: function onResizeStart(event, direction, elt) { setAttributes({ width: parseInt(elt.offsetWidth, 10), widthUnit: 'px' }); toggleSelection(false); }, onResizeStop: function onResizeStop(event, direction, elt, delta) { setAttributes({ width: parseInt(width + delta.width, 10) }); toggleSelection(true); }, showHandle: isSelected }, ('button-inside' === buttonPosition || 'button-outside' === buttonPosition) && Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, renderTextField(), renderButton()), 'button-only' === buttonPosition && renderButton(), 'no-button' === buttonPosition && renderTextField())); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/search/variations.js /** * WordPress dependencies */ var search_variations_variations = [{ name: 'default', isDefault: true, attributes: { buttonText: Object(external_wp_i18n_["__"])('Search'), label: Object(external_wp_i18n_["__"])('Search') } }]; /* harmony default export */ var search_variations = (search_variations_variations); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/search/index.js /** * WordPress dependencies */ /** * Internal dependencies */ var search_metadata = { apiVersion: 2, name: "core/search", category: "widgets", attributes: { label: { type: "string" }, showLabel: { type: "boolean", "default": true }, placeholder: { type: "string", "default": "" }, width: { type: "number" }, widthUnit: { type: "string" }, buttonText: { type: "string" }, buttonPosition: { type: "string", "default": "button-outside" }, buttonUseIcon: { type: "boolean", "default": false } }, supports: { align: ["left", "center", "right"], html: false }, editorStyle: "wp-block-search-editor", style: "wp-block-search" }; var search_name = search_metadata.name; var search_settings = { title: Object(external_wp_i18n_["_x"])('Search', 'block title'), description: Object(external_wp_i18n_["__"])('Help visitors find your content.'), icon: search["a" /* default */], keywords: [Object(external_wp_i18n_["__"])('find')], example: {}, variations: search_variations, edit: SearchEdit }; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/group.js /** * WordPress dependencies */ var group = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M18 4h-7c-1.1 0-2 .9-2 2v3H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-3h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h3V13c0 1.1.9 2 2 2h2.5v3zm0-4.5H11c-.3 0-.5-.2-.5-.5v-2.5H13c.3 0 .5.2.5.5v2.5zm5-.5c0 .3-.2.5-.5.5h-3V11c0-1.1-.9-2-2-2h-2.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7z" })); /* harmony default export */ var library_group = (group); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/group/deprecated.js function group_deprecated_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 group_deprecated_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { group_deprecated_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { group_deprecated_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } /** * External dependencies */ /** * WordPress dependencies */ var deprecated_migrateAttributes = function migrateAttributes(attributes) { if (!attributes.tagName) { attributes = group_deprecated_objectSpread(group_deprecated_objectSpread({}, attributes), {}, { tagName: 'div' }); } if (!attributes.customTextColor && !attributes.customBackgroundColor) { return attributes; } var style = { color: {} }; if (attributes.customTextColor) { style.color.text = attributes.customTextColor; } if (attributes.customBackgroundColor) { style.color.background = attributes.customBackgroundColor; } return group_deprecated_objectSpread(group_deprecated_objectSpread({}, Object(external_lodash_["omit"])(attributes, ['customTextColor', 'customBackgroundColor'])), {}, { style: style }); }; var group_deprecated_deprecated = [// Version of the block without global styles support { attributes: { backgroundColor: { type: 'string' }, customBackgroundColor: { type: 'string' }, textColor: { type: 'string' }, customTextColor: { type: 'string' } }, supports: { align: ['wide', 'full'], anchor: true, html: false }, migrate: deprecated_migrateAttributes, save: function save(_ref) { var attributes = _ref.attributes; var backgroundColor = attributes.backgroundColor, customBackgroundColor = attributes.customBackgroundColor, textColor = attributes.textColor, customTextColor = attributes.customTextColor; var backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor); var textClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor); var className = classnames_default()(backgroundClass, textClass, { 'has-text-color': textColor || customTextColor, 'has-background': backgroundColor || customBackgroundColor }); var styles = { backgroundColor: backgroundClass ? undefined : customBackgroundColor, color: textClass ? undefined : customTextColor }; return Object(external_wp_element_["createElement"])("div", { className: className, style: styles }, Object(external_wp_element_["createElement"])("div", { className: "wp-block-group__inner-container" }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null))); } }, // Version of the group block with a bug that made text color class not applied. { attributes: { backgroundColor: { type: 'string' }, customBackgroundColor: { type: 'string' }, textColor: { type: 'string' }, customTextColor: { type: 'string' } }, migrate: deprecated_migrateAttributes, supports: { align: ['wide', 'full'], anchor: true, html: false }, save: function save(_ref2) { var attributes = _ref2.attributes; var backgroundColor = attributes.backgroundColor, customBackgroundColor = attributes.customBackgroundColor, textColor = attributes.textColor, customTextColor = attributes.customTextColor; var backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor); var textClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor); var className = classnames_default()(backgroundClass, { 'has-text-color': textColor || customTextColor, 'has-background': backgroundColor || customBackgroundColor }); var styles = { backgroundColor: backgroundClass ? undefined : customBackgroundColor, color: textClass ? undefined : customTextColor }; return Object(external_wp_element_["createElement"])("div", { className: className, style: styles }, Object(external_wp_element_["createElement"])("div", { className: "wp-block-group__inner-container" }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null))); } }, // v1 of group block. Deprecated to add an inner-container div around `InnerBlocks.Content`. { attributes: { backgroundColor: { type: 'string' }, customBackgroundColor: { type: 'string' } }, supports: { align: ['wide', 'full'], anchor: true, html: false }, migrate: deprecated_migrateAttributes, save: function save(_ref3) { var attributes = _ref3.attributes; var backgroundColor = attributes.backgroundColor, customBackgroundColor = attributes.customBackgroundColor; var backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor); var className = classnames_default()(backgroundClass, { 'has-background': backgroundColor || customBackgroundColor }); var styles = { backgroundColor: backgroundClass ? undefined : customBackgroundColor }; return Object(external_wp_element_["createElement"])("div", { className: className, style: styles }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null)); } }]; /* harmony default export */ var group_deprecated = (group_deprecated_deprecated); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/group/edit.js /** * WordPress dependencies */ var edit_BoxControlVisualizer = external_wp_components_["__experimentalBoxControl"].__Visualizer; function GroupEdit(_ref) { var _attributes$style, _attributes$style$spa, _attributes$style2, _attributes$style2$vi; var attributes = _ref.attributes, clientId = _ref.clientId; var hasInnerBlocks = Object(external_wp_data_["useSelect"])(function (select) { var _select = select('core/block-editor'), getBlock = _select.getBlock; var block = getBlock(clientId); return !!(block && block.innerBlocks.length); }, [clientId]); var blockProps = Object(external_wp_blockEditor_["useBlockProps"])(); var _attributes$tagName = attributes.tagName, TagName = _attributes$tagName === void 0 ? 'div' : _attributes$tagName, templateLock = attributes.templateLock; var innerBlocksProps = Object(external_wp_blockEditor_["__experimentalUseInnerBlocksProps"])({ className: 'wp-block-group__inner-container' }, { templateLock: templateLock, renderAppender: hasInnerBlocks ? undefined : external_wp_blockEditor_["InnerBlocks"].ButtonBlockAppender }); return Object(external_wp_element_["createElement"])(TagName, blockProps, Object(external_wp_element_["createElement"])(edit_BoxControlVisualizer, { values: (_attributes$style = attributes.style) === null || _attributes$style === void 0 ? void 0 : (_attributes$style$spa = _attributes$style.spacing) === null || _attributes$style$spa === void 0 ? void 0 : _attributes$style$spa.padding, showValues: (_attributes$style2 = attributes.style) === null || _attributes$style2 === void 0 ? void 0 : (_attributes$style2$vi = _attributes$style2.visualizers) === null || _attributes$style2$vi === void 0 ? void 0 : _attributes$style2$vi.padding }), Object(external_wp_element_["createElement"])("div", innerBlocksProps)); } /* harmony default export */ var group_edit = (GroupEdit); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/group/save.js /** * WordPress dependencies */ function group_save_save(_ref) { var attributes = _ref.attributes; var Tag = attributes.tagName; return Object(external_wp_element_["createElement"])(Tag, external_wp_blockEditor_["useBlockProps"].save(), Object(external_wp_element_["createElement"])("div", { className: "wp-block-group__inner-container" }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null))); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/group/index.js /** * WordPress dependencies */ /** * Internal dependencies */ var group_metadata = { apiVersion: 2, name: "core/group", category: "design", attributes: { tagName: { type: "string", "default": "div" }, templateLock: { type: "string" } }, supports: { align: ["wide", "full"], anchor: true, html: false, color: { gradients: true, link: true }, spacing: { padding: true }, __experimentalBorder: { radius: true } }, editorStyle: "wp-block-group-editor", style: "wp-block-group" }; var group_name = group_metadata.name; var group_settings = { title: Object(external_wp_i18n_["_x"])('Group', 'block title'), icon: library_group, description: Object(external_wp_i18n_["__"])('Combine blocks into a group.'), keywords: [Object(external_wp_i18n_["__"])('container'), Object(external_wp_i18n_["__"])('wrapper'), Object(external_wp_i18n_["__"])('row'), Object(external_wp_i18n_["__"])('section')], example: { attributes: { style: { color: { text: '#000000', background: '#ffffff' } } }, innerBlocks: [{ name: 'core/paragraph', attributes: { customTextColor: '#cf2e2e', fontSize: 'large', content: Object(external_wp_i18n_["__"])('One.') } }, { name: 'core/paragraph', attributes: { customTextColor: '#ff6900', fontSize: 'large', content: Object(external_wp_i18n_["__"])('Two.') } }, { name: 'core/paragraph', attributes: { customTextColor: '#fcb900', fontSize: 'large', content: Object(external_wp_i18n_["__"])('Three.') } }, { name: 'core/paragraph', attributes: { customTextColor: '#00d084', fontSize: 'large', content: Object(external_wp_i18n_["__"])('Four.') } }, { name: 'core/paragraph', attributes: { customTextColor: '#0693e3', fontSize: 'large', content: Object(external_wp_i18n_["__"])('Five.') } }, { name: 'core/paragraph', attributes: { customTextColor: '#9b51e0', fontSize: 'large', content: Object(external_wp_i18n_["__"])('Six.') } }] }, transforms: { from: [{ type: 'block', isMultiBlock: true, blocks: ['*'], __experimentalConvert: function __experimentalConvert(blocks) { // Avoid transforming a single `core/group` Block if (blocks.length === 1 && blocks[0].name === 'core/group') { return; } var alignments = ['wide', 'full']; // Determine the widest setting of all the blocks to be grouped var widestAlignment = blocks.reduce(function (accumulator, block) { var align = block.attributes.align; return alignments.indexOf(align) > alignments.indexOf(accumulator) ? align : accumulator; }, undefined); // Clone the Blocks to be Grouped // Failing to create new block references causes the original blocks // to be replaced in the switchToBlockType call thereby meaning they // are removed both from their original location and within the // new group block. var groupInnerBlocks = blocks.map(function (block) { return Object(external_wp_blocks_["createBlock"])(block.name, block.attributes, block.innerBlocks); }); return Object(external_wp_blocks_["createBlock"])('core/group', { align: widestAlignment }, groupInnerBlocks); } }] }, edit: group_edit, save: group_save_save, deprecated: group_deprecated }; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/separator.js /** * WordPress dependencies */ var separator = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M20.2 7v4H3.8V7H2.2v9h1.6v-3.5h16.4V16h1.6V7z" })); /* harmony default export */ var library_separator = (separator); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/separator/separator-settings.js /** * WordPress dependencies */ var separator_settings_SeparatorSettings = function SeparatorSettings(_ref) { var color = _ref.color, setColor = _ref.setColor; return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["PanelColorSettings"], { title: Object(external_wp_i18n_["__"])('Color settings'), colorSettings: [{ value: color.color, onChange: setColor, label: Object(external_wp_i18n_["__"])('Color') }] })); }; /* harmony default export */ var separator_settings = (separator_settings_SeparatorSettings); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/separator/edit.js /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ function SeparatorEdit(_ref) { var color = _ref.color, setColor = _ref.setColor, className = _ref.className; return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["HorizontalRule"], Object(external_wp_blockEditor_["useBlockProps"])({ className: classnames_default()(className, Object(defineProperty["a" /* default */])({ 'has-background': color.color }, color.class, color.class)), style: { backgroundColor: color.color, color: color.color } })), Object(external_wp_element_["createElement"])(separator_settings, { color: color, setColor: setColor })); } /* harmony default export */ var separator_edit = (Object(external_wp_blockEditor_["withColors"])('color', { textColor: 'color' })(SeparatorEdit)); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/separator/save.js /** * External dependencies */ /** * WordPress dependencies */ function separatorSave(_ref) { var _classnames; var attributes = _ref.attributes; var color = attributes.color, customColor = attributes.customColor; // the hr support changing color using border-color, since border-color // is not yet supported in the color palette, we use background-color var backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', color); // the dots styles uses text for the dots, to change those dots color is // using color, not backgroundColor var colorClass = Object(external_wp_blockEditor_["getColorClassName"])('color', color); var className = classnames_default()((_classnames = { 'has-text-color has-background': color || customColor }, Object(defineProperty["a" /* default */])(_classnames, backgroundClass, backgroundClass), Object(defineProperty["a" /* default */])(_classnames, colorClass, colorClass), _classnames)); var style = { backgroundColor: backgroundClass ? undefined : customColor, color: colorClass ? undefined : customColor }; return Object(external_wp_element_["createElement"])("hr", external_wp_blockEditor_["useBlockProps"].save({ className: className, style: style })); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/separator/transforms.js /** * WordPress dependencies */ var separator_transforms_transforms = { from: [{ type: 'enter', regExp: /^-{3,}$/, transform: function transform() { return Object(external_wp_blocks_["createBlock"])('core/separator'); } }, { type: 'raw', selector: 'hr', schema: { hr: {} } }] }; /* harmony default export */ var separator_transforms = (separator_transforms_transforms); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/separator/index.js /** * WordPress dependencies */ /** * Internal dependencies */ var separator_metadata = { apiVersion: 2, name: "core/separator", category: "design", attributes: { color: { type: "string" }, customColor: { type: "string" } }, supports: { anchor: true, align: ["center", "wide", "full"] }, editorStyle: "wp-block-separator-editor", style: "wp-block-separator" }; var separator_name = separator_metadata.name; var build_module_separator_settings = { title: Object(external_wp_i18n_["_x"])('Separator', 'block title'), description: Object(external_wp_i18n_["__"])('Create a break between ideas or sections with a horizontal separator.'), icon: library_separator, keywords: [Object(external_wp_i18n_["__"])('horizontal-line'), 'hr', Object(external_wp_i18n_["__"])('divider')], example: { attributes: { customColor: '#065174', className: 'is-style-wide' } }, styles: [{ name: 'default', label: Object(external_wp_i18n_["__"])('Default'), isDefault: true }, { name: 'wide', label: Object(external_wp_i18n_["__"])('Wide Line') }, { name: 'dots', label: Object(external_wp_i18n_["__"])('Dots') }], transforms: separator_transforms, edit: separator_edit, save: separatorSave }; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/shortcode.js /** * WordPress dependencies */ var shortcode_shortcode = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M16 4.2v1.5h2.5v12.5H16v1.5h4V4.2h-4zM4.2 19.8h4v-1.5H5.8V5.8h2.5V4.2h-4l-.1 15.6zm5.1-3.1l1.4.6 4-10-1.4-.6-4 10z" })); /* harmony default export */ var library_shortcode = (shortcode_shortcode); // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/icon/index.js var build_module_icon = __webpack_require__(135); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/shortcode/edit.js /** * WordPress dependencies */ function ShortcodeEdit(_ref) { var attributes = _ref.attributes, setAttributes = _ref.setAttributes; var instanceId = Object(external_wp_compose_["useInstanceId"])(ShortcodeEdit); var inputId = "blocks-shortcode-input-".concat(instanceId); return Object(external_wp_element_["createElement"])("div", Object(external_wp_blockEditor_["useBlockProps"])({ className: 'components-placeholder' }), Object(external_wp_element_["createElement"])("label", { htmlFor: inputId, className: "components-placeholder__label" }, Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], { icon: library_shortcode }), Object(external_wp_i18n_["__"])('Shortcode')), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["PlainText"], { className: "blocks-shortcode__textarea", id: inputId, value: attributes.text, "aria-label": Object(external_wp_i18n_["__"])('Shortcode text'), placeholder: Object(external_wp_i18n_["__"])('Write shortcode here…'), onChange: function onChange(text) { return setAttributes({ text: text }); } })); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/shortcode/save.js /** * WordPress dependencies */ function shortcode_save_save(_ref) { var attributes = _ref.attributes; return Object(external_wp_element_["createElement"])(external_wp_element_["RawHTML"], null, attributes.text); } // EXTERNAL MODULE: external ["wp","autop"] var external_wp_autop_ = __webpack_require__(115); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/shortcode/transforms.js /** * WordPress dependencies */ var shortcode_transforms_transforms = { from: [{ type: 'shortcode', // Per "Shortcode names should be all lowercase and use all // letters, but numbers and underscores should work fine too. // Be wary of using hyphens (dashes), you'll be better off not // using them." in https://codex.wordpress.org/Shortcode_API // Require that the first character be a letter. This notably // prevents footnote markings ([1]) from being caught as // shortcodes. tag: '[a-z][a-z0-9_-]*', attributes: { text: { type: 'string', shortcode: function shortcode(attrs, _ref) { var content = _ref.content; return Object(external_wp_autop_["removep"])(Object(external_wp_autop_["autop"])(content)); } } }, priority: 20 }] }; /* harmony default export */ var shortcode_transforms = (shortcode_transforms_transforms); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/shortcode/index.js /** * WordPress dependencies */ /** * Internal dependencies */ var shortcode_metadata = { apiVersion: 2, name: "core/shortcode", category: "widgets", attributes: { text: { type: "string", source: "html" } }, supports: { className: false, customClassName: false, html: false }, editorStyle: "wp-block-shortcode-editor" }; var shortcode_name = shortcode_metadata.name; var shortcode_settings = { title: Object(external_wp_i18n_["_x"])('Shortcode', 'block title'), description: Object(external_wp_i18n_["__"])('Insert additional custom elements with a WordPress shortcode.'), icon: library_shortcode, transforms: shortcode_transforms, edit: ShortcodeEdit, save: shortcode_save_save }; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/resize-corner-n-e.js /** * WordPress dependencies */ var resizeCornerNE = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M12.5 4.2v1.6h4.7L5.8 17.2V12H4.2v7.8H12v-1.6H6.8L18.2 6.8v4.7h1.6V4.2z" })); /* harmony default export */ var resize_corner_n_e = (resizeCornerNE); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/spacer/edit.js /** * External dependencies */ /** * WordPress dependencies */ var MIN_SPACER_HEIGHT = 1; var MAX_SPACER_HEIGHT = 500; var edit_SpacerEdit = function SpacerEdit(_ref) { var attributes = _ref.attributes, isSelected = _ref.isSelected, setAttributes = _ref.setAttributes, onResizeStart = _ref.onResizeStart, onResizeStop = _ref.onResizeStop; var _useState = Object(external_wp_element_["useState"])(false), _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2), isResizing = _useState2[0], setIsResizing = _useState2[1]; var height = attributes.height; var updateHeight = function updateHeight(value) { setAttributes({ height: value }); }; var handleOnResizeStart = function handleOnResizeStart() { onResizeStart.apply(void 0, arguments); setIsResizing(true); }; var handleOnResizeStop = function handleOnResizeStop(event, direction, elt, delta) { onResizeStop(); var spacerHeight = Math.min(parseInt(height + delta.height, 10), MAX_SPACER_HEIGHT); updateHeight(spacerHeight); setIsResizing(false); }; return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_primitives_["View"], Object(external_wp_blockEditor_["useBlockProps"])(), Object(external_wp_element_["createElement"])(external_wp_components_["ResizableBox"], { className: classnames_default()('block-library-spacer__resize-container', { 'is-selected': isSelected }), size: { height: height }, minHeight: MIN_SPACER_HEIGHT, enable: { top: false, right: false, bottom: true, left: false, topRight: false, bottomRight: false, bottomLeft: false, topLeft: false }, onResizeStart: handleOnResizeStart, onResizeStop: handleOnResizeStop, showHandle: isSelected, __experimentalShowTooltip: true, __experimentalTooltipProps: { axis: 'y', position: 'bottom', isVisible: isResizing } })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], { title: Object(external_wp_i18n_["__"])('Spacer settings') }, Object(external_wp_element_["createElement"])(external_wp_components_["RangeControl"], { label: Object(external_wp_i18n_["__"])('Height in pixels'), min: MIN_SPACER_HEIGHT, max: Math.max(MAX_SPACER_HEIGHT, height), value: height, onChange: updateHeight })))); }; /* harmony default export */ var spacer_edit = (Object(external_wp_compose_["compose"])([Object(external_wp_data_["withDispatch"])(function (dispatch) { var _dispatch = dispatch('core/block-editor'), toggleSelection = _dispatch.toggleSelection; return { onResizeStart: function onResizeStart() { return toggleSelection(false); }, onResizeStop: function onResizeStop() { return toggleSelection(true); } }; }), external_wp_compose_["withInstanceId"]])(edit_SpacerEdit)); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/spacer/save.js /** * WordPress dependencies */ function spacer_save_save(_ref) { var attributes = _ref.attributes; return Object(external_wp_element_["createElement"])("div", external_wp_blockEditor_["useBlockProps"].save({ style: { height: attributes.height }, 'aria-hidden': true })); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/spacer/index.js /** * WordPress dependencies */ /** * Internal dependencies */ var spacer_metadata = { apiVersion: 2, name: "core/spacer", category: "design", attributes: { height: { type: "number", "default": 100 } }, supports: { anchor: true }, editorStyle: "wp-block-spacer-editor", style: "wp-block-spacer" }; var spacer_name = spacer_metadata.name; var spacer_settings = { title: Object(external_wp_i18n_["_x"])('Spacer', 'block title'), description: Object(external_wp_i18n_["__"])('Add white space between blocks and customize its height.'), icon: resize_corner_n_e, edit: spacer_edit, save: spacer_save_save }; // EXTERNAL MODULE: external ["wp","deprecated"] var external_wp_deprecated_ = __webpack_require__(35); var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/subhead/edit.js /** * WordPress dependencies */ function SubheadEdit(_ref) { var attributes = _ref.attributes, setAttributes = _ref.setAttributes, className = _ref.className; var align = attributes.align, content = attributes.content, placeholder = attributes.placeholder; external_wp_deprecated_default()('The Subheading block', { alternative: 'the Paragraph block', plugin: 'Gutenberg' }); return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["AlignmentToolbar"], { value: align, onChange: function onChange(nextAlign) { setAttributes({ align: nextAlign }); } })), Object(external_wp_element_["createElement"])("div", Object(external_wp_blockEditor_["useBlockProps"])(), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], { tagName: "p", value: content, onChange: function onChange(nextContent) { setAttributes({ content: nextContent }); }, style: { textAlign: align }, className: className, "aria-label": Object(external_wp_i18n_["__"])('Subheading text'), placeholder: placeholder || Object(external_wp_i18n_["__"])('Write subheading…') }))); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/subhead/save.js /** * WordPress dependencies */ function subhead_save_save(_ref) { var attributes = _ref.attributes; var align = attributes.align, content = attributes.content; return Object(external_wp_element_["createElement"])("p", external_wp_blockEditor_["useBlockProps"].save({ style: { textAlign: align } }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { value: content })); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/subhead/transforms.js /** * WordPress dependencies */ var subhead_transforms_transforms = { to: [{ type: 'block', blocks: ['core/paragraph'], transform: function transform(attributes) { return Object(external_wp_blocks_["createBlock"])('core/paragraph', attributes); } }] }; /* harmony default export */ var subhead_transforms = (subhead_transforms_transforms); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/subhead/index.js /** * WordPress dependencies */ /** * Internal dependencies */ var subhead_metadata = { apiVersion: 2, name: "core/subhead", category: "text", attributes: { align: { type: "string" }, content: { type: "string", source: "html", selector: "p" } }, supports: { inserter: false, multiple: false }, editorStyle: "wp-block-subhead-editor", style: "wp-block-subhead" }; var subhead_name = subhead_metadata.name; var subhead_settings = { title: Object(external_wp_i18n_["_x"])('Subheading (deprecated)', 'block title'), description: Object(external_wp_i18n_["__"])('This block is deprecated. Please use the Paragraph block instead.'), icon: Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], { d: "M7.1 6l-.5 3h4.5L9.4 19h3l1.8-10h4.5l.5-3H7.1z" })), transforms: subhead_transforms, edit: SubheadEdit, save: subhead_save_save }; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/block-table.js /** * WordPress dependencies */ var blockTable = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v3.5h-15V5c0-.3.2-.5.5-.5zm8 5.5h6.5v3.5H13V10zm-1.5 3.5h-7V10h7v3.5zm-7 5.5v-4h7v4.5H5c-.3 0-.5-.2-.5-.5zm14.5.5h-6V15h6.5v4c0 .3-.2.5-.5.5z" })); /* harmony default export */ var block_table = (blockTable); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/table/deprecated.js /** * External dependencies */ /** * WordPress dependencies */ var deprecated_supports = { align: true }; var table_deprecated_deprecated = [{ attributes: { hasFixedLayout: { type: 'boolean', default: false }, backgroundColor: { type: 'string' }, head: { type: 'array', default: [], source: 'query', selector: 'thead tr', query: { cells: { type: 'array', default: [], source: 'query', selector: 'td,th', query: { content: { type: 'string', source: 'html' }, tag: { type: 'string', default: 'td', source: 'tag' }, scope: { type: 'string', source: 'attribute', attribute: 'scope' } } } } }, body: { type: 'array', default: [], source: 'query', selector: 'tbody tr', query: { cells: { type: 'array', default: [], source: 'query', selector: 'td,th', query: { content: { type: 'string', source: 'html' }, tag: { type: 'string', default: 'td', source: 'tag' }, scope: { type: 'string', source: 'attribute', attribute: 'scope' } } } } }, foot: { type: 'array', default: [], source: 'query', selector: 'tfoot tr', query: { cells: { type: 'array', default: [], source: 'query', selector: 'td,th', query: { content: { type: 'string', source: 'html' }, tag: { type: 'string', default: 'td', source: 'tag' }, scope: { type: 'string', source: 'attribute', attribute: 'scope' } } } } } }, supports: deprecated_supports, save: function save(_ref) { var attributes = _ref.attributes; var hasFixedLayout = attributes.hasFixedLayout, head = attributes.head, body = attributes.body, foot = attributes.foot, backgroundColor = attributes.backgroundColor; var isEmpty = !head.length && !body.length && !foot.length; if (isEmpty) { return null; } var backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor); var classes = classnames_default()(backgroundClass, { 'has-fixed-layout': hasFixedLayout, 'has-background': !!backgroundClass }); var Section = function Section(_ref2) { var type = _ref2.type, rows = _ref2.rows; if (!rows.length) { return null; } var Tag = "t".concat(type); return Object(external_wp_element_["createElement"])(Tag, null, rows.map(function (_ref3, rowIndex) { var cells = _ref3.cells; return Object(external_wp_element_["createElement"])("tr", { key: rowIndex }, cells.map(function (_ref4, cellIndex) { var content = _ref4.content, tag = _ref4.tag, scope = _ref4.scope; return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: tag, value: content, key: cellIndex, scope: tag === 'th' ? scope : undefined }); })); })); }; return Object(external_wp_element_["createElement"])("table", { className: classes }, Object(external_wp_element_["createElement"])(Section, { type: "head", rows: head }), Object(external_wp_element_["createElement"])(Section, { type: "body", rows: body }), Object(external_wp_element_["createElement"])(Section, { type: "foot", rows: foot })); } }]; /* harmony default export */ var table_deprecated = (table_deprecated_deprecated); // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/align-left.js var align_left = __webpack_require__(300); // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/align-center.js var align_center = __webpack_require__(301); // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/align-right.js var align_right = __webpack_require__(302); // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/table-row-before.js /** * WordPress dependencies */ var tableRowBefore = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "-2 -2 24 24" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M6.656 6.464h2.88v2.88h1.408v-2.88h2.88V5.12h-2.88V2.24H9.536v2.88h-2.88zM0 17.92V0h20.48v17.92H0zm7.68-2.56h5.12v-3.84H7.68v3.84zm-6.4 0H6.4v-3.84H1.28v3.84zM19.2 1.28H1.28v9.024H19.2V1.28zm0 10.24h-5.12v3.84h5.12v-3.84zM6.656 6.464h2.88v2.88h1.408v-2.88h2.88V5.12h-2.88V2.24H9.536v2.88h-2.88zM0 17.92V0h20.48v17.92H0zm7.68-2.56h5.12v-3.84H7.68v3.84zm-6.4 0H6.4v-3.84H1.28v3.84zM19.2 1.28H1.28v9.024H19.2V1.28zm0 10.24h-5.12v3.84h5.12v-3.84z" })); /* harmony default export */ var table_row_before = (tableRowBefore); // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/table-row-after.js /** * WordPress dependencies */ var tableRowAfter = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "-2 -2 24 24" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M13.824 10.176h-2.88v-2.88H9.536v2.88h-2.88v1.344h2.88v2.88h1.408v-2.88h2.88zM0 17.92V0h20.48v17.92H0zM6.4 1.28H1.28v3.84H6.4V1.28zm6.4 0H7.68v3.84h5.12V1.28zm6.4 0h-5.12v3.84h5.12V1.28zm0 5.056H1.28v9.024H19.2V6.336z" })); /* harmony default export */ var table_row_after = (tableRowAfter); // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/table-row-delete.js /** * WordPress dependencies */ var tableRowDelete = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "-2 -2 24 24" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M17.728 11.456L14.592 8.32l3.2-3.2-1.536-1.536-3.2 3.2L9.92 3.648 8.384 5.12l3.2 3.2-3.264 3.264 1.536 1.536 3.264-3.264 3.136 3.136 1.472-1.536zM0 17.92V0h20.48v17.92H0zm19.2-6.4h-.448l-1.28-1.28H19.2V6.4h-1.792l1.28-1.28h.512V1.28H1.28v3.84h6.208l1.28 1.28H1.28v3.84h7.424l-1.28 1.28H1.28v3.84H19.2v-3.84z" })); /* harmony default export */ var table_row_delete = (tableRowDelete); // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/table-column-before.js /** * WordPress dependencies */ var tableColumnBefore = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "-2 -2 24 24" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M6.4 3.776v3.648H2.752v1.792H6.4v3.648h1.728V9.216h3.712V7.424H8.128V3.776zM0 17.92V0h20.48v17.92H0zM12.8 1.28H1.28v14.08H12.8V1.28zm6.4 0h-5.12v3.84h5.12V1.28zm0 5.12h-5.12v3.84h5.12V6.4zm0 5.12h-5.12v3.84h5.12v-3.84z" })); /* harmony default export */ var table_column_before = (tableColumnBefore); // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/table-column-after.js /** * WordPress dependencies */ var tableColumnAfter = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "-2 -2 24 24" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M14.08 12.864V9.216h3.648V7.424H14.08V3.776h-1.728v3.648H8.64v1.792h3.712v3.648zM0 17.92V0h20.48v17.92H0zM6.4 1.28H1.28v3.84H6.4V1.28zm0 5.12H1.28v3.84H6.4V6.4zm0 5.12H1.28v3.84H6.4v-3.84zM19.2 1.28H7.68v14.08H19.2V1.28z" })); /* harmony default export */ var table_column_after = (tableColumnAfter); // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/table-column-delete.js /** * WordPress dependencies */ var tableColumnDelete = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "-2 -2 24 24" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M6.4 9.98L7.68 8.7v-.256L6.4 7.164V9.98zm6.4-1.532l1.28-1.28V9.92L12.8 8.64v-.192zm7.68 9.472V0H0v17.92h20.48zm-1.28-2.56h-5.12v-1.024l-.256.256-1.024-1.024v1.792H7.68v-1.792l-1.024 1.024-.256-.256v1.024H1.28V1.28H6.4v2.368l.704-.704.576.576V1.216h5.12V3.52l.96-.96.32.32V1.216h5.12V15.36zm-5.76-2.112l-3.136-3.136-3.264 3.264-1.536-1.536 3.264-3.264L5.632 5.44l1.536-1.536 3.136 3.136 3.2-3.2 1.536 1.536-3.2 3.2 3.136 3.136-1.536 1.536z" })); /* harmony default export */ var table_column_delete = (tableColumnDelete); // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/table.js /** * WordPress dependencies */ var table = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M4 6v11.5h16V6H4zm1.5 1.5h6V11h-6V7.5zm0 8.5v-3.5h6V16h-6zm13 0H13v-3.5h5.5V16zM13 11V7.5h5.5V11H13z" })); /* harmony default export */ var library_table = (table); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/table/state.js function state_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 state_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { state_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { state_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } /** * External dependencies */ var INHERITED_COLUMN_ATTRIBUTES = ['align']; /** * Creates a table state. * * @param {Object} options * @param {number} options.rowCount Row count for the table to create. * @param {number} options.columnCount Column count for the table to create. * * @return {Object} New table state. */ function createTable(_ref) { var rowCount = _ref.rowCount, columnCount = _ref.columnCount; return { body: Object(external_lodash_["times"])(rowCount, function () { return { cells: Object(external_lodash_["times"])(columnCount, function () { return { content: '', tag: 'td' }; }) }; }) }; } /** * Returns the first row in the table. * * @param {Object} state Current table state. * * @return {Object} The first table row. */ function getFirstRow(state) { if (!isEmptyTableSection(state.head)) { return state.head[0]; } if (!isEmptyTableSection(state.body)) { return state.body[0]; } if (!isEmptyTableSection(state.foot)) { return state.foot[0]; } } /** * Gets an attribute for a cell. * * @param {Object} state Current table state. * @param {Object} cellLocation The location of the cell * @param {string} attributeName The name of the attribute to get the value of. * * @return {*} The attribute value. */ function getCellAttribute(state, cellLocation, attributeName) { var sectionName = cellLocation.sectionName, rowIndex = cellLocation.rowIndex, columnIndex = cellLocation.columnIndex; return Object(external_lodash_["get"])(state, [sectionName, rowIndex, 'cells', columnIndex, attributeName]); } /** * Returns updated cell attributes after applying the `updateCell` function to the selection. * * @param {Object} state The block attributes. * @param {Object} selection The selection of cells to update. * @param {Function} updateCell A function to update the selected cell attributes. * * @return {Object} New table state including the updated cells. */ function updateSelectedCell(state, selection, updateCell) { if (!selection) { return state; } var tableSections = Object(external_lodash_["pick"])(state, ['head', 'body', 'foot']); var selectionSectionName = selection.sectionName, selectionRowIndex = selection.rowIndex; return Object(external_lodash_["mapValues"])(tableSections, function (section, sectionName) { if (selectionSectionName && selectionSectionName !== sectionName) { return section; } return section.map(function (row, rowIndex) { if (selectionRowIndex && selectionRowIndex !== rowIndex) { return row; } return { cells: row.cells.map(function (cellAttributes, columnIndex) { var cellLocation = { sectionName: sectionName, columnIndex: columnIndex, rowIndex: rowIndex }; if (!isCellSelected(cellLocation, selection)) { return cellAttributes; } return updateCell(cellAttributes); }) }; }); }); } /** * Returns whether the cell at `cellLocation` is included in the selection `selection`. * * @param {Object} cellLocation An object containing cell location properties. * @param {Object} selection An object containing selection properties. * * @return {boolean} True if the cell is selected, false otherwise. */ function isCellSelected(cellLocation, selection) { if (!cellLocation || !selection) { return false; } switch (selection.type) { case 'column': return selection.type === 'column' && cellLocation.columnIndex === selection.columnIndex; case 'cell': return selection.type === 'cell' && cellLocation.sectionName === selection.sectionName && cellLocation.columnIndex === selection.columnIndex && cellLocation.rowIndex === selection.rowIndex; } } /** * Inserts a row in the table state. * * @param {Object} state Current table state. * @param {Object} options * @param {string} options.sectionName Section in which to insert the row. * @param {number} options.rowIndex Row index at which to insert the row. * @param {number} options.columnCount Column count for the table to create. * * @return {Object} New table state. */ function insertRow(state, _ref2) { var sectionName = _ref2.sectionName, rowIndex = _ref2.rowIndex, columnCount = _ref2.columnCount; var firstRow = getFirstRow(state); var cellCount = columnCount === undefined ? Object(external_lodash_["get"])(firstRow, ['cells', 'length']) : columnCount; // Bail early if the function cannot determine how many cells to add. if (!cellCount) { return state; } return Object(defineProperty["a" /* default */])({}, sectionName, [].concat(Object(toConsumableArray["a" /* default */])(state[sectionName].slice(0, rowIndex)), [{ cells: Object(external_lodash_["times"])(cellCount, function (index) { var firstCellInColumn = Object(external_lodash_["get"])(firstRow, ['cells', index], {}); var inheritedAttributes = Object(external_lodash_["pick"])(firstCellInColumn, INHERITED_COLUMN_ATTRIBUTES); return state_objectSpread(state_objectSpread({}, inheritedAttributes), {}, { content: '', tag: sectionName === 'head' ? 'th' : 'td' }); }) }], Object(toConsumableArray["a" /* default */])(state[sectionName].slice(rowIndex)))); } /** * Deletes a row from the table state. * * @param {Object} state Current table state. * @param {Object} options * @param {string} options.sectionName Section in which to delete the row. * @param {number} options.rowIndex Row index to delete. * * @return {Object} New table state. */ function deleteRow(state, _ref4) { var sectionName = _ref4.sectionName, rowIndex = _ref4.rowIndex; return Object(defineProperty["a" /* default */])({}, sectionName, state[sectionName].filter(function (row, index) { return index !== rowIndex; })); } /** * Inserts a column in the table state. * * @param {Object} state Current table state. * @param {Object} options * @param {number} options.columnIndex Column index at which to insert the column. * * @return {Object} New table state. */ function insertColumn(state, _ref6) { var columnIndex = _ref6.columnIndex; var tableSections = Object(external_lodash_["pick"])(state, ['head', 'body', 'foot']); return Object(external_lodash_["mapValues"])(tableSections, function (section, sectionName) { // Bail early if the table section is empty. if (isEmptyTableSection(section)) { return section; } return section.map(function (row) { // Bail early if the row is empty or it's an attempt to insert past // the last possible index of the array. if (isEmptyRow(row) || row.cells.length < columnIndex) { return row; } return { cells: [].concat(Object(toConsumableArray["a" /* default */])(row.cells.slice(0, columnIndex)), [{ content: '', tag: sectionName === 'head' ? 'th' : 'td' }], Object(toConsumableArray["a" /* default */])(row.cells.slice(columnIndex))) }; }); }); } /** * Deletes a column from the table state. * * @param {Object} state Current table state. * @param {Object} options * @param {number} options.columnIndex Column index to delete. * * @return {Object} New table state. */ function deleteColumn(state, _ref7) { var columnIndex = _ref7.columnIndex; var tableSections = Object(external_lodash_["pick"])(state, ['head', 'body', 'foot']); return Object(external_lodash_["mapValues"])(tableSections, function (section) { // Bail early if the table section is empty. if (isEmptyTableSection(section)) { return section; } return section.map(function (row) { return { cells: row.cells.length >= columnIndex ? row.cells.filter(function (cell, index) { return index !== columnIndex; }) : row.cells }; }).filter(function (row) { return row.cells.length; }); }); } /** * Toggles the existance of a section. * * @param {Object} state Current table state. * @param {string} sectionName Name of the section to toggle. * * @return {Object} New table state. */ function toggleSection(state, sectionName) { // Section exists, replace it with an empty row to remove it. if (!isEmptyTableSection(state[sectionName])) { return Object(defineProperty["a" /* default */])({}, sectionName, []); } // Get the length of the first row of the body to use when creating the header. var columnCount = Object(external_lodash_["get"])(state, ['body', 0, 'cells', 'length'], 1); // Section doesn't exist, insert an empty row to create the section. return insertRow(state, { sectionName: sectionName, rowIndex: 0, columnCount: columnCount }); } /** * Determines whether a table section is empty. * * @param {Object} section Table section state. * * @return {boolean} True if the table section is empty, false otherwise. */ function isEmptyTableSection(section) { return !section || !section.length || Object(external_lodash_["every"])(section, isEmptyRow); } /** * Determines whether a table row is empty. * * @param {Object} row Table row state. * * @return {boolean} True if the table section is empty, false otherwise. */ function isEmptyRow(row) { return !(row.cells && row.cells.length); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/table/edit.js function table_edit_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 table_edit_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { table_edit_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { table_edit_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ var BACKGROUND_COLORS = [{ color: '#f3f4f5', name: 'Subtle light gray', slug: 'subtle-light-gray' }, { color: '#e9fbe5', name: 'Subtle pale green', slug: 'subtle-pale-green' }, { color: '#e7f5fe', name: 'Subtle pale blue', slug: 'subtle-pale-blue' }, { color: '#fcf0ef', name: 'Subtle pale pink', slug: 'subtle-pale-pink' }]; var ALIGNMENT_CONTROLS = [{ icon: align_left["a" /* default */], title: Object(external_wp_i18n_["__"])('Align column left'), align: 'left' }, { icon: align_center["a" /* default */], title: Object(external_wp_i18n_["__"])('Align column center'), align: 'center' }, { icon: align_right["a" /* default */], title: Object(external_wp_i18n_["__"])('Align column right'), align: 'right' }]; var withCustomBackgroundColors = Object(external_wp_blockEditor_["createCustomColorsHOC"])(BACKGROUND_COLORS); var cellAriaLabel = { head: Object(external_wp_i18n_["__"])('Header cell text'), body: Object(external_wp_i18n_["__"])('Body cell text'), foot: Object(external_wp_i18n_["__"])('Footer cell text') }; var edit_placeholder = { head: Object(external_wp_i18n_["__"])('Header label'), foot: Object(external_wp_i18n_["__"])('Footer label') }; function TSection(_ref) { var name = _ref.name, props = Object(objectWithoutProperties["a" /* default */])(_ref, ["name"]); var TagName = "t".concat(name); return Object(external_wp_element_["createElement"])(TagName, props); } function TableEdit(_ref2) { var attributes = _ref2.attributes, backgroundColor = _ref2.backgroundColor, setBackgroundColor = _ref2.setBackgroundColor, setAttributes = _ref2.setAttributes, insertBlocksAfter = _ref2.insertBlocksAfter, isSelected = _ref2.isSelected; var hasFixedLayout = attributes.hasFixedLayout, caption = attributes.caption, head = attributes.head, foot = attributes.foot; var _useState = Object(external_wp_element_["useState"])(2), _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2), initialRowCount = _useState2[0], setInitialRowCount = _useState2[1]; var _useState3 = Object(external_wp_element_["useState"])(2), _useState4 = Object(slicedToArray["a" /* default */])(_useState3, 2), initialColumnCount = _useState4[0], setInitialColumnCount = _useState4[1]; var _useState5 = Object(external_wp_element_["useState"])(), _useState6 = Object(slicedToArray["a" /* default */])(_useState5, 2), selectedCell = _useState6[0], setSelectedCell = _useState6[1]; /** * Updates the initial column count used for table creation. * * @param {number} count New initial column count. */ function onChangeInitialColumnCount(count) { setInitialColumnCount(count); } /** * Updates the initial row count used for table creation. * * @param {number} count New initial row count. */ function onChangeInitialRowCount(count) { setInitialRowCount(count); } /** * Creates a table based on dimensions in local state. * * @param {Object} event Form submit event. */ function onCreateTable(event) { event.preventDefault(); setAttributes(createTable({ rowCount: parseInt(initialRowCount, 10) || 2, columnCount: parseInt(initialColumnCount, 10) || 2 })); } /** * Toggles whether the table has a fixed layout or not. */ function onChangeFixedLayout() { setAttributes({ hasFixedLayout: !hasFixedLayout }); } /** * Changes the content of the currently selected cell. * * @param {Array} content A RichText content value. */ function onChange(content) { if (!selectedCell) { return; } setAttributes(updateSelectedCell(attributes, selectedCell, function (cellAttributes) { return table_edit_objectSpread(table_edit_objectSpread({}, cellAttributes), {}, { content: content }); })); } /** * Align text within the a column. * * @param {string} align The new alignment to apply to the column. */ function onChangeColumnAlignment(align) { if (!selectedCell) { return; } // Convert the cell selection to a column selection so that alignment // is applied to the entire column. var columnSelection = { type: 'column', columnIndex: selectedCell.columnIndex }; var newAttributes = updateSelectedCell(attributes, columnSelection, function (cellAttributes) { return table_edit_objectSpread(table_edit_objectSpread({}, cellAttributes), {}, { align: align }); }); setAttributes(newAttributes); } /** * Get the alignment of the currently selected cell. * * @return {string} The new alignment to apply to the column. */ function getCellAlignment() { if (!selectedCell) { return; } return getCellAttribute(attributes, selectedCell, 'align'); } /** * Add or remove a `head` table section. */ function onToggleHeaderSection() { setAttributes(toggleSection(attributes, 'head')); } /** * Add or remove a `foot` table section. */ function onToggleFooterSection() { setAttributes(toggleSection(attributes, 'foot')); } /** * Inserts a row at the currently selected row index, plus `delta`. * * @param {number} delta Offset for selected row index at which to insert. */ function onInsertRow(delta) { if (!selectedCell) { return; } var sectionName = selectedCell.sectionName, rowIndex = selectedCell.rowIndex; var newRowIndex = rowIndex + delta; setAttributes(insertRow(attributes, { sectionName: sectionName, rowIndex: newRowIndex })); // Select the first cell of the new row setSelectedCell({ sectionName: sectionName, rowIndex: newRowIndex, columnIndex: 0, type: 'cell' }); } /** * Inserts a row before the currently selected row. */ function onInsertRowBefore() { onInsertRow(0); } /** * Inserts a row after the currently selected row. */ function onInsertRowAfter() { onInsertRow(1); } /** * Deletes the currently selected row. */ function onDeleteRow() { if (!selectedCell) { return; } var sectionName = selectedCell.sectionName, rowIndex = selectedCell.rowIndex; setSelectedCell(); setAttributes(deleteRow(attributes, { sectionName: sectionName, rowIndex: rowIndex })); } /** * Inserts a column at the currently selected column index, plus `delta`. * * @param {number} delta Offset for selected column index at which to insert. */ function onInsertColumn() { var delta = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; if (!selectedCell) { return; } var columnIndex = selectedCell.columnIndex; var newColumnIndex = columnIndex + delta; setAttributes(insertColumn(attributes, { columnIndex: newColumnIndex })); // Select the first cell of the new column setSelectedCell({ rowIndex: 0, columnIndex: newColumnIndex, type: 'cell' }); } /** * Inserts a column before the currently selected column. */ function onInsertColumnBefore() { onInsertColumn(0); } /** * Inserts a column after the currently selected column. */ function onInsertColumnAfter() { onInsertColumn(1); } /** * Deletes the currently selected column. */ function onDeleteColumn() { if (!selectedCell) { return; } var sectionName = selectedCell.sectionName, columnIndex = selectedCell.columnIndex; setSelectedCell(); setAttributes(deleteColumn(attributes, { sectionName: sectionName, columnIndex: columnIndex })); } Object(external_wp_element_["useEffect"])(function () { if (!isSelected) { setSelectedCell(); } }, [isSelected]); var sections = ['head', 'body', 'foot'].filter(function (name) { return !isEmptyTableSection(attributes[name]); }); var tableControls = [{ icon: table_row_before, title: Object(external_wp_i18n_["__"])('Insert row before'), isDisabled: !selectedCell, onClick: onInsertRowBefore }, { icon: table_row_after, title: Object(external_wp_i18n_["__"])('Insert row after'), isDisabled: !selectedCell, onClick: onInsertRowAfter }, { icon: table_row_delete, title: Object(external_wp_i18n_["__"])('Delete row'), isDisabled: !selectedCell, onClick: onDeleteRow }, { icon: table_column_before, title: Object(external_wp_i18n_["__"])('Insert column before'), isDisabled: !selectedCell, onClick: onInsertColumnBefore }, { icon: table_column_after, title: Object(external_wp_i18n_["__"])('Insert column after'), isDisabled: !selectedCell, onClick: onInsertColumnAfter }, { icon: table_column_delete, title: Object(external_wp_i18n_["__"])('Delete column'), isDisabled: !selectedCell, onClick: onDeleteColumn }]; var renderedSections = ['head', 'body', 'foot'].map(function (name) { return Object(external_wp_element_["createElement"])(TSection, { name: name, key: name }, attributes[name].map(function (_ref3, rowIndex) { var cells = _ref3.cells; return Object(external_wp_element_["createElement"])("tr", { key: rowIndex }, cells.map(function (_ref4, columnIndex) { var content = _ref4.content, CellTag = _ref4.tag, scope = _ref4.scope, align = _ref4.align; return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], { tagName: CellTag, key: columnIndex, className: classnames_default()(Object(defineProperty["a" /* default */])({}, "has-text-align-".concat(align), align), 'wp-block-table__cell-content'), scope: CellTag === 'th' ? scope : undefined, value: content, onChange: onChange, unstableOnFocus: function unstableOnFocus() { setSelectedCell({ sectionName: name, rowIndex: rowIndex, columnIndex: columnIndex, type: 'cell' }); }, "aria-label": cellAriaLabel[name], placeholder: edit_placeholder[name] }); })); })); }); var isEmpty = !sections.length; return Object(external_wp_element_["createElement"])("figure", Object(external_wp_blockEditor_["useBlockProps"])(), !isEmpty && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarItem"], null, function (toggleProps) { return Object(external_wp_element_["createElement"])(external_wp_components_["DropdownMenu"], { hasArrowIndicator: true, icon: library_table, toggleProps: toggleProps, label: Object(external_wp_i18n_["__"])('Edit table'), controls: tableControls }); })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["AlignmentToolbar"], { label: Object(external_wp_i18n_["__"])('Change column alignment'), alignmentControls: ALIGNMENT_CONTROLS, value: getCellAlignment(), onChange: function onChange(nextAlign) { return onChangeColumnAlignment(nextAlign); } })), !isEmpty && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], { title: Object(external_wp_i18n_["__"])('Table settings'), className: "blocks-table-settings" }, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { label: Object(external_wp_i18n_["__"])('Fixed width table cells'), checked: !!hasFixedLayout, onChange: onChangeFixedLayout }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { label: Object(external_wp_i18n_["__"])('Header section'), checked: !!(head && head.length), onChange: onToggleHeaderSection }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { label: Object(external_wp_i18n_["__"])('Footer section'), checked: !!(foot && foot.length), onChange: onToggleFooterSection })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["PanelColorSettings"], { title: Object(external_wp_i18n_["__"])('Color settings'), initialOpen: false, colorSettings: [{ value: backgroundColor.color, onChange: setBackgroundColor, label: Object(external_wp_i18n_["__"])('Background color'), disableCustomColors: true, colors: BACKGROUND_COLORS }] })), !isEmpty && Object(external_wp_element_["createElement"])("table", { className: classnames_default()(backgroundColor.class, { 'has-fixed-layout': hasFixedLayout, 'has-background': !!backgroundColor.color }) }, renderedSections), !isEmpty && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], { tagName: "figcaption", "aria-label": Object(external_wp_i18n_["__"])('Table caption text'), placeholder: Object(external_wp_i18n_["__"])('Write caption…'), value: caption, onChange: function onChange(value) { return setAttributes({ caption: value }); } // Deselect the selected table cell when the caption is focused. , unstableOnFocus: function unstableOnFocus() { return setSelectedCell(); }, __unstableOnSplitAtEnd: function __unstableOnSplitAtEnd() { return insertBlocksAfter(Object(external_wp_blocks_["createBlock"])('core/paragraph')); } }), isEmpty && Object(external_wp_element_["createElement"])(external_wp_components_["Placeholder"], { label: Object(external_wp_i18n_["__"])('Table'), icon: Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockIcon"], { icon: block_table, showColors: true }), instructions: Object(external_wp_i18n_["__"])('Insert a table for sharing data.') }, Object(external_wp_element_["createElement"])("form", { className: "blocks-table__placeholder-form", onSubmit: onCreateTable }, Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"], { type: "number", label: Object(external_wp_i18n_["__"])('Column count'), value: initialColumnCount, onChange: onChangeInitialColumnCount, min: "1", className: "blocks-table__placeholder-input" }), Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"], { type: "number", label: Object(external_wp_i18n_["__"])('Row count'), value: initialRowCount, onChange: onChangeInitialRowCount, min: "1", className: "blocks-table__placeholder-input" }), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { className: "blocks-table__placeholder-button", isPrimary: true, type: "submit" }, Object(external_wp_i18n_["__"])('Create Table'))))); } /* harmony default export */ var table_edit = (withCustomBackgroundColors('backgroundColor')(TableEdit)); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/table/save.js /** * External dependencies */ /** * WordPress dependencies */ function table_save_save(_ref) { var attributes = _ref.attributes; var hasFixedLayout = attributes.hasFixedLayout, head = attributes.head, body = attributes.body, foot = attributes.foot, backgroundColor = attributes.backgroundColor, caption = attributes.caption; var isEmpty = !head.length && !body.length && !foot.length; if (isEmpty) { return null; } var backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor); var classes = classnames_default()(backgroundClass, { 'has-fixed-layout': hasFixedLayout, 'has-background': !!backgroundClass }); var hasCaption = !external_wp_blockEditor_["RichText"].isEmpty(caption); var Section = function Section(_ref2) { var type = _ref2.type, rows = _ref2.rows; if (!rows.length) { return null; } var Tag = "t".concat(type); return Object(external_wp_element_["createElement"])(Tag, null, rows.map(function (_ref3, rowIndex) { var cells = _ref3.cells; return Object(external_wp_element_["createElement"])("tr", { key: rowIndex }, cells.map(function (_ref4, cellIndex) { var content = _ref4.content, tag = _ref4.tag, scope = _ref4.scope, align = _ref4.align; var cellClasses = classnames_default()(Object(defineProperty["a" /* default */])({}, "has-text-align-".concat(align), align)); return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { className: cellClasses ? cellClasses : undefined, "data-align": align, tagName: tag, value: content, key: cellIndex, scope: tag === 'th' ? scope : undefined }); })); })); }; return Object(external_wp_element_["createElement"])("figure", external_wp_blockEditor_["useBlockProps"].save(), Object(external_wp_element_["createElement"])("table", { className: classes === '' ? undefined : classes }, Object(external_wp_element_["createElement"])(Section, { type: "head", rows: head }), Object(external_wp_element_["createElement"])(Section, { type: "body", rows: body }), Object(external_wp_element_["createElement"])(Section, { type: "foot", rows: foot })), hasCaption && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "figcaption", value: caption })); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/table/transforms.js var tableContentPasteSchema = function tableContentPasteSchema(_ref) { var phrasingContentSchema = _ref.phrasingContentSchema; return { tr: { allowEmpty: true, children: { th: { allowEmpty: true, children: phrasingContentSchema, attributes: ['scope'] }, td: { allowEmpty: true, children: phrasingContentSchema } } } }; }; var tablePasteSchema = function tablePasteSchema(args) { return { table: { children: { thead: { allowEmpty: true, children: tableContentPasteSchema(args) }, tfoot: { allowEmpty: true, children: tableContentPasteSchema(args) }, tbody: { allowEmpty: true, children: tableContentPasteSchema(args) } } } }; }; var table_transforms_transforms = { from: [{ type: 'raw', selector: 'table', schema: tablePasteSchema }] }; /* harmony default export */ var table_transforms = (table_transforms_transforms); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/table/index.js /** * WordPress dependencies */ /** * Internal dependencies */ var table_metadata = { apiVersion: 2, name: "core/table", category: "text", attributes: { hasFixedLayout: { type: "boolean", "default": false }, backgroundColor: { type: "string" }, caption: { type: "string", source: "html", selector: "figcaption", "default": "" }, head: { type: "array", "default": [], source: "query", selector: "thead tr", query: { cells: { type: "array", "default": [], source: "query", selector: "td,th", query: { content: { type: "string", source: "html" }, tag: { type: "string", "default": "td", source: "tag" }, scope: { type: "string", source: "attribute", attribute: "scope" }, align: { type: "string", source: "attribute", attribute: "data-align" } } } } }, body: { type: "array", "default": [], source: "query", selector: "tbody tr", query: { cells: { type: "array", "default": [], source: "query", selector: "td,th", query: { content: { type: "string", source: "html" }, tag: { type: "string", "default": "td", source: "tag" }, scope: { type: "string", source: "attribute", attribute: "scope" }, align: { type: "string", source: "attribute", attribute: "data-align" } } } } }, foot: { type: "array", "default": [], source: "query", selector: "tfoot tr", query: { cells: { type: "array", "default": [], source: "query", selector: "td,th", query: { content: { type: "string", source: "html" }, tag: { type: "string", "default": "td", source: "tag" }, scope: { type: "string", source: "attribute", attribute: "scope" }, align: { type: "string", source: "attribute", attribute: "data-align" } } } } } }, supports: { anchor: true, align: true, __experimentalSelector: ".wp-block-table > table" }, editorStyle: "wp-block-table-editor", style: "wp-block-table" }; var table_name = table_metadata.name; var table_settings = { title: Object(external_wp_i18n_["_x"])('Table', 'block title'), description: Object(external_wp_i18n_["__"])('Insert a table — perfect for sharing charts and data.'), icon: block_table, example: { attributes: { head: [{ cells: [{ content: Object(external_wp_i18n_["__"])('Version'), tag: 'th' }, { content: Object(external_wp_i18n_["__"])('Jazz Musician'), tag: 'th' }, { content: Object(external_wp_i18n_["__"])('Release Date'), tag: 'th' }] }], body: [{ cells: [{ content: '5.2', tag: 'td' }, { content: 'Jaco Pastorius', tag: 'td' }, { content: Object(external_wp_i18n_["__"])('May 7, 2019'), tag: 'td' }] }, { cells: [{ content: '5.1', tag: 'td' }, { content: 'Betty Carter', tag: 'td' }, { content: Object(external_wp_i18n_["__"])('February 21, 2019'), tag: 'td' }] }, { cells: [{ content: '5.0', tag: 'td' }, { content: 'Bebo Valdés', tag: 'td' }, { content: Object(external_wp_i18n_["__"])('December 6, 2018'), tag: 'td' }] }] } }, styles: [{ name: 'regular', label: Object(external_wp_i18n_["_x"])('Default', 'block style'), isDefault: true }, { name: 'stripes', label: Object(external_wp_i18n_["__"])('Stripes') }], transforms: table_transforms, edit: table_edit, save: table_save_save, deprecated: table_deprecated }; // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/text-columns/edit.js /** * External dependencies */ /** * WordPress dependencies */ function TextColumnsEdit(_ref) { var attributes = _ref.attributes, setAttributes = _ref.setAttributes; var width = attributes.width, content = attributes.content, columns = attributes.columns; external_wp_deprecated_default()('The Text Columns block', { alternative: 'the Columns block', plugin: 'Gutenberg' }); return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockAlignmentToolbar"], { value: width, onChange: function onChange(nextWidth) { return setAttributes({ width: nextWidth }); }, controls: ['center', 'wide', 'full'] })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], null, Object(external_wp_element_["createElement"])(external_wp_components_["RangeControl"], { label: Object(external_wp_i18n_["__"])('Columns'), value: columns, onChange: function onChange(value) { return setAttributes({ columns: value }); }, min: 2, max: 4, required: true }))), Object(external_wp_element_["createElement"])("div", Object(external_wp_blockEditor_["useBlockProps"])({ className: "align".concat(width, " columns-").concat(columns) }), Object(external_lodash_["times"])(columns, function (index) { return Object(external_wp_element_["createElement"])("div", { className: "wp-block-column", key: "column-".concat(index) }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], { tagName: "p", value: Object(external_lodash_["get"])(content, [index, 'children']), onChange: function onChange(nextContent) { setAttributes({ content: [].concat(Object(toConsumableArray["a" /* default */])(content.slice(0, index)), [{ children: nextContent }], Object(toConsumableArray["a" /* default */])(content.slice(index + 1))) }); }, "aria-label": Object(external_wp_i18n_["sprintf"])( // translators: %d: column index (starting with 1) Object(external_wp_i18n_["__"])('Column %d text'), index + 1), placeholder: Object(external_wp_i18n_["__"])('New Column') })); }))); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/text-columns/save.js /** * External dependencies */ /** * WordPress dependencies */ function text_columns_save_save(_ref) { var attributes = _ref.attributes; var width = attributes.width, content = attributes.content, columns = attributes.columns; return Object(external_wp_element_["createElement"])("div", external_wp_blockEditor_["useBlockProps"].save({ className: "align".concat(width, " columns-").concat(columns) }), Object(external_lodash_["times"])(columns, function (index) { return Object(external_wp_element_["createElement"])("div", { className: "wp-block-column", key: "column-".concat(index) }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "p", value: Object(external_lodash_["get"])(content, [index, 'children']) })); })); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/text-columns/transforms.js /** * WordPress dependencies */ var text_columns_transforms_transforms = { to: [{ type: 'block', blocks: ['core/columns'], transform: function transform(_ref) { var className = _ref.className, columns = _ref.columns, content = _ref.content, width = _ref.width; return Object(external_wp_blocks_["createBlock"])('core/columns', { align: 'wide' === width || 'full' === width ? width : undefined, className: className, columns: columns }, content.map(function (_ref2) { var children = _ref2.children; return Object(external_wp_blocks_["createBlock"])('core/column', {}, [Object(external_wp_blocks_["createBlock"])('core/paragraph', { content: children })]); })); } }] }; /* harmony default export */ var text_columns_transforms = (text_columns_transforms_transforms); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/text-columns/index.js /** * WordPress dependencies */ /** * Internal dependencies */ var text_columns_metadata = { apiVersion: 2, name: "core/text-columns", icon: "columns", category: "design", attributes: { content: { type: "array", source: "query", selector: "p", query: { children: { type: "string", source: "html" } }, "default": [{}, {}] }, columns: { type: "number", "default": 2 }, width: { type: "string" } }, supports: { inserter: false }, editorStyle: "wp-block-text-columns-editor", style: "wp-block-text-columns" }; var text_columns_name = text_columns_metadata.name; var text_columns_settings = { title: Object(external_wp_i18n_["_x"])('Text Columns (deprecated)', 'block title'), description: Object(external_wp_i18n_["__"])('This block is deprecated. Please use the Columns block instead.'), transforms: text_columns_transforms, getEditWrapperProps: function getEditWrapperProps(attributes) { var width = attributes.width; if ('wide' === width || 'full' === width) { return { 'data-align': width }; } }, edit: TextColumnsEdit, save: text_columns_save_save }; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/verse.js /** * WordPress dependencies */ var verse = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M17.8 2l-.9.3c-.1 0-3.6 1-5.2 2.1C10 5.5 9.3 6.5 8.9 7.1c-.6.9-1.7 4.7-1.7 6.3l-.9 2.3c-.2.4 0 .8.4 1 .1 0 .2.1.3.1.3 0 .6-.2.7-.5l.6-1.5c.3 0 .7-.1 1.2-.2.7-.1 1.4-.3 2.2-.5.8-.2 1.6-.5 2.4-.8.7-.3 1.4-.7 1.9-1.2s.8-1.2 1-1.9c.2-.7.3-1.6.4-2.4.1-.8.1-1.7.2-2.5 0-.8.1-1.5.2-2.1V2zm-1.9 5.6c-.1.8-.2 1.5-.3 2.1-.2.6-.4 1-.6 1.3-.3.3-.8.6-1.4.9-.7.3-1.4.5-2.2.8-.6.2-1.3.3-1.8.4L15 7.5c.3-.3.6-.7 1-1.1 0 .4 0 .8-.1 1.2zM6 20h8v-1.5H6V20z" })); /* harmony default export */ var library_verse = (verse); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/verse/deprecated.js /** * WordPress dependencies */ var verse_deprecated_blockAttributes = { content: { type: 'string', source: 'html', selector: 'pre', default: '' }, textAlign: { type: 'string' } }; var verse_deprecated_deprecated = [{ attributes: verse_deprecated_blockAttributes, save: function save(_ref) { var attributes = _ref.attributes; var textAlign = attributes.textAlign, content = attributes.content; return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "pre", style: { textAlign: textAlign }, value: content }); } }]; /* harmony default export */ var verse_deprecated = (verse_deprecated_deprecated); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/verse/edit.js /** * External dependencies */ /** * WordPress dependencies */ function VerseEdit(_ref) { var attributes = _ref.attributes, setAttributes = _ref.setAttributes, mergeBlocks = _ref.mergeBlocks; var textAlign = attributes.textAlign, content = attributes.content; var blockProps = Object(external_wp_blockEditor_["useBlockProps"])({ className: classnames_default()(Object(defineProperty["a" /* default */])({}, "has-text-align-".concat(textAlign), textAlign)) }); return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["AlignmentToolbar"], { value: textAlign, onChange: function onChange(nextAlign) { setAttributes({ textAlign: nextAlign }); } })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], Object(esm_extends["a" /* default */])({ tagName: "pre", identifier: "content", preserveWhiteSpace: true, value: content, onChange: function onChange(nextContent) { setAttributes({ content: nextContent }); }, "aria-label": Object(external_wp_i18n_["__"])('Verse text'), placeholder: Object(external_wp_i18n_["__"])('Write verse…'), onMerge: mergeBlocks, textAlign: textAlign }, blockProps))); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/verse/save.js /** * External dependencies */ /** * WordPress dependencies */ function verse_save_save(_ref) { var attributes = _ref.attributes; var textAlign = attributes.textAlign, content = attributes.content; var className = classnames_default()(Object(defineProperty["a" /* default */])({}, "has-text-align-".concat(textAlign), textAlign)); return Object(external_wp_element_["createElement"])("pre", external_wp_blockEditor_["useBlockProps"].save({ className: className }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { value: content })); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/verse/transforms.js /** * WordPress dependencies */ var verse_transforms_transforms = { from: [{ type: 'block', blocks: ['core/paragraph'], transform: function transform(attributes) { return Object(external_wp_blocks_["createBlock"])('core/verse', attributes); } }], to: [{ type: 'block', blocks: ['core/paragraph'], transform: function transform(attributes) { return Object(external_wp_blocks_["createBlock"])('core/paragraph', attributes); } }] }; /* harmony default export */ var verse_transforms = (verse_transforms_transforms); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/verse/index.js /** * WordPress dependencies */ /** * Internal dependencies */ var verse_metadata = { apiVersion: 2, name: "core/verse", category: "text", attributes: { content: { type: "string", source: "html", selector: "pre", "default": "", __unstablePreserveWhiteSpace: true }, textAlign: { type: "string" } }, supports: { anchor: true, __experimentalFontFamily: true, fontSize: true }, style: "wp-block-verse", editorStyle: "wp-block-verse-editor" }; var verse_name = verse_metadata.name; var verse_settings = { title: Object(external_wp_i18n_["_x"])('Verse', 'block title'), description: Object(external_wp_i18n_["__"])('Insert poetry. Use special spacing formats. Or quote song lyrics.'), icon: library_verse, example: { attributes: { /* eslint-disable @wordpress/i18n-no-collapsible-whitespace */ // translators: Sample content for the Verse block. Can be replaced with a more locale-adequate work. content: Object(external_wp_i18n_["__"])('WHAT was he doing, the great god Pan,\n Down in the reeds by the river?\nSpreading ruin and scattering ban,\nSplashing and paddling with hoofs of a goat,\nAnd breaking the golden lilies afloat\n With the dragon-fly on the river.') /* eslint-enable @wordpress/i18n-no-collapsible-whitespace */ } }, keywords: [Object(external_wp_i18n_["__"])('poetry'), Object(external_wp_i18n_["__"])('poem')], transforms: verse_transforms, deprecated: verse_deprecated, merge: function merge(attributes, attributesToMerge) { return { content: attributes.content + attributesToMerge.content }; }, edit: VerseEdit, save: verse_save_save }; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/video.js /** * WordPress dependencies */ var video_video = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z" })); /* harmony default export */ var library_video = (video_video); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/video/edit-common-settings.js /** * WordPress dependencies */ var options = [{ value: 'auto', label: Object(external_wp_i18n_["__"])('Auto') }, { value: 'metadata', label: Object(external_wp_i18n_["__"])('Metadata') }, { value: 'none', label: Object(external_wp_i18n_["__"])('None') }]; var edit_common_settings_VideoSettings = function VideoSettings(_ref) { var setAttributes = _ref.setAttributes, attributes = _ref.attributes; var autoplay = attributes.autoplay, controls = attributes.controls, loop = attributes.loop, muted = attributes.muted, playsInline = attributes.playsInline, preload = attributes.preload; var getAutoplayHelp = Object(external_wp_element_["useCallback"])(function (checked) { return checked ? Object(external_wp_i18n_["__"])('Note: Autoplaying videos may cause usability issues for some visitors.') : null; }, []); var toggleFactory = Object(external_wp_element_["useMemo"])(function () { var toggleAttribute = function toggleAttribute(attribute) { return function (newValue) { setAttributes(Object(defineProperty["a" /* default */])({}, attribute, newValue)); }; }; return { autoplay: toggleAttribute('autoplay'), loop: toggleAttribute('loop'), muted: toggleAttribute('muted'), controls: toggleAttribute('controls'), playsInline: toggleAttribute('playsInline') }; }, []); var onChangePreload = Object(external_wp_element_["useCallback"])(function (value) { setAttributes({ preload: value }); }, []); return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { label: Object(external_wp_i18n_["__"])('Autoplay'), onChange: toggleFactory.autoplay, checked: autoplay, help: getAutoplayHelp }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { label: Object(external_wp_i18n_["__"])('Loop'), onChange: toggleFactory.loop, checked: loop }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { label: Object(external_wp_i18n_["__"])('Muted'), onChange: toggleFactory.muted, checked: muted }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { label: Object(external_wp_i18n_["__"])('Playback controls'), onChange: toggleFactory.controls, checked: controls }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { label: Object(external_wp_i18n_["__"])('Play inline'), onChange: toggleFactory.playsInline, checked: playsInline }), Object(external_wp_element_["createElement"])(external_wp_components_["SelectControl"], { label: Object(external_wp_i18n_["__"])('Preload'), value: preload, onChange: onChangePreload, options: options })); }; /* harmony default export */ var edit_common_settings = (edit_common_settings_VideoSettings); // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure undefined"); } // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/media.js var library_media = __webpack_require__(308); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/video/tracks-editor.js function tracks_editor_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 tracks_editor_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { tracks_editor_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { tracks_editor_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } /** * WordPress dependencies */ var ALLOWED_TYPES = ['text/vtt']; var DEFAULT_KIND = 'subtitles'; var KIND_OPTIONS = [{ label: Object(external_wp_i18n_["__"])('Subtitles'), value: 'subtitles' }, { label: Object(external_wp_i18n_["__"])('Captions'), value: 'captions' }, { label: Object(external_wp_i18n_["__"])('Descriptions'), value: 'descriptions' }, { label: Object(external_wp_i18n_["__"])('Chapters'), value: 'chapters' }, { label: Object(external_wp_i18n_["__"])('Metadata'), value: 'metadata' }]; var captionIcon = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], { width: "18", height: "14", viewBox: "0 0 18 14", role: "img", fill: "none" }, Object(external_wp_element_["createElement"])(external_wp_components_["Rect"], { x: "0.75", y: "0.75", width: "16.5", height: "12.5", rx: "1.25", stroke: "black", strokeWidth: "1.5", fill: "none" }), Object(external_wp_element_["createElement"])(external_wp_components_["Path"], { d: "M3 7H15", stroke: "black", strokeWidth: "1.5" }), Object(external_wp_element_["createElement"])(external_wp_components_["Path"], { d: "M3 10L15 10", stroke: "black", strokeWidth: "1.5" })); function TrackList(_ref) { var tracks = _ref.tracks, onEditPress = _ref.onEditPress; var content; if (tracks.length === 0) { content = Object(external_wp_element_["createElement"])("p", { className: "block-library-video-tracks-editor__tracks-informative-message" }, Object(external_wp_i18n_["__"])('Tracks can be subtitles, captions, chapters, or descriptions. They help make your content more accessible to a wider range of users.')); } else { content = tracks.map(function (track, index) { return Object(external_wp_element_["createElement"])("div", { key: index, className: "block-library-video-tracks-editor__track-list-track" }, Object(external_wp_element_["createElement"])("span", null, track.label, " "), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { isTertiary: true, onClick: function onClick() { return onEditPress(index); }, "aria-label": Object(external_wp_i18n_["sprintf"])( /* translators: %s: Label of the video text track e.g: "French subtitles" */ Object(external_wp_i18n_["__"])('Edit %s'), track.label) }, Object(external_wp_i18n_["__"])('Edit'))); }); } return Object(external_wp_element_["createElement"])(external_wp_components_["MenuGroup"], { label: Object(external_wp_i18n_["__"])('Text tracks'), className: "block-library-video-tracks-editor__track-list" }, content); } function SingleTrackEditor(_ref2) { var track = _ref2.track, _onChange = _ref2.onChange, onClose = _ref2.onClose, onRemove = _ref2.onRemove; var _track$src = track.src, src = _track$src === void 0 ? '' : _track$src, _track$label = track.label, label = _track$label === void 0 ? '' : _track$label, _track$srcLang = track.srcLang, srcLang = _track$srcLang === void 0 ? '' : _track$srcLang, _track$kind = track.kind, kind = _track$kind === void 0 ? DEFAULT_KIND : _track$kind; var fileName = src.startsWith('blob:') ? '' : src.substring(src.lastIndexOf('/') + 1); return Object(external_wp_element_["createElement"])(external_wp_components_["NavigableMenu"], null, Object(external_wp_element_["createElement"])("div", { className: "block-library-video-tracks-editor__single-track-editor" }, Object(external_wp_element_["createElement"])("span", { className: "block-library-video-tracks-editor__single-track-editor-edit-track-label" }, Object(external_wp_i18n_["__"])('Edit track')), Object(external_wp_element_["createElement"])("span", null, Object(external_wp_i18n_["__"])('File'), ": ", Object(external_wp_element_["createElement"])("b", null, fileName)), Object(external_wp_element_["createElement"])("div", { className: "block-library-video-tracks-editor__single-track-editor-label-language" }, Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"] /* eslint-disable jsx-a11y/no-autofocus */ , { autoFocus: true /* eslint-enable jsx-a11y/no-autofocus */ , onChange: function onChange(newLabel) { return _onChange(tracks_editor_objectSpread(tracks_editor_objectSpread({}, track), {}, { label: newLabel })); }, label: Object(external_wp_i18n_["__"])('Label'), value: label, help: Object(external_wp_i18n_["__"])('Title of track') }), Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"], { onChange: function onChange(newSrcLang) { return _onChange(tracks_editor_objectSpread(tracks_editor_objectSpread({}, track), {}, { srcLang: newSrcLang })); }, label: Object(external_wp_i18n_["__"])('Source language'), value: srcLang, help: Object(external_wp_i18n_["__"])('Language tag (en, fr, etc.)') })), Object(external_wp_element_["createElement"])(external_wp_components_["SelectControl"], { className: "block-library-video-tracks-editor__single-track-editor-kind-select", options: KIND_OPTIONS, value: kind, label: Object(external_wp_i18n_["__"])('Kind'), onChange: function onChange(newKind) { if (newKind === DEFAULT_KIND) { newKind = undefined; } _onChange(tracks_editor_objectSpread(tracks_editor_objectSpread({}, track), {}, { kind: newKind })); } }), Object(external_wp_element_["createElement"])("div", { className: "block-library-video-tracks-editor__single-track-editor-buttons-container" }, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { isSecondary: true, onClick: function onClick() { var changes = {}; var hasChanges = false; if (label === '') { changes.label = Object(external_wp_i18n_["__"])('English'); hasChanges = true; } if (srcLang === '') { changes.srcLang = 'en'; hasChanges = true; } if (hasChanges) { _onChange(tracks_editor_objectSpread(tracks_editor_objectSpread({}, track), changes)); } onClose(); } }, Object(external_wp_i18n_["__"])('Close')), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { isDestructive: true, isLink: true, onClick: onRemove }, Object(external_wp_i18n_["__"])('Remove track'))))); } function TracksEditor(_ref3) { var _ref3$tracks = _ref3.tracks, tracks = _ref3$tracks === void 0 ? [] : _ref3$tracks, _onChange2 = _ref3.onChange; var mediaUpload = Object(external_wp_data_["useSelect"])(function (select) { return select('core/block-editor').getSettings().mediaUpload; }, []); var _useState = Object(external_wp_element_["useState"])(null), _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2), trackBeingEdited = _useState2[0], setTrackBeingEdited = _useState2[1]; if (!mediaUpload) { return null; } return Object(external_wp_element_["createElement"])(external_wp_components_["Dropdown"], { contentClassName: "block-library-video-tracks-editor", renderToggle: function renderToggle(_ref4) { var isOpen = _ref4.isOpen, onToggle = _ref4.onToggle; return Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], { label: Object(external_wp_i18n_["__"])('Text tracks'), showTooltip: true, "aria-expanded": isOpen, "aria-haspopup": "true", onClick: onToggle, icon: captionIcon })); }, renderContent: function renderContent(_ref5) { _objectDestructuringEmpty(_ref5); if (trackBeingEdited !== null) { return Object(external_wp_element_["createElement"])(SingleTrackEditor, { track: tracks[trackBeingEdited], onChange: function onChange(newTrack) { var newTracks = Object(toConsumableArray["a" /* default */])(tracks); newTracks[trackBeingEdited] = newTrack; _onChange2(newTracks); }, onClose: function onClose() { return setTrackBeingEdited(null); }, onRemove: function onRemove() { _onChange2(tracks.filter(function (_track, index) { return index !== trackBeingEdited; })); setTrackBeingEdited(null); } }); } return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["NavigableMenu"], null, Object(external_wp_element_["createElement"])(TrackList, { tracks: tracks, onEditPress: setTrackBeingEdited }), Object(external_wp_element_["createElement"])(external_wp_components_["MenuGroup"], { className: "block-library-video-tracks-editor__add-tracks-container", label: Object(external_wp_i18n_["__"])('Add tracks') }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaUpload"], { onSelect: function onSelect(_ref6) { var url = _ref6.url; var trackIndex = tracks.length; _onChange2([].concat(Object(toConsumableArray["a" /* default */])(tracks), [{ src: url }])); setTrackBeingEdited(trackIndex); }, allowedTypes: ALLOWED_TYPES, render: function render(_ref7) { var open = _ref7.open; return Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], { icon: library_media["a" /* default */], onClick: open }, Object(external_wp_i18n_["__"])('Open Media Library')); } }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaUploadCheck"], null, Object(external_wp_element_["createElement"])(external_wp_components_["FormFileUpload"], { onChange: function onChange(event) { var files = event.target.files; var trackIndex = tracks.length; mediaUpload({ allowedTypes: ALLOWED_TYPES, filesList: files, onFileChange: function onFileChange(_ref8) { var _ref9 = Object(slicedToArray["a" /* default */])(_ref8, 1), url = _ref9[0].url; var newTracks = Object(toConsumableArray["a" /* default */])(tracks); if (!newTracks[trackIndex]) { newTracks[trackIndex] = {}; } newTracks[trackIndex] = tracks_editor_objectSpread(tracks_editor_objectSpread({}, tracks[trackIndex]), {}, { src: url }); _onChange2(newTracks); setTrackBeingEdited(trackIndex); } }); }, accept: ".vtt,text/vtt", render: function render(_ref10) { var openFileDialog = _ref10.openFileDialog; return Object(external_wp_element_["createElement"])(external_wp_components_["MenuItem"], { icon: upload["a" /* default */], onClick: function onClick() { openFileDialog(); } }, Object(external_wp_i18n_["__"])('Upload')); } }))))); } }); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/video/tracks.js function Tracks(_ref) { var _ref$tracks = _ref.tracks, tracks = _ref$tracks === void 0 ? [] : _ref$tracks; return tracks.map(function (track) { return Object(external_wp_element_["createElement"])("track", Object(esm_extends["a" /* default */])({ key: track.src }, track)); }); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/video/edit.js /** * WordPress dependencies */ /** * Internal dependencies */ var video_edit_ALLOWED_MEDIA_TYPES = ['video']; var VIDEO_POSTER_ALLOWED_MEDIA_TYPES = ['image']; function VideoEdit(_ref) { var isSelected = _ref.isSelected, noticeUI = _ref.noticeUI, attributes = _ref.attributes, setAttributes = _ref.setAttributes, insertBlocksAfter = _ref.insertBlocksAfter, onReplace = _ref.onReplace, noticeOperations = _ref.noticeOperations; var instanceId = Object(external_wp_compose_["useInstanceId"])(VideoEdit); var videoPlayer = Object(external_wp_element_["useRef"])(); var posterImageButton = Object(external_wp_element_["useRef"])(); var id = attributes.id, caption = attributes.caption, controls = attributes.controls, poster = attributes.poster, src = attributes.src, tracks = attributes.tracks; var mediaUpload = Object(external_wp_data_["useSelect"])(function (select) { return select('core/block-editor').getSettings().mediaUpload; }); Object(external_wp_element_["useEffect"])(function () { if (!id && Object(external_wp_blob_["isBlobURL"])(src)) { var file = Object(external_wp_blob_["getBlobByURL"])(src); if (file) { mediaUpload({ filesList: [file], onFileChange: function onFileChange(_ref2) { var _ref3 = Object(slicedToArray["a" /* default */])(_ref2, 1), url = _ref3[0].url; setAttributes({ src: url }); }, onError: function onError(message) { noticeOperations.createErrorNotice(message); }, allowedTypes: video_edit_ALLOWED_MEDIA_TYPES }); } } }, []); Object(external_wp_element_["useEffect"])(function () { // Placeholder may be rendered. if (videoPlayer.current) { videoPlayer.current.load(); } }, [poster]); function onSelectVideo(media) { if (!media || !media.url) { // in this case there was an error // previous attributes should be removed // because they may be temporary blob urls setAttributes({ src: undefined, id: undefined }); return; } // sets the block's attribute and updates the edit component from the // selected media setAttributes({ src: media.url, id: media.id }); } function onSelectURL(newSrc) { if (newSrc !== src) { // Check if there's an embed block that handles this URL. var embedBlock = util_createUpgradedEmbedBlock({ attributes: { url: newSrc } }); if (undefined !== embedBlock) { onReplace(embedBlock); return; } setAttributes({ src: newSrc, id: undefined }); } } function onUploadError(message) { noticeOperations.removeAllNotices(); noticeOperations.createErrorNotice(message); } var blockProps = Object(external_wp_blockEditor_["useBlockProps"])(); if (!src) { return Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaPlaceholder"], { icon: Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockIcon"], { icon: library_video }), onSelect: onSelectVideo, onSelectURL: onSelectURL, accept: "video/*", allowedTypes: video_edit_ALLOWED_MEDIA_TYPES, value: attributes, notices: noticeUI, onError: onUploadError })); } function onSelectPoster(image) { setAttributes({ poster: image.url }); } function onRemovePoster() { setAttributes({ poster: '' }); // Move focus back to the Media Upload button. this.posterImageButton.current.focus(); } var videoPosterDescription = "video-block__poster-image-description-".concat(instanceId); return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], null, Object(external_wp_element_["createElement"])(TracksEditor, { tracks: tracks, onChange: function onChange(newTracks) { setAttributes({ tracks: newTracks }); } }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaReplaceFlow"], { mediaId: id, mediaURL: src, allowedTypes: video_edit_ALLOWED_MEDIA_TYPES, accept: "video/*", onSelect: onSelectVideo, onSelectURL: onSelectURL, onError: onUploadError })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], { title: Object(external_wp_i18n_["__"])('Video settings') }, Object(external_wp_element_["createElement"])(edit_common_settings, { setAttributes: setAttributes, attributes: attributes }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaUploadCheck"], null, Object(external_wp_element_["createElement"])(external_wp_components_["BaseControl"], { className: "editor-video-poster-control" }, Object(external_wp_element_["createElement"])(external_wp_components_["BaseControl"].VisualLabel, null, Object(external_wp_i18n_["__"])('Poster image')), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaUpload"], { title: Object(external_wp_i18n_["__"])('Select poster image'), onSelect: onSelectPoster, allowedTypes: VIDEO_POSTER_ALLOWED_MEDIA_TYPES, render: function render(_ref4) { var open = _ref4.open; return Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { isPrimary: true, onClick: open, ref: posterImageButton, "aria-describedby": videoPosterDescription }, !poster ? Object(external_wp_i18n_["__"])('Select') : Object(external_wp_i18n_["__"])('Replace')); } }), Object(external_wp_element_["createElement"])("p", { id: videoPosterDescription, hidden: true }, poster ? Object(external_wp_i18n_["sprintf"])( /* translators: %s: poster image URL. */ Object(external_wp_i18n_["__"])('The current poster image url is %s'), poster) : Object(external_wp_i18n_["__"])('There is no poster image currently selected')), !!poster && Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { onClick: onRemovePoster, isTertiary: true }, Object(external_wp_i18n_["__"])('Remove')))))), Object(external_wp_element_["createElement"])("figure", blockProps, Object(external_wp_element_["createElement"])(external_wp_components_["Disabled"], null, Object(external_wp_element_["createElement"])("video", { controls: controls, poster: poster, src: src, ref: videoPlayer }, Object(external_wp_element_["createElement"])(Tracks, { tracks: tracks }))), (!external_wp_blockEditor_["RichText"].isEmpty(caption) || isSelected) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], { tagName: "figcaption", "aria-label": Object(external_wp_i18n_["__"])('Video caption text'), placeholder: Object(external_wp_i18n_["__"])('Write caption…'), value: caption, onChange: function onChange(value) { return setAttributes({ caption: value }); }, inlineToolbar: true, __unstableOnSplitAtEnd: function __unstableOnSplitAtEnd() { return insertBlocksAfter(Object(external_wp_blocks_["createBlock"])('core/paragraph')); } }))); } /* harmony default export */ var video_edit = (Object(external_wp_components_["withNotices"])(VideoEdit)); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/video/save.js /** * WordPress dependencies */ /** * Internal dependencies */ function video_save_save(_ref) { var attributes = _ref.attributes; var autoplay = attributes.autoplay, caption = attributes.caption, controls = attributes.controls, loop = attributes.loop, muted = attributes.muted, poster = attributes.poster, preload = attributes.preload, src = attributes.src, playsInline = attributes.playsInline, tracks = attributes.tracks; return Object(external_wp_element_["createElement"])("figure", external_wp_blockEditor_["useBlockProps"].save(), src && Object(external_wp_element_["createElement"])("video", { autoPlay: autoplay, controls: controls, loop: loop, muted: muted, poster: poster, preload: preload !== 'metadata' ? preload : undefined, src: src, playsInline: playsInline }, Object(external_wp_element_["createElement"])(Tracks, { tracks: tracks })), !external_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "figcaption", value: caption })); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/video/transforms.js /** * WordPress dependencies */ var video_transforms_transforms = { from: [{ type: 'files', isMatch: function isMatch(files) { return files.length === 1 && files[0].type.indexOf('video/') === 0; }, transform: function transform(files) { var file = files[0]; // We don't need to upload the media directly here // It's already done as part of the `componentDidMount` // in the video block var block = Object(external_wp_blocks_["createBlock"])('core/video', { src: Object(external_wp_blob_["createBlobURL"])(file) }); return block; } }, { type: 'shortcode', tag: 'video', attributes: { src: { type: 'string', shortcode: function shortcode(_ref) { var _ref$named = _ref.named, src = _ref$named.src, mp4 = _ref$named.mp4, m4v = _ref$named.m4v, webm = _ref$named.webm, ogv = _ref$named.ogv, flv = _ref$named.flv; return src || mp4 || m4v || webm || ogv || flv; } }, poster: { type: 'string', shortcode: function shortcode(_ref2) { var poster = _ref2.named.poster; return poster; } }, loop: { type: 'string', shortcode: function shortcode(_ref3) { var loop = _ref3.named.loop; return loop; } }, autoplay: { type: 'string', shortcode: function shortcode(_ref4) { var autoplay = _ref4.named.autoplay; return autoplay; } }, preload: { type: 'string', shortcode: function shortcode(_ref5) { var preload = _ref5.named.preload; return preload; } } } }] }; /* harmony default export */ var video_transforms = (video_transforms_transforms); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/video/index.js /** * WordPress dependencies */ /** * Internal dependencies */ var video_metadata = { apiVersion: 2, name: "core/video", category: "media", attributes: { autoplay: { type: "boolean", source: "attribute", selector: "video", attribute: "autoplay" }, caption: { type: "string", source: "html", selector: "figcaption" }, controls: { type: "boolean", source: "attribute", selector: "video", attribute: "controls", "default": true }, id: { type: "number" }, loop: { type: "boolean", source: "attribute", selector: "video", attribute: "loop" }, muted: { type: "boolean", source: "attribute", selector: "video", attribute: "muted" }, poster: { type: "string", source: "attribute", selector: "video", attribute: "poster" }, preload: { type: "string", source: "attribute", selector: "video", attribute: "preload", "default": "metadata" }, src: { type: "string", source: "attribute", selector: "video", attribute: "src" }, playsInline: { type: "boolean", source: "attribute", selector: "video", attribute: "playsinline" }, tracks: { type: "array", items: { type: "object" }, "default": [] } }, supports: { anchor: true, align: true }, editorStyle: "wp-block-video-editor", style: "wp-block-video" }; var video_name = video_metadata.name; var video_settings = { title: Object(external_wp_i18n_["_x"])('Video', 'block title'), description: Object(external_wp_i18n_["__"])('Embed a video from your media library or upload a new one.'), icon: library_video, keywords: [Object(external_wp_i18n_["__"])('movie')], example: { attributes: { src: 'https://upload.wikimedia.org/wikipedia/commons/c/ca/Wood_thrush_in_Central_Park_switch_sides_%2816510%29.webm', // translators: Caption accompanying a video of the wood thrush singing, which serves as an example for the Video block. caption: Object(external_wp_i18n_["__"])('Wood thrush singing in Central Park, NYC.') } }, transforms: video_transforms, edit: video_edit, save: video_save_save }; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/tag.js /** * WordPress dependencies */ var tag_tag = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M20.1 11.2l-6.7-6.7c-.1-.1-.3-.2-.5-.2H5c-.4-.1-.8.3-.8.7v7.8c0 .2.1.4.2.5l6.7 6.7c.2.2.5.4.7.5s.6.2.9.2c.3 0 .6-.1.9-.2.3-.1.5-.3.8-.5l5.6-5.6c.4-.4.7-1 .7-1.6.1-.6-.2-1.2-.6-1.6zM19 13.4L13.4 19c-.1.1-.2.1-.3.2-.2.1-.4.1-.6 0-.1 0-.2-.1-.3-.2l-6.5-6.5V5.8h6.8l6.5 6.5c.2.2.2.4.2.6 0 .1 0 .3-.2.5zM9 8c-.6 0-1 .4-1 1s.4 1 1 1 1-.4 1-1-.4-1-1-1z" })); /* harmony default export */ var library_tag = (tag_tag); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/tag-cloud/edit.js /** * External dependencies */ /** * WordPress dependencies */ function TagCloudEdit(_ref) { var attributes = _ref.attributes, setAttributes = _ref.setAttributes, taxonomies = _ref.taxonomies; var taxonomy = attributes.taxonomy, showTagCounts = attributes.showTagCounts; var getTaxonomyOptions = function getTaxonomyOptions() { var selectOption = { label: Object(external_wp_i18n_["__"])('- Select -'), value: '', disabled: true }; var taxonomyOptions = Object(external_lodash_["map"])(Object(external_lodash_["filter"])(taxonomies, 'show_cloud'), function (item) { return { value: item.slug, label: item.name }; }); return [selectOption].concat(Object(toConsumableArray["a" /* default */])(taxonomyOptions)); }; var inspectorControls = Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], { title: Object(external_wp_i18n_["__"])('Tag Cloud settings') }, Object(external_wp_element_["createElement"])(external_wp_components_["SelectControl"], { label: Object(external_wp_i18n_["__"])('Taxonomy'), options: getTaxonomyOptions(), value: taxonomy, onChange: function onChange(selectedTaxonomy) { return setAttributes({ taxonomy: selectedTaxonomy }); } }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { label: Object(external_wp_i18n_["__"])('Show post counts'), checked: showTagCounts, onChange: function onChange() { return setAttributes({ showTagCounts: !showTagCounts }); } }))); return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, inspectorControls, Object(external_wp_element_["createElement"])("div", Object(external_wp_blockEditor_["useBlockProps"])(), Object(external_wp_element_["createElement"])(external_wp_serverSideRender_default.a, { key: "tag-cloud", block: "core/tag-cloud", attributes: attributes }))); } /* harmony default export */ var tag_cloud_edit = (Object(external_wp_data_["withSelect"])(function (select) { return { taxonomies: select('core').getTaxonomies({ per_page: -1 }) }; })(TagCloudEdit)); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/tag-cloud/index.js /** * WordPress dependencies */ /** * Internal dependencies */ var tag_cloud_metadata = { apiVersion: 2, name: "core/tag-cloud", category: "widgets", attributes: { taxonomy: { type: "string", "default": "post_tag" }, showTagCounts: { type: "boolean", "default": false } }, supports: { html: false, align: true }, editorStyle: "wp-block-tag-cloud-editor" }; var tag_cloud_name = tag_cloud_metadata.name; var tag_cloud_settings = { title: Object(external_wp_i18n_["_x"])('Tag Cloud', 'block title'), description: Object(external_wp_i18n_["__"])('A cloud of your most used tags.'), icon: library_tag, example: {}, edit: tag_cloud_edit }; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/classic.js /** * WordPress dependencies */ var classic = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M20 6H4c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H4c-.3 0-.5-.2-.5-.5V8c0-.3.2-.5.5-.5h16c.3 0 .5.2.5.5v9zM10 10H8v2h2v-2zm-5 2h2v-2H5v2zm8-2h-2v2h2v-2zm-5 6h8v-2H8v2zm6-4h2v-2h-2v2zm3 0h2v-2h-2v2zm0 4h2v-2h-2v2zM5 16h2v-2H5v2z" })); /* harmony default export */ var library_classic = (classic); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/freeform/convert-to-blocks-button.js /** * WordPress dependencies */ var convert_to_blocks_button_ConvertToBlocksButton = function ConvertToBlocksButton(_ref) { var clientId = _ref.clientId; var _useDispatch = Object(external_wp_data_["useDispatch"])('core/block-editor'), replaceBlocks = _useDispatch.replaceBlocks; var block = Object(external_wp_data_["useSelect"])(function (select) { return select('core/block-editor').getBlock(clientId); }, [clientId]); return Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], { onClick: function onClick() { return replaceBlocks(block.clientId, Object(external_wp_blocks_["rawHandler"])({ HTML: Object(external_wp_blocks_["serialize"])(block) })); } }, Object(external_wp_i18n_["__"])('Convert to blocks')); }; /* harmony default export */ var convert_to_blocks_button = (convert_to_blocks_button_ConvertToBlocksButton); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/freeform/edit.js function freeform_edit_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 freeform_edit_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { freeform_edit_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { freeform_edit_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ var edit_window = window, edit_wp = edit_window.wp; function isTmceEmpty(editor) { // When tinyMce is empty the content seems to be: //