[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/js/dist/ -> block-library.js (source)

   1  this["wp"] = this["wp"] || {}; this["wp"]["blockLibrary"] =
   2  /******/ (function(modules) { // webpackBootstrap
   3  /******/     // The module cache
   4  /******/     var installedModules = {};
   5  /******/
   6  /******/     // The require function
   7  /******/ 	function __webpack_require__(moduleId) {
   8  /******/
   9  /******/         // Check if module is in cache
  10  /******/         if(installedModules[moduleId]) {
  11  /******/             return installedModules[moduleId].exports;
  12  /******/         }
  13  /******/         // Create a new module (and put it into the cache)
  14  /******/         var module = installedModules[moduleId] = {
  15  /******/             i: moduleId,
  16  /******/             l: false,
  17  /******/             exports: {}
  18  /******/         };
  19  /******/
  20  /******/         // Execute the module function
  21  /******/         modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  22  /******/
  23  /******/         // Flag the module as loaded
  24  /******/         module.l = true;
  25  /******/
  26  /******/         // Return the exports of the module
  27  /******/         return module.exports;
  28  /******/     }
  29  /******/
  30  /******/
  31  /******/     // expose the modules object (__webpack_modules__)
  32  /******/     __webpack_require__.m = modules;
  33  /******/
  34  /******/     // expose the module cache
  35  /******/     __webpack_require__.c = installedModules;
  36  /******/
  37  /******/     // define getter function for harmony exports
  38  /******/     __webpack_require__.d = function(exports, name, getter) {
  39  /******/         if(!__webpack_require__.o(exports, name)) {
  40  /******/             Object.defineProperty(exports, name, { enumerable: true, get: getter });
  41  /******/         }
  42  /******/     };
  43  /******/
  44  /******/     // define __esModule on exports
  45  /******/     __webpack_require__.r = function(exports) {
  46  /******/         if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  47  /******/             Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  48  /******/         }
  49  /******/         Object.defineProperty(exports, '__esModule', { value: true });
  50  /******/     };
  51  /******/
  52  /******/     // create a fake namespace object
  53  /******/     // mode & 1: value is a module id, require it
  54  /******/     // mode & 2: merge all properties of value into the ns
  55  /******/     // mode & 4: return value when already ns object
  56  /******/     // mode & 8|1: behave like require
  57  /******/     __webpack_require__.t = function(value, mode) {
  58  /******/         if(mode & 1) value = __webpack_require__(value);
  59  /******/         if(mode & 8) return value;
  60  /******/         if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  61  /******/         var ns = Object.create(null);
  62  /******/         __webpack_require__.r(ns);
  63  /******/         Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  64  /******/         if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  65  /******/         return ns;
  66  /******/     };
  67  /******/
  68  /******/     // getDefaultExport function for compatibility with non-harmony modules
  69  /******/     __webpack_require__.n = function(module) {
  70  /******/         var getter = module && module.__esModule ?
  71  /******/ 			function getDefault() { return module['default']; } :
  72  /******/ 			function getModuleExports() { return module; };
  73  /******/         __webpack_require__.d(getter, 'a', getter);
  74  /******/         return getter;
  75  /******/     };
  76  /******/
  77  /******/     // Object.prototype.hasOwnProperty.call
  78  /******/     __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  79  /******/
  80  /******/     // __webpack_public_path__
  81  /******/     __webpack_require__.p = "";
  82  /******/
  83  /******/
  84  /******/     // Load entry module and return exports
  85  /******/     return __webpack_require__(__webpack_require__.s = 454);
  86  /******/ })
  87  /************************************************************************/
  88  /******/ ({
  89  
  90  /***/ 0:
  91  /***/ (function(module, exports) {
  92  
  93  (function() { module.exports = this["wp"]["element"]; }());
  94  
  95  /***/ }),
  96  
  97  /***/ 1:
  98  /***/ (function(module, exports) {
  99  
 100  (function() { module.exports = this["wp"]["i18n"]; }());
 101  
 102  /***/ }),
 103  
 104  /***/ 10:
 105  /***/ (function(module, exports) {
 106  
 107  (function() { module.exports = this["wp"]["compose"]; }());
 108  
 109  /***/ }),
 110  
 111  /***/ 101:
 112  /***/ (function(module, exports) {
 113  
 114  (function() { module.exports = this["wp"]["viewport"]; }());
 115  
 116  /***/ }),
 117  
 118  /***/ 105:
 119  /***/ (function(module, exports) {
 120  
 121  (function() { module.exports = this["wp"]["autop"]; }());
 122  
 123  /***/ }),
 124  
 125  /***/ 11:
 126  /***/ (function(module, exports) {
 127  
 128  (function() { module.exports = this["wp"]["blocks"]; }());
 129  
 130  /***/ }),
 131  
 132  /***/ 117:
 133  /***/ (function(module, exports, __webpack_require__) {
 134  
 135  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
 136    Copyright (c) 2017 Jed Watson.
 137    Licensed under the MIT License (MIT), see
 138    http://jedwatson.github.io/classnames
 139  */
 140  /* global define */
 141  
 142  (function () {
 143      'use strict';
 144  
 145      var classNames = (function () {
 146          // don't inherit from Object so we can skip hasOwnProperty check later
 147          // http://stackoverflow.com/questions/15518328/creating-js-object-with-object-createnull#answer-21079232
 148  		function StorageObject() {}
 149          StorageObject.prototype = Object.create(null);
 150  
 151  		function _parseArray (resultSet, array) {
 152              var length = array.length;
 153  
 154              for (var i = 0; i < length; ++i) {
 155                  _parse(resultSet, array[i]);
 156              }
 157          }
 158  
 159          var hasOwn = {}.hasOwnProperty;
 160  
 161  		function _parseNumber (resultSet, num) {
 162              resultSet[num] = true;
 163          }
 164  
 165  		function _parseObject (resultSet, object) {
 166              for (var k in object) {
 167                  if (hasOwn.call(object, k)) {
 168                      // set value to false instead of deleting it to avoid changing object structure
 169                      // https://www.smashingmagazine.com/2012/11/writing-fast-memory-efficient-javascript/#de-referencing-misconceptions
 170                      resultSet[k] = !!object[k];
 171                  }
 172              }
 173          }
 174  
 175          var SPACE = /\s+/;
 176  		function _parseString (resultSet, str) {
 177              var array = str.split(SPACE);
 178              var length = array.length;
 179  
 180              for (var i = 0; i < length; ++i) {
 181                  resultSet[array[i]] = true;
 182              }
 183          }
 184  
 185  		function _parse (resultSet, arg) {
 186              if (!arg) return;
 187              var argType = typeof arg;
 188  
 189              // 'foo bar'
 190              if (argType === 'string') {
 191                  _parseString(resultSet, arg);
 192  
 193              // ['foo', 'bar', ...]
 194              } else if (Array.isArray(arg)) {
 195                  _parseArray(resultSet, arg);
 196  
 197              // { 'foo': true, ... }
 198              } else if (argType === 'object') {
 199                  _parseObject(resultSet, arg);
 200  
 201              // '130'
 202              } else if (argType === 'number') {
 203                  _parseNumber(resultSet, arg);
 204              }
 205          }
 206  
 207  		function _classNames () {
 208              // don't leak arguments
 209              // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments
 210              var len = arguments.length;
 211              var args = Array(len);
 212              for (var i = 0; i < len; i++) {
 213                  args[i] = arguments[i];
 214              }
 215  
 216              var classSet = new StorageObject();
 217              _parseArray(classSet, args);
 218  
 219              var list = [];
 220  
 221              for (var k in classSet) {
 222                  if (classSet[k]) {
 223                      list.push(k)
 224                  }
 225              }
 226  
 227              return list.join(' ');
 228          }
 229  
 230          return _classNames;
 231      })();
 232  
 233      if ( true && module.exports) {
 234          classNames.default = classNames;
 235          module.exports = classNames;
 236      } else if (true) {
 237          // register as 'classnames', consistent with npm package name
 238          !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
 239              return classNames;
 240          }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
 241                  __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
 242      } else {}
 243  }());
 244  
 245  
 246  /***/ }),
 247  
 248  /***/ 12:
 249  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 250  
 251  "use strict";
 252  
 253  // EXPORTS
 254  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _slicedToArray; });
 255  
 256  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
 257  var arrayWithHoles = __webpack_require__(38);
 258  
 259  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
 260  function _iterableToArrayLimit(arr, i) {
 261    if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
 262    var _arr = [];
 263    var _n = true;
 264    var _d = false;
 265    var _e = undefined;
 266  
 267    try {
 268      for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
 269        _arr.push(_s.value);
 270  
 271        if (i && _arr.length === i) break;
 272      }
 273    } catch (err) {
 274      _d = true;
 275      _e = err;
 276    } finally {
 277      try {
 278        if (!_n && _i["return"] != null) _i["return"]();
 279      } finally {
 280        if (_d) throw _e;
 281      }
 282    }
 283  
 284    return _arr;
 285  }
 286  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
 287  var unsupportedIterableToArray = __webpack_require__(30);
 288  
 289  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
 290  var nonIterableRest = __webpack_require__(39);
 291  
 292  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
 293  
 294  
 295  
 296  
 297  function _slicedToArray(arr, i) {
 298    return Object(arrayWithHoles["a" /* default */])(arr) || _iterableToArrayLimit(arr, i) || Object(unsupportedIterableToArray["a" /* default */])(arr, i) || Object(nonIterableRest["a" /* default */])();
 299  }
 300  
 301  /***/ }),
 302  
 303  /***/ 121:
 304  /***/ (function(module, exports) {
 305  
 306  (function() { module.exports = this["wp"]["reusableBlocks"]; }());
 307  
 308  /***/ }),
 309  
 310  /***/ 13:
 311  /***/ (function(module, exports) {
 312  
 313  (function() { module.exports = this["React"]; }());
 314  
 315  /***/ }),
 316  
 317  /***/ 14:
 318  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 319  
 320  "use strict";
 321  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutProperties; });
 322  /* harmony import */ var _objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(43);
 323  
 324  function _objectWithoutProperties(source, excluded) {
 325    if (source == null) return {};
 326    var target = Object(_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(source, excluded);
 327    var key, i;
 328  
 329    if (Object.getOwnPropertySymbols) {
 330      var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
 331  
 332      for (i = 0; i < sourceSymbolKeys.length; i++) {
 333        key = sourceSymbolKeys[i];
 334        if (excluded.indexOf(key) >= 0) continue;
 335        if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
 336        target[key] = source[key];
 337      }
 338    }
 339  
 340    return target;
 341  }
 342  
 343  /***/ }),
 344  
 345  /***/ 141:
 346  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 347  
 348  "use strict";
 349  /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
 350  /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(14);
 351  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(0);
 352  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__);
 353  
 354  
 355  
 356  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; }
 357  
 358  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; }
 359  
 360  /**
 361   * WordPress dependencies
 362   */
 363  
 364  /** @typedef {{icon: JSX.Element, size?: number} & import('@wordpress/primitives').SVGProps} IconProps */
 365  
 366  /**
 367   * Return an SVG icon.
 368   *
 369   * @param {IconProps} props icon is the SVG component to render
 370   *                          size is a number specifiying the icon size in pixels
 371   *                          Other props will be passed to wrapped SVG component
 372   *
 373   * @return {JSX.Element}  Icon component
 374   */
 375  
 376  function Icon(_ref) {
 377    var icon = _ref.icon,
 378        _ref$size = _ref.size,
 379        size = _ref$size === void 0 ? 24 : _ref$size,
 380        props = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_ref, ["icon", "size"]);
 381  
 382    return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["cloneElement"])(icon, _objectSpread({
 383      width: size,
 384      height: size
 385    }, props));
 386  }
 387  
 388  /* harmony default export */ __webpack_exports__["a"] = (Icon);
 389  
 390  
 391  /***/ }),
 392  
 393  /***/ 159:
 394  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 395  
 396  "use strict";
 397  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
 398  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
 399  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
 400  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
 401  
 402  
 403  /**
 404   * WordPress dependencies
 405   */
 406  
 407  var closeSmall = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 408    xmlns: "http://www.w3.org/2000/svg",
 409    viewBox: "0 0 24 24"
 410  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 411    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"
 412  }));
 413  /* harmony default export */ __webpack_exports__["a"] = (closeSmall);
 414  
 415  
 416  /***/ }),
 417  
 418  /***/ 16:
 419  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 420  
 421  "use strict";
 422  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _assertThisInitialized; });
 423  function _assertThisInitialized(self) {
 424    if (self === void 0) {
 425      throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
 426    }
 427  
 428    return self;
 429  }
 430  
 431  /***/ }),
 432  
 433  /***/ 161:
 434  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 435  
 436  "use strict";
 437  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
 438  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
 439  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
 440  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
 441  
 442  
 443  /**
 444   * WordPress dependencies
 445   */
 446  
 447  var check = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 448    xmlns: "http://www.w3.org/2000/svg",
 449    viewBox: "0 0 24 24"
 450  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 451    d: "M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"
 452  }));
 453  /* harmony default export */ __webpack_exports__["a"] = (check);
 454  
 455  
 456  /***/ }),
 457  
 458  /***/ 17:
 459  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 460  
 461  "use strict";
 462  
 463  // EXPORTS
 464  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _toConsumableArray; });
 465  
 466  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
 467  var arrayLikeToArray = __webpack_require__(27);
 468  
 469  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
 470  
 471  function _arrayWithoutHoles(arr) {
 472    if (Array.isArray(arr)) return Object(arrayLikeToArray["a" /* default */])(arr);
 473  }
 474  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
 475  var iterableToArray = __webpack_require__(37);
 476  
 477  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
 478  var unsupportedIterableToArray = __webpack_require__(30);
 479  
 480  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
 481  function _nonIterableSpread() {
 482    throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
 483  }
 484  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
 485  
 486  
 487  
 488  
 489  function _toConsumableArray(arr) {
 490    return _arrayWithoutHoles(arr) || Object(iterableToArray["a" /* default */])(arr) || Object(unsupportedIterableToArray["a" /* default */])(arr) || _nonIterableSpread();
 491  }
 492  
 493  /***/ }),
 494  
 495  /***/ 18:
 496  /***/ (function(module, exports) {
 497  
 498  (function() { module.exports = this["wp"]["keycodes"]; }());
 499  
 500  /***/ }),
 501  
 502  /***/ 186:
 503  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 504  
 505  "use strict";
 506  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
 507  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
 508  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
 509  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
 510  
 511  
 512  /**
 513   * WordPress dependencies
 514   */
 515  
 516  var link = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 517    xmlns: "http://www.w3.org/2000/svg",
 518    viewBox: "0 0 24 24"
 519  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 520    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"
 521  }));
 522  /* harmony default export */ __webpack_exports__["a"] = (link);
 523  
 524  
 525  /***/ }),
 526  
 527  /***/ 19:
 528  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 529  
 530  "use strict";
 531  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _getPrototypeOf; });
 532  function _getPrototypeOf(o) {
 533    _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
 534      return o.__proto__ || Object.getPrototypeOf(o);
 535    };
 536    return _getPrototypeOf(o);
 537  }
 538  
 539  /***/ }),
 540  
 541  /***/ 2:
 542  /***/ (function(module, exports) {
 543  
 544  (function() { module.exports = this["lodash"]; }());
 545  
 546  /***/ }),
 547  
 548  /***/ 20:
 549  /***/ (function(module, exports) {
 550  
 551  (function() { module.exports = this["regeneratorRuntime"]; }());
 552  
 553  /***/ }),
 554  
 555  /***/ 21:
 556  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 557  
 558  "use strict";
 559  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _classCallCheck; });
 560  function _classCallCheck(instance, Constructor) {
 561    if (!(instance instanceof Constructor)) {
 562      throw new TypeError("Cannot call a class as a function");
 563    }
 564  }
 565  
 566  /***/ }),
 567  
 568  /***/ 214:
 569  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 570  
 571  "use strict";
 572  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
 573  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
 574  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
 575  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
 576  
 577  
 578  /**
 579   * WordPress dependencies
 580   */
 581  
 582  var chevronRight = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 583    xmlns: "http://www.w3.org/2000/svg",
 584    viewBox: "0 0 24 24"
 585  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 586    d: "M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"
 587  }));
 588  /* harmony default export */ __webpack_exports__["a"] = (chevronRight);
 589  
 590  
 591  /***/ }),
 592  
 593  /***/ 215:
 594  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 595  
 596  "use strict";
 597  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
 598  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
 599  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
 600  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
 601  
 602  
 603  /**
 604   * WordPress dependencies
 605   */
 606  
 607  var chevronLeft = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 608    xmlns: "http://www.w3.org/2000/svg",
 609    viewBox: "0 0 24 24"
 610  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 611    d: "M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"
 612  }));
 613  /* harmony default export */ __webpack_exports__["a"] = (chevronLeft);
 614  
 615  
 616  /***/ }),
 617  
 618  /***/ 216:
 619  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 620  
 621  "use strict";
 622  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
 623  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
 624  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
 625  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
 626  
 627  
 628  /**
 629   * WordPress dependencies
 630   */
 631  
 632  var keyboardReturn = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 633    xmlns: "http://www.w3.org/2000/svg",
 634    viewBox: "-2 -2 24 24"
 635  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 636    d: "M16 4h2v9H7v3l-5-4 5-4v3h9V4z"
 637  }));
 638  /* harmony default export */ __webpack_exports__["a"] = (keyboardReturn);
 639  
 640  
 641  /***/ }),
 642  
 643  /***/ 217:
 644  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 645  
 646  "use strict";
 647  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
 648  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
 649  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
 650  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
 651  
 652  
 653  /**
 654   * WordPress dependencies
 655   */
 656  
 657  var upload = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 658    xmlns: "http://www.w3.org/2000/svg",
 659    viewBox: "0 0 24 24"
 660  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 661    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"
 662  }));
 663  /* harmony default export */ __webpack_exports__["a"] = (upload);
 664  
 665  
 666  /***/ }),
 667  
 668  /***/ 218:
 669  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 670  
 671  "use strict";
 672  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
 673  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
 674  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
 675  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
 676  
 677  
 678  /**
 679   * WordPress dependencies
 680   */
 681  
 682  var linkOff = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
 683    xmlns: "http://www.w3.org/2000/svg",
 684    viewBox: "0 0 24 24"
 685  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
 686    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"
 687  }));
 688  /* harmony default export */ __webpack_exports__["a"] = (linkOff);
 689  
 690  
 691  /***/ }),
 692  
 693  /***/ 22:
 694  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 695  
 696  "use strict";
 697  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _createClass; });
 698  function _defineProperties(target, props) {
 699    for (var i = 0; i < props.length; i++) {
 700      var descriptor = props[i];
 701      descriptor.enumerable = descriptor.enumerable || false;
 702      descriptor.configurable = true;
 703      if ("value" in descriptor) descriptor.writable = true;
 704      Object.defineProperty(target, descriptor.key, descriptor);
 705    }
 706  }
 707  
 708  function _createClass(Constructor, protoProps, staticProps) {
 709    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
 710    if (staticProps) _defineProperties(Constructor, staticProps);
 711    return Constructor;
 712  }
 713  
 714  /***/ }),
 715  
 716  /***/ 23:
 717  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 718  
 719  "use strict";
 720  
 721  // EXPORTS
 722  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _inherits; });
 723  
 724  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
 725  function _setPrototypeOf(o, p) {
 726    _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
 727      o.__proto__ = p;
 728      return o;
 729    };
 730  
 731    return _setPrototypeOf(o, p);
 732  }
 733  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
 734  
 735  function _inherits(subClass, superClass) {
 736    if (typeof superClass !== "function" && superClass !== null) {
 737      throw new TypeError("Super expression must either be null or a function");
 738    }
 739  
 740    subClass.prototype = Object.create(superClass && superClass.prototype, {
 741      constructor: {
 742        value: subClass,
 743        writable: true,
 744        configurable: true
 745      }
 746    });
 747    if (superClass) _setPrototypeOf(subClass, superClass);
 748  }
 749  
 750  /***/ }),
 751  
 752  /***/ 24:
 753  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 754  
 755  "use strict";
 756  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _possibleConstructorReturn; });
 757  /* harmony import */ var _helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(40);
 758  /* harmony import */ var _assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16);
 759  
 760  
 761  function _possibleConstructorReturn(self, call) {
 762    if (call && (Object(_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(call) === "object" || typeof call === "function")) {
 763      return call;
 764    }
 765  
 766    return Object(_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(self);
 767  }
 768  
 769  /***/ }),
 770  
 771  /***/ 25:
 772  /***/ (function(module, exports) {
 773  
 774  (function() { module.exports = this["wp"]["richText"]; }());
 775  
 776  /***/ }),
 777  
 778  /***/ 27:
 779  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 780  
 781  "use strict";
 782  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayLikeToArray; });
 783  function _arrayLikeToArray(arr, len) {
 784    if (len == null || len > arr.length) len = arr.length;
 785  
 786    for (var i = 0, arr2 = new Array(len); i < len; i++) {
 787      arr2[i] = arr[i];
 788    }
 789  
 790    return arr2;
 791  }
 792  
 793  /***/ }),
 794  
 795  /***/ 274:
 796  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 797  
 798  "use strict";
 799  
 800  // EXTERNAL MODULE: external {"this":["wp","element"]}
 801  var external_this_wp_element_ = __webpack_require__(0);
 802  
 803  // EXTERNAL MODULE: external {"this":["wp","primitives"]}
 804  var external_this_wp_primitives_ = __webpack_require__(7);
 805  
 806  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/pencil.js
 807  
 808  
 809  /**
 810   * WordPress dependencies
 811   */
 812  
 813  var pencil = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
 814    xmlns: "http://www.w3.org/2000/svg",
 815    viewBox: "0 0 24 24"
 816  }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
 817    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"
 818  }));
 819  /* harmony default export */ var library_pencil = (pencil);
 820  
 821  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/edit.js
 822  /**
 823   * Internal dependencies
 824   */
 825  
 826  /* harmony default export */ var edit = __webpack_exports__["a"] = (library_pencil);
 827  
 828  
 829  /***/ }),
 830  
 831  /***/ 282:
 832  /***/ (function(module, exports, __webpack_require__) {
 833  
 834  /*! Fast Average Color | © 2019 Denis Seleznev | MIT License | https://github.com/hcodes/fast-average-color/ */
 835  (function (global, factory) {
 836       true ? module.exports = factory() :
 837      undefined;
 838  }(this, (function () { 'use strict';
 839  
 840  function _classCallCheck(instance, Constructor) {
 841    if (!(instance instanceof Constructor)) {
 842      throw new TypeError("Cannot call a class as a function");
 843    }
 844  }
 845  
 846  function _defineProperties(target, props) {
 847    for (var i = 0; i < props.length; i++) {
 848      var descriptor = props[i];
 849      descriptor.enumerable = descriptor.enumerable || false;
 850      descriptor.configurable = true;
 851      if ("value" in descriptor) descriptor.writable = true;
 852      Object.defineProperty(target, descriptor.key, descriptor);
 853    }
 854  }
 855  
 856  function _createClass(Constructor, protoProps, staticProps) {
 857    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
 858    if (staticProps) _defineProperties(Constructor, staticProps);
 859    return Constructor;
 860  }
 861  
 862  function _slicedToArray(arr, i) {
 863    return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
 864  }
 865  
 866  function _arrayWithHoles(arr) {
 867    if (Array.isArray(arr)) return arr;
 868  }
 869  
 870  function _iterableToArrayLimit(arr, i) {
 871    var _arr = [];
 872    var _n = true;
 873    var _d = false;
 874    var _e = undefined;
 875  
 876    try {
 877      for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
 878        _arr.push(_s.value);
 879  
 880        if (i && _arr.length === i) break;
 881      }
 882    } catch (err) {
 883      _d = true;
 884      _e = err;
 885    } finally {
 886      try {
 887        if (!_n && _i["return"] != null) _i["return"]();
 888      } finally {
 889        if (_d) throw _e;
 890      }
 891    }
 892  
 893    return _arr;
 894  }
 895  
 896  function _nonIterableRest() {
 897    throw new TypeError("Invalid attempt to destructure non-iterable instance");
 898  }
 899  
 900  var FastAverageColor =
 901  /*#__PURE__*/
 902  function () {
 903    function FastAverageColor() {
 904      _classCallCheck(this, FastAverageColor);
 905    }
 906  
 907    _createClass(FastAverageColor, [{
 908      key: "getColorAsync",
 909  
 910      /**
 911       * Get asynchronously the average color from not loaded image.
 912       *
 913       * @param {HTMLImageElement} resource
 914       * @param {Function} callback
 915       * @param {Object|null} [options]
 916       * @param {Array}  [options.defaultColor=[255, 255, 255, 255]]
 917       * @param {*}      [options.data]
 918       * @param {string} [options.mode="speed"] "precision" or "speed"
 919       * @param {string} [options.algorithm="sqrt"] "simple", "sqrt" or "dominant"
 920       * @param {number} [options.step=1]
 921       * @param {number} [options.left=0]
 922       * @param {number} [options.top=0]
 923       * @param {number} [options.width=width of resource]
 924       * @param {number} [options.height=height of resource]
 925       */
 926      value: function getColorAsync(resource, callback, options) {
 927        if (resource.complete) {
 928          callback.call(resource, this.getColor(resource, options), options && options.data);
 929        } else {
 930          this._bindImageEvents(resource, callback, options);
 931        }
 932      }
 933      /**
 934       * Get the average color from images, videos and canvas.
 935       *
 936       * @param {HTMLImageElement|HTMLVideoElement|HTMLCanvasElement} resource
 937       * @param {Object|null} [options]
 938       * @param {Array}  [options.defaultColor=[255, 255, 255, 255]]
 939       * @param {*}      [options.data]
 940       * @param {string} [options.mode="speed"] "precision" or "speed"
 941       * @param {string} [options.algorithm="sqrt"] "simple", "sqrt" or "dominant"
 942       * @param {number} [options.step=1]
 943       * @param {number} [options.left=0]
 944       * @param {number} [options.top=0]
 945       * @param {number} [options.width=width of resource]
 946       * @param {number} [options.height=height of resource]
 947       *
 948       * @returns {Object}
 949       */
 950  
 951    }, {
 952      key: "getColor",
 953      value: function getColor(resource, options) {
 954        options = options || {};
 955  
 956        var defaultColor = this._getDefaultColor(options),
 957            originalSize = this._getOriginalSize(resource),
 958            size = this._prepareSizeAndPosition(originalSize, options);
 959  
 960        var error = null,
 961            value = defaultColor;
 962  
 963        if (!size.srcWidth || !size.srcHeight || !size.destWidth || !size.destHeight) {
 964          return this._prepareResult(defaultColor, new Error('FastAverageColor: Incorrect sizes.'));
 965        }
 966  
 967        if (!this._ctx) {
 968          this._canvas = this._makeCanvas();
 969          this._ctx = this._canvas.getContext && this._canvas.getContext('2d');
 970  
 971          if (!this._ctx) {
 972            return this._prepareResult(defaultColor, new Error('FastAverageColor: Canvas Context 2D is not supported in this browser.'));
 973          }
 974        }
 975  
 976        this._canvas.width = size.destWidth;
 977        this._canvas.height = size.destHeight;
 978  
 979        try {
 980          this._ctx.clearRect(0, 0, size.destWidth, size.destHeight);
 981  
 982          this._ctx.drawImage(resource, size.srcLeft, size.srcTop, size.srcWidth, size.srcHeight, 0, 0, size.destWidth, size.destHeight);
 983  
 984          var bitmapData = this._ctx.getImageData(0, 0, size.destWidth, size.destHeight).data;
 985  
 986          value = this.getColorFromArray4(bitmapData, options);
 987        } catch (e) {
 988          // Security error, CORS
 989          // https://developer.mozilla.org/en/docs/Web/HTML/CORS_enabled_image
 990          error = e;
 991        }
 992  
 993        return this._prepareResult(value, error);
 994      }
 995      /**
 996       * Get the average color from a array when 1 pixel is 4 bytes.
 997       *
 998       * @param {Array|Uint8Array} arr
 999       * @param {Object} [options]
1000       * @param {string} [options.algorithm="sqrt"] "simple", "sqrt" or "dominant"
1001       * @param {Array}  [options.defaultColor=[255, 255, 255, 255]]
1002       * @param {number} [options.step=1]
1003       *
1004       * @returns {Array} [red (0-255), green (0-255), blue (0-255), alpha (0-255)]
1005       */
1006  
1007    }, {
1008      key: "getColorFromArray4",
1009      value: function getColorFromArray4(arr, options) {
1010        options = options || {};
1011        var bytesPerPixel = 4,
1012            arrLength = arr.length;
1013  
1014        if (arrLength < bytesPerPixel) {
1015          return this._getDefaultColor(options);
1016        }
1017  
1018        var len = arrLength - arrLength % bytesPerPixel,
1019            preparedStep = (options.step || 1) * bytesPerPixel,
1020            algorithm = '_' + (options.algorithm || 'sqrt') + 'Algorithm';
1021  
1022        if (typeof this[algorithm] !== 'function') {
1023          throw new Error("FastAverageColor: ".concat(options.algorithm, " is unknown algorithm."));
1024        }
1025  
1026        return this[algorithm](arr, len, preparedStep);
1027      }
1028      /**
1029       * Destroy the instance.
1030       */
1031  
1032    }, {
1033      key: "destroy",
1034      value: function destroy() {
1035        delete this._canvas;
1036        delete this._ctx;
1037      }
1038    }, {
1039      key: "_getDefaultColor",
1040      value: function _getDefaultColor(options) {
1041        return this._getOption(options, 'defaultColor', [255, 255, 255, 255]);
1042      }
1043    }, {
1044      key: "_getOption",
1045      value: function _getOption(options, name, defaultValue) {
1046        return typeof options[name] === 'undefined' ? defaultValue : options[name];
1047      }
1048    }, {
1049      key: "_prepareSizeAndPosition",
1050      value: function _prepareSizeAndPosition(originalSize, options) {
1051        var srcLeft = this._getOption(options, 'left', 0),
1052            srcTop = this._getOption(options, 'top', 0),
1053            srcWidth = this._getOption(options, 'width', originalSize.width),
1054            srcHeight = this._getOption(options, 'height', originalSize.height),
1055            destWidth = srcWidth,
1056            destHeight = srcHeight;
1057  
1058        if (options.mode === 'precision') {
1059          return {
1060            srcLeft: srcLeft,
1061            srcTop: srcTop,
1062            srcWidth: srcWidth,
1063            srcHeight: srcHeight,
1064            destWidth: destWidth,
1065            destHeight: destHeight
1066          };
1067        }
1068  
1069        var maxSize = 100,
1070            minSize = 10;
1071        var factor;
1072  
1073        if (srcWidth > srcHeight) {
1074          factor = srcWidth / srcHeight;
1075          destWidth = maxSize;
1076          destHeight = Math.round(destWidth / factor);
1077        } else {
1078          factor = srcHeight / srcWidth;
1079          destHeight = maxSize;
1080          destWidth = Math.round(destHeight / factor);
1081        }
1082  
1083        if (destWidth > srcWidth || destHeight > srcHeight || destWidth < minSize || destHeight < minSize) {
1084          destWidth = srcWidth;
1085          destHeight = srcHeight;
1086        }
1087  
1088        return {
1089          srcLeft: srcLeft,
1090          srcTop: srcTop,
1091          srcWidth: srcWidth,
1092          srcHeight: srcHeight,
1093          destWidth: destWidth,
1094          destHeight: destHeight
1095        };
1096      }
1097    }, {
1098      key: "_simpleAlgorithm",
1099      value: function _simpleAlgorithm(arr, len, preparedStep) {
1100        var redTotal = 0,
1101            greenTotal = 0,
1102            blueTotal = 0,
1103            alphaTotal = 0,
1104            count = 0;
1105  
1106        for (var i = 0; i < len; i += preparedStep) {
1107          var alpha = arr[i + 3],
1108              red = arr[i] * alpha,
1109              green = arr[i + 1] * alpha,
1110              blue = arr[i + 2] * alpha;
1111          redTotal += red;
1112          greenTotal += green;
1113          blueTotal += blue;
1114          alphaTotal += alpha;
1115          count++;
1116        }
1117  
1118        return alphaTotal ? [Math.round(redTotal / alphaTotal), Math.round(greenTotal / alphaTotal), Math.round(blueTotal / alphaTotal), Math.round(alphaTotal / count)] : [0, 0, 0, 0];
1119      }
1120    }, {
1121      key: "_sqrtAlgorithm",
1122      value: function _sqrtAlgorithm(arr, len, preparedStep) {
1123        var redTotal = 0,
1124            greenTotal = 0,
1125            blueTotal = 0,
1126            alphaTotal = 0,
1127            count = 0;
1128  
1129        for (var i = 0; i < len; i += preparedStep) {
1130          var red = arr[i],
1131              green = arr[i + 1],
1132              blue = arr[i + 2],
1133              alpha = arr[i + 3];
1134          redTotal += red * red * alpha;
1135          greenTotal += green * green * alpha;
1136          blueTotal += blue * blue * alpha;
1137          alphaTotal += alpha;
1138          count++;
1139        }
1140  
1141        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];
1142      }
1143    }, {
1144      key: "_dominantAlgorithm",
1145      value: function _dominantAlgorithm(arr, len, preparedStep) {
1146        var colorHash = {},
1147            divider = 24;
1148  
1149        for (var i = 0; i < len; i += preparedStep) {
1150          var red = arr[i],
1151              green = arr[i + 1],
1152              blue = arr[i + 2],
1153              alpha = arr[i + 3],
1154              key = Math.round(red / divider) + ',' + Math.round(green / divider) + ',' + Math.round(blue / divider);
1155  
1156          if (colorHash[key]) {
1157            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];
1158          } else {
1159            colorHash[key] = [red * alpha, green * alpha, blue * alpha, alpha, 1];
1160          }
1161        }
1162  
1163        var buffer = Object.keys(colorHash).map(function (key) {
1164          return colorHash[key];
1165        }).sort(function (a, b) {
1166          var countA = a[4],
1167              countB = b[4];
1168          return countA > countB ? -1 : countA === countB ? 0 : 1;
1169        });
1170  
1171        var _buffer$ = _slicedToArray(buffer[0], 5),
1172            redTotal = _buffer$[0],
1173            greenTotal = _buffer$[1],
1174            blueTotal = _buffer$[2],
1175            alphaTotal = _buffer$[3],
1176            count = _buffer$[4];
1177  
1178        return alphaTotal ? [Math.round(redTotal / alphaTotal), Math.round(greenTotal / alphaTotal), Math.round(blueTotal / alphaTotal), Math.round(alphaTotal / count)] : [0, 0, 0, 0];
1179      }
1180    }, {
1181      key: "_bindImageEvents",
1182      value: function _bindImageEvents(resource, callback, options) {
1183        var _this = this;
1184  
1185        options = options || {};
1186  
1187        var data = options && options.data,
1188            defaultColor = this._getDefaultColor(options),
1189            onload = function onload() {
1190          unbindEvents();
1191          callback.call(resource, _this.getColor(resource, options), data);
1192        },
1193            onerror = function onerror() {
1194          unbindEvents();
1195          callback.call(resource, _this._prepareResult(defaultColor, new Error('Image error')), data);
1196        },
1197            onabort = function onabort() {
1198          unbindEvents();
1199          callback.call(resource, _this._prepareResult(defaultColor, new Error('Image abort')), data);
1200        },
1201            unbindEvents = function unbindEvents() {
1202          resource.removeEventListener('load', onload);
1203          resource.removeEventListener('error', onerror);
1204          resource.removeEventListener('abort', onabort);
1205        };
1206  
1207        resource.addEventListener('load', onload);
1208        resource.addEventListener('error', onerror);
1209        resource.addEventListener('abort', onabort);
1210      }
1211    }, {
1212      key: "_prepareResult",
1213      value: function _prepareResult(value, error) {
1214        var rgb = value.slice(0, 3),
1215            rgba = [].concat(rgb, value[3] / 255),
1216            isDark = this._isDark(value);
1217  
1218        return {
1219          error: error,
1220          value: value,
1221          rgb: 'rgb(' + rgb.join(',') + ')',
1222          rgba: 'rgba(' + rgba.join(',') + ')',
1223          hex: this._arrayToHex(rgb),
1224          hexa: this._arrayToHex(value),
1225          isDark: isDark,
1226          isLight: !isDark
1227        };
1228      }
1229    }, {
1230      key: "_getOriginalSize",
1231      value: function _getOriginalSize(resource) {
1232        if (resource instanceof HTMLImageElement) {
1233          return {
1234            width: resource.naturalWidth,
1235            height: resource.naturalHeight
1236          };
1237        }
1238  
1239        if (resource instanceof HTMLVideoElement) {
1240          return {
1241            width: resource.videoWidth,
1242            height: resource.videoHeight
1243          };
1244        }
1245  
1246        return {
1247          width: resource.width,
1248          height: resource.height
1249        };
1250      }
1251    }, {
1252      key: "_toHex",
1253      value: function _toHex(num) {
1254        var str = num.toString(16);
1255        return str.length === 1 ? '0' + str : str;
1256      }
1257    }, {
1258      key: "_arrayToHex",
1259      value: function _arrayToHex(arr) {
1260        return '#' + arr.map(this._toHex).join('');
1261      }
1262    }, {
1263      key: "_isDark",
1264      value: function _isDark(color) {
1265        // http://www.w3.org/TR/AERT#color-contrast
1266        var result = (color[0] * 299 + color[1] * 587 + color[2] * 114) / 1000;
1267        return result < 128;
1268      }
1269    }, {
1270      key: "_makeCanvas",
1271      value: function _makeCanvas() {
1272        return typeof window === 'undefined' ? new OffscreenCanvas(1, 1) : document.createElement('canvas');
1273      }
1274    }]);
1275  
1276    return FastAverageColor;
1277  }();
1278  
1279  return FastAverageColor;
1280  
1281  })));
1282  
1283  
1284  /***/ }),
1285  
1286  /***/ 3:
1287  /***/ (function(module, exports) {
1288  
1289  (function() { module.exports = this["wp"]["components"]; }());
1290  
1291  /***/ }),
1292  
1293  /***/ 30:
1294  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1295  
1296  "use strict";
1297  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _unsupportedIterableToArray; });
1298  /* harmony import */ var _arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27);
1299  
1300  function _unsupportedIterableToArray(o, minLen) {
1301    if (!o) return;
1302    if (typeof o === "string") return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
1303    var n = Object.prototype.toString.call(o).slice(8, -1);
1304    if (n === "Object" && o.constructor) n = o.constructor.name;
1305    if (n === "Map" || n === "Set") return Array.from(o);
1306    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
1307  }
1308  
1309  /***/ }),
1310  
1311  /***/ 303:
1312  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1313  
1314  "use strict";
1315  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1316  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
1317  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
1318  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
1319  
1320  
1321  /**
1322   * WordPress dependencies
1323   */
1324  
1325  var alignLeft = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
1326    xmlns: "http://www.w3.org/2000/svg",
1327    viewBox: "0 0 24 24"
1328  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
1329    d: "M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z"
1330  }));
1331  /* harmony default export */ __webpack_exports__["a"] = (alignLeft);
1332  
1333  
1334  /***/ }),
1335  
1336  /***/ 304:
1337  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1338  
1339  "use strict";
1340  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1341  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
1342  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
1343  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
1344  
1345  
1346  /**
1347   * WordPress dependencies
1348   */
1349  
1350  var alignCenter = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
1351    xmlns: "http://www.w3.org/2000/svg",
1352    viewBox: "0 0 24 24"
1353  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
1354    d: "M16.4 4.2H7.6v1.5h8.9V4.2zM4 11.2v1.5h16v-1.5H4zm3.6 8.6h8.9v-1.5H7.6v1.5z"
1355  }));
1356  /* harmony default export */ __webpack_exports__["a"] = (alignCenter);
1357  
1358  
1359  /***/ }),
1360  
1361  /***/ 305:
1362  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1363  
1364  "use strict";
1365  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1366  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
1367  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
1368  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
1369  
1370  
1371  /**
1372   * WordPress dependencies
1373   */
1374  
1375  var alignRight = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
1376    xmlns: "http://www.w3.org/2000/svg",
1377    viewBox: "0 0 24 24"
1378  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
1379    d: "M11.1 19.8H20v-1.5h-8.9v1.5zm0-15.6v1.5H20V4.2h-8.9zM4 12.8h16v-1.5H4v1.5z"
1380  }));
1381  /* harmony default export */ __webpack_exports__["a"] = (alignRight);
1382  
1383  
1384  /***/ }),
1385  
1386  /***/ 306:
1387  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1388  
1389  "use strict";
1390  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1391  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
1392  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
1393  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
1394  
1395  
1396  /**
1397   * WordPress dependencies
1398   */
1399  
1400  var search = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
1401    xmlns: "http://www.w3.org/2000/svg",
1402    viewBox: "0 0 24 24"
1403  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
1404    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"
1405  }));
1406  /* harmony default export */ __webpack_exports__["a"] = (search);
1407  
1408  
1409  /***/ }),
1410  
1411  /***/ 31:
1412  /***/ (function(module, exports) {
1413  
1414  (function() { module.exports = this["wp"]["url"]; }());
1415  
1416  /***/ }),
1417  
1418  /***/ 319:
1419  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1420  
1421  "use strict";
1422  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1423  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
1424  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
1425  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
1426  
1427  
1428  /**
1429   * WordPress dependencies
1430   */
1431  
1432  var media = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
1433    xmlns: "http://www.w3.org/2000/svg",
1434    viewBox: "0 0 24 24"
1435  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
1436    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"
1437  }));
1438  /* harmony default export */ __webpack_exports__["a"] = (media);
1439  
1440  
1441  /***/ }),
1442  
1443  /***/ 320:
1444  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1445  
1446  "use strict";
1447  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1448  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
1449  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
1450  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
1451  
1452  
1453  /**
1454   * WordPress dependencies
1455   */
1456  
1457  var code = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
1458    viewBox: "0 0 24 24",
1459    xmlns: "http://www.w3.org/2000/svg"
1460  }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
1461    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"
1462  }));
1463  /* harmony default export */ __webpack_exports__["a"] = (code);
1464  
1465  
1466  /***/ }),
1467  
1468  /***/ 36:
1469  /***/ (function(module, exports) {
1470  
1471  (function() { module.exports = this["wp"]["deprecated"]; }());
1472  
1473  /***/ }),
1474  
1475  /***/ 37:
1476  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1477  
1478  "use strict";
1479  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterableToArray; });
1480  function _iterableToArray(iter) {
1481    if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
1482  }
1483  
1484  /***/ }),
1485  
1486  /***/ 38:
1487  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1488  
1489  "use strict";
1490  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayWithHoles; });
1491  function _arrayWithHoles(arr) {
1492    if (Array.isArray(arr)) return arr;
1493  }
1494  
1495  /***/ }),
1496  
1497  /***/ 39:
1498  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1499  
1500  "use strict";
1501  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _nonIterableRest; });
1502  function _nonIterableRest() {
1503    throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1504  }
1505  
1506  /***/ }),
1507  
1508  /***/ 4:
1509  /***/ (function(module, exports) {
1510  
1511  (function() { module.exports = this["wp"]["data"]; }());
1512  
1513  /***/ }),
1514  
1515  /***/ 40:
1516  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1517  
1518  "use strict";
1519  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _typeof; });
1520  function _typeof(obj) {
1521    "@babel/helpers - typeof";
1522  
1523    if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
1524      _typeof = function _typeof(obj) {
1525        return typeof obj;
1526      };
1527    } else {
1528      _typeof = function _typeof(obj) {
1529        return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
1530      };
1531    }
1532  
1533    return _typeof(obj);
1534  }
1535  
1536  /***/ }),
1537  
1538  /***/ 41:
1539  /***/ (function(module, exports) {
1540  
1541  (function() { module.exports = this["wp"]["blob"]; }());
1542  
1543  /***/ }),
1544  
1545  /***/ 43:
1546  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1547  
1548  "use strict";
1549  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutPropertiesLoose; });
1550  function _objectWithoutPropertiesLoose(source, excluded) {
1551    if (source == null) return {};
1552    var target = {};
1553    var sourceKeys = Object.keys(source);
1554    var key, i;
1555  
1556    for (i = 0; i < sourceKeys.length; i++) {
1557      key = sourceKeys[i];
1558      if (excluded.indexOf(key) >= 0) continue;
1559      target[key] = source[key];
1560    }
1561  
1562    return target;
1563  }
1564  
1565  /***/ }),
1566  
1567  /***/ 44:
1568  /***/ (function(module, exports) {
1569  
1570  (function() { module.exports = this["moment"]; }());
1571  
1572  /***/ }),
1573  
1574  /***/ 45:
1575  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1576  
1577  "use strict";
1578  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _asyncToGenerator; });
1579  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
1580    try {
1581      var info = gen[key](arg);
1582      var value = info.value;
1583    } catch (error) {
1584      reject(error);
1585      return;
1586    }
1587  
1588    if (info.done) {
1589      resolve(value);
1590    } else {
1591      Promise.resolve(value).then(_next, _throw);
1592    }
1593  }
1594  
1595  function _asyncToGenerator(fn) {
1596    return function () {
1597      var self = this,
1598          args = arguments;
1599      return new Promise(function (resolve, reject) {
1600        var gen = fn.apply(self, args);
1601  
1602        function _next(value) {
1603          asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
1604        }
1605  
1606        function _throw(err) {
1607          asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
1608        }
1609  
1610        _next(undefined);
1611      });
1612    };
1613  }
1614  
1615  /***/ }),
1616  
1617  /***/ 454:
1618  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1619  
1620  "use strict";
1621  // ESM COMPAT FLAG
1622  __webpack_require__.r(__webpack_exports__);
1623  
1624  // EXPORTS
1625  __webpack_require__.d(__webpack_exports__, "__experimentalGetCoreBlocks", function() { return /* binding */ build_module_experimentalGetCoreBlocks; });
1626  __webpack_require__.d(__webpack_exports__, "registerCoreBlocks", function() { return /* binding */ build_module_registerCoreBlocks; });
1627  __webpack_require__.d(__webpack_exports__, "__experimentalRegisterExperimentalCoreBlocks", function() { return /* binding */ __experimentalRegisterExperimentalCoreBlocks; });
1628  
1629  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/paragraph/index.js
1630  var build_module_paragraph_namespaceObject = {};
1631  __webpack_require__.r(build_module_paragraph_namespaceObject);
1632  __webpack_require__.d(build_module_paragraph_namespaceObject, "metadata", function() { return paragraph_metadata; });
1633  __webpack_require__.d(build_module_paragraph_namespaceObject, "name", function() { return paragraph_name; });
1634  __webpack_require__.d(build_module_paragraph_namespaceObject, "settings", function() { return paragraph_settings; });
1635  
1636  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/image/index.js
1637  var build_module_image_namespaceObject = {};
1638  __webpack_require__.r(build_module_image_namespaceObject);
1639  __webpack_require__.d(build_module_image_namespaceObject, "metadata", function() { return image_metadata; });
1640  __webpack_require__.d(build_module_image_namespaceObject, "name", function() { return image_name; });
1641  __webpack_require__.d(build_module_image_namespaceObject, "settings", function() { return image_settings; });
1642  
1643  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/heading/index.js
1644  var build_module_heading_namespaceObject = {};
1645  __webpack_require__.r(build_module_heading_namespaceObject);
1646  __webpack_require__.d(build_module_heading_namespaceObject, "metadata", function() { return heading_metadata; });
1647  __webpack_require__.d(build_module_heading_namespaceObject, "name", function() { return heading_name; });
1648  __webpack_require__.d(build_module_heading_namespaceObject, "settings", function() { return heading_settings; });
1649  
1650  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/quote/index.js
1651  var build_module_quote_namespaceObject = {};
1652  __webpack_require__.r(build_module_quote_namespaceObject);
1653  __webpack_require__.d(build_module_quote_namespaceObject, "metadata", function() { return quote_metadata; });
1654  __webpack_require__.d(build_module_quote_namespaceObject, "name", function() { return quote_name; });
1655  __webpack_require__.d(build_module_quote_namespaceObject, "settings", function() { return quote_settings; });
1656  
1657  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/gallery/index.js
1658  var build_module_gallery_namespaceObject = {};
1659  __webpack_require__.r(build_module_gallery_namespaceObject);
1660  __webpack_require__.d(build_module_gallery_namespaceObject, "metadata", function() { return gallery_metadata; });
1661  __webpack_require__.d(build_module_gallery_namespaceObject, "name", function() { return gallery_name; });
1662  __webpack_require__.d(build_module_gallery_namespaceObject, "settings", function() { return gallery_settings; });
1663  
1664  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/archives/index.js
1665  var archives_namespaceObject = {};
1666  __webpack_require__.r(archives_namespaceObject);
1667  __webpack_require__.d(archives_namespaceObject, "metadata", function() { return archives_metadata; });
1668  __webpack_require__.d(archives_namespaceObject, "name", function() { return archives_name; });
1669  __webpack_require__.d(archives_namespaceObject, "settings", function() { return archives_settings; });
1670  
1671  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/audio/index.js
1672  var build_module_audio_namespaceObject = {};
1673  __webpack_require__.r(build_module_audio_namespaceObject);
1674  __webpack_require__.d(build_module_audio_namespaceObject, "metadata", function() { return audio_metadata; });
1675  __webpack_require__.d(build_module_audio_namespaceObject, "name", function() { return audio_name; });
1676  __webpack_require__.d(build_module_audio_namespaceObject, "settings", function() { return audio_settings; });
1677  
1678  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/button/index.js
1679  var build_module_button_namespaceObject = {};
1680  __webpack_require__.r(build_module_button_namespaceObject);
1681  __webpack_require__.d(build_module_button_namespaceObject, "metadata", function() { return button_metadata; });
1682  __webpack_require__.d(build_module_button_namespaceObject, "name", function() { return button_name; });
1683  __webpack_require__.d(build_module_button_namespaceObject, "settings", function() { return button_settings; });
1684  
1685  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/buttons/index.js
1686  var buttons_namespaceObject = {};
1687  __webpack_require__.r(buttons_namespaceObject);
1688  __webpack_require__.d(buttons_namespaceObject, "metadata", function() { return buttons_metadata; });
1689  __webpack_require__.d(buttons_namespaceObject, "name", function() { return buttons_name; });
1690  __webpack_require__.d(buttons_namespaceObject, "settings", function() { return buttons_settings; });
1691  
1692  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/calendar/index.js
1693  var build_module_calendar_namespaceObject = {};
1694  __webpack_require__.r(build_module_calendar_namespaceObject);
1695  __webpack_require__.d(build_module_calendar_namespaceObject, "metadata", function() { return calendar_metadata; });
1696  __webpack_require__.d(build_module_calendar_namespaceObject, "name", function() { return calendar_name; });
1697  __webpack_require__.d(build_module_calendar_namespaceObject, "settings", function() { return calendar_settings; });
1698  
1699  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/categories/index.js
1700  var categories_namespaceObject = {};
1701  __webpack_require__.r(categories_namespaceObject);
1702  __webpack_require__.d(categories_namespaceObject, "metadata", function() { return categories_metadata; });
1703  __webpack_require__.d(categories_namespaceObject, "name", function() { return categories_name; });
1704  __webpack_require__.d(categories_namespaceObject, "settings", function() { return categories_settings; });
1705  
1706  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/code/index.js
1707  var code_namespaceObject = {};
1708  __webpack_require__.r(code_namespaceObject);
1709  __webpack_require__.d(code_namespaceObject, "metadata", function() { return code_metadata; });
1710  __webpack_require__.d(code_namespaceObject, "name", function() { return code_name; });
1711  __webpack_require__.d(code_namespaceObject, "settings", function() { return code_settings; });
1712  
1713  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/columns/index.js
1714  var build_module_columns_namespaceObject = {};
1715  __webpack_require__.r(build_module_columns_namespaceObject);
1716  __webpack_require__.d(build_module_columns_namespaceObject, "metadata", function() { return columns_metadata; });
1717  __webpack_require__.d(build_module_columns_namespaceObject, "name", function() { return columns_name; });
1718  __webpack_require__.d(build_module_columns_namespaceObject, "settings", function() { return columns_settings; });
1719  
1720  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/column/index.js
1721  var build_module_column_namespaceObject = {};
1722  __webpack_require__.r(build_module_column_namespaceObject);
1723  __webpack_require__.d(build_module_column_namespaceObject, "metadata", function() { return column_metadata; });
1724  __webpack_require__.d(build_module_column_namespaceObject, "name", function() { return column_name; });
1725  __webpack_require__.d(build_module_column_namespaceObject, "settings", function() { return column_settings; });
1726  
1727  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/cover/index.js
1728  var build_module_cover_namespaceObject = {};
1729  __webpack_require__.r(build_module_cover_namespaceObject);
1730  __webpack_require__.d(build_module_cover_namespaceObject, "metadata", function() { return cover_metadata; });
1731  __webpack_require__.d(build_module_cover_namespaceObject, "name", function() { return cover_name; });
1732  __webpack_require__.d(build_module_cover_namespaceObject, "settings", function() { return cover_settings; });
1733  
1734  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/embed/index.js
1735  var embed_namespaceObject = {};
1736  __webpack_require__.r(embed_namespaceObject);
1737  __webpack_require__.d(embed_namespaceObject, "metadata", function() { return embed_metadata; });
1738  __webpack_require__.d(embed_namespaceObject, "name", function() { return embed_name; });
1739  __webpack_require__.d(embed_namespaceObject, "settings", function() { return embed_settings; });
1740  
1741  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/file/index.js
1742  var build_module_file_namespaceObject = {};
1743  __webpack_require__.r(build_module_file_namespaceObject);
1744  __webpack_require__.d(build_module_file_namespaceObject, "metadata", function() { return file_metadata; });
1745  __webpack_require__.d(build_module_file_namespaceObject, "name", function() { return file_name; });
1746  __webpack_require__.d(build_module_file_namespaceObject, "settings", function() { return file_settings; });
1747  
1748  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/html/index.js
1749  var build_module_html_namespaceObject = {};
1750  __webpack_require__.r(build_module_html_namespaceObject);
1751  __webpack_require__.d(build_module_html_namespaceObject, "metadata", function() { return html_metadata; });
1752  __webpack_require__.d(build_module_html_namespaceObject, "name", function() { return html_name; });
1753  __webpack_require__.d(build_module_html_namespaceObject, "settings", function() { return html_settings; });
1754  
1755  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/media-text/index.js
1756  var media_text_namespaceObject = {};
1757  __webpack_require__.r(media_text_namespaceObject);
1758  __webpack_require__.d(media_text_namespaceObject, "metadata", function() { return media_text_metadata; });
1759  __webpack_require__.d(media_text_namespaceObject, "name", function() { return media_text_name; });
1760  __webpack_require__.d(media_text_namespaceObject, "settings", function() { return media_text_settings; });
1761  
1762  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/latest-comments/index.js
1763  var latest_comments_namespaceObject = {};
1764  __webpack_require__.r(latest_comments_namespaceObject);
1765  __webpack_require__.d(latest_comments_namespaceObject, "metadata", function() { return latest_comments_metadata; });
1766  __webpack_require__.d(latest_comments_namespaceObject, "name", function() { return latest_comments_name; });
1767  __webpack_require__.d(latest_comments_namespaceObject, "settings", function() { return latest_comments_settings; });
1768  
1769  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/latest-posts/index.js
1770  var latest_posts_namespaceObject = {};
1771  __webpack_require__.r(latest_posts_namespaceObject);
1772  __webpack_require__.d(latest_posts_namespaceObject, "metadata", function() { return latest_posts_metadata; });
1773  __webpack_require__.d(latest_posts_namespaceObject, "name", function() { return latest_posts_name; });
1774  __webpack_require__.d(latest_posts_namespaceObject, "settings", function() { return latest_posts_settings; });
1775  
1776  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/list/index.js
1777  var build_module_list_namespaceObject = {};
1778  __webpack_require__.r(build_module_list_namespaceObject);
1779  __webpack_require__.d(build_module_list_namespaceObject, "metadata", function() { return list_metadata; });
1780  __webpack_require__.d(build_module_list_namespaceObject, "name", function() { return list_name; });
1781  __webpack_require__.d(build_module_list_namespaceObject, "settings", function() { return list_settings; });
1782  
1783  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/missing/index.js
1784  var missing_namespaceObject = {};
1785  __webpack_require__.r(missing_namespaceObject);
1786  __webpack_require__.d(missing_namespaceObject, "metadata", function() { return missing_metadata; });
1787  __webpack_require__.d(missing_namespaceObject, "name", function() { return missing_name; });
1788  __webpack_require__.d(missing_namespaceObject, "settings", function() { return missing_settings; });
1789  
1790  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/more/index.js
1791  var build_module_more_namespaceObject = {};
1792  __webpack_require__.r(build_module_more_namespaceObject);
1793  __webpack_require__.d(build_module_more_namespaceObject, "metadata", function() { return more_metadata; });
1794  __webpack_require__.d(build_module_more_namespaceObject, "name", function() { return more_name; });
1795  __webpack_require__.d(build_module_more_namespaceObject, "settings", function() { return more_settings; });
1796  
1797  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/nextpage/index.js
1798  var nextpage_namespaceObject = {};
1799  __webpack_require__.r(nextpage_namespaceObject);
1800  __webpack_require__.d(nextpage_namespaceObject, "metadata", function() { return nextpage_metadata; });
1801  __webpack_require__.d(nextpage_namespaceObject, "name", function() { return nextpage_name; });
1802  __webpack_require__.d(nextpage_namespaceObject, "settings", function() { return nextpage_settings; });
1803  
1804  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/preformatted/index.js
1805  var build_module_preformatted_namespaceObject = {};
1806  __webpack_require__.r(build_module_preformatted_namespaceObject);
1807  __webpack_require__.d(build_module_preformatted_namespaceObject, "metadata", function() { return preformatted_metadata; });
1808  __webpack_require__.d(build_module_preformatted_namespaceObject, "name", function() { return preformatted_name; });
1809  __webpack_require__.d(build_module_preformatted_namespaceObject, "settings", function() { return preformatted_settings; });
1810  
1811  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/pullquote/index.js
1812  var build_module_pullquote_namespaceObject = {};
1813  __webpack_require__.r(build_module_pullquote_namespaceObject);
1814  __webpack_require__.d(build_module_pullquote_namespaceObject, "metadata", function() { return pullquote_metadata; });
1815  __webpack_require__.d(build_module_pullquote_namespaceObject, "name", function() { return pullquote_name; });
1816  __webpack_require__.d(build_module_pullquote_namespaceObject, "settings", function() { return pullquote_settings; });
1817  
1818  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/block/index.js
1819  var block_namespaceObject = {};
1820  __webpack_require__.r(block_namespaceObject);
1821  __webpack_require__.d(block_namespaceObject, "metadata", function() { return block_metadata; });
1822  __webpack_require__.d(block_namespaceObject, "name", function() { return block_name; });
1823  __webpack_require__.d(block_namespaceObject, "settings", function() { return block_settings; });
1824  
1825  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/rss/index.js
1826  var build_module_rss_namespaceObject = {};
1827  __webpack_require__.r(build_module_rss_namespaceObject);
1828  __webpack_require__.d(build_module_rss_namespaceObject, "metadata", function() { return rss_metadata; });
1829  __webpack_require__.d(build_module_rss_namespaceObject, "name", function() { return rss_name; });
1830  __webpack_require__.d(build_module_rss_namespaceObject, "settings", function() { return rss_settings; });
1831  
1832  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/search/index.js
1833  var search_namespaceObject = {};
1834  __webpack_require__.r(search_namespaceObject);
1835  __webpack_require__.d(search_namespaceObject, "metadata", function() { return search_metadata; });
1836  __webpack_require__.d(search_namespaceObject, "name", function() { return search_name; });
1837  __webpack_require__.d(search_namespaceObject, "settings", function() { return search_settings; });
1838  
1839  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/group/index.js
1840  var build_module_group_namespaceObject = {};
1841  __webpack_require__.r(build_module_group_namespaceObject);
1842  __webpack_require__.d(build_module_group_namespaceObject, "metadata", function() { return group_metadata; });
1843  __webpack_require__.d(build_module_group_namespaceObject, "name", function() { return group_name; });
1844  __webpack_require__.d(build_module_group_namespaceObject, "settings", function() { return group_settings; });
1845  
1846  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/separator/index.js
1847  var build_module_separator_namespaceObject = {};
1848  __webpack_require__.r(build_module_separator_namespaceObject);
1849  __webpack_require__.d(build_module_separator_namespaceObject, "metadata", function() { return separator_metadata; });
1850  __webpack_require__.d(build_module_separator_namespaceObject, "name", function() { return separator_name; });
1851  __webpack_require__.d(build_module_separator_namespaceObject, "settings", function() { return build_module_separator_settings; });
1852  
1853  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/shortcode/index.js
1854  var build_module_shortcode_namespaceObject = {};
1855  __webpack_require__.r(build_module_shortcode_namespaceObject);
1856  __webpack_require__.d(build_module_shortcode_namespaceObject, "metadata", function() { return shortcode_metadata; });
1857  __webpack_require__.d(build_module_shortcode_namespaceObject, "name", function() { return shortcode_name; });
1858  __webpack_require__.d(build_module_shortcode_namespaceObject, "settings", function() { return shortcode_settings; });
1859  
1860  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/spacer/index.js
1861  var spacer_namespaceObject = {};
1862  __webpack_require__.r(spacer_namespaceObject);
1863  __webpack_require__.d(spacer_namespaceObject, "metadata", function() { return spacer_metadata; });
1864  __webpack_require__.d(spacer_namespaceObject, "name", function() { return spacer_name; });
1865  __webpack_require__.d(spacer_namespaceObject, "settings", function() { return spacer_settings; });
1866  
1867  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/subhead/index.js
1868  var subhead_namespaceObject = {};
1869  __webpack_require__.r(subhead_namespaceObject);
1870  __webpack_require__.d(subhead_namespaceObject, "metadata", function() { return subhead_metadata; });
1871  __webpack_require__.d(subhead_namespaceObject, "name", function() { return subhead_name; });
1872  __webpack_require__.d(subhead_namespaceObject, "settings", function() { return subhead_settings; });
1873  
1874  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/table/index.js
1875  var build_module_table_namespaceObject = {};
1876  __webpack_require__.r(build_module_table_namespaceObject);
1877  __webpack_require__.d(build_module_table_namespaceObject, "metadata", function() { return table_metadata; });
1878  __webpack_require__.d(build_module_table_namespaceObject, "name", function() { return table_name; });
1879  __webpack_require__.d(build_module_table_namespaceObject, "settings", function() { return table_settings; });
1880  
1881  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/text-columns/index.js
1882  var text_columns_namespaceObject = {};
1883  __webpack_require__.r(text_columns_namespaceObject);
1884  __webpack_require__.d(text_columns_namespaceObject, "metadata", function() { return text_columns_metadata; });
1885  __webpack_require__.d(text_columns_namespaceObject, "name", function() { return text_columns_name; });
1886  __webpack_require__.d(text_columns_namespaceObject, "settings", function() { return text_columns_settings; });
1887  
1888  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/verse/index.js
1889  var build_module_verse_namespaceObject = {};
1890  __webpack_require__.r(build_module_verse_namespaceObject);
1891  __webpack_require__.d(build_module_verse_namespaceObject, "metadata", function() { return verse_metadata; });
1892  __webpack_require__.d(build_module_verse_namespaceObject, "name", function() { return verse_name; });
1893  __webpack_require__.d(build_module_verse_namespaceObject, "settings", function() { return verse_settings; });
1894  
1895  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/video/index.js
1896  var build_module_video_namespaceObject = {};
1897  __webpack_require__.r(build_module_video_namespaceObject);
1898  __webpack_require__.d(build_module_video_namespaceObject, "metadata", function() { return video_metadata; });
1899  __webpack_require__.d(build_module_video_namespaceObject, "name", function() { return video_name; });
1900  __webpack_require__.d(build_module_video_namespaceObject, "settings", function() { return video_settings; });
1901  
1902  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/tag-cloud/index.js
1903  var tag_cloud_namespaceObject = {};
1904  __webpack_require__.r(tag_cloud_namespaceObject);
1905  __webpack_require__.d(tag_cloud_namespaceObject, "metadata", function() { return tag_cloud_metadata; });
1906  __webpack_require__.d(tag_cloud_namespaceObject, "name", function() { return tag_cloud_name; });
1907  __webpack_require__.d(tag_cloud_namespaceObject, "settings", function() { return tag_cloud_settings; });
1908  
1909  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/classic/index.js
1910  var build_module_classic_namespaceObject = {};
1911  __webpack_require__.r(build_module_classic_namespaceObject);
1912  __webpack_require__.d(build_module_classic_namespaceObject, "metadata", function() { return classic_metadata; });
1913  __webpack_require__.d(build_module_classic_namespaceObject, "name", function() { return classic_name; });
1914  __webpack_require__.d(build_module_classic_namespaceObject, "settings", function() { return classic_settings; });
1915  
1916  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/social-links/index.js
1917  var social_links_namespaceObject = {};
1918  __webpack_require__.r(social_links_namespaceObject);
1919  __webpack_require__.d(social_links_namespaceObject, "metadata", function() { return social_links_metadata; });
1920  __webpack_require__.d(social_links_namespaceObject, "name", function() { return social_links_name; });
1921  __webpack_require__.d(social_links_namespaceObject, "settings", function() { return social_links_settings; });
1922  
1923  // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/social-link/index.js
1924  var social_link_namespaceObject = {};
1925  __webpack_require__.r(social_link_namespaceObject);
1926  __webpack_require__.d(social_link_namespaceObject, "metadata", function() { return social_link_metadata; });
1927  __webpack_require__.d(social_link_namespaceObject, "name", function() { return social_link_name; });
1928  __webpack_require__.d(social_link_namespaceObject, "settings", function() { return social_link_settings; });
1929  
1930  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
1931  var toConsumableArray = __webpack_require__(17);
1932  
1933  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
1934  var defineProperty = __webpack_require__(5);
1935  
1936  // EXTERNAL MODULE: external {"this":["wp","coreData"]}
1937  var external_this_wp_coreData_ = __webpack_require__(83);
1938  
1939  // EXTERNAL MODULE: external {"this":["wp","notices"]}
1940  var external_this_wp_notices_ = __webpack_require__(92);
1941  
1942  // EXTERNAL MODULE: external {"this":["wp","blockEditor"]}
1943  var external_this_wp_blockEditor_ = __webpack_require__(6);
1944  
1945  // EXTERNAL MODULE: external {"this":["wp","reusableBlocks"]}
1946  var external_this_wp_reusableBlocks_ = __webpack_require__(121);
1947  
1948  // EXTERNAL MODULE: external {"this":["wp","blocks"]}
1949  var external_this_wp_blocks_ = __webpack_require__(11);
1950  
1951  // EXTERNAL MODULE: external {"this":"lodash"}
1952  var external_this_lodash_ = __webpack_require__(2);
1953  
1954  // EXTERNAL MODULE: external {"this":["wp","i18n"]}
1955  var external_this_wp_i18n_ = __webpack_require__(1);
1956  
1957  // EXTERNAL MODULE: external {"this":["wp","element"]}
1958  var external_this_wp_element_ = __webpack_require__(0);
1959  
1960  // EXTERNAL MODULE: external {"this":["wp","primitives"]}
1961  var external_this_wp_primitives_ = __webpack_require__(7);
1962  
1963  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/paragraph.js
1964  
1965  
1966  /**
1967   * WordPress dependencies
1968   */
1969  
1970  var paragraph = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
1971    xmlns: "http://www.w3.org/2000/svg",
1972    viewBox: "0 0 24 24"
1973  }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
1974    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"
1975  }));
1976  /* harmony default export */ var library_paragraph = (paragraph);
1977  
1978  // EXTERNAL MODULE: ./node_modules/classnames/index.js
1979  var classnames = __webpack_require__(9);
1980  var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
1981  
1982  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/paragraph/deprecated.js
1983  
1984  
1985  
1986  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; }
1987  
1988  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; }
1989  
1990  /**
1991   * External dependencies
1992   */
1993  
1994  
1995  /**
1996   * WordPress dependencies
1997   */
1998  
1999  
2000  
2001  var supports = {
2002    className: false
2003  };
2004  var deprecated_blockAttributes = {
2005    align: {
2006      type: 'string'
2007    },
2008    content: {
2009      type: 'string',
2010      source: 'html',
2011      selector: 'p',
2012      default: ''
2013    },
2014    dropCap: {
2015      type: 'boolean',
2016      default: false
2017    },
2018    placeholder: {
2019      type: 'string'
2020    },
2021    textColor: {
2022      type: 'string'
2023    },
2024    backgroundColor: {
2025      type: 'string'
2026    },
2027    fontSize: {
2028      type: 'string'
2029    },
2030    direction: {
2031      type: 'string',
2032      enum: ['ltr', 'rtl']
2033    },
2034    style: {
2035      type: 'object'
2036    }
2037  };
2038  
2039  var deprecated_migrateCustomColorsAndFontSizes = function migrateCustomColorsAndFontSizes(attributes) {
2040    if (!attributes.customTextColor && !attributes.customBackgroundColor && !attributes.customFontSize) {
2041      return attributes;
2042    }
2043  
2044    var style = {};
2045  
2046    if (attributes.customTextColor || attributes.customBackgroundColor) {
2047      style.color = {};
2048    }
2049  
2050    if (attributes.customTextColor) {
2051      style.color.text = attributes.customTextColor;
2052    }
2053  
2054    if (attributes.customBackgroundColor) {
2055      style.color.background = attributes.customBackgroundColor;
2056    }
2057  
2058    if (attributes.customFontSize) {
2059      style.typography = {
2060        fontSize: attributes.customFontSize
2061      };
2062    }
2063  
2064    return _objectSpread(_objectSpread({}, Object(external_this_lodash_["omit"])(attributes, ['customTextColor', 'customBackgroundColor', 'customFontSize'])), {}, {
2065      style: style
2066    });
2067  };
2068  
2069  var deprecated = [{
2070    supports: supports,
2071    attributes: _objectSpread(_objectSpread({}, Object(external_this_lodash_["omit"])(deprecated_blockAttributes, ['style'])), {}, {
2072      customTextColor: {
2073        type: 'string'
2074      },
2075      customBackgroundColor: {
2076        type: 'string'
2077      },
2078      customFontSize: {
2079        type: 'number'
2080      }
2081    }),
2082    migrate: deprecated_migrateCustomColorsAndFontSizes,
2083    save: function save(_ref) {
2084      var _classnames;
2085  
2086      var attributes = _ref.attributes;
2087      var align = attributes.align,
2088          content = attributes.content,
2089          dropCap = attributes.dropCap,
2090          backgroundColor = attributes.backgroundColor,
2091          textColor = attributes.textColor,
2092          customBackgroundColor = attributes.customBackgroundColor,
2093          customTextColor = attributes.customTextColor,
2094          fontSize = attributes.fontSize,
2095          customFontSize = attributes.customFontSize,
2096          direction = attributes.direction;
2097      var textClass = Object(external_this_wp_blockEditor_["getColorClassName"])('color', textColor);
2098      var backgroundClass = Object(external_this_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor);
2099      var fontSizeClass = Object(external_this_wp_blockEditor_["getFontSizeClass"])(fontSize);
2100      var className = classnames_default()((_classnames = {
2101        'has-text-color': textColor || customTextColor,
2102        'has-background': backgroundColor || customBackgroundColor,
2103        'has-drop-cap': dropCap
2104      }, 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));
2105      var styles = {
2106        backgroundColor: backgroundClass ? undefined : customBackgroundColor,
2107        color: textClass ? undefined : customTextColor,
2108        fontSize: fontSizeClass ? undefined : customFontSize
2109      };
2110      return Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
2111        tagName: "p",
2112        style: styles,
2113        className: className ? className : undefined,
2114        value: content,
2115        dir: direction
2116      });
2117    }
2118  }, {
2119    supports: supports,
2120    attributes: _objectSpread(_objectSpread({}, Object(external_this_lodash_["omit"])(deprecated_blockAttributes, ['style'])), {}, {
2121      customTextColor: {
2122        type: 'string'
2123      },
2124      customBackgroundColor: {
2125        type: 'string'
2126      },
2127      customFontSize: {
2128        type: 'number'
2129      }
2130    }),
2131    migrate: deprecated_migrateCustomColorsAndFontSizes,
2132    save: function save(_ref2) {
2133      var _classnames2;
2134  
2135      var attributes = _ref2.attributes;
2136      var align = attributes.align,
2137          content = attributes.content,
2138          dropCap = attributes.dropCap,
2139          backgroundColor = attributes.backgroundColor,
2140          textColor = attributes.textColor,
2141          customBackgroundColor = attributes.customBackgroundColor,
2142          customTextColor = attributes.customTextColor,
2143          fontSize = attributes.fontSize,
2144          customFontSize = attributes.customFontSize,
2145          direction = attributes.direction;
2146      var textClass = Object(external_this_wp_blockEditor_["getColorClassName"])('color', textColor);
2147      var backgroundClass = Object(external_this_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor);
2148      var fontSizeClass = Object(external_this_wp_blockEditor_["getFontSizeClass"])(fontSize);
2149      var className = classnames_default()((_classnames2 = {
2150        'has-text-color': textColor || customTextColor,
2151        'has-background': backgroundColor || customBackgroundColor,
2152        'has-drop-cap': dropCap
2153      }, Object(defineProperty["a" /* default */])(_classnames2, fontSizeClass, fontSizeClass), Object(defineProperty["a" /* default */])(_classnames2, textClass, textClass), Object(defineProperty["a" /* default */])(_classnames2, backgroundClass, backgroundClass), _classnames2));
2154      var styles = {
2155        backgroundColor: backgroundClass ? undefined : customBackgroundColor,
2156        color: textClass ? undefined : customTextColor,
2157        fontSize: fontSizeClass ? undefined : customFontSize,
2158        textAlign: align
2159      };
2160      return Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
2161        tagName: "p",
2162        style: styles,
2163        className: className ? className : undefined,
2164        value: content,
2165        dir: direction
2166      });
2167    }
2168  }, {
2169    supports: supports,
2170    attributes: _objectSpread(_objectSpread({}, Object(external_this_lodash_["omit"])(deprecated_blockAttributes, ['style'])), {}, {
2171      customTextColor: {
2172        type: 'string'
2173      },
2174      customBackgroundColor: {
2175        type: 'string'
2176      },
2177      customFontSize: {
2178        type: 'number'
2179      },
2180      width: {
2181        type: 'string'
2182      }
2183    }),
2184    migrate: deprecated_migrateCustomColorsAndFontSizes,
2185    save: function save(_ref3) {
2186      var _classnames3;
2187  
2188      var attributes = _ref3.attributes;
2189      var width = attributes.width,
2190          align = attributes.align,
2191          content = attributes.content,
2192          dropCap = attributes.dropCap,
2193          backgroundColor = attributes.backgroundColor,
2194          textColor = attributes.textColor,
2195          customBackgroundColor = attributes.customBackgroundColor,
2196          customTextColor = attributes.customTextColor,
2197          fontSize = attributes.fontSize,
2198          customFontSize = attributes.customFontSize;
2199      var textClass = Object(external_this_wp_blockEditor_["getColorClassName"])('color', textColor);
2200      var backgroundClass = Object(external_this_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor);
2201      var fontSizeClass = fontSize && "is-".concat(fontSize, "-text");
2202      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));
2203      var styles = {
2204        backgroundColor: backgroundClass ? undefined : customBackgroundColor,
2205        color: textClass ? undefined : customTextColor,
2206        fontSize: fontSizeClass ? undefined : customFontSize,
2207        textAlign: align
2208      };
2209      return Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
2210        tagName: "p",
2211        style: styles,
2212        className: className ? className : undefined,
2213        value: content
2214      });
2215    }
2216  }, {
2217    supports: supports,
2218    attributes: Object(external_this_lodash_["omit"])(_objectSpread(_objectSpread({}, deprecated_blockAttributes), {}, {
2219      fontSize: {
2220        type: 'number'
2221      }
2222    }), ['style']),
2223    save: function save(_ref4) {
2224      var _classnames4;
2225  
2226      var attributes = _ref4.attributes;
2227      var width = attributes.width,
2228          align = attributes.align,
2229          content = attributes.content,
2230          dropCap = attributes.dropCap,
2231          backgroundColor = attributes.backgroundColor,
2232          textColor = attributes.textColor,
2233          fontSize = attributes.fontSize;
2234      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));
2235      var styles = {
2236        backgroundColor: backgroundColor,
2237        color: textColor,
2238        fontSize: fontSize,
2239        textAlign: align
2240      };
2241      return Object(external_this_wp_element_["createElement"])("p", {
2242        style: styles,
2243        className: className ? className : undefined
2244      }, content);
2245    },
2246    migrate: function migrate(attributes) {
2247      return deprecated_migrateCustomColorsAndFontSizes(Object(external_this_lodash_["omit"])(_objectSpread(_objectSpread({}, attributes), {}, {
2248        customFontSize: Object(external_this_lodash_["isFinite"])(attributes.fontSize) ? attributes.fontSize : undefined,
2249        customTextColor: attributes.textColor && '#' === attributes.textColor[0] ? attributes.textColor : undefined,
2250        customBackgroundColor: attributes.backgroundColor && '#' === attributes.backgroundColor[0] ? attributes.backgroundColor : undefined
2251      })), ['fontSize', 'textColor', 'backgroundColor', 'style']);
2252    }
2253  }, {
2254    supports: supports,
2255    attributes: _objectSpread(_objectSpread({}, deprecated_blockAttributes), {}, {
2256      content: {
2257        type: 'string',
2258        source: 'html',
2259        default: ''
2260      }
2261    }),
2262    save: function save(_ref5) {
2263      var attributes = _ref5.attributes;
2264      return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["RawHTML"], null, attributes.content);
2265    },
2266    migrate: function migrate(attributes) {
2267      return attributes;
2268    }
2269  }];
2270  /* harmony default export */ var paragraph_deprecated = (deprecated);
2271  
2272  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
2273  var esm_extends = __webpack_require__(8);
2274  
2275  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
2276  var slicedToArray = __webpack_require__(12);
2277  
2278  // EXTERNAL MODULE: external {"this":["wp","components"]}
2279  var external_this_wp_components_ = __webpack_require__(3);
2280  
2281  // EXTERNAL MODULE: external {"this":["wp","data"]}
2282  var external_this_wp_data_ = __webpack_require__(4);
2283  
2284  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-ltr.js
2285  
2286  
2287  /**
2288   * WordPress dependencies
2289   */
2290  
2291  var formatLtr = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
2292    xmlns: "http://www.w3.org/2000/svg",
2293    viewBox: "-2 -2 24 24"
2294  }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
2295    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"
2296  }));
2297  /* harmony default export */ var format_ltr = (formatLtr);
2298  
2299  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/paragraph/edit.js
2300  
2301  
2302  
2303  
2304  
2305  
2306  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; }
2307  
2308  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; }
2309  
2310  /**
2311   * External dependencies
2312   */
2313  
2314  /**
2315   * WordPress dependencies
2316   */
2317  
2318  
2319  
2320  
2321  
2322  
2323  
2324  
2325  
2326  function getComputedStyle(node, pseudo) {
2327    return node.ownerDocument.defaultView.getComputedStyle(node, pseudo);
2328  }
2329  
2330  var edit_name = 'core/paragraph';
2331  
2332  function ParagraphRTLToolbar(_ref) {
2333    var direction = _ref.direction,
2334        setDirection = _ref.setDirection;
2335    var isRTL = Object(external_this_wp_data_["useSelect"])(function (select) {
2336      return !!select('core/block-editor').getSettings().isRTL;
2337    }, []);
2338    return isRTL && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarGroup"], {
2339      controls: [{
2340        icon: format_ltr,
2341        title: Object(external_this_wp_i18n_["_x"])('Left to right', 'editor button'),
2342        isActive: direction === 'ltr',
2343        onClick: function onClick() {
2344          setDirection(direction === 'ltr' ? undefined : 'ltr');
2345        }
2346      }]
2347    });
2348  }
2349  
2350  function useDropCapMinHeight(ref, isDisabled, dependencies) {
2351    var _useState = Object(external_this_wp_element_["useState"])(),
2352        _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
2353        minHeight = _useState2[0],
2354        setMinHeight = _useState2[1];
2355  
2356    Object(external_this_wp_element_["useEffect"])(function () {
2357      if (isDisabled) {
2358        setMinHeight();
2359        return;
2360      }
2361  
2362      setMinHeight(getComputedStyle(ref.current, 'first-letter').lineHeight);
2363    }, [isDisabled].concat(Object(toConsumableArray["a" /* default */])(dependencies)));
2364    return minHeight;
2365  }
2366  
2367  function ParagraphBlock(_ref2) {
2368    var attributes = _ref2.attributes,
2369        mergeBlocks = _ref2.mergeBlocks,
2370        onReplace = _ref2.onReplace,
2371        onRemove = _ref2.onRemove,
2372        setAttributes = _ref2.setAttributes;
2373    var align = attributes.align,
2374        content = attributes.content,
2375        direction = attributes.direction,
2376        dropCap = attributes.dropCap,
2377        placeholder = attributes.placeholder,
2378        fontSize = attributes.fontSize,
2379        style = attributes.style;
2380    var isDropCapFeatureEnabled = Object(external_this_wp_blockEditor_["__experimentalUseEditorFeature"])('typography.dropCap');
2381    var ref = Object(external_this_wp_element_["useRef"])();
2382    var inlineFontSize = style === null || style === void 0 ? void 0 : style.fontSize;
2383    var size = Object(external_this_wp_data_["useSelect"])(function (select) {
2384      var _select$getSettings = select('core/block-editor').getSettings(),
2385          fontSizes = _select$getSettings.fontSizes;
2386  
2387      return Object(external_this_wp_blockEditor_["getFontSize"])(fontSizes, fontSize, inlineFontSize).size;
2388    }, [fontSize, inlineFontSize]);
2389    var hasDropCap = isDropCapFeatureEnabled && dropCap;
2390    var minHeight = useDropCapMinHeight(ref, !hasDropCap, [size]);
2391    var blockProps = Object(external_this_wp_blockEditor_["useBlockProps"])({
2392      ref: ref,
2393      className: classnames_default()(Object(defineProperty["a" /* default */])({
2394        'has-drop-cap': dropCap
2395      }, "has-text-align-".concat(align), align)),
2396      style: {
2397        direction: direction,
2398        minHeight: minHeight
2399      }
2400    });
2401    return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["BlockControls"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["AlignmentToolbar"], {
2402      value: align,
2403      onChange: function onChange(newAlign) {
2404        return setAttributes({
2405          align: newAlign
2406        });
2407      }
2408    }), Object(external_this_wp_element_["createElement"])(ParagraphRTLToolbar, {
2409      direction: direction,
2410      setDirection: function setDirection(newDirection) {
2411        return setAttributes({
2412          direction: newDirection
2413        });
2414      }
2415    })), isDropCapFeatureEnabled && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["InspectorControls"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["PanelBody"], {
2416      title: Object(external_this_wp_i18n_["__"])('Text settings')
2417    }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToggleControl"], {
2418      label: Object(external_this_wp_i18n_["__"])('Drop cap'),
2419      checked: !!dropCap,
2420      onChange: function onChange() {
2421        return setAttributes({
2422          dropCap: !dropCap
2423        });
2424      },
2425      help: dropCap ? Object(external_this_wp_i18n_["__"])('Showing large initial letter.') : Object(external_this_wp_i18n_["__"])('Toggle to show a large initial letter.')
2426    }))), Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"], Object(esm_extends["a" /* default */])({
2427      identifier: "content",
2428      tagName: "p"
2429    }, blockProps, {
2430      value: content,
2431      onChange: function onChange(newContent) {
2432        return setAttributes({
2433          content: newContent
2434        });
2435      },
2436      onSplit: function onSplit(value) {
2437        if (!value) {
2438          return Object(external_this_wp_blocks_["createBlock"])(edit_name);
2439        }
2440  
2441        return Object(external_this_wp_blocks_["createBlock"])(edit_name, edit_objectSpread(edit_objectSpread({}, attributes), {}, {
2442          content: value
2443        }));
2444      },
2445      onMerge: mergeBlocks,
2446      onReplace: onReplace,
2447      onRemove: onRemove,
2448      "aria-label": content ? Object(external_this_wp_i18n_["__"])('Paragraph block') : Object(external_this_wp_i18n_["__"])('Empty block; start writing or type forward slash to choose a block'),
2449      placeholder: placeholder || Object(external_this_wp_i18n_["__"])('Start writing or type / to choose a block'),
2450      __unstableEmbedURLOnPaste: true,
2451      __unstableAllowPrefixTransformations: true
2452    })));
2453  }
2454  
2455  /* harmony default export */ var edit = (ParagraphBlock);
2456  
2457  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/paragraph/save.js
2458  
2459  
2460  
2461  /**
2462   * External dependencies
2463   */
2464  
2465  /**
2466   * WordPress dependencies
2467   */
2468  
2469  
2470  function save_save(_ref) {
2471    var attributes = _ref.attributes;
2472    var align = attributes.align,
2473        content = attributes.content,
2474        dropCap = attributes.dropCap,
2475        direction = attributes.direction;
2476    var className = classnames_default()(Object(defineProperty["a" /* default */])({
2477      'has-drop-cap': dropCap
2478    }, "has-text-align-".concat(align), align));
2479    return Object(external_this_wp_element_["createElement"])("p", external_this_wp_blockEditor_["useBlockProps"].save({
2480      className: className,
2481      dir: direction
2482    }), Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
2483      value: content
2484    }));
2485  }
2486  
2487  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/paragraph/transforms.js
2488  /**
2489   * WordPress dependencies
2490   */
2491  
2492  /**
2493   * Internal dependencies
2494   */
2495  
2496  var _apiVersion$name$cate = {
2497    apiVersion: 2,
2498    name: "core/paragraph",
2499    category: "text",
2500    attributes: {
2501      align: {
2502        type: "string"
2503      },
2504      content: {
2505        type: "string",
2506        source: "html",
2507        selector: "p",
2508        "default": ""
2509      },
2510      dropCap: {
2511        type: "boolean",
2512        "default": false
2513      },
2514      placeholder: {
2515        type: "string"
2516      },
2517      direction: {
2518        type: "string",
2519        "enum": ["ltr", "rtl"]
2520      }
2521    },
2522    supports: {
2523      anchor: true,
2524      className: false,
2525      color: {
2526        link: true
2527      },
2528      fontSize: true,
2529      lineHeight: true,
2530      __experimentalSelector: "p",
2531      __unstablePasteTextInline: true
2532    }
2533  },
2534      transforms_name = _apiVersion$name$cate.name;
2535  var transforms = {
2536    from: [{
2537      type: 'raw',
2538      // Paragraph is a fallback and should be matched last.
2539      priority: 20,
2540      selector: 'p',
2541      schema: function schema(_ref) {
2542        var phrasingContentSchema = _ref.phrasingContentSchema,
2543            isPaste = _ref.isPaste;
2544        return {
2545          p: {
2546            children: phrasingContentSchema,
2547            attributes: isPaste ? [] : ['style', 'id']
2548          }
2549        };
2550      },
2551      transform: function transform(node) {
2552        var attributes = Object(external_this_wp_blocks_["getBlockAttributes"])(transforms_name, node.outerHTML);
2553  
2554        var _ref2 = node.style || {},
2555            textAlign = _ref2.textAlign;
2556  
2557        if (textAlign === 'left' || textAlign === 'center' || textAlign === 'right') {
2558          attributes.align = textAlign;
2559        }
2560  
2561        return Object(external_this_wp_blocks_["createBlock"])(transforms_name, attributes);
2562      }
2563    }]
2564  };
2565  /* harmony default export */ var paragraph_transforms = (transforms);
2566  
2567  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/paragraph/index.js
2568  /**
2569   * External dependencies
2570   */
2571  
2572  /**
2573   * WordPress dependencies
2574   */
2575  
2576  
2577  
2578  /**
2579   * Internal dependencies
2580   */
2581  
2582  
2583  
2584  var paragraph_metadata = {
2585    apiVersion: 2,
2586    name: "core/paragraph",
2587    category: "text",
2588    attributes: {
2589      align: {
2590        type: "string"
2591      },
2592      content: {
2593        type: "string",
2594        source: "html",
2595        selector: "p",
2596        "default": ""
2597      },
2598      dropCap: {
2599        type: "boolean",
2600        "default": false
2601      },
2602      placeholder: {
2603        type: "string"
2604      },
2605      direction: {
2606        type: "string",
2607        "enum": ["ltr", "rtl"]
2608      }
2609    },
2610    supports: {
2611      anchor: true,
2612      className: false,
2613      color: {
2614        link: true
2615      },
2616      fontSize: true,
2617      lineHeight: true,
2618      __experimentalSelector: "p",
2619      __unstablePasteTextInline: true
2620    }
2621  };
2622  
2623  
2624  var paragraph_name = paragraph_metadata.name;
2625  
2626  var paragraph_settings = {
2627    title: Object(external_this_wp_i18n_["__"])('Paragraph'),
2628    description: Object(external_this_wp_i18n_["__"])('Start with the building block of all narrative.'),
2629    icon: library_paragraph,
2630    keywords: [Object(external_this_wp_i18n_["__"])('text')],
2631    example: {
2632      attributes: {
2633        content: Object(external_this_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.'),
2634        style: {
2635          typography: {
2636            fontSize: 28
2637          }
2638        },
2639        dropCap: true
2640      }
2641    },
2642    __experimentalLabel: function __experimentalLabel(attributes, _ref) {
2643      var context = _ref.context;
2644  
2645      if (context === 'accessibility') {
2646        var content = attributes.content;
2647        return Object(external_this_lodash_["isEmpty"])(content) ? Object(external_this_wp_i18n_["__"])('Empty') : content;
2648      }
2649    },
2650    transforms: paragraph_transforms,
2651    deprecated: paragraph_deprecated,
2652    merge: function merge(attributes, attributesToMerge) {
2653      return {
2654        content: (attributes.content || '') + (attributesToMerge.content || '')
2655      };
2656    },
2657    edit: edit,
2658    save: save_save
2659  };
2660  
2661  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/image.js
2662  
2663  
2664  /**
2665   * WordPress dependencies
2666   */
2667  
2668  var image_image = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
2669    viewBox: "0 0 24 24",
2670    xmlns: "http://www.w3.org/2000/svg"
2671  }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
2672    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"
2673  }));
2674  /* harmony default export */ var library_image = (image_image);
2675  
2676  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/deprecated.js
2677  
2678  
2679  
2680  
2681  /**
2682   * External dependencies
2683   */
2684  
2685  /**
2686   * WordPress dependencies
2687   */
2688  
2689  
2690  var image_deprecated_blockAttributes = {
2691    align: {
2692      type: 'string'
2693    },
2694    url: {
2695      type: 'string',
2696      source: 'attribute',
2697      selector: 'img',
2698      attribute: 'src'
2699    },
2700    alt: {
2701      type: 'string',
2702      source: 'attribute',
2703      selector: 'img',
2704      attribute: 'alt',
2705      default: ''
2706    },
2707    caption: {
2708      type: 'string',
2709      source: 'html',
2710      selector: 'figcaption'
2711    },
2712    href: {
2713      type: 'string',
2714      source: 'attribute',
2715      selector: 'figure > a',
2716      attribute: 'href'
2717    },
2718    rel: {
2719      type: 'string',
2720      source: 'attribute',
2721      selector: 'figure > a',
2722      attribute: 'rel'
2723    },
2724    linkClass: {
2725      type: 'string',
2726      source: 'attribute',
2727      selector: 'figure > a',
2728      attribute: 'class'
2729    },
2730    id: {
2731      type: 'number'
2732    },
2733    width: {
2734      type: 'number'
2735    },
2736    height: {
2737      type: 'number'
2738    },
2739    linkDestination: {
2740      type: 'string'
2741    },
2742    linkTarget: {
2743      type: 'string',
2744      source: 'attribute',
2745      selector: 'figure > a',
2746      attribute: 'target'
2747    }
2748  };
2749  var deprecated_deprecated = [{
2750    attributes: image_deprecated_blockAttributes,
2751    save: function save(_ref) {
2752      var _classnames;
2753  
2754      var attributes = _ref.attributes;
2755      var url = attributes.url,
2756          alt = attributes.alt,
2757          caption = attributes.caption,
2758          align = attributes.align,
2759          href = attributes.href,
2760          width = attributes.width,
2761          height = attributes.height,
2762          id = attributes.id;
2763      var classes = classnames_default()((_classnames = {}, Object(defineProperty["a" /* default */])(_classnames, "align".concat(align), align), Object(defineProperty["a" /* default */])(_classnames, 'is-resized', width || height), _classnames));
2764      var image = Object(external_this_wp_element_["createElement"])("img", {
2765        src: url,
2766        alt: alt,
2767        className: id ? "wp-image-".concat(id) : null,
2768        width: width,
2769        height: height
2770      });
2771      return Object(external_this_wp_element_["createElement"])("figure", {
2772        className: classes
2773      }, href ? Object(external_this_wp_element_["createElement"])("a", {
2774        href: href
2775      }, image) : image, !external_this_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
2776        tagName: "figcaption",
2777        value: caption
2778      }));
2779    }
2780  }, {
2781    attributes: image_deprecated_blockAttributes,
2782    save: function save(_ref2) {
2783      var attributes = _ref2.attributes;
2784      var url = attributes.url,
2785          alt = attributes.alt,
2786          caption = attributes.caption,
2787          align = attributes.align,
2788          href = attributes.href,
2789          width = attributes.width,
2790          height = attributes.height,
2791          id = attributes.id;
2792      var image = Object(external_this_wp_element_["createElement"])("img", {
2793        src: url,
2794        alt: alt,
2795        className: id ? "wp-image-".concat(id) : null,
2796        width: width,
2797        height: height
2798      });
2799      return Object(external_this_wp_element_["createElement"])("figure", {
2800        className: align ? "align".concat(align) : null
2801      }, href ? Object(external_this_wp_element_["createElement"])("a", {
2802        href: href
2803      }, image) : image, !external_this_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
2804        tagName: "figcaption",
2805        value: caption
2806      }));
2807    }
2808  }, {
2809    attributes: image_deprecated_blockAttributes,
2810    save: function save(_ref3) {
2811      var attributes = _ref3.attributes;
2812      var url = attributes.url,
2813          alt = attributes.alt,
2814          caption = attributes.caption,
2815          align = attributes.align,
2816          href = attributes.href,
2817          width = attributes.width,
2818          height = attributes.height;
2819      var extraImageProps = width || height ? {
2820        width: width,
2821        height: height
2822      } : {};
2823      var image = Object(external_this_wp_element_["createElement"])("img", Object(esm_extends["a" /* default */])({
2824        src: url,
2825        alt: alt
2826      }, extraImageProps));
2827      var figureStyle = {};
2828  
2829      if (width) {
2830        figureStyle = {
2831          width: width
2832        };
2833      } else if (align === 'left' || align === 'right') {
2834        figureStyle = {
2835          maxWidth: '50%'
2836        };
2837      }
2838  
2839      return Object(external_this_wp_element_["createElement"])("figure", {
2840        className: align ? "align".concat(align) : null,
2841        style: figureStyle
2842      }, href ? Object(external_this_wp_element_["createElement"])("a", {
2843        href: href
2844      }, image) : image, !external_this_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
2845        tagName: "figcaption",
2846        value: caption
2847      }));
2848    }
2849  }];
2850  /* harmony default export */ var image_deprecated = (deprecated_deprecated);
2851  
2852  // EXTERNAL MODULE: external {"this":["wp","blob"]}
2853  var external_this_wp_blob_ = __webpack_require__(41);
2854  
2855  // EXTERNAL MODULE: external {"this":["wp","compose"]}
2856  var external_this_wp_compose_ = __webpack_require__(10);
2857  
2858  // EXTERNAL MODULE: external {"this":["wp","url"]}
2859  var external_this_wp_url_ = __webpack_require__(31);
2860  
2861  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/crop.js
2862  
2863  
2864  /**
2865   * WordPress dependencies
2866   */
2867  
2868  var crop_crop = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
2869    xmlns: "http://www.w3.org/2000/svg",
2870    viewBox: "0 0 24 24"
2871  }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
2872    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"
2873  }));
2874  /* harmony default export */ var library_crop = (crop_crop);
2875  
2876  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/upload.js
2877  var upload = __webpack_require__(217);
2878  
2879  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/constants.js
2880  var ASPECT_RATIOS = [// Common video resolutions.
2881  {
2882    ratio: '2.33',
2883    className: 'wp-embed-aspect-21-9'
2884  }, {
2885    ratio: '2.00',
2886    className: 'wp-embed-aspect-18-9'
2887  }, {
2888    ratio: '1.78',
2889    className: 'wp-embed-aspect-16-9'
2890  }, {
2891    ratio: '1.33',
2892    className: 'wp-embed-aspect-4-3'
2893  }, // Vertical video and instagram square video support.
2894  {
2895    ratio: '1.00',
2896    className: 'wp-embed-aspect-1-1'
2897  }, {
2898    ratio: '0.56',
2899    className: 'wp-embed-aspect-9-16'
2900  }, {
2901    ratio: '0.50',
2902    className: 'wp-embed-aspect-1-2'
2903  }];
2904  var WP_EMBED_TYPE = 'wp-embed';
2905  
2906  // EXTERNAL MODULE: ./node_modules/classnames/dedupe.js
2907  var dedupe = __webpack_require__(117);
2908  var dedupe_default = /*#__PURE__*/__webpack_require__.n(dedupe);
2909  
2910  // EXTERNAL MODULE: ./node_modules/memize/index.js
2911  var memize = __webpack_require__(60);
2912  var memize_default = /*#__PURE__*/__webpack_require__.n(memize);
2913  
2914  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/util.js
2915  
2916  
2917  
2918  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; }
2919  
2920  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; }
2921  
2922  /**
2923   * Internal dependencies
2924   */
2925  
2926  /**
2927   * External dependencies
2928   */
2929  
2930  
2931  
2932  
2933  /**
2934   * WordPress dependencies
2935   */
2936  
2937  
2938  
2939  /**
2940   * Internal dependencies
2941   */
2942  
2943  var util_metadata = {
2944    apiVersion: 2,
2945    name: "core/embed",
2946    category: "embed",
2947    attributes: {
2948      url: {
2949        type: "string"
2950      },
2951      caption: {
2952        type: "string",
2953        source: "html",
2954        selector: "figcaption"
2955      },
2956      type: {
2957        type: "string"
2958      },
2959      providerNameSlug: {
2960        type: "string"
2961      },
2962      allowResponsive: {
2963        type: "boolean",
2964        "default": true
2965      },
2966      responsive: {
2967        type: "boolean",
2968        "default": false
2969      },
2970      previewable: {
2971        type: "boolean",
2972        "default": true
2973      }
2974    },
2975    supports: {
2976      align: true,
2977      reusable: false,
2978      html: false
2979    }
2980  };
2981  var DEFAULT_EMBED_BLOCK = util_metadata.name;
2982  /** @typedef {import('@wordpress/blocks').WPBlockVariation} WPBlockVariation */
2983  
2984  /**
2985   * Returns the embed block's information by matching the provided service provider
2986   *
2987   * @param {string} provider The embed block's provider
2988   * @return {WPBlockVariation} The embed block's information
2989   */
2990  
2991  var util_getEmbedInfoByProvider = function getEmbedInfoByProvider(provider) {
2992    var _getBlockVariations;
2993  
2994    return (_getBlockVariations = Object(external_this_wp_blocks_["getBlockVariations"])(DEFAULT_EMBED_BLOCK)) === null || _getBlockVariations === void 0 ? void 0 : _getBlockVariations.find(function (_ref) {
2995      var name = _ref.name;
2996      return name === provider;
2997    });
2998  };
2999  /**
3000   * Returns true if any of the regular expressions match the URL.
3001   *
3002   * @param {string}   url      The URL to test.
3003   * @param {Array}    patterns The list of regular expressions to test agains.
3004   * @return {boolean} True if any of the regular expressions match the URL.
3005   */
3006  
3007  var matchesPatterns = function matchesPatterns(url) {
3008    var patterns = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
3009    return patterns.some(function (pattern) {
3010      return url.match(pattern);
3011    });
3012  };
3013  /**
3014   * Finds the block variation that should be used for the URL,
3015   * based on the provided URL and the variation's patterns.
3016   *
3017   * @param {string}  url The URL to test.
3018   * @return {WPBlockVariation} The block variation that should be used for this URL
3019   */
3020  
3021  var util_findMoreSuitableBlock = function findMoreSuitableBlock(url) {
3022    var _getBlockVariations2;
3023  
3024    return (_getBlockVariations2 = Object(external_this_wp_blocks_["getBlockVariations"])(DEFAULT_EMBED_BLOCK)) === null || _getBlockVariations2 === void 0 ? void 0 : _getBlockVariations2.find(function (_ref2) {
3025      var patterns = _ref2.patterns;
3026      return matchesPatterns(url, patterns);
3027    });
3028  };
3029  var isFromWordPress = function isFromWordPress(html) {
3030    return html && html.includes('class="wp-embedded-content"');
3031  };
3032  var util_getPhotoHtml = function getPhotoHtml(photo) {
3033    // 100% width for the preview so it fits nicely into the document, some "thumbnails" are
3034    // actually the full size photo. If thumbnails not found, use full image.
3035    var imageUrl = photo.thumbnail_url || photo.url;
3036    var photoPreview = Object(external_this_wp_element_["createElement"])("p", null, Object(external_this_wp_element_["createElement"])("img", {
3037      src: imageUrl,
3038      alt: photo.title,
3039      width: "100%"
3040    }));
3041    return Object(external_this_wp_element_["renderToString"])(photoPreview);
3042  };
3043  /**
3044   * Creates a more suitable embed block based on the passed in props
3045   * and attributes generated from an embed block's preview.
3046   *
3047   * We require `attributesFromPreview` to be generated from the latest attributes
3048   * and preview, and because of the way the react lifecycle operates, we can't
3049   * guarantee that the attributes contained in the block's props are the latest
3050   * versions, so we require that these are generated separately.
3051   * See `getAttributesFromPreview` in the generated embed edit component.
3052   *
3053   * @param {Object} props                  The block's props.
3054   * @param {Object} [attributesFromPreview]  Attributes generated from the block's most up to date preview.
3055   * @return {Object|undefined} A more suitable embed block if one exists.
3056   */
3057  
3058  var util_createUpgradedEmbedBlock = function createUpgradedEmbedBlock(props) {
3059    var _getBlockVariations3;
3060  
3061    var attributesFromPreview = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
3062    var preview = props.preview,
3063        _props$attributes = props.attributes;
3064    _props$attributes = _props$attributes === void 0 ? {} : _props$attributes;
3065    var url = _props$attributes.url,
3066        providerNameSlug = _props$attributes.providerNameSlug,
3067        type = _props$attributes.type;
3068    if (!url || !Object(external_this_wp_blocks_["getBlockType"])(DEFAULT_EMBED_BLOCK)) return;
3069    var matchedBlock = util_findMoreSuitableBlock(url); // WordPress blocks can work on multiple sites, and so don't have patterns,
3070    // so if we're in a WordPress block, assume the user has chosen it for a WordPress URL.
3071  
3072    var isCurrentBlockWP = providerNameSlug === 'wordpress' || type === WP_EMBED_TYPE; // if current block is not WordPress and a more suitable block found
3073    // that is different from the current one, create the new matched block
3074  
3075    var shouldCreateNewBlock = !isCurrentBlockWP && matchedBlock && (matchedBlock.attributes.providerNameSlug !== providerNameSlug || !providerNameSlug);
3076  
3077    if (shouldCreateNewBlock) {
3078      return Object(external_this_wp_blocks_["createBlock"])(DEFAULT_EMBED_BLOCK, util_objectSpread({
3079        url: url
3080      }, matchedBlock.attributes));
3081    }
3082  
3083    var wpVariation = (_getBlockVariations3 = Object(external_this_wp_blocks_["getBlockVariations"])(DEFAULT_EMBED_BLOCK)) === null || _getBlockVariations3 === void 0 ? void 0 : _getBlockVariations3.find(function (_ref3) {
3084      var name = _ref3.name;
3085      return name === 'wordpress';
3086    }); // We can't match the URL for WordPress embeds, we have to check the HTML instead.
3087  
3088    if (!wpVariation || !preview || !isFromWordPress(preview.html) || isCurrentBlockWP) {
3089      return;
3090    } // This is not the WordPress embed block so transform it into one.
3091  
3092  
3093    return Object(external_this_wp_blocks_["createBlock"])(DEFAULT_EMBED_BLOCK, util_objectSpread(util_objectSpread({
3094      url: url
3095    }, wpVariation.attributes), attributesFromPreview));
3096  };
3097  /**
3098   * Removes all previously set aspect ratio related classes and return the rest
3099   * existing class names.
3100   *
3101   * @param {string} existingClassNames Any existing class names.
3102   * @return {string} The class names without any aspect ratio related class.
3103   */
3104  
3105  var util_removeAspectRatioClasses = function removeAspectRatioClasses(existingClassNames) {
3106    var aspectRatioClassNames = ASPECT_RATIOS.reduce(function (accumulator, _ref4) {
3107      var className = _ref4.className;
3108      accumulator[className] = false;
3109      return accumulator;
3110    }, {
3111      'wp-has-aspect-ratio': false
3112    });
3113    return dedupe_default()(existingClassNames, aspectRatioClassNames);
3114  };
3115  /**
3116   * Returns class names with any relevant responsive aspect ratio names.
3117   *
3118   * @param {string}  html               The preview HTML that possibly contains an iframe with width and height set.
3119   * @param {string}  existingClassNames Any existing class names.
3120   * @param {boolean} allowResponsive    If the responsive class names should be added, or removed.
3121   * @return {string} Deduped class names.
3122   */
3123  
3124  function getClassNames(html) {
3125    var existingClassNames = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
3126    var allowResponsive = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
3127  
3128    if (!allowResponsive) {
3129      return util_removeAspectRatioClasses(existingClassNames);
3130    }
3131  
3132    var previewDocument = document.implementation.createHTMLDocument('');
3133    previewDocument.body.innerHTML = html;
3134    var iframe = previewDocument.body.querySelector('iframe'); // If we have a fixed aspect iframe, and it's a responsive embed block.
3135  
3136    if (iframe && iframe.height && iframe.width) {
3137      var aspectRatio = (iframe.width / iframe.height).toFixed(2); // Given the actual aspect ratio, find the widest ratio to support it.
3138  
3139      for (var ratioIndex = 0; ratioIndex < ASPECT_RATIOS.length; ratioIndex++) {
3140        var potentialRatio = ASPECT_RATIOS[ratioIndex];
3141  
3142        if (aspectRatio >= potentialRatio.ratio) {
3143          return dedupe_default()(util_removeAspectRatioClasses(existingClassNames), potentialRatio.className, 'wp-has-aspect-ratio');
3144        }
3145      }
3146    }
3147  
3148    return existingClassNames;
3149  }
3150  /**
3151   * Fallback behaviour for unembeddable URLs.
3152   * Creates a paragraph block containing a link to the URL, and calls `onReplace`.
3153   *
3154   * @param {string}   url       The URL that could not be embedded.
3155   * @param {Function} onReplace Function to call with the created fallback block.
3156   */
3157  
3158  function util_fallback(url, onReplace) {
3159    var link = Object(external_this_wp_element_["createElement"])("a", {
3160      href: url
3161    }, url);
3162    onReplace(Object(external_this_wp_blocks_["createBlock"])('core/paragraph', {
3163      content: Object(external_this_wp_element_["renderToString"])(link)
3164    }));
3165  }
3166  /***
3167   * Gets block attributes based on the preview and responsive state.
3168   *
3169   * @param {Object} preview The preview data.
3170   * @param {string} title The block's title, e.g. Twitter.
3171   * @param {Object} currentClassNames The block's current class names.
3172   * @param {boolean} isResponsive Boolean indicating if the block supports responsive content.
3173   * @param {boolean} allowResponsive Apply responsive classes to fixed size content.
3174   * @return {Object} Attributes and values.
3175   */
3176  
3177  var getAttributesFromPreview = memize_default()(function (preview, title, currentClassNames, isResponsive) {
3178    var allowResponsive = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
3179  
3180    if (!preview) {
3181      return {};
3182    }
3183  
3184    var attributes = {}; // Some plugins only return HTML with no type info, so default this to 'rich'.
3185  
3186    var _preview$type = preview.type,
3187        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,
3188    // because not all embed code gives us a provider name.
3189  
3190    var html = preview.html,
3191        providerName = preview.provider_name;
3192    var providerNameSlug = Object(external_this_lodash_["kebabCase"])((providerName || title).toLowerCase());
3193  
3194    if (isFromWordPress(html)) {
3195      type = WP_EMBED_TYPE;
3196    }
3197  
3198    if (html || 'photo' === type) {
3199      attributes.type = type;
3200      attributes.providerNameSlug = providerNameSlug;
3201    }
3202  
3203    attributes.className = getClassNames(html, currentClassNames, isResponsive && allowResponsive);
3204    return attributes;
3205  });
3206  
3207  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/use-client-width.js
3208  
3209  
3210  /**
3211   * WordPress dependencies
3212   */
3213  
3214  function useClientWidth(ref, dependencies) {
3215    var _useState = Object(external_this_wp_element_["useState"])(),
3216        _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
3217        clientWidth = _useState2[0],
3218        setClientWidth = _useState2[1];
3219  
3220    function calculateClientWidth() {
3221      setClientWidth(ref.current.clientWidth);
3222    }
3223  
3224    Object(external_this_wp_element_["useEffect"])(calculateClientWidth, dependencies);
3225    Object(external_this_wp_element_["useEffect"])(function () {
3226      var defaultView = ref.current.ownerDocument.defaultView;
3227      defaultView.addEventListener('resize', calculateClientWidth);
3228      return function () {
3229        defaultView.removeEventListener('resize', calculateClientWidth);
3230      };
3231    }, []);
3232    return clientWidth;
3233  }
3234  
3235  // CONCATENATED MODULE: ./node_modules/react-easy-crop/node_modules/tslib/tslib.es6.js
3236  /*! *****************************************************************************

3237  Copyright (c) Microsoft Corporation.

3238  

3239  Permission to use, copy, modify, and/or distribute this software for any

3240  purpose with or without fee is hereby granted.

3241  

3242  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH

3243  REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY

3244  AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,

3245  INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM

3246  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR

3247  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR

3248  PERFORMANCE OF THIS SOFTWARE.

3249  ***************************************************************************** */
3250  /* global Reflect, Promise */

