[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/js/dist/ -> editor.js (source)

   1  this["wp"] = this["wp"] || {}; this["wp"]["editor"] =
   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 = 382);
  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, __webpack_exports__, __webpack_require__) {
 106  
 107  "use strict";
 108  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; });
 109  function _defineProperty(obj, key, value) {
 110    if (key in obj) {
 111      Object.defineProperty(obj, key, {
 112        value: value,
 113        enumerable: true,
 114        configurable: true,
 115        writable: true
 116      });
 117    } else {
 118      obj[key] = value;
 119    }
 120  
 121    return obj;
 122  }
 123  
 124  /***/ }),
 125  
 126  /***/ 104:
 127  /***/ (function(module, exports) {
 128  
 129  (function() { module.exports = this["wp"]["wordcount"]; }());
 130  
 131  /***/ }),
 132  
 133  /***/ 106:
 134  /***/ (function(module, exports) {
 135  
 136  (function() { module.exports = this["wp"]["mediaUtils"]; }());
 137  
 138  /***/ }),
 139  
 140  /***/ 11:
 141  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 142  
 143  "use strict";
 144  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _createClass; });
 145  function _defineProperties(target, props) {
 146    for (var i = 0; i < props.length; i++) {
 147      var descriptor = props[i];
 148      descriptor.enumerable = descriptor.enumerable || false;
 149      descriptor.configurable = true;
 150      if ("value" in descriptor) descriptor.writable = true;
 151      Object.defineProperty(target, descriptor.key, descriptor);
 152    }
 153  }
 154  
 155  function _createClass(Constructor, protoProps, staticProps) {
 156    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
 157    if (staticProps) _defineProperties(Constructor, staticProps);
 158    return Constructor;
 159  }
 160  
 161  /***/ }),
 162  
 163  /***/ 12:
 164  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 165  
 166  "use strict";
 167  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _classCallCheck; });
 168  function _classCallCheck(instance, Constructor) {
 169    if (!(instance instanceof Constructor)) {
 170      throw new TypeError("Cannot call a class as a function");
 171    }
 172  }
 173  
 174  /***/ }),
 175  
 176  /***/ 13:
 177  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 178  
 179  "use strict";
 180  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _possibleConstructorReturn; });
 181  /* harmony import */ var _helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(31);
 182  /* harmony import */ var _assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5);
 183  
 184  
 185  function _possibleConstructorReturn(self, call) {
 186    if (call && (Object(_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(call) === "object" || typeof call === "function")) {
 187      return call;
 188    }
 189  
 190    return Object(_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(self);
 191  }
 192  
 193  /***/ }),
 194  
 195  /***/ 132:
 196  /***/ (function(module, exports, __webpack_require__) {
 197  
 198  "use strict";
 199  
 200  var __extends = (this && this.__extends) || (function () {
 201      var extendStatics = Object.setPrototypeOf ||
 202          ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
 203          function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
 204      return function (d, b) {
 205          extendStatics(d, b);
 206          function __() { this.constructor = d; }
 207          d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
 208      };
 209  })();
 210  var __assign = (this && this.__assign) || Object.assign || function(t) {
 211      for (var s, i = 1, n = arguments.length; i < n; i++) {
 212          s = arguments[i];
 213          for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
 214              t[p] = s[p];
 215      }
 216      return t;
 217  };
 218  var __rest = (this && this.__rest) || function (s, e) {
 219      var t = {};
 220      for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
 221          t[p] = s[p];
 222      if (s != null && typeof Object.getOwnPropertySymbols === "function")
 223          for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
 224              t[p[i]] = s[p[i]];
 225      return t;
 226  };
 227  exports.__esModule = true;
 228  var React = __webpack_require__(28);
 229  var PropTypes = __webpack_require__(33);
 230  var autosize = __webpack_require__(133);
 231  var _getLineHeight = __webpack_require__(134);
 232  var getLineHeight = _getLineHeight;
 233  var UPDATE = 'autosize:update';
 234  var DESTROY = 'autosize:destroy';
 235  var RESIZED = 'autosize:resized';
 236  /**
 237   * A light replacement for built-in textarea component
 238   * which automaticaly adjusts its height to match the content
 239   */
 240  var TextareaAutosize = /** @class */ (function (_super) {
 241      __extends(TextareaAutosize, _super);
 242      function TextareaAutosize() {
 243          var _this = _super !== null && _super.apply(this, arguments) || this;
 244          _this.state = {
 245              lineHeight: null
 246          };
 247          _this.dispatchEvent = function (EVENT_TYPE) {
 248              var event = document.createEvent('Event');
 249              event.initEvent(EVENT_TYPE, true, false);
 250              _this.textarea.dispatchEvent(event);
 251          };
 252          _this.updateLineHeight = function () {
 253              _this.setState({
 254                  lineHeight: getLineHeight(_this.textarea)
 255              });
 256          };
 257          _this.onChange = function (e) {
 258              var onChange = _this.props.onChange;
 259              _this.currentValue = e.currentTarget.value;
 260              onChange && onChange(e);
 261          };
 262          _this.saveDOMNodeRef = function (ref) {
 263              var innerRef = _this.props.innerRef;
 264              if (innerRef) {
 265                  innerRef(ref);
 266              }
 267              _this.textarea = ref;
 268          };
 269          _this.getLocals = function () {
 270              var _a = _this, _b = _a.props, onResize = _b.onResize, maxRows = _b.maxRows, onChange = _b.onChange, style = _b.style, innerRef = _b.innerRef, props = __rest(_b, ["onResize", "maxRows", "onChange", "style", "innerRef"]), lineHeight = _a.state.lineHeight, saveDOMNodeRef = _a.saveDOMNodeRef;
 271              var maxHeight = maxRows && lineHeight ? lineHeight * maxRows : null;
 272              return __assign({}, props, { saveDOMNodeRef: saveDOMNodeRef, style: maxHeight ? __assign({}, style, { maxHeight: maxHeight }) : style, onChange: _this.onChange });
 273          };
 274          return _this;
 275      }
 276      TextareaAutosize.prototype.componentDidMount = function () {
 277          var _this = this;
 278          var _a = this.props, onResize = _a.onResize, maxRows = _a.maxRows;
 279          if (typeof maxRows === 'number') {
 280              this.updateLineHeight();
 281          }
 282          /*
 283            the defer is needed to:
 284              - force "autosize" to activate the scrollbar when this.props.maxRows is passed
 285              - support StyledComponents (see #71)
 286          */
 287          setTimeout(function () { return autosize(_this.textarea); });
 288          if (onResize) {
 289              this.textarea.addEventListener(RESIZED, onResize);
 290          }
 291      };
 292      TextareaAutosize.prototype.componentWillUnmount = function () {
 293          var onResize = this.props.onResize;
 294          if (onResize) {
 295              this.textarea.removeEventListener(RESIZED, onResize);
 296          }
 297          this.dispatchEvent(DESTROY);
 298      };
 299      TextareaAutosize.prototype.render = function () {
 300          var _a = this.getLocals(), children = _a.children, saveDOMNodeRef = _a.saveDOMNodeRef, locals = __rest(_a, ["children", "saveDOMNodeRef"]);
 301          return (React.createElement("textarea", __assign({}, locals, { ref: saveDOMNodeRef }), children));
 302      };
 303      TextareaAutosize.prototype.componentDidUpdate = function (prevProps) {
 304          if (this.props.value !== this.currentValue || this.props.rows !== prevProps.rows) {
 305              this.dispatchEvent(UPDATE);
 306          }
 307      };
 308      TextareaAutosize.defaultProps = {
 309          rows: 1
 310      };
 311      TextareaAutosize.propTypes = {
 312          rows: PropTypes.number,
 313          maxRows: PropTypes.number,
 314          onResize: PropTypes.func,
 315          innerRef: PropTypes.func
 316      };
 317      return TextareaAutosize;
 318  }(React.Component));
 319  exports["default"] = TextareaAutosize;
 320  
 321  
 322  /***/ }),
 323  
 324  /***/ 133:
 325  /***/ (function(module, exports, __webpack_require__) {
 326  
 327  var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
 328      autosize 4.0.2
 329      license: MIT
 330      http://www.jacklmoore.com/autosize
 331  */
 332  (function (global, factory) {
 333      if (true) {
 334          !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
 335                  __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
 336                  (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
 337                  __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
 338      } else { var mod; }
 339  })(this, function (module, exports) {
 340      'use strict';
 341  
 342      var map = typeof Map === "function" ? new Map() : function () {
 343          var keys = [];
 344          var values = [];
 345  
 346          return {
 347              has: function has(key) {
 348                  return keys.indexOf(key) > -1;
 349              },
 350              get: function get(key) {
 351                  return values[keys.indexOf(key)];
 352              },
 353              set: function set(key, value) {
 354                  if (keys.indexOf(key) === -1) {
 355                      keys.push(key);
 356                      values.push(value);
 357                  }
 358              },
 359              delete: function _delete(key) {
 360                  var index = keys.indexOf(key);
 361                  if (index > -1) {
 362                      keys.splice(index, 1);
 363                      values.splice(index, 1);
 364                  }
 365              }
 366          };
 367      }();
 368  
 369      var createEvent = function createEvent(name) {
 370          return new Event(name, { bubbles: true });
 371      };
 372      try {
 373          new Event('test');
 374      } catch (e) {
 375          // IE does not support `new Event()`
 376          createEvent = function createEvent(name) {
 377              var evt = document.createEvent('Event');
 378              evt.initEvent(name, true, false);
 379              return evt;
 380          };
 381      }
 382  
 383  	function assign(ta) {
 384          if (!ta || !ta.nodeName || ta.nodeName !== 'TEXTAREA' || map.has(ta)) return;
 385  
 386          var heightOffset = null;
 387          var clientWidth = null;
 388          var cachedHeight = null;
 389  
 390  		function init() {
 391              var style = window.getComputedStyle(ta, null);
 392  
 393              if (style.resize === 'vertical') {
 394                  ta.style.resize = 'none';
 395              } else if (style.resize === 'both') {
 396                  ta.style.resize = 'horizontal';
 397              }
 398  
 399              if (style.boxSizing === 'content-box') {
 400                  heightOffset = -(parseFloat(style.paddingTop) + parseFloat(style.paddingBottom));
 401              } else {
 402                  heightOffset = parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);
 403              }
 404              // Fix when a textarea is not on document body and heightOffset is Not a Number
 405              if (isNaN(heightOffset)) {
 406                  heightOffset = 0;
 407              }
 408  
 409              update();
 410          }
 411  
 412  		function changeOverflow(value) {
 413              {
 414                  // Chrome/Safari-specific fix:
 415                  // When the textarea y-overflow is hidden, Chrome/Safari do not reflow the text to account for the space
 416                  // made available by removing the scrollbar. The following forces the necessary text reflow.
 417                  var width = ta.style.width;
 418                  ta.style.width = '0px';
 419                  // Force reflow:
 420                  /* jshint ignore:start */
 421                  ta.offsetWidth;
 422                  /* jshint ignore:end */
 423                  ta.style.width = width;
 424              }
 425  
 426              ta.style.overflowY = value;
 427          }
 428  
 429  		function getParentOverflows(el) {
 430              var arr = [];
 431  
 432              while (el && el.parentNode && el.parentNode instanceof Element) {
 433                  if (el.parentNode.scrollTop) {
 434                      arr.push({
 435                          node: el.parentNode,
 436                          scrollTop: el.parentNode.scrollTop
 437                      });
 438                  }
 439                  el = el.parentNode;
 440              }
 441  
 442              return arr;
 443          }
 444  
 445  		function resize() {
 446              if (ta.scrollHeight === 0) {
 447                  // If the scrollHeight is 0, then the element probably has display:none or is detached from the DOM.
 448                  return;
 449              }
 450  
 451              var overflows = getParentOverflows(ta);
 452              var docTop = document.documentElement && document.documentElement.scrollTop; // Needed for Mobile IE (ticket #240)
 453  
 454              ta.style.height = '';
 455              ta.style.height = ta.scrollHeight + heightOffset + 'px';
 456  
 457              // used to check if an update is actually necessary on window.resize
 458              clientWidth = ta.clientWidth;
 459  
 460              // prevents scroll-position jumping
 461              overflows.forEach(function (el) {
 462                  el.node.scrollTop = el.scrollTop;
 463              });
 464  
 465              if (docTop) {
 466                  document.documentElement.scrollTop = docTop;
 467              }
 468          }
 469  
 470  		function update() {
 471              resize();
 472  
 473              var styleHeight = Math.round(parseFloat(ta.style.height));
 474              var computed = window.getComputedStyle(ta, null);
 475  
 476              // Using offsetHeight as a replacement for computed.height in IE, because IE does not account use of border-box
 477              var actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(computed.height)) : ta.offsetHeight;
 478  
 479              // The actual height not matching the style height (set via the resize method) indicates that 
 480              // the max-height has been exceeded, in which case the overflow should be allowed.
 481              if (actualHeight < styleHeight) {
 482                  if (computed.overflowY === 'hidden') {
 483                      changeOverflow('scroll');
 484                      resize();
 485                      actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight;
 486                  }
 487              } else {
 488                  // Normally keep overflow set to hidden, to avoid flash of scrollbar as the textarea expands.
 489                  if (computed.overflowY !== 'hidden') {
 490                      changeOverflow('hidden');
 491                      resize();
 492                      actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight;
 493                  }
 494              }
 495  
 496              if (cachedHeight !== actualHeight) {
 497                  cachedHeight = actualHeight;
 498                  var evt = createEvent('autosize:resized');
 499                  try {
 500                      ta.dispatchEvent(evt);
 501                  } catch (err) {
 502                      // Firefox will throw an error on dispatchEvent for a detached element
 503                      // https://bugzilla.mozilla.org/show_bug.cgi?id=889376
 504                  }
 505              }
 506          }
 507  
 508          var pageResize = function pageResize() {
 509              if (ta.clientWidth !== clientWidth) {
 510                  update();
 511              }
 512          };
 513  
 514          var destroy = function (style) {
 515              window.removeEventListener('resize', pageResize, false);
 516              ta.removeEventListener('input', update, false);
 517              ta.removeEventListener('keyup', update, false);
 518              ta.removeEventListener('autosize:destroy', destroy, false);
 519              ta.removeEventListener('autosize:update', update, false);
 520  
 521              Object.keys(style).forEach(function (key) {
 522                  ta.style[key] = style[key];
 523              });
 524  
 525              map.delete(ta);
 526          }.bind(ta, {
 527              height: ta.style.height,
 528              resize: ta.style.resize,
 529              overflowY: ta.style.overflowY,
 530              overflowX: ta.style.overflowX,
 531              wordWrap: ta.style.wordWrap
 532          });
 533  
 534          ta.addEventListener('autosize:destroy', destroy, false);
 535  
 536          // IE9 does not fire onpropertychange or oninput for deletions,
 537          // so binding to onkeyup to catch most of those events.
 538          // There is no way that I know of to detect something like 'cut' in IE9.
 539          if ('onpropertychange' in ta && 'oninput' in ta) {
 540              ta.addEventListener('keyup', update, false);
 541          }
 542  
 543          window.addEventListener('resize', pageResize, false);
 544          ta.addEventListener('input', update, false);
 545          ta.addEventListener('autosize:update', update, false);
 546          ta.style.overflowX = 'hidden';
 547          ta.style.wordWrap = 'break-word';
 548  
 549          map.set(ta, {
 550              destroy: destroy,
 551              update: update
 552          });
 553  
 554          init();
 555      }
 556  
 557  	function destroy(ta) {
 558          var methods = map.get(ta);
 559          if (methods) {
 560              methods.destroy();
 561          }
 562      }
 563  
 564  	function update(ta) {
 565          var methods = map.get(ta);
 566          if (methods) {
 567              methods.update();
 568          }
 569      }
 570  
 571      var autosize = null;
 572  
 573      // Do nothing in Node.js environment and IE8 (or lower)
 574      if (typeof window === 'undefined' || typeof window.getComputedStyle !== 'function') {
 575          autosize = function autosize(el) {
 576              return el;
 577          };
 578          autosize.destroy = function (el) {
 579              return el;
 580          };
 581          autosize.update = function (el) {
 582              return el;
 583          };
 584      } else {
 585          autosize = function autosize(el, options) {
 586              if (el) {
 587                  Array.prototype.forEach.call(el.length ? el : [el], function (x) {
 588                      return assign(x, options);
 589                  });
 590              }
 591              return el;
 592          };
 593          autosize.destroy = function (el) {
 594              if (el) {
 595                  Array.prototype.forEach.call(el.length ? el : [el], destroy);
 596              }
 597              return el;
 598          };
 599          autosize.update = function (el) {
 600              if (el) {
 601                  Array.prototype.forEach.call(el.length ? el : [el], update);
 602              }
 603              return el;
 604          };
 605      }
 606  
 607      exports.default = autosize;
 608      module.exports = exports['default'];
 609  });
 610  
 611  /***/ }),
 612  
 613  /***/ 134:
 614  /***/ (function(module, exports, __webpack_require__) {
 615  
 616  // Load in dependencies
 617  var computedStyle = __webpack_require__(135);
 618  
 619  /**
 620   * Calculate the `line-height` of a given node
 621   * @param {HTMLElement} node Element to calculate line height of. Must be in the DOM.
 622   * @returns {Number} `line-height` of the element in pixels
 623   */
 624  function lineHeight(node) {
 625    // Grab the line-height via style
 626    var lnHeightStr = computedStyle(node, 'line-height');
 627    var lnHeight = parseFloat(lnHeightStr, 10);
 628  
 629    // If the lineHeight did not contain a unit (i.e. it was numeric), convert it to ems (e.g. '2.3' === '2.3em')
 630    if (lnHeightStr === lnHeight + '') {
 631      // Save the old lineHeight style and update the em unit to the element
 632      var _lnHeightStyle = node.style.lineHeight;
 633      node.style.lineHeight = lnHeightStr + 'em';
 634  
 635      // Calculate the em based height
 636      lnHeightStr = computedStyle(node, 'line-height');
 637      lnHeight = parseFloat(lnHeightStr, 10);
 638  
 639      // Revert the lineHeight style
 640      if (_lnHeightStyle) {
 641        node.style.lineHeight = _lnHeightStyle;
 642      } else {
 643        delete node.style.lineHeight;
 644      }
 645    }
 646  
 647    // If the lineHeight is in `pt`, convert it to pixels (4px for 3pt)
 648    // DEV: `em` units are converted to `pt` in IE6
 649    // Conversion ratio from https://developer.mozilla.org/en-US/docs/Web/CSS/length
 650    if (lnHeightStr.indexOf('pt') !== -1) {
 651      lnHeight *= 4;
 652      lnHeight /= 3;
 653    // Otherwise, if the lineHeight is in `mm`, convert it to pixels (96px for 25.4mm)
 654    } else if (lnHeightStr.indexOf('mm') !== -1) {
 655      lnHeight *= 96;
 656      lnHeight /= 25.4;
 657    // Otherwise, if the lineHeight is in `cm`, convert it to pixels (96px for 2.54cm)
 658    } else if (lnHeightStr.indexOf('cm') !== -1) {
 659      lnHeight *= 96;
 660      lnHeight /= 2.54;
 661    // Otherwise, if the lineHeight is in `in`, convert it to pixels (96px for 1in)
 662    } else if (lnHeightStr.indexOf('in') !== -1) {
 663      lnHeight *= 96;
 664    // Otherwise, if the lineHeight is in `pc`, convert it to pixels (12pt for 1pc)
 665    } else if (lnHeightStr.indexOf('pc') !== -1) {
 666      lnHeight *= 16;
 667    }
 668  
 669    // Continue our computation
 670    lnHeight = Math.round(lnHeight);
 671  
 672    // If the line-height is "normal", calculate by font-size
 673    if (lnHeightStr === 'normal') {
 674      // Create a temporary node
 675      var nodeName = node.nodeName;
 676      var _node = document.createElement(nodeName);
 677      _node.innerHTML = '&nbsp;';
 678  
 679      // If we have a text area, reset it to only 1 row
 680      // https://github.com/twolfson/line-height/issues/4
 681      if (nodeName.toUpperCase() === 'TEXTAREA') {
 682        _node.setAttribute('rows', '1');
 683      }
 684  
 685      // Set the font-size of the element
 686      var fontSizeStr = computedStyle(node, 'font-size');
 687      _node.style.fontSize = fontSizeStr;
 688  
 689      // Remove default padding/border which can affect offset height
 690      // https://github.com/twolfson/line-height/issues/4
 691      // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetHeight
 692      _node.style.padding = '0px';
 693      _node.style.border = '0px';
 694  
 695      // Append it to the body
 696      var body = document.body;
 697      body.appendChild(_node);
 698  
 699      // Assume the line height of the element is the height
 700      var height = _node.offsetHeight;
 701      lnHeight = height;
 702  
 703      // Remove our child from the DOM
 704      body.removeChild(_node);
 705    }
 706  
 707    // Return the calculated height
 708    return lnHeight;
 709  }
 710  
 711  // Export lineHeight
 712  module.exports = lineHeight;
 713  
 714  
 715  /***/ }),
 716  
 717  /***/ 135:
 718  /***/ (function(module, exports) {
 719  
 720  // This code has been refactored for 140 bytes
 721  // You can see the original here: https://github.com/twolfson/computedStyle/blob/04cd1da2e30fa45844f95f5cb1ac898e9b9ef050/lib/computedStyle.js
 722  var computedStyle = function (el, prop, getComputedStyle) {
 723    getComputedStyle = window.getComputedStyle;
 724  
 725    // In one fell swoop
 726    return (
 727      // If we have getComputedStyle
 728      getComputedStyle ?
 729        // Query it
 730        // TODO: From CSS-Query notes, we might need (node, null) for FF
 731        getComputedStyle(el) :
 732  
 733      // Otherwise, we are in IE and use currentStyle
 734        el.currentStyle
 735    )[
 736      // Switch to camelCase for CSSOM
 737      // DEV: Grabbed from jQuery
 738      // https://github.com/jquery/jquery/blob/1.9-stable/src/css.js#L191-L194
 739      // https://github.com/jquery/jquery/blob/1.9-stable/src/core.js#L593-L597
 740      prop.replace(/-(\w)/gi, function (word, letter) {
 741        return letter.toUpperCase();
 742      })
 743    ];
 744  };
 745  
 746  module.exports = computedStyle;
 747  
 748  
 749  /***/ }),
 750  
 751  /***/ 14:
 752  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 753  
 754  "use strict";
 755  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _getPrototypeOf; });
 756  function _getPrototypeOf(o) {
 757    _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
 758      return o.__proto__ || Object.getPrototypeOf(o);
 759    };
 760    return _getPrototypeOf(o);
 761  }
 762  
 763  /***/ }),
 764  
 765  /***/ 15:
 766  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 767  
 768  "use strict";
 769  
 770  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
 771  function _setPrototypeOf(o, p) {
 772    _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
 773      o.__proto__ = p;
 774      return o;
 775    };
 776  
 777    return _setPrototypeOf(o, p);
 778  }
 779  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
 780  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _inherits; });
 781  
 782  function _inherits(subClass, superClass) {
 783    if (typeof superClass !== "function" && superClass !== null) {
 784      throw new TypeError("Super expression must either be null or a function");
 785    }
 786  
 787    subClass.prototype = Object.create(superClass && superClass.prototype, {
 788      constructor: {
 789        value: subClass,
 790        writable: true,
 791        configurable: true
 792      }
 793    });
 794    if (superClass) _setPrototypeOf(subClass, superClass);
 795  }
 796  
 797  /***/ }),
 798  
 799  /***/ 157:
 800  /***/ (function(module, exports) {
 801  
 802  (function() { module.exports = this["wp"]["notices"]; }());
 803  
 804  /***/ }),
 805  
 806  /***/ 16:
 807  /***/ (function(module, exports, __webpack_require__) {
 808  
 809  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
 810    Copyright (c) 2017 Jed Watson.
 811    Licensed under the MIT License (MIT), see
 812    http://jedwatson.github.io/classnames
 813  */
 814  /* global define */
 815  
 816  (function () {
 817      'use strict';
 818  
 819      var hasOwn = {}.hasOwnProperty;
 820  
 821  	function classNames () {
 822          var classes = [];
 823  
 824          for (var i = 0; i < arguments.length; i++) {
 825              var arg = arguments[i];
 826              if (!arg) continue;
 827  
 828              var argType = typeof arg;
 829  
 830              if (argType === 'string' || argType === 'number') {
 831                  classes.push(arg);
 832              } else if (Array.isArray(arg) && arg.length) {
 833                  var inner = classNames.apply(null, arg);
 834                  if (inner) {
 835                      classes.push(inner);
 836                  }
 837              } else if (argType === 'object') {
 838                  for (var key in arg) {
 839                      if (hasOwn.call(arg, key) && arg[key]) {
 840                          classes.push(key);
 841                      }
 842                  }
 843              }
 844          }
 845  
 846          return classes.join(' ');
 847      }
 848  
 849      if ( true && module.exports) {
 850          classNames.default = classNames;
 851          module.exports = classNames;
 852      } else if (true) {
 853          // register as 'classnames', consistent with npm package name
 854          !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
 855              return classNames;
 856          }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
 857                  __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
 858      } else {}
 859  }());
 860  
 861  
 862  /***/ }),
 863  
 864  /***/ 17:
 865  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 866  
 867  "use strict";
 868  
 869  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
 870  function _arrayWithoutHoles(arr) {
 871    if (Array.isArray(arr)) {
 872      for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {
 873        arr2[i] = arr[i];
 874      }
 875  
 876      return arr2;
 877    }
 878  }
 879  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
 880  var iterableToArray = __webpack_require__(30);
 881  
 882  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
 883  function _nonIterableSpread() {
 884    throw new TypeError("Invalid attempt to spread non-iterable instance");
 885  }
 886  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
 887  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _toConsumableArray; });
 888  
 889  
 890  
 891  function _toConsumableArray(arr) {
 892    return _arrayWithoutHoles(arr) || Object(iterableToArray["a" /* default */])(arr) || _nonIterableSpread();
 893  }
 894  
 895  /***/ }),
 896  
 897  /***/ 18:
 898  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 899  
 900  "use strict";
 901  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _extends; });
 902  function _extends() {
 903    _extends = Object.assign || function (target) {
 904      for (var i = 1; i < arguments.length; i++) {
 905        var source = arguments[i];
 906  
 907        for (var key in source) {
 908          if (Object.prototype.hasOwnProperty.call(source, key)) {
 909            target[key] = source[key];
 910          }
 911        }
 912      }
 913  
 914      return target;
 915    };
 916  
 917    return _extends.apply(this, arguments);
 918  }
 919  
 920  /***/ }),
 921  
 922  /***/ 19:
 923  /***/ (function(module, exports) {
 924  
 925  (function() { module.exports = this["wp"]["keycodes"]; }());
 926  
 927  /***/ }),
 928  
 929  /***/ 2:
 930  /***/ (function(module, exports) {
 931  
 932  (function() { module.exports = this["lodash"]; }());
 933  
 934  /***/ }),
 935  
 936  /***/ 20:
 937  /***/ (function(module, exports, __webpack_require__) {
 938  
 939  module.exports = __webpack_require__(48);
 940  
 941  
 942  /***/ }),
 943  
 944  /***/ 21:
 945  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 946  
 947  "use strict";
 948  
 949  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
 950  function _objectWithoutPropertiesLoose(source, excluded) {
 951    if (source == null) return {};
 952    var target = {};
 953    var sourceKeys = Object.keys(source);
 954    var key, i;
 955  
 956    for (i = 0; i < sourceKeys.length; i++) {
 957      key = sourceKeys[i];
 958      if (excluded.indexOf(key) >= 0) continue;
 959      target[key] = source[key];
 960    }
 961  
 962    return target;
 963  }
 964  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
 965  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutProperties; });
 966  
 967  function _objectWithoutProperties(source, excluded) {
 968    if (source == null) return {};
 969    var target = _objectWithoutPropertiesLoose(source, excluded);
 970    var key, i;
 971  
 972    if (Object.getOwnPropertySymbols) {
 973      var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
 974  
 975      for (i = 0; i < sourceSymbolKeys.length; i++) {
 976        key = sourceSymbolKeys[i];
 977        if (excluded.indexOf(key) >= 0) continue;
 978        if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
 979        target[key] = source[key];
 980      }
 981    }
 982  
 983    return target;
 984  }
 985  
 986  /***/ }),
 987  
 988  /***/ 22:
 989  /***/ (function(module, exports) {
 990  
 991  (function() { module.exports = this["wp"]["richText"]; }());
 992  
 993  /***/ }),
 994  
 995  /***/ 23:
 996  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 997  
 998  "use strict";
 999  
1000  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
1001  var arrayWithHoles = __webpack_require__(38);
1002  
1003  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
1004  function _iterableToArrayLimit(arr, i) {
1005    var _arr = [];
1006    var _n = true;
1007    var _d = false;
1008    var _e = undefined;
1009  
1010    try {
1011      for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
1012        _arr.push(_s.value);
1013  
1014        if (i && _arr.length === i) break;
1015      }
1016    } catch (err) {
1017      _d = true;
1018      _e = err;
1019    } finally {
1020      try {
1021        if (!_n && _i["return"] != null) _i["return"]();
1022      } finally {
1023        if (_d) throw _e;
1024      }
1025    }
1026  
1027    return _arr;
1028  }
1029  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
1030  var nonIterableRest = __webpack_require__(39);
1031  
1032  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
1033  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _slicedToArray; });
1034  
1035  
1036  
1037  function _slicedToArray(arr, i) {
1038    return Object(arrayWithHoles["a" /* default */])(arr) || _iterableToArrayLimit(arr, i) || Object(nonIterableRest["a" /* default */])();
1039  }
1040  
1041  /***/ }),
1042  
1043  /***/ 26:
1044  /***/ (function(module, exports) {
1045  
1046  (function() { module.exports = this["wp"]["url"]; }());
1047  
1048  /***/ }),
1049  
1050  /***/ 27:
1051  /***/ (function(module, exports) {
1052  
1053  (function() { module.exports = this["wp"]["hooks"]; }());
1054  
1055  /***/ }),
1056  
1057  /***/ 28:
1058  /***/ (function(module, exports) {
1059  
1060  (function() { module.exports = this["React"]; }());
1061  
1062  /***/ }),
1063  
1064  /***/ 3:
1065  /***/ (function(module, exports) {
1066  
1067  (function() { module.exports = this["wp"]["components"]; }());
1068  
1069  /***/ }),
1070  
1071  /***/ 30:
1072  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1073  
1074  "use strict";
1075  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterableToArray; });
1076  function _iterableToArray(iter) {
1077    if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
1078  }
1079  
1080  /***/ }),
1081  
1082  /***/ 31:
1083  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1084  
1085  "use strict";
1086  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _typeof; });
1087  function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); }
1088  
1089  function _typeof(obj) {
1090    if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") {
1091      _typeof = function _typeof(obj) {
1092        return _typeof2(obj);
1093      };
1094    } else {
1095      _typeof = function _typeof(obj) {
1096        return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj);
1097      };
1098    }
1099  
1100    return _typeof(obj);
1101  }
1102  
1103  /***/ }),
1104  
1105  /***/ 32:
1106  /***/ (function(module, exports) {
1107  
1108  (function() { module.exports = this["wp"]["apiFetch"]; }());
1109  
1110  /***/ }),
1111  
1112  /***/ 33:
1113  /***/ (function(module, exports, __webpack_require__) {
1114  
1115  /**
1116   * Copyright (c) 2013-present, Facebook, Inc.
1117   *
1118   * This source code is licensed under the MIT license found in the
1119   * LICENSE file in the root directory of this source tree.
1120   */
1121  
1122  if (false) { var throwOnDirectAccess, ReactIs; } else {
1123    // By explicitly using `prop-types` you are opting into new production behavior.
1124    // http://fb.me/prop-types-in-prod
1125    module.exports = __webpack_require__(94)();
1126  }
1127  
1128  
1129  /***/ }),
1130  
1131  /***/ 35:
1132  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1133  
1134  "use strict";
1135  
1136  
1137  var LEAF_KEY, hasWeakMap;
1138  
1139  /**
1140   * Arbitrary value used as key for referencing cache object in WeakMap tree.
1141   *
1142   * @type {Object}
1143   */
1144  LEAF_KEY = {};
1145  
1146  /**
1147   * Whether environment supports WeakMap.
1148   *
1149   * @type {boolean}
1150   */
1151  hasWeakMap = typeof WeakMap !== 'undefined';
1152  
1153  /**
1154   * Returns the first argument as the sole entry in an array.
1155   *
1156   * @param {*} value Value to return.
1157   *
1158   * @return {Array} Value returned as entry in array.
1159   */
1160  function arrayOf( value ) {
1161      return [ value ];
1162  }
1163  
1164  /**
1165   * Returns true if the value passed is object-like, or false otherwise. A value
1166   * is object-like if it can support property assignment, e.g. object or array.
1167   *
1168   * @param {*} value Value to test.
1169   *
1170   * @return {boolean} Whether value is object-like.
1171   */
1172  function isObjectLike( value ) {
1173      return !! value && 'object' === typeof value;
1174  }
1175  
1176  /**
1177   * Creates and returns a new cache object.
1178   *
1179   * @return {Object} Cache object.
1180   */
1181  function createCache() {
1182      var cache = {
1183          clear: function() {
1184              cache.head = null;
1185          },
1186      };
1187  
1188      return cache;
1189  }
1190  
1191  /**
1192   * Returns true if entries within the two arrays are strictly equal by
1193   * reference from a starting index.
1194   *
1195   * @param {Array}  a         First array.
1196   * @param {Array}  b         Second array.
1197   * @param {number} fromIndex Index from which to start comparison.
1198   *
1199   * @return {boolean} Whether arrays are shallowly equal.
1200   */
1201  function isShallowEqual( a, b, fromIndex ) {
1202      var i;
1203  
1204      if ( a.length !== b.length ) {
1205          return false;
1206      }
1207  
1208      for ( i = fromIndex; i < a.length; i++ ) {
1209          if ( a[ i ] !== b[ i ] ) {
1210              return false;
1211          }
1212      }
1213  
1214      return true;
1215  }
1216  
1217  /**
1218   * Returns a memoized selector function. The getDependants function argument is
1219   * called before the memoized selector and is expected to return an immutable
1220   * reference or array of references on which the selector depends for computing
1221   * its own return value. The memoize cache is preserved only as long as those
1222   * dependant references remain the same. If getDependants returns a different
1223   * reference(s), the cache is cleared and the selector value regenerated.
1224   *
1225   * @param {Function} selector      Selector function.
1226   * @param {Function} getDependants Dependant getter returning an immutable
1227   *                                 reference or array of reference used in
1228   *                                 cache bust consideration.
1229   *
1230   * @return {Function} Memoized selector.
1231   */
1232  /* harmony default export */ __webpack_exports__["a"] = (function( selector, getDependants ) {
1233      var rootCache, getCache;
1234  
1235      // Use object source as dependant if getter not provided
1236      if ( ! getDependants ) {
1237          getDependants = arrayOf;
1238      }
1239  
1240      /**
1241       * Returns the root cache. If WeakMap is supported, this is assigned to the
1242       * root WeakMap cache set, otherwise it is a shared instance of the default
1243       * cache object.
1244       *
1245       * @return {(WeakMap|Object)} Root cache object.
1246       */
1247  	function getRootCache() {
1248          return rootCache;
1249      }
1250  
1251      /**
1252       * Returns the cache for a given dependants array. When possible, a WeakMap
1253       * will be used to create a unique cache for each set of dependants. This
1254       * is feasible due to the nature of WeakMap in allowing garbage collection
1255       * to occur on entries where the key object is no longer referenced. Since
1256       * WeakMap requires the key to be an object, this is only possible when the
1257       * dependant is object-like. The root cache is created as a hierarchy where
1258       * each top-level key is the first entry in a dependants set, the value a
1259       * WeakMap where each key is the next dependant, and so on. This continues
1260       * so long as the dependants are object-like. If no dependants are object-
1261       * like, then the cache is shared across all invocations.
1262       *
1263       * @see isObjectLike
1264       *
1265       * @param {Array} dependants Selector dependants.
1266       *
1267       * @return {Object} Cache object.
1268       */
1269  	function getWeakMapCache( dependants ) {
1270          var caches = rootCache,
1271              isUniqueByDependants = true,
1272              i, dependant, map, cache;
1273  
1274          for ( i = 0; i < dependants.length; i++ ) {
1275              dependant = dependants[ i ];
1276  
1277              // Can only compose WeakMap from object-like key.
1278              if ( ! isObjectLike( dependant ) ) {
1279                  isUniqueByDependants = false;
1280                  break;
1281              }
1282  
1283              // Does current segment of cache already have a WeakMap?
1284              if ( caches.has( dependant ) ) {
1285                  // Traverse into nested WeakMap.
1286                  caches = caches.get( dependant );
1287              } else {
1288                  // Create, set, and traverse into a new one.
1289                  map = new WeakMap();
1290                  caches.set( dependant, map );
1291                  caches = map;
1292              }
1293          }
1294  
1295          // We use an arbitrary (but consistent) object as key for the last item
1296          // in the WeakMap to serve as our running cache.
1297          if ( ! caches.has( LEAF_KEY ) ) {
1298              cache = createCache();
1299              cache.isUniqueByDependants = isUniqueByDependants;
1300              caches.set( LEAF_KEY, cache );
1301          }
1302  
1303          return caches.get( LEAF_KEY );
1304      }
1305  
1306      // Assign cache handler by availability of WeakMap
1307      getCache = hasWeakMap ? getWeakMapCache : getRootCache;
1308  
1309      /**
1310       * Resets root memoization cache.
1311       */
1312  	function clear() {
1313          rootCache = hasWeakMap ? new WeakMap() : createCache();
1314      }
1315  
1316      // eslint-disable-next-line jsdoc/check-param-names
1317      /**
1318       * The augmented selector call, considering first whether dependants have
1319       * changed before passing it to underlying memoize function.
1320       *
1321       * @param {Object} source    Source object for derivation.
1322       * @param {...*}   extraArgs Additional arguments to pass to selector.
1323       *
1324       * @return {*} Selector result.
1325       */
1326  	function callSelector( /* source, ...extraArgs */ ) {
1327          var len = arguments.length,
1328              cache, node, i, args, dependants;
1329  
1330          // Create copy of arguments (avoid leaking deoptimization).
1331          args = new Array( len );
1332          for ( i = 0; i < len; i++ ) {
1333              args[ i ] = arguments[ i ];
1334          }
1335  
1336          dependants = getDependants.apply( null, args );
1337          cache = getCache( dependants );
1338  
1339          // If not guaranteed uniqueness by dependants (primitive type or lack
1340          // of WeakMap support), shallow compare against last dependants and, if
1341          // references have changed, destroy cache to recalculate result.
1342          if ( ! cache.isUniqueByDependants ) {
1343              if ( cache.lastDependants && ! isShallowEqual( dependants, cache.lastDependants, 0 ) ) {
1344                  cache.clear();
1345              }
1346  
1347              cache.lastDependants = dependants;
1348          }
1349  
1350          node = cache.head;
1351          while ( node ) {
1352              // Check whether node arguments match arguments
1353              if ( ! isShallowEqual( node.args, args, 1 ) ) {
1354                  node = node.next;
1355                  continue;
1356              }
1357  
1358              // At this point we can assume we've found a match
1359  
1360              // Surface matched node to head if not already
1361              if ( node !== cache.head ) {
1362                  // Adjust siblings to point to each other.
1363                  node.prev.next = node.next;
1364                  if ( node.next ) {
1365                      node.next.prev = node.prev;
1366                  }
1367  
1368                  node.next = cache.head;
1369                  node.prev = null;
1370                  cache.head.prev = node;
1371                  cache.head = node;
1372              }
1373  
1374              // Return immediately
1375              return node.val;
1376          }
1377  
1378          // No cached value found. Continue to insertion phase:
1379  
1380          node = {
1381              // Generate the result from original function
1382              val: selector.apply( null, args ),
1383          };
1384  
1385          // Avoid including the source object in the cache.
1386          args[ 0 ] = null;
1387          node.args = args;
1388  
1389          // Don't need to check whether node is already head, since it would
1390          // have been returned above already if it was
1391  
1392          // Shift existing head down list
1393          if ( cache.head ) {
1394              cache.head.prev = node;
1395              node.next = cache.head;
1396          }
1397  
1398          cache.head = node;
1399  
1400          return node.val;
1401      }
1402  
1403      callSelector.getDependants = getDependants;
1404      callSelector.clear = clear;
1405      clear();
1406  
1407      return callSelector;
1408  });
1409  
1410  
1411  /***/ }),
1412  
1413  /***/ 36:
1414  /***/ (function(module, exports) {
1415  
1416  (function() { module.exports = this["wp"]["dataControls"]; }());
1417  
1418  /***/ }),
1419  
1420  /***/ 365:
1421  /***/ (function(module, exports, __webpack_require__) {
1422  
1423  "use strict";
1424  
1425  
1426  var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
1427  
1428  function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
1429  
1430  var BEGIN = 'BEGIN';
1431  var COMMIT = 'COMMIT';
1432  var REVERT = 'REVERT';
1433  // Array({transactionID: string or null, beforeState: {object}, action: {object}}
1434  var INITIAL_OPTIMIST = [];
1435  
1436  module.exports = optimist;
1437  module.exports.BEGIN = BEGIN;
1438  module.exports.COMMIT = COMMIT;
1439  module.exports.REVERT = REVERT;
1440  function optimist(fn) {
1441    function beginReducer(state, action) {
1442      var _separateState = separateState(state);
1443  
1444      var optimist = _separateState.optimist;
1445      var innerState = _separateState.innerState;
1446  
1447      optimist = optimist.concat([{ beforeState: innerState, action: action }]);
1448      innerState = fn(innerState, action);
1449      validateState(innerState, action);
1450      return _extends({ optimist: optimist }, innerState);
1451    }
1452    function commitReducer(state, action) {
1453      var _separateState2 = separateState(state);
1454  
1455      var optimist = _separateState2.optimist;
1456      var innerState = _separateState2.innerState;
1457  
1458      var newOptimist = [],
1459          started = false,
1460          committed = false;
1461      optimist.forEach(function (entry) {
1462        if (started) {
1463          if (entry.beforeState && matchesTransaction(entry.action, action.optimist.id)) {
1464            committed = true;
1465            newOptimist.push({ action: entry.action });
1466          } else {
1467            newOptimist.push(entry);
1468          }
1469        } else if (entry.beforeState && !matchesTransaction(entry.action, action.optimist.id)) {
1470          started = true;
1471          newOptimist.push(entry);
1472        } else if (entry.beforeState && matchesTransaction(entry.action, action.optimist.id)) {
1473          committed = true;
1474        }
1475      });
1476      if (!committed) {
1477        console.error('Cannot commit transaction with id "' + action.optimist.id + '" because it does not exist');
1478      }
1479      optimist = newOptimist;
1480      return baseReducer(optimist, innerState, action);
1481    }
1482    function revertReducer(state, action) {
1483      var _separateState3 = separateState(state);
1484  
1485      var optimist = _separateState3.optimist;
1486      var innerState = _separateState3.innerState;
1487  
1488      var newOptimist = [],
1489          started = false,
1490          gotInitialState = false,
1491          currentState = innerState;
1492      optimist.forEach(function (entry) {
1493        if (entry.beforeState && matchesTransaction(entry.action, action.optimist.id)) {
1494          currentState = entry.beforeState;
1495          gotInitialState = true;
1496        }
1497        if (!matchesTransaction(entry.action, action.optimist.id)) {
1498          if (entry.beforeState) {
1499            started = true;
1500          }
1501          if (started) {
1502            if (gotInitialState && entry.beforeState) {
1503              newOptimist.push({
1504                beforeState: currentState,
1505                action: entry.action
1506              });
1507            } else {
1508              newOptimist.push(entry);
1509            }
1510          }
1511          if (gotInitialState) {
1512            currentState = fn(currentState, entry.action);
1513            validateState(innerState, action);
1514          }
1515        }
1516      });
1517      if (!gotInitialState) {
1518        console.error('Cannot revert transaction with id "' + action.optimist.id + '" because it does not exist');
1519      }
1520      optimist = newOptimist;
1521      return baseReducer(optimist, currentState, action);
1522    }
1523    function baseReducer(optimist, innerState, action) {
1524      if (optimist.length) {
1525        optimist = optimist.concat([{ action: action }]);
1526      }
1527      innerState = fn(innerState, action);
1528      validateState(innerState, action);
1529      return _extends({ optimist: optimist }, innerState);
1530    }
1531    return function (state, action) {
1532      if (action.optimist) {
1533        switch (action.optimist.type) {
1534          case BEGIN:
1535            return beginReducer(state, action);
1536          case COMMIT:
1537            return commitReducer(state, action);
1538          case REVERT:
1539            return revertReducer(state, action);
1540        }
1541      }
1542  
1543      var _separateState4 = separateState(state);
1544  
1545      var optimist = _separateState4.optimist;
1546      var innerState = _separateState4.innerState;
1547  
1548      if (state && !optimist.length) {
1549        var nextState = fn(innerState, action);
1550        if (nextState === innerState) {
1551          return state;
1552        }
1553        validateState(nextState, action);
1554        return _extends({ optimist: optimist }, nextState);
1555      }
1556      return baseReducer(optimist, innerState, action);
1557    };
1558  }
1559  
1560  function matchesTransaction(action, id) {
1561    return action.optimist && action.optimist.id === id;
1562  }
1563  
1564  function validateState(newState, action) {
1565    if (!newState || typeof newState !== 'object' || Array.isArray(newState)) {
1566      throw new TypeError('Error while handling "' + action.type + '": Optimist requires that state is always a plain object.');
1567    }
1568  }
1569  
1570  function separateState(state) {
1571    if (!state) {
1572      return { optimist: INITIAL_OPTIMIST, innerState: state };
1573    } else {
1574      var _state$optimist = state.optimist;
1575  
1576      var _optimist = _state$optimist === undefined ? INITIAL_OPTIMIST : _state$optimist;
1577  
1578      var innerState = _objectWithoutProperties(state, ['optimist']);
1579  
1580      return { optimist: _optimist, innerState: innerState };
1581    }
1582  }
1583  
1584  /***/ }),
1585  
1586  /***/ 37:
1587  /***/ (function(module, exports) {
1588  
1589  (function() { module.exports = this["wp"]["deprecated"]; }());
1590  
1591  /***/ }),
1592  
1593  /***/ 38:
1594  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1595  
1596  "use strict";
1597  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayWithHoles; });
1598  function _arrayWithHoles(arr) {
1599    if (Array.isArray(arr)) return arr;
1600  }
1601  
1602  /***/ }),
1603  
1604  /***/ 382:
1605  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1606  
1607  "use strict";
1608  __webpack_require__.r(__webpack_exports__);
1609  var meta_namespaceObject = {};
1610  __webpack_require__.r(meta_namespaceObject);
1611  __webpack_require__.d(meta_namespaceObject, "getDependencies", function() { return getDependencies; });
1612  __webpack_require__.d(meta_namespaceObject, "apply", function() { return apply; });
1613  __webpack_require__.d(meta_namespaceObject, "update", function() { return update; });
1614  var block_sources_namespaceObject = {};
1615  __webpack_require__.r(block_sources_namespaceObject);
1616  __webpack_require__.d(block_sources_namespaceObject, "meta", function() { return meta_namespaceObject; });
1617  var actions_namespaceObject = {};
1618  __webpack_require__.r(actions_namespaceObject);
1619  __webpack_require__.d(actions_namespaceObject, "setupEditor", function() { return setupEditor; });
1620  __webpack_require__.d(actions_namespaceObject, "__experimentalTearDownEditor", function() { return __experimentalTearDownEditor; });
1621  __webpack_require__.d(actions_namespaceObject, "__experimentalSubscribeSources", function() { return __experimentalSubscribeSources; });
1622  __webpack_require__.d(actions_namespaceObject, "resetPost", function() { return resetPost; });
1623  __webpack_require__.d(actions_namespaceObject, "resetAutosave", function() { return resetAutosave; });
1624  __webpack_require__.d(actions_namespaceObject, "__experimentalRequestPostUpdateStart", function() { return __experimentalRequestPostUpdateStart; });
1625  __webpack_require__.d(actions_namespaceObject, "__experimentalRequestPostUpdateFinish", function() { return __experimentalRequestPostUpdateFinish; });
1626  __webpack_require__.d(actions_namespaceObject, "updatePost", function() { return updatePost; });
1627  __webpack_require__.d(actions_namespaceObject, "setupEditorState", function() { return setupEditorState; });
1628  __webpack_require__.d(actions_namespaceObject, "editPost", function() { return actions_editPost; });
1629  __webpack_require__.d(actions_namespaceObject, "__experimentalOptimisticUpdatePost", function() { return __experimentalOptimisticUpdatePost; });
1630  __webpack_require__.d(actions_namespaceObject, "savePost", function() { return savePost; });
1631  __webpack_require__.d(actions_namespaceObject, "refreshPost", function() { return refreshPost; });
1632  __webpack_require__.d(actions_namespaceObject, "trashPost", function() { return trashPost; });
1633  __webpack_require__.d(actions_namespaceObject, "autosave", function() { return actions_autosave; });
1634  __webpack_require__.d(actions_namespaceObject, "redo", function() { return actions_redo; });
1635  __webpack_require__.d(actions_namespaceObject, "undo", function() { return actions_undo; });
1636  __webpack_require__.d(actions_namespaceObject, "createUndoLevel", function() { return createUndoLevel; });
1637  __webpack_require__.d(actions_namespaceObject, "updatePostLock", function() { return updatePostLock; });
1638  __webpack_require__.d(actions_namespaceObject, "__experimentalFetchReusableBlocks", function() { return __experimentalFetchReusableBlocks; });
1639  __webpack_require__.d(actions_namespaceObject, "__experimentalReceiveReusableBlocks", function() { return __experimentalReceiveReusableBlocks; });
1640  __webpack_require__.d(actions_namespaceObject, "__experimentalSaveReusableBlock", function() { return __experimentalSaveReusableBlock; });
1641  __webpack_require__.d(actions_namespaceObject, "__experimentalDeleteReusableBlock", function() { return __experimentalDeleteReusableBlock; });
1642  __webpack_require__.d(actions_namespaceObject, "__experimentalUpdateReusableBlock", function() { return __experimentalUpdateReusableBlock; });
1643  __webpack_require__.d(actions_namespaceObject, "__experimentalConvertBlockToStatic", function() { return __experimentalConvertBlockToStatic; });
1644  __webpack_require__.d(actions_namespaceObject, "__experimentalConvertBlockToReusable", function() { return __experimentalConvertBlockToReusable; });
1645  __webpack_require__.d(actions_namespaceObject, "enablePublishSidebar", function() { return enablePublishSidebar; });
1646  __webpack_require__.d(actions_namespaceObject, "disablePublishSidebar", function() { return disablePublishSidebar; });
1647  __webpack_require__.d(actions_namespaceObject, "lockPostSaving", function() { return lockPostSaving; });
1648  __webpack_require__.d(actions_namespaceObject, "unlockPostSaving", function() { return unlockPostSaving; });
1649  __webpack_require__.d(actions_namespaceObject, "resetEditorBlocks", function() { return actions_resetEditorBlocks; });
1650  __webpack_require__.d(actions_namespaceObject, "updateEditorSettings", function() { return updateEditorSettings; });
1651  __webpack_require__.d(actions_namespaceObject, "resetBlocks", function() { return resetBlocks; });
1652  __webpack_require__.d(actions_namespaceObject, "receiveBlocks", function() { return receiveBlocks; });
1653  __webpack_require__.d(actions_namespaceObject, "updateBlock", function() { return updateBlock; });
1654  __webpack_require__.d(actions_namespaceObject, "updateBlockAttributes", function() { return updateBlockAttributes; });
1655  __webpack_require__.d(actions_namespaceObject, "selectBlock", function() { return selectBlock; });
1656  __webpack_require__.d(actions_namespaceObject, "startMultiSelect", function() { return startMultiSelect; });
1657  __webpack_require__.d(actions_namespaceObject, "stopMultiSelect", function() { return stopMultiSelect; });
1658  __webpack_require__.d(actions_namespaceObject, "multiSelect", function() { return multiSelect; });
1659  __webpack_require__.d(actions_namespaceObject, "clearSelectedBlock", function() { return clearSelectedBlock; });
1660  __webpack_require__.d(actions_namespaceObject, "toggleSelection", function() { return toggleSelection; });
1661  __webpack_require__.d(actions_namespaceObject, "replaceBlocks", function() { return actions_replaceBlocks; });
1662  __webpack_require__.d(actions_namespaceObject, "replaceBlock", function() { return replaceBlock; });
1663  __webpack_require__.d(actions_namespaceObject, "moveBlocksDown", function() { return moveBlocksDown; });
1664  __webpack_require__.d(actions_namespaceObject, "moveBlocksUp", function() { return moveBlocksUp; });
1665  __webpack_require__.d(actions_namespaceObject, "moveBlockToPosition", function() { return moveBlockToPosition; });
1666  __webpack_require__.d(actions_namespaceObject, "insertBlock", function() { return insertBlock; });
1667  __webpack_require__.d(actions_namespaceObject, "insertBlocks", function() { return insertBlocks; });
1668  __webpack_require__.d(actions_namespaceObject, "showInsertionPoint", function() { return showInsertionPoint; });
1669  __webpack_require__.d(actions_namespaceObject, "hideInsertionPoint", function() { return hideInsertionPoint; });
1670  __webpack_require__.d(actions_namespaceObject, "setTemplateValidity", function() { return setTemplateValidity; });
1671  __webpack_require__.d(actions_namespaceObject, "synchronizeTemplate", function() { return synchronizeTemplate; });
1672  __webpack_require__.d(actions_namespaceObject, "mergeBlocks", function() { return mergeBlocks; });
1673  __webpack_require__.d(actions_namespaceObject, "removeBlocks", function() { return actions_removeBlocks; });
1674  __webpack_require__.d(actions_namespaceObject, "removeBlock", function() { return removeBlock; });
1675  __webpack_require__.d(actions_namespaceObject, "toggleBlockMode", function() { return toggleBlockMode; });
1676  __webpack_require__.d(actions_namespaceObject, "startTyping", function() { return startTyping; });
1677  __webpack_require__.d(actions_namespaceObject, "stopTyping", function() { return stopTyping; });
1678  __webpack_require__.d(actions_namespaceObject, "enterFormattedText", function() { return enterFormattedText; });
1679  __webpack_require__.d(actions_namespaceObject, "exitFormattedText", function() { return exitFormattedText; });
1680  __webpack_require__.d(actions_namespaceObject, "insertDefaultBlock", function() { return insertDefaultBlock; });
1681  __webpack_require__.d(actions_namespaceObject, "updateBlockListSettings", function() { return updateBlockListSettings; });
1682  var selectors_namespaceObject = {};
1683  __webpack_require__.r(selectors_namespaceObject);
1684  __webpack_require__.d(selectors_namespaceObject, "hasEditorUndo", function() { return hasEditorUndo; });
1685  __webpack_require__.d(selectors_namespaceObject, "hasEditorRedo", function() { return hasEditorRedo; });
1686  __webpack_require__.d(selectors_namespaceObject, "isEditedPostNew", function() { return selectors_isEditedPostNew; });
1687  __webpack_require__.d(selectors_namespaceObject, "hasChangedContent", function() { return hasChangedContent; });
1688  __webpack_require__.d(selectors_namespaceObject, "isEditedPostDirty", function() { return selectors_isEditedPostDirty; });
1689  __webpack_require__.d(selectors_namespaceObject, "isCleanNewPost", function() { return selectors_isCleanNewPost; });
1690  __webpack_require__.d(selectors_namespaceObject, "getCurrentPost", function() { return selectors_getCurrentPost; });
1691  __webpack_require__.d(selectors_namespaceObject, "getCurrentPostType", function() { return selectors_getCurrentPostType; });
1692  __webpack_require__.d(selectors_namespaceObject, "getCurrentPostId", function() { return selectors_getCurrentPostId; });
1693  __webpack_require__.d(selectors_namespaceObject, "getCurrentPostRevisionsCount", function() { return getCurrentPostRevisionsCount; });
1694  __webpack_require__.d(selectors_namespaceObject, "getCurrentPostLastRevisionId", function() { return getCurrentPostLastRevisionId; });
1695  __webpack_require__.d(selectors_namespaceObject, "getPostEdits", function() { return getPostEdits; });
1696  __webpack_require__.d(selectors_namespaceObject, "getCurrentPostAttribute", function() { return selectors_getCurrentPostAttribute; });
1697  __webpack_require__.d(selectors_namespaceObject, "getEditedPostAttribute", function() { return selectors_getEditedPostAttribute; });
1698  __webpack_require__.d(selectors_namespaceObject, "getAutosaveAttribute", function() { return getAutosaveAttribute; });
1699  __webpack_require__.d(selectors_namespaceObject, "getEditedPostVisibility", function() { return selectors_getEditedPostVisibility; });
1700  __webpack_require__.d(selectors_namespaceObject, "isCurrentPostPending", function() { return isCurrentPostPending; });
1701  __webpack_require__.d(selectors_namespaceObject, "isCurrentPostPublished", function() { return selectors_isCurrentPostPublished; });
1702  __webpack_require__.d(selectors_namespaceObject, "isCurrentPostScheduled", function() { return selectors_isCurrentPostScheduled; });
1703  __webpack_require__.d(selectors_namespaceObject, "isEditedPostPublishable", function() { return selectors_isEditedPostPublishable; });
1704  __webpack_require__.d(selectors_namespaceObject, "isEditedPostSaveable", function() { return selectors_isEditedPostSaveable; });
1705  __webpack_require__.d(selectors_namespaceObject, "isEditedPostEmpty", function() { return isEditedPostEmpty; });
1706  __webpack_require__.d(selectors_namespaceObject, "isEditedPostAutosaveable", function() { return selectors_isEditedPostAutosaveable; });
1707  __webpack_require__.d(selectors_namespaceObject, "getAutosave", function() { return getAutosave; });
1708  __webpack_require__.d(selectors_namespaceObject, "hasAutosave", function() { return hasAutosave; });
1709  __webpack_require__.d(selectors_namespaceObject, "isEditedPostBeingScheduled", function() { return selectors_isEditedPostBeingScheduled; });
1710  __webpack_require__.d(selectors_namespaceObject, "isEditedPostDateFloating", function() { return isEditedPostDateFloating; });
1711  __webpack_require__.d(selectors_namespaceObject, "isSavingPost", function() { return selectors_isSavingPost; });
1712  __webpack_require__.d(selectors_namespaceObject, "didPostSaveRequestSucceed", function() { return didPostSaveRequestSucceed; });
1713  __webpack_require__.d(selectors_namespaceObject, "didPostSaveRequestFail", function() { return didPostSaveRequestFail; });
1714  __webpack_require__.d(selectors_namespaceObject, "isAutosavingPost", function() { return selectors_isAutosavingPost; });
1715  __webpack_require__.d(selectors_namespaceObject, "isPreviewingPost", function() { return isPreviewingPost; });
1716  __webpack_require__.d(selectors_namespaceObject, "getEditedPostPreviewLink", function() { return selectors_getEditedPostPreviewLink; });
1717  __webpack_require__.d(selectors_namespaceObject, "getSuggestedPostFormat", function() { return selectors_getSuggestedPostFormat; });
1718  __webpack_require__.d(selectors_namespaceObject, "getBlocksForSerialization", function() { return getBlocksForSerialization; });
1719  __webpack_require__.d(selectors_namespaceObject, "getEditedPostContent", function() { return getEditedPostContent; });
1720  __webpack_require__.d(selectors_namespaceObject, "__experimentalGetReusableBlock", function() { return __experimentalGetReusableBlock; });
1721  __webpack_require__.d(selectors_namespaceObject, "__experimentalIsSavingReusableBlock", function() { return __experimentalIsSavingReusableBlock; });
1722  __webpack_require__.d(selectors_namespaceObject, "__experimentalIsFetchingReusableBlock", function() { return __experimentalIsFetchingReusableBlock; });
1723  __webpack_require__.d(selectors_namespaceObject, "__experimentalGetReusableBlocks", function() { return selectors_experimentalGetReusableBlocks; });
1724  __webpack_require__.d(selectors_namespaceObject, "getStateBeforeOptimisticTransaction", function() { return getStateBeforeOptimisticTransaction; });
1725  __webpack_require__.d(selectors_namespaceObject, "isPublishingPost", function() { return selectors_isPublishingPost; });
1726  __webpack_require__.d(selectors_namespaceObject, "isPermalinkEditable", function() { return selectors_isPermalinkEditable; });
1727  __webpack_require__.d(selectors_namespaceObject, "getPermalink", function() { return getPermalink; });
1728  __webpack_require__.d(selectors_namespaceObject, "getPermalinkParts", function() { return selectors_getPermalinkParts; });
1729  __webpack_require__.d(selectors_namespaceObject, "inSomeHistory", function() { return inSomeHistory; });
1730  __webpack_require__.d(selectors_namespaceObject, "isPostLocked", function() { return isPostLocked; });
1731  __webpack_require__.d(selectors_namespaceObject, "isPostSavingLocked", function() { return selectors_isPostSavingLocked; });
1732  __webpack_require__.d(selectors_namespaceObject, "isPostAutosavingLocked", function() { return isPostAutosavingLocked; });
1733  __webpack_require__.d(selectors_namespaceObject, "isPostLockTakeover", function() { return isPostLockTakeover; });
1734  __webpack_require__.d(selectors_namespaceObject, "getPostLockUser", function() { return getPostLockUser; });
1735  __webpack_require__.d(selectors_namespaceObject, "getActivePostLock", function() { return getActivePostLock; });
1736  __webpack_require__.d(selectors_namespaceObject, "canUserUseUnfilteredHTML", function() { return selectors_canUserUseUnfilteredHTML; });
1737  __webpack_require__.d(selectors_namespaceObject, "isPublishSidebarEnabled", function() { return selectors_isPublishSidebarEnabled; });
1738  __webpack_require__.d(selectors_namespaceObject, "getEditorBlocks", function() { return selectors_getEditorBlocks; });
1739  __webpack_require__.d(selectors_namespaceObject, "__unstableIsEditorReady", function() { return __unstableIsEditorReady; });
1740  __webpack_require__.d(selectors_namespaceObject, "getEditorSettings", function() { return selectors_getEditorSettings; });
1741  __webpack_require__.d(selectors_namespaceObject, "getBlockName", function() { return selectors_getBlockName; });
1742  __webpack_require__.d(selectors_namespaceObject, "isBlockValid", function() { return isBlockValid; });
1743  __webpack_require__.d(selectors_namespaceObject, "getBlockAttributes", function() { return getBlockAttributes; });
1744  __webpack_require__.d(selectors_namespaceObject, "getBlock", function() { return selectors_getBlock; });
1745  __webpack_require__.d(selectors_namespaceObject, "getBlocks", function() { return selectors_getBlocks; });
1746  __webpack_require__.d(selectors_namespaceObject, "__unstableGetBlockWithoutInnerBlocks", function() { return __unstableGetBlockWithoutInnerBlocks; });
1747  __webpack_require__.d(selectors_namespaceObject, "getClientIdsOfDescendants", function() { return getClientIdsOfDescendants; });
1748  __webpack_require__.d(selectors_namespaceObject, "getClientIdsWithDescendants", function() { return getClientIdsWithDescendants; });
1749  __webpack_require__.d(selectors_namespaceObject, "getGlobalBlockCount", function() { return getGlobalBlockCount; });
1750  __webpack_require__.d(selectors_namespaceObject, "getBlocksByClientId", function() { return selectors_getBlocksByClientId; });
1751  __webpack_require__.d(selectors_namespaceObject, "getBlockCount", function() { return getBlockCount; });
1752  __webpack_require__.d(selectors_namespaceObject, "getBlockSelectionStart", function() { return getBlockSelectionStart; });
1753  __webpack_require__.d(selectors_namespaceObject, "getBlockSelectionEnd", function() { return getBlockSelectionEnd; });
1754  __webpack_require__.d(selectors_namespaceObject, "getSelectedBlockCount", function() { return getSelectedBlockCount; });
1755  __webpack_require__.d(selectors_namespaceObject, "hasSelectedBlock", function() { return hasSelectedBlock; });
1756  __webpack_require__.d(selectors_namespaceObject, "getSelectedBlockClientId", function() { return selectors_getSelectedBlockClientId; });
1757  __webpack_require__.d(selectors_namespaceObject, "getSelectedBlock", function() { return getSelectedBlock; });
1758  __webpack_require__.d(selectors_namespaceObject, "getBlockRootClientId", function() { return getBlockRootClientId; });
1759  __webpack_require__.d(selectors_namespaceObject, "getBlockHierarchyRootClientId", function() { return getBlockHierarchyRootClientId; });
1760  __webpack_require__.d(selectors_namespaceObject, "getAdjacentBlockClientId", function() { return getAdjacentBlockClientId; });
1761  __webpack_require__.d(selectors_namespaceObject, "getPreviousBlockClientId", function() { return getPreviousBlockClientId; });
1762  __webpack_require__.d(selectors_namespaceObject, "getNextBlockClientId", function() { return getNextBlockClientId; });
1763  __webpack_require__.d(selectors_namespaceObject, "getSelectedBlocksInitialCaretPosition", function() { return getSelectedBlocksInitialCaretPosition; });
1764  __webpack_require__.d(selectors_namespaceObject, "getMultiSelectedBlockClientIds", function() { return getMultiSelectedBlockClientIds; });
1765  __webpack_require__.d(selectors_namespaceObject, "getMultiSelectedBlocks", function() { return getMultiSelectedBlocks; });
1766  __webpack_require__.d(selectors_namespaceObject, "getFirstMultiSelectedBlockClientId", function() { return getFirstMultiSelectedBlockClientId; });
1767  __webpack_require__.d(selectors_namespaceObject, "getLastMultiSelectedBlockClientId", function() { return getLastMultiSelectedBlockClientId; });
1768  __webpack_require__.d(selectors_namespaceObject, "isFirstMultiSelectedBlock", function() { return isFirstMultiSelectedBlock; });
1769  __webpack_require__.d(selectors_namespaceObject, "isBlockMultiSelected", function() { return isBlockMultiSelected; });
1770  __webpack_require__.d(selectors_namespaceObject, "isAncestorMultiSelected", function() { return isAncestorMultiSelected; });
1771  __webpack_require__.d(selectors_namespaceObject, "getMultiSelectedBlocksStartClientId", function() { return getMultiSelectedBlocksStartClientId; });
1772  __webpack_require__.d(selectors_namespaceObject, "getMultiSelectedBlocksEndClientId", function() { return getMultiSelectedBlocksEndClientId; });
1773  __webpack_require__.d(selectors_namespaceObject, "getBlockOrder", function() { return getBlockOrder; });
1774  __webpack_require__.d(selectors_namespaceObject, "getBlockIndex", function() { return getBlockIndex; });
1775  __webpack_require__.d(selectors_namespaceObject, "isBlockSelected", function() { return isBlockSelected; });
1776  __webpack_require__.d(selectors_namespaceObject, "hasSelectedInnerBlock", function() { return hasSelectedInnerBlock; });
1777  __webpack_require__.d(selectors_namespaceObject, "isBlockWithinSelection", function() { return isBlockWithinSelection; });
1778  __webpack_require__.d(selectors_namespaceObject, "hasMultiSelection", function() { return hasMultiSelection; });
1779  __webpack_require__.d(selectors_namespaceObject, "isMultiSelecting", function() { return isMultiSelecting; });
1780  __webpack_require__.d(selectors_namespaceObject, "isSelectionEnabled", function() { return isSelectionEnabled; });
1781  __webpack_require__.d(selectors_namespaceObject, "getBlockMode", function() { return getBlockMode; });
1782  __webpack_require__.d(selectors_namespaceObject, "isTyping", function() { return isTyping; });
1783  __webpack_require__.d(selectors_namespaceObject, "isCaretWithinFormattedText", function() { return isCaretWithinFormattedText; });
1784  __webpack_require__.d(selectors_namespaceObject, "getBlockInsertionPoint", function() { return getBlockInsertionPoint; });
1785  __webpack_require__.d(selectors_namespaceObject, "isBlockInsertionPointVisible", function() { return isBlockInsertionPointVisible; });
1786  __webpack_require__.d(selectors_namespaceObject, "isValidTemplate", function() { return isValidTemplate; });
1787  __webpack_require__.d(selectors_namespaceObject, "getTemplate", function() { return getTemplate; });
1788  __webpack_require__.d(selectors_namespaceObject, "getTemplateLock", function() { return getTemplateLock; });
1789  __webpack_require__.d(selectors_namespaceObject, "canInsertBlockType", function() { return selectors_canInsertBlockType; });
1790  __webpack_require__.d(selectors_namespaceObject, "getInserterItems", function() { return selectors_getInserterItems; });
1791  __webpack_require__.d(selectors_namespaceObject, "hasInserterItems", function() { return hasInserterItems; });
1792  __webpack_require__.d(selectors_namespaceObject, "getBlockListSettings", function() { return getBlockListSettings; });
1793  var store_selectors_namespaceObject = {};
1794  __webpack_require__.r(store_selectors_namespaceObject);
1795  __webpack_require__.d(store_selectors_namespaceObject, "isRequestingDownloadableBlocks", function() { return isRequestingDownloadableBlocks; });
1796  __webpack_require__.d(store_selectors_namespaceObject, "getDownloadableBlocks", function() { return selectors_getDownloadableBlocks; });
1797  __webpack_require__.d(store_selectors_namespaceObject, "hasInstallBlocksPermission", function() { return selectors_hasInstallBlocksPermission; });
1798  __webpack_require__.d(store_selectors_namespaceObject, "getInstalledBlockTypes", function() { return selectors_getInstalledBlockTypes; });
1799  var store_actions_namespaceObject = {};
1800  __webpack_require__.r(store_actions_namespaceObject);
1801  __webpack_require__.d(store_actions_namespaceObject, "fetchDownloadableBlocks", function() { return fetchDownloadableBlocks; });
1802  __webpack_require__.d(store_actions_namespaceObject, "receiveDownloadableBlocks", function() { return receiveDownloadableBlocks; });
1803  __webpack_require__.d(store_actions_namespaceObject, "setInstallBlocksPermission", function() { return setInstallBlocksPermission; });
1804  __webpack_require__.d(store_actions_namespaceObject, "downloadBlock", function() { return actions_downloadBlock; });
1805  __webpack_require__.d(store_actions_namespaceObject, "installBlock", function() { return actions_installBlock; });
1806  __webpack_require__.d(store_actions_namespaceObject, "uninstallBlock", function() { return uninstallBlock; });
1807  __webpack_require__.d(store_actions_namespaceObject, "addInstalledBlockType", function() { return addInstalledBlockType; });
1808  __webpack_require__.d(store_actions_namespaceObject, "removeInstalledBlockType", function() { return removeInstalledBlockType; });
1809  
1810  // EXTERNAL MODULE: external {"this":["wp","blockEditor"]}
1811  var external_this_wp_blockEditor_ = __webpack_require__(6);
1812  
1813  // EXTERNAL MODULE: external {"this":["wp","blocks"]}
1814  var external_this_wp_blocks_ = __webpack_require__(9);
1815  
1816  // EXTERNAL MODULE: external {"this":["wp","coreData"]}
1817  var external_this_wp_coreData_ = __webpack_require__(97);
1818  
1819  // EXTERNAL MODULE: external {"this":["wp","notices"]}
1820  var external_this_wp_notices_ = __webpack_require__(157);
1821  
1822  // EXTERNAL MODULE: external {"this":["wp","nux"]}
1823  var external_this_wp_nux_ = __webpack_require__(63);
1824  
1825  // EXTERNAL MODULE: external {"this":["wp","richText"]}
1826  var external_this_wp_richText_ = __webpack_require__(22);
1827  
1828  // EXTERNAL MODULE: external {"this":["wp","viewport"]}
1829  var external_this_wp_viewport_ = __webpack_require__(43);
1830  
1831  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread.js
1832  var objectSpread = __webpack_require__(7);
1833  
1834  // EXTERNAL MODULE: external {"this":["wp","data"]}
1835  var external_this_wp_data_ = __webpack_require__(4);
1836  
1837  // EXTERNAL MODULE: external {"this":["wp","dataControls"]}
1838  var external_this_wp_dataControls_ = __webpack_require__(36);
1839  
1840  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
1841  var defineProperty = __webpack_require__(10);
1842  
1843  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
1844  var esm_typeof = __webpack_require__(31);
1845  
1846  // EXTERNAL MODULE: ./node_modules/redux-optimist/index.js
1847  var redux_optimist = __webpack_require__(90);
1848  var redux_optimist_default = /*#__PURE__*/__webpack_require__.n(redux_optimist);
1849  
1850  // EXTERNAL MODULE: external "lodash"
1851  var external_lodash_ = __webpack_require__(2);
1852  
1853  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/defaults.js
1854  
1855  
1856  /**
1857   * WordPress dependencies
1858   */
1859  
1860  var PREFERENCES_DEFAULTS = {
1861    insertUsage: {},
1862    // Should be kept for backward compatibility, see: https://github.com/WordPress/gutenberg/issues/14580.
1863    isPublishSidebarEnabled: true
1864  };
1865  /**
1866   * The default post editor settings
1867   *
1868   *  allowedBlockTypes  boolean|Array Allowed block types
1869   *  richEditingEnabled boolean       Whether rich editing is enabled or not
1870   *  codeEditingEnabled boolean       Whether code editing is enabled or not
1871   *  enableCustomFields boolean       Whether the WordPress custom fields are enabled or not
1872   *  autosaveInterval   number        Autosave Interval
1873   *  availableTemplates array?        The available post templates
1874   *  disablePostFormats boolean       Whether or not the post formats are disabled
1875   *  allowedMimeTypes   array?        List of allowed mime types and file extensions
1876   *  maxUploadFileSize  number        Maximum upload file size
1877   */
1878  
1879  var EDITOR_SETTINGS_DEFAULTS = Object(objectSpread["a" /* default */])({}, external_this_wp_blockEditor_["SETTINGS_DEFAULTS"], {
1880    richEditingEnabled: true,
1881    codeEditingEnabled: true,
1882    enableCustomFields: false
1883  });
1884  
1885  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/reducer.js
1886  
1887  
1888  
1889  
1890  /**
1891   * External dependencies
1892   */
1893  
1894  
1895  /**
1896   * WordPress dependencies
1897   */
1898  
1899  
1900  /**
1901   * Internal dependencies
1902   */
1903  
1904  
1905  /**
1906   * Returns a post attribute value, flattening nested rendered content using its
1907   * raw value in place of its original object form.
1908   *
1909   * @param {*} value Original value.
1910   *
1911   * @return {*} Raw value.
1912   */
1913  
1914  function getPostRawValue(value) {
1915    if (value && 'object' === Object(esm_typeof["a" /* default */])(value) && 'raw' in value) {
1916      return value.raw;
1917    }
1918  
1919    return value;
1920  }
1921  /**
1922   * Returns true if the two object arguments have the same keys, or false
1923   * otherwise.
1924   *
1925   * @param {Object} a First object.
1926   * @param {Object} b Second object.
1927   *
1928   * @return {boolean} Whether the two objects have the same keys.
1929   */
1930  
1931  function hasSameKeys(a, b) {
1932    return Object(external_lodash_["isEqual"])(Object(external_lodash_["keys"])(a), Object(external_lodash_["keys"])(b));
1933  }
1934  /**
1935   * Returns true if, given the currently dispatching action and the previously
1936   * dispatched action, the two actions are editing the same post property, or
1937   * false otherwise.
1938   *
1939   * @param {Object} action         Currently dispatching action.
1940   * @param {Object} previousAction Previously dispatched action.
1941   *
1942   * @return {boolean} Whether actions are updating the same post property.
1943   */
1944  
1945  function isUpdatingSamePostProperty(action, previousAction) {
1946    return action.type === 'EDIT_POST' && hasSameKeys(action.edits, previousAction.edits);
1947  }
1948  /**
1949   * Returns true if, given the currently dispatching action and the previously
1950   * dispatched action, the two actions are modifying the same property such that
1951   * undo history should be batched.
1952   *
1953   * @param {Object} action         Currently dispatching action.
1954   * @param {Object} previousAction Previously dispatched action.
1955   *
1956   * @return {boolean} Whether to overwrite present state.
1957   */
1958  
1959  function shouldOverwriteState(action, previousAction) {
1960    if (action.type === 'RESET_EDITOR_BLOCKS') {
1961      return !action.shouldCreateUndoLevel;
1962    }
1963  
1964    if (!previousAction || action.type !== previousAction.type) {
1965      return false;
1966    }
1967  
1968    return isUpdatingSamePostProperty(action, previousAction);
1969  }
1970  function reducer_postId() {
1971    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
1972    var action = arguments.length > 1 ? arguments[1] : undefined;
1973  
1974    switch (action.type) {
1975      case 'SETUP_EDITOR_STATE':
1976      case 'RESET_POST':
1977      case 'UPDATE_POST':
1978        return action.post.id;
1979    }
1980  
1981    return state;
1982  }
1983  function reducer_postType() {
1984    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
1985    var action = arguments.length > 1 ? arguments[1] : undefined;
1986  
1987    switch (action.type) {
1988      case 'SETUP_EDITOR_STATE':
1989      case 'RESET_POST':
1990      case 'UPDATE_POST':
1991        return action.post.type;
1992    }
1993  
1994    return state;
1995  }
1996  /**
1997   * Reducer returning whether the post blocks match the defined template or not.
1998   *
1999   * @param {Object} state  Current state.
2000   * @param {Object} action Dispatched action.
2001   *
2002   * @return {boolean} Updated state.
2003   */
2004  
2005  function reducer_template() {
2006    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
2007      isValid: true
2008    };
2009    var action = arguments.length > 1 ? arguments[1] : undefined;
2010  
2011    switch (action.type) {
2012      case 'SET_TEMPLATE_VALIDITY':
2013        return Object(objectSpread["a" /* default */])({}, state, {
2014          isValid: action.isValid
2015        });
2016    }
2017  
2018    return state;
2019  }
2020  /**
2021   * Reducer returning the user preferences.
2022   *
2023   * @param {Object}  state                 Current state.
2024   * @param {Object}  action                Dispatched action.
2025   *
2026   * @return {string} Updated state.
2027   */
2028  
2029  function preferences() {
2030    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : PREFERENCES_DEFAULTS;
2031    var action = arguments.length > 1 ? arguments[1] : undefined;
2032  
2033    switch (action.type) {
2034      case 'ENABLE_PUBLISH_SIDEBAR':
2035        return Object(objectSpread["a" /* default */])({}, state, {
2036          isPublishSidebarEnabled: true
2037        });
2038  
2039      case 'DISABLE_PUBLISH_SIDEBAR':
2040        return Object(objectSpread["a" /* default */])({}, state, {
2041          isPublishSidebarEnabled: false
2042        });
2043    }
2044  
2045    return state;
2046  }
2047  /**
2048   * Reducer returning current network request state (whether a request to
2049   * the WP REST API is in progress, successful, or failed).
2050   *
2051   * @param {Object} state  Current state.
2052   * @param {Object} action Dispatched action.
2053   *
2054   * @return {Object} Updated state.
2055   */
2056  
2057  function saving() {
2058    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2059    var action = arguments.length > 1 ? arguments[1] : undefined;
2060  
2061    switch (action.type) {
2062      case 'REQUEST_POST_UPDATE_START':
2063      case 'REQUEST_POST_UPDATE_FINISH':
2064        return {
2065          pending: action.type === 'REQUEST_POST_UPDATE_START',
2066          options: action.options || {}
2067        };
2068    }
2069  
2070    return state;
2071  }
2072  /**
2073   * Post Lock State.
2074   *
2075   * @typedef {Object} PostLockState
2076   *
2077   * @property {boolean} isLocked       Whether the post is locked.
2078   * @property {?boolean} isTakeover     Whether the post editing has been taken over.
2079   * @property {?boolean} activePostLock Active post lock value.
2080   * @property {?Object}  user           User that took over the post.
2081   */
2082  
2083  /**
2084   * Reducer returning the post lock status.
2085   *
2086   * @param {PostLockState} state  Current state.
2087   * @param {Object} action Dispatched action.
2088   *
2089   * @return {PostLockState} Updated state.
2090   */
2091  
2092  function postLock() {
2093    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
2094      isLocked: false
2095    };
2096    var action = arguments.length > 1 ? arguments[1] : undefined;
2097  
2098    switch (action.type) {
2099      case 'UPDATE_POST_LOCK':
2100        return action.lock;
2101    }
2102  
2103    return state;
2104  }
2105  /**
2106   * Post saving lock.
2107   *
2108   * When post saving is locked, the post cannot be published or updated.
2109   *
2110   * @param {PostSavingLockState} state  Current state.
2111   * @param {Object}              action Dispatched action.
2112   *
2113   * @return {PostLockState} Updated state.
2114   */
2115  
2116  function postSavingLock() {
2117    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2118    var action = arguments.length > 1 ? arguments[1] : undefined;
2119  
2120    switch (action.type) {
2121      case 'LOCK_POST_SAVING':
2122        return Object(objectSpread["a" /* default */])({}, state, Object(defineProperty["a" /* default */])({}, action.lockName, true));
2123  
2124      case 'UNLOCK_POST_SAVING':
2125        return Object(external_lodash_["omit"])(state, action.lockName);
2126    }
2127  
2128    return state;
2129  }
2130  /**
2131   * Post autosaving lock.
2132   *
2133   * When post autosaving is locked, the post will not autosave.
2134   *
2135   * @param {PostAutosavingLockState} state  Current state.
2136   * @param {Object}                  action Dispatched action.
2137   *
2138   * @return {PostLockState} Updated state.
2139   */
2140  
2141  function postAutosavingLock() {
2142    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2143    var action = arguments.length > 1 ? arguments[1] : undefined;
2144  
2145    switch (action.type) {
2146      case 'LOCK_POST_AUTOSAVING':
2147        return Object(objectSpread["a" /* default */])({}, state, Object(defineProperty["a" /* default */])({}, action.lockName, true));
2148  
2149      case 'UNLOCK_POST_AUTOSAVING':
2150        return Object(external_lodash_["omit"])(state, action.lockName);
2151    }
2152  
2153    return state;
2154  }
2155  var reducer_reusableBlocks = Object(external_this_wp_data_["combineReducers"])({
2156    data: function data() {
2157      var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2158      var action = arguments.length > 1 ? arguments[1] : undefined;
2159  
2160      switch (action.type) {
2161        case 'RECEIVE_REUSABLE_BLOCKS':
2162          {
2163            return Object(objectSpread["a" /* default */])({}, state, Object(external_lodash_["keyBy"])(action.results, 'id'));
2164          }
2165  
2166        case 'UPDATE_REUSABLE_BLOCK':
2167          {
2168            var id = action.id,
2169                changes = action.changes;
2170            return Object(objectSpread["a" /* default */])({}, state, Object(defineProperty["a" /* default */])({}, id, Object(objectSpread["a" /* default */])({}, state[id], changes)));
2171          }
2172  
2173        case 'SAVE_REUSABLE_BLOCK_SUCCESS':
2174          {
2175            var _id = action.id,
2176                updatedId = action.updatedId; // If a temporary reusable block is saved, we swap the temporary id with the final one
2177  
2178            if (_id === updatedId) {
2179              return state;
2180            }
2181  
2182            var value = state[_id];
2183            return Object(objectSpread["a" /* default */])({}, Object(external_lodash_["omit"])(state, _id), Object(defineProperty["a" /* default */])({}, updatedId, Object(objectSpread["a" /* default */])({}, value, {
2184              id: updatedId
2185            })));
2186          }
2187  
2188        case 'REMOVE_REUSABLE_BLOCK':
2189          {
2190            var _id2 = action.id;
2191            return Object(external_lodash_["omit"])(state, _id2);
2192          }
2193      }
2194  
2195      return state;
2196    },
2197    isFetching: function isFetching() {
2198      var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2199      var action = arguments.length > 1 ? arguments[1] : undefined;
2200  
2201      switch (action.type) {
2202        case 'FETCH_REUSABLE_BLOCKS':
2203          {
2204            var id = action.id;
2205  
2206            if (!id) {
2207              return state;
2208            }
2209  
2210            return Object(objectSpread["a" /* default */])({}, state, Object(defineProperty["a" /* default */])({}, id, true));
2211          }
2212  
2213        case 'FETCH_REUSABLE_BLOCKS_SUCCESS':
2214        case 'FETCH_REUSABLE_BLOCKS_FAILURE':
2215          {
2216            var _id3 = action.id;
2217            return Object(external_lodash_["omit"])(state, _id3);
2218          }
2219      }
2220  
2221      return state;
2222    },
2223    isSaving: function isSaving() {
2224      var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2225      var action = arguments.length > 1 ? arguments[1] : undefined;
2226  
2227      switch (action.type) {
2228        case 'SAVE_REUSABLE_BLOCK':
2229          return Object(objectSpread["a" /* default */])({}, state, Object(defineProperty["a" /* default */])({}, action.id, true));
2230  
2231        case 'SAVE_REUSABLE_BLOCK_SUCCESS':
2232        case 'SAVE_REUSABLE_BLOCK_FAILURE':
2233          {
2234            var id = action.id;
2235            return Object(external_lodash_["omit"])(state, id);
2236          }
2237      }
2238  
2239      return state;
2240    }
2241  });
2242  /**
2243   * Reducer returning whether the editor is ready to be rendered.
2244   * The editor is considered ready to be rendered once
2245   * the post object is loaded properly and the initial blocks parsed.
2246   *
2247   * @param {boolean} state
2248   * @param {Object} action
2249   *
2250   * @return {boolean} Updated state.
2251   */
2252  
2253  function reducer_isReady() {
2254    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
2255    var action = arguments.length > 1 ? arguments[1] : undefined;
2256  
2257    switch (action.type) {
2258      case 'SETUP_EDITOR_STATE':
2259        return true;
2260  
2261      case 'TEAR_DOWN_EDITOR':
2262        return false;
2263    }
2264  
2265    return state;
2266  }
2267  /**
2268   * Reducer returning the post editor setting.
2269   *
2270   * @param {Object} state  Current state.
2271   * @param {Object} action Dispatched action.
2272   *
2273   * @return {Object} Updated state.
2274   */
2275  
2276  function reducer_editorSettings() {
2277    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : EDITOR_SETTINGS_DEFAULTS;
2278    var action = arguments.length > 1 ? arguments[1] : undefined;
2279  
2280    switch (action.type) {
2281      case 'UPDATE_EDITOR_SETTINGS':
2282        return Object(objectSpread["a" /* default */])({}, state, action.settings);
2283    }
2284  
2285    return state;
2286  }
2287  /* harmony default export */ var reducer = (redux_optimist_default()(Object(external_this_wp_data_["combineReducers"])({
2288    postId: reducer_postId,
2289    postType: reducer_postType,
2290    preferences: preferences,
2291    saving: saving,
2292    postLock: postLock,
2293    reusableBlocks: reducer_reusableBlocks,
2294    template: reducer_template,
2295    postSavingLock: postSavingLock,
2296    isReady: reducer_isReady,
2297    editorSettings: reducer_editorSettings,
2298    postAutosavingLock: postAutosavingLock
2299  })));
2300  
2301  // EXTERNAL MODULE: ./node_modules/refx/refx.js
2302  var refx = __webpack_require__(76);
2303  var refx_default = /*#__PURE__*/__webpack_require__.n(refx);
2304  
2305  // EXTERNAL MODULE: ./node_modules/@babel/runtime/regenerator/index.js
2306  var regenerator = __webpack_require__(20);
2307  var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
2308  
2309  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
2310  var asyncToGenerator = __webpack_require__(44);
2311  
2312  // EXTERNAL MODULE: external {"this":["wp","apiFetch"]}
2313  var external_this_wp_apiFetch_ = __webpack_require__(32);
2314  var external_this_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_apiFetch_);
2315  
2316  // EXTERNAL MODULE: external {"this":["wp","i18n"]}
2317  var external_this_wp_i18n_ = __webpack_require__(1);
2318  
2319  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
2320  var slicedToArray = __webpack_require__(23);
2321  
2322  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
2323  var toConsumableArray = __webpack_require__(17);
2324  
2325  // EXTERNAL MODULE: external {"this":["wp","deprecated"]}
2326  var external_this_wp_deprecated_ = __webpack_require__(37);
2327  var external_this_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_deprecated_);
2328  
2329  // EXTERNAL MODULE: external {"this":["wp","isShallowEqual"]}
2330  var external_this_wp_isShallowEqual_ = __webpack_require__(41);
2331  var external_this_wp_isShallowEqual_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_isShallowEqual_);
2332  
2333  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/constants.js
2334  /**
2335   * Set of post properties for which edits should assume a merging behavior,
2336   * assuming an object value.
2337   *
2338   * @type {Set}
2339   */
2340  var EDIT_MERGE_PROPERTIES = new Set(['meta']);
2341  /**
2342   * Constant for the store module (or reducer) key.
2343   *
2344   * @type {string}
2345   */
2346  
2347  var STORE_KEY = 'core/editor';
2348  var POST_UPDATE_TRANSACTION_ID = 'post-update';
2349  var SAVE_POST_NOTICE_ID = 'SAVE_POST_NOTICE_ID';
2350  var TRASH_POST_NOTICE_ID = 'TRASH_POST_NOTICE_ID';
2351  var PERMALINK_POSTNAME_REGEX = /%(?:postname|pagename)%/;
2352  var ONE_MINUTE_IN_MS = 60 * 1000;
2353  var AUTOSAVE_PROPERTIES = ['title', 'excerpt', 'content'];
2354  
2355  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/utils/notice-builder.js
2356  /**
2357   * WordPress dependencies
2358   */
2359  
2360  /**
2361   * Internal dependencies
2362   */
2363  
2364  
2365  /**
2366   * External dependencies
2367   */
2368  
2369  
2370  /**
2371   * Builds the arguments for a success notification dispatch.
2372   *
2373   * @param {Object} data Incoming data to build the arguments from.
2374   *
2375   * @return {Array} Arguments for dispatch. An empty array signals no
2376   *                 notification should be sent.
2377   */
2378  
2379  function getNotificationArgumentsForSaveSuccess(data) {
2380    var previousPost = data.previousPost,
2381        post = data.post,
2382        postType = data.postType; // Autosaves are neither shown a notice nor redirected.
2383  
2384    if (Object(external_lodash_["get"])(data.options, ['isAutosave'])) {
2385      return [];
2386    }
2387  
2388    var publishStatus = ['publish', 'private', 'future'];
2389    var isPublished = Object(external_lodash_["includes"])(publishStatus, previousPost.status);
2390    var willPublish = Object(external_lodash_["includes"])(publishStatus, post.status);
2391    var noticeMessage;
2392    var shouldShowLink = Object(external_lodash_["get"])(postType, ['viewable'], false);
2393  
2394    if (!isPublished && !willPublish) {
2395      // If saving a non-published post, don't show notice.
2396      noticeMessage = null;
2397    } else if (isPublished && !willPublish) {
2398      // If undoing publish status, show specific notice
2399      noticeMessage = postType.labels.item_reverted_to_draft;
2400      shouldShowLink = false;
2401    } else if (!isPublished && willPublish) {
2402      // If publishing or scheduling a post, show the corresponding
2403      // publish message
2404      noticeMessage = {
2405        publish: postType.labels.item_published,
2406        private: postType.labels.item_published_privately,
2407        future: postType.labels.item_scheduled
2408      }[post.status];
2409    } else {
2410      // Generic fallback notice
2411      noticeMessage = postType.labels.item_updated;
2412    }
2413  
2414    if (noticeMessage) {
2415      var actions = [];
2416  
2417      if (shouldShowLink) {
2418        actions.push({
2419          label: postType.labels.view_item,
2420          url: post.link
2421        });
2422      }
2423  
2424      return [noticeMessage, {
2425        id: SAVE_POST_NOTICE_ID,
2426        type: 'snackbar',
2427        actions: actions
2428      }];
2429    }
2430  
2431    return [];
2432  }
2433  /**
2434   * Builds the fail notification arguments for dispatch.
2435   *
2436   * @param {Object} data Incoming data to build the arguments with.
2437   *
2438   * @return {Array} Arguments for dispatch. An empty array signals no
2439   *                 notification should be sent.
2440   */
2441  
2442  function getNotificationArgumentsForSaveFail(data) {
2443    var post = data.post,
2444        edits = data.edits,
2445        error = data.error;
2446  
2447    if (error && 'rest_autosave_no_changes' === error.code) {
2448      // Autosave requested a new autosave, but there were no changes. This shouldn't
2449      // result in an error notice for the user.
2450      return [];
2451    }
2452  
2453    var publishStatus = ['publish', 'private', 'future'];
2454    var isPublished = publishStatus.indexOf(post.status) !== -1; // If the post was being published, we show the corresponding publish error message
2455    // Unless we publish an "updating failed" message
2456  
2457    var messages = {
2458      publish: Object(external_this_wp_i18n_["__"])('Publishing failed.'),
2459      private: Object(external_this_wp_i18n_["__"])('Publishing failed.'),
2460      future: Object(external_this_wp_i18n_["__"])('Scheduling failed.')
2461    };
2462    var noticeMessage = !isPublished && publishStatus.indexOf(edits.status) !== -1 ? messages[edits.status] : Object(external_this_wp_i18n_["__"])('Updating failed.'); // Check if message string contains HTML. Notice text is currently only
2463    // supported as plaintext, and stripping the tags may muddle the meaning.
2464  
2465    if (error.message && !/<\/?[^>]*>/.test(error.message)) {
2466      noticeMessage = Object(external_this_wp_i18n_["sprintf"])(Object(external_this_wp_i18n_["__"])('%1$s Error message: %2$s'), noticeMessage, error.message);
2467    }
2468  
2469    return [noticeMessage, {
2470      id: SAVE_POST_NOTICE_ID
2471    }];
2472  }
2473  /**
2474   * Builds the trash fail notification arguments for dispatch.
2475   *
2476   * @param {Object} data
2477   *
2478   * @return {Array} Arguments for dispatch.
2479   */
2480  
2481  function getNotificationArgumentsForTrashFail(data) {
2482    return [data.error.message && data.error.code !== 'unknown_error' ? data.error.message : Object(external_this_wp_i18n_["__"])('Trashing failed'), {
2483      id: TRASH_POST_NOTICE_ID
2484    }];
2485  }
2486  
2487  // EXTERNAL MODULE: ./node_modules/memize/index.js
2488  var memize = __webpack_require__(45);
2489  var memize_default = /*#__PURE__*/__webpack_require__.n(memize);
2490  
2491  // EXTERNAL MODULE: external {"this":["wp","autop"]}
2492  var external_this_wp_autop_ = __webpack_require__(72);
2493  
2494  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/utils/serialize-blocks.js
2495  /**
2496   * External dependencies
2497   */
2498  
2499  /**
2500   * WordPress dependencies
2501   */
2502  
2503  
2504  
2505  /**
2506   * Serializes blocks following backwards compatibility conventions.
2507   *
2508   * @param {Array} blocksForSerialization The blocks to serialize.
2509   *
2510   * @return {string} The blocks serialization.
2511   */
2512  
2513  var serializeBlocks = memize_default()(function (blocksForSerialization) {
2514    // A single unmodified default block is assumed to
2515    // be equivalent to an empty post.
2516    if (blocksForSerialization.length === 1 && Object(external_this_wp_blocks_["isUnmodifiedDefaultBlock"])(blocksForSerialization[0])) {
2517      blocksForSerialization = [];
2518    }
2519  
2520    var content = Object(external_this_wp_blocks_["serialize"])(blocksForSerialization); // For compatibility, treat a post consisting of a
2521    // single freeform block as legacy content and apply
2522    // pre-block-editor removep'd content formatting.
2523  
2524    if (blocksForSerialization.length === 1 && blocksForSerialization[0].name === Object(external_this_wp_blocks_["getFreeformContentHandlerName"])()) {
2525      content = Object(external_this_wp_autop_["removep"])(content);
2526    }
2527  
2528    return content;
2529  }, {
2530    maxSize: 1
2531  });
2532  /* harmony default export */ var serialize_blocks = (serializeBlocks);
2533  
2534  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/controls.js
2535  /**
2536   * WordPress dependencies
2537   */
2538  
2539  /**
2540   * Returns a control descriptor signalling to subscribe to the registry and
2541   * resolve the control promise only when the next state change occurs.
2542   *
2543   * @return {Object} Control descriptor.
2544   */
2545  
2546  function awaitNextStateChange() {
2547    return {
2548      type: 'AWAIT_NEXT_STATE_CHANGE'
2549    };
2550  }
2551  /**
2552   * Returns a control descriptor signalling to resolve with the current data
2553   * registry.
2554   *
2555   * @return {Object} Control descriptor.
2556   */
2557  
2558  function getRegistry() {
2559    return {
2560      type: 'GET_REGISTRY'
2561    };
2562  }
2563  var controls = {
2564    AWAIT_NEXT_STATE_CHANGE: Object(external_this_wp_data_["createRegistryControl"])(function (registry) {
2565      return function () {
2566        return new Promise(function (resolve) {
2567          var unsubscribe = registry.subscribe(function () {
2568            unsubscribe();
2569            resolve();
2570          });
2571        });
2572      };
2573    }),
2574    GET_REGISTRY: Object(external_this_wp_data_["createRegistryControl"])(function (registry) {
2575      return function () {
2576        return registry;
2577      };
2578    })
2579  };
2580  /* harmony default export */ var store_controls = (controls);
2581  
2582  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/block-sources/meta.js
2583  
2584  
2585  
2586  var _marked =
2587  /*#__PURE__*/
2588  regenerator_default.a.mark(getDependencies),
2589      _marked2 =
2590  /*#__PURE__*/
2591  regenerator_default.a.mark(update);
2592  
2593  /**
2594   * WordPress dependencies
2595   */
2596  
2597  /**
2598   * Internal dependencies
2599   */
2600  
2601  
2602  /**
2603   * Store control invoked upon a state change, responsible for returning an
2604   * object of dependencies. When a change in dependencies occurs (by shallow
2605   * equality of the returned object), blocks are reset to apply the new sourced
2606   * value.
2607   *
2608   * @yield {Object} Optional yielded controls.
2609   *
2610   * @return {Object} Dependencies as object.
2611   */
2612  
2613  function getDependencies() {
2614    return regenerator_default.a.wrap(function getDependencies$(_context) {
2615      while (1) {
2616        switch (_context.prev = _context.next) {
2617          case 0:
2618            _context.next = 2;
2619            return Object(external_this_wp_dataControls_["select"])('core/editor', 'getEditedPostAttribute', 'meta');
2620  
2621          case 2:
2622            _context.t0 = _context.sent;
2623            return _context.abrupt("return", {
2624              meta: _context.t0
2625            });
2626  
2627          case 4:
2628          case "end":
2629            return _context.stop();
2630        }
2631      }
2632    }, _marked);
2633  }
2634  /**
2635   * Given an attribute schema and dependencies data, returns a source value.
2636   *
2637   * @param {Object} schema            Block type attribute schema.
2638   * @param {Object} dependencies      Source dependencies.
2639   * @param {Object} dependencies.meta Post meta.
2640   *
2641   * @return {Object} Block attribute value.
2642   */
2643  
2644  function apply(schema, _ref) {
2645    var meta = _ref.meta;
2646    return meta[schema.meta];
2647  }
2648  /**
2649   * Store control invoked upon a block attributes update, responsible for
2650   * reflecting an update in a meta value.
2651   *
2652   * @param {Object} schema Block type attribute schema.
2653   * @param {*}      value  Updated block attribute value.
2654   *
2655   * @yield {Object} Yielded action objects or store controls.
2656   */
2657  
2658  function update(schema, value) {
2659    return regenerator_default.a.wrap(function update$(_context2) {
2660      while (1) {
2661        switch (_context2.prev = _context2.next) {
2662          case 0:
2663            _context2.next = 2;
2664            return actions_editPost({
2665              meta: Object(defineProperty["a" /* default */])({}, schema.meta, value)
2666            });
2667  
2668          case 2:
2669          case "end":
2670            return _context2.stop();
2671        }
2672      }
2673    }, _marked2);
2674  }
2675  
2676  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/block-sources/index.js
2677  /**
2678   * Internal dependencies
2679   */
2680  
2681  
2682  
2683  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/actions.js
2684  
2685  
2686  
2687  
2688  
2689  
2690  var actions_marked =
2691  /*#__PURE__*/
2692  regenerator_default.a.mark(getBlocksWithSourcedAttributes),
2693      actions_marked2 =
2694  /*#__PURE__*/
2695  regenerator_default.a.mark(resetLastBlockSourceDependencies),
2696      _marked3 =
2697  /*#__PURE__*/
2698  regenerator_default.a.mark(setupEditor),
2699      _marked4 =
2700  /*#__PURE__*/
2701  regenerator_default.a.mark(__experimentalSubscribeSources),
2702      _marked5 =
2703  /*#__PURE__*/
2704  regenerator_default.a.mark(resetAutosave),
2705      _marked6 =
2706  /*#__PURE__*/
2707  regenerator_default.a.mark(actions_editPost),
2708      _marked7 =
2709  /*#__PURE__*/
2710  regenerator_default.a.mark(savePost),
2711      _marked8 =
2712  /*#__PURE__*/
2713  regenerator_default.a.mark(refreshPost),
2714      _marked9 =
2715  /*#__PURE__*/
2716  regenerator_default.a.mark(trashPost),
2717      _marked10 =
2718  /*#__PURE__*/
2719  regenerator_default.a.mark(actions_autosave),
2720      _marked11 =
2721  /*#__PURE__*/
2722  regenerator_default.a.mark(actions_redo),
2723      _marked12 =
2724  /*#__PURE__*/
2725  regenerator_default.a.mark(actions_undo),
2726      _marked13 =
2727  /*#__PURE__*/
2728  regenerator_default.a.mark(actions_resetEditorBlocks);
2729  
2730  /**
2731   * External dependencies
2732   */
2733  
2734  /**
2735   * WordPress dependencies
2736   */
2737  
2738  
2739  
2740  
2741  
2742  /**
2743   * Internal dependencies
2744   */
2745  
2746  
2747  
2748  
2749  
2750  
2751  /**
2752   * Map of Registry instance to WeakMap of dependencies by custom source.
2753   *
2754   * @type WeakMap<WPDataRegistry,WeakMap<WPBlockAttributeSource,Object>>
2755   */
2756  
2757  var lastBlockSourceDependenciesByRegistry = new WeakMap();
2758  /**
2759   * Given a blocks array, returns a blocks array with sourced attribute values
2760   * applied. The reference will remain consistent with the original argument if
2761   * no attribute values must be overridden. If sourced values are applied, the
2762   * return value will be a modified copy of the original array.
2763   *
2764   * @param {WPBlock[]} blocks Original blocks array.
2765   *
2766   * @return {WPBlock[]} Blocks array with sourced values applied.
2767   */
2768  
2769  function getBlocksWithSourcedAttributes(blocks) {
2770    var registry, blockSourceDependencies, workingBlocks, i, block, blockType, _i, _Object$entries, _Object$entries$_i, attributeName, schema, dependencies, sourcedAttributeValue, appliedInnerBlocks;
2771  
2772    return regenerator_default.a.wrap(function getBlocksWithSourcedAttributes$(_context) {
2773      while (1) {
2774        switch (_context.prev = _context.next) {
2775          case 0:
2776            _context.next = 2;
2777            return getRegistry();
2778  
2779          case 2:
2780            registry = _context.sent;
2781  
2782            if (lastBlockSourceDependenciesByRegistry.has(registry)) {
2783              _context.next = 5;
2784              break;
2785            }
2786  
2787            return _context.abrupt("return", blocks);
2788  
2789          case 5:
2790            blockSourceDependencies = lastBlockSourceDependenciesByRegistry.get(registry);
2791            workingBlocks = blocks;
2792            i = 0;
2793  
2794          case 8:
2795            if (!(i < blocks.length)) {
2796              _context.next = 37;
2797              break;
2798            }
2799  
2800            block = blocks[i];
2801            _context.next = 12;
2802            return Object(external_this_wp_dataControls_["select"])('core/blocks', 'getBlockType', block.name);
2803  
2804          case 12:
2805            blockType = _context.sent;
2806            _i = 0, _Object$entries = Object.entries(blockType.attributes);
2807  
2808          case 14:
2809            if (!(_i < _Object$entries.length)) {
2810              _context.next = 30;
2811              break;
2812            }
2813  
2814            _Object$entries$_i = Object(slicedToArray["a" /* default */])(_Object$entries[_i], 2), attributeName = _Object$entries$_i[0], schema = _Object$entries$_i[1];
2815  
2816            if (!(!block_sources_namespaceObject[schema.source] || !block_sources_namespaceObject[schema.source].apply)) {
2817              _context.next = 18;
2818              break;
2819            }
2820  
2821            return _context.abrupt("continue", 27);
2822  
2823          case 18:
2824            if (blockSourceDependencies.has(block_sources_namespaceObject[schema.source])) {
2825              _context.next = 20;
2826              break;
2827            }
2828  
2829            return _context.abrupt("continue", 27);
2830  
2831          case 20:
2832            dependencies = blockSourceDependencies.get(block_sources_namespaceObject[schema.source]);
2833            sourcedAttributeValue = block_sources_namespaceObject[schema.source].apply(schema, dependencies); // It's only necessary to apply the value if it differs from the
2834            // block's locally-assigned value, to avoid needlessly resetting
2835            // the block editor.
2836  
2837            if (!(sourcedAttributeValue === block.attributes[attributeName])) {
2838              _context.next = 24;
2839              break;
2840            }
2841  
2842            return _context.abrupt("continue", 27);
2843  
2844          case 24:
2845            // Create a shallow clone to mutate, leaving the original intact.
2846            if (workingBlocks === blocks) {
2847              workingBlocks = Object(toConsumableArray["a" /* default */])(workingBlocks);
2848            }
2849  
2850            block = Object(objectSpread["a" /* default */])({}, block, {
2851              attributes: Object(objectSpread["a" /* default */])({}, block.attributes, Object(defineProperty["a" /* default */])({}, attributeName, sourcedAttributeValue))
2852            });
2853            workingBlocks.splice(i, 1, block);
2854  
2855          case 27:
2856            _i++;
2857            _context.next = 14;
2858            break;
2859  
2860          case 30:
2861            if (!block.innerBlocks.length) {
2862              _context.next = 34;
2863              break;
2864            }
2865  
2866            return _context.delegateYield(getBlocksWithSourcedAttributes(block.innerBlocks), "t0", 32);
2867  
2868          case 32:
2869            appliedInnerBlocks = _context.t0;
2870  
2871            if (appliedInnerBlocks !== block.innerBlocks) {
2872              if (workingBlocks === blocks) {
2873                workingBlocks = Object(toConsumableArray["a" /* default */])(workingBlocks);
2874              }
2875  
2876              block = Object(objectSpread["a" /* default */])({}, block, {
2877                innerBlocks: appliedInnerBlocks
2878              });
2879              workingBlocks.splice(i, 1, block);
2880            }
2881  
2882          case 34:
2883            i++;
2884            _context.next = 8;
2885            break;
2886  
2887          case 37:
2888            return _context.abrupt("return", workingBlocks);
2889  
2890          case 38:
2891          case "end":
2892            return _context.stop();
2893        }
2894      }
2895    }, actions_marked);
2896  }
2897  /**
2898   * Refreshes the last block source dependencies, optionally for a given subset
2899   * of sources (defaults to the full set of sources).
2900   *
2901   * @param {?Array} sourcesToUpdate Optional subset of sources to reset.
2902   *
2903   * @yield {Object} Yielded actions or control descriptors.
2904   */
2905  
2906  
2907  function resetLastBlockSourceDependencies() {
2908    var sourcesToUpdate,
2909        registry,
2910        lastBlockSourceDependencies,
2911        _iteratorNormalCompletion,
2912        _didIteratorError,
2913        _iteratorError,
2914        _iterator,
2915        _step,
2916        source,
2917        dependencies,
2918        _args2 = arguments;
2919  
2920    return regenerator_default.a.wrap(function resetLastBlockSourceDependencies$(_context2) {
2921      while (1) {
2922        switch (_context2.prev = _context2.next) {
2923          case 0:
2924            sourcesToUpdate = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : Object.values(block_sources_namespaceObject);
2925  
2926            if (sourcesToUpdate.length) {
2927              _context2.next = 3;
2928              break;
2929            }
2930  
2931            return _context2.abrupt("return");
2932  
2933          case 3:
2934            _context2.next = 5;
2935            return getRegistry();
2936  
2937          case 5:
2938            registry = _context2.sent;
2939  
2940            if (!lastBlockSourceDependenciesByRegistry.has(registry)) {
2941              lastBlockSourceDependenciesByRegistry.set(registry, new WeakMap());
2942            }
2943  
2944            lastBlockSourceDependencies = lastBlockSourceDependenciesByRegistry.get(registry);
2945            _iteratorNormalCompletion = true;
2946            _didIteratorError = false;
2947            _iteratorError = undefined;
2948            _context2.prev = 11;
2949            _iterator = sourcesToUpdate[Symbol.iterator]();
2950  
2951          case 13:
2952            if (_iteratorNormalCompletion = (_step = _iterator.next()).done) {
2953              _context2.next = 21;
2954              break;
2955            }
2956  
2957            source = _step.value;
2958            return _context2.delegateYield(source.getDependencies(), "t0", 16);
2959  
2960          case 16:
2961            dependencies = _context2.t0;
2962            lastBlockSourceDependencies.set(source, dependencies);
2963  
2964          case 18:
2965            _iteratorNormalCompletion = true;
2966            _context2.next = 13;
2967            break;
2968  
2969          case 21:
2970            _context2.next = 27;
2971            break;
2972  
2973          case 23:
2974            _context2.prev = 23;
2975            _context2.t1 = _context2["catch"](11);
2976            _didIteratorError = true;
2977            _iteratorError = _context2.t1;
2978  
2979          case 27:
2980            _context2.prev = 27;
2981            _context2.prev = 28;
2982  
2983            if (!_iteratorNormalCompletion && _iterator.return != null) {
2984              _iterator.return();
2985            }
2986  
2987          case 30:
2988            _context2.prev = 30;
2989  
2990            if (!_didIteratorError) {
2991              _context2.next = 33;
2992              break;
2993            }
2994  
2995            throw _iteratorError;
2996  
2997          case 33:
2998            return _context2.finish(30);
2999  
3000          case 34:
3001            return _context2.finish(27);
3002  
3003          case 35:
3004          case "end":
3005            return _context2.stop();
3006        }
3007      }
3008    }, actions_marked2, null, [[11, 23, 27, 35], [28,, 30, 34]]);
3009  }
3010  /**
3011   * Returns an action generator used in signalling that editor has initialized with
3012   * the specified post object and editor settings.
3013   *
3014   * @param {Object} post      Post object.
3015   * @param {Object} edits     Initial edited attributes object.
3016   * @param {Array?} template  Block Template.
3017   */
3018  
3019  
3020  function setupEditor(post, edits, template) {
3021    var content, blocks, isNewPost;
3022    return regenerator_default.a.wrap(function setupEditor$(_context3) {
3023      while (1) {
3024        switch (_context3.prev = _context3.next) {
3025          case 0:
3026            // In order to ensure maximum of a single parse during setup, edits are
3027            // included as part of editor setup action. Assume edited content as
3028            // canonical if provided, falling back to post.
3029            if (Object(external_lodash_["has"])(edits, ['content'])) {
3030              content = edits.content;
3031            } else {
3032              content = post.content.raw;
3033            }
3034  
3035            blocks = Object(external_this_wp_blocks_["parse"])(content); // Apply a template for new posts only, if exists.
3036  
3037            isNewPost = post.status === 'auto-draft';
3038  
3039            if (isNewPost && template) {
3040              blocks = Object(external_this_wp_blocks_["synchronizeBlocksWithTemplate"])(blocks, template);
3041            }
3042  
3043            _context3.next = 6;
3044            return resetPost(post);
3045  
3046          case 6:
3047            return _context3.delegateYield(resetLastBlockSourceDependencies(), "t0", 7);
3048  
3049          case 7:
3050            _context3.next = 9;
3051            return {
3052              type: 'SETUP_EDITOR',
3053              post: post,
3054              edits: edits,
3055              template: template
3056            };
3057  
3058          case 9:
3059            _context3.next = 11;
3060            return actions_resetEditorBlocks(blocks, {
3061              __unstableShouldCreateUndoLevel: false
3062            });
3063  
3064          case 11:
3065            _context3.next = 13;
3066            return setupEditorState(post);
3067  
3068          case 13:
3069            if (!(edits && Object.keys(edits).some(function (key) {
3070              return edits[key] !== (Object(external_lodash_["has"])(post, [key, 'raw']) ? post[key].raw : post[key]);
3071            }))) {
3072              _context3.next = 16;
3073              break;
3074            }
3075  
3076            _context3.next = 16;
3077            return actions_editPost(edits);
3078  
3079          case 16:
3080            return _context3.delegateYield(__experimentalSubscribeSources(), "t1", 17);
3081  
3082          case 17:
3083          case "end":
3084            return _context3.stop();
3085        }
3086      }
3087    }, _marked3);
3088  }
3089  /**
3090   * Returns an action object signalling that the editor is being destroyed and
3091   * that any necessary state or side-effect cleanup should occur.
3092   *
3093   * @return {Object} Action object.
3094   */
3095  
3096  function __experimentalTearDownEditor() {
3097    return {
3098      type: 'TEAR_DOWN_EDITOR'
3099    };
3100  }
3101  /**
3102   * Returns an action generator which loops to await the next state change,
3103   * calling to reset blocks when a block source dependencies change.
3104   *
3105   * @yield {Object} Action object.
3106   */
3107  
3108  function __experimentalSubscribeSources() {
3109    var isStillReady, registry, reset, _i2, _Object$values, source, dependencies, lastBlockSourceDependencies, lastDependencies;
3110  
3111    return regenerator_default.a.wrap(function __experimentalSubscribeSources$(_context4) {
3112      while (1) {
3113        switch (_context4.prev = _context4.next) {
3114          case 0:
3115            if (false) {}
3116  
3117            _context4.next = 3;
3118            return awaitNextStateChange();
3119  
3120          case 3:
3121            _context4.next = 5;
3122            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, '__unstableIsEditorReady');
3123  
3124          case 5:
3125            isStillReady = _context4.sent;
3126  
3127            if (isStillReady) {
3128              _context4.next = 8;
3129              break;
3130            }
3131  
3132            return _context4.abrupt("break", 36);
3133  
3134          case 8:
3135            _context4.next = 10;
3136            return getRegistry();
3137  
3138          case 10:
3139            registry = _context4.sent;
3140            reset = false;
3141            _i2 = 0, _Object$values = Object.values(block_sources_namespaceObject);
3142  
3143          case 13:
3144            if (!(_i2 < _Object$values.length)) {
3145              _context4.next = 26;
3146              break;
3147            }
3148  
3149            source = _Object$values[_i2];
3150  
3151            if (source.getDependencies) {
3152              _context4.next = 17;
3153              break;
3154            }
3155  
3156            return _context4.abrupt("continue", 23);
3157  
3158          case 17:
3159            return _context4.delegateYield(source.getDependencies(), "t0", 18);
3160  
3161          case 18:
3162            dependencies = _context4.t0;
3163  
3164            if (!lastBlockSourceDependenciesByRegistry.has(registry)) {
3165              lastBlockSourceDependenciesByRegistry.set(registry, new WeakMap());
3166            }
3167  
3168            lastBlockSourceDependencies = lastBlockSourceDependenciesByRegistry.get(registry);
3169            lastDependencies = lastBlockSourceDependencies.get(source);
3170  
3171            if (!external_this_wp_isShallowEqual_default()(dependencies, lastDependencies)) {
3172              lastBlockSourceDependencies.set(source, dependencies); // Allow the loop to continue in order to assign latest
3173              // dependencies values, but mark for reset.
3174  
3175              reset = true;
3176            }
3177  
3178          case 23:
3179            _i2++;
3180            _context4.next = 13;
3181            break;
3182  
3183          case 26:
3184            if (!reset) {
3185              _context4.next = 34;
3186              break;
3187            }
3188  
3189            _context4.t1 = actions_resetEditorBlocks;
3190            _context4.next = 30;
3191            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getEditorBlocks');
3192  
3193          case 30:
3194            _context4.t2 = _context4.sent;
3195            _context4.t3 = {
3196              __unstableShouldCreateUndoLevel: false
3197            };
3198            _context4.next = 34;
3199            return (0, _context4.t1)(_context4.t2, _context4.t3);
3200  
3201          case 34:
3202            _context4.next = 0;
3203            break;
3204  
3205          case 36:
3206          case "end":
3207            return _context4.stop();
3208        }
3209      }
3210    }, _marked4);
3211  }
3212  /**
3213   * Returns an action object used in signalling that the latest version of the
3214   * post has been received, either by initialization or save.
3215   *
3216   * @param {Object} post Post object.
3217   *
3218   * @return {Object} Action object.
3219   */
3220  
3221  function resetPost(post) {
3222    return {
3223      type: 'RESET_POST',
3224      post: post
3225    };
3226  }
3227  /**
3228   * Returns an action object used in signalling that the latest autosave of the
3229   * post has been received, by initialization or autosave.
3230   *
3231   * @deprecated since 5.6. Callers should use the `receiveAutosaves( postId, autosave )`
3232   *                selector from the '@wordpress/core-data' package.
3233   *
3234   * @param {Object} newAutosave Autosave post object.
3235   *
3236   * @return {Object} Action object.
3237   */
3238  
3239  function resetAutosave(newAutosave) {
3240    var postId;
3241    return regenerator_default.a.wrap(function resetAutosave$(_context5) {
3242      while (1) {
3243        switch (_context5.prev = _context5.next) {
3244          case 0:
3245            external_this_wp_deprecated_default()('resetAutosave action (`core/editor` store)', {
3246              alternative: 'receiveAutosaves action (`core` store)',
3247              plugin: 'Gutenberg'
3248            });
3249            _context5.next = 3;
3250            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getCurrentPostId');
3251  
3252          case 3:
3253            postId = _context5.sent;
3254            _context5.next = 6;
3255            return Object(external_this_wp_dataControls_["dispatch"])('core', 'receiveAutosaves', postId, newAutosave);
3256  
3257          case 6:
3258            return _context5.abrupt("return", {
3259              type: '__INERT__'
3260            });
3261  
3262          case 7:
3263          case "end":
3264            return _context5.stop();
3265        }
3266      }
3267    }, _marked5);
3268  }
3269  /**
3270   * Action for dispatching that a post update request has started.
3271   *
3272   * @param {Object} options
3273   *
3274   * @return {Object} An action object
3275   */
3276  
3277  function __experimentalRequestPostUpdateStart() {
3278    var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
3279    return {
3280      type: 'REQUEST_POST_UPDATE_START',
3281      options: options
3282    };
3283  }
3284  /**
3285   * Action for dispatching that a post update request has finished.
3286   *
3287   * @param {Object} options
3288   *
3289   * @return {Object} An action object
3290   */
3291  
3292  function __experimentalRequestPostUpdateFinish() {
3293    var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
3294    return {
3295      type: 'REQUEST_POST_UPDATE_FINISH',
3296      options: options
3297    };
3298  }
3299  /**
3300   * Returns an action object used in signalling that a patch of updates for the
3301   * latest version of the post have been received.
3302   *
3303   * @param {Object} edits Updated post fields.
3304   *
3305   * @return {Object} Action object.
3306   */
3307  
3308  function updatePost(edits) {
3309    return {
3310      type: 'UPDATE_POST',
3311      edits: edits
3312    };
3313  }
3314  /**
3315   * Returns an action object used to setup the editor state when first opening
3316   * an editor.
3317   *
3318   * @param {Object} post   Post object.
3319   *
3320   * @return {Object} Action object.
3321   */
3322  
3323  function setupEditorState(post) {
3324    return {
3325      type: 'SETUP_EDITOR_STATE',
3326      post: post
3327    };
3328  }
3329  /**
3330   * Returns an action object used in signalling that attributes of the post have
3331   * been edited.
3332   *
3333   * @param {Object} edits   Post attributes to edit.
3334   * @param {Object} options Options for the edit.
3335   *
3336   * @yield {Object} Action object or control.
3337   */
3338  
3339  function actions_editPost(edits, options) {
3340    var _ref, id, type;
3341  
3342    return regenerator_default.a.wrap(function editPost$(_context6) {
3343      while (1) {
3344        switch (_context6.prev = _context6.next) {
3345          case 0:
3346            _context6.next = 2;
3347            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getCurrentPost');
3348  
3349          case 2:
3350            _ref = _context6.sent;
3351            id = _ref.id;
3352            type = _ref.type;
3353            _context6.next = 7;
3354            return Object(external_this_wp_dataControls_["dispatch"])('core', 'editEntityRecord', 'postType', type, id, edits, options);
3355  
3356          case 7:
3357          case "end":
3358            return _context6.stop();
3359        }
3360      }
3361    }, _marked6);
3362  }
3363  /**
3364   * Returns action object produced by the updatePost creator augmented by
3365   * an optimist option that signals optimistically applying updates.
3366   *
3367   * @param {Object} edits  Updated post fields.
3368   *
3369   * @return {Object} Action object.
3370   */
3371  
3372  function __experimentalOptimisticUpdatePost(edits) {
3373    return Object(objectSpread["a" /* default */])({}, updatePost(edits), {
3374      optimist: {
3375        id: POST_UPDATE_TRANSACTION_ID
3376      }
3377    });
3378  }
3379  /**
3380   * Action generator for saving the current post in the editor.
3381   *
3382   * @param {Object} options
3383   */
3384  
3385  function savePost() {
3386    var options,
3387        edits,
3388        previousRecord,
3389        error,
3390        args,
3391        updatedRecord,
3392        _args7,
3393        _args8 = arguments;
3394  
3395    return regenerator_default.a.wrap(function savePost$(_context7) {
3396      while (1) {
3397        switch (_context7.prev = _context7.next) {
3398          case 0:
3399            options = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};
3400            _context7.next = 3;
3401            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'isEditedPostSaveable');
3402  
3403          case 3:
3404            if (_context7.sent) {
3405              _context7.next = 5;
3406              break;
3407            }
3408  
3409            return _context7.abrupt("return");
3410  
3411          case 5:
3412            _context7.next = 7;
3413            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getEditedPostContent');
3414  
3415          case 7:
3416            _context7.t0 = _context7.sent;
3417            edits = {
3418              content: _context7.t0
3419            };
3420  
3421            if (options.isAutosave) {
3422              _context7.next = 12;
3423              break;
3424            }
3425  
3426            _context7.next = 12;
3427            return Object(external_this_wp_dataControls_["dispatch"])(STORE_KEY, 'editPost', edits, {
3428              undoIgnore: true
3429            });
3430  
3431          case 12:
3432            _context7.next = 14;
3433            return __experimentalRequestPostUpdateStart(options);
3434  
3435          case 14:
3436            _context7.next = 16;
3437            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getCurrentPost');
3438  
3439          case 16:
3440            previousRecord = _context7.sent;
3441            _context7.t1 = objectSpread["a" /* default */];
3442            _context7.t2 = {
3443              id: previousRecord.id
3444            };
3445            _context7.next = 21;
3446            return Object(external_this_wp_dataControls_["select"])('core', 'getEntityRecordNonTransientEdits', 'postType', previousRecord.type, previousRecord.id);
3447  
3448          case 21:
3449            _context7.t3 = _context7.sent;
3450            _context7.t4 = edits;
3451            edits = (0, _context7.t1)(_context7.t2, _context7.t3, _context7.t4);
3452            _context7.next = 26;
3453            return Object(external_this_wp_dataControls_["dispatch"])('core', 'saveEntityRecord', 'postType', previousRecord.type, edits, options);
3454  
3455          case 26:
3456            _context7.next = 28;
3457            return __experimentalRequestPostUpdateFinish(options);
3458  
3459          case 28:
3460            _context7.next = 30;
3461            return Object(external_this_wp_dataControls_["select"])('core', 'getLastEntitySaveError', 'postType', previousRecord.type, previousRecord.id);
3462  
3463          case 30:
3464            error = _context7.sent;
3465  
3466            if (!error) {
3467              _context7.next = 38;
3468              break;
3469            }
3470  
3471            args = getNotificationArgumentsForSaveFail({
3472              post: previousRecord,
3473              edits: edits,
3474              error: error
3475            });
3476  
3477            if (!args.length) {
3478              _context7.next = 36;
3479              break;
3480            }
3481  
3482            _context7.next = 36;
3483            return external_this_wp_dataControls_["dispatch"].apply(void 0, ['core/notices', 'createErrorNotice'].concat(Object(toConsumableArray["a" /* default */])(args)));
3484  
3485          case 36:
3486            _context7.next = 53;
3487            break;
3488  
3489          case 38:
3490            _context7.next = 40;
3491            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getCurrentPost');
3492  
3493          case 40:
3494            updatedRecord = _context7.sent;
3495            _context7.t5 = getNotificationArgumentsForSaveSuccess;
3496            _context7.t6 = previousRecord;
3497            _context7.t7 = updatedRecord;
3498            _context7.next = 46;
3499            return Object(external_this_wp_dataControls_["select"])('core', 'getPostType', updatedRecord.type);
3500  
3501          case 46:
3502            _context7.t8 = _context7.sent;
3503            _context7.t9 = options;
3504            _context7.t10 = {
3505              previousPost: _context7.t6,
3506              post: _context7.t7,
3507              postType: _context7.t8,
3508              options: _context7.t9
3509            };
3510            _args7 = (0, _context7.t5)(_context7.t10);
3511  
3512            if (!_args7.length) {
3513              _context7.next = 53;
3514              break;
3515            }
3516  
3517            _context7.next = 53;
3518            return external_this_wp_dataControls_["dispatch"].apply(void 0, ['core/notices', 'createSuccessNotice'].concat(Object(toConsumableArray["a" /* default */])(_args7)));
3519  
3520          case 53:
3521          case "end":
3522            return _context7.stop();
3523        }
3524      }
3525    }, _marked7);
3526  }
3527  /**
3528   * Action generator for handling refreshing the current post.
3529   */
3530  
3531  function refreshPost() {
3532    var post, postTypeSlug, postType, newPost;
3533    return regenerator_default.a.wrap(function refreshPost$(_context8) {
3534      while (1) {
3535        switch (_context8.prev = _context8.next) {
3536          case 0:
3537            _context8.next = 2;
3538            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getCurrentPost');
3539  
3540          case 2:
3541            post = _context8.sent;
3542            _context8.next = 5;
3543            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getCurrentPostType');
3544  
3545          case 5:
3546            postTypeSlug = _context8.sent;
3547            _context8.next = 8;
3548            return Object(external_this_wp_dataControls_["select"])('core', 'getPostType', postTypeSlug);
3549  
3550          case 8:
3551            postType = _context8.sent;
3552            _context8.next = 11;
3553            return Object(external_this_wp_dataControls_["apiFetch"])({
3554              // Timestamp arg allows caller to bypass browser caching, which is
3555              // expected for this specific function.
3556              path: "/wp/v2/".concat(postType.rest_base, "/").concat(post.id) + "?context=edit&_timestamp=".concat(Date.now())
3557            });
3558  
3559          case 11:
3560            newPost = _context8.sent;
3561            _context8.next = 14;
3562            return Object(external_this_wp_dataControls_["dispatch"])(STORE_KEY, 'resetPost', newPost);
3563  
3564          case 14:
3565          case "end":
3566            return _context8.stop();
3567        }
3568      }
3569    }, _marked8);
3570  }
3571  /**
3572   * Action generator for trashing the current post in the editor.
3573   */
3574  
3575  function trashPost() {
3576    var postTypeSlug, postType, post;
3577    return regenerator_default.a.wrap(function trashPost$(_context9) {
3578      while (1) {
3579        switch (_context9.prev = _context9.next) {
3580          case 0:
3581            _context9.next = 2;
3582            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getCurrentPostType');
3583  
3584          case 2:
3585            postTypeSlug = _context9.sent;
3586            _context9.next = 5;
3587            return Object(external_this_wp_dataControls_["select"])('core', 'getPostType', postTypeSlug);
3588  
3589          case 5:
3590            postType = _context9.sent;
3591            _context9.next = 8;
3592            return Object(external_this_wp_dataControls_["dispatch"])('core/notices', 'removeNotice', TRASH_POST_NOTICE_ID);
3593  
3594          case 8:
3595            _context9.prev = 8;
3596            _context9.next = 11;
3597            return Object(external_this_wp_dataControls_["select"])(STORE_KEY, 'getCurrentPost');
3598  
3599          case 11:
3600            post = _context9.sent;
3601            _context9.next = 14;
3602            return Object(external_this_wp_dataControls_["apiFetch"])({
3603              path: "/wp/v2/".concat(postType.rest_base, "/").concat(post.id),
3604              method: 'DELETE'
3605            });
3606  
3607          case 14:
3608            _context9.next = 16;
3609            return Object(external_this_wp_dataControls_["dispatch"])(STORE_KEY, 'savePost');
3610  
3611          case 16:
3612            _context9.next = 22;
3613            break;
3614  
3615          case 18:
3616            _context9.prev = 18;
3617            _context9.t0 = _context9["catch"](8);
3618            _context9.next = 22;
3619            return external_this_wp_dataControls_["dispatch"].apply(void 0, ['core/notices', 'createErrorNotice'].concat(Object(toConsumableArray["a" /* default */])(getNotificationArgumentsForTrashFail({
3620              error: _context9.t0
3621            }))));
3622  
3623          case 22:
3624          case "end":
3625            return _context9.stop();
3626        }
3627      }
3628    }, _marked9, null, [[8, 18]]);
3629  }
3630  /**
3631   * Action generator used in signalling that the post should autosave.
3632   *
3633   * @param {Object?} options Extra flags to identify the autosave.
3634   */
3635  
3636  function actions_autosave(options) {
3637    return regenerator_default.a.wrap(function autosave$(_context10) {
3638      while (1) {
3639        switch (_context10.prev = _context10.next) {
3640          case 0:
3641            _context10.next = 2;
3642            return Object(external_this_wp_dataControls_["dispatch"])(STORE_KEY, 'savePost', Object(objectSpread["a" /* default */])({
3643              isAutosave: true
3644            }, options));
3645  
3646          case 2:
3647          case "end":
3648            return _context10.stop();
3649        }
3650      }
3651    }, _marked10);
3652  }
3653  /**
3654   * Returns an action object used in signalling that undo history should
3655   * restore last popped state.
3656   *
3657   * @yield {Object} Action object.
3658   */
3659  
3660  function actions_redo() {
3661    return regenerator_default.a.wrap(function redo$(_context11) {
3662      while (1) {
3663        switch (_context11.prev = _context11.next) {
3664          case 0:
3665            _context11.next = 2;
3666            return Object(external_this_wp_dataControls_["dispatch"])('core', 'redo');
3667  
3668          case 2:
3669          case "end":
3670            return _context11.stop();
3671        }
3672      }
3673    }, _marked11);
3674  }
3675  /**
3676   * Returns an action object used in signalling that undo history should pop.
3677   *
3678   * @yield {Object} Action object.
3679   */
3680  
3681  function actions_undo() {
3682    return regenerator_default.a.wrap(function undo$(_context12) {
3683      while (1) {
3684        switch (_context12.prev = _context12.next) {
3685          case 0:
3686            _context12.next = 2;
3687            return Object(external_this_wp_dataControls_["dispatch"])('core', 'undo');
3688  
3689          case 2:
3690          case "end":
3691            return _context12.stop();
3692        }
3693      }
3694    }, _marked12);
3695  }
3696  /**
3697   * Returns an action object used in signalling that undo history record should
3698   * be created.
3699   *
3700   * @return {Object} Action object.
3701   */
3702  
3703  function createUndoLevel() {
3704    return {
3705      type: 'CREATE_UNDO_LEVEL'
3706    };
3707  }
3708  /**
3709   * Returns an action object used to lock the editor.
3710   *
3711   * @param {Object}  lock Details about the post lock status, user, and nonce.
3712   *
3713   * @return {Object} Action object.
3714   */
3715  
3716  function updatePostLock(lock) {
3717    return {
3718      type: 'UPDATE_POST_LOCK',
3719      lock: lock
3720    };
3721  }
3722  /**
3723   * Returns an action object used to fetch a single reusable block or all
3724   * reusable blocks from the REST API into the store.
3725   *
3726   * @param {?string} id If given, only a single reusable block with this ID will
3727   *                     be fetched.
3728   *
3729   * @return {Object} Action object.
3730   */
3731  
3732  function __experimentalFetchReusableBlocks(id) {
3733    return {
3734      type: 'FETCH_REUSABLE_BLOCKS',
3735      id: id
3736    };
3737  }
3738  /**
3739   * Returns an action object used in signalling that reusable blocks have been
3740   * received. `results` is an array of objects containing:
3741   *  - `reusableBlock` - Details about how the reusable block is persisted.
3742   *  - `parsedBlock` - The original block.
3743   *
3744   * @param {Object[]} results Reusable blocks received.
3745   *
3746   * @return {Object} Action object.
3747   */
3748  
3749  function __experimentalReceiveReusableBlocks(results) {
3750    return {
3751      type: 'RECEIVE_REUSABLE_BLOCKS',
3752      results: results
3753    };
3754  }
3755  /**
3756   * Returns an action object used to save a reusable block that's in the store to
3757   * the REST API.
3758   *
3759   * @param {Object} id The ID of the reusable block to save.
3760   *
3761   * @return {Object} Action object.
3762   */
3763  
3764  function __experimentalSaveReusableBlock(id) {
3765    return {
3766      type: 'SAVE_REUSABLE_BLOCK',
3767      id: id
3768    };
3769  }
3770  /**
3771   * Returns an action object used to delete a reusable block via the REST API.
3772   *
3773   * @param {number} id The ID of the reusable block to delete.
3774   *
3775   * @return {Object} Action object.
3776   */
3777  
3778  function __experimentalDeleteReusableBlock(id) {
3779    return {
3780      type: 'DELETE_REUSABLE_BLOCK',
3781      id: id
3782    };
3783  }
3784  /**
3785   * Returns an action object used in signalling that a reusable block is
3786   * to be updated.
3787   *
3788   * @param {number} id      The ID of the reusable block to update.
3789   * @param {Object} changes The changes to apply.
3790   *
3791   * @return {Object} Action object.
3792   */
3793  
3794  function __experimentalUpdateReusableBlock(id, changes) {
3795    return {
3796      type: 'UPDATE_REUSABLE_BLOCK',
3797      id: id,
3798      changes: changes
3799    };
3800  }
3801  /**
3802   * Returns an action object used to convert a reusable block into a static
3803   * block.
3804   *
3805   * @param {string} clientId The client ID of the block to attach.
3806   *
3807   * @return {Object} Action object.
3808   */
3809  
3810  function __experimentalConvertBlockToStatic(clientId) {
3811    return {
3812      type: 'CONVERT_BLOCK_TO_STATIC',
3813      clientId: clientId
3814    };
3815  }
3816  /**
3817   * Returns an action object used to convert a static block into a reusable
3818   * block.
3819   *
3820   * @param {string} clientIds The client IDs of the block to detach.
3821   *
3822   * @return {Object} Action object.
3823   */
3824  
3825  function __experimentalConvertBlockToReusable(clientIds) {
3826    return {
3827      type: 'CONVERT_BLOCK_TO_REUSABLE',
3828      clientIds: Object(external_lodash_["castArray"])(clientIds)
3829    };
3830  }
3831  /**
3832   * Returns an action object used in signalling that the user has enabled the
3833   * publish sidebar.
3834   *
3835   * @return {Object} Action object
3836   */
3837  
3838  function enablePublishSidebar() {
3839    return {
3840      type: 'ENABLE_PUBLISH_SIDEBAR'
3841    };
3842  }
3843  /**
3844   * Returns an action object used in signalling that the user has disabled the
3845   * publish sidebar.
3846   *
3847   * @return {Object} Action object
3848   */
3849  
3850  function disablePublishSidebar() {
3851    return {
3852      type: 'DISABLE_PUBLISH_SIDEBAR'
3853    };
3854  }
3855  /**
3856   * Returns an action object used to signal that post saving is locked.
3857   *
3858   * @param  {string} lockName The lock name.
3859   *
3860   * @example
3861   * ```
3862   * const { subscribe } = wp.data;
3863   *
3864   * const initialPostStatus = wp.data.select( 'core/editor' ).getEditedPostAttribute( 'status' );
3865   *
3866   * // Only allow publishing posts that are set to a future date.
3867   * if ( 'publish' !== initialPostStatus ) {
3868   *
3869   *     // Track locking.
3870   *     let locked = false;
3871   *
3872   *     // Watch for the publish event.
3873   *     let unssubscribe = subscribe( () => {
3874   *         const currentPostStatus = wp.data.select( 'core/editor' ).getEditedPostAttribute( 'status' );
3875   *         if ( 'publish' !== currentPostStatus ) {
3876   *
3877   *             // Compare the post date to the current date, lock the post if the date isn't in the future.
3878   *             const postDate = new Date( wp.data.select( 'core/editor' ).getEditedPostAttribute( 'date' ) );
3879   *             const currentDate = new Date();
3880   *             if ( postDate.getTime() <= currentDate.getTime() ) {
3881   *                 if ( ! locked ) {
3882   *                     locked = true;
3883   *                     wp.data.dispatch( 'core/editor' ).lockPostSaving( 'futurelock' );
3884   *                 }
3885   *             } else {
3886   *                 if ( locked ) {
3887   *                     locked = false;
3888   *                     wp.data.dispatch( 'core/editor' ).unlockPostSaving( 'futurelock' );
3889   *                 }
3890   *             }
3891   *         }
3892   *     } );
3893   * }
3894   * ```
3895   *
3896   * @return {Object} Action object
3897   */
3898  
3899  function lockPostSaving(lockName) {
3900    return {
3901      type: 'LOCK_POST_SAVING',
3902      lockName: lockName
3903    };
3904  }
3905  /**
3906   * Returns an action object used to signal that post saving is unlocked.
3907   *
3908   * @param  {string} lockName The lock name.
3909   *
3910   * @example
3911   * ```
3912   * // Unlock post saving with the lock key `mylock`:
3913   * wp.data.dispatch( 'core/editor' ).unlockPostSaving( 'mylock' );
3914   * ```
3915   *
3916   * @return {Object} Action object
3917   */
3918  
3919  function unlockPostSaving(lockName) {
3920    return {
3921      type: 'UNLOCK_POST_SAVING',
3922      lockName: lockName
3923    };
3924  }
3925  /**
3926   * Returns an action object used to signal that the blocks have been updated.
3927   *
3928   * @param {Array}   blocks  Block Array.
3929   * @param {?Object} options Optional options.
3930   *
3931   * @yield {Object} Action object
3932   */
3933  
3934  function actions_resetEditorBlocks(blocks) {
3935    var options,
3936        lastBlockAttributesChange,
3937        updatedSources,
3938        updatedBlockTypes,
3939        _i3,
3940        _Object$entries2,
3941        _Object$entries2$_i,
3942        clientId,
3943        attributes,
3944        blockName,
3945        blockType,
3946        _i4,
3947        _Object$entries3,
3948        _Object$entries3$_i,
3949        _attributeName,
3950        newAttributeValue,
3951        _schema,
3952        source,
3953        edits,
3954        _args14 = arguments;
3955  
3956    return regenerator_default.a.wrap(function resetEditorBlocks$(_context13) {
3957      while (1) {
3958        switch (_context13.prev = _context13.next) {
3959          case 0:
3960            options = _args14.length > 1 && _args14[1] !== undefined ? _args14[1] : {};
3961            _context13.next = 3;
3962            return Object(external_this_wp_dataControls_["select"])('core/block-editor', '__experimentalGetLastBlockAttributeChanges');
3963  
3964          case 3:
3965            lastBlockAttributesChange = _context13.sent;
3966  
3967            if (!lastBlockAttributesChange) {
3968              _context13.next = 36;
3969              break;
3970            }
3971  
3972            updatedSources = new Set();
3973            updatedBlockTypes = new Set();
3974            _i3 = 0, _Object$entries2 = Object.entries(lastBlockAttributesChange);
3975  
3976          case 8:
3977            if (!(_i3 < _Object$entries2.length)) {
3978              _context13.next = 35;
3979              break;
3980            }
3981  
3982            _Object$entries2$_i = Object(slicedToArray["a" /* default */])(_Object$entries2[_i3], 2), clientId = _Object$entries2$_i[0], attributes = _Object$entries2$_i[1];
3983            _context13.next = 12;
3984            return Object(external_this_wp_dataControls_["select"])('core/block-editor', 'getBlockName', clientId);
3985  
3986          case 12:
3987            blockName = _context13.sent;
3988  
3989            if (!updatedBlockTypes.has(blockName)) {
3990              _context13.next = 15;
3991              break;
3992            }
3993  
3994            return _context13.abrupt("continue", 32);
3995  
3996          case 15:
3997            updatedBlockTypes.add(blockName);
3998            _context13.next = 18;
3999            return Object(external_this_wp_dataControls_["select"])('core/blocks', 'getBlockType', blockName);
4000  
4001          case 18:
4002            blockType = _context13.sent;
4003            _i4 = 0, _Object$entries3 = Object.entries(attributes);
4004  
4005          case 20:
4006            if (!(_i4 < _Object$entries3.length)) {
4007              _context13.next = 32;
4008              break;
4009            }
4010  
4011            _Object$entries3$_i = Object(slicedToArray["a" /* default */])(_Object$entries3[_i4], 2), _attributeName = _Object$entries3$_i[0], newAttributeValue = _Object$entries3$_i[1];
4012  
4013            if (blockType.attributes.hasOwnProperty(_attributeName)) {
4014              _context13.next = 24;
4015              break;
4016            }
4017  
4018            return _context13.abrupt("continue", 29);
4019  
4020          case 24:
4021            _schema = blockType.attributes[_attributeName];
4022            source = block_sources_namespaceObject[_schema.source];
4023  
4024            if (!(source && source.update)) {
4025              _context13.next = 29;
4026              break;
4027            }
4028  
4029            return _context13.delegateYield(source.update(_schema, newAttributeValue), "t0", 28);
4030  
4031          case 28:
4032            updatedSources.add(source);
4033  
4034          case 29:
4035            _i4++;
4036            _context13.next = 20;
4037            break;
4038  
4039          case 32:
4040            _i3++;
4041            _context13.next = 8;
4042            break;
4043  
4044          case 35:
4045            return _context13.delegateYield(resetLastBlockSourceDependencies(Array.from(updatedSources)), "t1", 36);
4046  
4047          case 36:
4048            return _context13.delegateYield(getBlocksWithSourcedAttributes(blocks), "t2", 37);
4049  
4050          case 37:
4051            _context13.t3 = _context13.t2;
4052            edits = {
4053              blocks: _context13.t3
4054            };
4055  
4056            if (options.__unstableShouldCreateUndoLevel !== false) {
4057              // We create a new function here on every persistent edit
4058              // to make sure the edit makes the post dirty and creates
4059              // a new undo level.
4060              edits.content = function (_ref2) {
4061                var _ref2$blocks = _ref2.blocks,
4062                    blocksForSerialization = _ref2$blocks === void 0 ? [] : _ref2$blocks;
4063                return serialize_blocks(blocksForSerialization);
4064              };
4065            }
4066  
4067            return _context13.delegateYield(actions_editPost(edits), "t4", 41);
4068  
4069          case 41:
4070          case "end":
4071            return _context13.stop();
4072        }
4073      }
4074    }, _marked13);
4075  }
4076  /*
4077   * Returns an action object used in signalling that the post editor settings have been updated.
4078   *
4079   * @param {Object} settings Updated settings
4080   *
4081   * @return {Object} Action object
4082   */
4083  
4084  function updateEditorSettings(settings) {
4085    return {
4086      type: 'UPDATE_EDITOR_SETTINGS',
4087      settings: settings
4088    };
4089  }
4090  /**
4091   * Backward compatibility
4092   */
4093  
4094  var actions_getBlockEditorAction = function getBlockEditorAction(name) {
4095    return (
4096      /*#__PURE__*/
4097      regenerator_default.a.mark(function _callee() {
4098        var _len,
4099            args,
4100            _key,
4101            _args15 = arguments;
4102  
4103        return regenerator_default.a.wrap(function _callee$(_context14) {
4104          while (1) {
4105            switch (_context14.prev = _context14.next) {
4106              case 0:
4107                external_this_wp_deprecated_default()('`wp.data.dispatch( \'core/editor\' ).' + name + '`', {
4108                  alternative: '`wp.data.dispatch( \'core/block-editor\' ).' + name + '`'
4109                });
4110  
4111                for (_len = _args15.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
4112                  args[_key] = _args15[_key];
4113                }
4114  
4115                _context14.next = 4;
4116                return external_this_wp_dataControls_["dispatch"].apply(void 0, ['core/block-editor', name].concat(args));
4117  
4118              case 4:
4119              case "end":
4120                return _context14.stop();
4121            }
4122          }
4123        }, _callee);
4124      })
4125    );
4126  };
4127  /**
4128   * @see resetBlocks in core/block-editor store.
4129   */
4130  
4131  
4132  var resetBlocks = actions_getBlockEditorAction('resetBlocks');
4133  /**
4134   * @see receiveBlocks in core/block-editor store.
4135   */
4136  
4137  var receiveBlocks = actions_getBlockEditorAction('receiveBlocks');
4138  /**
4139   * @see updateBlock in core/block-editor store.
4140   */
4141  
4142  var updateBlock = actions_getBlockEditorAction('updateBlock');
4143  /**
4144   * @see updateBlockAttributes in core/block-editor store.
4145   */
4146  
4147  var updateBlockAttributes = actions_getBlockEditorAction('updateBlockAttributes');
4148  /**
4149   * @see selectBlock in core/block-editor store.
4150   */
4151  
4152  var selectBlock = actions_getBlockEditorAction('selectBlock');
4153  /**
4154   * @see startMultiSelect in core/block-editor store.
4155   */
4156  
4157  var startMultiSelect = actions_getBlockEditorAction('startMultiSelect');
4158  /**
4159   * @see stopMultiSelect in core/block-editor store.
4160   */
4161  
4162  var stopMultiSelect = actions_getBlockEditorAction('stopMultiSelect');
4163  /**
4164   * @see multiSelect in core/block-editor store.
4165   */
4166  
4167  var multiSelect = actions_getBlockEditorAction('multiSelect');
4168  /**
4169   * @see clearSelectedBlock in core/block-editor store.
4170   */
4171  
4172  var clearSelectedBlock = actions_getBlockEditorAction('clearSelectedBlock');
4173  /**
4174   * @see toggleSelection in core/block-editor store.
4175   */
4176  
4177  var toggleSelection = actions_getBlockEditorAction('toggleSelection');
4178  /**
4179   * @see replaceBlocks in core/block-editor store.
4180   */
4181  
4182  var actions_replaceBlocks = actions_getBlockEditorAction('replaceBlocks');
4183  /**
4184   * @see replaceBlock in core/block-editor store.
4185   */
4186  
4187  var replaceBlock = actions_getBlockEditorAction('replaceBlock');
4188  /**
4189   * @see moveBlocksDown in core/block-editor store.
4190   */
4191  
4192  var moveBlocksDown = actions_getBlockEditorAction('moveBlocksDown');
4193  /**
4194   * @see moveBlocksUp in core/block-editor store.
4195   */
4196  
4197  var moveBlocksUp = actions_getBlockEditorAction('moveBlocksUp');
4198  /**
4199   * @see moveBlockToPosition in core/block-editor store.
4200   */
4201  
4202  var moveBlockToPosition = actions_getBlockEditorAction('moveBlockToPosition');
4203  /**
4204   * @see insertBlock in core/block-editor store.
4205   */
4206  
4207  var insertBlock = actions_getBlockEditorAction('insertBlock');
4208  /**
4209   * @see insertBlocks in core/block-editor store.
4210   */
4211  
4212  var insertBlocks = actions_getBlockEditorAction('insertBlocks');
4213  /**
4214   * @see showInsertionPoint in core/block-editor store.
4215   */
4216  
4217  var showInsertionPoint = actions_getBlockEditorAction('showInsertionPoint');
4218  /**
4219   * @see hideInsertionPoint in core/block-editor store.
4220   */
4221  
4222  var hideInsertionPoint = actions_getBlockEditorAction('hideInsertionPoint');
4223  /**
4224   * @see setTemplateValidity in core/block-editor store.
4225   */
4226  
4227  var setTemplateValidity = actions_getBlockEditorAction('setTemplateValidity');
4228  /**
4229   * @see synchronizeTemplate in core/block-editor store.
4230   */
4231  
4232  var synchronizeTemplate = actions_getBlockEditorAction('synchronizeTemplate');
4233  /**
4234   * @see mergeBlocks in core/block-editor store.
4235   */
4236  
4237  var mergeBlocks = actions_getBlockEditorAction('mergeBlocks');
4238  /**
4239   * @see removeBlocks in core/block-editor store.
4240   */
4241  
4242  var actions_removeBlocks = actions_getBlockEditorAction('removeBlocks');
4243  /**
4244   * @see removeBlock in core/block-editor store.
4245   */
4246  
4247  var removeBlock = actions_getBlockEditorAction('removeBlock');
4248  /**
4249   * @see toggleBlockMode in core/block-editor store.
4250   */
4251  
4252  var toggleBlockMode = actions_getBlockEditorAction('toggleBlockMode');
4253  /**
4254   * @see startTyping in core/block-editor store.
4255   */
4256  
4257  var startTyping = actions_getBlockEditorAction('startTyping');
4258  /**
4259   * @see stopTyping in core/block-editor store.
4260   */
4261  
4262  var stopTyping = actions_getBlockEditorAction('stopTyping');
4263  /**
4264   * @see enterFormattedText in core/block-editor store.
4265   */
4266  
4267  var enterFormattedText = actions_getBlockEditorAction('enterFormattedText');
4268  /**
4269   * @see exitFormattedText in core/block-editor store.
4270   */
4271  
4272  var exitFormattedText = actions_getBlockEditorAction('exitFormattedText');
4273  /**
4274   * @see insertDefaultBlock in core/block-editor store.
4275   */
4276  
4277  var insertDefaultBlock = actions_getBlockEditorAction('insertDefaultBlock');
4278  /**
4279   * @see updateBlockListSettings in core/block-editor store.
4280   */
4281  
4282  var updateBlockListSettings = actions_getBlockEditorAction('updateBlockListSettings');
4283  
4284  // EXTERNAL MODULE: ./node_modules/rememo/es/rememo.js
4285  var rememo = __webpack_require__(35);
4286  
4287  // EXTERNAL MODULE: external {"this":["wp","date"]}
4288  var external_this_wp_date_ = __webpack_require__(56);
4289  
4290  // EXTERNAL MODULE: external {"this":["wp","url"]}
4291  var external_this_wp_url_ = __webpack_require__(26);
4292  
4293  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/selectors.js
4294  
4295  
4296  
4297  /**
4298   * External dependencies
4299   */
4300  
4301  
4302  /**
4303   * WordPress dependencies
4304   */
4305  
4306  
4307  
4308  
4309  
4310  
4311  /**
4312   * Internal dependencies
4313   */
4314  
4315  
4316  
4317  
4318  
4319  /**
4320   * Shared reference to an empty object for cases where it is important to avoid
4321   * returning a new object reference on every invocation, as in a connected or
4322   * other pure component which performs `shouldComponentUpdate` check on props.
4323   * This should be used as a last resort, since the normalized data should be
4324   * maintained by the reducer result in state.
4325   */
4326  
4327  var EMPTY_OBJECT = {};
4328  /**
4329   * Shared reference to an empty array for cases where it is important to avoid
4330   * returning a new array reference on every invocation, as in a connected or
4331   * other pure component which performs `shouldComponentUpdate` check on props.
4332   * This should be used as a last resort, since the normalized data should be
4333   * maintained by the reducer result in state.
4334   */
4335  
4336  var EMPTY_ARRAY = [];
4337  /**
4338   * Returns true if any past editor history snapshots exist, or false otherwise.
4339   *
4340   * @param {Object} state Global application state.
4341   *
4342   * @return {boolean} Whether undo history exists.
4343   */
4344  
4345  var hasEditorUndo = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
4346    return function () {
4347      return select('core').hasUndo();
4348    };
4349  });
4350  /**
4351   * Returns true if any future editor history snapshots exist, or false
4352   * otherwise.
4353   *
4354   * @param {Object} state Global application state.
4355   *
4356   * @return {boolean} Whether redo history exists.
4357   */
4358  
4359  var hasEditorRedo = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
4360    return function () {
4361      return select('core').hasRedo();
4362    };
4363  });
4364  /**
4365   * Returns true if the currently edited post is yet to be saved, or false if
4366   * the post has been saved.
4367   *
4368   * @param {Object} state Global application state.
4369   *
4370   * @return {boolean} Whether the post is new.
4371   */
4372  
4373  function selectors_isEditedPostNew(state) {
4374    return selectors_getCurrentPost(state).status === 'auto-draft';
4375  }
4376  /**
4377   * Returns true if content includes unsaved changes, or false otherwise.
4378   *
4379   * @param {Object} state Editor state.
4380   *
4381   * @return {boolean} Whether content includes unsaved changes.
4382   */
4383  
4384  function hasChangedContent(state) {
4385    var edits = getPostEdits(state);
4386    return 'blocks' in edits || // `edits` is intended to contain only values which are different from
4387    // the saved post, so the mere presence of a property is an indicator
4388    // that the value is different than what is known to be saved. While
4389    // content in Visual mode is represented by the blocks state, in Text
4390    // mode it is tracked by `edits.content`.
4391    'content' in edits;
4392  }
4393  /**
4394   * Returns true if there are unsaved values for the current edit session, or
4395   * false if the editing state matches the saved or new post.
4396   *
4397   * @param {Object} state Global application state.
4398   *
4399   * @return {boolean} Whether unsaved values exist.
4400   */
4401  
4402  var selectors_isEditedPostDirty = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
4403    return function (state) {
4404      // Edits should contain only fields which differ from the saved post (reset
4405      // at initial load and save complete). Thus, a non-empty edits state can be
4406      // inferred to contain unsaved values.
4407      var postType = selectors_getCurrentPostType(state);
4408      var postId = selectors_getCurrentPostId(state);
4409  
4410      if (select('core').hasEditsForEntityRecord('postType', postType, postId)) {
4411        return true;
4412      }
4413  
4414      return false;
4415    };
4416  });
4417  /**
4418   * Returns true if there are no unsaved values for the current edit session and
4419   * if the currently edited post is new (has never been saved before).
4420   *
4421   * @param {Object} state Global application state.
4422   *
4423   * @return {boolean} Whether new post and unsaved values exist.
4424   */
4425  
4426  function selectors_isCleanNewPost(state) {
4427    return !selectors_isEditedPostDirty(state) && selectors_isEditedPostNew(state);
4428  }
4429  /**
4430   * Returns the post currently being edited in its last known saved state, not
4431   * including unsaved edits. Returns an object containing relevant default post
4432   * values if the post has not yet been saved.
4433   *
4434   * @param {Object} state Global application state.
4435   *
4436   * @return {Object} Post object.
4437   */
4438  
4439  var selectors_getCurrentPost = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
4440    return function (state) {
4441      var postId = selectors_getCurrentPostId(state);
4442      var postType = selectors_getCurrentPostType(state);
4443      var post = select('core').getRawEntityRecord('postType', postType, postId);
4444  
4445      if (post) {
4446        return post;
4447      } // This exists for compatibility with the previous selector behavior
4448      // which would guarantee an object return based on the editor reducer's
4449      // default empty object state.
4450  
4451  
4452      return EMPTY_OBJECT;
4453    };
4454  });
4455  /**
4456   * Returns the post type of the post currently being edited.
4457   *
4458   * @param {Object} state Global application state.
4459   *
4460   * @return {string} Post type.
4461   */
4462  
4463  function selectors_getCurrentPostType(state) {
4464    return state.postType;
4465  }
4466  /**
4467   * Returns the ID of the post currently being edited, or null if the post has
4468   * not yet been saved.
4469   *
4470   * @param {Object} state Global application state.
4471   *
4472   * @return {?number} ID of current post.
4473   */
4474  
4475  function selectors_getCurrentPostId(state) {
4476    return state.postId;
4477  }
4478  /**
4479   * Returns the number of revisions of the post currently being edited.
4480   *
4481   * @param {Object} state Global application state.
4482   *
4483   * @return {number} Number of revisions.
4484   */
4485  
4486  function getCurrentPostRevisionsCount(state) {
4487    return Object(external_lodash_["get"])(selectors_getCurrentPost(state), ['_links', 'version-history', 0, 'count'], 0);
4488  }
4489  /**
4490   * Returns the last revision ID of the post currently being edited,
4491   * or null if the post has no revisions.
4492   *
4493   * @param {Object} state Global application state.
4494   *
4495   * @return {?number} ID of the last revision.
4496   */
4497  
4498  function getCurrentPostLastRevisionId(state) {
4499    return Object(external_lodash_["get"])(selectors_getCurrentPost(state), ['_links', 'predecessor-version', 0, 'id'], null);
4500  }
4501  /**
4502   * Returns any post values which have been changed in the editor but not yet
4503   * been saved.
4504   *
4505   * @param {Object} state Global application state.
4506   *
4507   * @return {Object} Object of key value pairs comprising unsaved edits.
4508   */
4509  
4510  var getPostEdits = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
4511    return function (state) {
4512      var postType = selectors_getCurrentPostType(state);
4513      var postId = selectors_getCurrentPostId(state);
4514      return select('core').getEntityRecordEdits('postType', postType, postId) || EMPTY_OBJECT;
4515    };
4516  });
4517  /**
4518   * Returns an attribute value of the saved post.
4519   *
4520   * @param {Object} state         Global application state.
4521   * @param {string} attributeName Post attribute name.
4522   *
4523   * @return {*} Post attribute value.
4524   */
4525  
4526  function selectors_getCurrentPostAttribute(state, attributeName) {
4527    switch (attributeName) {
4528      case 'type':
4529        return selectors_getCurrentPostType(state);
4530  
4531      case 'id':
4532        return selectors_getCurrentPostId(state);
4533  
4534      default:
4535        var post = selectors_getCurrentPost(state);
4536  
4537        if (!post.hasOwnProperty(attributeName)) {
4538          break;
4539        }
4540  
4541        return getPostRawValue(post[attributeName]);
4542    }
4543  }
4544  /**
4545   * Returns a single attribute of the post being edited, preferring the unsaved
4546   * edit if one exists, but merging with the attribute value for the last known
4547   * saved state of the post (this is needed for some nested attributes like meta).
4548   *
4549   * @param {Object} state         Global application state.
4550   * @param {string} attributeName Post attribute name.
4551   *
4552   * @return {*} Post attribute value.
4553   */
4554  
4555  var selectors_getNestedEditedPostProperty = function getNestedEditedPostProperty(state, attributeName) {
4556    var edits = getPostEdits(state);
4557  
4558    if (!edits.hasOwnProperty(attributeName)) {
4559      return selectors_getCurrentPostAttribute(state, attributeName);
4560    }
4561  
4562    return Object(objectSpread["a" /* default */])({}, selectors_getCurrentPostAttribute(state, attributeName), edits[attributeName]);
4563  };
4564  /**
4565   * Returns a single attribute of the post being edited, preferring the unsaved
4566   * edit if one exists, but falling back to the attribute for the last known
4567   * saved state of the post.
4568   *
4569   * @param {Object} state         Global application state.
4570   * @param {string} attributeName Post attribute name.
4571   *
4572   * @return {*} Post attribute value.
4573   */
4574  
4575  
4576  function selectors_getEditedPostAttribute(state, attributeName) {
4577    // Special cases
4578    switch (attributeName) {
4579      case 'content':
4580        return getEditedPostContent(state);
4581    } // Fall back to saved post value if not edited.
4582  
4583  
4584    var edits = getPostEdits(state);
4585  
4586    if (!edits.hasOwnProperty(attributeName)) {
4587      return selectors_getCurrentPostAttribute(state, attributeName);
4588    } // Merge properties are objects which contain only the patch edit in state,
4589    // and thus must be merged with the current post attribute.
4590  
4591  
4592    if (EDIT_MERGE_PROPERTIES.has(attributeName)) {
4593      return selectors_getNestedEditedPostProperty(state, attributeName);
4594    }
4595  
4596    return edits[attributeName];
4597  }
4598  /**
4599   * Returns an attribute value of the current autosave revision for a post, or
4600   * null if there is no autosave for the post.
4601   *
4602   * @deprecated since 5.6. Callers should use the `getAutosave( postType, postId, userId )` selector
4603   *                from the '@wordpress/core-data' package and access properties on the returned
4604   *                autosave object using getPostRawValue.
4605   *
4606   * @param {Object} state         Global application state.
4607   * @param {string} attributeName Autosave attribute name.
4608   *
4609   * @return {*} Autosave attribute value.
4610   */
4611  
4612  var getAutosaveAttribute = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
4613    return function (state, attributeName) {
4614      if (!Object(external_lodash_["includes"])(AUTOSAVE_PROPERTIES, attributeName) && attributeName !== 'preview_link') {
4615        return;
4616      }
4617  
4618      var postType = selectors_getCurrentPostType(state);
4619      var postId = selectors_getCurrentPostId(state);
4620      var currentUserId = Object(external_lodash_["get"])(select('core').getCurrentUser(), ['id']);
4621      var autosave = select('core').getAutosave(postType, postId, currentUserId);
4622  
4623      if (autosave) {
4624        return getPostRawValue(autosave[attributeName]);
4625      }
4626    };
4627  });
4628  /**
4629   * Returns the current visibility of the post being edited, preferring the
4630   * unsaved value if different than the saved post. The return value is one of
4631   * "private", "password", or "public".
4632   *
4633   * @param {Object} state Global application state.
4634   *
4635   * @return {string} Post visibility.
4636   */
4637  
4638  function selectors_getEditedPostVisibility(state) {
4639    var status = selectors_getEditedPostAttribute(state, 'status');
4640  
4641    if (status === 'private') {
4642      return 'private';
4643    }
4644  
4645    var password = selectors_getEditedPostAttribute(state, 'password');
4646  
4647    if (password) {
4648      return 'password';
4649    }
4650  
4651    return 'public';
4652  }
4653  /**
4654   * Returns true if post is pending review.
4655   *
4656   * @param {Object} state Global application state.
4657   *
4658   * @return {boolean} Whether current post is pending review.
4659   */
4660  
4661  function isCurrentPostPending(state) {
4662    return selectors_getCurrentPost(state).status === 'pending';
4663  }
4664  /**
4665   * Return true if the current post has already been published.
4666   *
4667   * @param {Object}  state       Global application state.
4668   * @param {Object?} currentPost Explicit current post for bypassing registry selector.
4669   *
4670   * @return {boolean} Whether the post has been published.
4671   */
4672  
4673  function selectors_isCurrentPostPublished(state, currentPost) {
4674    var post = currentPost || selectors_getCurrentPost(state);
4675    return ['publish', 'private'].indexOf(post.status) !== -1 || post.status === 'future' && !Object(external_this_wp_date_["isInTheFuture"])(new Date(Number(Object(external_this_wp_date_["getDate"])(post.date)) - ONE_MINUTE_IN_MS));
4676  }
4677  /**
4678   * Returns true if post is already scheduled.
4679   *
4680   * @param {Object} state Global application state.
4681   *
4682   * @return {boolean} Whether current post is scheduled to be posted.
4683   */
4684  
4685  function selectors_isCurrentPostScheduled(state) {
4686    return selectors_getCurrentPost(state).status === 'future' && !selectors_isCurrentPostPublished(state);
4687  }
4688  /**
4689   * Return true if the post being edited can be published.
4690   *
4691   * @param {Object} state Global application state.
4692   *
4693   * @return {boolean} Whether the post can been published.
4694   */
4695  
4696  function selectors_isEditedPostPublishable(state) {
4697    var post = selectors_getCurrentPost(state); // TODO: Post being publishable should be superset of condition of post
4698    // being saveable. Currently this restriction is imposed at UI.
4699    //
4700    //  See: <PostPublishButton /> (`isButtonEnabled` assigned by `isSaveable`)
4701  
4702    return selectors_isEditedPostDirty(state) || ['publish', 'private', 'future'].indexOf(post.status) === -1;
4703  }
4704  /**
4705   * Returns true if the post can be saved, or false otherwise. A post must
4706   * contain a title, an excerpt, or non-empty content to be valid for save.
4707   *
4708   * @param {Object} state Global application state.
4709   *
4710   * @return {boolean} Whether the post can be saved.
4711   */
4712  
4713  function selectors_isEditedPostSaveable(state) {
4714    if (selectors_isSavingPost(state)) {
4715      return false;
4716    } // TODO: Post should not be saveable if not dirty. Cannot be added here at
4717    // this time since posts where meta boxes are present can be saved even if
4718    // the post is not dirty. Currently this restriction is imposed at UI, but
4719    // should be moved here.
4720    //
4721    //  See: `isEditedPostPublishable` (includes `isEditedPostDirty` condition)
4722    //  See: <PostSavedState /> (`forceIsDirty` prop)
4723    //  See: <PostPublishButton /> (`forceIsDirty` prop)
4724    //  See: https://github.com/WordPress/gutenberg/pull/4184
4725  
4726  
4727    return !!selectors_getEditedPostAttribute(state, 'title') || !!selectors_getEditedPostAttribute(state, 'excerpt') || !isEditedPostEmpty(state);
4728  }
4729  /**
4730   * Returns true if the edited post has content. A post has content if it has at
4731   * least one saveable block or otherwise has a non-empty content property
4732   * assigned.
4733   *
4734   * @param {Object} state Global application state.
4735   *
4736   * @return {boolean} Whether post has content.
4737   */
4738  
4739  function isEditedPostEmpty(state) {
4740    // While the condition of truthy content string is sufficient to determine
4741    // emptiness, testing saveable blocks length is a trivial operation. Since
4742    // this function can be called frequently, optimize for the fast case as a
4743    // condition of the mere existence of blocks. Note that the value of edited
4744    // content takes precedent over block content, and must fall through to the
4745    // default logic.
4746    var blocks = selectors_getEditorBlocks(state);
4747  
4748    if (blocks.length) {
4749      // Pierce the abstraction of the serializer in knowing that blocks are
4750      // joined with with newlines such that even if every individual block
4751      // produces an empty save result, the serialized content is non-empty.
4752      if (blocks.length > 1) {
4753        return false;
4754      } // There are two conditions under which the optimization cannot be
4755      // assumed, and a fallthrough to getEditedPostContent must occur:
4756      //
4757      // 1. getBlocksForSerialization has special treatment in omitting a
4758      //    single unmodified default block.
4759      // 2. Comment delimiters are omitted for a freeform or unregistered
4760      //    block in its serialization. The freeform block specifically may
4761      //    produce an empty string in its saved output.
4762      //
4763      // For all other content, the single block is assumed to make a post
4764      // non-empty, if only by virtue of its own comment delimiters.
4765  
4766  
4767      var blockName = blocks[0].name;
4768  
4769      if (blockName !== Object(external_this_wp_blocks_["getDefaultBlockName"])() && blockName !== Object(external_this_wp_blocks_["getFreeformContentHandlerName"])()) {
4770        return false;
4771      }
4772    }
4773  
4774    return !getEditedPostContent(state);
4775  }
4776  /**
4777   * Returns true if the post can be autosaved, or false otherwise.
4778   *
4779   * @param {Object} state    Global application state.
4780   * @param {Object} autosave A raw autosave object from the REST API.
4781   *
4782   * @return {boolean} Whether the post can be autosaved.
4783   */
4784  
4785  var selectors_isEditedPostAutosaveable = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
4786    return function (state) {
4787      // A post must contain a title, an excerpt, or non-empty content to be valid for autosaving.
4788      if (!selectors_isEditedPostSaveable(state)) {
4789        return false;
4790      } // A post is not autosavable when there is a post autosave lock.
4791  
4792  
4793      if (isPostAutosavingLocked(state)) {
4794        return false;
4795      }
4796  
4797      var postType = selectors_getCurrentPostType(state);
4798      var postId = selectors_getCurrentPostId(state);
4799      var hasFetchedAutosave = select('core').hasFetchedAutosaves(postType, postId);
4800      var currentUserId = Object(external_lodash_["get"])(select('core').getCurrentUser(), ['id']); // Disable reason - this line causes the side-effect of fetching the autosave
4801      // via a resolver, moving below the return would result in the autosave never
4802      // being fetched.
4803      // eslint-disable-next-line @wordpress/no-unused-vars-before-return
4804  
4805      var autosave = select('core').getAutosave(postType, postId, currentUserId); // If any existing autosaves have not yet been fetched, this function is
4806      // unable to determine if the post is autosaveable, so return false.
4807  
4808      if (!hasFetchedAutosave) {
4809        return false;
4810      } // If we don't already have an autosave, the post is autosaveable.
4811  
4812  
4813      if (!autosave) {
4814        return true;
4815      } // To avoid an expensive content serialization, use the content dirtiness
4816      // flag in place of content field comparison against the known autosave.
4817      // This is not strictly accurate, and relies on a tolerance toward autosave
4818      // request failures for unnecessary saves.
4819  
4820  
4821      if (hasChangedContent(state)) {
4822        return true;
4823      } // If the title or excerpt has changed, the post is autosaveable.
4824  
4825  
4826      return ['title', 'excerpt'].some(function (field) {
4827        return getPostRawValue(autosave[field]) !== selectors_getEditedPostAttribute(state, field);
4828      });
4829    };
4830  });
4831  /**
4832   * Returns the current autosave, or null if one is not set (i.e. if the post
4833   * has yet to be autosaved, or has been saved or published since the last
4834   * autosave).
4835   *
4836   * @deprecated since 5.6. Callers should use the `getAutosave( postType, postId, userId )`
4837   *                selector from the '@wordpress/core-data' package.
4838   *
4839   * @param {Object} state Editor state.
4840   *
4841   * @return {?Object} Current autosave, if exists.
4842   */
4843  
4844  var getAutosave = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
4845    return function (state) {
4846      external_this_wp_deprecated_default()('`wp.data.select( \'core/editor\' ).getAutosave()`', {
4847        alternative: '`wp.data.select( \'core\' ).getAutosave( postType, postId, userId )`',
4848        plugin: 'Gutenberg'
4849      });
4850      var postType = selectors_getCurrentPostType(state);
4851      var postId = selectors_getCurrentPostId(state);
4852      var currentUserId = Object(external_lodash_["get"])(select('core').getCurrentUser(), ['id']);
4853      var autosave = select('core').getAutosave(postType, postId, currentUserId);
4854      return Object(external_lodash_["mapValues"])(Object(external_lodash_["pick"])(autosave, AUTOSAVE_PROPERTIES), getPostRawValue);
4855    };
4856  });
4857  /**
4858   * Returns the true if there is an existing autosave, otherwise false.
4859   *
4860   * @deprecated since 5.6. Callers should use the `getAutosave( postType, postId, userId )` selector
4861   *             from the '@wordpress/core-data' package and check for a truthy value.
4862   *
4863   * @param {Object} state Global application state.
4864   *
4865   * @return {boolean} Whether there is an existing autosave.
4866   */
4867  
4868  var hasAutosave = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
4869    return function (state) {
4870      external_this_wp_deprecated_default()('`wp.data.select( \'core/editor\' ).hasAutosave()`', {
4871        alternative: '`!! wp.data.select( \'core\' ).getAutosave( postType, postId, userId )`',
4872        plugin: 'Gutenberg'
4873      });
4874      var postType = selectors_getCurrentPostType(state);
4875      var postId = selectors_getCurrentPostId(state);
4876      var currentUserId = Object(external_lodash_["get"])(select('core').getCurrentUser(), ['id']);
4877      return !!select('core').getAutosave(postType, postId, currentUserId);
4878    };
4879  });
4880  /**
4881   * Return true if the post being edited is being scheduled. Preferring the
4882   * unsaved status values.
4883   *
4884   * @param {Object} state Global application state.
4885   *
4886   * @return {boolean} Whether the post has been published.
4887   */
4888  
4889  function selectors_isEditedPostBeingScheduled(state) {
4890    var date = selectors_getEditedPostAttribute(state, 'date'); // Offset the date by one minute (network latency)
4891  
4892    var checkedDate = new Date(Number(Object(external_this_wp_date_["getDate"])(date)) - ONE_MINUTE_IN_MS);
4893    return Object(external_this_wp_date_["isInTheFuture"])(checkedDate);
4894  }
4895  /**
4896   * Returns whether the current post should be considered to have a "floating"
4897   * date (i.e. that it would publish "Immediately" rather than at a set time).
4898   *
4899   * Unlike in the PHP backend, the REST API returns a full date string for posts
4900   * where the 0000-00-00T00:00:00 placeholder is present in the database. To
4901   * infer that a post is set to publish "Immediately" we check whether the date
4902   * and modified date are the same.
4903   *
4904   * @param {Object} state Editor state.
4905   *
4906   * @return {boolean} Whether the edited post has a floating date value.
4907   */
4908  
4909  function isEditedPostDateFloating(state) {
4910    var date = selectors_getEditedPostAttribute(state, 'date');
4911    var modified = selectors_getEditedPostAttribute(state, 'modified');
4912    var status = selectors_getEditedPostAttribute(state, 'status');
4913  
4914    if (status === 'draft' || status === 'auto-draft' || status === 'pending') {
4915      return date === modified;
4916    }
4917  
4918    return false;
4919  }
4920  /**
4921   * Returns true if the post is currently being saved, or false otherwise.
4922   *
4923   * @param {Object} state Global application state.
4924   *
4925   * @return {boolean} Whether post is being saved.
4926   */
4927  
4928  var selectors_isSavingPost = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
4929    return function (state) {
4930      var postType = selectors_getCurrentPostType(state);
4931      var postId = selectors_getCurrentPostId(state);
4932      return select('core').isSavingEntityRecord('postType', postType, postId);
4933    };
4934  });
4935  /**
4936   * Returns true if a previous post save was attempted successfully, or false
4937   * otherwise.
4938   *
4939   * @param {Object} state Global application state.
4940   *
4941   * @return {boolean} Whether the post was saved successfully.
4942   */
4943  
4944  var didPostSaveRequestSucceed = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
4945    return function (state) {
4946      var postType = selectors_getCurrentPostType(state);
4947      var postId = selectors_getCurrentPostId(state);
4948      return !select('core').getLastEntitySaveError('postType', postType, postId);
4949    };
4950  });
4951  /**
4952   * Returns true if a previous post save was attempted but failed, or false
4953   * otherwise.
4954   *
4955   * @param {Object} state Global application state.
4956   *
4957   * @return {boolean} Whether the post save failed.
4958   */
4959  
4960  var didPostSaveRequestFail = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
4961    return function (state) {
4962      var postType = selectors_getCurrentPostType(state);
4963      var postId = selectors_getCurrentPostId(state);
4964      return !!select('core').getLastEntitySaveError('postType', postType, postId);
4965    };
4966  });
4967  /**
4968   * Returns true if the post is autosaving, or false otherwise.
4969   *
4970   * @param {Object} state Global application state.
4971   *
4972   * @return {boolean} Whether the post is autosaving.
4973   */
4974  
4975  function selectors_isAutosavingPost(state) {
4976    if (!selectors_isSavingPost(state)) {
4977      return false;
4978    }
4979  
4980    return !!Object(external_lodash_["get"])(state.saving, ['options', 'isAutosave']);
4981  }
4982  /**
4983   * Returns true if the post is being previewed, or false otherwise.
4984   *
4985   * @param {Object} state Global application state.
4986   *
4987   * @return {boolean} Whether the post is being previewed.
4988   */
4989  
4990  function isPreviewingPost(state) {
4991    if (!selectors_isSavingPost(state)) {
4992      return false;
4993    }
4994  
4995    return !!state.saving.options.isPreview;
4996  }
4997  /**
4998   * Returns the post preview link
4999   *
5000   * @param {Object} state Global application state.
5001   *
5002   * @return {string?} Preview Link.
5003   */
5004  
5005  function selectors_getEditedPostPreviewLink(state) {
5006    if (state.saving.pending || selectors_isSavingPost(state)) {
5007      return;
5008    }
5009  
5010    var previewLink = getAutosaveAttribute(state, 'preview_link');
5011  
5012    if (!previewLink) {
5013      previewLink = selectors_getEditedPostAttribute(state, 'link');
5014  
5015      if (previewLink) {
5016        previewLink = Object(external_this_wp_url_["addQueryArgs"])(previewLink, {
5017          preview: true
5018        });
5019      }
5020    }
5021  
5022    var featuredImageId = selectors_getEditedPostAttribute(state, 'featured_media');
5023  
5024    if (previewLink && featuredImageId) {
5025      return Object(external_this_wp_url_["addQueryArgs"])(previewLink, {
5026        _thumbnail_id: featuredImageId
5027      });
5028    }
5029  
5030    return previewLink;
5031  }
5032  /**
5033   * Returns a suggested post format for the current post, inferred only if there
5034   * is a single block within the post and it is of a type known to match a
5035   * default post format. Returns null if the format cannot be determined.
5036   *
5037   * @param {Object} state Global application state.
5038   *
5039   * @return {?string} Suggested post format.
5040   */
5041  
5042  function selectors_getSuggestedPostFormat(state) {
5043    var blocks = selectors_getEditorBlocks(state);
5044    var name; // If there is only one block in the content of the post grab its name
5045    // so we can derive a suitable post format from it.
5046  
5047    if (blocks.length === 1) {
5048      name = blocks[0].name;
5049    } // If there are two blocks in the content and the last one is a text blocks
5050    // grab the name of the first one to also suggest a post format from it.
5051  
5052  
5053    if (blocks.length === 2) {
5054      if (blocks[1].name === 'core/paragraph') {
5055        name = blocks[0].name;
5056      }
5057    } // We only convert to default post formats in core.
5058  
5059  
5060    switch (name) {
5061      case 'core/image':
5062        return 'image';
5063  
5064      case 'core/quote':
5065      case 'core/pullquote':
5066        return 'quote';
5067  
5068      case 'core/gallery':
5069        return 'gallery';
5070  
5071      case 'core/video':
5072      case 'core-embed/youtube':
5073      case 'core-embed/vimeo':
5074        return 'video';
5075  
5076      case 'core/audio':
5077      case 'core-embed/spotify':
5078      case 'core-embed/soundcloud':
5079        return 'audio';
5080    }
5081  
5082    return null;
5083  }
5084  /**
5085   * Returns a set of blocks which are to be used in consideration of the post's
5086   * generated save content.
5087   *
5088   * @deprecated since Gutenberg 6.2.0.
5089   *
5090   * @param {Object} state Editor state.
5091   *
5092   * @return {WPBlock[]} Filtered set of blocks for save.
5093   */
5094  
5095  function getBlocksForSerialization(state) {
5096    external_this_wp_deprecated_default()('`core/editor` getBlocksForSerialization selector', {
5097      plugin: 'Gutenberg',
5098      alternative: 'getEditorBlocks',
5099      hint: 'Blocks serialization pre-processing occurs at save time'
5100    });
5101    var blocks = state.editor.present.blocks.value; // WARNING: Any changes to the logic of this function should be verified
5102    // against the implementation of isEditedPostEmpty, which bypasses this
5103    // function for performance' sake, in an assumption of this current logic
5104    // being irrelevant to the optimized condition of emptiness.
5105    // A single unmodified default block is assumed to be equivalent to an
5106    // empty post.
5107  
5108    var isSingleUnmodifiedDefaultBlock = blocks.length === 1 && Object(external_this_wp_blocks_["isUnmodifiedDefaultBlock"])(blocks[0]);
5109  
5110    if (isSingleUnmodifiedDefaultBlock) {
5111      return [];
5112    }
5113  
5114    return blocks;
5115  }
5116  /**
5117   * Returns the content of the post being edited.
5118   *
5119   * @param {Object} state Global application state.
5120   *
5121   * @return {string} Post content.
5122   */
5123  
5124  var getEditedPostContent = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
5125    return function (state) {
5126      var postId = selectors_getCurrentPostId(state);
5127      var postType = selectors_getCurrentPostType(state);
5128      var record = select('core').getEditedEntityRecord('postType', postType, postId);
5129  
5130      if (record) {
5131        if (typeof record.content === 'function') {
5132          return record.content(record);
5133        } else if (record.blocks) {
5134          return serialize_blocks(record.blocks);
5135        } else if (record.content) {
5136          return record.content;
5137        }
5138      }
5139  
5140      return '';
5141    };
5142  });
5143  /**
5144   * Returns the reusable block with the given ID.
5145   *
5146   * @param {Object}        state Global application state.
5147   * @param {number|string} ref   The reusable block's ID.
5148   *
5149   * @return {Object} The reusable block, or null if none exists.
5150   */
5151  
5152  var __experimentalGetReusableBlock = Object(rememo["a" /* default */])(function (state, ref) {
5153    var block = state.reusableBlocks.data[ref];
5154  
5155    if (!block) {
5156      return null;
5157    }
5158  
5159    var isTemporary = isNaN(parseInt(ref));
5160    return Object(objectSpread["a" /* default */])({}, block, {
5161      id: isTemporary ? ref : +ref,
5162      isTemporary: isTemporary
5163    });
5164  }, function (state, ref) {
5165    return [state.reusableBlocks.data[ref]];
5166  });
5167  /**
5168   * Returns whether or not the reusable block with the given ID is being saved.
5169   *
5170   * @param {Object} state Global application state.
5171   * @param {string} ref   The reusable block's ID.
5172   *
5173   * @return {boolean} Whether or not the reusable block is being saved.
5174   */
5175  
5176  function __experimentalIsSavingReusableBlock(state, ref) {
5177    return state.reusableBlocks.isSaving[ref] || false;
5178  }
5179  /**
5180   * Returns true if the reusable block with the given ID is being fetched, or
5181   * false otherwise.
5182   *
5183   * @param {Object} state Global application state.
5184   * @param {string} ref   The reusable block's ID.
5185   *
5186   * @return {boolean} Whether the reusable block is being fetched.
5187   */
5188  
5189  function __experimentalIsFetchingReusableBlock(state, ref) {
5190    return !!state.reusableBlocks.isFetching[ref];
5191  }
5192  /**
5193   * Returns an array of all reusable blocks.
5194   *
5195   * @param {Object} state Global application state.
5196   *
5197   * @return {Array} An array of all reusable blocks.
5198   */
5199  
5200  var selectors_experimentalGetReusableBlocks = Object(rememo["a" /* default */])(function (state) {
5201    return Object(external_lodash_["map"])(state.reusableBlocks.data, function (value, ref) {
5202      return __experimentalGetReusableBlock(state, ref);
5203    });
5204  }, function (state) {
5205    return [state.reusableBlocks.data];
5206  });
5207  /**
5208   * Returns state object prior to a specified optimist transaction ID, or `null`
5209   * if the transaction corresponding to the given ID cannot be found.
5210   *
5211   * @param {Object} state         Current global application state.
5212   * @param {Object} transactionId Optimist transaction ID.
5213   *
5214   * @return {Object} Global application state prior to transaction.
5215   */
5216  
5217  function getStateBeforeOptimisticTransaction(state, transactionId) {
5218    var transaction = Object(external_lodash_["find"])(state.optimist, function (entry) {
5219      return entry.beforeState && Object(external_lodash_["get"])(entry.action, ['optimist', 'id']) === transactionId;
5220    });
5221    return transaction ? transaction.beforeState : null;
5222  }
5223  /**
5224   * Returns true if the post is being published, or false otherwise.
5225   *
5226   * @param {Object} state Global application state.
5227   *
5228   * @return {boolean} Whether post is being published.
5229   */
5230  
5231  function selectors_isPublishingPost(state) {
5232    if (!selectors_isSavingPost(state)) {
5233      return false;
5234    } // Saving is optimistic, so assume that current post would be marked as
5235    // published if publishing
5236  
5237  
5238    if (!selectors_isCurrentPostPublished(state)) {
5239      return false;
5240    } // Use post update transaction ID to retrieve the state prior to the
5241    // optimistic transaction
5242  
5243  
5244    var stateBeforeRequest = getStateBeforeOptimisticTransaction(state, POST_UPDATE_TRANSACTION_ID); // Consider as publishing when current post prior to request was not
5245    // considered published
5246  
5247    return !!stateBeforeRequest && !selectors_isCurrentPostPublished(null, stateBeforeRequest.currentPost);
5248  }
5249  /**
5250   * Returns whether the permalink is editable or not.
5251   *
5252   * @param {Object} state Editor state.
5253   *
5254   * @return {boolean} Whether or not the permalink is editable.
5255   */
5256  
5257  function selectors_isPermalinkEditable(state) {
5258    var permalinkTemplate = selectors_getEditedPostAttribute(state, 'permalink_template');
5259    return PERMALINK_POSTNAME_REGEX.test(permalinkTemplate);
5260  }
5261  /**
5262   * Returns the permalink for the post.
5263   *
5264   * @param {Object} state Editor state.
5265   *
5266   * @return {?string} The permalink, or null if the post is not viewable.
5267   */
5268  
5269  function getPermalink(state) {
5270    var permalinkParts = selectors_getPermalinkParts(state);
5271  
5272    if (!permalinkParts) {
5273      return null;
5274    }
5275  
5276    var prefix = permalinkParts.prefix,
5277        postName = permalinkParts.postName,
5278        suffix = permalinkParts.suffix;
5279  
5280    if (selectors_isPermalinkEditable(state)) {
5281      return prefix + postName + suffix;
5282    }
5283  
5284    return prefix;
5285  }
5286  /**
5287   * Returns the permalink for a post, split into it's three parts: the prefix,
5288   * the postName, and the suffix.
5289   *
5290   * @param {Object} state Editor state.
5291   *
5292   * @return {Object} An object containing the prefix, postName, and suffix for
5293   *                  the permalink, or null if the post is not viewable.
5294   */
5295  
5296  function selectors_getPermalinkParts(state) {
5297    var permalinkTemplate = selectors_getEditedPostAttribute(state, 'permalink_template');
5298  
5299    if (!permalinkTemplate) {
5300      return null;
5301    }
5302  
5303    var postName = selectors_getEditedPostAttribute(state, 'slug') || selectors_getEditedPostAttribute(state, 'generated_slug');
5304  
5305    var _permalinkTemplate$sp = permalinkTemplate.split(PERMALINK_POSTNAME_REGEX),
5306        _permalinkTemplate$sp2 = Object(slicedToArray["a" /* default */])(_permalinkTemplate$sp, 2),
5307        prefix = _permalinkTemplate$sp2[0],
5308        suffix = _permalinkTemplate$sp2[1];
5309  
5310    return {
5311      prefix: prefix,
5312      postName: postName,
5313      suffix: suffix
5314    };
5315  }
5316  /**
5317   * Returns true if an optimistic transaction is pending commit, for which the
5318   * before state satisfies the given predicate function.
5319   *
5320   * @param {Object}   state     Editor state.
5321   * @param {Function} predicate Function given state, returning true if match.
5322   *
5323   * @return {boolean} Whether predicate matches for some history.
5324   */
5325  
5326  function inSomeHistory(state, predicate) {
5327    var optimist = state.optimist; // In recursion, optimist state won't exist. Assume exhausted options.
5328  
5329    if (!optimist) {
5330      return false;
5331    }
5332  
5333    return optimist.some(function (_ref) {
5334      var beforeState = _ref.beforeState;
5335      return beforeState && predicate(beforeState);
5336    });
5337  }
5338  /**
5339   * Returns whether the post is locked.
5340   *
5341   * @param {Object} state Global application state.
5342   *
5343   * @return {boolean} Is locked.
5344   */
5345  
5346  function isPostLocked(state) {
5347    return state.postLock.isLocked;
5348  }
5349  /**
5350   * Returns whether post saving is locked.
5351   *
5352   * @param {Object} state Global application state.
5353   *
5354   * @return {boolean} Is locked.
5355   */
5356  
5357  function selectors_isPostSavingLocked(state) {
5358    return Object.keys(state.postSavingLock).length > 0;
5359  }
5360  /**
5361   * Returns whether post autosaving is locked.
5362   *
5363   * @param {Object} state Global application state.
5364   *
5365   * @return {boolean} Is locked.
5366   */
5367  
5368  function isPostAutosavingLocked(state) {
5369    return Object.keys(state.postAutosavingLock).length > 0;
5370  }
5371  /**
5372   * Returns whether the edition of the post has been taken over.
5373   *
5374   * @param {Object} state Global application state.
5375   *
5376   * @return {boolean} Is post lock takeover.
5377   */
5378  
5379  function isPostLockTakeover(state) {
5380    return state.postLock.isTakeover;
5381  }
5382  /**
5383   * Returns details about the post lock user.
5384   *
5385   * @param {Object} state Global application state.
5386   *
5387   * @return {Object} A user object.
5388   */
5389  
5390  function getPostLockUser(state) {
5391    return state.postLock.user;
5392  }
5393  /**
5394   * Returns the active post lock.
5395   *
5396   * @param {Object} state Global application state.
5397   *
5398   * @return {Object} The lock object.
5399   */
5400  
5401  function getActivePostLock(state) {
5402    return state.postLock.activePostLock;
5403  }
5404  /**
5405   * Returns whether or not the user has the unfiltered_html capability.
5406   *
5407   * @param {Object} state Editor state.
5408   *
5409   * @return {boolean} Whether the user can or can't post unfiltered HTML.
5410   */
5411  
5412  function selectors_canUserUseUnfilteredHTML(state) {
5413    return Object(external_lodash_["has"])(selectors_getCurrentPost(state), ['_links', 'wp:action-unfiltered-html']);
5414  }
5415  /**
5416   * Returns whether the pre-publish panel should be shown
5417   * or skipped when the user clicks the "publish" button.
5418   *
5419   * @param {Object} state Global application state.
5420   *
5421   * @return {boolean} Whether the pre-publish panel should be shown or not.
5422   */
5423  
5424  function selectors_isPublishSidebarEnabled(state) {
5425    if (state.preferences.hasOwnProperty('isPublishSidebarEnabled')) {
5426      return state.preferences.isPublishSidebarEnabled;
5427    }
5428  
5429    return PREFERENCES_DEFAULTS.isPublishSidebarEnabled;
5430  }
5431  /**
5432   * Return the current block list.
5433   *
5434   * @param {Object} state
5435   * @return {Array} Block list.
5436   */
5437  
5438  function selectors_getEditorBlocks(state) {
5439    return selectors_getEditedPostAttribute(state, 'blocks') || EMPTY_ARRAY;
5440  }
5441  /**
5442   * Is the editor ready
5443   *
5444   * @param {Object} state
5445   * @return {boolean} is Ready.
5446   */
5447  
5448  function __unstableIsEditorReady(state) {
5449    return state.isReady;
5450  }
5451  /**
5452   * Returns the post editor settings.
5453   *
5454   * @param {Object} state Editor state.
5455   *
5456   * @return {Object} The editor settings object.
5457   */
5458  
5459  function selectors_getEditorSettings(state) {
5460    return state.editorSettings;
5461  }
5462  /*
5463   * Backward compatibility
5464   */
5465  
5466  function getBlockEditorSelector(name) {
5467    return Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
5468      return function (state) {
5469        var _select;
5470  
5471        external_this_wp_deprecated_default()('`wp.data.select( \'core/editor\' ).' + name + '`', {
5472          alternative: '`wp.data.select( \'core/block-editor\' ).' + name + '`'
5473        });
5474  
5475        for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
5476          args[_key - 1] = arguments[_key];
5477        }
5478  
5479        return (_select = select('core/block-editor'))[name].apply(_select, args);
5480      };
5481    });
5482  }
5483  /**
5484   * @see getBlockName in core/block-editor store.
5485   */
5486  
5487  
5488  var selectors_getBlockName = getBlockEditorSelector('getBlockName');
5489  /**
5490   * @see isBlockValid in core/block-editor store.
5491   */
5492  
5493  var isBlockValid = getBlockEditorSelector('isBlockValid');
5494  /**
5495   * @see getBlockAttributes in core/block-editor store.
5496   */
5497  
5498  var getBlockAttributes = getBlockEditorSelector('getBlockAttributes');
5499  /**
5500   * @see getBlock in core/block-editor store.
5501   */
5502  
5503  var selectors_getBlock = getBlockEditorSelector('getBlock');
5504  /**
5505   * @see getBlocks in core/block-editor store.
5506   */
5507  
5508  var selectors_getBlocks = getBlockEditorSelector('getBlocks');
5509  /**
5510   * @see __unstableGetBlockWithoutInnerBlocks in core/block-editor store.
5511   */
5512  
5513  var __unstableGetBlockWithoutInnerBlocks = getBlockEditorSelector('__unstableGetBlockWithoutInnerBlocks');
5514  /**
5515   * @see getClientIdsOfDescendants in core/block-editor store.
5516   */
5517  
5518  var getClientIdsOfDescendants = getBlockEditorSelector('getClientIdsOfDescendants');
5519  /**
5520   * @see getClientIdsWithDescendants in core/block-editor store.
5521   */
5522  
5523  var getClientIdsWithDescendants = getBlockEditorSelector('getClientIdsWithDescendants');
5524  /**
5525   * @see getGlobalBlockCount in core/block-editor store.
5526   */
5527  
5528  var getGlobalBlockCount = getBlockEditorSelector('getGlobalBlockCount');
5529  /**
5530   * @see getBlocksByClientId in core/block-editor store.
5531   */
5532  
5533  var selectors_getBlocksByClientId = getBlockEditorSelector('getBlocksByClientId');
5534  /**
5535   * @see getBlockCount in core/block-editor store.
5536   */
5537  
5538  var getBlockCount = getBlockEditorSelector('getBlockCount');
5539  /**
5540   * @see getBlockSelectionStart in core/block-editor store.
5541   */
5542  
5543  var getBlockSelectionStart = getBlockEditorSelector('getBlockSelectionStart');
5544  /**
5545   * @see getBlockSelectionEnd in core/block-editor store.
5546   */
5547  
5548  var getBlockSelectionEnd = getBlockEditorSelector('getBlockSelectionEnd');
5549  /**
5550   * @see getSelectedBlockCount in core/block-editor store.
5551   */
5552  
5553  var getSelectedBlockCount = getBlockEditorSelector('getSelectedBlockCount');
5554  /**
5555   * @see hasSelectedBlock in core/block-editor store.
5556   */
5557  
5558  var hasSelectedBlock = getBlockEditorSelector('hasSelectedBlock');
5559  /**
5560   * @see getSelectedBlockClientId in core/block-editor store.
5561   */
5562  
5563  var selectors_getSelectedBlockClientId = getBlockEditorSelector('getSelectedBlockClientId');
5564  /**
5565   * @see getSelectedBlock in core/block-editor store.
5566   */
5567  
5568  var getSelectedBlock = getBlockEditorSelector('getSelectedBlock');
5569  /**
5570   * @see getBlockRootClientId in core/block-editor store.
5571   */
5572  
5573  var getBlockRootClientId = getBlockEditorSelector('getBlockRootClientId');
5574  /**
5575   * @see getBlockHierarchyRootClientId in core/block-editor store.
5576   */
5577  
5578  var getBlockHierarchyRootClientId = getBlockEditorSelector('getBlockHierarchyRootClientId');
5579  /**
5580   * @see getAdjacentBlockClientId in core/block-editor store.
5581   */
5582  
5583  var getAdjacentBlockClientId = getBlockEditorSelector('getAdjacentBlockClientId');
5584  /**
5585   * @see getPreviousBlockClientId in core/block-editor store.
5586   */
5587  
5588  var getPreviousBlockClientId = getBlockEditorSelector('getPreviousBlockClientId');
5589  /**
5590   * @see getNextBlockClientId in core/block-editor store.
5591   */
5592  
5593  var getNextBlockClientId = getBlockEditorSelector('getNextBlockClientId');
5594  /**
5595   * @see getSelectedBlocksInitialCaretPosition in core/block-editor store.
5596   */
5597  
5598  var getSelectedBlocksInitialCaretPosition = getBlockEditorSelector('getSelectedBlocksInitialCaretPosition');
5599  /**
5600   * @see getMultiSelectedBlockClientIds in core/block-editor store.
5601   */
5602  
5603  var getMultiSelectedBlockClientIds = getBlockEditorSelector('getMultiSelectedBlockClientIds');
5604  /**
5605   * @see getMultiSelectedBlocks in core/block-editor store.
5606   */
5607  
5608  var getMultiSelectedBlocks = getBlockEditorSelector('getMultiSelectedBlocks');
5609  /**
5610   * @see getFirstMultiSelectedBlockClientId in core/block-editor store.
5611   */
5612  
5613  var getFirstMultiSelectedBlockClientId = getBlockEditorSelector('getFirstMultiSelectedBlockClientId');
5614  /**
5615   * @see getLastMultiSelectedBlockClientId in core/block-editor store.
5616   */
5617  
5618  var getLastMultiSelectedBlockClientId = getBlockEditorSelector('getLastMultiSelectedBlockClientId');
5619  /**
5620   * @see isFirstMultiSelectedBlock in core/block-editor store.
5621   */
5622  
5623  var isFirstMultiSelectedBlock = getBlockEditorSelector('isFirstMultiSelectedBlock');
5624  /**
5625   * @see isBlockMultiSelected in core/block-editor store.
5626   */
5627  
5628  var isBlockMultiSelected = getBlockEditorSelector('isBlockMultiSelected');
5629  /**
5630   * @see isAncestorMultiSelected in core/block-editor store.
5631   */
5632  
5633  var isAncestorMultiSelected = getBlockEditorSelector('isAncestorMultiSelected');
5634  /**
5635   * @see getMultiSelectedBlocksStartClientId in core/block-editor store.
5636   */
5637  
5638  var getMultiSelectedBlocksStartClientId = getBlockEditorSelector('getMultiSelectedBlocksStartClientId');
5639  /**
5640   * @see getMultiSelectedBlocksEndClientId in core/block-editor store.
5641   */
5642  
5643  var getMultiSelectedBlocksEndClientId = getBlockEditorSelector('getMultiSelectedBlocksEndClientId');
5644  /**
5645   * @see getBlockOrder in core/block-editor store.
5646   */
5647  
5648  var getBlockOrder = getBlockEditorSelector('getBlockOrder');
5649  /**
5650   * @see getBlockIndex in core/block-editor store.
5651   */
5652  
5653  var getBlockIndex = getBlockEditorSelector('getBlockIndex');
5654  /**
5655   * @see isBlockSelected in core/block-editor store.
5656   */
5657  
5658  var isBlockSelected = getBlockEditorSelector('isBlockSelected');
5659  /**
5660   * @see hasSelectedInnerBlock in core/block-editor store.
5661   */
5662  
5663  var hasSelectedInnerBlock = getBlockEditorSelector('hasSelectedInnerBlock');
5664  /**
5665   * @see isBlockWithinSelection in core/block-editor store.
5666   */
5667  
5668  var isBlockWithinSelection = getBlockEditorSelector('isBlockWithinSelection');
5669  /**
5670   * @see hasMultiSelection in core/block-editor store.
5671   */
5672  
5673  var hasMultiSelection = getBlockEditorSelector('hasMultiSelection');
5674  /**
5675   * @see isMultiSelecting in core/block-editor store.
5676   */
5677  
5678  var isMultiSelecting = getBlockEditorSelector('isMultiSelecting');
5679  /**
5680   * @see isSelectionEnabled in core/block-editor store.
5681   */
5682  
5683  var isSelectionEnabled = getBlockEditorSelector('isSelectionEnabled');
5684  /**
5685   * @see getBlockMode in core/block-editor store.
5686   */
5687  
5688  var getBlockMode = getBlockEditorSelector('getBlockMode');
5689  /**
5690   * @see isTyping in core/block-editor store.
5691   */
5692  
5693  var isTyping = getBlockEditorSelector('isTyping');
5694  /**
5695   * @see isCaretWithinFormattedText in core/block-editor store.
5696   */
5697  
5698  var isCaretWithinFormattedText = getBlockEditorSelector('isCaretWithinFormattedText');
5699  /**
5700   * @see getBlockInsertionPoint in core/block-editor store.
5701   */
5702  
5703  var getBlockInsertionPoint = getBlockEditorSelector('getBlockInsertionPoint');
5704  /**
5705   * @see isBlockInsertionPointVisible in core/block-editor store.
5706   */
5707  
5708  var isBlockInsertionPointVisible = getBlockEditorSelector('isBlockInsertionPointVisible');
5709  /**
5710   * @see isValidTemplate in core/block-editor store.
5711   */
5712  
5713  var isValidTemplate = getBlockEditorSelector('isValidTemplate');
5714  /**
5715   * @see getTemplate in core/block-editor store.
5716   */
5717  
5718  var getTemplate = getBlockEditorSelector('getTemplate');
5719  /**
5720   * @see getTemplateLock in core/block-editor store.
5721   */
5722  
5723  var getTemplateLock = getBlockEditorSelector('getTemplateLock');
5724  /**
5725   * @see canInsertBlockType in core/block-editor store.
5726   */
5727  
5728  var selectors_canInsertBlockType = getBlockEditorSelector('canInsertBlockType');
5729  /**
5730   * @see getInserterItems in core/block-editor store.
5731   */
5732  
5733  var selectors_getInserterItems = getBlockEditorSelector('getInserterItems');
5734  /**
5735   * @see hasInserterItems in core/block-editor store.
5736   */
5737  
5738  var hasInserterItems = getBlockEditorSelector('hasInserterItems');
5739  /**
5740   * @see getBlockListSettings in core/block-editor store.
5741   */
5742  
5743  var getBlockListSettings = getBlockEditorSelector('getBlockListSettings');
5744  
5745  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/effects/reusable-blocks.js
5746  
5747  
5748  
5749  
5750  /**
5751   * External dependencies
5752   */
5753  
5754  
5755  /**
5756   * WordPress dependencies
5757   */
5758  
5759  
5760  
5761   // TODO: Ideally this would be the only dispatch in scope. This requires either
5762  // refactoring editor actions to yielded controls, or replacing direct dispatch
5763  // on the editor store with action creators (e.g. `REMOVE_REUSABLE_BLOCK`).
5764  
5765  
5766  /**
5767   * Internal dependencies
5768   */
5769  
5770  
5771  
5772  /**
5773   * Module Constants
5774   */
5775  
5776  var REUSABLE_BLOCK_NOTICE_ID = 'REUSABLE_BLOCK_NOTICE_ID';
5777  /**
5778   * Fetch Reusable Blocks Effect Handler.
5779   *
5780   * @param {Object} action  action object.
5781   * @param {Object} store   Redux Store.
5782   */
5783  
5784  var fetchReusableBlocks =
5785  /*#__PURE__*/
5786  function () {
5787    var _ref = Object(asyncToGenerator["a" /* default */])(
5788    /*#__PURE__*/
5789    regenerator_default.a.mark(function _callee(action, store) {
5790      var id, dispatch, postType, posts, results;
5791      return regenerator_default.a.wrap(function _callee$(_context) {
5792        while (1) {
5793          switch (_context.prev = _context.next) {
5794            case 0:
5795              id = action.id;
5796              dispatch = store.dispatch; // TODO: these are potentially undefined, this fix is in place
5797              // until there is a filter to not use reusable blocks if undefined
5798  
5799              _context.next = 4;
5800              return external_this_wp_apiFetch_default()({
5801                path: '/wp/v2/types/wp_block'
5802              });
5803  
5804            case 4:
5805              postType = _context.sent;
5806  
5807              if (postType) {
5808                _context.next = 7;
5809                break;
5810              }
5811  
5812              return _context.abrupt("return");
5813  
5814            case 7:
5815              _context.prev = 7;
5816  
5817              if (!id) {
5818                _context.next = 15;
5819                break;
5820              }
5821  
5822              _context.next = 11;
5823              return external_this_wp_apiFetch_default()({
5824                path: "/wp/v2/".concat(postType.rest_base, "/").concat(id)
5825              });
5826  
5827            case 11:
5828              _context.t0 = _context.sent;
5829              posts = [_context.t0];
5830              _context.next = 18;
5831              break;
5832  
5833            case 15:
5834              _context.next = 17;
5835              return external_this_wp_apiFetch_default()({
5836                path: "/wp/v2/".concat(postType.rest_base, "?per_page=-1")
5837              });
5838  
5839            case 17:
5840              posts = _context.sent;
5841  
5842            case 18:
5843              results = Object(external_lodash_["compact"])(Object(external_lodash_["map"])(posts, function (post) {
5844                if (post.status !== 'publish' || post.content.protected) {
5845                  return null;
5846                }
5847  
5848                return Object(objectSpread["a" /* default */])({}, post, {
5849                  content: post.content.raw,
5850                  title: post.title.raw
5851                });
5852              }));
5853  
5854              if (results.length) {
5855                dispatch(__experimentalReceiveReusableBlocks(results));
5856              }
5857  
5858              dispatch({
5859                type: 'FETCH_REUSABLE_BLOCKS_SUCCESS',
5860                id: id
5861              });
5862              _context.next = 26;
5863              break;
5864  
5865            case 23:
5866              _context.prev = 23;
5867              _context.t1 = _context["catch"](7);
5868              dispatch({
5869                type: 'FETCH_REUSABLE_BLOCKS_FAILURE',
5870                id: id,
5871                error: _context.t1
5872              });
5873  
5874            case 26:
5875            case "end":
5876              return _context.stop();
5877          }
5878        }
5879      }, _callee, null, [[7, 23]]);
5880    }));
5881  
5882    return function fetchReusableBlocks(_x, _x2) {
5883      return _ref.apply(this, arguments);
5884    };
5885  }();
5886  /**
5887   * Save Reusable Blocks Effect Handler.
5888   *
5889   * @param {Object} action  action object.
5890   * @param {Object} store   Redux Store.
5891   */
5892  
5893  var saveReusableBlocks =
5894  /*#__PURE__*/
5895  function () {
5896    var _ref2 = Object(asyncToGenerator["a" /* default */])(
5897    /*#__PURE__*/
5898    regenerator_default.a.mark(function _callee2(action, store) {
5899      var postType, id, dispatch, state, _getReusableBlock, title, content, isTemporary, data, path, method, updatedReusableBlock, message;
5900  
5901      return regenerator_default.a.wrap(function _callee2$(_context2) {
5902        while (1) {
5903          switch (_context2.prev = _context2.next) {
5904            case 0:
5905              _context2.next = 2;
5906              return external_this_wp_apiFetch_default()({
5907                path: '/wp/v2/types/wp_block'
5908              });
5909  
5910            case 2:
5911              postType = _context2.sent;
5912  
5913              if (postType) {
5914                _context2.next = 5;
5915                break;
5916              }
5917  
5918              return _context2.abrupt("return");
5919  
5920            case 5:
5921              id = action.id;
5922              dispatch = store.dispatch;
5923              state = store.getState();
5924              _getReusableBlock = __experimentalGetReusableBlock(state, id), title = _getReusableBlock.title, content = _getReusableBlock.content, isTemporary = _getReusableBlock.isTemporary;
5925              data = isTemporary ? {
5926                title: title,
5927                content: content,
5928                status: 'publish'
5929              } : {
5930                id: id,
5931                title: title,
5932                content: content,
5933                status: 'publish'
5934              };
5935              path = isTemporary ? "/wp/v2/".concat(postType.rest_base) : "/wp/v2/".concat(postType.rest_base, "/").concat(id);
5936              method = isTemporary ? 'POST' : 'PUT';
5937              _context2.prev = 12;
5938              _context2.next = 15;
5939              return external_this_wp_apiFetch_default()({
5940                path: path,
5941                data: data,
5942                method: method
5943              });
5944  
5945            case 15:
5946              updatedReusableBlock = _context2.sent;
5947              dispatch({
5948                type: 'SAVE_REUSABLE_BLOCK_SUCCESS',
5949                updatedId: updatedReusableBlock.id,
5950                id: id
5951              });
5952              message = isTemporary ? Object(external_this_wp_i18n_["__"])('Block created.') : Object(external_this_wp_i18n_["__"])('Block updated.');
5953              Object(external_this_wp_data_["dispatch"])('core/notices').createSuccessNotice(message, {
5954                id: REUSABLE_BLOCK_NOTICE_ID,
5955                type: 'snackbar'
5956              });
5957  
5958              Object(external_this_wp_data_["dispatch"])('core/block-editor').__unstableSaveReusableBlock(id, updatedReusableBlock.id);
5959  
5960              _context2.next = 26;
5961              break;
5962  
5963            case 22:
5964              _context2.prev = 22;
5965              _context2.t0 = _context2["catch"](12);
5966              dispatch({
5967                type: 'SAVE_REUSABLE_BLOCK_FAILURE',
5968                id: id
5969              });
5970              Object(external_this_wp_data_["dispatch"])('core/notices').createErrorNotice(_context2.t0.message, {
5971                id: REUSABLE_BLOCK_NOTICE_ID
5972              });
5973  
5974            case 26:
5975            case "end":
5976              return _context2.stop();
5977          }
5978        }
5979      }, _callee2, null, [[12, 22]]);
5980    }));
5981  
5982    return function saveReusableBlocks(_x3, _x4) {
5983      return _ref2.apply(this, arguments);
5984    };
5985  }();
5986  /**
5987   * Delete Reusable Blocks Effect Handler.
5988   *
5989   * @param {Object} action  action object.
5990   * @param {Object} store   Redux Store.
5991   */
5992  
5993  var deleteReusableBlocks =
5994  /*#__PURE__*/
5995  function () {
5996    var _ref3 = Object(asyncToGenerator["a" /* default */])(
5997    /*#__PURE__*/
5998    regenerator_default.a.mark(function _callee3(action, store) {
5999      var postType, id, getState, dispatch, reusableBlock, allBlocks, associatedBlocks, associatedBlockClientIds, transactionId, message;
6000      return regenerator_default.a.wrap(function _callee3$(_context3) {
6001        while (1) {
6002          switch (_context3.prev = _context3.next) {
6003            case 0:
6004              _context3.next = 2;
6005              return external_this_wp_apiFetch_default()({
6006                path: '/wp/v2/types/wp_block'
6007              });
6008  
6009            case 2:
6010              postType = _context3.sent;
6011  
6012              if (postType) {
6013                _context3.next = 5;
6014                break;
6015              }
6016  
6017              return _context3.abrupt("return");
6018  
6019            case 5:
6020              id = action.id;
6021              getState = store.getState, dispatch = store.dispatch; // Don't allow a reusable block with a temporary ID to be deleted
6022  
6023              reusableBlock = __experimentalGetReusableBlock(getState(), id);
6024  
6025              if (!(!reusableBlock || reusableBlock.isTemporary)) {
6026                _context3.next = 10;
6027                break;
6028              }
6029  
6030              return _context3.abrupt("return");
6031  
6032            case 10:
6033              // Remove any other blocks that reference this reusable block
6034              allBlocks = Object(external_this_wp_data_["select"])('core/block-editor').getBlocks();
6035              associatedBlocks = allBlocks.filter(function (block) {
6036                return Object(external_this_wp_blocks_["isReusableBlock"])(block) && block.attributes.ref === id;
6037              });
6038              associatedBlockClientIds = associatedBlocks.map(function (block) {
6039                return block.clientId;
6040              });
6041              transactionId = Object(external_lodash_["uniqueId"])();
6042              dispatch({
6043                type: 'REMOVE_REUSABLE_BLOCK',
6044                id: id,
6045                optimist: {
6046                  type: redux_optimist["BEGIN"],
6047                  id: transactionId
6048                }
6049              }); // Remove the parsed block.
6050  
6051              if (associatedBlockClientIds.length) {
6052                Object(external_this_wp_data_["dispatch"])('core/block-editor').removeBlocks(associatedBlockClientIds);
6053              }
6054  
6055              _context3.prev = 16;
6056              _context3.next = 19;
6057              return external_this_wp_apiFetch_default()({
6058                path: "/wp/v2/".concat(postType.rest_base, "/").concat(id),
6059                method: 'DELETE'
6060              });
6061  
6062            case 19:
6063              dispatch({
6064                type: 'DELETE_REUSABLE_BLOCK_SUCCESS',
6065                id: id,
6066                optimist: {
6067                  type: redux_optimist["COMMIT"],
6068                  id: transactionId
6069                }
6070              });
6071              message = Object(external_this_wp_i18n_["__"])('Block deleted.');
6072              Object(external_this_wp_data_["dispatch"])('core/notices').createSuccessNotice(message, {
6073                id: REUSABLE_BLOCK_NOTICE_ID,
6074                type: 'snackbar'
6075              });
6076              _context3.next = 28;
6077              break;
6078  
6079            case 24:
6080              _context3.prev = 24;
6081              _context3.t0 = _context3["catch"](16);
6082              dispatch({
6083                type: 'DELETE_REUSABLE_BLOCK_FAILURE',
6084                id: id,
6085                optimist: {
6086                  type: redux_optimist["REVERT"],
6087                  id: transactionId
6088                }
6089              });
6090              Object(external_this_wp_data_["dispatch"])('core/notices').createErrorNotice(_context3.t0.message, {
6091                id: REUSABLE_BLOCK_NOTICE_ID
6092              });
6093  
6094            case 28:
6095            case "end":
6096              return _context3.stop();
6097          }
6098        }
6099      }, _callee3, null, [[16, 24]]);
6100    }));
6101  
6102    return function deleteReusableBlocks(_x5, _x6) {
6103      return _ref3.apply(this, arguments);
6104    };
6105  }();
6106  /**
6107   * Convert a reusable block to a static block effect handler
6108   *
6109   * @param {Object} action  action object.
6110   * @param {Object} store   Redux Store.
6111   */
6112  
6113  var reusable_blocks_convertBlockToStatic = function convertBlockToStatic(action, store) {
6114    var state = store.getState();
6115    var oldBlock = Object(external_this_wp_data_["select"])('core/block-editor').getBlock(action.clientId);
6116    var reusableBlock = __experimentalGetReusableBlock(state, oldBlock.attributes.ref);
6117    var newBlocks = Object(external_this_wp_blocks_["parse"])(reusableBlock.content);
6118    Object(external_this_wp_data_["dispatch"])('core/block-editor').replaceBlocks(oldBlock.clientId, newBlocks);
6119  };
6120  /**
6121   * Convert a static block to a reusable block effect handler
6122   *
6123   * @param {Object} action  action object.
6124   * @param {Object} store   Redux Store.
6125   */
6126  
6127  var reusable_blocks_convertBlockToReusable = function convertBlockToReusable(action, store) {
6128    var dispatch = store.dispatch;
6129    var reusableBlock = {
6130      id: Object(external_lodash_["uniqueId"])('reusable'),
6131      title: Object(external_this_wp_i18n_["__"])('Untitled Reusable Block'),
6132      content: Object(external_this_wp_blocks_["serialize"])(Object(external_this_wp_data_["select"])('core/block-editor').getBlocksByClientId(action.clientIds))
6133    };
6134    dispatch(__experimentalReceiveReusableBlocks([reusableBlock]));
6135    dispatch(__experimentalSaveReusableBlock(reusableBlock.id));
6136    Object(external_this_wp_data_["dispatch"])('core/block-editor').replaceBlocks(action.clientIds, Object(external_this_wp_blocks_["createBlock"])('core/block', {
6137      ref: reusableBlock.id
6138    }));
6139  };
6140  
6141  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/effects.js
6142  /**
6143   * Internal dependencies
6144   */
6145  
6146  /* harmony default export */ var effects = ({
6147    FETCH_REUSABLE_BLOCKS: function FETCH_REUSABLE_BLOCKS(action, store) {
6148      fetchReusableBlocks(action, store);
6149    },
6150    SAVE_REUSABLE_BLOCK: function SAVE_REUSABLE_BLOCK(action, store) {
6151      saveReusableBlocks(action, store);
6152    },
6153    DELETE_REUSABLE_BLOCK: function DELETE_REUSABLE_BLOCK(action, store) {
6154      deleteReusableBlocks(action, store);
6155    },
6156    CONVERT_BLOCK_TO_STATIC: reusable_blocks_convertBlockToStatic,
6157    CONVERT_BLOCK_TO_REUSABLE: reusable_blocks_convertBlockToReusable
6158  });
6159  
6160  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/middlewares.js
6161  /**
6162   * External dependencies
6163   */
6164  
6165  /**
6166   * Internal dependencies
6167   */
6168  
6169  
6170  /**
6171   * Applies the custom middlewares used specifically in the editor module.
6172   *
6173   * @param {Object} store Store Object.
6174   *
6175   * @return {Object} Update Store Object.
6176   */
6177  
6178  function applyMiddlewares(store) {
6179    var enhancedDispatch = function enhancedDispatch() {
6180      throw new Error('Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.');
6181    };
6182  
6183    var middlewareAPI = {
6184      getState: store.getState,
6185      dispatch: function dispatch() {
6186        return enhancedDispatch.apply(void 0, arguments);
6187      }
6188    };
6189    enhancedDispatch = refx_default()(effects)(middlewareAPI)(store.dispatch);
6190    store.dispatch = enhancedDispatch;
6191    return store;
6192  }
6193  
6194  /* harmony default export */ var middlewares = (applyMiddlewares);
6195  
6196  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/store/index.js
6197  
6198  
6199  /**
6200   * WordPress dependencies
6201   */
6202  
6203  
6204  /**
6205   * Internal dependencies
6206   */
6207  
6208  
6209  
6210  
6211  
6212  
6213  
6214  /**
6215   * Post editor data store configuration.
6216   *
6217   * @see https://github.com/WordPress/gutenberg/blob/master/packages/data/README.md#registerStore
6218   *
6219   * @type {Object}
6220   */
6221  
6222  var storeConfig = {
6223    reducer: reducer,
6224    selectors: selectors_namespaceObject,
6225    actions: actions_namespaceObject,
6226    controls: Object(objectSpread["a" /* default */])({}, external_this_wp_dataControls_["controls"], store_controls)
6227  };
6228  var store_store = Object(external_this_wp_data_["registerStore"])(STORE_KEY, Object(objectSpread["a" /* default */])({}, storeConfig, {
6229    persist: ['preferences']
6230  }));
6231  middlewares(store_store);
6232  /* harmony default export */ var build_module_store = (store_store);
6233  
6234  // EXTERNAL MODULE: external {"this":["wp","hooks"]}
6235  var external_this_wp_hooks_ = __webpack_require__(27);
6236  
6237  // EXTERNAL MODULE: external {"this":["wp","element"]}
6238  var external_this_wp_element_ = __webpack_require__(0);
6239  
6240  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/autocompleters/block.js
6241  
6242  
6243  
6244  /**
6245   * External dependencies
6246   */
6247  
6248  /**
6249   * WordPress dependencies
6250   */
6251  
6252  
6253  
6254  
6255  /**
6256   * Returns the client ID of the parent where a newly inserted block would be
6257   * placed.
6258   *
6259   * @return {string} Client ID of the parent where a newly inserted block would
6260   *                  be placed.
6261   */
6262  
6263  function defaultGetBlockInsertionParentClientId() {
6264    return Object(external_this_wp_data_["select"])('core/block-editor').getBlockInsertionPoint().rootClientId;
6265  }
6266  /**
6267   * Returns the inserter items for the specified parent block.
6268   *
6269   * @param {string} rootClientId Client ID of the block for which to retrieve
6270   *                              inserter items.
6271   *
6272   * @return {Array<Editor.InserterItem>} The inserter items for the specified
6273   *                                      parent.
6274   */
6275  
6276  
6277  function defaultGetInserterItems(rootClientId) {
6278    return Object(external_this_wp_data_["select"])('core/block-editor').getInserterItems(rootClientId);
6279  }
6280  /**
6281   * Returns the name of the currently selected block.
6282   *
6283   * @return {string?} The name of the currently selected block or `null` if no
6284   *                   block is selected.
6285   */
6286  
6287  
6288  function defaultGetSelectedBlockName() {
6289    var _select = Object(external_this_wp_data_["select"])('core/block-editor'),
6290        getSelectedBlockClientId = _select.getSelectedBlockClientId,
6291        getBlockName = _select.getBlockName;
6292  
6293    var selectedBlockClientId = getSelectedBlockClientId();
6294    return selectedBlockClientId ? getBlockName(selectedBlockClientId) : null;
6295  }
6296  /**
6297   * Triggers a fetch of reusable blocks, once.
6298   *
6299   * TODO: Reusable blocks fetching should be reimplemented as a core-data entity
6300   * resolver, not relying on `core/editor` (see #7119). The implementation here
6301   * is imperfect in that the options result will not await the completion of the
6302   * fetch request and thus will not include any reusable blocks. This has always
6303   * been true, but relied upon the fact the user would be delayed in typing an
6304   * autocompleter search query. Once implemented using resolvers, the status of
6305   * this request could be subscribed to as part of a promised return value using
6306   * the result of `hasFinishedResolution`. There is currently reliable way to
6307   * determine that a reusable blocks fetch request has completed.
6308   *
6309   * @return {Promise} Promise resolving once reusable blocks fetched.
6310   */
6311  
6312  
6313  var block_fetchReusableBlocks = Object(external_lodash_["once"])(function () {
6314    Object(external_this_wp_data_["dispatch"])('core/editor').__experimentalFetchReusableBlocks();
6315  });
6316  /**
6317   * Creates a blocks repeater for replacing the current block with a selected block type.
6318   *
6319   * @return {Completer} A blocks completer.
6320   */
6321  
6322  function createBlockCompleter() {
6323    var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
6324        _ref$getBlockInsertio = _ref.getBlockInsertionParentClientId,
6325        getBlockInsertionParentClientId = _ref$getBlockInsertio === void 0 ? defaultGetBlockInsertionParentClientId : _ref$getBlockInsertio,
6326        _ref$getInserterItems = _ref.getInserterItems,
6327        getInserterItems = _ref$getInserterItems === void 0 ? defaultGetInserterItems : _ref$getInserterItems,
6328        _ref$getSelectedBlock = _ref.getSelectedBlockName,
6329        getSelectedBlockName = _ref$getSelectedBlock === void 0 ? defaultGetSelectedBlockName : _ref$getSelectedBlock;
6330  
6331    return {
6332      name: 'blocks',
6333      className: 'editor-autocompleters__block',
6334      triggerPrefix: '/',
6335      options: function options() {
6336        block_fetchReusableBlocks();
6337        var selectedBlockName = getSelectedBlockName();
6338        return getInserterItems(getBlockInsertionParentClientId()).filter( // Avoid offering to replace the current block with a block of the same type.
6339        function (inserterItem) {
6340          return selectedBlockName !== inserterItem.name;
6341        });
6342      },
6343      getOptionKeywords: function getOptionKeywords(inserterItem) {
6344        var title = inserterItem.title,
6345            _inserterItem$keyword = inserterItem.keywords,
6346            keywords = _inserterItem$keyword === void 0 ? [] : _inserterItem$keyword,
6347            category = inserterItem.category;
6348        return [category].concat(Object(toConsumableArray["a" /* default */])(keywords), [title]);
6349      },
6350      getOptionLabel: function getOptionLabel(inserterItem) {
6351        var icon = inserterItem.icon,
6352            title = inserterItem.title;
6353        return [Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["BlockIcon"], {
6354          key: "icon",
6355          icon: icon,
6356          showColors: true
6357        }), title];
6358      },
6359      allowContext: function allowContext(before, after) {
6360        return !(/\S/.test(before) || /\S/.test(after));
6361      },
6362      getOptionCompletion: function getOptionCompletion(inserterItem) {
6363        var name = inserterItem.name,
6364            initialAttributes = inserterItem.initialAttributes;
6365        return {
6366          action: 'replace',
6367          value: Object(external_this_wp_blocks_["createBlock"])(name, initialAttributes)
6368        };
6369      },
6370      isOptionDisabled: function isOptionDisabled(inserterItem) {
6371        return inserterItem.isDisabled;
6372      }
6373    };
6374  }
6375  /**
6376   * Creates a blocks repeater for replacing the current block with a selected block type.
6377   *
6378   * @return {Completer} A blocks completer.
6379   */
6380  
6381  /* harmony default export */ var autocompleters_block = (createBlockCompleter());
6382  
6383  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/autocompleters/user.js
6384  
6385  
6386  /**
6387   * WordPress dependencies
6388   */
6389  
6390  /**
6391   * A user mentions completer.
6392   *
6393   * @type {Completer}
6394   */
6395  
6396  /* harmony default export */ var autocompleters_user = ({
6397    name: 'users',
6398    className: 'editor-autocompleters__user',
6399    triggerPrefix: '@',
6400    options: function options(search) {
6401      var payload = '';
6402  
6403      if (search) {
6404        payload = '?search=' + encodeURIComponent(search);
6405      }
6406  
6407      return external_this_wp_apiFetch_default()({
6408        path: '/wp/v2/users' + payload
6409      });
6410    },
6411    isDebounced: true,
6412    getOptionKeywords: function getOptionKeywords(user) {
6413      return [user.slug, user.name];
6414    },
6415    getOptionLabel: function getOptionLabel(user) {
6416      return [Object(external_this_wp_element_["createElement"])("img", {
6417        key: "avatar",
6418        className: "editor-autocompleters__user-avatar",
6419        alt: "",
6420        src: user.avatar_urls[24]
6421      }), Object(external_this_wp_element_["createElement"])("span", {
6422        key: "name",
6423        className: "editor-autocompleters__user-name"
6424      }, user.name), Object(external_this_wp_element_["createElement"])("span", {
6425        key: "slug",
6426        className: "editor-autocompleters__user-slug"
6427      }, user.slug)];
6428    },
6429    getOptionCompletion: function getOptionCompletion(user) {
6430      return "@".concat(user.slug);
6431    }
6432  });
6433  
6434  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/autocompleters/index.js
6435  
6436  
6437  
6438  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
6439  var classCallCheck = __webpack_require__(12);
6440  
6441  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
6442  var createClass = __webpack_require__(11);
6443  
6444  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
6445  var possibleConstructorReturn = __webpack_require__(13);
6446  
6447  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
6448  var getPrototypeOf = __webpack_require__(14);
6449  
6450  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules
6451  var inherits = __webpack_require__(15);
6452  
6453  // EXTERNAL MODULE: external {"this":["wp","compose"]}
6454  var external_this_wp_compose_ = __webpack_require__(8);
6455  
6456  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/autosave-monitor/index.js
6457  
6458  
6459  
6460  
6461  
6462  
6463  /**
6464   * WordPress dependencies
6465   */
6466  
6467  
6468  
6469  var autosave_monitor_AutosaveMonitor =
6470  /*#__PURE__*/
6471  function (_Component) {
6472    Object(inherits["a" /* default */])(AutosaveMonitor, _Component);
6473  
6474    function AutosaveMonitor() {
6475      Object(classCallCheck["a" /* default */])(this, AutosaveMonitor);
6476  
6477      return Object(possibleConstructorReturn["a" /* default */])(this, Object(getPrototypeOf["a" /* default */])(AutosaveMonitor).apply(this, arguments));
6478    }
6479  
6480    Object(createClass["a" /* default */])(AutosaveMonitor, [{
6481      key: "componentDidUpdate",
6482      value: function componentDidUpdate(prevProps) {
6483        var _this$props = this.props,
6484            isDirty = _this$props.isDirty,
6485            editsReference = _this$props.editsReference,
6486            isAutosaveable = _this$props.isAutosaveable,
6487            isAutosaving = _this$props.isAutosaving; // The edits reference is held for comparison to avoid scheduling an
6488        // autosave if an edit has not been made since the last autosave
6489        // completion. This is assigned when the autosave completes, and reset
6490        // when an edit occurs.
6491        //
6492        // See: https://github.com/WordPress/gutenberg/issues/12318
6493  
6494        if (editsReference !== prevProps.editsReference) {
6495          this.didAutosaveForEditsReference = false;
6496        }
6497  
6498        if (!isAutosaving && prevProps.isAutosaving) {
6499          this.didAutosaveForEditsReference = true;
6500        }
6501  
6502        if (prevProps.isDirty !== isDirty || prevProps.isAutosaveable !== isAutosaveable || prevProps.editsReference !== editsReference) {
6503          this.toggleTimer(isDirty && isAutosaveable && !this.didAutosaveForEditsReference);
6504        }
6505      }
6506    }, {
6507      key: "componentWillUnmount",
6508      value: function componentWillUnmount() {
6509        this.toggleTimer(false);
6510      }
6511    }, {
6512      key: "toggleTimer",
6513      value: function toggleTimer(isPendingSave) {
6514        var _this = this;
6515  
6516        var _this$props2 = this.props,
6517            interval = _this$props2.interval,
6518            _this$props2$shouldTh = _this$props2.shouldThrottle,
6519            shouldThrottle = _this$props2$shouldTh === void 0 ? false : _this$props2$shouldTh; // By default, AutosaveMonitor will wait for a pause in editing before
6520        // autosaving. In other words, its action is "debounced".
6521        //
6522        // The `shouldThrottle` props allows overriding this behaviour, thus
6523        // making the autosave action "throttled".
6524  
6525        if (!shouldThrottle && this.pendingSave) {
6526          clearTimeout(this.pendingSave);
6527          delete this.pendingSave;
6528        }
6529  
6530        if (isPendingSave && !(shouldThrottle && this.pendingSave)) {
6531          this.pendingSave = setTimeout(function () {
6532            _this.props.autosave();
6533  
6534            delete _this.pendingSave;
6535          }, interval * 1000);
6536        }
6537      }
6538    }, {
6539      key: "render",
6540      value: function render() {
6541        return null;
6542      }
6543    }]);
6544  
6545    return AutosaveMonitor;
6546  }(external_this_wp_element_["Component"]);
6547  /* harmony default export */ var autosave_monitor = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select, ownProps) {
6548    var _select = select('core'),
6549        getReferenceByDistinctEdits = _select.getReferenceByDistinctEdits;
6550  
6551    var _select2 = select('core/editor'),
6552        isEditedPostDirty = _select2.isEditedPostDirty,
6553        isEditedPostAutosaveable = _select2.isEditedPostAutosaveable,
6554        isAutosavingPost = _select2.isAutosavingPost,
6555        getEditorSettings = _select2.getEditorSettings;
6556  
6557    var _ownProps$interval = ownProps.interval,
6558        interval = _ownProps$interval === void 0 ? getEditorSettings().autosaveInterval : _ownProps$interval;
6559    return {
6560      isDirty: isEditedPostDirty(),
6561      isAutosaveable: isEditedPostAutosaveable(),
6562      editsReference: getReferenceByDistinctEdits(),
6563      isAutosaving: isAutosavingPost(),
6564      interval: interval
6565    };
6566  }), Object(external_this_wp_data_["withDispatch"])(function (dispatch, ownProps) {
6567    return {
6568      autosave: function autosave() {
6569        var _ownProps$autosave = ownProps.autosave,
6570            autosave = _ownProps$autosave === void 0 ? dispatch('core/editor').autosave : _ownProps$autosave;
6571        autosave();
6572      }
6573    };
6574  })])(autosave_monitor_AutosaveMonitor));
6575  
6576  // EXTERNAL MODULE: ./node_modules/classnames/index.js
6577  var classnames = __webpack_require__(16);
6578  var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
6579  
6580  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/document-outline/item.js
6581  
6582  
6583  /**
6584   * External dependencies
6585   */
6586  
6587  /**
6588   * WordPress dependencies
6589   */
6590  
6591  
6592  
6593  var item_TableOfContentsItem = function TableOfContentsItem(_ref) {
6594    var children = _ref.children,
6595        isValid = _ref.isValid,
6596        level = _ref.level,
6597        _ref$path = _ref.path,
6598        path = _ref$path === void 0 ? [] : _ref$path,
6599        href = _ref.href,
6600        onSelect = _ref.onSelect;
6601    return Object(external_this_wp_element_["createElement"])("li", {
6602      className: classnames_default()('document-outline__item', "is-".concat(level.toLowerCase()), {
6603        'is-invalid': !isValid
6604      })
6605    }, Object(external_this_wp_element_["createElement"])("a", {
6606      href: href,
6607      className: "document-outline__button",
6608      onClick: onSelect
6609    }, Object(external_this_wp_element_["createElement"])("span", {
6610      className: "document-outline__emdash",
6611      "aria-hidden": "true"
6612    }), // path is an array of nodes that are ancestors of the heading starting in the top level node.
6613    // This mapping renders each ancestor to make it easier for the user to know where the headings are nested.
6614    path.map(function (_ref2, index) {
6615      var clientId = _ref2.clientId;
6616      return Object(external_this_wp_element_["createElement"])("strong", {
6617        key: index,
6618        className: "document-outline__level"
6619      }, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["BlockTitle"], {
6620        clientId: clientId
6621      }));
6622    }), Object(external_this_wp_element_["createElement"])("strong", {
6623      className: "document-outline__level"
6624    }, level), Object(external_this_wp_element_["createElement"])("span", {
6625      className: "document-outline__item-content"
6626    }, children)));
6627  };
6628  
6629  /* harmony default export */ var document_outline_item = (item_TableOfContentsItem);
6630  
6631  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/document-outline/index.js
6632  
6633  
6634  
6635  
6636  /**
6637   * External dependencies
6638   */
6639  
6640  /**
6641   * WordPress dependencies
6642   */
6643  
6644  
6645  
6646  
6647  
6648  /**
6649   * Internal dependencies
6650   */
6651  
6652  
6653  /**
6654   * Module constants
6655   */
6656  
6657  var emptyHeadingContent = Object(external_this_wp_element_["createElement"])("em", null, Object(external_this_wp_i18n_["__"])('(Empty heading)'));
6658  var incorrectLevelContent = [Object(external_this_wp_element_["createElement"])("br", {
6659    key: "incorrect-break"
6660  }), Object(external_this_wp_element_["createElement"])("em", {
6661    key: "incorrect-message"
6662  }, Object(external_this_wp_i18n_["__"])('(Incorrect heading level)'))];
6663  var singleH1Headings = [Object(external_this_wp_element_["createElement"])("br", {
6664    key: "incorrect-break-h1"
6665  }), Object(external_this_wp_element_["createElement"])("em", {
6666    key: "incorrect-message-h1"
6667  }, Object(external_this_wp_i18n_["__"])('(Your theme may already use a H1 for the post title)'))];
6668  var multipleH1Headings = [Object(external_this_wp_element_["createElement"])("br", {
6669    key: "incorrect-break-multiple-h1"
6670  }), Object(external_this_wp_element_["createElement"])("em", {
6671    key: "incorrect-message-multiple-h1"
6672  }, Object(external_this_wp_i18n_["__"])('(Multiple H1 headings are not recommended)'))];
6673  /**
6674   * Returns an array of heading blocks enhanced with the following properties:
6675   * path    - An array of blocks that are ancestors of the heading starting from a top-level node.
6676   *           Can be an empty array if the heading is a top-level node (is not nested inside another block).
6677   * level   - An integer with the heading level.
6678   * isEmpty - Flag indicating if the heading has no content.
6679   *
6680   * @param {?Array} blocks An array of blocks.
6681   * @param {?Array} path   An array of blocks that are ancestors of the blocks passed as blocks.
6682   *
6683   * @return {Array} An array of heading blocks enhanced with the properties described above.
6684   */
6685  
6686  var document_outline_computeOutlineHeadings = function computeOutlineHeadings() {
6687    var blocks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
6688    var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
6689    return Object(external_lodash_["flatMap"])(blocks, function () {
6690      var block = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
6691  
6692      if (block.name === 'core/heading') {
6693        return Object(objectSpread["a" /* default */])({}, block, {
6694          path: path,
6695          level: block.attributes.level,
6696          isEmpty: isEmptyHeading(block)
6697        });
6698      }
6699  
6700      return computeOutlineHeadings(block.innerBlocks, [].concat(Object(toConsumableArray["a" /* default */])(path), [block]));
6701    });
6702  };
6703  
6704  var isEmptyHeading = function isEmptyHeading(heading) {
6705    return !heading.attributes.content || heading.attributes.content.length === 0;
6706  };
6707  
6708  var document_outline_DocumentOutline = function DocumentOutline(_ref) {
6709    var _ref$blocks = _ref.blocks,
6710        blocks = _ref$blocks === void 0 ? [] : _ref$blocks,
6711        title = _ref.title,
6712        onSelect = _ref.onSelect,
6713        isTitleSupported = _ref.isTitleSupported,
6714        hasOutlineItemsDisabled = _ref.hasOutlineItemsDisabled;
6715    var headings = document_outline_computeOutlineHeadings(blocks);
6716  
6717    if (headings.length < 1) {
6718      return null;
6719    }
6720  
6721    var prevHeadingLevel = 1; // Not great but it's the simplest way to locate the title right now.
6722  
6723    var titleNode = document.querySelector('.editor-post-title__input');
6724    var hasTitle = isTitleSupported && title && titleNode;
6725    var countByLevel = Object(external_lodash_["countBy"])(headings, 'level');
6726    var hasMultipleH1 = countByLevel[1] > 1;
6727    return Object(external_this_wp_element_["createElement"])("div", {
6728      className: "document-outline"
6729    }, Object(external_this_wp_element_["createElement"])("ul", null, hasTitle && Object(external_this_wp_element_["createElement"])(document_outline_item, {
6730      level: Object(external_this_wp_i18n_["__"])('Title'),
6731      isValid: true,
6732      onSelect: onSelect,
6733      href: "#".concat(titleNode.id),
6734      isDisabled: hasOutlineItemsDisabled
6735    }, title), headings.map(function (item, index) {
6736      // Headings remain the same, go up by one, or down by any amount.
6737      // Otherwise there are missing levels.
6738      var isIncorrectLevel = item.level > prevHeadingLevel + 1;
6739      var isValid = !item.isEmpty && !isIncorrectLevel && !!item.level && (item.level !== 1 || !hasMultipleH1 && !hasTitle);
6740      prevHeadingLevel = item.level;
6741      return Object(external_this_wp_element_["createElement"])(document_outline_item, {
6742        key: index,
6743        level: "H".concat(item.level),
6744        isValid: isValid,
6745        path: item.path,
6746        isDisabled: hasOutlineItemsDisabled,
6747        href: "#block-".concat(item.clientId),
6748        onSelect: onSelect
6749      }, item.isEmpty ? emptyHeadingContent : Object(external_this_wp_richText_["getTextContent"])(Object(external_this_wp_richText_["create"])({
6750        html: item.attributes.content
6751      })), isIncorrectLevel && incorrectLevelContent, item.level === 1 && hasMultipleH1 && multipleH1Headings, hasTitle && item.level === 1 && !hasMultipleH1 && singleH1Headings);
6752    })));
6753  };
6754  /* harmony default export */ var document_outline = (Object(external_this_wp_compose_["compose"])(Object(external_this_wp_data_["withSelect"])(function (select) {
6755    var _select = select('core/block-editor'),
6756        getBlocks = _select.getBlocks;
6757  
6758    var _select2 = select('core/editor'),
6759        getEditedPostAttribute = _select2.getEditedPostAttribute;
6760  
6761    var _select3 = select('core'),
6762        getPostType = _select3.getPostType;
6763  
6764    var postType = getPostType(getEditedPostAttribute('type'));
6765    return {
6766      title: getEditedPostAttribute('title'),
6767      blocks: getBlocks(),
6768      isTitleSupported: Object(external_lodash_["get"])(postType, ['supports', 'title'], false)
6769    };
6770  }))(document_outline_DocumentOutline));
6771  
6772  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/document-outline/check.js
6773  /**
6774   * External dependencies
6775   */
6776  
6777  /**
6778   * WordPress dependencies
6779   */
6780  
6781  
6782  
6783  function DocumentOutlineCheck(_ref) {
6784    var blocks = _ref.blocks,
6785        children = _ref.children;
6786    var headings = Object(external_lodash_["filter"])(blocks, function (block) {
6787      return block.name === 'core/heading';
6788    });
6789  
6790    if (headings.length < 1) {
6791      return null;
6792    }
6793  
6794    return children;
6795  }
6796  
6797  /* harmony default export */ var check = (Object(external_this_wp_data_["withSelect"])(function (select) {
6798    return {
6799      blocks: select('core/block-editor').getBlocks()
6800    };
6801  })(DocumentOutlineCheck));
6802  
6803  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
6804  var assertThisInitialized = __webpack_require__(5);
6805  
6806  // EXTERNAL MODULE: external {"this":["wp","components"]}
6807  var external_this_wp_components_ = __webpack_require__(3);
6808  
6809  // EXTERNAL MODULE: external {"this":["wp","keycodes"]}
6810  var external_this_wp_keycodes_ = __webpack_require__(19);
6811  
6812  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/global-keyboard-shortcuts/save-shortcut.js
6813  
6814  
6815  
6816  /**
6817   * WordPress dependencies
6818   */
6819  
6820  
6821  
6822  
6823  function SaveShortcut(_ref) {
6824    var onSave = _ref.onSave;
6825    return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["KeyboardShortcuts"], {
6826      bindGlobal: true,
6827      shortcuts: Object(defineProperty["a" /* default */])({}, external_this_wp_keycodes_["rawShortcut"].primary('s'), function (event) {
6828        event.preventDefault();
6829        onSave();
6830      })
6831    });
6832  }
6833  /* harmony default export */ var save_shortcut = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select) {
6834    var _select = select('core/editor'),
6835        isEditedPostDirty = _select.isEditedPostDirty;
6836  
6837    return {
6838      isDirty: isEditedPostDirty()
6839    };
6840  }), Object(external_this_wp_data_["withDispatch"])(function (dispatch, ownProps, _ref3) {
6841    var select = _ref3.select;
6842  
6843    var _dispatch = dispatch('core/editor'),
6844        savePost = _dispatch.savePost;
6845  
6846    return {
6847      onSave: function onSave() {
6848        // TODO: This should be handled in the `savePost` effect in
6849        // considering `isSaveable`. See note on `isEditedPostSaveable`
6850        // selector about dirtiness and meta-boxes.
6851        //
6852        // See: `isEditedPostSaveable`
6853        var _select2 = select('core/editor'),
6854            isEditedPostDirty = _select2.isEditedPostDirty;
6855  
6856        if (!isEditedPostDirty()) {
6857          return;
6858        }
6859  
6860        savePost();
6861      }
6862    };
6863  })])(SaveShortcut));
6864  
6865  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/global-keyboard-shortcuts/visual-editor-shortcuts.js
6866  
6867  
6868  
6869  
6870  
6871  
6872  
6873  
6874  
6875  /**
6876   * WordPress dependencies
6877   */
6878  
6879  
6880  
6881  
6882  
6883  
6884  /**
6885   * Internal dependencies
6886   */
6887  
6888  
6889  
6890  var visual_editor_shortcuts_VisualEditorGlobalKeyboardShortcuts =
6891  /*#__PURE__*/
6892  function (_Component) {
6893    Object(inherits["a" /* default */])(VisualEditorGlobalKeyboardShortcuts, _Component);
6894  
6895    function VisualEditorGlobalKeyboardShortcuts() {
6896      var _this;
6897  
6898      Object(classCallCheck["a" /* default */])(this, VisualEditorGlobalKeyboardShortcuts);
6899  
6900      _this = Object(possibleConstructorReturn["a" /* default */])(this, Object(getPrototypeOf["a" /* default */])(VisualEditorGlobalKeyboardShortcuts).apply(this, arguments));
6901      _this.undoOrRedo = _this.undoOrRedo.bind(Object(assertThisInitialized["a" /* default */])(_this));
6902      return _this;
6903    }
6904  
6905    Object(createClass["a" /* default */])(VisualEditorGlobalKeyboardShortcuts, [{
6906      key: "undoOrRedo",
6907      value: function undoOrRedo(event) {
6908        var _this$props = this.props,
6909            onRedo = _this$props.onRedo,
6910            onUndo = _this$props.onUndo;
6911  
6912        if (event.shiftKey) {
6913          onRedo();
6914        } else {
6915          onUndo();
6916        }
6917  
6918        event.preventDefault();
6919      }
6920    }, {
6921      key: "render",
6922      value: function render() {
6923        var _ref;
6924  
6925        return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["BlockEditorKeyboardShortcuts"], null), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["KeyboardShortcuts"], {
6926          shortcuts: (_ref = {}, Object(defineProperty["a" /* default */])(_ref, external_this_wp_keycodes_["rawShortcut"].primary('z'), this.undoOrRedo), Object(defineProperty["a" /* default */])(_ref, external_this_wp_keycodes_["rawShortcut"].primaryShift('z'), this.undoOrRedo), _ref)
6927        }), Object(external_this_wp_element_["createElement"])(save_shortcut, null));
6928      }
6929    }]);
6930  
6931    return VisualEditorGlobalKeyboardShortcuts;
6932  }(external_this_wp_element_["Component"]);
6933  
6934  var EnhancedVisualEditorGlobalKeyboardShortcuts = Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
6935    var _dispatch = dispatch('core/editor'),
6936        redo = _dispatch.redo,
6937        undo = _dispatch.undo;
6938  
6939    return {
6940      onRedo: redo,
6941      onUndo: undo
6942    };
6943  })(visual_editor_shortcuts_VisualEditorGlobalKeyboardShortcuts);
6944  /* harmony default export */ var visual_editor_shortcuts = (EnhancedVisualEditorGlobalKeyboardShortcuts);
6945  function EditorGlobalKeyboardShortcuts() {
6946    external_this_wp_deprecated_default()('EditorGlobalKeyboardShortcuts', {
6947      alternative: 'VisualEditorGlobalKeyboardShortcuts',
6948      plugin: 'Gutenberg'
6949    });
6950    return Object(external_this_wp_element_["createElement"])(EnhancedVisualEditorGlobalKeyboardShortcuts, null);
6951  }
6952  
6953  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/global-keyboard-shortcuts/text-editor-shortcuts.js
6954  
6955  
6956  /**
6957   * Internal dependencies
6958   */
6959  
6960  function TextEditorGlobalKeyboardShortcuts() {
6961    return Object(external_this_wp_element_["createElement"])(save_shortcut, null);
6962  }
6963  
6964  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/editor-history/redo.js
6965  
6966  
6967  /**
6968   * WordPress dependencies
6969   */
6970  
6971  
6972  
6973  
6974  
6975  
6976  function EditorHistoryRedo(_ref) {
6977    var hasRedo = _ref.hasRedo,
6978        redo = _ref.redo;
6979    return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["IconButton"], {
6980      icon: "redo",
6981      label: Object(external_this_wp_i18n_["__"])('Redo'),
6982      shortcut: external_this_wp_keycodes_["displayShortcut"].primaryShift('z') // If there are no redo levels we don't want to actually disable this
6983      // button, because it will remove focus for keyboard users.
6984      // See: https://github.com/WordPress/gutenberg/issues/3486
6985      ,
6986      "aria-disabled": !hasRedo,
6987      onClick: hasRedo ? redo : undefined,
6988      className: "editor-history__redo"
6989    });
6990  }
6991  
6992  /* harmony default export */ var editor_history_redo = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select) {
6993    return {
6994      hasRedo: select('core/editor').hasEditorRedo()
6995    };
6996  }), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
6997    return {
6998      redo: dispatch('core/editor').redo
6999    };
7000  })])(EditorHistoryRedo));
7001  
7002  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/editor-history/undo.js
7003  
7004  
7005  /**
7006   * WordPress dependencies
7007   */
7008  
7009  
7010  
7011  
7012  
7013  
7014  function EditorHistoryUndo(_ref) {
7015    var hasUndo = _ref.hasUndo,
7016        undo = _ref.undo;
7017    return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["IconButton"], {
7018      icon: "undo",
7019      label: Object(external_this_wp_i18n_["__"])('Undo'),
7020      shortcut: external_this_wp_keycodes_["displayShortcut"].primary('z') // If there are no undo levels we don't want to actually disable this
7021      // button, because it will remove focus for keyboard users.
7022      // See: https://github.com/WordPress/gutenberg/issues/3486
7023      ,
7024      "aria-disabled": !hasUndo,
7025      onClick: hasUndo ? undo : undefined,
7026      className: "editor-history__undo"
7027    });
7028  }
7029  
7030  /* harmony default export */ var editor_history_undo = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select) {
7031    return {
7032      hasUndo: select('core/editor').hasEditorUndo()
7033    };
7034  }), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
7035    return {
7036      undo: dispatch('core/editor').undo
7037    };
7038  })])(EditorHistoryUndo));
7039  
7040  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js + 1 modules
7041  var objectWithoutProperties = __webpack_require__(21);
7042  
7043  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/template-validation-notice/index.js
7044  
7045  
7046  
7047  /**
7048   * WordPress dependencies
7049   */
7050  
7051  
7052  
7053  
7054  
7055  function TemplateValidationNotice(_ref) {
7056    var isValid = _ref.isValid,
7057        props = Object(objectWithoutProperties["a" /* default */])(_ref, ["isValid"]);
7058  
7059    if (isValid) {
7060      return null;
7061    }
7062  
7063    var confirmSynchronization = function confirmSynchronization() {
7064      // eslint-disable-next-line no-alert
7065      if (window.confirm(Object(external_this_wp_i18n_["__"])('Resetting the template may result in loss of content, do you want to continue?'))) {
7066        props.synchronizeTemplate();
7067      }
7068    };
7069  
7070    return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Notice"], {
7071      className: "editor-template-validation-notice",
7072      isDismissible: false,
7073      status: "warning"
7074    }, Object(external_this_wp_element_["createElement"])("p", null, Object(external_this_wp_i18n_["__"])('The content of your post doesn’t match the template assigned to your post type.')), Object(external_this_wp_element_["createElement"])("div", null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
7075      isDefault: true,
7076      onClick: props.resetTemplateValidity
7077    }, Object(external_this_wp_i18n_["__"])('Keep it as is')), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
7078      onClick: confirmSynchronization,
7079      isPrimary: true
7080    }, Object(external_this_wp_i18n_["__"])('Reset the template'))));
7081  }
7082  
7083  /* harmony default export */ var template_validation_notice = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select) {
7084    return {
7085      isValid: select('core/block-editor').isValidTemplate()
7086    };
7087  }), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
7088    var _dispatch = dispatch('core/block-editor'),
7089        setTemplateValidity = _dispatch.setTemplateValidity,
7090        synchronizeTemplate = _dispatch.synchronizeTemplate;
7091  
7092    return {
7093      resetTemplateValidity: function resetTemplateValidity() {
7094        return setTemplateValidity(true);
7095      },
7096      synchronizeTemplate: synchronizeTemplate
7097    };
7098  })])(TemplateValidationNotice));
7099  
7100  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/editor-notices/index.js
7101  
7102  
7103  /**
7104   * External dependencies
7105   */
7106  
7107  /**
7108   * WordPress dependencies
7109   */
7110  
7111  
7112  
7113  
7114  /**
7115   * Internal dependencies
7116   */
7117  
7118  
7119  function EditorNotices(_ref) {
7120    var notices = _ref.notices,
7121        onRemove = _ref.onRemove;
7122    var dismissibleNotices = Object(external_lodash_["filter"])(notices, {
7123      isDismissible: true,
7124      type: 'default'
7125    });
7126    var nonDismissibleNotices = Object(external_lodash_["filter"])(notices, {
7127      isDismissible: false,
7128      type: 'default'
7129    });
7130    var snackbarNotices = Object(external_lodash_["filter"])(notices, {
7131      type: 'snackbar'
7132    });
7133    return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["NoticeList"], {
7134      notices: nonDismissibleNotices,
7135      className: "components-editor-notices__pinned"
7136    }), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["NoticeList"], {
7137      notices: dismissibleNotices,
7138      className: "components-editor-notices__dismissible",
7139      onRemove: onRemove
7140    }, Object(external_this_wp_element_["createElement"])(template_validation_notice, null)), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["SnackbarList"], {
7141      notices: snackbarNotices,
7142      className: "components-editor-notices__snackbar",
7143      onRemove: onRemove
7144    }));
7145  }
7146  /* harmony default export */ var editor_notices = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select) {
7147    return {
7148      notices: select('core/notices').getNotices()
7149    };
7150  }), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
7151    return {
7152      onRemove: dispatch('core/notices').removeNotice
7153    };
7154  })])(EditorNotices));
7155  
7156  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/error-boundary/index.js
7157  
7158  
7159  
7160  
7161  
7162  
7163  
7164  
7165  /**
7166   * WordPress dependencies
7167   */
7168  
7169  
7170  
7171  
7172  
7173  
7174  var error_boundary_ErrorBoundary =
7175  /*#__PURE__*/
7176  function (_Component) {
7177    Object(inherits["a" /* default */])(ErrorBoundary, _Component);
7178  
7179    function ErrorBoundary() {
7180      var _this;
7181  
7182      Object(classCallCheck["a" /* default */])(this, ErrorBoundary);
7183  
7184      _this = Object(possibleConstructorReturn["a" /* default */])(this, Object(getPrototypeOf["a" /* default */])(ErrorBoundary).apply(this, arguments));
7185      _this.reboot = _this.reboot.bind(Object(assertThisInitialized["a" /* default */])(_this));
7186      _this.getContent = _this.getContent.bind(Object(assertThisInitialized["a" /* default */])(_this));
7187      _this.state = {
7188        error: null
7189      };
7190      return _this;
7191    }
7192  
7193    Object(createClass["a" /* default */])(ErrorBoundary, [{
7194      key: "componentDidCatch",
7195      value: function componentDidCatch(error) {
7196        this.setState({
7197          error: error
7198        });
7199      }
7200    }, {
7201      key: "reboot",
7202      value: function reboot() {
7203        this.props.onError();
7204      }
7205    }, {
7206      key: "getContent",
7207      value: function getContent() {
7208        try {
7209          // While `select` in a component is generally discouraged, it is
7210          // used here because it (a) reduces the chance of data loss in the
7211          // case of additional errors by performing a direct retrieval and
7212          // (b) avoids the performance cost associated with unnecessary
7213          // content serialization throughout the lifetime of a non-erroring
7214          // application.
7215          return Object(external_this_wp_data_["select"])('core/editor').getEditedPostContent();
7216        } catch (error) {}
7217      }
7218    }, {
7219      key: "render",
7220      value: function render() {
7221        var error = this.state.error;
7222  
7223        if (!error) {
7224          return this.props.children;
7225        }
7226  
7227        return Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["Warning"], {
7228          className: "editor-error-boundary",
7229          actions: [Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
7230            key: "recovery",
7231            onClick: this.reboot,
7232            isLarge: true
7233          }, Object(external_this_wp_i18n_["__"])('Attempt Recovery')), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ClipboardButton"], {
7234            key: "copy-post",
7235            text: this.getContent,
7236            isLarge: true
7237          }, Object(external_this_wp_i18n_["__"])('Copy Post Text')), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ClipboardButton"], {
7238            key: "copy-error",
7239            text: error.stack,
7240            isLarge: true
7241          }, Object(external_this_wp_i18n_["__"])('Copy Error'))]
7242        }, Object(external_this_wp_i18n_["__"])('The editor has encountered an unexpected error.'));
7243      }
7244    }]);
7245  
7246    return ErrorBoundary;
7247  }(external_this_wp_element_["Component"]);
7248  
7249  /* harmony default export */ var error_boundary = (error_boundary_ErrorBoundary);
7250  
7251  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/local-autosave-monitor/index.js
7252  
7253  
7254  /**
7255   * External dependencies
7256   */
7257  
7258  /**
7259   * WordPress dependencies
7260   */
7261  
7262  
7263  
7264  
7265  
7266  
7267  /**
7268   * Internal dependencies
7269   */
7270  
7271  
7272  var requestIdleCallback = window.requestIdleCallback ? window.requestIdleCallback : window.requestAnimationFrame;
7273  /**
7274   * Function which returns true if the current environment supports browser
7275   * sessionStorage, or false otherwise. The result of this function is cached and
7276   * reused in subsequent invocations.
7277   */
7278  
7279  var hasSessionStorageSupport = Object(external_lodash_["once"])(function () {
7280    try {
7281      // Private Browsing in Safari 10 and earlier will throw an error when
7282      // attempting to set into sessionStorage. The test here is intentional in
7283      // causing a thrown error as condition bailing from local autosave.
7284      window.sessionStorage.setItem('__wpEditorTestSessionStorage', '');
7285      window.sessionStorage.removeItem('__wpEditorTestSessionStorage');
7286      return true;
7287    } catch (error) {
7288      return false;
7289    }
7290  });
7291  /**
7292   * Function returning a sessionStorage key to set or retrieve a given post's
7293   * automatic session backup.
7294   *
7295   * Keys are crucially prefixed with 'wp-autosave-' so that wp-login.php's
7296   * `loggedout` handler can clear sessionStorage of any user-private content.
7297   *
7298   * @see https://github.com/WordPress/wordpress-develop/blob/6dad32d2aed47e6c0cf2aee8410645f6d7aba6bd/src/wp-login.php#L103
7299   *
7300   * @param {string} postId  Post ID.
7301   * @return {string}        sessionStorage key
7302   */
7303  
7304  function postKey(postId) {
7305    return "wp-autosave-block-editor-post-".concat(postId);
7306  }
7307  /**
7308   * Custom hook which returns a callback function to be invoked when a local
7309   * autosave should occur.
7310   *
7311   * @return {Function} Callback function.
7312   */
7313  
7314  
7315  function useAutosaveCallback() {
7316    var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
7317      return {
7318        postId: select('core/editor').getCurrentPostId(),
7319        getEditedPostAttribute: select('core/editor').getEditedPostAttribute
7320      };
7321    }),
7322        postId = _useSelect.postId,
7323        getEditedPostAttribute = _useSelect.getEditedPostAttribute;
7324  
7325    return Object(external_this_wp_element_["useCallback"])(function () {
7326      var saveToSessionStorage = function saveToSessionStorage() {
7327        window.sessionStorage.setItem(postKey(postId), JSON.stringify({
7328          post_title: getEditedPostAttribute('title'),
7329          content: getEditedPostAttribute('content'),
7330          excerpt: getEditedPostAttribute('excerpt')
7331        }));
7332      };
7333  
7334      requestIdleCallback(saveToSessionStorage);
7335    }, [postId]);
7336  }
7337  /**
7338   * Custom hook which manages the creation of a notice prompting the user to
7339   * restore a local autosave, if one exists.
7340   */
7341  
7342  
7343  function useAutosaveNotice() {
7344    var _useSelect2 = Object(external_this_wp_data_["useSelect"])(function (select) {
7345      return {
7346        postId: select('core/editor').getCurrentPostId(),
7347        getEditedPostAttribute: select('core/editor').getEditedPostAttribute
7348      };
7349    }),
7350        postId = _useSelect2.postId,
7351        getEditedPostAttribute = _useSelect2.getEditedPostAttribute;
7352  
7353    var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/notices'),
7354        createWarningNotice = _useDispatch.createWarningNotice,
7355        removeNotice = _useDispatch.removeNotice;
7356  
7357    var _useDispatch2 = Object(external_this_wp_data_["useDispatch"])('core/editor'),
7358        editPost = _useDispatch2.editPost,
7359        resetEditorBlocks = _useDispatch2.resetEditorBlocks;
7360  
7361    Object(external_this_wp_element_["useEffect"])(function () {
7362      var autosave = window.sessionStorage.getItem(postKey(postId));
7363  
7364      if (!autosave) {
7365        return;
7366      }
7367  
7368      try {
7369        autosave = JSON.parse(autosave);
7370      } catch (error) {
7371        // Not usable if it can't be parsed.
7372        return;
7373      }
7374  
7375      var _autosave = autosave,
7376          title = _autosave.post_title,
7377          content = _autosave.content,
7378          excerpt = _autosave.excerpt;
7379      var edits = {
7380        title: title,
7381        content: content,
7382        excerpt: excerpt
7383      }; // Only display a notice if there is a difference between what has been
7384      // saved and that which is stored in sessionStorage.
7385  
7386      var hasDifference = Object.keys(edits).some(function (key) {
7387        return edits[key] !== getEditedPostAttribute(key);
7388      });
7389  
7390      if (!hasDifference) {
7391        // If there is no difference, it can be safely ejected from storage.
7392        window.sessionStorage.removeItem(postKey(postId));
7393        return;
7394      }
7395  
7396      var noticeId = Object(external_lodash_["uniqueId"])('wpEditorAutosaveRestore');
7397      createWarningNotice(Object(external_this_wp_i18n_["__"])('The backup of this post in your browser is different from the version below.'), {
7398        id: noticeId,
7399        actions: [{
7400          label: Object(external_this_wp_i18n_["__"])('Restore the backup'),
7401          onClick: function onClick() {
7402            editPost(Object(external_lodash_["omit"])(edits, ['content']));
7403            resetEditorBlocks(Object(external_this_wp_blocks_["parse"])(edits.content));
7404            removeNotice(noticeId);
7405          }
7406        }]
7407      });
7408    }, [postId]);
7409  }
7410  /**
7411   * Custom hook which ejects a local autosave after a successful save occurs.
7412   */
7413  
7414  
7415  function useAutosavePurge() {
7416    var _useSelect3 = Object(external_this_wp_data_["useSelect"])(function (select) {
7417      return {
7418        postId: select('core/editor').getCurrentPostId(),
7419        isDirty: select('core/editor').isEditedPostDirty()
7420      };
7421    }),
7422        postId = _useSelect3.postId,
7423        isDirty = _useSelect3.isDirty;
7424  
7425    var lastIsDirty = Object(external_this_wp_element_["useRef"])(isDirty);
7426    Object(external_this_wp_element_["useEffect"])(function () {
7427      if (lastIsDirty.current && !isDirty) {
7428        window.sessionStorage.removeItem(postKey(postId));
7429      }
7430  
7431      lastIsDirty.current = isDirty;
7432    }, [isDirty]);
7433  }
7434  
7435  function LocalAutosaveMonitor() {
7436    var autosave = useAutosaveCallback();
7437    useAutosaveNotice();
7438    useAutosavePurge();
7439  
7440    var _useSelect4 = Object(external_this_wp_data_["useSelect"])(function (select) {
7441      return {
7442        localAutosaveInterval: select('core/editor').getEditorSettings().__experimentalLocalAutosaveInterval
7443      };
7444    }),
7445        localAutosaveInterval = _useSelect4.localAutosaveInterval;
7446  
7447    return Object(external_this_wp_element_["createElement"])(autosave_monitor, {
7448      interval: localAutosaveInterval,
7449      autosave: autosave,
7450      shouldThrottle: true
7451    });
7452  }
7453  
7454  /* harmony default export */ var local_autosave_monitor = (Object(external_this_wp_compose_["ifCondition"])(hasSessionStorageSupport)(LocalAutosaveMonitor));
7455  
7456  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/page-attributes/check.js
7457  /**
7458   * External dependencies
7459   */
7460  
7461  /**
7462   * WordPress dependencies
7463   */
7464  
7465  
7466  function PageAttributesCheck(_ref) {
7467    var availableTemplates = _ref.availableTemplates,
7468        postType = _ref.postType,
7469        children = _ref.children;
7470    var supportsPageAttributes = Object(external_lodash_["get"])(postType, ['supports', 'page-attributes'], false); // Only render fields if post type supports page attributes or available templates exist.
7471  
7472    if (!supportsPageAttributes && Object(external_lodash_["isEmpty"])(availableTemplates)) {
7473      return null;
7474    }
7475  
7476    return children;
7477  }
7478  /* harmony default export */ var page_attributes_check = (Object(external_this_wp_data_["withSelect"])(function (select) {
7479    var _select = select('core/editor'),
7480        getEditedPostAttribute = _select.getEditedPostAttribute,
7481        getEditorSettings = _select.getEditorSettings;
7482  
7483    var _select2 = select('core'),
7484        getPostType = _select2.getPostType;
7485  
7486    var _getEditorSettings = getEditorSettings(),
7487        availableTemplates = _getEditorSettings.availableTemplates;
7488  
7489    return {
7490      postType: getPostType(getEditedPostAttribute('type')),
7491      availableTemplates: availableTemplates
7492    };
7493  })(PageAttributesCheck));
7494  
7495  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-type-support-check/index.js
7496  /**
7497   * External dependencies
7498   */
7499  
7500  /**
7501   * WordPress dependencies
7502   */
7503  
7504  
7505  /**
7506   * A component which renders its own children only if the current editor post
7507   * type supports one of the given `supportKeys` prop.
7508   *
7509   * @param {Object}            props
7510   * @param {string}            [props.postType]  Current post type.
7511   * @param {WPElement}         props.children    Children to be rendered if post
7512   *                                              type supports.
7513   * @param {(string|string[])} props.supportKeys String or string array of keys
7514   *                                              to test.
7515   *
7516   * @return {WPElement} Rendered element.
7517   */
7518  
7519  function PostTypeSupportCheck(_ref) {
7520    var postType = _ref.postType,
7521        children = _ref.children,
7522        supportKeys = _ref.supportKeys;
7523    var isSupported = true;
7524  
7525    if (postType) {
7526      isSupported = Object(external_lodash_["some"])(Object(external_lodash_["castArray"])(supportKeys), function (key) {
7527        return !!postType.supports[key];
7528      });
7529    }
7530  
7531    if (!isSupported) {
7532      return null;
7533    }
7534  
7535    return children;
7536  }
7537  /* harmony default export */ var post_type_support_check = (Object(external_this_wp_data_["withSelect"])(function (select) {
7538    var _select = select('core/editor'),
7539        getEditedPostAttribute = _select.getEditedPostAttribute;
7540  
7541    var _select2 = select('core'),
7542        getPostType = _select2.getPostType;
7543  
7544    return {
7545      postType: getPostType(getEditedPostAttribute('type'))
7546    };
7547  })(PostTypeSupportCheck));
7548  
7549  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/page-attributes/order.js
7550  
7551  
7552  /**
7553   * External dependencies
7554   */
7555  
7556  /**
7557   * WordPress dependencies
7558   */
7559  
7560  
7561  
7562  
7563  
7564  /**
7565   * Internal dependencies
7566   */
7567  
7568  
7569  var PageAttributesOrder = Object(external_this_wp_compose_["withState"])({
7570    orderInput: null
7571  })(function (_ref) {
7572    var onUpdateOrder = _ref.onUpdateOrder,
7573        _ref$order = _ref.order,
7574        order = _ref$order === void 0 ? 0 : _ref$order,
7575        orderInput = _ref.orderInput,
7576        setState = _ref.setState;
7577  
7578    var setUpdatedOrder = function setUpdatedOrder(value) {
7579      setState({
7580        orderInput: value
7581      });
7582      var newOrder = Number(value);
7583  
7584      if (Number.isInteger(newOrder) && Object(external_lodash_["invoke"])(value, ['trim']) !== '') {
7585        onUpdateOrder(Number(value));
7586      }
7587    };
7588  
7589    var value = orderInput === null ? order : orderInput;
7590    return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["TextControl"], {
7591      className: "editor-page-attributes__order",
7592      type: "number",
7593      label: Object(external_this_wp_i18n_["__"])('Order'),
7594      value: value,
7595      onChange: setUpdatedOrder,
7596      size: 6,
7597      onBlur: function onBlur() {
7598        setState({
7599          orderInput: null
7600        });
7601      }
7602    });
7603  });
7604  
7605  function PageAttributesOrderWithChecks(props) {
7606    return Object(external_this_wp_element_["createElement"])(post_type_support_check, {
7607      supportKeys: "page-attributes"
7608    }, Object(external_this_wp_element_["createElement"])(PageAttributesOrder, props));
7609  }
7610  
7611  /* harmony default export */ var page_attributes_order = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select) {
7612    return {
7613      order: select('core/editor').getEditedPostAttribute('menu_order')
7614    };
7615  }), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
7616    return {
7617      onUpdateOrder: function onUpdateOrder(order) {
7618        dispatch('core/editor').editPost({
7619          menu_order: order
7620        });
7621      }
7622    };
7623  })])(PageAttributesOrderWithChecks));
7624  
7625  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/utils/terms.js
7626  
7627  
7628  /**
7629   * External dependencies
7630   */
7631  
7632  /**
7633   * Returns terms in a tree form.
7634   *
7635   * @param {Array} flatTerms  Array of terms in flat format.
7636   *
7637   * @return {Array} Array of terms in tree format.
7638   */
7639  
7640  function buildTermsTree(flatTerms) {
7641    var flatTermsWithParentAndChildren = flatTerms.map(function (term) {
7642      return Object(objectSpread["a" /* default */])({
7643        children: [],
7644        parent: null
7645      }, term);
7646    });
7647    var termsByParent = Object(external_lodash_["groupBy"])(flatTermsWithParentAndChildren, 'parent');
7648  
7649    if (termsByParent.null && termsByParent.null.length) {
7650      return flatTermsWithParentAndChildren;
7651    }
7652  
7653    var fillWithChildren = function fillWithChildren(terms) {
7654      return terms.map(function (term) {
7655        var children = termsByParent[term.id];
7656        return Object(objectSpread["a" /* default */])({}, term, {
7657          children: children && children.length ? fillWithChildren(children) : []
7658        });
7659      });
7660    };
7661  
7662    return fillWithChildren(termsByParent['0'] || []);
7663  }
7664  
7665  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/page-attributes/parent.js
7666  
7667  
7668  /**
7669   * External dependencies
7670   */
7671  
7672  /**
7673   * WordPress dependencies
7674   */
7675  
7676  
7677  
7678  
7679  
7680  /**
7681   * Internal dependencies
7682   */
7683  
7684  
7685  function PageAttributesParent(_ref) {
7686    var parent = _ref.parent,
7687        postType = _ref.postType,
7688        items = _ref.items,
7689        onUpdateParent = _ref.onUpdateParent;
7690    var isHierarchical = Object(external_lodash_["get"])(postType, ['hierarchical'], false);
7691    var parentPageLabel = Object(external_lodash_["get"])(postType, ['labels', 'parent_item_colon']);
7692    var pageItems = items || [];
7693  
7694    if (!isHierarchical || !parentPageLabel || !pageItems.length) {
7695      return null;
7696    }
7697  
7698    var pagesTree = buildTermsTree(pageItems.map(function (item) {
7699      return {
7700        id: item.id,
7701        parent: item.parent,
7702        name: item.title.raw ? item.title.raw : "#".concat(item.id, " (").concat(Object(external_this_wp_i18n_["__"])('no title'), ")")
7703      };
7704    }));
7705    return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["TreeSelect"], {
7706      className: "editor-page-attributes__parent",
7707      label: parentPageLabel,
7708      noOptionLabel: "(".concat(Object(external_this_wp_i18n_["__"])('no parent'), ")"),
7709      tree: pagesTree,
7710      selectedId: parent,
7711      onChange: onUpdateParent
7712    });
7713  }
7714  var applyWithSelect = Object(external_this_wp_data_["withSelect"])(function (select) {
7715    var _select = select('core'),
7716        getPostType = _select.getPostType,
7717        getEntityRecords = _select.getEntityRecords;
7718  
7719    var _select2 = select('core/editor'),
7720        getCurrentPostId = _select2.getCurrentPostId,
7721        getEditedPostAttribute = _select2.getEditedPostAttribute;
7722  
7723    var postTypeSlug = getEditedPostAttribute('type');
7724    var postType = getPostType(postTypeSlug);
7725    var postId = getCurrentPostId();
7726    var isHierarchical = Object(external_lodash_["get"])(postType, ['hierarchical'], false);
7727    var query = {
7728      per_page: -1,
7729      exclude: postId,
7730      parent_exclude: postId,
7731      orderby: 'menu_order',
7732      order: 'asc'
7733    };
7734    return {
7735      parent: getEditedPostAttribute('parent'),
7736      items: isHierarchical ? getEntityRecords('postType', postTypeSlug, query) : [],
7737      postType: postType
7738    };
7739  });
7740  var applyWithDispatch = Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
7741    var _dispatch = dispatch('core/editor'),
7742        editPost = _dispatch.editPost;
7743  
7744    return {
7745      onUpdateParent: function onUpdateParent(parent) {
7746        editPost({
7747          parent: parent || 0
7748        });
7749      }
7750    };
7751  });
7752  /* harmony default export */ var page_attributes_parent = (Object(external_this_wp_compose_["compose"])([applyWithSelect, applyWithDispatch])(PageAttributesParent));
7753  
7754  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/page-attributes/template.js
7755  
7756  
7757  /**
7758   * External dependencies
7759   */
7760  
7761  /**
7762   * WordPress dependencies
7763   */
7764  
7765  
7766  
7767  
7768  
7769  function PageTemplate(_ref) {
7770    var availableTemplates = _ref.availableTemplates,
7771        selectedTemplate = _ref.selectedTemplate,
7772        onUpdate = _ref.onUpdate;
7773  
7774    if (Object(external_lodash_["isEmpty"])(availableTemplates)) {
7775      return null;
7776    }
7777  
7778    return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["SelectControl"], {
7779      label: Object(external_this_wp_i18n_["__"])('Template:'),
7780      value: selectedTemplate,
7781      onChange: onUpdate,
7782      className: "editor-page-attributes__template",
7783      options: Object(external_lodash_["map"])(availableTemplates, function (templateName, templateSlug) {
7784        return {
7785          value: templateSlug,
7786          label: templateName
7787        };
7788      })
7789    });
7790  }
7791  /* harmony default export */ var page_attributes_template = (Object(external_this_wp_compose_["compose"])(Object(external_this_wp_data_["withSelect"])(function (select) {
7792    var _select = select('core/editor'),
7793        getEditedPostAttribute = _select.getEditedPostAttribute,
7794        getEditorSettings = _select.getEditorSettings;
7795  
7796    var _getEditorSettings = getEditorSettings(),
7797        availableTemplates = _getEditorSettings.availableTemplates;
7798  
7799    return {
7800      selectedTemplate: getEditedPostAttribute('template'),
7801      availableTemplates: availableTemplates
7802    };
7803  }), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
7804    return {
7805      onUpdate: function onUpdate(templateSlug) {
7806        dispatch('core/editor').editPost({
7807          template: templateSlug || ''
7808        });
7809      }
7810    };
7811  }))(PageTemplate));
7812  
7813  // EXTERNAL MODULE: external {"this":["wp","htmlEntities"]}
7814  var external_this_wp_htmlEntities_ = __webpack_require__(54);
7815  
7816  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-author/check.js
7817  
7818  
7819  /**
7820   * External dependencies
7821   */
7822  
7823  /**
7824   * WordPress dependencies
7825   */
7826  
7827  
7828  
7829  /**
7830   * Internal dependencies
7831   */
7832  
7833  
7834  function PostAuthorCheck(_ref) {
7835    var hasAssignAuthorAction = _ref.hasAssignAuthorAction,
7836        authors = _ref.authors,
7837        children = _ref.children;
7838  
7839    if (!hasAssignAuthorAction || authors.length < 2) {
7840      return null;
7841    }
7842  
7843    return Object(external_this_wp_element_["createElement"])(post_type_support_check, {
7844      supportKeys: "author"
7845    }, children);
7846  }
7847  /* harmony default export */ var post_author_check = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select) {
7848    var post = select('core/editor').getCurrentPost();
7849    return {
7850      hasAssignAuthorAction: Object(external_lodash_["get"])(post, ['_links', 'wp:action-assign-author'], false),
7851      postType: select('core/editor').getCurrentPostType(),
7852      authors: select('core').getAuthors()
7853    };
7854  }), external_this_wp_compose_["withInstanceId"]])(PostAuthorCheck));
7855  
7856  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-author/index.js
7857  
7858  
7859  
7860  
7861  
7862  
7863  
7864  
7865  /**
7866   * WordPress dependencies
7867   */
7868  
7869  
7870  
7871  
7872  
7873  /**
7874   * Internal dependencies
7875   */
7876  
7877  
7878  var post_author_PostAuthor =
7879  /*#__PURE__*/
7880  function (_Component) {
7881    Object(inherits["a" /* default */])(PostAuthor, _Component);
7882  
7883    function PostAuthor() {
7884      var _this;
7885  
7886      Object(classCallCheck["a" /* default */])(this, PostAuthor);
7887  
7888      _this = Object(possibleConstructorReturn["a" /* default */])(this, Object(getPrototypeOf["a" /* default */])(PostAuthor).apply(this, arguments));
7889      _this.setAuthorId = _this.setAuthorId.bind(Object(assertThisInitialized["a" /* default */])(_this));
7890      return _this;
7891    }
7892  
7893    Object(createClass["a" /* default */])(PostAuthor, [{
7894      key: "setAuthorId",
7895      value: function setAuthorId(event) {
7896        var onUpdateAuthor = this.props.onUpdateAuthor;
7897        var value = event.target.value;
7898        onUpdateAuthor(Number(value));
7899      }
7900    }, {
7901      key: "render",
7902      value: function render() {
7903        var _this$props = this.props,
7904            postAuthor = _this$props.postAuthor,
7905            instanceId = _this$props.instanceId,
7906            authors = _this$props.authors;
7907        var selectId = 'post-author-selector-' + instanceId; // Disable reason: A select with an onchange throws a warning
7908  
7909        /* eslint-disable jsx-a11y/no-onchange */
7910  
7911        return Object(external_this_wp_element_["createElement"])(post_author_check, null, Object(external_this_wp_element_["createElement"])("label", {
7912          htmlFor: selectId
7913        }, Object(external_this_wp_i18n_["__"])('Author')), Object(external_this_wp_element_["createElement"])("select", {
7914          id: selectId,
7915          value: postAuthor,
7916          onChange: this.setAuthorId,
7917          className: "editor-post-author__select"
7918        }, authors.map(function (author) {
7919          return Object(external_this_wp_element_["createElement"])("option", {
7920            key: author.id,
7921            value: author.id
7922          }, Object(external_this_wp_htmlEntities_["decodeEntities"])(author.name));
7923        })));
7924        /* eslint-enable jsx-a11y/no-onchange */
7925      }
7926    }]);
7927  
7928    return PostAuthor;
7929  }(external_this_wp_element_["Component"]);
7930  /* harmony default export */ var post_author = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select) {
7931    return {
7932      postAuthor: select('core/editor').getEditedPostAttribute('author'),
7933      authors: select('core').getAuthors()
7934    };
7935  }), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
7936    return {
7937      onUpdateAuthor: function onUpdateAuthor(author) {
7938        dispatch('core/editor').editPost({
7939          author: author
7940        });
7941      }
7942    };
7943  }), external_this_wp_compose_["withInstanceId"]])(post_author_PostAuthor));
7944  
7945  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-comments/index.js
7946  
7947  
7948  
7949  /**
7950   * WordPress dependencies
7951   */
7952  
7953  
7954  
7955  
7956  
7957  function PostComments(_ref) {
7958    var _ref$commentStatus = _ref.commentStatus,
7959        commentStatus = _ref$commentStatus === void 0 ? 'open' : _ref$commentStatus,
7960        props = Object(objectWithoutProperties["a" /* default */])(_ref, ["commentStatus"]);
7961  
7962    var onToggleComments = function onToggleComments() {
7963      return props.editPost({
7964        comment_status: commentStatus === 'open' ? 'closed' : 'open'
7965      });
7966    };
7967  
7968    return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["CheckboxControl"], {
7969      label: Object(external_this_wp_i18n_["__"])('Allow Comments'),
7970      checked: commentStatus === 'open',
7971      onChange: onToggleComments
7972    });
7973  }
7974  
7975  /* harmony default export */ var post_comments = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select) {
7976    return {
7977      commentStatus: select('core/editor').getEditedPostAttribute('comment_status')
7978    };
7979  }), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
7980    return {
7981      editPost: dispatch('core/editor').editPost
7982    };
7983  })])(PostComments));
7984  
7985  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-excerpt/index.js
7986  
7987  
7988  /**
7989   * WordPress dependencies
7990   */
7991  
7992  
7993  
7994  
7995  
7996  function PostExcerpt(_ref) {
7997    var excerpt = _ref.excerpt,
7998        onUpdateExcerpt = _ref.onUpdateExcerpt;
7999    return Object(external_this_wp_element_["createElement"])("div", {
8000      className: "editor-post-excerpt"
8001    }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["TextareaControl"], {
8002      label: Object(external_this_wp_i18n_["__"])('Write an excerpt (optional)'),
8003      className: "editor-post-excerpt__textarea",
8004      onChange: function onChange(value) {
8005        return onUpdateExcerpt(value);
8006      },
8007      value: excerpt
8008    }), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ExternalLink"], {
8009      href: Object(external_this_wp_i18n_["__"])('https://codex.wordpress.org/Excerpt')
8010    }, Object(external_this_wp_i18n_["__"])('Learn more about manual excerpts')));
8011  }
8012  
8013  /* harmony default export */ var post_excerpt = (Object(external_this_wp_compose_["compose"])([Object(external_this_wp_data_["withSelect"])(function (select) {
8014    return {
8015      excerpt: select('core/editor').getEditedPostAttribute('excerpt')
8016    };
8017  }), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
8018    return {
8019      onUpdateExcerpt: function onUpdateExcerpt(excerpt) {
8020        dispatch('core/editor').editPost({
8021          excerpt: excerpt
8022        });
8023      }
8024    };
8025  })])(PostExcerpt));
8026  
8027  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
8028  var esm_extends = __webpack_require__(18);
8029  
8030  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-excerpt/check.js
8031  
8032  
8033  
8034  /**
8035   * Internal dependencies
8036   */
8037  
8038  
8039  function PostExcerptCheck(props) {
8040    return Object(external_this_wp_element_["createElement"])(post_type_support_check, Object(esm_extends["a" /* default */])({}, props, {
8041      supportKeys: "excerpt"
8042    }));
8043  }
8044  
8045  /* harmony default export */ var post_excerpt_check = (PostExcerptCheck);
8046  
8047  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/theme-support-check/index.js
8048  /**
8049   * External dependencies
8050   */
8051  
8052  /**
8053   * WordPress dependencies
8054   */
8055  
8056  
8057  function ThemeSupportCheck(_ref) {
8058    var themeSupports = _ref.themeSupports,
8059        children = _ref.children,
8060        postType = _ref.postType,
8061        supportKeys = _ref.supportKeys;
8062    var isSupported = Object(external_lodash_["some"])(Object(external_lodash_["castArray"])(supportKeys), function (key) {
8063      var supported = Object(external_lodash_["get"])(themeSupports, [key], false); // 'post-thumbnails' can be boolean or an array of post types.
8064      // In the latter case, we need to verify `postType` exists
8065      // within `supported`. If `postType` isn't passed, then the check
8066      // should fail.
8067  
8068      if ('post-thumbnails' === key && Object(external_lodash_["isArray"])(supported)) {
8069        return Object(external_lodash_["includes"])(supported, postType);
8070      }
8071  
8072      return supported;
8073    });
8074  
8075    if (!isSupported) {
8076      return null;
8077    }
8078  
8079    return children;
8080  }
8081  /* harmony default export */ var theme_support_check = (Object(external_this_wp_data_["withSelect"])(function (select) {
8082    var _select = select('core'),
8083        getThemeSupports = _select.getThemeSupports;
8084  
8085    var _select2 = select('core/editor'),
8086        getEditedPostAttribute = _select2.getEditedPostAttribute;
8087  
8088    return {
8089      postType: getEditedPostAttribute('type'),
8090      themeSupports: getThemeSupports()
8091    };
8092  })(ThemeSupportCheck));
8093  
8094  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-featured-image/check.js
8095  
8096  
8097  
8098  /**
8099   * Internal dependencies
8100   */
8101  
8102  
8103  
8104  function PostFeaturedImageCheck(props) {
8105    return Object(external_this_wp_element_["createElement"])(theme_support_check, {
8106      supportKeys: "post-thumbnails"
8107    }, Object(external_this_wp_element_["createElement"])(post_type_support_check, Object(esm_extends["a" /* default */])({}, props, {
8108      supportKeys: "thumbnail"
8109    })));
8110  }
8111  
8112  /* harmony default export */ var post_featured_image_check = (PostFeaturedImageCheck);
8113  
8114  // CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/post-featured-image/index.js
8115  
8116  
8117  /**
8118   * External dependencies
8119   */
8120  
8121  /**
8122   * WordPress dependencies
8123   */
8124  
8125  
8126  
8127  
8128  
8129  
8130  
8131  /**
8132   * Internal dependencies
8133   */
8134  
8135  
8136  var ALLOWED_MEDIA_TYPES = ['image']; // Used when labels from post type were not yet loaded or when they are not present.
8137  
8138  var DEFAULT_FEATURE_IMAGE_LABEL = Object(external_this_wp_i18n_["__"])('Featured Image');
8139  
8140  var DEFAULT_SET_FEATURE_IMAGE_LABEL = Object(external_this_wp_i18n_["__"])('Set Featured Image');
8141  
8142  var DEFAULT_REMOVE_FEATURE_IMAGE_LABEL = Object(external_this_wp_i18n_["__"])('Remove Image');
8143  
8144  function PostFeaturedImage(_ref) {
8145    var currentPostId = _ref.currentPostId,
8146        featuredImageId = _ref.featuredImageId,
8147        onUpdateImage = _ref.onUpdateImage,
8148        onRemoveImage = _ref.onRemoveImage,
8149        media = _ref.media,
8150        postType = _ref.postType;
8151    var postLabel = Object(external_lodash_["get"])(postType, ['labels'], {});
8152    var instructions = Object(external_this_wp_element_["createElement"])("p", null, Object(external_this_wp_i18n_["__"])('To edit the featured image, you need permission to upload media.'));
8153    var mediaWidth, mediaHeight, mediaSourceUrl;
8154  
8155    if (media) {
8156      var mediaSize = Object(external_this_wp_hooks_["applyFilters"])('editor.PostFeaturedImage.imageSize', 'post-thumbnail', media.id, currentPostId);
8157  
8158      if (Object(external_lodash_["has"])(media, ['media_details', 'sizes', mediaSize])) {
8159        mediaWidth = media.media_details.sizes[mediaSize].width;
8160        mediaHeight = media.media_details.sizes[mediaSize].height;
8161        mediaSourceUrl = media.media_details.sizes[mediaSize].source_url;
8162      } else {
8163        mediaWidth = media.media_details.width;
8164        mediaHeight = media.media_details.height;
8165        mediaSourceUrl = media.source_url;
8166      }
8167    }
8168  
8169    return Object(external_this_wp_element_["createElement"])(post_featured_image_check, null, Object(external_this_wp_element_["createElement"])("div", {
8170      className: "editor-post-featured-image"
8171    }, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["MediaUploadCheck"], {
8172      fallback: instructions
8173    }, Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["MediaUpload"], {
8174      title: postLabel.featured_image || DEFAULT_FEATURE_IMAGE_LABEL,
8175      onSelect: onUpdateImage,
8176      unstableFeaturedImageFlow: true,
8177      allowedTypes: ALLOWED_MEDIA_TYPES,
8178      modalClass: !featuredImageId ? 'editor-post-featured-image__media-modal' : 'editor-post-featured-image__media-modal',
8179      render: function render(_ref2) {
8180        var open = _ref2.open;
8181        return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
8182          className: !featuredImageId ? 'editor-post-featured-image__toggle' : 'editor-post-featured-image__preview',
8183          onClick: open,
8184          "aria-label": !featuredImageId ? null : Object(external_this_wp_i18n_["__"])('Edit or update the image')
8185        }, !!featuredImageId && media && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ResponsiveWrapper"], {
8186          naturalWidth: mediaWidth,
8187          naturalHeight: mediaHeight
8188        }, Object(external_this_wp_element_["createElement"])("img", {
8189          src: mediaSourceUrl,
8190          alt: ""
8191        })), !!featuredImageId && !media && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Spinner"], null), !featuredImageId && (postLabel.set_featured_image || DEFAULT_SET_FEATURE_IMAGE_LABEL));
8192      },
8193      value: featuredImageId
8194    })), !!featuredImageId && media && !media.isLoading &&