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