3251  
3252  var extendStatics = function(d, b) {
3253      extendStatics = Object.setPrototypeOf ||
3254          ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
3255          function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
3256      return extendStatics(d, b);
3257  };
3258  
3259  function __extends(d, b) {
3260      extendStatics(d, b);
3261      function __() { this.constructor = d; }
3262      d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3263  }
3264  
3265  var __assign = function() {
3266      __assign = Object.assign || function __assign(t) {
3267          for (var s, i = 1, n = arguments.length; i < n; i++) {
3268              s = arguments[i];
3269              for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
3270          }
3271          return t;
3272      }
3273      return __assign.apply(this, arguments);
3274  }
3275  
3276  function __rest(s, e) {
3277      var t = {};
3278      for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
3279          t[p] = s[p];
3280      if (s != null && typeof Object.getOwnPropertySymbols === "function")
3281          for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
3282              if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
3283                  t[p[i]] = s[p[i]];
3284          }
3285      return t;
3286  }
3287  
3288  function __decorate(decorators, target, key, desc) {
3289      var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3290      if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
3291      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;
3292      return c > 3 && r && Object.defineProperty(target, key, r), r;
3293  }
3294  
3295  function __param(paramIndex, decorator) {
3296      return function (target, key) { decorator(target, key, paramIndex); }
3297  }
3298  
3299  function __metadata(metadataKey, metadataValue) {
3300      if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
3301  }
3302  
3303  function __awaiter(thisArg, _arguments, P, generator) {
3304      function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3305      return new (P || (P = Promise))(function (resolve, reject) {
3306          function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
3307          function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
3308          function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
3309          step((generator = generator.apply(thisArg, _arguments || [])).next());
3310      });
3311  }
3312  
3313  function __generator(thisArg, body) {
3314      var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
3315      return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
3316      function verb(n) { return function (v) { return step([n, v]); }; }
3317      function step(op) {
3318          if (f) throw new TypeError("Generator is already executing.");
3319          while (_) try {
3320              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;
3321              if (y = 0, t) op = [op[0] & 2, t.value];
3322              switch (op[0]) {
3323                  case 0: case 1: t = op; break;
3324                  case 4: _.label++; return { value: op[1], done: false };
3325                  case 5: _.label++; y = op[1]; op = [0]; continue;
3326                  case 7: op = _.ops.pop(); _.trys.pop(); continue;
3327                  default:
3328                      if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
3329                      if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
3330                      if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
3331                      if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
3332                      if (t[2]) _.ops.pop();
3333                      _.trys.pop(); continue;
3334              }
3335              op = body.call(thisArg, _);
3336          } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
3337          if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
3338      }
3339  }
3340  
3341  var __createBinding = Object.create ? (function(o, m, k, k2) {
3342      if (k2 === undefined) k2 = k;
3343      Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
3344  }) : (function(o, m, k, k2) {
3345      if (k2 === undefined) k2 = k;
3346      o[k2] = m[k];
3347  });
3348  
3349  function __exportStar(m, o) {
3350      for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
3351  }
3352  
3353  function __values(o) {
3354      var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
3355      if (m) return m.call(o);
3356      if (o && typeof o.length === "number") return {
3357          next: function () {
3358              if (o && i >= o.length) o = void 0;
3359              return { value: o && o[i++], done: !o };
3360          }
3361      };
3362      throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
3363  }
3364  
3365  function __read(o, n) {
3366      var m = typeof Symbol === "function" && o[Symbol.iterator];
3367      if (!m) return o;
3368      var i = m.call(o), r, ar = [], e;
3369      try {
3370          while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
3371      }
3372      catch (error) { e = { error: error }; }
3373      finally {
3374          try {
3375              if (r && !r.done && (m = i["return"])) m.call(i);
3376          }
3377          finally { if (e) throw e.error; }
3378      }
3379      return ar;
3380  }
3381  
3382  function __spread() {
3383      for (var ar = [], i = 0; i < arguments.length; i++)
3384          ar = ar.concat(__read(arguments[i]));
3385      return ar;
3386  }
3387  
3388  function __spreadArrays() {
3389      for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
3390      for (var r = Array(s), k = 0, i = 0; i < il; i++)
3391          for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
3392              r[k] = a[j];
3393      return r;
3394  };
3395  
3396  function __await(v) {
3397      return this instanceof __await ? (this.v = v, this) : new __await(v);
3398  }
3399  
3400  function __asyncGenerator(thisArg, _arguments, generator) {
3401      if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
3402      var g = generator.apply(thisArg, _arguments || []), i, q = [];
3403      return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
3404      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); }); }; }
3405      function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
3406      function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
3407      function fulfill(value) { resume("next", value); }
3408      function reject(value) { resume("throw", value); }
3409      function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
3410  }
3411  
3412  function __asyncDelegator(o) {
3413      var i, p;
3414      return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
3415      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; }
3416  }
3417  
3418  function __asyncValues(o) {
3419      if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
3420      var m = o[Symbol.asyncIterator], i;
3421      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);
3422      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); }); }; }
3423      function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
3424  }
3425  
3426  function __makeTemplateObject(cooked, raw) {
3427      if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3428      return cooked;
3429  };
3430  
3431  var __setModuleDefault = Object.create ? (function(o, v) {
3432      Object.defineProperty(o, "default", { enumerable: true, value: v });
3433  }) : function(o, v) {
3434      o["default"] = v;
3435  };
3436  
3437  function __importStar(mod) {
3438      if (mod && mod.__esModule) return mod;
3439      var result = {};
3440      if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
3441      __setModuleDefault(result, mod);
3442      return result;
3443  }
3444  
3445  function __importDefault(mod) {
3446      return (mod && mod.__esModule) ? mod : { default: mod };
3447  }
3448  
3449  function __classPrivateFieldGet(receiver, privateMap) {
3450      if (!privateMap.has(receiver)) {
3451          throw new TypeError("attempted to get private field on non-instance");
3452      }
3453      return privateMap.get(receiver);
3454  }
3455  
3456  function __classPrivateFieldSet(receiver, privateMap, value) {
3457      if (!privateMap.has(receiver)) {
3458          throw new TypeError("attempted to set private field on non-instance");
3459      }
3460      privateMap.set(receiver, value);
3461      return value;
3462  }
3463  
3464  // EXTERNAL MODULE: external {"this":"React"}
3465  var external_this_React_ = __webpack_require__(13);
3466  var external_this_React_default = /*#__PURE__*/__webpack_require__.n(external_this_React_);
3467  
3468  // CONCATENATED MODULE: ./node_modules/react-easy-crop/index.module.js
3469  
3470  
3471  
3472  /**

3473   * Compute the dimension of the crop area based on media size,

3474   * aspect ratio and optionally rotation

3475   */
3476  
3477  function getCropSize(mediaWidth, mediaHeight, containerWidth, containerHeight, aspect, rotation) {
3478    if (rotation === void 0) {
3479      rotation = 0;
3480    }
3481  
3482    var _a = translateSize(mediaWidth, mediaHeight, rotation),
3483        width = _a.width,
3484        height = _a.height;
3485  
3486    var fittingWidth = Math.min(width, containerWidth);
3487    var fittingHeight = Math.min(height, containerHeight);
3488  
3489    if (fittingWidth > fittingHeight * aspect) {
3490      return {
3491        width: fittingHeight * aspect,
3492        height: fittingHeight
3493      };
3494    }
3495  
3496    return {
3497      width: fittingWidth,
3498      height: fittingWidth / aspect
3499    };
3500  }
3501  /**

3502   * Ensure a new media position stays in the crop area.

3503   */
3504  
3505  function index_module_restrictPosition(position, mediaSize, cropSize, zoom, rotation) {
3506    if (rotation === void 0) {
3507      rotation = 0;
3508    }
3509  
3510    var _a = translateSize(mediaSize.width, mediaSize.height, rotation),
3511        width = _a.width,
3512        height = _a.height;
3513  
3514    return {
3515      x: restrictPositionCoord(position.x, width, cropSize.width, zoom),
3516      y: restrictPositionCoord(position.y, height, cropSize.height, zoom)
3517    };
3518  }
3519  
3520  function restrictPositionCoord(position, mediaSize, cropSize, zoom) {
3521    var maxPosition = mediaSize * zoom / 2 - cropSize / 2;
3522    return Math.min(maxPosition, Math.max(position, -maxPosition));
3523  }
3524  
3525  function getDistanceBetweenPoints(pointA, pointB) {
3526    return Math.sqrt(Math.pow(pointA.y - pointB.y, 2) + Math.pow(pointA.x - pointB.x, 2));
3527  }
3528  function getRotationBetweenPoints(pointA, pointB) {
3529    return Math.atan2(pointB.y - pointA.y, pointB.x - pointA.x) * 180 / Math.PI;
3530  }
3531  /**

3532   * Compute the output cropped area of the media in percentages and pixels.

3533   * x/y are the top-left coordinates on the src media

3534   */
3535  
3536  function computeCroppedArea(crop, mediaSize, cropSize, aspect, zoom, rotation, restrictPosition) {
3537    if (rotation === void 0) {
3538      rotation = 0;
3539    }
3540  
3541    if (restrictPosition === void 0) {
3542      restrictPosition = true;
3543    } // if the media is rotated by the user, we cannot limit the position anymore
3544    // as it might need to be negative.
3545  
3546  
3547    var limitAreaFn = restrictPosition && rotation === 0 ? limitArea : noOp;
3548    var croppedAreaPercentages = {
3549      x: limitAreaFn(100, ((mediaSize.width - cropSize.width / zoom) / 2 - crop.x / zoom) / mediaSize.width * 100),
3550      y: limitAreaFn(100, ((mediaSize.height - cropSize.height / zoom) / 2 - crop.y / zoom) / mediaSize.height * 100),
3551      width: limitAreaFn(100, cropSize.width / mediaSize.width * 100 / zoom),
3552      height: limitAreaFn(100, cropSize.height / mediaSize.height * 100 / zoom)
3553    }; // we compute the pixels size naively
3554  
3555    var widthInPixels = Math.round(limitAreaFn(mediaSize.naturalWidth, croppedAreaPercentages.width * mediaSize.naturalWidth / 100));
3556    var heightInPixels = Math.round(limitAreaFn(mediaSize.naturalHeight, croppedAreaPercentages.height * mediaSize.naturalHeight / 100));
3557    var isImgWiderThanHigh = mediaSize.naturalWidth >= mediaSize.naturalHeight * aspect; // then we ensure the width and height exactly match the aspect (to avoid rounding approximations)
3558    // if the media is wider than high, when zoom is 0, the crop height will be equals to iamge height
3559    // thus we want to compute the width from the height and aspect for accuracy.
3560    // Otherwise, we compute the height from width and aspect.
3561  
3562    var sizePixels = isImgWiderThanHigh ? {
3563      width: Math.round(heightInPixels * aspect),
3564      height: heightInPixels
3565    } : {
3566      width: widthInPixels,
3567      height: Math.round(widthInPixels / aspect)
3568    };
3569  
3570    var croppedAreaPixels = __assign(__assign({}, sizePixels), {
3571      x: Math.round(limitAreaFn(mediaSize.naturalWidth - sizePixels.width, croppedAreaPercentages.x * mediaSize.naturalWidth / 100)),
3572      y: Math.round(limitAreaFn(mediaSize.naturalHeight - sizePixels.height, croppedAreaPercentages.y * mediaSize.naturalHeight / 100))
3573    });
3574  
3575    return {
3576      croppedAreaPercentages: croppedAreaPercentages,
3577      croppedAreaPixels: croppedAreaPixels
3578    };
3579  }
3580  /**

3581   * Ensure the returned value is between 0 and max

3582   */
3583  
3584  function limitArea(max, value) {
3585    return Math.min(max, Math.max(0, value));
3586  }
3587  
3588  function noOp(_max, value) {
3589    return value;
3590  }
3591  /**

3592   * Compute the crop and zoom from the croppedAreaPixels

3593   */
3594  
3595  
3596  function getZoomFromCroppedAreaPixels(croppedAreaPixels, mediaSize, cropSize) {
3597    var mediaZoom = mediaSize.width / mediaSize.naturalWidth;
3598  
3599    if (cropSize) {
3600      var isHeightMaxSize_1 = cropSize.height > cropSize.width;
3601      return isHeightMaxSize_1 ? cropSize.height / mediaZoom / croppedAreaPixels.height : cropSize.width / mediaZoom / croppedAreaPixels.width;
3602    }
3603  
3604    var aspect = croppedAreaPixels.width / croppedAreaPixels.height;
3605    var isHeightMaxSize = mediaSize.naturalWidth >= mediaSize.naturalHeight * aspect;
3606    return isHeightMaxSize ? mediaSize.naturalHeight / croppedAreaPixels.height : mediaSize.naturalWidth / croppedAreaPixels.width;
3607  }
3608  /**

3609   * Compute the crop and zoom from the croppedAreaPixels

3610   */
3611  
3612  
3613  function getInitialCropFromCroppedAreaPixels(croppedAreaPixels, mediaSize, cropSize) {
3614    var mediaZoom = mediaSize.width / mediaSize.naturalWidth;
3615    var zoom = getZoomFromCroppedAreaPixels(croppedAreaPixels, mediaSize, cropSize);
3616    var cropZoom = mediaZoom * zoom;
3617    var crop = {
3618      x: ((mediaSize.naturalWidth - croppedAreaPixels.width) / 2 - croppedAreaPixels.x) * cropZoom,
3619      y: ((mediaSize.naturalHeight - croppedAreaPixels.height) / 2 - croppedAreaPixels.y) * cropZoom
3620    };
3621    return {
3622      crop: crop,
3623      zoom: zoom
3624    };
3625  }
3626  /**

3627   * Return the point that is the center of point a and b

3628   */
3629  
3630  function getCenter(a, b) {
3631    return {
3632      x: (b.x + a.x) / 2,
3633      y: (b.y + a.y) / 2
3634    };
3635  }
3636  /**

3637   *

3638   * Returns an x,y point once rotated around xMid,yMid

3639   */
3640  
3641  function rotateAroundMidPoint(x, y, xMid, yMid, degrees) {
3642    var cos = Math.cos;
3643    var sin = Math.sin;
3644    var radian = degrees * Math.PI / 180; // Convert to radians
3645    // Subtract midpoints, so that midpoint is translated to origin
3646    // and add it in the end again
3647  
3648    var xr = (x - xMid) * cos(radian) - (y - yMid) * sin(radian) + xMid;
3649    var yr = (x - xMid) * sin(radian) + (y - yMid) * cos(radian) + yMid;
3650    return [xr, yr];
3651  }
3652  /**

3653   * Returns the new bounding area of a rotated rectangle.

3654   */
3655  
3656  function translateSize(width, height, rotation) {
3657    var centerX = width / 2;
3658    var centerY = height / 2;
3659    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)];
3660    var minX = Math.min.apply(Math, outerBounds.map(function (p) {
3661      return p[0];
3662    }));
3663    var maxX = Math.max.apply(Math, outerBounds.map(function (p) {
3664      return p[0];
3665    }));
3666    var minY = Math.min.apply(Math, outerBounds.map(function (p) {
3667      return p[1];
3668    }));
3669    var maxY = Math.max.apply(Math, outerBounds.map(function (p) {
3670      return p[1];
3671    }));
3672    return {
3673      width: maxX - minX,
3674      height: maxY - minY
3675    };
3676  }
3677  /**

3678   * Combine multiple class names into a single string.

3679   */
3680  
3681  function index_module_classNames() {
3682    var args = [];
3683  
3684    for (var _i = 0; _i < arguments.length; _i++) {
3685      args[_i] = arguments[_i];
3686    }
3687  
3688    return args.filter(function (value) {
3689      if (typeof value === 'string' && value.length > 0) {
3690        return true;
3691      }
3692  
3693      return false;
3694    }).join(' ').trim();
3695  }
3696  
3697  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";
3698  
3699  var MIN_ZOOM = 1;
3700  var MAX_ZOOM = 3;
3701  
3702  var index_module_Cropper =
3703  /** @class */
3704  function (_super) {
3705    __extends(Cropper, _super);
3706  
3707    function Cropper() {
3708      var _this = _super !== null && _super.apply(this, arguments) || this;
3709  
3710      _this.imageRef = null;
3711      _this.videoRef = null;
3712      _this.containerRef = null;
3713      _this.styleRef = null;
3714      _this.containerRect = null;
3715      _this.mediaSize = {
3716        width: 0,
3717        height: 0,
3718        naturalWidth: 0,
3719        naturalHeight: 0
3720      };
3721      _this.dragStartPosition = {
3722        x: 0,
3723        y: 0
3724      };
3725      _this.dragStartCrop = {
3726        x: 0,
3727        y: 0
3728      };
3729      _this.lastPinchDistance = 0;
3730      _this.lastPinchRotation = 0;
3731      _this.rafDragTimeout = null;
3732      _this.rafPinchTimeout = null;
3733      _this.wheelTimer = null;
3734      _this.state = {
3735        cropSize: null,
3736        hasWheelJustStarted: false
3737      }; // this is to prevent Safari on iOS >= 10 to zoom the page
3738  
3739      _this.preventZoomSafari = function (e) {
3740        return e.preventDefault();
3741      };
3742  
3743      _this.cleanEvents = function () {
3744        document.removeEventListener('mousemove', _this.onMouseMove);
3745        document.removeEventListener('mouseup', _this.onDragStopped);
3746        document.removeEventListener('touchmove', _this.onTouchMove);
3747        document.removeEventListener('touchend', _this.onDragStopped);
3748      };
3749  
3750      _this.clearScrollEvent = function () {
3751        if (_this.containerRef) _this.containerRef.removeEventListener('wheel', _this.onWheel);
3752  
3753        if (_this.wheelTimer) {
3754          clearTimeout(_this.wheelTimer);
3755        }
3756      };
3757  
3758      _this.onMediaLoad = function () {
3759        _this.computeSizes();
3760  
3761        _this.emitCropData();
3762  
3763        _this.setInitialCrop();
3764  
3765        if (_this.props.onMediaLoaded) {
3766          _this.props.onMediaLoaded(_this.mediaSize);
3767        }
3768      };
3769  
3770      _this.setInitialCrop = function () {
3771        var _a = _this.props,
3772            initialCroppedAreaPixels = _a.initialCroppedAreaPixels,
3773            cropSize = _a.cropSize;
3774  
3775        if (!initialCroppedAreaPixels) {
3776          return;
3777        }
3778  
3779        var _b = getInitialCropFromCroppedAreaPixels(initialCroppedAreaPixels, _this.mediaSize, cropSize),
3780            crop = _b.crop,
3781            zoom = _b.zoom;
3782  
3783        _this.props.onCropChange(crop);
3784  
3785        _this.props.onZoomChange && _this.props.onZoomChange(zoom);
3786      };
3787  
3788      _this.computeSizes = function () {
3789        var _a, _b, _c, _d, _e, _f;
3790  
3791        var mediaRef = _this.imageRef || _this.videoRef;
3792  
3793        if (mediaRef && _this.containerRef) {
3794          _this.containerRect = _this.containerRef.getBoundingClientRect();
3795          _this.mediaSize = {
3796            width: mediaRef.offsetWidth,
3797            height: mediaRef.offsetHeight,
3798            naturalWidth: ((_a = _this.imageRef) === null || _a === void 0 ? void 0 : _a.naturalWidth) || ((_b = _this.videoRef) === null || _b === void 0 ? void 0 : _b.videoWidth) || 0,
3799            naturalHeight: ((_c = _this.imageRef) === null || _c === void 0 ? void 0 : _c.naturalHeight) || ((_d = _this.videoRef) === null || _d === void 0 ? void 0 : _d.videoHeight) || 0
3800          };
3801          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);
3802  
3803          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) {
3804            _this.props.onCropSizeChange && _this.props.onCropSizeChange(cropSize);
3805          }
3806  
3807          _this.setState({
3808            cropSize: cropSize
3809          }, _this.recomputeCropPosition);
3810        }
3811      };
3812  
3813      _this.onMouseDown = function (e) {
3814        e.preventDefault();
3815        document.addEventListener('mousemove', _this.onMouseMove);
3816        document.addEventListener('mouseup', _this.onDragStopped);
3817  
3818        _this.onDragStart(Cropper.getMousePoint(e));
3819      };
3820  
3821      _this.onMouseMove = function (e) {
3822        return _this.onDrag(Cropper.getMousePoint(e));
3823      };
3824  
3825      _this.onTouchStart = function (e) {
3826        e.preventDefault();
3827        document.addEventListener('touchmove', _this.onTouchMove, {
3828          passive: false
3829        }); // iOS 11 now defaults to passive: true
3830  
3831        document.addEventListener('touchend', _this.onDragStopped);
3832  
3833        if (e.touches.length === 2) {
3834          _this.onPinchStart(e);
3835        } else if (e.touches.length === 1) {
3836          _this.onDragStart(Cropper.getTouchPoint(e.touches[0]));
3837        }
3838      };
3839  
3840      _this.onTouchMove = function (e) {
3841        // Prevent whole page from scrolling on iOS.
3842        e.preventDefault();
3843  
3844        if (e.touches.length === 2) {
3845          _this.onPinchMove(e);
3846        } else if (e.touches.length === 1) {
3847          _this.onDrag(Cropper.getTouchPoint(e.touches[0]));
3848        }
3849      };
3850  
3851      _this.onDragStart = function (_a) {
3852        var _b, _c;
3853  
3854        var x = _a.x,
3855            y = _a.y;
3856        _this.dragStartPosition = {
3857          x: x,
3858          y: y
3859        };
3860        _this.dragStartCrop = __assign({}, _this.props.crop);
3861        (_c = (_b = _this.props).onInteractionStart) === null || _c === void 0 ? void 0 : _c.call(_b);
3862      };
3863  
3864      _this.onDrag = function (_a) {
3865        var x = _a.x,
3866            y = _a.y;
3867        if (_this.rafDragTimeout) window.cancelAnimationFrame(_this.rafDragTimeout);
3868        _this.rafDragTimeout = window.requestAnimationFrame(function () {
3869          if (!_this.state.cropSize) return;
3870          if (x === undefined || y === undefined) return;
3871          var offsetX = x - _this.dragStartPosition.x;
3872          var offsetY = y - _this.dragStartPosition.y;
3873          var requestedPosition = {
3874            x: _this.dragStartCrop.x + offsetX,
3875            y: _this.dragStartCrop.y + offsetY
3876          };
3877          var newPosition = _this.props.restrictPosition ? index_module_restrictPosition(requestedPosition, _this.mediaSize, _this.state.cropSize, _this.props.zoom, _this.props.rotation) : requestedPosition;
3878  
3879          _this.props.onCropChange(newPosition);
3880        });
3881      };
3882  
3883      _this.onDragStopped = function () {
3884        var _a, _b;
3885  
3886        _this.cleanEvents();
3887  
3888        _this.emitCropData();
3889  
3890        (_b = (_a = _this.props).onInteractionEnd) === null || _b === void 0 ? void 0 : _b.call(_a);
3891      };
3892  
3893      _this.onWheel = function (e) {
3894        e.preventDefault();
3895        var point = Cropper.getMousePoint(e);
3896        var newZoom = _this.props.zoom - e.deltaY * _this.props.zoomSpeed / 200;
3897  
3898        _this.setNewZoom(newZoom, point);
3899  
3900        if (!_this.state.hasWheelJustStarted) {
3901          _this.setState({
3902            hasWheelJustStarted: true
3903          }, function () {
3904            var _a, _b;
3905  
3906            return (_b = (_a = _this.props).onInteractionStart) === null || _b === void 0 ? void 0 : _b.call(_a);
3907          });
3908        }
3909  
3910        if (_this.wheelTimer) {
3911          clearTimeout(_this.wheelTimer);
3912        }
3913  
3914        _this.wheelTimer = window.setTimeout(function () {
3915          return _this.setState({
3916            hasWheelJustStarted: false
3917          }, function () {
3918            var _a, _b;
3919  
3920            return (_b = (_a = _this.props).onInteractionEnd) === null || _b === void 0 ? void 0 : _b.call(_a);
3921          });
3922        }, 250);
3923      };
3924  
3925      _this.getPointOnContainer = function (_a) {
3926        var x = _a.x,
3927            y = _a.y;
3928  
3929        if (!_this.containerRect) {
3930          throw new Error('The Cropper is not mounted');
3931        }
3932  
3933        return {
3934          x: _this.containerRect.width / 2 - (x - _this.containerRect.left),
3935          y: _this.containerRect.height / 2 - (y - _this.containerRect.top)
3936        };
3937      };
3938  
3939      _this.getPointOnMedia = function (_a) {
3940        var x = _a.x,
3941            y = _a.y;
3942        var _b = _this.props,
3943            crop = _b.crop,
3944            zoom = _b.zoom;
3945        return {
3946          x: (x + crop.x) / zoom,
3947          y: (y + crop.y) / zoom
3948        };
3949      };
3950  
3951      _this.setNewZoom = function (zoom, point) {
3952        if (!_this.state.cropSize || !_this.props.onZoomChange) return;
3953  
3954        var zoomPoint = _this.getPointOnContainer(point);
3955  
3956        var zoomTarget = _this.getPointOnMedia(zoomPoint);
3957  
3958        var newZoom = Math.min(_this.props.maxZoom, Math.max(zoom, _this.props.minZoom));
3959        var requestedPosition = {
3960          x: zoomTarget.x * newZoom - zoomPoint.x,
3961          y: zoomTarget.y * newZoom - zoomPoint.y
3962        };
3963        var newPosition = _this.props.restrictPosition ? index_module_restrictPosition(requestedPosition, _this.mediaSize, _this.state.cropSize, newZoom, _this.props.rotation) : requestedPosition;
3964  
3965        _this.props.onCropChange(newPosition);
3966  
3967        _this.props.onZoomChange(newZoom);
3968      };
3969  
3970      _this.emitCropData = function () {
3971        if (!_this.state.cropSize) return; // this is to ensure the crop is correctly restricted after a zoom back (https://github.com/ricardo-ch/react-easy-crop/issues/6)
3972  
3973        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;
3974  
3975        var _a = computeCroppedArea(restrictedPosition, _this.mediaSize, _this.state.cropSize, _this.getAspect(), _this.props.zoom, _this.props.rotation, _this.props.restrictPosition),
3976            croppedAreaPercentages = _a.croppedAreaPercentages,
3977            croppedAreaPixels = _a.croppedAreaPixels;
3978  
3979        _this.props.onCropComplete && _this.props.onCropComplete(croppedAreaPercentages, croppedAreaPixels);
3980      };
3981  
3982      _this.recomputeCropPosition = function () {
3983        if (!_this.state.cropSize) return;
3984        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;
3985  
3986        _this.props.onCropChange(newPosition);
3987  
3988        _this.emitCropData();
3989      };
3990  
3991      return _this;
3992    }
3993  
3994    Cropper.prototype.componentDidMount = function () {
3995      window.addEventListener('resize', this.computeSizes);
3996  
3997      if (this.containerRef) {
3998        this.props.zoomWithScroll && this.containerRef.addEventListener('wheel', this.onWheel, {
3999          passive: false
4000        });
4001        this.containerRef.addEventListener('gesturestart', this.preventZoomSafari);
4002        this.containerRef.addEventListener('gesturechange', this.preventZoomSafari);
4003      }
4004  
4005      if (!this.props.disableAutomaticStylesInjection) {
4006        this.styleRef = document.createElement('style');
4007        this.styleRef.setAttribute('type', 'text/css');
4008        this.styleRef.innerHTML = css_248z;
4009        document.head.appendChild(this.styleRef);
4010      } // when rendered via SSR, the image can already be loaded and its onLoad callback will never be called
4011  
4012  
4013      if (this.imageRef && this.imageRef.complete) {
4014        this.onMediaLoad();
4015      }
4016    };
4017  
4018    Cropper.prototype.componentWillUnmount = function () {
4019      window.removeEventListener('resize', this.computeSizes);
4020  
4021      if (this.containerRef) {
4022        this.containerRef.removeEventListener('gesturestart', this.preventZoomSafari);
4023        this.containerRef.removeEventListener('gesturechange', this.preventZoomSafari);
4024      }
4025  
4026      if (this.styleRef) {
4027        this.styleRef.remove();
4028      }
4029  
4030      this.cleanEvents();
4031      this.props.zoomWithScroll && this.clearScrollEvent();
4032    };
4033  
4034    Cropper.prototype.componentDidUpdate = function (prevProps) {
4035      var _a, _b, _c, _d;
4036  
4037      if (prevProps.rotation !== this.props.rotation) {
4038        this.computeSizes();
4039        this.recomputeCropPosition();
4040      } else if (prevProps.aspect !== this.props.aspect) {
4041        this.computeSizes();
4042      } else if (prevProps.zoom !== this.props.zoom) {
4043        this.recomputeCropPosition();
4044      } 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)) {
4045        this.computeSizes();
4046      }
4047  
4048      if (prevProps.zoomWithScroll !== this.props.zoomWithScroll && this.containerRef) {
4049        this.props.zoomWithScroll ? this.containerRef.addEventListener('wheel', this.onWheel, {
4050          passive: false
4051        }) : this.clearScrollEvent();
4052      }
4053    };
4054  
4055    Cropper.prototype.getAspect = function () {
4056      var _a = this.props,
4057          cropSize = _a.cropSize,
4058          aspect = _a.aspect;
4059  
4060      if (cropSize) {
4061        return cropSize.width / cropSize.height;
4062      }
4063  
4064      return aspect;
4065    };
4066  
4067    Cropper.prototype.onPinchStart = function (e) {
4068      var pointA = Cropper.getTouchPoint(e.touches[0]);
4069      var pointB = Cropper.getTouchPoint(e.touches[1]);
4070      this.lastPinchDistance = getDistanceBetweenPoints(pointA, pointB);
4071      this.lastPinchRotation = getRotationBetweenPoints(pointA, pointB);
4072      this.onDragStart(getCenter(pointA, pointB));
4073    };
4074  
4075    Cropper.prototype.onPinchMove = function (e) {
4076      var _this = this;
4077  
4078      var pointA = Cropper.getTouchPoint(e.touches[0]);
4079      var pointB = Cropper.getTouchPoint(e.touches[1]);
4080      var center = getCenter(pointA, pointB);
4081      this.onDrag(center);
4082      if (this.rafPinchTimeout) window.cancelAnimationFrame(this.rafPinchTimeout);
4083      this.rafPinchTimeout = window.requestAnimationFrame(function () {
4084        var distance = getDistanceBetweenPoints(pointA, pointB);
4085        var newZoom = _this.props.zoom * (distance / _this.lastPinchDistance);
4086  
4087        _this.setNewZoom(newZoom, center);
4088  
4089        _this.lastPinchDistance = distance;
4090        var rotation = getRotationBetweenPoints(pointA, pointB);
4091        var newRotation = _this.props.rotation + (rotation - _this.lastPinchRotation);
4092        _this.props.onRotationChange && _this.props.onRotationChange(newRotation);
4093        _this.lastPinchRotation = rotation;
4094      });
4095    };
4096  
4097    Cropper.prototype.render = function () {
4098      var _this = this;
4099  
4100      var _a = this.props,
4101          image = _a.image,
4102          video = _a.video,
4103          mediaProps = _a.mediaProps,
4104          transform = _a.transform,
4105          _b = _a.crop,
4106          x = _b.x,
4107          y = _b.y,
4108          rotation = _a.rotation,
4109          zoom = _a.zoom,
4110          cropShape = _a.cropShape,
4111          showGrid = _a.showGrid,
4112          _c = _a.style,
4113          containerStyle = _c.containerStyle,
4114          cropAreaStyle = _c.cropAreaStyle,
4115          mediaStyle = _c.mediaStyle,
4116          _d = _a.classes,
4117          containerClassName = _d.containerClassName,
4118          cropAreaClassName = _d.cropAreaClassName,
4119          mediaClassName = _d.mediaClassName;
4120      return /*#__PURE__*/external_this_React_default.a.createElement("div", {
4121        onMouseDown: this.onMouseDown,
4122        onTouchStart: this.onTouchStart,
4123        ref: function ref(el) {
4124          return _this.containerRef = el;
4125        },
4126        "data-testid": "container",
4127        style: containerStyle,
4128        className: index_module_classNames('reactEasyCrop_Container', containerClassName)
4129      }, image ? /*#__PURE__*/external_this_React_default.a.createElement("img", __assign({
4130        alt: "",
4131        className: index_module_classNames('reactEasyCrop_Image', mediaClassName)
4132      }, mediaProps, {
4133        src: image,
4134        ref: function ref(el) {
4135          return _this.imageRef = el;
4136        },
4137        style: __assign(__assign({}, mediaStyle), {
4138          transform: transform || "translate(" + x + "px, " + y + "px) rotate(" + rotation + "deg) scale(" + zoom + ")"
4139        }),
4140        onLoad: this.onMediaLoad
4141      })) : video && /*#__PURE__*/external_this_React_default.a.createElement("video", __assign({
4142        autoPlay: true,
4143        loop: true,
4144        muted: true,
4145        className: index_module_classNames('reactEasyCrop_Video', mediaClassName)
4146      }, mediaProps, {
4147        src: video,
4148        ref: function ref(el) {
4149          return _this.videoRef = el;
4150        },
4151        onLoadedMetadata: this.onMediaLoad,
4152        style: __assign(__assign({}, mediaStyle), {
4153          transform: transform || "translate(" + x + "px, " + y + "px) rotate(" + rotation + "deg) scale(" + zoom + ")"
4154        }),
4155        controls: false
4156      })), this.state.cropSize && /*#__PURE__*/external_this_React_default.a.createElement("div", {
4157        style: __assign(__assign({}, cropAreaStyle), {
4158          width: this.state.cropSize.width,
4159          height: this.state.cropSize.height
4160        }),
4161        "data-testid": "cropper",
4162        className: index_module_classNames('reactEasyCrop_CropArea', cropShape === 'round' && 'reactEasyCrop_CropAreaRound', showGrid && 'reactEasyCrop_CropAreaGrid', cropAreaClassName)
4163      }));
4164    };
4165  
4166    Cropper.defaultProps = {
4167      zoom: 1,
4168      rotation: 0,
4169      aspect: 4 / 3,
4170      maxZoom: MAX_ZOOM,
4171      minZoom: MIN_ZOOM,
4172      cropShape: 'rect',
4173      showGrid: true,
4174      style: {},
4175      classes: {},
4176      mediaProps: {},
4177      zoomSpeed: 1,
4178      restrictPosition: true,
4179      zoomWithScroll: true
4180    };
4181  
4182    Cropper.getMousePoint = function (e) {
4183      return {
4184        x: Number(e.clientX),
4185        y: Number(e.clientY)
4186      };
4187    };
4188  
4189    Cropper.getTouchPoint = function (touch) {
4190      return {
4191        x: Number(touch.clientX),
4192        y: Number(touch.clientY)
4193      };
4194    };
4195  
4196    return Cropper;
4197  }(external_this_React_default.a.Component);
4198  
4199  /* harmony default export */ var index_module = (index_module_Cropper);
4200  
4201  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/check.js
4202  var check = __webpack_require__(161);
4203  
4204  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/aspect-ratio.js
4205  
4206  
4207  /**
4208   * WordPress dependencies
4209   */
4210  
4211  var aspect_ratio_aspectRatio = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
4212    xmlns: "http://www.w3.org/2000/svg",
4213    viewBox: "0 0 24 24"
4214  }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
4215    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"
4216  }));
4217  /* harmony default export */ var aspect_ratio = (aspect_ratio_aspectRatio);
4218  
4219  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/search.js
4220  var search = __webpack_require__(306);
4221  
4222  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/rotate-right.js
4223  
4224  
4225  /**
4226   * WordPress dependencies
4227   */
4228  
4229  var rotateRight = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
4230    xmlns: "http://www.w3.org/2000/svg",
4231    viewBox: "0 0 24 24"
4232  }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
4233    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"
4234  }));
4235  /* harmony default export */ var rotate_right = (rotateRight);
4236  
4237  // EXTERNAL MODULE: external {"this":["wp","apiFetch"]}
4238  var external_this_wp_apiFetch_ = __webpack_require__(47);
4239  var external_this_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_apiFetch_);
4240  
4241  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/image-editor.js
4242  
4243  
4244  
4245  /**
4246   * External dependencies
4247   */
4248  
4249  
4250  /**
4251   * WordPress dependencies
4252   */
4253  
4254  
4255  
4256  
4257  
4258  
4259  
4260  
4261  var image_editor_MIN_ZOOM = 100;
4262  var image_editor_MAX_ZOOM = 300;
4263  var POPOVER_PROPS = {
4264    position: 'bottom right',
4265    isAlternate: true
4266  };
4267  
4268  function AspectGroup(_ref) {
4269    var aspectRatios = _ref.aspectRatios,
4270        isDisabled = _ref.isDisabled,
4271        label = _ref.label,
4272        _onClick = _ref.onClick,
4273        value = _ref.value;
4274    return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["MenuGroup"], {
4275      label: label
4276    }, aspectRatios.map(function (_ref2) {
4277      var title = _ref2.title,
4278          aspect = _ref2.aspect;
4279      return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["MenuItem"], {
4280        key: aspect,
4281        disabled: isDisabled,
4282        onClick: function onClick() {
4283          _onClick(aspect);
4284        },
4285        role: "menuitemradio",
4286        isSelected: aspect === value,
4287        icon: aspect === value ? check["a" /* default */] : undefined
4288      }, title);
4289    }));
4290  }
4291  
4292  function AspectMenu(_ref3) {
4293    var toggleProps = _ref3.toggleProps,
4294        isDisabled = _ref3.isDisabled,
4295        _onClick2 = _ref3.onClick,
4296        value = _ref3.value,
4297        defaultValue = _ref3.defaultValue;
4298    return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["DropdownMenu"], {
4299      icon: aspect_ratio,
4300      label: Object(external_this_wp_i18n_["__"])('Aspect Ratio'),
4301      popoverProps: POPOVER_PROPS,
4302      toggleProps: toggleProps,
4303      className: "wp-block-image__aspect-ratio"
4304    }, function (_ref4) {
4305      var onClose = _ref4.onClose;
4306      return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(AspectGroup, {
4307        isDisabled: isDisabled,
4308        onClick: function onClick(aspect) {
4309          _onClick2(aspect);
4310  
4311          onClose();
4312        },
4313        value: value,
4314        aspectRatios: [{
4315          title: Object(external_this_wp_i18n_["__"])('Original'),
4316          aspect: defaultValue
4317        }, {
4318          title: Object(external_this_wp_i18n_["__"])('Square'),
4319          aspect: 1
4320        }]
4321      }), Object(external_this_wp_element_["createElement"])(AspectGroup, {
4322        label: Object(external_this_wp_i18n_["__"])('Landscape'),
4323        isDisabled: isDisabled,
4324        onClick: function onClick(aspect) {
4325          _onClick2(aspect);
4326  
4327          onClose();
4328        },
4329        value: value,
4330        aspectRatios: [{
4331          title: Object(external_this_wp_i18n_["__"])('16:10'),
4332          aspect: 16 / 10
4333        }, {
4334          title: Object(external_this_wp_i18n_["__"])('16:9'),
4335          aspect: 16 / 9
4336        }, {
4337          title: Object(external_this_wp_i18n_["__"])('4:3'),
4338          aspect: 4 / 3
4339        }, {
4340          title: Object(external_this_wp_i18n_["__"])('3:2'),
4341          aspect: 3 / 2
4342        }]
4343      }), Object(external_this_wp_element_["createElement"])(AspectGroup, {
4344        label: Object(external_this_wp_i18n_["__"])('Portrait'),
4345        isDisabled: isDisabled,
4346        onClick: function onClick(aspect) {
4347          _onClick2(aspect);
4348  
4349          onClose();
4350        },
4351        value: value,
4352        aspectRatios: [{
4353          title: Object(external_this_wp_i18n_["__"])('10:16'),
4354          aspect: 10 / 16
4355        }, {
4356          title: Object(external_this_wp_i18n_["__"])('9:16'),
4357          aspect: 9 / 16
4358        }, {
4359          title: Object(external_this_wp_i18n_["__"])('3:4'),
4360          aspect: 3 / 4
4361        }, {
4362          title: Object(external_this_wp_i18n_["__"])('2:3'),
4363          aspect: 2 / 3
4364        }]
4365      }));
4366    });
4367  }
4368  
4369  function ImageEditor(_ref5) {
4370    var id = _ref5.id,
4371        url = _ref5.url,
4372        setAttributes = _ref5.setAttributes,
4373        naturalWidth = _ref5.naturalWidth,
4374        naturalHeight = _ref5.naturalHeight,
4375        width = _ref5.width,
4376        height = _ref5.height,
4377        clientWidth = _ref5.clientWidth,
4378        setIsEditingImage = _ref5.setIsEditingImage;
4379  
4380    var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/notices'),
4381        createErrorNotice = _useDispatch.createErrorNotice;
4382  
4383    var _useState = Object(external_this_wp_element_["useState"])(false),
4384        _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
4385        inProgress = _useState2[0],
4386        setIsProgress = _useState2[1];
4387  
4388    var _useState3 = Object(external_this_wp_element_["useState"])(null),
4389        _useState4 = Object(slicedToArray["a" /* default */])(_useState3, 2),
4390        crop = _useState4[0],
4391        setCrop = _useState4[1];
4392  
4393    var _useState5 = Object(external_this_wp_element_["useState"])({
4394      x: 0,
4395      y: 0
4396    }),
4397        _useState6 = Object(slicedToArray["a" /* default */])(_useState5, 2),
4398        position = _useState6[0],
4399        setPosition = _useState6[1];
4400  
4401    var _useState7 = Object(external_this_wp_element_["useState"])(100),
4402        _useState8 = Object(slicedToArray["a" /* default */])(_useState7, 2),
4403        zoom = _useState8[0],
4404        setZoom = _useState8[1];
4405  
4406    var _useState9 = Object(external_this_wp_element_["useState"])(naturalWidth / naturalHeight),
4407        _useState10 = Object(slicedToArray["a" /* default */])(_useState9, 2),
4408        aspect = _useState10[0],
4409        setAspect = _useState10[1];
4410  
4411    var _useState11 = Object(external_this_wp_element_["useState"])(0),
4412        _useState12 = Object(slicedToArray["a" /* default */])(_useState11, 2),
4413        rotation = _useState12[0],
4414        setRotation = _useState12[1];
4415  
4416    var _useState13 = Object(external_this_wp_element_["useState"])(),
4417        _useState14 = Object(slicedToArray["a" /* default */])(_useState13, 2),
4418        editedUrl = _useState14[0],
4419        setEditedUrl = _useState14[1];
4420  
4421    var editedWidth = width;
4422    var editedHeight = height || clientWidth * naturalHeight / naturalWidth;
4423    var naturalAspectRatio = naturalWidth / naturalHeight;
4424  
4425    if (rotation % 180 === 90) {
4426      editedHeight = clientWidth * naturalWidth / naturalHeight;
4427      naturalAspectRatio = naturalHeight / naturalWidth;
4428    }
4429  
4430    function apply() {
4431      setIsProgress(true);
4432      var attrs = {}; // The crop script may return some very small, sub-pixel values when the image was not cropped.
4433      // Crop only when the new size has changed by more than 0.1%.
4434  
4435      if (crop.width < 99.9 || crop.height < 99.9) {
4436        attrs = crop;
4437      }
4438  
4439      if (rotation > 0) {
4440        attrs.rotation = rotation;
4441      }
4442  
4443      attrs.src = url;
4444      external_this_wp_apiFetch_default()({
4445        path: "/wp/v2/media/".concat(id, "/edit"),
4446        method: 'POST',
4447        data: attrs
4448      }).then(function (response) {
4449        setAttributes({
4450          id: response.id,
4451          url: response.source_url,
4452          height: height && width ? width / aspect : undefined
4453        });
4454      }).catch(function (error) {
4455        createErrorNotice(Object(external_this_wp_i18n_["sprintf"])(
4456        /* translators: 1. Error message */
4457        Object(external_this_wp_i18n_["__"])('Could not edit image. %s'), error.message), {
4458          id: 'image-editing-error',
4459          type: 'snackbar'
4460        });
4461      }).finally(function () {
4462        setIsProgress(false);
4463        setIsEditingImage(false);
4464      });
4465    }
4466  
4467    function rotate() {
4468      var angle = (rotation + 90) % 360;
4469  
4470      if (angle === 0) {
4471        setEditedUrl();
4472        setRotation(angle);
4473        setAspect(1 / aspect);
4474        setPosition({
4475          x: -(position.y * naturalAspectRatio),
4476          y: position.x * naturalAspectRatio
4477        });
4478        return;
4479      }
4480  
4481      function editImage(event) {
4482        var canvas = document.createElement('canvas');
4483        var translateX = 0;
4484        var translateY = 0;
4485  
4486        if (angle % 180) {
4487          canvas.width = event.target.height;
4488          canvas.height = event.target.width;
4489        } else {
4490          canvas.width = event.target.width;
4491          canvas.height = event.target.height;
4492        }
4493  
4494        if (angle === 90 || angle === 180) {
4495          translateX = canvas.width;
4496        }
4497  
4498        if (angle === 270 || angle === 180) {
4499          translateY = canvas.height;
4500        }
4501  
4502        var context = canvas.getContext('2d');
4503        context.translate(translateX, translateY);
4504        context.rotate(angle * Math.PI / 180);
4505        context.drawImage(event.target, 0, 0);
4506        canvas.toBlob(function (blob) {
4507          setEditedUrl(URL.createObjectURL(blob));
4508          setRotation(angle);
4509          setAspect(1 / aspect);
4510          setPosition({
4511            x: -(position.y * naturalAspectRatio),
4512            y: position.x * naturalAspectRatio
4513          });
4514        });
4515      }
4516  
4517      var el = new window.Image();
4518      el.src = url;
4519      el.onload = editImage;
4520    }
4521  
4522    return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])("div", {
4523      className: classnames_default()('wp-block-image__crop-area', {
4524        'is-applying': inProgress
4525      }),
4526      style: {
4527        width: editedWidth,
4528        height: editedHeight
4529      }
4530    }, Object(external_this_wp_element_["createElement"])(index_module, {
4531      image: editedUrl || url,
4532      disabled: inProgress,
4533      minZoom: image_editor_MIN_ZOOM / 100,
4534      maxZoom: image_editor_MAX_ZOOM / 100,
4535      crop: position,
4536      zoom: zoom / 100,
4537      aspect: aspect,
4538      onCropChange: setPosition,
4539      onCropComplete: function onCropComplete(newCropPercent) {
4540        setCrop(newCropPercent);
4541      },
4542      onZoomChange: function onZoomChange(newZoom) {
4543        setZoom(newZoom * 100);
4544      }
4545    }), inProgress && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Spinner"], null)), Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["BlockControls"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarGroup"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Dropdown"], {
4546      contentClassName: "wp-block-image__zoom",
4547      popoverProps: POPOVER_PROPS,
4548      renderToggle: function renderToggle(_ref6) {
4549        var isOpen = _ref6.isOpen,
4550            onToggle = _ref6.onToggle;
4551        return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarButton"], {
4552          icon: search["a" /* default */],
4553          label: Object(external_this_wp_i18n_["__"])('Zoom'),
4554          onClick: onToggle,
4555          "aria-expanded": isOpen,
4556          disabled: inProgress
4557        });
4558      },
4559      renderContent: function renderContent() {
4560        return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["RangeControl"], {
4561          min: image_editor_MIN_ZOOM,
4562          max: image_editor_MAX_ZOOM,
4563          value: Math.round(zoom),
4564          onChange: setZoom
4565        });
4566      }
4567    }), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarItem"], null, function (toggleProps) {
4568      return Object(external_this_wp_element_["createElement"])(AspectMenu, {
4569        toggleProps: toggleProps,
4570        isDisabled: inProgress,
4571        onClick: setAspect,
4572        value: aspect,
4573        defaultValue: naturalWidth / naturalHeight
4574      });
4575    })), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarGroup"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarButton"], {
4576      icon: rotate_right,
4577      label: Object(external_this_wp_i18n_["__"])('Rotate'),
4578      onClick: rotate,
4579      disabled: inProgress
4580    })), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarGroup"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarButton"], {
4581      onClick: apply,
4582      disabled: inProgress
4583    }, Object(external_this_wp_i18n_["__"])('Apply')), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarButton"], {
4584      onClick: function onClick() {
4585        return setIsEditingImage(false);
4586      }
4587    }, Object(external_this_wp_i18n_["__"])('Cancel')))));
4588  }
4589  
4590  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/constants.js
4591  var MIN_SIZE = 20;
4592  var LINK_DESTINATION_NONE = 'none';
4593  var LINK_DESTINATION_MEDIA = 'media';
4594  var LINK_DESTINATION_ATTACHMENT = 'attachment';
4595  var LINK_DESTINATION_CUSTOM = 'custom';
4596  var NEW_TAB_REL = ['noreferrer', 'noopener'];
4597  var ALLOWED_MEDIA_TYPES = ['image'];
4598  var DEFAULT_SIZE_SLUG = 'large';
4599  
4600  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/image.js
4601  
4602  
4603  
4604  /**
4605   * External dependencies
4606   */
4607  
4608  /**
4609   * WordPress dependencies
4610   */
4611  
4612  
4613  
4614  
4615  
4616  
4617  
4618  
4619  
4620  
4621  
4622  /**
4623   * Internal dependencies
4624   */
4625  
4626  
4627  
4628  
4629  
4630  /**
4631   * Module constants
4632   */
4633  
4634  
4635  
4636  function getFilename(url) {
4637    var path = Object(external_this_wp_url_["getPath"])(url);
4638  
4639    if (path) {
4640      return Object(external_this_lodash_["last"])(path.split('/'));
4641    }
4642  }
4643  
4644  function Image(_ref) {
4645    var _ref$attributes = _ref.attributes,
4646        _ref$attributes$url = _ref$attributes.url,
4647        url = _ref$attributes$url === void 0 ? '' : _ref$attributes$url,
4648        alt = _ref$attributes.alt,
4649        caption = _ref$attributes.caption,
4650        align = _ref$attributes.align,
4651        id = _ref$attributes.id,
4652        href = _ref$attributes.href,
4653        rel = _ref$attributes.rel,
4654        linkClass = _ref$attributes.linkClass,
4655        linkDestination = _ref$attributes.linkDestination,
4656        title = _ref$attributes.title,
4657        width = _ref$attributes.width,
4658        height = _ref$attributes.height,
4659        linkTarget = _ref$attributes.linkTarget,
4660        sizeSlug = _ref$attributes.sizeSlug,
4661        setAttributes = _ref.setAttributes,
4662        isSelected = _ref.isSelected,
4663        insertBlocksAfter = _ref.insertBlocksAfter,
4664        onReplace = _ref.onReplace,
4665        onSelectImage = _ref.onSelectImage,
4666        onSelectURL = _ref.onSelectURL,
4667        onUploadError = _ref.onUploadError,
4668        containerRef = _ref.containerRef;
4669    var captionRef = Object(external_this_wp_element_["useRef"])();
4670    var prevUrl = Object(external_this_wp_compose_["usePrevious"])(url);
4671    var image = Object(external_this_wp_data_["useSelect"])(function (select) {
4672      var _select = select('core'),
4673          getMedia = _select.getMedia;
4674  
4675      return id && isSelected ? getMedia(id) : null;
4676    }, [id, isSelected]);
4677  
4678    var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
4679      var _select2 = select('core/block-editor'),
4680          getSettings = _select2.getSettings;
4681  
4682      return Object(external_this_lodash_["pick"])(getSettings(), ['imageEditing', 'imageSizes', 'isRTL', 'maxWidth', 'mediaUpload']);
4683    }),
4684        imageEditing = _useSelect.imageEditing,
4685        imageSizes = _useSelect.imageSizes,
4686        isRTL = _useSelect.isRTL,
4687        maxWidth = _useSelect.maxWidth,
4688        mediaUpload = _useSelect.mediaUpload;
4689  
4690    var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/block-editor'),
4691        toggleSelection = _useDispatch.toggleSelection;
4692  
4693    var _useDispatch2 = Object(external_this_wp_data_["useDispatch"])('core/notices'),
4694        createErrorNotice = _useDispatch2.createErrorNotice,
4695        createSuccessNotice = _useDispatch2.createSuccessNotice;
4696  
4697    var isLargeViewport = Object(external_this_wp_compose_["useViewportMatch"])('medium');
4698  
4699    var _useState = Object(external_this_wp_element_["useState"])(false),
4700        _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
4701        captionFocused = _useState2[0],
4702        setCaptionFocused = _useState2[1];
4703  
4704    var isWideAligned = Object(external_this_lodash_["includes"])(['wide', 'full'], align);
4705  
4706    var _useState3 = Object(external_this_wp_element_["useState"])({}),
4707        _useState4 = Object(slicedToArray["a" /* default */])(_useState3, 2),
4708        _useState4$ = _useState4[0],
4709        naturalWidth = _useState4$.naturalWidth,
4710        naturalHeight = _useState4$.naturalHeight,
4711        setNaturalSize = _useState4[1];
4712  
4713    var _useState5 = Object(external_this_wp_element_["useState"])(false),
4714        _useState6 = Object(slicedToArray["a" /* default */])(_useState5, 2),
4715        isEditingImage = _useState6[0],
4716        setIsEditingImage = _useState6[1];
4717  
4718    var _useState7 = Object(external_this_wp_element_["useState"])(),
4719        _useState8 = Object(slicedToArray["a" /* default */])(_useState7, 2),
4720        externalBlob = _useState8[0],
4721        setExternalBlob = _useState8[1];
4722  
4723    var clientWidth = useClientWidth(containerRef, [align]);
4724    var isResizable = !isWideAligned && isLargeViewport;
4725    var imageSizeOptions = Object(external_this_lodash_["map"])(Object(external_this_lodash_["filter"])(imageSizes, function (_ref2) {
4726      var slug = _ref2.slug;
4727      return Object(external_this_lodash_["get"])(image, ['media_details', 'sizes', slug, 'source_url']);
4728    }), function (_ref3) {
4729      var name = _ref3.name,
4730          slug = _ref3.slug;
4731      return {
4732        value: slug,
4733        label: name
4734      };
4735    });
4736    Object(external_this_wp_element_["useEffect"])(function () {
4737      if (!isSelected) {
4738        setCaptionFocused(false);
4739      }
4740    }, [isSelected]); // If an image is externally hosted, try to fetch the image data. This may
4741    // fail if the image host doesn't allow CORS with the domain. If it works,
4742    // we can enable a button in the toolbar to upload the image.
4743  
4744    Object(external_this_wp_element_["useEffect"])(function () {
4745      if (!edit_isExternalImage(id, url) || !isSelected || externalBlob) {
4746        return;
4747      }
4748  
4749      window.fetch(url).then(function (response) {
4750        return response.blob();
4751      }).then(function (blob) {
4752        return setExternalBlob(blob);
4753      });
4754    }, [id, url, isSelected, externalBlob]); // Focus the caption after inserting an image from the placeholder. This is
4755    // done to preserve the behaviour of focussing the first tabbable element
4756    // when a block is mounted. Previously, the image block would remount when
4757    // the placeholder is removed. Maybe this behaviour could be removed.
4758  
4759    Object(external_this_wp_element_["useEffect"])(function () {
4760      if (url && !prevUrl && isSelected) {
4761        captionRef.current.focus();
4762      }
4763    }, [url, prevUrl]);
4764  
4765    function onResizeStart() {
4766      toggleSelection(false);
4767    }
4768  
4769    function _onResizeStop() {
4770      toggleSelection(true);
4771    }
4772  
4773    function onImageError() {
4774      // Check if there's an embed block that handles this URL.
4775      var embedBlock = util_createUpgradedEmbedBlock({
4776        attributes: {
4777          url: url
4778        }
4779      });
4780  
4781      if (undefined !== embedBlock) {
4782        onReplace(embedBlock);
4783      }
4784    }
4785  
4786    function onSetHref(props) {
4787      setAttributes(props);
4788    }
4789  
4790    function onSetTitle(value) {
4791      // This is the HTML title attribute, separate from the media object
4792      // title.
4793      setAttributes({
4794        title: value
4795      });
4796    }
4797  
4798    function onFocusCaption() {
4799      if (!captionFocused) {
4800        setCaptionFocused(true);
4801      }
4802    }
4803  
4804    function onImageClick() {
4805      if (captionFocused) {
4806        setCaptionFocused(false);
4807      }
4808    }
4809  
4810    function updateAlt(newAlt) {
4811      setAttributes({
4812        alt: newAlt
4813      });
4814    }
4815  
4816    function updateImage(newSizeSlug) {
4817      var newUrl = Object(external_this_lodash_["get"])(image, ['media_details', 'sizes', newSizeSlug, 'source_url']);
4818  
4819      if (!newUrl) {
4820        return null;
4821      }
4822  
4823      setAttributes({
4824        url: newUrl,
4825        width: undefined,
4826        height: undefined,
4827        sizeSlug: newSizeSlug
4828      });
4829    }
4830  
4831    function uploadExternal() {
4832      mediaUpload({
4833        filesList: [externalBlob],
4834        onFileChange: function onFileChange(_ref4) {
4835          var _ref5 = Object(slicedToArray["a" /* default */])(_ref4, 1),
4836              img = _ref5[0];
4837  
4838          onSelectImage(img);
4839  
4840          if (Object(external_this_wp_blob_["isBlobURL"])(img.url)) {
4841            return;
4842          }
4843  
4844          setExternalBlob();
4845          createSuccessNotice(Object(external_this_wp_i18n_["__"])('Image uploaded.'), {
4846            type: 'snackbar'
4847          });
4848        },
4849        allowedTypes: ALLOWED_MEDIA_TYPES,
4850        onError: function onError(message) {
4851          createErrorNotice(message, {
4852            type: 'snackbar'
4853          });
4854        }
4855      });
4856    }
4857  
4858    Object(external_this_wp_element_["useEffect"])(function () {
4859      if (!isSelected) {
4860        setIsEditingImage(false);
4861      }
4862    }, [isSelected]);
4863    var canEditImage = id && naturalWidth && naturalHeight && imageEditing;
4864    var controls = Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["BlockControls"], null, !isEditingImage && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarGroup"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["__experimentalImageURLInputUI"], {
4865      url: href || '',
4866      onChangeUrl: onSetHref,
4867      linkDestination: linkDestination,
4868      mediaUrl: image && image.source_url || url,
4869      mediaLink: image && image.link,
4870      linkTarget: linkTarget,
4871      linkClass: linkClass,
4872      rel: rel
4873    })), canEditImage && !isEditingImage && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarGroup"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarButton"], {
4874      onClick: function onClick() {
4875        return setIsEditingImage(true);
4876      },
4877      icon: library_crop,
4878      label: Object(external_this_wp_i18n_["__"])('Crop')
4879    })), externalBlob && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarGroup"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarButton"], {
4880      onClick: uploadExternal,
4881      icon: upload["a" /* default */],
4882      label: Object(external_this_wp_i18n_["__"])('Upload external image')
4883    })), !isEditingImage && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["MediaReplaceFlow"], {
4884      mediaId: id,
4885      mediaURL: url,
4886      allowedTypes: ALLOWED_MEDIA_TYPES,
4887      accept: "image/*",
4888      onSelect: onSelectImage,
4889      onSelectURL: onSelectURL,
4890      onError: onUploadError
4891    })), Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["InspectorControls"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["PanelBody"], {
4892      title: Object(external_this_wp_i18n_["__"])('Image settings')
4893    }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["TextareaControl"], {
4894      label: Object(external_this_wp_i18n_["__"])('Alt text (alternative text)'),
4895      value: alt,
4896      onChange: updateAlt,
4897      help: Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ExternalLink"], {
4898        href: "https://www.w3.org/WAI/tutorials/images/decision-tree"
4899      }, Object(external_this_wp_i18n_["__"])('Describe the purpose of the image')), Object(external_this_wp_i18n_["__"])('Leave empty if the image is purely decorative.'))
4900    }), Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["__experimentalImageSizeControl"], {
4901      onChangeImage: updateImage,
4902      onChange: function onChange(value) {
4903        return setAttributes(value);
4904      },
4905      slug: sizeSlug,
4906      width: width,
4907      height: height,
4908      imageSizeOptions: imageSizeOptions,
4909      isResizable: isResizable,
4910      imageWidth: naturalWidth,
4911      imageHeight: naturalHeight
4912    }))), Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["InspectorAdvancedControls"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["TextControl"], {
4913      label: Object(external_this_wp_i18n_["__"])('Title attribute'),
4914      value: title || '',
4915      onChange: onSetTitle,
4916      help: Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_i18n_["__"])('Describe the role of this image on the page.'), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ExternalLink"], {
4917        href: "https://www.w3.org/TR/html52/dom.html#the-title-attribute"
4918      }, Object(external_this_wp_i18n_["__"])('(Note: many devices and browsers do not display this text.)')))
4919    })));
4920    var filename = getFilename(url);
4921    var defaultedAlt;
4922  
4923    if (alt) {
4924      defaultedAlt = alt;
4925    } else if (filename) {
4926      defaultedAlt = Object(external_this_wp_i18n_["sprintf"])(
4927      /* translators: %s: file name */
4928      Object(external_this_wp_i18n_["__"])('This image has an empty alt attribute; its file name is %s'), filename);
4929    } else {
4930      defaultedAlt = Object(external_this_wp_i18n_["__"])('This image has an empty alt attribute');
4931    }
4932  
4933    var img = // Disable reason: Image itself is not meant to be interactive, but
4934    // should direct focus to block.
4935  
4936    /* eslint-disable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */
4937    Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])("img", {
4938      src: url,
4939      alt: defaultedAlt,
4940      onClick: onImageClick,
4941      onError: function onError() {
4942        return onImageError();
4943      },
4944      onLoad: function onLoad(event) {
4945        setNaturalSize(Object(external_this_lodash_["pick"])(event.target, ['naturalWidth', 'naturalHeight']));
4946      }
4947    }), Object(external_this_wp_blob_["isBlobURL"])(url) && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Spinner"], null))
4948    /* eslint-enable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */
4949    ;
4950    var imageWidthWithinContainer;
4951    var imageHeightWithinContainer;
4952  
4953    if (clientWidth && naturalWidth && naturalHeight) {
4954      var exceedMaxWidth = naturalWidth > clientWidth;
4955      var ratio = naturalHeight / naturalWidth;
4956      imageWidthWithinContainer = exceedMaxWidth ? clientWidth : naturalWidth;
4957      imageHeightWithinContainer = exceedMaxWidth ? clientWidth * ratio : naturalHeight;
4958    }
4959  
4960    if (canEditImage && isEditingImage) {
4961      img = Object(external_this_wp_element_["createElement"])(ImageEditor, {
4962        id: id,
4963        url: url,
4964        setAttributes: setAttributes,
4965        naturalWidth: naturalWidth,
4966        naturalHeight: naturalHeight,
4967        width: width,
4968        height: height,
4969        clientWidth: clientWidth,
4970        setIsEditingImage: setIsEditingImage
4971      });
4972    } else if (!isResizable || !imageWidthWithinContainer) {
4973      img = Object(external_this_wp_element_["createElement"])("div", {
4974        style: {
4975          width: width,
4976          height: height
4977        }
4978      }, img);
4979    } else {
4980      var currentWidth = width || imageWidthWithinContainer;
4981      var currentHeight = height || imageHeightWithinContainer;
4982  
4983      var _ratio = naturalWidth / naturalHeight;
4984  
4985      var minWidth = naturalWidth < naturalHeight ? MIN_SIZE : MIN_SIZE * _ratio;
4986      var minHeight = naturalHeight < naturalWidth ? MIN_SIZE : MIN_SIZE / _ratio; // With the current implementation of ResizableBox, an image needs an
4987      // explicit pixel value for the max-width. In absence of being able to
4988      // set the content-width, this max-width is currently dictated by the
4989      // vanilla editor style. The following variable adds a buffer to this
4990      // vanilla style, so 3rd party themes have some wiggleroom. This does,
4991      // in most cases, allow you to scale the image beyond the width of the
4992      // main column, though not infinitely.
4993      // @todo It would be good to revisit this once a content-width variable
4994      // becomes available.
4995  
4996      var maxWidthBuffer = maxWidth * 2.5;
4997      var showRightHandle = false;
4998      var showLeftHandle = false;
4999      /* eslint-disable no-lonely-if */
5000      // See https://github.com/WordPress/gutenberg/issues/7584.
5001  
5002      if (align === 'center') {
5003        // When the image is centered, show both handles.
5004        showRightHandle = true;
5005        showLeftHandle = true;
5006      } else if (isRTL) {
5007        // In RTL mode the image is on the right by default.
5008        // Show the right handle and hide the left handle only when it is
5009        // aligned left. Otherwise always show the left handle.
5010        if (align === 'left') {
5011          showRightHandle = true;
5012        } else {
5013          showLeftHandle = true;
5014        }
5015      } else {
5016        // Show the left handle and hide the right handle only when the
5017        // image is aligned right. Otherwise always show the right handle.
5018        if (align === 'right') {
5019          showLeftHandle = true;
5020        } else {
5021          showRightHandle = true;
5022        }
5023      }
5024      /* eslint-enable no-lonely-if */
5025  
5026  
5027      img = Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ResizableBox"], {
5028        size: {
5029          width: width,
5030          height: height
5031        },
5032        showHandle: isSelected,
5033        minWidth: minWidth,
5034        maxWidth: maxWidthBuffer,
5035        minHeight: minHeight,
5036        maxHeight: maxWidthBuffer / _ratio,
5037        lockAspectRatio: true,
5038        enable: {
5039          top: false,
5040          right: showRightHandle,
5041          bottom: true,
5042          left: showLeftHandle
5043        },
5044        onResizeStart: onResizeStart,
5045        onResizeStop: function onResizeStop(event, direction, elt, delta) {
5046          _onResizeStop();
5047  
5048          setAttributes({
5049            width: parseInt(currentWidth + delta.width, 10),
5050            height: parseInt(currentHeight + delta.height, 10)
5051          });
5052        }
5053      }, img);
5054    }
5055  
5056    return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, controls, img, (!external_this_wp_blockEditor_["RichText"].isEmpty(caption) || isSelected) && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"], {
5057      ref: captionRef,
5058      tagName: "figcaption",
5059      placeholder: Object(external_this_wp_i18n_["__"])('Write caption…'),
5060      value: caption,
5061      unstableOnFocus: onFocusCaption,
5062      onChange: function onChange(value) {
5063        return setAttributes({
5064          caption: value
5065        });
5066      },
5067      isSelected: captionFocused,
5068      inlineToolbar: true,
5069      __unstableOnSplitAtEnd: function __unstableOnSplitAtEnd() {
5070        return insertBlocksAfter(Object(external_this_wp_blocks_["createBlock"])('core/paragraph'));
5071      }
5072    }));
5073  }
5074  
5075  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/edit.js
5076  
5077  
5078  
5079  
5080  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; }
5081  
5082  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; }
5083  
5084  /**
5085   * External dependencies
5086   */
5087  
5088  
5089  /**
5090   * WordPress dependencies
5091   */
5092  
5093  
5094  
5095  
5096  
5097  
5098  
5099  
5100  /* global wp */
5101  
5102  /**
5103   * Internal dependencies
5104   */
5105  
5106  
5107  /**
5108   * Module constants
5109   */
5110  
5111  
5112  var edit_pickRelevantMediaFiles = function pickRelevantMediaFiles(image) {
5113    var imageProps = Object(external_this_lodash_["pick"])(image, ['alt', 'id', 'link', 'caption']);
5114    imageProps.url = Object(external_this_lodash_["get"])(image, ['sizes', 'large', 'url']) || Object(external_this_lodash_["get"])(image, ['media_details', 'sizes', 'large', 'source_url']) || image.url;
5115    return imageProps;
5116  };
5117  /**
5118   * Is the URL a temporary blob URL? A blob URL is one that is used temporarily
5119   * while the image is being uploaded and will not have an id yet allocated.
5120   *
5121   * @param {number=} id The id of the image.
5122   * @param {string=} url The url of the image.
5123   *
5124   * @return {boolean} Is the URL a Blob URL
5125   */
5126  
5127  var edit_isTemporaryImage = function isTemporaryImage(id, url) {
5128    return !id && Object(external_this_wp_blob_["isBlobURL"])(url);
5129  };
5130  /**
5131   * Is the url for the image hosted externally. An externally hosted image has no
5132   * id and is not a blob url.
5133   *
5134   * @param {number=} id  The id of the image.
5135   * @param {string=} url The url of the image.
5136   *
5137   * @return {boolean} Is the url an externally hosted url?
5138   */
5139  
5140  
5141  var edit_isExternalImage = function isExternalImage(id, url) {
5142    return url && !id && !Object(external_this_wp_blob_["isBlobURL"])(url);
5143  };
5144  function ImageEdit(_ref) {
5145    var attributes = _ref.attributes,
5146        setAttributes = _ref.setAttributes,
5147        isSelected = _ref.isSelected,
5148        className = _ref.className,
5149        noticeUI = _ref.noticeUI,
5150        insertBlocksAfter = _ref.insertBlocksAfter,
5151        noticeOperations = _ref.noticeOperations,
5152        onReplace = _ref.onReplace;
5153    var _attributes$url = attributes.url,
5154        url = _attributes$url === void 0 ? '' : _attributes$url,
5155        alt = attributes.alt,
5156        caption = attributes.caption,
5157        align = attributes.align,
5158        id = attributes.id,
5159        width = attributes.width,
5160        height = attributes.height,
5161        sizeSlug = attributes.sizeSlug;
5162    var altRef = Object(external_this_wp_element_["useRef"])();
5163    Object(external_this_wp_element_["useEffect"])(function () {
5164      altRef.current = alt;
5165    }, [alt]);
5166    var captionRef = Object(external_this_wp_element_["useRef"])();
5167    Object(external_this_wp_element_["useEffect"])(function () {
5168      captionRef.current = caption;
5169    }, [caption]);
5170    var ref = Object(external_this_wp_element_["useRef"])();
5171    var mediaUpload = Object(external_this_wp_data_["useSelect"])(function (select) {
5172      var _select = select('core/block-editor'),
5173          getSettings = _select.getSettings;
5174  
5175      return getSettings().mediaUpload;
5176    });
5177  
5178    function onUploadError(message) {
5179      noticeOperations.removeAllNotices();
5180      noticeOperations.createErrorNotice(message);
5181    }
5182  
5183    function onSelectImage(media) {
5184      var _wp, _wp$media, _wp$media$view, _wp$media$view$settin, _wp$media$view$settin2;
5185  
5186      if (!media || !media.url) {
5187        setAttributes({
5188          url: undefined,
5189          alt: undefined,
5190          id: undefined,
5191          title: undefined,
5192          caption: undefined
5193        });
5194        return;
5195      }
5196  
5197      var mediaAttributes = edit_pickRelevantMediaFiles(media); // If the current image is temporary but an alt text was meanwhile
5198      // written by the user, make sure the text is not overwritten.
5199  
5200      if (edit_isTemporaryImage(id, url)) {
5201        if (altRef.current) {
5202          mediaAttributes = Object(external_this_lodash_["omit"])(mediaAttributes, ['alt']);
5203        }
5204      } // If a caption text was meanwhile written by the user,
5205      // make sure the text is not overwritten by empty captions.
5206  
5207  
5208      if (captionRef.current && !Object(external_this_lodash_["get"])(mediaAttributes, ['caption'])) {
5209        mediaAttributes = Object(external_this_lodash_["omit"])(mediaAttributes, ['caption']);
5210      }
5211  
5212      var additionalAttributes; // Reset the dimension attributes if changing to a different image.
5213  
5214      if (!media.id || media.id !== id) {
5215        additionalAttributes = {
5216          width: undefined,
5217          height: undefined,
5218          sizeSlug: DEFAULT_SIZE_SLUG
5219        };
5220      } else {
5221        // Keep the same url when selecting the same file, so "Image Size"
5222        // option is not changed.
5223        additionalAttributes = {
5224          url: url
5225        };
5226      } // Check if default link setting should be used.
5227  
5228  
5229      var linkDestination = attributes.linkDestination;
5230  
5231      if (!linkDestination) {
5232        // Use the WordPress option to determine the proper default.
5233        // The constants used in Gutenberg do not match WP options so a little more complicated than ideal.
5234        // TODO: fix this in a follow up PR, requires updating media-text and ui component.
5235        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) {
5236          case 'file':
5237          case LINK_DESTINATION_MEDIA:
5238            linkDestination = LINK_DESTINATION_MEDIA;
5239            break;
5240  
5241          case 'post':
5242          case LINK_DESTINATION_ATTACHMENT:
5243            linkDestination = LINK_DESTINATION_ATTACHMENT;
5244            break;
5245  
5246          case LINK_DESTINATION_CUSTOM:
5247            linkDestination = LINK_DESTINATION_CUSTOM;
5248            break;
5249  
5250          case LINK_DESTINATION_NONE:
5251            linkDestination = LINK_DESTINATION_NONE;
5252            break;
5253        }
5254      } // Check if the image is linked to it's media.
5255  
5256  
5257      var href;
5258  
5259      switch (linkDestination) {
5260        case LINK_DESTINATION_MEDIA:
5261          href = media.url;
5262          break;
5263  
5264        case LINK_DESTINATION_ATTACHMENT:
5265          href = media.link;
5266          break;
5267      }
5268  
5269      mediaAttributes.href = href;
5270      setAttributes(image_edit_objectSpread(image_edit_objectSpread(image_edit_objectSpread({}, mediaAttributes), additionalAttributes), {}, {
5271        linkDestination: linkDestination
5272      }));
5273    }
5274  
5275    function onSelectURL(newURL) {
5276      if (newURL !== url) {
5277        setAttributes({
5278          url: newURL,
5279          id: undefined,
5280          sizeSlug: DEFAULT_SIZE_SLUG
5281        });
5282      }
5283    }
5284  
5285    function updateAlignment(nextAlign) {
5286      var extraUpdatedAttributes = ['wide', 'full'].includes(nextAlign) ? {
5287        width: undefined,
5288        height: undefined
5289      } : {};
5290      setAttributes(image_edit_objectSpread(image_edit_objectSpread({}, extraUpdatedAttributes), {}, {
5291        align: nextAlign
5292      }));
5293    }
5294  
5295    var isTemp = edit_isTemporaryImage(id, url); // Upload a temporary image on mount.
5296  
5297    Object(external_this_wp_element_["useEffect"])(function () {
5298      if (!isTemp) {
5299        return;
5300      }
5301  
5302      var file = Object(external_this_wp_blob_["getBlobByURL"])(url);
5303  
5304      if (file) {
5305        mediaUpload({
5306          filesList: [file],
5307          onFileChange: function onFileChange(_ref2) {
5308            var _ref3 = Object(slicedToArray["a" /* default */])(_ref2, 1),
5309                img = _ref3[0];
5310  
5311            onSelectImage(img);
5312          },
5313          allowedTypes: ALLOWED_MEDIA_TYPES,
5314          onError: function onError(message) {
5315            noticeOperations.createErrorNotice(message);
5316            setAttributes({
5317              src: undefined,
5318              id: undefined,
5319              url: undefined
5320            });
5321          }
5322        });
5323      }
5324    }, []); // If an image is temporary, revoke the Blob url when it is uploaded (and is
5325    // no longer temporary).
5326  
5327    Object(external_this_wp_element_["useEffect"])(function () {
5328      if (!isTemp) {
5329        return;
5330      }
5331  
5332      return function () {
5333        Object(external_this_wp_blob_["revokeBlobURL"])(url);
5334      };
5335    }, [isTemp]);
5336    var isExternal = edit_isExternalImage(id, url);
5337    var controls = Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["BlockControls"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["BlockAlignmentToolbar"], {
5338      value: align,
5339      onChange: updateAlignment
5340    }));
5341    var src = isExternal ? url : undefined;
5342    var mediaPreview = !!url && Object(external_this_wp_element_["createElement"])("img", {
5343      alt: Object(external_this_wp_i18n_["__"])('Edit image'),
5344      title: Object(external_this_wp_i18n_["__"])('Edit image'),
5345      className: 'edit-image-preview',
5346      src: url
5347    });
5348    var mediaPlaceholder = Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["MediaPlaceholder"], {
5349      icon: Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["BlockIcon"], {
5350        icon: library_image
5351      }),
5352      onSelect: onSelectImage,
5353      onSelectURL: onSelectURL,
5354      notices: noticeUI,
5355      onError: onUploadError,
5356      accept: "image/*",
5357      allowedTypes: ALLOWED_MEDIA_TYPES,
5358      value: {
5359        id: id,
5360        src: src
5361      },
5362      mediaPreview: mediaPreview,
5363      disableMediaButtons: url
5364    });
5365    var classes = classnames_default()(className, Object(defineProperty["a" /* default */])({
5366      'is-transient': Object(external_this_wp_blob_["isBlobURL"])(url),
5367      'is-resized': !!width || !!height,
5368      'is-focused': isSelected
5369    }, "size-".concat(sizeSlug), sizeSlug));
5370    var blockProps = Object(external_this_wp_blockEditor_["useBlockProps"])({
5371      ref: ref,
5372      className: classes
5373    });
5374    return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, controls, Object(external_this_wp_element_["createElement"])("figure", blockProps, url && Object(external_this_wp_element_["createElement"])(Image, {
5375      attributes: attributes,
5376      setAttributes: setAttributes,
5377      isSelected: isSelected,
5378      insertBlocksAfter: insertBlocksAfter,
5379      onReplace: onReplace,
5380      onSelectImage: onSelectImage,
5381      onSelectURL: onSelectURL,
5382      onUploadError: onUploadError,
5383      containerRef: ref
5384    }), mediaPlaceholder));
5385  }
5386  /* harmony default export */ var image_edit = (Object(external_this_wp_components_["withNotices"])(ImageEdit));
5387  
5388  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/save.js
5389  
5390  
5391  
5392  /**
5393   * External dependencies
5394   */
5395  
5396  
5397  /**
5398   * WordPress dependencies
5399   */
5400  
5401  
5402  function image_save_save(_ref) {
5403    var _classnames;
5404  
5405    var attributes = _ref.attributes;
5406    var url = attributes.url,
5407        alt = attributes.alt,
5408        caption = attributes.caption,
5409        align = attributes.align,
5410        href = attributes.href,
5411        rel = attributes.rel,
5412        linkClass = attributes.linkClass,
5413        width = attributes.width,
5414        height = attributes.height,
5415        id = attributes.id,
5416        linkTarget = attributes.linkTarget,
5417        sizeSlug = attributes.sizeSlug,
5418        title = attributes.title;
5419    var newRel = Object(external_this_lodash_["isEmpty"])(rel) ? undefined : rel;
5420    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));
5421    var image = Object(external_this_wp_element_["createElement"])("img", {
5422      src: url,
5423      alt: alt,
5424      className: id ? "wp-image-".concat(id) : null,
5425      width: width,
5426      height: height,
5427      title: title
5428    });
5429    var figure = Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, href ? Object(external_this_wp_element_["createElement"])("a", {
5430      className: linkClass,
5431      href: href,
5432      target: linkTarget,
5433      rel: newRel
5434    }, image) : image, !external_this_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
5435      tagName: "figcaption",
5436      value: caption
5437    }));
5438  
5439    if ('left' === align || 'right' === align || 'center' === align) {
5440      return Object(external_this_wp_element_["createElement"])("div", external_this_wp_blockEditor_["useBlockProps"].save(), Object(external_this_wp_element_["createElement"])("figure", {
5441        className: classes
5442      }, figure));
5443    }
5444  
5445    return Object(external_this_wp_element_["createElement"])("figure", external_this_wp_blockEditor_["useBlockProps"].save({
5446      className: classes
5447    }), figure);
5448  }
5449  
5450  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/transforms.js
5451  
5452  
5453  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; }
5454  
5455  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; }
5456  
5457  /**
5458   * WordPress dependencies
5459   */
5460  
5461  
5462  function stripFirstImage(attributes, _ref) {
5463    var shortcode = _ref.shortcode;
5464  
5465    var _document$implementat = document.implementation.createHTMLDocument(''),
5466        body = _document$implementat.body;
5467  
5468    body.innerHTML = shortcode.content;
5469    var nodeToRemove = body.querySelector('img'); // if an image has parents, find the topmost node to remove
5470  
5471    while (nodeToRemove && nodeToRemove.parentNode && nodeToRemove.parentNode !== body) {
5472      nodeToRemove = nodeToRemove.parentNode;
5473    }
5474  
5475    if (nodeToRemove) {
5476      nodeToRemove.parentNode.removeChild(nodeToRemove);
5477    }
5478  
5479    return body.innerHTML.trim();
5480  }
5481  
5482  function getFirstAnchorAttributeFormHTML(html, attributeName) {
5483    var _document$implementat2 = document.implementation.createHTMLDocument(''),
5484        body = _document$implementat2.body;
5485  
5486    body.innerHTML = html;
5487    var firstElementChild = body.firstElementChild;
5488  
5489    if (firstElementChild && firstElementChild.nodeName === 'A') {
5490      return firstElementChild.getAttribute(attributeName) || undefined;
5491    }
5492  }
5493  
5494  var imageSchema = {
5495    img: {
5496      attributes: ['src', 'alt', 'title'],
5497      classes: ['alignleft', 'aligncenter', 'alignright', 'alignnone', /^wp-image-\d+$/]
5498    }
5499  };
5500  
5501  var schema = function schema(_ref2) {
5502    var phrasingContentSchema = _ref2.phrasingContentSchema;
5503    return {
5504      figure: {
5505        require: ['img'],
5506        children: transforms_objectSpread(transforms_objectSpread({}, imageSchema), {}, {
5507          a: {
5508            attributes: ['href', 'rel', 'target'],
5509            children: imageSchema
5510          },
5511          figcaption: {
5512            children: phrasingContentSchema
5513          }
5514        })
5515      }
5516    };
5517  };
5518  
5519  var transforms_transforms = {
5520    from: [{
5521      type: 'raw',
5522      isMatch: function isMatch(node) {
5523        return node.nodeName === 'FIGURE' && !!node.querySelector('img');
5524      },
5525      schema: schema,
5526      transform: function transform(node) {
5527        // Search both figure and image classes. Alignment could be
5528        // set on either. ID is set on the image.
5529        var className = node.className + ' ' + node.querySelector('img').className;
5530        var alignMatches = /(?:^|\s)align(left|center|right)(?:$|\s)/.exec(className);
5531        var anchor = node.id === '' ? undefined : node.id;
5532        var align = alignMatches ? alignMatches[1] : undefined;
5533        var idMatches = /(?:^|\s)wp-image-(\d+)(?:$|\s)/.exec(className);
5534        var id = idMatches ? Number(idMatches[1]) : undefined;
5535        var anchorElement = node.querySelector('a');
5536        var linkDestination = anchorElement && anchorElement.href ? 'custom' : undefined;
5537        var href = anchorElement && anchorElement.href ? anchorElement.href : undefined;
5538        var rel = anchorElement && anchorElement.rel ? anchorElement.rel : undefined;
5539        var linkClass = anchorElement && anchorElement.className ? anchorElement.className : undefined;
5540        var attributes = Object(external_this_wp_blocks_["getBlockAttributes"])('core/image', node.outerHTML, {
5541          align: align,
5542          id: id,
5543          linkDestination: linkDestination,
5544          href: href,
5545          rel: rel,
5546          linkClass: linkClass,
5547          anchor: anchor
5548        });
5549        return Object(external_this_wp_blocks_["createBlock"])('core/image', attributes);
5550      }
5551    }, {
5552      type: 'files',
5553      isMatch: function isMatch(files) {
5554        return files.length === 1 && files[0].type.indexOf('image/') === 0;
5555      },
5556      transform: function transform(files) {
5557        var file = files[0]; // We don't need to upload the media directly here
5558        // It's already done as part of the `componentDidMount`
5559        // int the image block
5560  
5561        return Object(external_this_wp_blocks_["createBlock"])('core/image', {
5562          url: Object(external_this_wp_blob_["createBlobURL"])(file)
5563        });
5564      }
5565    }, {
5566      type: 'shortcode',
5567      tag: 'caption',
5568      attributes: {
5569        url: {
5570          type: 'string',
5571          source: 'attribute',
5572          attribute: 'src',
5573          selector: 'img'
5574        },
5575        alt: {
5576          type: 'string',
5577          source: 'attribute',
5578          attribute: 'alt',
5579          selector: 'img'
5580        },
5581        caption: {
5582          shortcode: stripFirstImage
5583        },
5584        href: {
5585          shortcode: function shortcode(attributes, _ref3) {
5586            var _shortcode = _ref3.shortcode;
5587            return getFirstAnchorAttributeFormHTML(_shortcode.content, 'href');
5588          }
5589        },
5590        rel: {
5591          shortcode: function shortcode(attributes, _ref4) {
5592            var _shortcode2 = _ref4.shortcode;
5593            return getFirstAnchorAttributeFormHTML(_shortcode2.content, 'rel');
5594          }
5595        },
5596        linkClass: {
5597          shortcode: function shortcode(attributes, _ref5) {
5598            var _shortcode3 = _ref5.shortcode;
5599            return getFirstAnchorAttributeFormHTML(_shortcode3.content, 'class');
5600          }
5601        },
5602        id: {
5603          type: 'number',
5604          shortcode: function shortcode(_ref6) {
5605            var id = _ref6.named.id;
5606  
5607            if (!id) {
5608              return;
5609            }
5610  
5611            return parseInt(id.replace('attachment_', ''), 10);
5612          }
5613        },
5614        align: {
5615          type: 'string',
5616          shortcode: function shortcode(_ref7) {
5617            var _ref7$named$align = _ref7.named.align,
5618                align = _ref7$named$align === void 0 ? 'alignnone' : _ref7$named$align;
5619            return align.replace('align', '');
5620          }
5621        }
5622      }
5623    }]
5624  };
5625  /* harmony default export */ var image_transforms = (transforms_transforms);
5626  
5627  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/index.js
5628  /**
5629   * WordPress dependencies
5630   */
5631  
5632  
5633  /**
5634   * Internal dependencies
5635   */
5636  
5637  
5638  
5639  var image_metadata = {
5640    apiVersion: 2,
5641    name: "core/image",
5642    category: "media",
5643    attributes: {
5644      align: {
5645        type: "string"
5646      },
5647      url: {
5648        type: "string",
5649        source: "attribute",
5650        selector: "img",
5651        attribute: "src"
5652      },
5653      alt: {
5654        type: "string",
5655        source: "attribute",
5656        selector: "img",
5657        attribute: "alt",
5658        "default": ""
5659      },
5660      caption: {
5661        type: "string",
5662        source: "html",
5663        selector: "figcaption"
5664      },
5665      title: {
5666        type: "string",
5667        source: "attribute",
5668        selector: "img",
5669        attribute: "title"
5670      },
5671      href: {
5672        type: "string",
5673        source: "attribute",
5674        selector: "figure > a",
5675        attribute: "href"
5676      },
5677      rel: {
5678        type: "string",
5679        source: "attribute",
5680        selector: "figure > a",
5681        attribute: "rel"
5682      },
5683      linkClass: {
5684        type: "string",
5685        source: "attribute",
5686        selector: "figure > a",
5687        attribute: "class"
5688      },
5689      id: {
5690        type: "number"
5691      },
5692      width: {
5693        type: "number"
5694      },
5695      height: {
5696        type: "number"
5697      },
5698      sizeSlug: {
5699        type: "string"
5700      },
5701      linkDestination: {
5702        type: "string"
5703      },
5704      linkTarget: {
5705        type: "string",
5706        source: "attribute",
5707        selector: "figure > a",
5708        attribute: "target"
5709      }
5710    },
5711    supports: {
5712      anchor: true
5713    }
5714  };
5715  
5716  
5717  var image_name = image_metadata.name;
5718  
5719  var image_settings = {
5720    title: Object(external_this_wp_i18n_["__"])('Image'),
5721    description: Object(external_this_wp_i18n_["__"])('Insert an image to make a visual statement.'),
5722    icon: library_image,
5723    keywords: ['img', // "img" is not translated as it is intended to reflect the HTML <img> tag.
5724    Object(external_this_wp_i18n_["__"])('photo'), Object(external_this_wp_i18n_["__"])('picture')],
5725    example: {
5726      attributes: {
5727        sizeSlug: 'large',
5728        url: 'https://s.w.org/images/core/5.3/MtBlanc1.jpg',
5729        // translators: Caption accompanying an image of the Mont Blanc, which serves as an example for the Image block.
5730        caption: Object(external_this_wp_i18n_["__"])('Mont Blanc appears—still, snowy, and serene.')
5731      }
5732    },
5733    styles: [{
5734      name: 'default',
5735      label: Object(external_this_wp_i18n_["_x"])('Default', 'block style'),
5736      isDefault: true
5737    }, {
5738      name: 'rounded',
5739      label: Object(external_this_wp_i18n_["_x"])('Rounded', 'block style')
5740    }],
5741    __experimentalLabel: function __experimentalLabel(attributes, _ref) {
5742      var context = _ref.context;
5743  
5744      if (context === 'accessibility') {
5745        var caption = attributes.caption,
5746            alt = attributes.alt,
5747            url = attributes.url;
5748  
5749        if (!url) {
5750          return Object(external_this_wp_i18n_["__"])('Empty');
5751        }
5752  
5753        if (!alt) {
5754          return caption || '';
5755        } // This is intended to be read by a screen reader.
5756        // A period simply means a pause, no need to translate it.
5757  
5758  
5759        return alt + (caption ? '. ' + caption : '');
5760      }
5761    },
5762    getEditWrapperProps: function getEditWrapperProps(attributes) {
5763      return {
5764        'data-align': attributes.align
5765      };
5766    },
5767    transforms: image_transforms,
5768    edit: image_edit,
5769    save: image_save_save,
5770    deprecated: image_deprecated
5771  };
5772  
5773  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/heading.js
5774  
5775  
5776  /**
5777   * WordPress dependencies
5778   */
5779  
5780  var heading = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
5781    xmlns: "http://www.w3.org/2000/svg",
5782    viewBox: "0 0 24 24"
5783  }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
5784    d: "M6.2 5.2v13.4l5.8-4.8 5.8 4.8V5.2z"
5785  }));
5786  /* harmony default export */ var library_heading = (heading);
5787  
5788  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/deprecated.js
5789  
5790  
5791  
5792  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; }
5793  
5794  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; }
5795  
5796  /**
5797   * External dependencies
5798   */
5799  
5800  
5801  /**
5802   * WordPress dependencies
5803   */
5804  
5805  
5806  var blockSupports = {
5807    className: false,
5808    anchor: true
5809  };
5810  var heading_deprecated_blockAttributes = {
5811    align: {
5812      type: 'string'
5813    },
5814    content: {
5815      type: 'string',
5816      source: 'html',
5817      selector: 'h1,h2,h3,h4,h5,h6',
5818      default: ''
5819    },
5820    level: {
5821      type: 'number',
5822      default: 2
5823    },
5824    placeholder: {
5825      type: 'string'
5826    }
5827  };
5828  
5829  var deprecated_migrateCustomColors = function migrateCustomColors(attributes) {
5830    if (!attributes.customTextColor) {
5831      return attributes;
5832    }
5833  
5834    var style = {
5835      color: {
5836        text: attributes.customTextColor
5837      }
5838    };
5839    return deprecated_objectSpread(deprecated_objectSpread({}, Object(external_this_lodash_["omit"])(attributes, ['customTextColor'])), {}, {
5840      style: style
5841    });
5842  };
5843  
5844  var heading_deprecated_deprecated = [{
5845    supports: blockSupports,
5846    attributes: deprecated_objectSpread(deprecated_objectSpread({}, heading_deprecated_blockAttributes), {}, {
5847      customTextColor: {
5848        type: 'string'
5849      },
5850      textColor: {
5851        type: 'string'
5852      }
5853    }),
5854    migrate: deprecated_migrateCustomColors,
5855    save: function save(_ref) {
5856      var _classnames;
5857  
5858      var attributes = _ref.attributes;
5859      var align = attributes.align,
5860          content = attributes.content,
5861          customTextColor = attributes.customTextColor,
5862          level = attributes.level,
5863          textColor = attributes.textColor;
5864      var tagName = 'h' + level;
5865      var textClass = Object(external_this_wp_blockEditor_["getColorClassName"])('color', textColor);
5866      var className = classnames_default()((_classnames = {}, Object(defineProperty["a" /* default */])(_classnames, textClass, textClass), Object(defineProperty["a" /* default */])(_classnames, 'has-text-color', textColor || customTextColor), Object(defineProperty["a" /* default */])(_classnames, "has-text-align-".concat(align), align), _classnames));
5867      return Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
5868        className: className ? className : undefined,
5869        tagName: tagName,
5870        style: {
5871          color: textClass ? undefined : customTextColor
5872        },
5873        value: content
5874      });
5875    }
5876  }, {
5877    attributes: deprecated_objectSpread(deprecated_objectSpread({}, heading_deprecated_blockAttributes), {}, {
5878      customTextColor: {
5879        type: 'string'
5880      },
5881      textColor: {
5882        type: 'string'
5883      }
5884    }),
5885    migrate: deprecated_migrateCustomColors,
5886    save: function save(_ref2) {
5887      var _classnames2;
5888  
5889      var attributes = _ref2.attributes;
5890      var align = attributes.align,
5891          content = attributes.content,
5892          customTextColor = attributes.customTextColor,
5893          level = attributes.level,
5894          textColor = attributes.textColor;
5895      var tagName = 'h' + level;
5896      var textClass = Object(external_this_wp_blockEditor_["getColorClassName"])('color', textColor);
5897      var className = classnames_default()((_classnames2 = {}, Object(defineProperty["a" /* default */])(_classnames2, textClass, textClass), Object(defineProperty["a" /* default */])(_classnames2, "has-text-align-".concat(align), align), _classnames2));
5898      return Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
5899        className: className ? className : undefined,
5900        tagName: tagName,
5901        style: {
5902          color: textClass ? undefined : customTextColor
5903        },
5904        value: content
5905      });
5906    },
5907    supports: blockSupports
5908  }, {
5909    supports: blockSupports,
5910    attributes: deprecated_objectSpread(deprecated_objectSpread({}, heading_deprecated_blockAttributes), {}, {
5911      customTextColor: {
5912        type: 'string'
5913      },
5914      textColor: {
5915        type: 'string'
5916      }
5917    }),
5918    migrate: deprecated_migrateCustomColors,
5919    save: function save(_ref3) {
5920      var attributes = _ref3.attributes;
5921      var align = attributes.align,
5922          level = attributes.level,
5923          content = attributes.content,
5924          textColor = attributes.textColor,
5925          customTextColor = attributes.customTextColor;
5926      var tagName = 'h' + level;
5927      var textClass = Object(external_this_wp_blockEditor_["getColorClassName"])('color', textColor);
5928      var className = classnames_default()(Object(defineProperty["a" /* default */])({}, textClass, textClass));
5929      return Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
5930        className: className ? className : undefined,
5931        tagName: tagName,
5932        style: {
5933          textAlign: align,
5934          color: textClass ? undefined : customTextColor
5935        },
5936        value: content
5937      });
5938    }
5939  }];
5940  /* harmony default export */ var heading_deprecated = (heading_deprecated_deprecated);
5941  
5942  // EXTERNAL MODULE: external {"this":["wp","keycodes"]}
5943  var external_this_wp_keycodes_ = __webpack_require__(18);
5944  
5945  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/heading-level-icon.js
5946  
5947  
5948  /**
5949   * WordPress dependencies
5950   */
5951  
5952  /** @typedef {import('@wordpress/element').WPComponent} WPComponent */
5953  
5954  /**
5955   * HeadingLevelIcon props.
5956   *
5957   * @typedef WPHeadingLevelIconProps
5958   *
5959   * @property {number}   level     The heading level to show an icon for.
5960   * @property {?boolean} isPressed Whether or not the icon should appear pressed; default: false.
5961   */
5962  
5963  /**
5964   * Heading level icon.
5965   *
5966   * @param {WPHeadingLevelIconProps} props Component props.
5967   *
5968   * @return {?WPComponent} The icon.
5969   */
5970  
5971  function HeadingLevelIcon(_ref) {
5972    var level = _ref.level,
5973        _ref$isPressed = _ref.isPressed,
5974        isPressed = _ref$isPressed === void 0 ? false : _ref$isPressed;
5975    var levelToPath = {
5976      1: 'M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z',
5977      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',
5978      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',
5979      4: 'M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z',
5980      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',
5981      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'
5982    };
5983  
5984    if (!levelToPath.hasOwnProperty(level)) {
5985      return null;
5986    }
5987  
5988    return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["SVG"], {
5989      width: "24",
5990      height: "24",
5991      viewBox: "0 0 20 20",
5992      xmlns: "http://www.w3.org/2000/svg",
5993      isPressed: isPressed
5994    }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Path"], {
5995      d: levelToPath[level]
5996    }));
5997  }
5998  
5999  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/heading-level-dropdown.js
6000  
6001  
6002  /**
6003   * WordPress dependencies
6004   */
6005  
6006  
6007  
6008  /**
6009   * Internal dependencies
6010   */
6011  
6012  
6013  var HEADING_LEVELS = [1, 2, 3, 4, 5, 6];
6014  var heading_level_dropdown_POPOVER_PROPS = {
6015    className: 'block-library-heading-level-dropdown',
6016    isAlternate: true
6017  };
6018  /** @typedef {import('@wordpress/element').WPComponent} WPComponent */
6019  
6020  /**
6021   * HeadingLevelDropdown props.
6022   *
6023   * @typedef WPHeadingLevelDropdownProps
6024   *
6025   * @property {number}                 selectedLevel The chosen heading level.
6026   * @property {(newValue:number)=>any} onChange      Callback to run when
6027   *                                                  toolbar value is changed.
6028   */
6029  
6030  /**
6031   * Dropdown for selecting a heading level (1 through 6).
6032   *
6033   * @param {WPHeadingLevelDropdownProps} props Component props.
6034   *
6035   * @return {WPComponent} The toolbar.
6036   */
6037  
6038  function HeadingLevelDropdown(_ref) {
6039    var selectedLevel = _ref.selectedLevel,
6040        onChange = _ref.onChange;
6041    return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Dropdown"], {
6042      popoverProps: heading_level_dropdown_POPOVER_PROPS,
6043      renderToggle: function renderToggle(_ref2) {
6044        var onToggle = _ref2.onToggle,
6045            isOpen = _ref2.isOpen;
6046  
6047        var openOnArrowDown = function openOnArrowDown(event) {
6048          if (!isOpen && event.keyCode === external_this_wp_keycodes_["DOWN"]) {
6049            event.preventDefault();
6050            event.stopPropagation();
6051            onToggle();
6052          }
6053        };
6054  
6055        return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarButton"], {
6056          "aria-expanded": isOpen,
6057          "aria-haspopup": "true",
6058          icon: Object(external_this_wp_element_["createElement"])(HeadingLevelIcon, {
6059            level: selectedLevel
6060          }),
6061          label: Object(external_this_wp_i18n_["__"])('Change heading level'),
6062          onClick: onToggle,
6063          onKeyDown: openOnArrowDown,
6064          showTooltip: true
6065        });
6066      },
6067      renderContent: function renderContent() {
6068        return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Toolbar"], {
6069          className: "block-library-heading-level-toolbar",
6070          label: Object(external_this_wp_i18n_["__"])('Change heading level')
6071        }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarGroup"], {
6072          isCollapsed: false,
6073          controls: HEADING_LEVELS.map(function (targetLevel) {
6074            var isActive = targetLevel === selectedLevel;
6075            return {
6076              icon: Object(external_this_wp_element_["createElement"])(HeadingLevelIcon, {
6077                level: targetLevel,
6078                isPressed: isActive
6079              }),
6080              title: Object(external_this_wp_i18n_["sprintf"])( // translators: %s: heading level e.g: "1", "2", "3"
6081              Object(external_this_wp_i18n_["__"])('Heading %d'), targetLevel),
6082              isActive: isActive,
6083              onClick: function onClick() {
6084                onChange(targetLevel);
6085              }
6086            };
6087          })
6088        }));
6089      }
6090    });
6091  }
6092  
6093  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/edit.js
6094  
6095  
6096  
6097  
6098  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; }
6099  
6100  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; }
6101  
6102  /**
6103   * External dependencies
6104   */
6105  
6106  /**
6107   * WordPress dependencies
6108   */
6109  
6110  
6111  
6112  
6113  
6114  /**
6115   * Internal dependencies
6116   */
6117  
6118  
6119  
6120  function HeadingEdit(_ref) {
6121    var attributes = _ref.attributes,
6122        setAttributes = _ref.setAttributes,
6123        mergeBlocks = _ref.mergeBlocks,
6124        onReplace = _ref.onReplace,
6125        mergedStyle = _ref.mergedStyle;
6126    var align = attributes.align,
6127        content = attributes.content,
6128        level = attributes.level,
6129        placeholder = attributes.placeholder;
6130    var tagName = 'h' + level;
6131    var blockProps = Object(external_this_wp_blockEditor_["useBlockProps"])({
6132      className: classnames_default()(Object(defineProperty["a" /* default */])({}, "has-text-align-".concat(align), align)),
6133      style: mergedStyle
6134    });
6135    return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["BlockControls"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToolbarGroup"], null, Object(external_this_wp_element_["createElement"])(HeadingLevelDropdown, {
6136      selectedLevel: level,
6137      onChange: function onChange(newLevel) {
6138        return setAttributes({
6139          level: newLevel
6140        });
6141      }
6142    })), Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["AlignmentToolbar"], {
6143      value: align,
6144      onChange: function onChange(nextAlign) {
6145        setAttributes({
6146          align: nextAlign
6147        });
6148      }
6149    })), Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"], Object(esm_extends["a" /* default */])({
6150      identifier: "content",
6151      tagName: tagName,
6152      value: content,
6153      onChange: function onChange(value) {
6154        return setAttributes({
6155          content: value
6156        });
6157      },
6158      onMerge: mergeBlocks,
6159      onSplit: function onSplit(value) {
6160        if (!value) {
6161          return Object(external_this_wp_blocks_["createBlock"])('core/paragraph');
6162        }
6163  
6164        return Object(external_this_wp_blocks_["createBlock"])('core/heading', heading_edit_objectSpread(heading_edit_objectSpread({}, attributes), {}, {
6165          content: value
6166        }));
6167      },
6168      onReplace: onReplace,
6169      onRemove: function onRemove() {
6170        return onReplace([]);
6171      },
6172      placeholder: placeholder || Object(external_this_wp_i18n_["__"])('Write heading…'),
6173      textAlign: align
6174    }, blockProps)));
6175  }
6176  
6177  /* harmony default export */ var heading_edit = (HeadingEdit);
6178  
6179  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/save.js
6180  
6181  
6182  
6183  /**
6184   * External dependencies
6185   */
6186  
6187  /**
6188   * WordPress dependencies
6189   */
6190  
6191  
6192  function heading_save_save(_ref) {
6193    var attributes = _ref.attributes;
6194    var align = attributes.align,
6195        content = attributes.content,
6196        level = attributes.level;
6197    var TagName = 'h' + level;
6198    var className = classnames_default()(Object(defineProperty["a" /* default */])({}, "has-text-align-".concat(align), align));
6199    return Object(external_this_wp_element_["createElement"])(TagName, external_this_wp_blockEditor_["useBlockProps"].save({
6200      className: className
6201    }), Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
6202      value: content
6203    }));
6204  }
6205  
6206  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/shared.js
6207  /**
6208   * Given a node name string for a heading node, returns its numeric level.
6209   *
6210   * @param {string} nodeName Heading node name.
6211   *
6212   * @return {number} Heading level.
6213   */
6214  function getLevelFromHeadingNodeName(nodeName) {
6215    return Number(nodeName.substr(1));
6216  }
6217  
6218  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/transforms.js
6219  
6220  
6221  /**
6222   * WordPress dependencies
6223   */
6224  
6225  /**
6226   * Internal dependencies
6227   */
6228  
6229  
6230  var transforms_apiVersion$name$cate = {
6231    apiVersion: 2,
6232    name: "core/heading",
6233    category: "text",
6234    attributes: {
6235      align: {
6236        type: "string"
6237      },
6238      content: {
6239        type: "string",
6240        source: "html",
6241        selector: "h1,h2,h3,h4,h5,h6",
6242        "default": ""
6243      },
6244      level: {
6245        type: "number",
6246        "default": 2
6247      },
6248      placeholder: {
6249        type: "string"
6250      }
6251    },
6252    supports: {
6253      align: ["wide", "full"],
6254      anchor: true,
6255      className: false,
6256      color: {
6257        link: true
6258      },
6259      fontSize: true,
6260      lineHeight: true,
6261      __experimentalSelector: {
6262        "core/heading/h1": "h1",
6263        "core/heading/h2": "h2",
6264        "core/heading/h3": "h3",
6265        "core/heading/h4": "h4",
6266        "core/heading/h5": "h5",
6267        "core/heading/h6": "h6"
6268      },
6269      __unstablePasteTextInline: true
6270    }
6271  },
6272      heading_transforms_name = transforms_apiVersion$name$cate.name;
6273  var heading_transforms_transforms = {
6274    from: [{
6275      type: 'block',
6276      isMultiBlock: true,
6277      blocks: ['core/paragraph'],
6278      transform: function transform(attributes) {
6279        return attributes.map(function (_ref) {
6280          var content = _ref.content,
6281              anchor = _ref.anchor;
6282          return Object(external_this_wp_blocks_["createBlock"])(heading_transforms_name, {
6283            content: content,
6284            anchor: anchor
6285          });
6286        });
6287      }
6288    }, {
6289      type: 'raw',
6290      selector: 'h1,h2,h3,h4,h5,h6',
6291      schema: function schema(_ref2) {
6292        var phrasingContentSchema = _ref2.phrasingContentSchema,
6293            isPaste = _ref2.isPaste;
6294        var schema = {
6295          children: phrasingContentSchema,
6296          attributes: isPaste ? [] : ['style', 'id']
6297        };
6298        return {
6299          h1: schema,
6300          h2: schema,
6301          h3: schema,
6302          h4: schema,
6303          h5: schema,
6304          h6: schema
6305        };
6306      },
6307      transform: function transform(node) {
6308        var attributes = Object(external_this_wp_blocks_["getBlockAttributes"])(heading_transforms_name, node.outerHTML);
6309  
6310        var _ref3 = node.style || {},
6311            textAlign = _ref3.textAlign;
6312  
6313        attributes.level = getLevelFromHeadingNodeName(node.nodeName);
6314  
6315        if (textAlign === 'left' || textAlign === 'center' || textAlign === 'right') {
6316          attributes.align = textAlign;
6317        }
6318  
6319        return Object(external_this_wp_blocks_["createBlock"])(heading_transforms_name, attributes);
6320      }
6321    }].concat(Object(toConsumableArray["a" /* default */])([1, 2, 3, 4, 5, 6].map(function (level) {
6322      return {
6323        type: 'prefix',
6324        prefix: Array(level + 1).join('#'),
6325        transform: function transform(content) {
6326          return Object(external_this_wp_blocks_["createBlock"])(heading_transforms_name, {
6327            level: level,
6328            content: content
6329          });
6330        }
6331      };
6332    }))),
6333    to: [{
6334      type: 'block',
6335      isMultiBlock: true,
6336      blocks: ['core/paragraph'],
6337      transform: function transform(attributes) {
6338        return attributes.map(function (_ref4) {
6339          var content = _ref4.content,
6340              anchor = _ref4.anchor;
6341          return Object(external_this_wp_blocks_["createBlock"])('core/paragraph', {
6342            content: content,
6343            anchor: anchor
6344          });
6345        });
6346      }
6347    }]
6348  };
6349  /* harmony default export */ var heading_transforms = (heading_transforms_transforms);
6350  
6351  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/heading/index.js
6352  /**
6353   * External dependencies
6354   */
6355  
6356  /**
6357   * WordPress dependencies
6358   */
6359  
6360  
6361  
6362  /**
6363   * Internal dependencies
6364   */
6365  
6366  
6367  
6368  var heading_metadata = {
6369    apiVersion: 2,
6370    name: "core/heading",
6371    category: "text",
6372    attributes: {
6373      align: {
6374        type: "string"
6375      },
6376      content: {
6377        type: "string",
6378        source: "html",
6379        selector: "h1,h2,h3,h4,h5,h6",
6380        "default": ""
6381      },
6382      level: {
6383        type: "number",
6384        "default": 2
6385      },
6386      placeholder: {
6387        type: "string"
6388      }
6389    },
6390    supports: {
6391      align: ["wide", "full"],
6392      anchor: true,
6393      className: false,
6394      color: {
6395        link: true
6396      },
6397      fontSize: true,
6398      lineHeight: true,
6399      __experimentalSelector: {
6400        "core/heading/h1": "h1",
6401        "core/heading/h2": "h2",
6402        "core/heading/h3": "h3",
6403        "core/heading/h4": "h4",
6404        "core/heading/h5": "h5",
6405        "core/heading/h6": "h6"
6406      },
6407      __unstablePasteTextInline: true
6408    }
6409  };
6410  
6411  
6412  var heading_name = heading_metadata.name;
6413  
6414  var heading_settings = {
6415    title: Object(external_this_wp_i18n_["__"])('Heading'),
6416    description: Object(external_this_wp_i18n_["__"])('Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content.'),
6417    icon: library_heading,
6418    keywords: [Object(external_this_wp_i18n_["__"])('title'), Object(external_this_wp_i18n_["__"])('subtitle')],
6419    example: {
6420      attributes: {
6421        content: Object(external_this_wp_i18n_["__"])('Code is Poetry'),
6422        level: 2
6423      }
6424    },
6425    __experimentalLabel: function __experimentalLabel(attributes, _ref) {
6426      var context = _ref.context;
6427  
6428      if (context === 'accessibility') {
6429        var content = attributes.content,
6430            level = attributes.level;
6431        return Object(external_this_lodash_["isEmpty"])(content) ? Object(external_this_wp_i18n_["sprintf"])(
6432        /* translators: accessibility text. %s: heading level. */
6433        Object(external_this_wp_i18n_["__"])('Level %s. Empty.'), level) : Object(external_this_wp_i18n_["sprintf"])(
6434        /* translators: accessibility text. 1: heading level. 2: heading content. */
6435        Object(external_this_wp_i18n_["__"])('Level %1$s. %2$s'), level, content);
6436      }
6437    },
6438    transforms: heading_transforms,
6439    deprecated: heading_deprecated,
6440    merge: function merge(attributes, attributesToMerge) {
6441      return {
6442        content: (attributes.content || '') + (attributesToMerge.content || '')
6443      };
6444    },
6445    edit: heading_edit,
6446    save: heading_save_save
6447  };
6448  
6449  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/quote.js
6450  
6451  
6452  /**
6453   * WordPress dependencies
6454   */
6455  
6456  var quote = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
6457    viewBox: "0 0 24 24",
6458    xmlns: "http://www.w3.org/2000/svg"
6459  }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
6460    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"
6461  }));
6462  /* harmony default export */ var library_quote = (quote);
6463  
6464  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/quote/deprecated.js
6465  
6466  
6467  
6468  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; }
6469  
6470  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; }
6471  
6472  /**
6473   * External dependencies
6474   */
6475  
6476  /**
6477   * WordPress dependencies
6478   */
6479  
6480  
6481  var quote_deprecated_blockAttributes = {
6482    value: {
6483      type: 'string',
6484      source: 'html',
6485      selector: 'blockquote',
6486      multiline: 'p',
6487      default: ''
6488    },
6489    citation: {
6490      type: 'string',
6491      source: 'html',
6492      selector: 'cite',
6493      default: ''
6494    },
6495    align: {
6496      type: 'string'
6497    }
6498  };
6499  var quote_deprecated_deprecated = [{
6500    attributes: quote_deprecated_blockAttributes,
6501    save: function save(_ref) {
6502      var attributes = _ref.attributes;
6503      var align = attributes.align,
6504          value = attributes.value,
6505          citation = attributes.citation;
6506      return Object(external_this_wp_element_["createElement"])("blockquote", {
6507        style: {
6508          textAlign: align ? align : null
6509        }
6510      }, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
6511        multiline: true,
6512        value: value
6513      }), !external_this_wp_blockEditor_["RichText"].isEmpty(citation) && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
6514        tagName: "cite",
6515        value: citation
6516      }));
6517    }
6518  }, {
6519    attributes: quote_deprecated_objectSpread(quote_deprecated_objectSpread({}, quote_deprecated_blockAttributes), {}, {
6520      style: {
6521        type: 'number',
6522        default: 1
6523      }
6524    }),
6525    migrate: function migrate(attributes) {
6526      if (attributes.style === 2) {
6527        return quote_deprecated_objectSpread(quote_deprecated_objectSpread({}, Object(external_this_lodash_["omit"])(attributes, ['style'])), {}, {
6528          className: attributes.className ? attributes.className + ' is-style-large' : 'is-style-large'
6529        });
6530      }
6531  
6532      return attributes;
6533    },
6534    save: function save(_ref2) {
6535      var attributes = _ref2.attributes;
6536      var align = attributes.align,
6537          value = attributes.value,
6538          citation = attributes.citation,
6539          style = attributes.style;
6540      return Object(external_this_wp_element_["createElement"])("blockquote", {
6541        className: style === 2 ? 'is-large' : '',
6542        style: {
6543          textAlign: align ? align : null
6544        }
6545      }, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
6546        multiline: true,
6547        value: value
6548      }), !external_this_wp_blockEditor_["RichText"].isEmpty(citation) && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
6549        tagName: "cite",
6550        value: citation
6551      }));
6552    }
6553  }, {
6554    attributes: quote_deprecated_objectSpread(quote_deprecated_objectSpread({}, quote_deprecated_blockAttributes), {}, {
6555      citation: {
6556        type: 'string',
6557        source: 'html',
6558        selector: 'footer',
6559        default: ''
6560      },
6561      style: {
6562        type: 'number',
6563        default: 1
6564      }
6565    }),
6566    save: function save(_ref3) {
6567      var attributes = _ref3.attributes;
6568      var align = attributes.align,
6569          value = attributes.value,
6570          citation = attributes.citation,
6571          style = attributes.style;
6572      return Object(external_this_wp_element_["createElement"])("blockquote", {
6573        className: "blocks-quote-style-".concat(style),
6574        style: {
6575          textAlign: align ? align : null
6576        }
6577      }, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
6578        multiline: true,
6579        value: value
6580      }), !external_this_wp_blockEditor_["RichText"].isEmpty(citation) && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
6581        tagName: "footer",
6582        value: citation
6583      }));
6584    }
6585  }];
6586  /* harmony default export */ var quote_deprecated = (quote_deprecated_deprecated);
6587  
6588  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/quote/edit.js
6589  
6590  
6591  
6592  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; }
6593  
6594  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; }
6595  
6596  /**
6597   * External dependencies
6598   */
6599  
6600  /**
6601   * WordPress dependencies
6602   */
6603  
6604  
6605  
6606  
6607  
6608  function QuoteEdit(_ref) {
6609    var attributes = _ref.attributes,
6610        setAttributes = _ref.setAttributes,
6611        isSelected = _ref.isSelected,
6612        mergeBlocks = _ref.mergeBlocks,
6613        onReplace = _ref.onReplace,
6614        className = _ref.className,
6615        insertBlocksAfter = _ref.insertBlocksAfter;
6616    var align = attributes.align,
6617        value = attributes.value,
6618        citation = attributes.citation;
6619    var blockProps = Object(external_this_wp_blockEditor_["useBlockProps"])({
6620      className: classnames_default()(className, Object(defineProperty["a" /* default */])({}, "has-text-align-".concat(align), align))
6621    });
6622    return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["BlockControls"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["AlignmentToolbar"], {
6623      value: align,
6624      onChange: function onChange(nextAlign) {
6625        setAttributes({
6626          align: nextAlign
6627        });
6628      }
6629    })), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["BlockQuotation"], blockProps, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"], {
6630      identifier: "value",
6631      multiline: true,
6632      value: value,
6633      onChange: function onChange(nextValue) {
6634        return setAttributes({
6635          value: nextValue
6636        });
6637      },
6638      onMerge: mergeBlocks,
6639      onRemove: function onRemove(forward) {
6640        var hasEmptyCitation = !citation || citation.length === 0;
6641  
6642        if (!forward && hasEmptyCitation) {
6643          onReplace([]);
6644        }
6645      },
6646      placeholder: // translators: placeholder text used for the quote
6647      Object(external_this_wp_i18n_["__"])('Write quote…'),
6648      onReplace: onReplace,
6649      onSplit: function onSplit(piece) {
6650        return Object(external_this_wp_blocks_["createBlock"])('core/quote', quote_edit_objectSpread(quote_edit_objectSpread({}, attributes), {}, {
6651          value: piece
6652        }));
6653      },
6654      __unstableOnSplitMiddle: function __unstableOnSplitMiddle() {
6655        return Object(external_this_wp_blocks_["createBlock"])('core/paragraph');
6656      },
6657      textAlign: align
6658    }), (!external_this_wp_blockEditor_["RichText"].isEmpty(citation) || isSelected) && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"], {
6659      identifier: "citation",
6660      value: citation,
6661      onChange: function onChange(nextCitation) {
6662        return setAttributes({
6663          citation: nextCitation
6664        });
6665      },
6666      __unstableMobileNoFocusOnMount: true,
6667      placeholder: // translators: placeholder text used for the citation
6668      Object(external_this_wp_i18n_["__"])('Write citation…'),
6669      className: "wp-block-quote__citation",
6670      textAlign: align,
6671      __unstableOnSplitAtEnd: function __unstableOnSplitAtEnd() {
6672        return insertBlocksAfter(Object(external_this_wp_blocks_["createBlock"])('core/paragraph'));
6673      }
6674    })));
6675  }
6676  
6677  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/quote/save.js
6678  
6679  
6680  
6681  /**
6682   * External dependencies
6683   */
6684  
6685  /**
6686   * WordPress dependencies
6687   */
6688  
6689  
6690  function quote_save_save(_ref) {
6691    var attributes = _ref.attributes;
6692    var align = attributes.align,
6693        value = attributes.value,
6694        citation = attributes.citation;
6695    var className = classnames_default()(Object(defineProperty["a" /* default */])({}, "has-text-align-".concat(align), align));
6696    return Object(external_this_wp_element_["createElement"])("blockquote", external_this_wp_blockEditor_["useBlockProps"].save({
6697      className: className
6698    }), Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
6699      multiline: true,
6700      value: value
6701    }), !external_this_wp_blockEditor_["RichText"].isEmpty(citation) && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
6702      tagName: "cite",
6703      value: citation
6704    }));
6705  }
6706  
6707  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
6708  var objectWithoutProperties = __webpack_require__(14);
6709  
6710  // EXTERNAL MODULE: external {"this":["wp","richText"]}
6711  var external_this_wp_richText_ = __webpack_require__(25);
6712  
6713  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/quote/transforms.js
6714  
6715  
6716  
6717  
6718  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; }
6719  
6720  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; }
6721  
6722  /**
6723   * WordPress dependencies
6724   */
6725  
6726  
6727  var quote_transforms_transforms = {
6728    from: [{
6729      type: 'block',
6730      isMultiBlock: true,
6731      blocks: ['core/paragraph'],
6732      transform: function transform(attributes) {
6733        return Object(external_this_wp_blocks_["createBlock"])('core/quote', {
6734          value: Object(external_this_wp_richText_["toHTMLString"])({
6735            value: Object(external_this_wp_richText_["join"])(attributes.map(function (_ref) {
6736              var content = _ref.content;
6737              return Object(external_this_wp_richText_["create"])({
6738                html: content
6739              });
6740            }), "\u2028"),
6741            multilineTag: 'p'
6742          }),
6743          anchor: attributes.anchor
6744        });
6745      }
6746    }, {
6747      type: 'block',
6748      blocks: ['core/heading'],
6749      transform: function transform(_ref2) {
6750        var content = _ref2.content,
6751            anchor = _ref2.anchor;
6752        return Object(external_this_wp_blocks_["createBlock"])('core/quote', {
6753          value: "<p>".concat(content, "</p>"),
6754          anchor: anchor
6755        });
6756      }
6757    }, {
6758      type: 'block',
6759      blocks: ['core/pullquote'],
6760      transform: function transform(_ref3) {
6761        var value = _ref3.value,
6762            citation = _ref3.citation,
6763            anchor = _ref3.anchor;
6764        return Object(external_this_wp_blocks_["createBlock"])('core/quote', {
6765          value: value,
6766          citation: citation,
6767          anchor: anchor
6768        });
6769      }
6770    }, {
6771      type: 'prefix',
6772      prefix: '>',
6773      transform: function transform(content) {
6774        return Object(external_this_wp_blocks_["createBlock"])('core/quote', {
6775          value: "<p>".concat(content, "</p>")
6776        });
6777      }
6778    }, {
6779      type: 'raw',
6780      isMatch: function isMatch(node) {
6781        var isParagraphOrSingleCite = function () {
6782          var hasCitation = false;
6783          return function (child) {
6784            // Child is a paragraph.
6785            if (child.nodeName === 'P') {
6786              return true;
6787            } // Child is a cite and no other cite child exists before it.
6788  
6789  
6790            if (!hasCitation && child.nodeName === 'CITE') {
6791              hasCitation = true;
6792              return true;
6793            }
6794          };
6795        }();
6796  
6797        return node.nodeName === 'BLOCKQUOTE' && // The quote block can only handle multiline paragraph
6798        // content with an optional cite child.
6799        Array.from(node.childNodes).every(isParagraphOrSingleCite);
6800      },
6801      schema: function schema(_ref4) {
6802        var phrasingContentSchema = _ref4.phrasingContentSchema;
6803        return {
6804          blockquote: {
6805            children: {
6806              p: {
6807                children: phrasingContentSchema
6808              },
6809              cite: {
6810                children: phrasingContentSchema
6811              }
6812            }
6813          }
6814        };
6815      }
6816    }],
6817    to: [{
6818      type: 'block',
6819      blocks: ['core/paragraph'],
6820      transform: function transform(_ref5) {
6821        var value = _ref5.value,
6822            citation = _ref5.citation;
6823        var paragraphs = [];
6824  
6825        if (value && value !== '<p></p>') {
6826          paragraphs.push.apply(paragraphs, Object(toConsumableArray["a" /* default */])(Object(external_this_wp_richText_["split"])(Object(external_this_wp_richText_["create"])({
6827            html: value,
6828            multilineTag: 'p'
6829          }), "\u2028").map(function (piece) {
6830            return Object(external_this_wp_blocks_["createBlock"])('core/paragraph', {
6831              content: Object(external_this_wp_richText_["toHTMLString"])({
6832                value: piece
6833              })
6834            });
6835          })));
6836        }
6837  
6838        if (citation && citation !== '<p></p>') {
6839          paragraphs.push(Object(external_this_wp_blocks_["createBlock"])('core/paragraph', {
6840            content: citation
6841          }));
6842        }
6843  
6844        if (paragraphs.length === 0) {
6845          return Object(external_this_wp_blocks_["createBlock"])('core/paragraph', {
6846            content: ''
6847          });
6848        }
6849  
6850        return paragraphs;
6851      }
6852    }, {
6853      type: 'block',
6854      blocks: ['core/heading'],
6855      transform: function transform(_ref6) {
6856        var value = _ref6.value,
6857            citation = _ref6.citation,
6858            attrs = Object(objectWithoutProperties["a" /* default */])(_ref6, ["value", "citation"]);
6859  
6860        // If there is no quote content, use the citation as the
6861        // content of the resulting heading. A nonexistent citation
6862        // will result in an empty heading.
6863        if (value === '<p></p>') {
6864          return Object(external_this_wp_blocks_["createBlock"])('core/heading', {
6865            content: citation
6866          });
6867        }
6868  
6869        var pieces = Object(external_this_wp_richText_["split"])(Object(external_this_wp_richText_["create"])({
6870          html: value,
6871          multilineTag: 'p'
6872        }), "\u2028");
6873        var headingBlock = Object(external_this_wp_blocks_["createBlock"])('core/heading', {
6874          content: Object(external_this_wp_richText_["toHTMLString"])({
6875            value: pieces[0]
6876          })
6877        });
6878  
6879        if (!citation && pieces.length === 1) {
6880          return headingBlock;
6881        }
6882  
6883        var quotePieces = pieces.slice(1);
6884        var quoteBlock = Object(external_this_wp_blocks_["createBlock"])('core/quote', quote_transforms_objectSpread(quote_transforms_objectSpread({}, attrs), {}, {
6885          citation: citation,
6886          value: Object(external_this_wp_richText_["toHTMLString"])({
6887            value: quotePieces.length ? Object(external_this_wp_richText_["join"])(pieces.slice(1), "\u2028") : Object(external_this_wp_richText_["create"])(),
6888            multilineTag: 'p'
6889          })
6890        }));
6891        return [headingBlock, quoteBlock];
6892      }
6893    }, {
6894      type: 'block',
6895      blocks: ['core/pullquote'],
6896      transform: function transform(_ref7) {
6897        var value = _ref7.value,
6898            citation = _ref7.citation,
6899            anchor = _ref7.anchor;
6900        return Object(external_this_wp_blocks_["createBlock"])('core/pullquote', {
6901          value: value,
6902          citation: citation,
6903          anchor: anchor
6904        });
6905      }
6906    }]
6907  };
6908  /* harmony default export */ var quote_transforms = (quote_transforms_transforms);
6909  
6910  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/quote/index.js
6911  
6912  
6913  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; }
6914  
6915  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; }
6916  
6917  /**
6918   * WordPress dependencies
6919   */
6920  
6921  
6922  /**
6923   * Internal dependencies
6924   */
6925  
6926  
6927  
6928  var quote_metadata = {
6929    apiVersion: 2,
6930    name: "core/quote",
6931    category: "text",
6932    attributes: {
6933      value: {
6934        type: "string",
6935        source: "html",
6936        selector: "blockquote",
6937        multiline: "p",
6938        "default": ""
6939      },
6940      citation: {
6941        type: "string",
6942        source: "html",
6943        selector: "cite",
6944        "default": ""
6945      },
6946      align: {
6947        type: "string"
6948      }
6949    },
6950    supports: {
6951      anchor: true
6952    }
6953  };
6954  
6955  
6956  var quote_name = quote_metadata.name;
6957  
6958  var quote_settings = {
6959    title: Object(external_this_wp_i18n_["__"])('Quote'),
6960    description: Object(external_this_wp_i18n_["__"])('Give quoted text visual emphasis. "In quoting others, we cite ourselves." — Julio Cortázar'),
6961    icon: library_quote,
6962    keywords: [Object(external_this_wp_i18n_["__"])('blockquote'), Object(external_this_wp_i18n_["__"])('cite')],
6963    example: {
6964      attributes: {
6965        value: '<p>' + Object(external_this_wp_i18n_["__"])('In quoting others, we cite ourselves.') + '</p>',
6966        citation: 'Julio Cortázar',
6967        className: 'is-style-large'
6968      }
6969    },
6970    styles: [{
6971      name: 'default',
6972      label: Object(external_this_wp_i18n_["_x"])('Default', 'block style'),
6973      isDefault: true
6974    }, {
6975      name: 'large',
6976      label: Object(external_this_wp_i18n_["_x"])('Large', 'block style')
6977    }],
6978    transforms: quote_transforms,
6979    edit: QuoteEdit,
6980    save: quote_save_save,
6981    merge: function merge(attributes, _ref) {
6982      var value = _ref.value,
6983          citation = _ref.citation;
6984  
6985      // Quote citations cannot be merged. Pick the second one unless it's
6986      // empty.
6987      if (!citation) {
6988        citation = attributes.citation;
6989      }
6990  
6991      if (!value || value === '<p></p>') {
6992        return quote_objectSpread(quote_objectSpread({}, attributes), {}, {
6993          citation: citation
6994        });
6995      }
6996  
6997      return quote_objectSpread(quote_objectSpread({}, attributes), {}, {
6998        value: attributes.value + value,
6999        citation: citation
7000      });
7001    },
7002    deprecated: quote_deprecated
7003  };
7004  
7005  // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/gallery.js
7006  
7007  
7008  /**
7009   * WordPress dependencies
7010   */
7011  
7012  var gallery = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], {
7013    viewBox: "0 0 24 24",
7014    xmlns: "http://www.w3.org/2000/svg"
7015  }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], {
7016    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"
7017  }));
7018  /* harmony default export */ var library_gallery = (gallery);
7019  
7020  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/shared.js
7021  /**
7022   * External dependencies
7023   */
7024  
7025  function defaultColumnsNumber(attributes) {
7026    return Math.min(3, attributes.images.length);
7027  }
7028  var shared_pickRelevantMediaFiles = function pickRelevantMediaFiles(image) {
7029    var sizeSlug = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'large';
7030    var imageProps = Object(external_this_lodash_["pick"])(image, ['alt', 'id', 'link', 'caption']);
7031    imageProps.url = Object(external_this_lodash_["get"])(image, ['sizes', sizeSlug, 'url']) || Object(external_this_lodash_["get"])(image, ['media_details', 'sizes', sizeSlug, 'source_url']) || image.url;
7032    var fullUrl = Object(external_this_lodash_["get"])(image, ['sizes', 'full', 'url']) || Object(external_this_lodash_["get"])(image, ['media_details', 'sizes', 'full', 'source_url']);
7033  
7034    if (fullUrl) {
7035      imageProps.fullUrl = fullUrl;
7036    }
7037  
7038    return imageProps;
7039  };
7040  
7041  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/constants.js
7042  var constants_LINK_DESTINATION_NONE = 'none';
7043  var constants_LINK_DESTINATION_MEDIA = 'file';
7044  var constants_LINK_DESTINATION_ATTACHMENT = 'post';
7045  
7046  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/deprecated.js
7047  
7048  
7049  
7050  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; }
7051  
7052  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; }
7053  
7054  /**
7055   * External dependencies
7056   */
7057  
7058  
7059  /**
7060   * WordPress dependencies
7061   */
7062  
7063  
7064  /**
7065   * Internal dependencies
7066   */
7067  
7068  
7069  
7070  var gallery_deprecated_deprecated = [{
7071    attributes: {
7072      images: {
7073        type: 'array',
7074        default: [],
7075        source: 'query',
7076        selector: '.blocks-gallery-item',
7077        query: {
7078          url: {
7079            type: 'string',
7080            source: 'attribute',
7081            selector: 'img',
7082            attribute: 'src'
7083          },
7084          fullUrl: {
7085            type: 'string',
7086            source: 'attribute',
7087            selector: 'img',
7088            attribute: 'data-full-url'
7089          },
7090          link: {
7091            type: 'string',
7092            source: 'attribute',
7093            selector: 'img',
7094            attribute: 'data-link'
7095          },
7096          alt: {
7097            type: 'string',
7098            source: 'attribute',
7099            selector: 'img',
7100            attribute: 'alt',
7101            default: ''
7102          },
7103          id: {
7104            type: 'string',
7105            source: 'attribute',
7106            selector: 'img',
7107            attribute: 'data-id'
7108          },
7109          caption: {
7110            type: 'string',
7111            source: 'html',
7112            selector: '.blocks-gallery-item__caption'
7113          }
7114        }
7115      },
7116      ids: {
7117        type: 'array',
7118        items: {
7119          type: 'number'
7120        },
7121        default: []
7122      },
7123      columns: {
7124        type: 'number',
7125        minimum: 1,
7126        maximum: 8
7127      },
7128      caption: {
7129        type: 'string',
7130        source: 'html',
7131        selector: '.blocks-gallery-caption'
7132      },
7133      imageCrop: {
7134        type: 'boolean',
7135        default: true
7136      },
7137      linkTo: {
7138        type: 'string'
7139      },
7140      sizeSlug: {
7141        type: 'string',
7142        default: 'large'
7143      }
7144    },
7145    save: function save(_ref) {
7146      var attributes = _ref.attributes;
7147      var images = attributes.images,
7148          _attributes$columns = attributes.columns,
7149          columns = _attributes$columns === void 0 ? defaultColumnsNumber(attributes) : _attributes$columns,
7150          imageCrop = attributes.imageCrop,
7151          caption = attributes.caption,
7152          linkTo = attributes.linkTo;
7153      return Object(external_this_wp_element_["createElement"])("figure", {
7154        className: "columns-".concat(columns, " ").concat(imageCrop ? 'is-cropped' : '')
7155      }, Object(external_this_wp_element_["createElement"])("ul", {
7156        className: "blocks-gallery-grid"
7157      }, images.map(function (image) {
7158        var href;
7159  
7160        switch (linkTo) {
7161          case constants_LINK_DESTINATION_MEDIA:
7162            href = image.fullUrl || image.url;
7163            break;
7164  
7165          case constants_LINK_DESTINATION_ATTACHMENT:
7166            href = image.link;
7167            break;
7168        }
7169  
7170        var img = Object(external_this_wp_element_["createElement"])("img", {
7171          src: image.url,
7172          alt: image.alt,
7173          "data-id": image.id,
7174          "data-full-url": image.fullUrl,
7175          "data-link": image.link,
7176          className: image.id ? "wp-image-".concat(image.id) : null
7177        });
7178        return Object(external_this_wp_element_["createElement"])("li", {
7179          key: image.id || image.url,
7180          className: "blocks-gallery-item"
7181        }, Object(external_this_wp_element_["createElement"])("figure", null, href ? Object(external_this_wp_element_["createElement"])("a", {
7182          href: href
7183        }, img) : img, !external_this_wp_blockEditor_["RichText"].isEmpty(image.caption) && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
7184          tagName: "figcaption",
7185          className: "blocks-gallery-item__caption",
7186          value: image.caption
7187        })));
7188      })), !external_this_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
7189        tagName: "figcaption",
7190        className: "blocks-gallery-caption",
7191        value: caption
7192      }));
7193    }
7194  }, {
7195    attributes: {
7196      images: {
7197        type: 'array',
7198        default: [],
7199        source: 'query',
7200        selector: '.blocks-gallery-item',
7201        query: {
7202          url: {
7203            type: 'string',
7204            source: 'attribute',
7205            selector: 'img',
7206            attribute: 'src'
7207          },
7208          fullUrl: {
7209            type: 'string',
7210            source: 'attribute',
7211            selector: 'img',
7212            attribute: 'data-full-url'
7213          },
7214          link: {
7215            type: 'string',
7216            source: 'attribute',
7217            selector: 'img',
7218            attribute: 'data-link'
7219          },
7220          alt: {
7221            type: 'string',
7222            source: 'attribute',
7223            selector: 'img',
7224            attribute: 'alt',
7225            default: ''
7226          },
7227          id: {
7228            type: 'string',
7229            source: 'attribute',
7230            selector: 'img',
7231            attribute: 'data-id'
7232          },
7233          caption: {
7234            type: 'string',
7235            source: 'html',
7236            selector: '.blocks-gallery-item__caption'
7237          }
7238        }
7239      },
7240      ids: {
7241        type: 'array',
7242        items: {
7243          type: 'number'
7244        },
7245        default: []
7246      },
7247      columns: {
7248        type: 'number',
7249        minimum: 1,
7250        maximum: 8
7251      },
7252      caption: {
7253        type: 'string',
7254        source: 'html',
7255        selector: '.blocks-gallery-caption'
7256      },
7257      imageCrop: {
7258        type: 'boolean',
7259        default: true
7260      },
7261      linkTo: {
7262        type: 'string',
7263        default: 'none'
7264      },
7265      sizeSlug: {
7266        type: 'string',
7267        default: 'large'
7268      }
7269    },
7270    supports: {
7271      align: true
7272    },
7273    isEligible: function isEligible(_ref2) {
7274      var linkTo = _ref2.linkTo;
7275      return !linkTo || linkTo === 'attachment' || linkTo === 'media';
7276    },
7277    migrate: function migrate(attributes) {
7278      var linkTo = attributes.linkTo;
7279  
7280      if (!attributes.linkTo) {
7281        linkTo = 'none';
7282      } else if (attributes.linkTo === 'attachment') {
7283        linkTo = 'post';
7284      } else if (attributes.linkTo === 'media') {
7285        linkTo = 'file';
7286      }
7287  
7288      return gallery_deprecated_objectSpread(gallery_deprecated_objectSpread({}, attributes), {}, {
7289        linkTo: linkTo
7290      });
7291    },
7292    save: function save(_ref3) {
7293      var attributes = _ref3.attributes;
7294      var images = attributes.images,
7295          _attributes$columns2 = attributes.columns,
7296          columns = _attributes$columns2 === void 0 ? defaultColumnsNumber(attributes) : _attributes$columns2,
7297          imageCrop = attributes.imageCrop,
7298          caption = attributes.caption,
7299          linkTo = attributes.linkTo;
7300      return Object(external_this_wp_element_["createElement"])("figure", {
7301        className: "columns-".concat(columns, " ").concat(imageCrop ? 'is-cropped' : '')
7302      }, Object(external_this_wp_element_["createElement"])("ul", {
7303        className: "blocks-gallery-grid"
7304      }, images.map(function (image) {
7305        var href;
7306  
7307        switch (linkTo) {
7308          case 'media':
7309            href = image.fullUrl || image.url;
7310            break;
7311  
7312          case 'attachment':
7313            href = image.link;
7314            break;
7315        }
7316  
7317        var img = Object(external_this_wp_element_["createElement"])("img", {
7318          src: image.url,
7319          alt: image.alt,
7320          "data-id": image.id,
7321          "data-full-url": image.fullUrl,
7322          "data-link": image.link,
7323          className: image.id ? "wp-image-".concat(image.id) : null
7324        });
7325        return Object(external_this_wp_element_["createElement"])("li", {
7326          key: image.id || image.url,
7327          className: "blocks-gallery-item"
7328        }, Object(external_this_wp_element_["createElement"])("figure", null, href ? Object(external_this_wp_element_["createElement"])("a", {
7329          href: href
7330        }, img) : img, !external_this_wp_blockEditor_["RichText"].isEmpty(image.caption) && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
7331          tagName: "figcaption",
7332          className: "blocks-gallery-item__caption",
7333          value: image.caption
7334        })));
7335      })), !external_this_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
7336        tagName: "figcaption",
7337        className: "blocks-gallery-caption",
7338        value: caption
7339      }));
7340    }
7341  }, {
7342    attributes: {
7343      images: {
7344        type: 'array',
7345        default: [],
7346        source: 'query',
7347        selector: '.blocks-gallery-item',
7348        query: {
7349          url: {
7350            source: 'attribute',
7351            selector: 'img',
7352            attribute: 'src'
7353          },
7354          fullUrl: {
7355            source: 'attribute',
7356            selector: 'img',
7357            attribute: 'data-full-url'
7358          },
7359          link: {
7360            source: 'attribute',
7361            selector: 'img',
7362            attribute: 'data-link'
7363          },
7364          alt: {
7365            source: 'attribute',
7366            selector: 'img',
7367            attribute: 'alt',
7368            default: ''
7369          },
7370          id: {
7371            source: 'attribute',
7372            selector: 'img',
7373            attribute: 'data-id'
7374          },
7375          caption: {
7376            type: 'string',
7377            source: 'html',
7378            selector: '.blocks-gallery-item__caption'
7379          }
7380        }
7381      },
7382      ids: {
7383        type: 'array',
7384        default: []
7385      },
7386      columns: {
7387        type: 'number'
7388      },
7389      caption: {
7390        type: 'string',
7391        source: 'html',
7392        selector: '.blocks-gallery-caption'
7393      },
7394      imageCrop: {
7395        type: 'boolean',
7396        default: true
7397      },
7398      linkTo: {
7399        type: 'string',
7400        default: 'none'
7401      }
7402    },
7403    supports: {
7404      align: true
7405    },
7406    isEligible: function isEligible(_ref4) {
7407      var ids = _ref4.ids;
7408      return ids && ids.some(function (id) {
7409        return typeof id === 'string';
7410      });
7411    },
7412    migrate: function migrate(attributes) {
7413      return gallery_deprecated_objectSpread(gallery_deprecated_objectSpread({}, attributes), {}, {
7414        ids: Object(external_this_lodash_["map"])(attributes.ids, function (id) {
7415          var parsedId = parseInt(id, 10);
7416          return Number.isInteger(parsedId) ? parsedId : null;
7417        })
7418      });
7419    },
7420    save: function save(_ref5) {
7421      var attributes = _ref5.attributes;
7422      var images = attributes.images,
7423          _attributes$columns3 = attributes.columns,
7424          columns = _attributes$columns3 === void 0 ? defaultColumnsNumber(attributes) : _attributes$columns3,
7425          imageCrop = attributes.imageCrop,
7426          caption = attributes.caption,
7427          linkTo = attributes.linkTo;
7428      return Object(external_this_wp_element_["createElement"])("figure", {
7429        className: "columns-".concat(columns, " ").concat(imageCrop ? 'is-cropped' : '')
7430      }, Object(external_this_wp_element_["createElement"])("ul", {
7431        className: "blocks-gallery-grid"
7432      }, images.map(function (image) {
7433        var href;
7434  
7435        switch (linkTo) {
7436          case 'media':
7437            href = image.fullUrl || image.url;
7438            break;
7439  
7440          case 'attachment':
7441            href = image.link;
7442            break;
7443        }
7444  
7445        var img = Object(external_this_wp_element_["createElement"])("img", {
7446          src: image.url,
7447          alt: image.alt,
7448          "data-id": image.id,
7449          "data-full-url": image.fullUrl,
7450          "data-link": image.link,
7451          className: image.id ? "wp-image-".concat(image.id) : null
7452        });
7453        return Object(external_this_wp_element_["createElement"])("li", {
7454          key: image.id || image.url,
7455          className: "blocks-gallery-item"
7456        }, Object(external_this_wp_element_["createElement"])("figure", null, href ? Object(external_this_wp_element_["createElement"])("a", {
7457          href: href
7458        }, img) : img, !external_this_wp_blockEditor_["RichText"].isEmpty(image.caption) && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
7459          tagName: "figcaption",
7460          className: "blocks-gallery-item__caption",
7461          value: image.caption
7462        })));
7463      })), !external_this_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
7464        tagName: "figcaption",
7465        className: "blocks-gallery-caption",
7466        value: caption
7467      }));
7468    }
7469  }, {
7470    attributes: {
7471      images: {
7472        type: 'array',
7473        default: [],
7474        source: 'query',
7475        selector: 'ul.wp-block-gallery .blocks-gallery-item',
7476        query: {
7477          url: {
7478            source: 'attribute',
7479            selector: 'img',
7480            attribute: 'src'
7481          },
7482          fullUrl: {
7483            source: 'attribute',
7484            selector: 'img',
7485            attribute: 'data-full-url'
7486          },
7487          alt: {
7488            source: 'attribute',
7489            selector: 'img',
7490            attribute: 'alt',
7491            default: ''
7492          },
7493          id: {
7494            source: 'attribute',
7495            selector: 'img',
7496            attribute: 'data-id'
7497          },
7498          link: {
7499            source: 'attribute',
7500            selector: 'img',
7501            attribute: 'data-link'
7502          },
7503          caption: {
7504            type: 'array',
7505            source: 'children',
7506            selector: 'figcaption'
7507          }
7508        }
7509      },
7510      ids: {
7511        type: 'array',
7512        default: []
7513      },
7514      columns: {
7515        type: 'number'
7516      },
7517      imageCrop: {
7518        type: 'boolean',
7519        default: true
7520      },
7521      linkTo: {
7522        type: 'string',
7523        default: 'none'
7524      }
7525    },
7526    supports: {
7527      align: true
7528    },
7529    save: function save(_ref6) {
7530      var attributes = _ref6.attributes;
7531      var images = attributes.images,
7532          _attributes$columns4 = attributes.columns,
7533          columns = _attributes$columns4 === void 0 ? defaultColumnsNumber(attributes) : _attributes$columns4,
7534          imageCrop = attributes.imageCrop,
7535          linkTo = attributes.linkTo;
7536      return Object(external_this_wp_element_["createElement"])("ul", {
7537        className: "columns-".concat(columns, " ").concat(imageCrop ? 'is-cropped' : '')
7538      }, images.map(function (image) {
7539        var href;
7540  
7541        switch (linkTo) {
7542          case 'media':
7543            href = image.fullUrl || image.url;
7544            break;
7545  
7546          case 'attachment':
7547            href = image.link;
7548            break;
7549        }
7550  
7551        var img = Object(external_this_wp_element_["createElement"])("img", {
7552          src: image.url,
7553          alt: image.alt,
7554          "data-id": image.id,
7555          "data-full-url": image.fullUrl,
7556          "data-link": image.link,
7557          className: image.id ? "wp-image-".concat(image.id) : null
7558        });
7559        return Object(external_this_wp_element_["createElement"])("li", {
7560          key: image.id || image.url,
7561          className: "blocks-gallery-item"
7562        }, Object(external_this_wp_element_["createElement"])("figure", null, href ? Object(external_this_wp_element_["createElement"])("a", {
7563          href: href
7564        }, img) : img, image.caption && image.caption.length > 0 && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
7565          tagName: "figcaption",
7566          value: image.caption
7567        })));
7568      }));
7569    }
7570  }, {
7571    attributes: {
7572      images: {
7573        type: 'array',
7574        default: [],
7575        source: 'query',
7576        selector: 'ul.wp-block-gallery .blocks-gallery-item',
7577        query: {
7578          url: {
7579            source: 'attribute',
7580            selector: 'img',
7581            attribute: 'src'
7582          },
7583          alt: {
7584            source: 'attribute',
7585            selector: 'img',
7586            attribute: 'alt',
7587            default: ''
7588          },
7589          id: {
7590            source: 'attribute',
7591            selector: 'img',
7592            attribute: 'data-id'
7593          },
7594          link: {
7595            source: 'attribute',
7596            selector: 'img',
7597            attribute: 'data-link'
7598          },
7599          caption: {
7600            type: 'array',
7601            source: 'children',
7602            selector: 'figcaption'
7603          }
7604        }
7605      },
7606      columns: {
7607        type: 'number'
7608      },
7609      imageCrop: {
7610        type: 'boolean',
7611        default: true
7612      },
7613      linkTo: {
7614        type: 'string',
7615        default: 'none'
7616      }
7617    },
7618    isEligible: function isEligible(_ref7) {
7619      var images = _ref7.images,
7620          ids = _ref7.ids;
7621      return images && images.length > 0 && (!ids && images || ids && images && ids.length !== images.length || Object(external_this_lodash_["some"])(images, function (id, index) {
7622        if (!id && ids[index] !== null) {
7623          return true;
7624        }
7625  
7626        return parseInt(id, 10) !== ids[index];
7627      }));
7628    },
7629    migrate: function migrate(attributes) {
7630      return gallery_deprecated_objectSpread(gallery_deprecated_objectSpread({}, attributes), {}, {
7631        ids: Object(external_this_lodash_["map"])(attributes.images, function (_ref8) {
7632          var id = _ref8.id;
7633  
7634          if (!id) {
7635            return null;
7636          }
7637  
7638          return parseInt(id, 10);
7639        })
7640      });
7641    },
7642    supports: {
7643      align: true
7644    },
7645    save: function save(_ref9) {
7646      var attributes = _ref9.attributes;
7647      var images = attributes.images,
7648          _attributes$columns5 = attributes.columns,
7649          columns = _attributes$columns5 === void 0 ? defaultColumnsNumber(attributes) : _attributes$columns5,
7650          imageCrop = attributes.imageCrop,
7651          linkTo = attributes.linkTo;
7652      return Object(external_this_wp_element_["createElement"])("ul", {
7653        className: "columns-".concat(columns, " ").concat(imageCrop ? 'is-cropped' : '')
7654      }, images.map(function (image) {
7655        var href;
7656  
7657        switch (linkTo) {
7658          case 'media':
7659            href = image.url;
7660            break;
7661  
7662          case 'attachment':
7663            href = image.link;
7664            break;
7665        }
7666  
7667        var img = Object(external_this_wp_element_["createElement"])("img", {
7668          src: image.url,
7669          alt: image.alt,
7670          "data-id": image.id,
7671          "data-link": image.link,
7672          className: image.id ? "wp-image-".concat(image.id) : null
7673        });
7674        return Object(external_this_wp_element_["createElement"])("li", {
7675          key: image.id || image.url,
7676          className: "blocks-gallery-item"
7677        }, Object(external_this_wp_element_["createElement"])("figure", null, href ? Object(external_this_wp_element_["createElement"])("a", {
7678          href: href
7679        }, img) : img, image.caption && image.caption.length > 0 && Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["RichText"].Content, {
7680          tagName: "figcaption",
7681          value: image.caption
7682        })));
7683      }));
7684    }
7685  }, {
7686    attributes: {
7687      images: {
7688        type: 'array',
7689        default: [],
7690        source: 'query',
7691        selector: 'div.wp-block-gallery figure.blocks-gallery-image img',
7692        query: {
7693          url: {
7694            source: 'attribute',
7695            attribute: 'src'
7696          },
7697          alt: {
7698            source: 'attribute',
7699            attribute: 'alt',
7700            default: ''
7701          },
7702          id: {
7703            source: 'attribute',
7704            attribute: 'data-id'
7705          }
7706        }
7707      },
7708      columns: {
7709        type: 'number'
7710      },
7711      imageCrop: {
7712        type: 'boolean',
7713        default: true
7714      },
7715      linkTo: {
7716        type: 'string',
7717        default: 'none'
7718      },
7719      align: {
7720        type: 'string',
7721        default: 'none'
7722      }
7723    },
7724    supports: {
7725      align: true
7726    },
7727    save: function save(_ref10) {
7728      var attributes = _ref10.attributes;
7729      var images = attributes.images,
7730          _attributes$columns6 = attributes.columns,
7731          columns = _attributes$columns6 === void 0 ? defaultColumnsNumber(attributes) : _attributes$columns6,
7732          align = attributes.align,
7733          imageCrop = attributes.imageCrop,
7734          linkTo = attributes.linkTo;
7735      var className = classnames_default()("columns-".concat(columns), {
7736        alignnone: align === 'none',
7737        'is-cropped': imageCrop
7738      });
7739      return Object(external_this_wp_element_["createElement"])("div", {
7740        className: className
7741      }, images.map(function (image) {
7742        var href;
7743  
7744        switch (linkTo) {
7745          case 'media':
7746            href = image.url;
7747            break;
7748  
7749          case 'attachment':
7750            href = image.link;
7751            break;
7752        }
7753  
7754        var img = Object(external_this_wp_element_["createElement"])("img", {
7755          src: image.url,
7756          alt: image.alt,
7757          "data-id": image.id
7758        });
7759        return Object(external_this_wp_element_["createElement"])("figure", {
7760          key: image.id || image.url,
7761          className: "blocks-gallery-image"
7762        }, href ? Object(external_this_wp_element_["createElement"])("a", {
7763          href: href
7764        }, img) : img);
7765      }));
7766    }
7767  }];
7768  /* harmony default export */ var gallery_deprecated = (gallery_deprecated_deprecated);
7769  
7770  // EXTERNAL MODULE: external {"this":["wp","viewport"]}
7771  var external_this_wp_viewport_ = __webpack_require__(101);
7772  
7773  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/shared-icon.js
7774  
7775  
7776  /**
7777   * WordPress dependencies
7778   */
7779  
7780  
7781  var sharedIcon = Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["BlockIcon"], {
7782    icon: library_gallery
7783  });
7784  
7785  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
7786  var classCallCheck = __webpack_require__(21);
7787  
7788  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
7789  var createClass = __webpack_require__(22);
7790  
7791  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
7792  var assertThisInitialized = __webpack_require__(16);
7793  
7794  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules
7795  var inherits = __webpack_require__(23);
7796  
7797  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
7798  var possibleConstructorReturn = __webpack_require__(24);
7799  
7800  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
7801  var getPrototypeOf = __webpack_require__(19);
7802  
7803  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-left.js
7804  var chevron_left = __webpack_require__(215);
7805  
7806  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-right.js
7807  var chevron_right = __webpack_require__(214);
7808  
7809  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/edit.js + 1 modules
7810  var library_edit = __webpack_require__(274);
7811  
7812  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/close-small.js
7813  var close_small = __webpack_require__(159);
7814  
7815  // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/gallery-image.js
7816  
7817  
7818  
7819  
7820  
7821  
7822  
7823  
7824  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); }; }
7825  
7826  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; } }
7827  
7828  /**
7829   * External dependencies
7830   */
7831  
7832  
7833  /**
7834   * WordPress dependencies
7835   */
7836  
7837  
7838  
7839  
7840  
7841  
7842  
7843  
7844  
7845  
7846  /**
7847   * Internal dependencies
7848   */
7849  
7850  
7851  
7852  
7853  var gallery_image_isTemporaryImage = function isTemporaryImage(id, url) {
7854    return !id && Object(external_this_wp_blob_["isBlobURL"])(url);
7855  };
7856  
7857  var gallery_image_GalleryImage = /*#__PURE__*/function (_Component) {
7858    Object(inherits["a" /* default */])(GalleryImage, _Component);
7859  
7860    var _super = _createSuper(GalleryImage);
7861  
7862    function GalleryImage() {
7863      var _this;
7864  
7865      Object(classCallCheck["a" /* default */])(this, GalleryImage);
7866  
7867      _this = _super.apply(this, arguments);
7868      _this.onSelectImage = _this.onSelectImage.bind(Object(assertThisInitialized["a" /* default */])(_this));
7869      _this.onSelectCaption = _this.onSelectCaption.bind(Object(assertThisInitialized["a" /* default */])(_this));
7870      _this.onRemoveImage = _this.onRemoveImage.bind(Object(assertThisInitialized["a" /* default */])(_this));
7871      _this.bindContainer = _this.bindContainer.bind(Object(assertThisInitialized["a" /* default */])(_this));
7872      _this.onEdit = _this.onEdit.bind(Object(assertThisInitialized["a" /* default */])(_this));
7873      _this.onSelectImageFromLibrary = _this.onSelectImageFromLibrary.bind(Object(assertThisInitialized["a" /* default */])(_this));
7874      _this.onSelectCustomURL = _this.onSelectCustomURL.bind(Object(assertThisInitialized["a" /* default */])(_this));
7875      _this.state = {
7876        captionSelected: false,
7877        isEditing: false
7878      };
7879      return _this;
7880    }
7881  
7882    Object(createClass["a" /* default */])(GalleryImage, [{
7883      key: "bindContainer",
7884      value: function bindContainer(ref) {
7885        this.container = ref;
7886      }
7887    }, {
7888      key: "onSelectCaption",
7889      value: function onSelectCaption() {
7890        if (!this.state.captionSelected) {
7891          this.setState({
7892            captionSelected: true
7893          });
7894        }
7895  
7896        if (!this.props.isSelected) {
7897          this.props.onSelect();
7898        }
7899      }
7900    }, {
7901      key: "onSelectImage",
7902      value: function onSelectImage() {
7903        if (!this.props.isSelected) {
7904          this.props.onSelect();
7905        }
7906  
7907        if (this.state.captionSelected) {
7908          this.setState({
7909            captionSelected: false
7910          });
7911        }
7912      }
7913    }, {
7914      key: "onRemoveImage",
7915      value: function onRemoveImage(event) {
7916        if (this.container === document.activeElement && this.props.isSelected && [external_this_wp_keycodes_["BACKSPACE"], external_this_wp_keycodes_["DELETE"]].indexOf(event.keyCode) !== -1) {
7917          event.stopPropagation();
7918          event.preventDefault();
7919          this.props.onRemove();
7920        }
7921      }
7922    }, {
7923      key: "onEdit",
7924      value: function onEdit() {
7925        this.setState({
7926          isEditing: true
7927        });
7928      }
7929    }, {
7930      key: "componentDidUpdate",
7931      value: function componentDidUpdate(prevProps) {
7932        var _this$props = this.props,
7933            isSelected = _this$props.isSelected,
7934            image = _this$props.image,
7935            url = _this$props.url,
7936            __unstableMarkNextChangeAsNotPersistent = _this$props.__unstableMarkNextChangeAsNotPersistent;
7937  
7938        if (image && !url) {
7939          __unstableMarkNextChangeAsNotPersistent();
7940  
7941          this.props.setAttributes({
7942            url: image.source_url,
7943            alt: image.alt_text
7944          });
7945        } // unselect the caption so when the user selects other image and comeback
7946        // the caption is not immediately selected
7947  
7948  
7949        if (this.state.captionSelected && !isSelected && prevProps.isSelected) {
7950          this.setState({
7951            captionSelected: false
7952          });
7953        }
7954      }
7955    }, {
7956      key: "deselectOnBlur",
7957      value: function deselectOnBlur() {
7958        this.props.onDeselect();
7959      }
7960    }, {
7961      key: "onSelectImageFromLibrary",
7962      value: function onSelectImageFromLibrary(media) {
7963        var _this$props2 = this.props,
7964            setAttributes = _this$props2.setAttributes,
7965            id = _this$props2.id,
7966            url = _this$props2.url,
7967            alt = _this$props2.alt,
7968            caption = _this$props2.caption,
7969            sizeSlug = _this$props2.sizeSlug;
7970  
7971        if (!media || !media.url) {
7972          return;
7973        }
7974  
7975        var mediaAttributes = shared_pickRelevantMediaFiles(media, sizeSlug); // If the current image is temporary but an alt text was meanwhile
7976        // written by the user, make sure the text is not overwritten.
7977  
7978        if (gallery_image_isTemporaryImage(id, url)) {
7979          if (alt) {
7980            mediaAttributes = Object(external_this_lodash_["omit"])(mediaAttributes, ['alt']);
7981          }
7982        } // If a caption text was meanwhile written by the user,
7983        // make sure the text is not overwritten by empty captions.
7984  
7985  
7986        if (caption && !Object(external_this_lodash_["get"])(mediaAttributes, ['caption'])) {
7987          mediaAttributes = Object(external_this_lodash_["omit"])(mediaAttributes, ['caption']);
7988        }
7989  
7990        setAttributes(mediaAttributes);
7991        this.setState({
7992          isEditing: false
7993        });
7994      }
7995    }, {
7996      key: "onSelectCustomURL",
7997      value: function onSelectCustomURL(newURL) {
7998        var _this$props3 = this.props,
7999            setAttributes = _this$props3.setAttributes,
8000            url = _this$props3.url;
8001  
8002        if (newURL !== url) {
8003          setAttributes({
8004            url: newURL,
8005            id: undefined
8006          });
8007          this.setState({
8008            isEditing: false
8009          });
8010        }
8011      }
8012    }, {
8013      key: "render",
8014      value: function render() {
8015        var _this$props4 = this.props,
8016            url = _this$props4.url,
8017            alt = _this$props4.alt,
8018            id = _this$props4.id,
8019            linkTo = _this$props4.linkTo,
8020            link = _this$props4.link,
8021            isFirstItem = _this$props4.isFirstItem,
8022            isLastItem = _this$props4.isLastItem,
8023            isSelected = _this$props4.isSelected,
8024            caption = _this$props4.caption,
8025            onRemove = _this$props4.onRemove,
8026            onMoveForward = _this$props4.onMoveForward,
8027            onMoveBackward = _this$props4.onMoveBackward,
8028            setAttributes = _this$props4.setAttributes,
8029            ariaLabel = _this$props4['aria-label'];
8030        var isEditing = this.state.isEditing;
8031        var href;
8032  
8033        switch (linkTo) {
8034          case constants_LINK_DESTINATION_MEDIA:
8035            href = url;
8036            break;
8037  
8038          case constants_LINK_DESTINATION_ATTACHMENT:
8039            href = link;
8040            break;
8041        }
8042  
8043        var img = // Disable reason: Image itself is not meant to be interactive, but should
8044        // direct image selection and unfocus caption fields.
8045  
8046        /* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
8047        Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])("img", {
8048          src: url,
8049          alt: alt,
8050          "data-id": id,
8051          onClick: