[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/js/dist/ -> core-data.js (source)

   1  this["wp"] = this["wp"] || {}; this["wp"]["coreData"] =
   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 = 370);
  86  /******/ })
  87  /************************************************************************/
  88  /******/ ({
  89  
  90  /***/ 0:
  91  /***/ (function(module, exports) {
  92  
  93  (function() { module.exports = this["wp"]["element"]; }());
  94  
  95  /***/ }),
  96  
  97  /***/ 18:
  98  /***/ (function(module, __webpack_exports__, __webpack_require__) {
  99  
 100  "use strict";
 101  
 102  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
 103  function _arrayWithoutHoles(arr) {
 104    if (Array.isArray(arr)) {
 105      for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {
 106        arr2[i] = arr[i];
 107      }
 108  
 109      return arr2;
 110    }
 111  }
 112  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
 113  var iterableToArray = __webpack_require__(31);
 114  
 115  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
 116  function _nonIterableSpread() {
 117    throw new TypeError("Invalid attempt to spread non-iterable instance");
 118  }
 119  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
 120  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _toConsumableArray; });
 121  
 122  
 123  
 124  function _toConsumableArray(arr) {
 125    return _arrayWithoutHoles(arr) || Object(iterableToArray["a" /* default */])(arr) || _nonIterableSpread();
 126  }
 127  
 128  /***/ }),
 129  
 130  /***/ 2:
 131  /***/ (function(module, exports) {
 132  
 133  (function() { module.exports = this["lodash"]; }());
 134  
 135  /***/ }),
 136  
 137  /***/ 22:
 138  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 139  
 140  "use strict";
 141  
 142  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
 143  var arrayWithHoles = __webpack_require__(35);
 144  
 145  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
 146  function _iterableToArrayLimit(arr, i) {
 147    if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) {
 148      return;
 149    }
 150  
 151    var _arr = [];
 152    var _n = true;
 153    var _d = false;
 154    var _e = undefined;
 155  
 156    try {
 157      for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
 158        _arr.push(_s.value);
 159  
 160        if (i && _arr.length === i) break;
 161      }
 162    } catch (err) {
 163      _d = true;
 164      _e = err;
 165    } finally {
 166      try {
 167        if (!_n && _i["return"] != null) _i["return"]();
 168      } finally {
 169        if (_d) throw _e;
 170      }
 171    }
 172  
 173    return _arr;
 174  }
 175  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
 176  var nonIterableRest = __webpack_require__(36);
 177  
 178  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
 179  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _slicedToArray; });
 180  
 181  
 182  
 183  function _slicedToArray(arr, i) {
 184    return Object(arrayWithHoles["a" /* default */])(arr) || _iterableToArrayLimit(arr, i) || Object(nonIterableRest["a" /* default */])();
 185  }
 186  
 187  /***/ }),
 188  
 189  /***/ 23:
 190  /***/ (function(module, exports) {
 191  
 192  (function() { module.exports = this["regeneratorRuntime"]; }());
 193  
 194  /***/ }),
 195  
 196  /***/ 25:
 197  /***/ (function(module, exports) {
 198  
 199  (function() { module.exports = this["wp"]["url"]; }());
 200  
 201  /***/ }),
 202  
 203  /***/ 31:
 204  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 205  
 206  "use strict";
 207  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterableToArray; });
 208  function _iterableToArray(iter) {
 209    if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
 210  }
 211  
 212  /***/ }),
 213  
 214  /***/ 33:
 215  /***/ (function(module, exports) {
 216  
 217  (function() { module.exports = this["wp"]["deprecated"]; }());
 218  
 219  /***/ }),
 220  
 221  /***/ 34:
 222  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 223  
 224  "use strict";
 225  
 226  
 227  var LEAF_KEY, hasWeakMap;
 228  
 229  /**
 230   * Arbitrary value used as key for referencing cache object in WeakMap tree.
 231   *
 232   * @type {Object}
 233   */
 234  LEAF_KEY = {};
 235  
 236  /**
 237   * Whether environment supports WeakMap.
 238   *
 239   * @type {boolean}
 240   */
 241  hasWeakMap = typeof WeakMap !== 'undefined';
 242  
 243  /**
 244   * Returns the first argument as the sole entry in an array.
 245   *
 246   * @param {*} value Value to return.
 247   *
 248   * @return {Array} Value returned as entry in array.
 249   */
 250  function arrayOf( value ) {
 251      return [ value ];
 252  }
 253  
 254  /**
 255   * Returns true if the value passed is object-like, or false otherwise. A value
 256   * is object-like if it can support property assignment, e.g. object or array.
 257   *
 258   * @param {*} value Value to test.
 259   *
 260   * @return {boolean} Whether value is object-like.
 261   */
 262  function isObjectLike( value ) {
 263      return !! value && 'object' === typeof value;
 264  }
 265  
 266  /**
 267   * Creates and returns a new cache object.
 268   *
 269   * @return {Object} Cache object.
 270   */
 271  function createCache() {
 272      var cache = {
 273          clear: function() {
 274              cache.head = null;
 275          },
 276      };
 277  
 278      return cache;
 279  }
 280  
 281  /**
 282   * Returns true if entries within the two arrays are strictly equal by
 283   * reference from a starting index.
 284   *
 285   * @param {Array}  a         First array.
 286   * @param {Array}  b         Second array.
 287   * @param {number} fromIndex Index from which to start comparison.
 288   *
 289   * @return {boolean} Whether arrays are shallowly equal.
 290   */
 291  function isShallowEqual( a, b, fromIndex ) {
 292      var i;
 293  
 294      if ( a.length !== b.length ) {
 295          return false;
 296      }
 297  
 298      for ( i = fromIndex; i < a.length; i++ ) {
 299          if ( a[ i ] !== b[ i ] ) {
 300              return false;
 301          }
 302      }
 303  
 304      return true;
 305  }
 306  
 307  /**
 308   * Returns a memoized selector function. The getDependants function argument is
 309   * called before the memoized selector and is expected to return an immutable
 310   * reference or array of references on which the selector depends for computing
 311   * its own return value. The memoize cache is preserved only as long as those
 312   * dependant references remain the same. If getDependants returns a different
 313   * reference(s), the cache is cleared and the selector value regenerated.
 314   *
 315   * @param {Function} selector      Selector function.
 316   * @param {Function} getDependants Dependant getter returning an immutable
 317   *                                 reference or array of reference used in
 318   *                                 cache bust consideration.
 319   *
 320   * @return {Function} Memoized selector.
 321   */
 322  /* harmony default export */ __webpack_exports__["a"] = (function( selector, getDependants ) {
 323      var rootCache, getCache;
 324  
 325      // Use object source as dependant if getter not provided
 326      if ( ! getDependants ) {
 327          getDependants = arrayOf;
 328      }
 329  
 330      /**
 331       * Returns the root cache. If WeakMap is supported, this is assigned to the
 332       * root WeakMap cache set, otherwise it is a shared instance of the default
 333       * cache object.
 334       *
 335       * @return {(WeakMap|Object)} Root cache object.
 336       */
 337  	function getRootCache() {
 338          return rootCache;
 339      }
 340  
 341      /**
 342       * Returns the cache for a given dependants array. When possible, a WeakMap
 343       * will be used to create a unique cache for each set of dependants. This
 344       * is feasible due to the nature of WeakMap in allowing garbage collection
 345       * to occur on entries where the key object is no longer referenced. Since
 346       * WeakMap requires the key to be an object, this is only possible when the
 347       * dependant is object-like. The root cache is created as a hierarchy where
 348       * each top-level key is the first entry in a dependants set, the value a
 349       * WeakMap where each key is the next dependant, and so on. This continues
 350       * so long as the dependants are object-like. If no dependants are object-
 351       * like, then the cache is shared across all invocations.
 352       *
 353       * @see isObjectLike
 354       *
 355       * @param {Array} dependants Selector dependants.
 356       *
 357       * @return {Object} Cache object.
 358       */
 359  	function getWeakMapCache( dependants ) {
 360          var caches = rootCache,
 361              isUniqueByDependants = true,
 362              i, dependant, map, cache;
 363  
 364          for ( i = 0; i < dependants.length; i++ ) {
 365              dependant = dependants[ i ];
 366  
 367              // Can only compose WeakMap from object-like key.
 368              if ( ! isObjectLike( dependant ) ) {
 369                  isUniqueByDependants = false;
 370                  break;
 371              }
 372  
 373              // Does current segment of cache already have a WeakMap?
 374              if ( caches.has( dependant ) ) {
 375                  // Traverse into nested WeakMap.
 376                  caches = caches.get( dependant );
 377              } else {
 378                  // Create, set, and traverse into a new one.
 379                  map = new WeakMap();
 380                  caches.set( dependant, map );
 381                  caches = map;
 382              }
 383          }
 384  
 385          // We use an arbitrary (but consistent) object as key for the last item
 386          // in the WeakMap to serve as our running cache.
 387          if ( ! caches.has( LEAF_KEY ) ) {
 388              cache = createCache();
 389              cache.isUniqueByDependants = isUniqueByDependants;
 390              caches.set( LEAF_KEY, cache );
 391          }
 392  
 393          return caches.get( LEAF_KEY );
 394      }
 395  
 396      // Assign cache handler by availability of WeakMap
 397      getCache = hasWeakMap ? getWeakMapCache : getRootCache;
 398  
 399      /**
 400       * Resets root memoization cache.
 401       */
 402  	function clear() {
 403          rootCache = hasWeakMap ? new WeakMap() : createCache();
 404      }
 405  
 406      // eslint-disable-next-line jsdoc/check-param-names
 407      /**
 408       * The augmented selector call, considering first whether dependants have
 409       * changed before passing it to underlying memoize function.
 410       *
 411       * @param {Object} source    Source object for derivation.
 412       * @param {...*}   extraArgs Additional arguments to pass to selector.
 413       *
 414       * @return {*} Selector result.
 415       */
 416  	function callSelector( /* source, ...extraArgs */ ) {
 417          var len = arguments.length,
 418              cache, node, i, args, dependants;
 419  
 420          // Create copy of arguments (avoid leaking deoptimization).
 421          args = new Array( len );
 422          for ( i = 0; i < len; i++ ) {
 423              args[ i ] = arguments[ i ];
 424          }
 425  
 426          dependants = getDependants.apply( null, args );
 427          cache = getCache( dependants );
 428  
 429          // If not guaranteed uniqueness by dependants (primitive type or lack
 430          // of WeakMap support), shallow compare against last dependants and, if
 431          // references have changed, destroy cache to recalculate result.
 432          if ( ! cache.isUniqueByDependants ) {
 433              if ( cache.lastDependants && ! isShallowEqual( dependants, cache.lastDependants, 0 ) ) {
 434                  cache.clear();
 435              }
 436  
 437              cache.lastDependants = dependants;
 438          }
 439  
 440          node = cache.head;
 441          while ( node ) {
 442              // Check whether node arguments match arguments
 443              if ( ! isShallowEqual( node.args, args, 1 ) ) {
 444                  node = node.next;
 445                  continue;
 446              }
 447  
 448              // At this point we can assume we've found a match
 449  
 450              // Surface matched node to head if not already
 451              if ( node !== cache.head ) {
 452                  // Adjust siblings to point to each other.
 453                  node.prev.next = node.next;
 454                  if ( node.next ) {
 455                      node.next.prev = node.prev;
 456                  }
 457  
 458                  node.next = cache.head;
 459                  node.prev = null;
 460                  cache.head.prev = node;
 461                  cache.head = node;
 462              }
 463  
 464              // Return immediately
 465              return node.val;
 466          }
 467  
 468          // No cached value found. Continue to insertion phase:
 469  
 470          node = {
 471              // Generate the result from original function
 472              val: selector.apply( null, args ),
 473          };
 474  
 475          // Avoid including the source object in the cache.
 476          args[ 0 ] = null;
 477          node.args = args;
 478  
 479          // Don't need to check whether node is already head, since it would
 480          // have been returned above already if it was
 481  
 482          // Shift existing head down list
 483          if ( cache.head ) {
 484              cache.head.prev = node;
 485              node.next = cache.head;
 486          }
 487  
 488          cache.head = node;
 489  
 490          return node.val;
 491      }
 492  
 493      callSelector.getDependants = getDependants;
 494      callSelector.clear = clear;
 495      clear();
 496  
 497      return callSelector;
 498  });
 499  
 500  
 501  /***/ }),
 502  
 503  /***/ 35:
 504  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 505  
 506  "use strict";
 507  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayWithHoles; });
 508  function _arrayWithHoles(arr) {
 509    if (Array.isArray(arr)) return arr;
 510  }
 511  
 512  /***/ }),
 513  
 514  /***/ 36:
 515  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 516  
 517  "use strict";
 518  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _nonIterableRest; });
 519  function _nonIterableRest() {
 520    throw new TypeError("Invalid attempt to destructure non-iterable instance");
 521  }
 522  
 523  /***/ }),
 524  
 525  /***/ 370:
 526  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 527  
 528  "use strict";
 529  __webpack_require__.r(__webpack_exports__);
 530  var build_module_actions_namespaceObject = {};
 531  __webpack_require__.r(build_module_actions_namespaceObject);
 532  __webpack_require__.d(build_module_actions_namespaceObject, "receiveUserQuery", function() { return receiveUserQuery; });
 533  __webpack_require__.d(build_module_actions_namespaceObject, "receiveCurrentUser", function() { return receiveCurrentUser; });
 534  __webpack_require__.d(build_module_actions_namespaceObject, "addEntities", function() { return addEntities; });
 535  __webpack_require__.d(build_module_actions_namespaceObject, "receiveEntityRecords", function() { return receiveEntityRecords; });
 536  __webpack_require__.d(build_module_actions_namespaceObject, "receiveThemeSupports", function() { return receiveThemeSupports; });
 537  __webpack_require__.d(build_module_actions_namespaceObject, "receiveEmbedPreview", function() { return receiveEmbedPreview; });
 538  __webpack_require__.d(build_module_actions_namespaceObject, "editEntityRecord", function() { return actions_editEntityRecord; });
 539  __webpack_require__.d(build_module_actions_namespaceObject, "undo", function() { return undo; });
 540  __webpack_require__.d(build_module_actions_namespaceObject, "redo", function() { return redo; });
 541  __webpack_require__.d(build_module_actions_namespaceObject, "__unstableCreateUndoLevel", function() { return __unstableCreateUndoLevel; });
 542  __webpack_require__.d(build_module_actions_namespaceObject, "saveEntityRecord", function() { return actions_saveEntityRecord; });
 543  __webpack_require__.d(build_module_actions_namespaceObject, "saveEditedEntityRecord", function() { return saveEditedEntityRecord; });
 544  __webpack_require__.d(build_module_actions_namespaceObject, "receiveUploadPermissions", function() { return receiveUploadPermissions; });
 545  __webpack_require__.d(build_module_actions_namespaceObject, "receiveUserPermission", function() { return receiveUserPermission; });
 546  __webpack_require__.d(build_module_actions_namespaceObject, "receiveAutosaves", function() { return receiveAutosaves; });
 547  var build_module_selectors_namespaceObject = {};
 548  __webpack_require__.r(build_module_selectors_namespaceObject);
 549  __webpack_require__.d(build_module_selectors_namespaceObject, "isRequestingEmbedPreview", function() { return isRequestingEmbedPreview; });
 550  __webpack_require__.d(build_module_selectors_namespaceObject, "getAuthors", function() { return getAuthors; });
 551  __webpack_require__.d(build_module_selectors_namespaceObject, "getCurrentUser", function() { return getCurrentUser; });
 552  __webpack_require__.d(build_module_selectors_namespaceObject, "getUserQueryResults", function() { return getUserQueryResults; });
 553  __webpack_require__.d(build_module_selectors_namespaceObject, "getEntitiesByKind", function() { return getEntitiesByKind; });
 554  __webpack_require__.d(build_module_selectors_namespaceObject, "getEntity", function() { return selectors_getEntity; });
 555  __webpack_require__.d(build_module_selectors_namespaceObject, "getEntityRecord", function() { return getEntityRecord; });
 556  __webpack_require__.d(build_module_selectors_namespaceObject, "getRawEntityRecord", function() { return getRawEntityRecord; });
 557  __webpack_require__.d(build_module_selectors_namespaceObject, "getEntityRecords", function() { return getEntityRecords; });
 558  __webpack_require__.d(build_module_selectors_namespaceObject, "getEntityRecordChangesByRecord", function() { return getEntityRecordChangesByRecord; });
 559  __webpack_require__.d(build_module_selectors_namespaceObject, "getEntityRecordEdits", function() { return getEntityRecordEdits; });
 560  __webpack_require__.d(build_module_selectors_namespaceObject, "getEntityRecordNonTransientEdits", function() { return getEntityRecordNonTransientEdits; });
 561  __webpack_require__.d(build_module_selectors_namespaceObject, "hasEditsForEntityRecord", function() { return hasEditsForEntityRecord; });
 562  __webpack_require__.d(build_module_selectors_namespaceObject, "getEditedEntityRecord", function() { return getEditedEntityRecord; });
 563  __webpack_require__.d(build_module_selectors_namespaceObject, "isAutosavingEntityRecord", function() { return isAutosavingEntityRecord; });
 564  __webpack_require__.d(build_module_selectors_namespaceObject, "isSavingEntityRecord", function() { return isSavingEntityRecord; });
 565  __webpack_require__.d(build_module_selectors_namespaceObject, "getLastEntitySaveError", function() { return getLastEntitySaveError; });
 566  __webpack_require__.d(build_module_selectors_namespaceObject, "getUndoEdit", function() { return getUndoEdit; });
 567  __webpack_require__.d(build_module_selectors_namespaceObject, "getRedoEdit", function() { return getRedoEdit; });
 568  __webpack_require__.d(build_module_selectors_namespaceObject, "hasUndo", function() { return hasUndo; });
 569  __webpack_require__.d(build_module_selectors_namespaceObject, "hasRedo", function() { return hasRedo; });
 570  __webpack_require__.d(build_module_selectors_namespaceObject, "getThemeSupports", function() { return getThemeSupports; });
 571  __webpack_require__.d(build_module_selectors_namespaceObject, "getEmbedPreview", function() { return getEmbedPreview; });
 572  __webpack_require__.d(build_module_selectors_namespaceObject, "isPreviewEmbedFallback", function() { return isPreviewEmbedFallback; });
 573  __webpack_require__.d(build_module_selectors_namespaceObject, "hasUploadPermissions", function() { return hasUploadPermissions; });
 574  __webpack_require__.d(build_module_selectors_namespaceObject, "canUser", function() { return canUser; });
 575  __webpack_require__.d(build_module_selectors_namespaceObject, "getAutosaves", function() { return getAutosaves; });
 576  __webpack_require__.d(build_module_selectors_namespaceObject, "getAutosave", function() { return getAutosave; });
 577  __webpack_require__.d(build_module_selectors_namespaceObject, "hasFetchedAutosaves", function() { return hasFetchedAutosaves; });
 578  __webpack_require__.d(build_module_selectors_namespaceObject, "getReferenceByDistinctEdits", function() { return getReferenceByDistinctEdits; });
 579  var resolvers_namespaceObject = {};
 580  __webpack_require__.r(resolvers_namespaceObject);
 581  __webpack_require__.d(resolvers_namespaceObject, "getAuthors", function() { return resolvers_getAuthors; });
 582  __webpack_require__.d(resolvers_namespaceObject, "getCurrentUser", function() { return resolvers_getCurrentUser; });
 583  __webpack_require__.d(resolvers_namespaceObject, "getEntityRecord", function() { return resolvers_getEntityRecord; });
 584  __webpack_require__.d(resolvers_namespaceObject, "getEntityRecords", function() { return resolvers_getEntityRecords; });
 585  __webpack_require__.d(resolvers_namespaceObject, "getThemeSupports", function() { return resolvers_getThemeSupports; });
 586  __webpack_require__.d(resolvers_namespaceObject, "getEmbedPreview", function() { return resolvers_getEmbedPreview; });
 587  __webpack_require__.d(resolvers_namespaceObject, "hasUploadPermissions", function() { return resolvers_hasUploadPermissions; });
 588  __webpack_require__.d(resolvers_namespaceObject, "canUser", function() { return resolvers_canUser; });
 589  __webpack_require__.d(resolvers_namespaceObject, "getAutosaves", function() { return resolvers_getAutosaves; });
 590  __webpack_require__.d(resolvers_namespaceObject, "getAutosave", function() { return resolvers_getAutosave; });
 591  
 592  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread.js
 593  var objectSpread = __webpack_require__(6);
 594  
 595  // EXTERNAL MODULE: external {"this":["wp","data"]}
 596  var external_this_wp_data_ = __webpack_require__(4);
 597  
 598  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
 599  var slicedToArray = __webpack_require__(22);
 600  
 601  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
 602  var toConsumableArray = __webpack_require__(18);
 603  
 604  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
 605  var defineProperty = __webpack_require__(9);
 606  
 607  // EXTERNAL MODULE: external {"this":"lodash"}
 608  var external_this_lodash_ = __webpack_require__(2);
 609  
 610  // EXTERNAL MODULE: external {"this":["wp","isShallowEqual"]}
 611  var external_this_wp_isShallowEqual_ = __webpack_require__(46);
 612  var external_this_wp_isShallowEqual_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_isShallowEqual_);
 613  
 614  // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/utils/conservative-map-item.js
 615  /**
 616   * External dependencies
 617   */
 618  
 619  /**
 620   * Given the current and next item entity, returns the minimally "modified"
 621   * result of the next item, preferring value references from the original item
 622   * if equal. If all values match, the original item is returned.
 623   *
 624   * @param {Object} item     Original item.
 625   * @param {Object} nextItem Next item.
 626   *
 627   * @return {Object} Minimally modified merged item.
 628   */
 629  
 630  function conservativeMapItem(item, nextItem) {
 631    // Return next item in its entirety if there is no original item.
 632    if (!item) {
 633      return nextItem;
 634    }
 635  
 636    var hasChanges = false;
 637    var result = {};
 638  
 639    for (var key in nextItem) {
 640      if (Object(external_this_lodash_["isEqual"])(item[key], nextItem[key])) {
 641        result[key] = item[key];
 642      } else {
 643        hasChanges = true;
 644        result[key] = nextItem[key];
 645      }
 646    }
 647  
 648    if (!hasChanges) {
 649      return item;
 650    }
 651  
 652    return result;
 653  }
 654  
 655  // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/utils/if-matching-action.js
 656  /**
 657   * A higher-order reducer creator which invokes the original reducer only if
 658   * the dispatching action matches the given predicate, **OR** if state is
 659   * initializing (undefined).
 660   *
 661   * @param {Function} isMatch Function predicate for allowing reducer call.
 662   *
 663   * @return {Function} Higher-order reducer.
 664   */
 665  var ifMatchingAction = function ifMatchingAction(isMatch) {
 666    return function (reducer) {
 667      return function (state, action) {
 668        if (state === undefined || isMatch(action)) {
 669          return reducer(state, action);
 670        }
 671  
 672        return state;
 673      };
 674    };
 675  };
 676  
 677  /* harmony default export */ var if_matching_action = (ifMatchingAction);
 678  
 679  // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/utils/on-sub-key.js
 680  
 681  
 682  
 683  /**
 684   * Higher-order reducer creator which creates a combined reducer object, keyed
 685   * by a property on the action object.
 686   *
 687   * @param {string} actionProperty Action property by which to key object.
 688   *
 689   * @return {Function} Higher-order reducer.
 690   */
 691  var on_sub_key_onSubKey = function onSubKey(actionProperty) {
 692    return function (reducer) {
 693      return function () {
 694        var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 695        var action = arguments.length > 1 ? arguments[1] : undefined;
 696        // Retrieve subkey from action. Do not track if undefined; useful for cases
 697        // where reducer is scoped by action shape.
 698        var key = action[actionProperty];
 699  
 700        if (key === undefined) {
 701          return state;
 702        } // Avoid updating state if unchanged. Note that this also accounts for a
 703        // reducer which returns undefined on a key which is not yet tracked.
 704  
 705  
 706        var nextKeyState = reducer(state[key], action);
 707  
 708        if (nextKeyState === state[key]) {
 709          return state;
 710        }
 711  
 712        return Object(objectSpread["a" /* default */])({}, state, Object(defineProperty["a" /* default */])({}, key, nextKeyState));
 713      };
 714    };
 715  };
 716  /* harmony default export */ var on_sub_key = (on_sub_key_onSubKey);
 717  
 718  // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/utils/replace-action.js
 719  /**
 720   * Higher-order reducer creator which substitutes the action object before
 721   * passing to the original reducer.
 722   *
 723   * @param {Function} replacer Function mapping original action to replacement.
 724   *
 725   * @return {Function} Higher-order reducer.
 726   */
 727  var replaceAction = function replaceAction(replacer) {
 728    return function (reducer) {
 729      return function (state, action) {
 730        return reducer(state, replacer(action));
 731      };
 732    };
 733  };
 734  
 735  /* harmony default export */ var replace_action = (replaceAction);
 736  
 737  // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/utils/with-weak-map-cache.js
 738  /**
 739   * External dependencies
 740   */
 741  
 742  /**
 743   * Given a function, returns an enhanced function which caches the result and
 744   * tracks in WeakMap. The result is only cached if the original function is
 745   * passed a valid object-like argument (requirement for WeakMap key).
 746   *
 747   * @param {Function} fn Original function.
 748   *
 749   * @return {Function} Enhanced caching function.
 750   */
 751  
 752  function withWeakMapCache(fn) {
 753    var cache = new WeakMap();
 754    return function (key) {
 755      var value;
 756  
 757      if (cache.has(key)) {
 758        value = cache.get(key);
 759      } else {
 760        value = fn(key); // Can reach here if key is not valid for WeakMap, since `has`
 761        // will return false for invalid key. Since `set` will throw,
 762        // ensure that key is valid before setting into cache.
 763  
 764        if (Object(external_this_lodash_["isObjectLike"])(key)) {
 765          cache.set(key, value);
 766        }
 767      }
 768  
 769      return value;
 770    };
 771  }
 772  
 773  /* harmony default export */ var with_weak_map_cache = (withWeakMapCache);
 774  
 775  // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/utils/index.js
 776  
 777  
 778  
 779  
 780  
 781  
 782  // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/queried-data/actions.js
 783  
 784  
 785  /**
 786   * External dependencies
 787   */
 788  
 789  /**
 790   * Returns an action object used in signalling that items have been received.
 791   *
 792   * @param {Array} items Items received.
 793   *
 794   * @return {Object} Action object.
 795   */
 796  
 797  function receiveItems(items) {
 798    return {
 799      type: 'RECEIVE_ITEMS',
 800      items: Object(external_this_lodash_["castArray"])(items)
 801    };
 802  }
 803  /**
 804   * Returns an action object used in signalling that queried data has been
 805   * received.
 806   *
 807   * @param {Array}   items Queried items received.
 808   * @param {?Object} query Optional query object.
 809   *
 810   * @return {Object} Action object.
 811   */
 812  
 813  function receiveQueriedItems(items) {
 814    var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
 815    return Object(objectSpread["a" /* default */])({}, receiveItems(items), {
 816      query: query
 817    });
 818  }
 819  
 820  // EXTERNAL MODULE: ./node_modules/rememo/es/rememo.js
 821  var rememo = __webpack_require__(34);
 822  
 823  // EXTERNAL MODULE: ./node_modules/equivalent-key-map/equivalent-key-map.js
 824  var equivalent_key_map = __webpack_require__(57);
 825  var equivalent_key_map_default = /*#__PURE__*/__webpack_require__.n(equivalent_key_map);
 826  
 827  // EXTERNAL MODULE: external {"this":["wp","url"]}
 828  var external_this_wp_url_ = __webpack_require__(25);
 829  
 830  // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/queried-data/get-query-parts.js
 831  
 832  
 833  /**
 834   * WordPress dependencies
 835   */
 836  
 837  /**
 838   * Internal dependencies
 839   */
 840  
 841  
 842  /**
 843   * An object of properties describing a specific query.
 844   *
 845   * @typedef {Object} WPQueriedDataQueryParts
 846   *
 847   * @property {number} page      The query page (1-based index, default 1).
 848   * @property {number} perPage   Items per page for query (default 10).
 849   * @property {string} stableKey An encoded stable string of all non-pagination
 850   *                              query parameters.
 851   */
 852  
 853  /**
 854   * Given a query object, returns an object of parts, including pagination
 855   * details (`page` and `perPage`, or default values). All other properties are
 856   * encoded into a stable (idempotent) `stableKey` value.
 857   *
 858   * @param {Object} query Optional query object.
 859   *
 860   * @return {WPQueriedDataQueryParts} Query parts.
 861   */
 862  
 863  function getQueryParts(query) {
 864    /**
 865     * @type {WPQueriedDataQueryParts}
 866     */
 867    var parts = {
 868      stableKey: '',
 869      page: 1,
 870      perPage: 10
 871    }; // Ensure stable key by sorting keys. Also more efficient for iterating.
 872  
 873    var keys = Object.keys(query).sort();
 874  
 875    for (var i = 0; i < keys.length; i++) {
 876      var key = keys[i];
 877      var value = query[key];
 878  
 879      switch (key) {
 880        case 'page':
 881          parts[key] = Number(value);
 882          break;
 883  
 884        case 'per_page':
 885          parts.perPage = Number(value);
 886          break;
 887  
 888        default:
 889          // While it could be any deterministic string, for simplicity's
 890          // sake mimic querystring encoding for stable key.
 891          //
 892          // TODO: For consistency with PHP implementation, addQueryArgs
 893          // should accept a key value pair, which may optimize its
 894          // implementation for our use here, vs. iterating an object
 895          // with only a single key.
 896          parts.stableKey += (parts.stableKey ? '&' : '') + Object(external_this_wp_url_["addQueryArgs"])('', Object(defineProperty["a" /* default */])({}, key, value)).slice(1);
 897      }
 898    }
 899  
 900    return parts;
 901  }
 902  /* harmony default export */ var get_query_parts = (with_weak_map_cache(getQueryParts));
 903  
 904  // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/queried-data/selectors.js
 905  /**
 906   * External dependencies
 907   */
 908  
 909  
 910  /**
 911   * Internal dependencies
 912   */
 913  
 914  
 915  /**
 916   * Cache of state keys to EquivalentKeyMap where the inner map tracks queries
 917   * to their resulting items set. WeakMap allows garbage collection on expired
 918   * state references.
 919   *
 920   * @type {WeakMap<Object,EquivalentKeyMap>}
 921   */
 922  
 923  var queriedItemsCacheByState = new WeakMap();
 924  /**
 925   * Returns items for a given query, or null if the items are not known.
 926   *
 927   * @param {Object}  state State object.
 928   * @param {?Object} query Optional query.
 929   *
 930   * @return {?Array} Query items.
 931   */
 932  
 933  function getQueriedItemsUncached(state, query) {
 934    var _getQueryParts = get_query_parts(query),
 935        stableKey = _getQueryParts.stableKey,
 936        page = _getQueryParts.page,
 937        perPage = _getQueryParts.perPage;
 938  
 939    if (!state.queries[stableKey]) {
 940      return null;
 941    }
 942  
 943    var itemIds = state.queries[stableKey];
 944  
 945    if (!itemIds) {
 946      return null;
 947    }
 948  
 949    var startOffset = perPage === -1 ? 0 : (page - 1) * perPage;
 950    var endOffset = perPage === -1 ? itemIds.length : Math.min(startOffset + perPage, itemIds.length);
 951    var items = [];
 952  
 953    for (var i = startOffset; i < endOffset; i++) {
 954      var itemId = itemIds[i];
 955      items.push(state.items[itemId]);
 956    }
 957  
 958    return items;
 959  }
 960  /**
 961   * Returns items for a given query, or null if the items are not known. Caches
 962   * result both per state (by reference) and per query (by deep equality).
 963   * The caching approach is intended to be durable to query objects which are
 964   * deeply but not referentially equal, since otherwise:
 965   *
 966   * `getQueriedItems( state, {} ) !== getQueriedItems( state, {} )`
 967   *
 968   * @param {Object}  state State object.
 969   * @param {?Object} query Optional query.
 970   *
 971   * @return {?Array} Query items.
 972   */
 973  
 974  
 975  var getQueriedItems = Object(rememo["a" /* default */])(function (state) {
 976    var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
 977    var queriedItemsCache = queriedItemsCacheByState.get(state);
 978  
 979    if (queriedItemsCache) {
 980      var queriedItems = queriedItemsCache.get(query);
 981  
 982      if (queriedItems !== undefined) {
 983        return queriedItems;
 984      }
 985    } else {
 986      queriedItemsCache = new equivalent_key_map_default.a();
 987      queriedItemsCacheByState.set(state, queriedItemsCache);
 988    }
 989  
 990    var items = getQueriedItemsUncached(state, query);
 991    queriedItemsCache.set(query, items);
 992    return items;
 993  });
 994  
 995  // EXTERNAL MODULE: external {"this":"regeneratorRuntime"}
 996  var external_this_regeneratorRuntime_ = __webpack_require__(23);
 997  var external_this_regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(external_this_regeneratorRuntime_);
 998  
 999  // EXTERNAL MODULE: external {"this":["wp","apiFetch"]}
1000  var external_this_wp_apiFetch_ = __webpack_require__(38);
1001  var external_this_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_apiFetch_);
1002  
1003  // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/controls.js
1004  
1005  
1006  /**
1007   * WordPress dependencies
1008   */
1009  
1010  
1011  /**
1012   * Trigger an API Fetch request.
1013   *
1014   * @param {Object} request API Fetch Request Object.
1015   * @return {Object} control descriptor.
1016   */
1017  
1018  function apiFetch(request) {
1019    return {
1020      type: 'API_FETCH',
1021      request: request
1022    };
1023  }
1024  /**
1025   * Calls a selector using the current state.
1026   *
1027   * @param {string} selectorName Selector name.
1028   * @param  {Array} args         Selector arguments.
1029   *
1030   * @return {Object} control descriptor.
1031   */
1032  
1033  function controls_select(selectorName) {
1034    for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
1035      args[_key - 1] = arguments[_key];
1036    }
1037  
1038    return {
1039      type: 'SELECT',
1040      selectorName: selectorName,
1041      args: args
1042    };
1043  }
1044  /**
1045   * Dispatches a control action for triggering a registry select that has a
1046   * resolver.
1047   *
1048   * @param {string}  selectorName
1049   * @param {Array}   args  Arguments for the select.
1050   *
1051   * @return {Object} control descriptor.
1052   */
1053  
1054  function resolveSelect(selectorName) {
1055    for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
1056      args[_key2 - 1] = arguments[_key2];
1057    }
1058  
1059    return {
1060      type: 'RESOLVE_SELECT',
1061      selectorName: selectorName,
1062      args: args
1063    };
1064  }
1065  var controls = {
1066    API_FETCH: function API_FETCH(_ref) {
1067      var request = _ref.request;
1068      return external_this_wp_apiFetch_default()(request);
1069    },
1070    SELECT: Object(external_this_wp_data_["createRegistryControl"])(function (registry) {
1071      return function (_ref2) {
1072        var _registry$select;
1073  
1074        var selectorName = _ref2.selectorName,
1075            args = _ref2.args;
1076        return (_registry$select = registry.select('core'))[selectorName].apply(_registry$select, Object(toConsumableArray["a" /* default */])(args));
1077      };
1078    }),
1079    RESOLVE_SELECT: Object(external_this_wp_data_["createRegistryControl"])(function (registry) {
1080      return function (_ref3) {
1081        var _registry$__experimen;
1082  
1083        var selectorName = _ref3.selectorName,
1084            args = _ref3.args;
1085        return (_registry$__experimen = registry.__experimentalResolveSelect('core'))[selectorName].apply(_registry$__experimen, Object(toConsumableArray["a" /* default */])(args));
1086      };
1087    })
1088  };
1089  /* harmony default export */ var build_module_controls = (controls);
1090  
1091  // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/actions.js
1092  
1093  
1094  
1095  var _marked =
1096  /*#__PURE__*/
1097  external_this_regeneratorRuntime_default.a.mark(actions_editEntityRecord),
1098      _marked2 =
1099  /*#__PURE__*/
1100  external_this_regeneratorRuntime_default.a.mark(undo),
1101      _marked3 =
1102  /*#__PURE__*/
1103  external_this_regeneratorRuntime_default.a.mark(redo),
1104      _marked4 =
1105  /*#__PURE__*/
1106  external_this_regeneratorRuntime_default.a.mark(actions_saveEntityRecord),
1107      _marked5 =
1108  /*#__PURE__*/
1109  external_this_regeneratorRuntime_default.a.mark(saveEditedEntityRecord);
1110  
1111  /**
1112   * External dependencies
1113   */
1114  
1115  /**
1116   * Internal dependencies
1117   */
1118  
1119  
1120  
1121  
1122  /**
1123   * Returns an action object used in signalling that authors have been received.
1124   *
1125   * @param {string}       queryID Query ID.
1126   * @param {Array|Object} users   Users received.
1127   *
1128   * @return {Object} Action object.
1129   */
1130  
1131  function receiveUserQuery(queryID, users) {
1132    return {
1133      type: 'RECEIVE_USER_QUERY',
1134      users: Object(external_this_lodash_["castArray"])(users),
1135      queryID: queryID
1136    };
1137  }
1138  /**
1139   * Returns an action used in signalling that the current user has been received.
1140   *
1141   * @param {Object} currentUser Current user object.
1142   *
1143   * @return {Object} Action object.
1144   */
1145  
1146  function receiveCurrentUser(currentUser) {
1147    return {
1148      type: 'RECEIVE_CURRENT_USER',
1149      currentUser: currentUser
1150    };
1151  }
1152  /**
1153   * Returns an action object used in adding new entities.
1154   *
1155   * @param {Array} entities  Entities received.
1156   *
1157   * @return {Object} Action object.
1158   */
1159  
1160  function addEntities(entities) {
1161    return {
1162      type: 'ADD_ENTITIES',
1163      entities: entities
1164    };
1165  }
1166  /**
1167   * Returns an action object used in signalling that entity records have been received.
1168   *
1169   * @param {string}       kind            Kind of the received entity.
1170   * @param {string}       name            Name of the received entity.
1171   * @param {Array|Object} records         Records received.
1172   * @param {?Object}      query           Query Object.
1173   * @param {?boolean}     invalidateCache Should invalidate query caches
1174   *
1175   * @return {Object} Action object.
1176   */
1177  
1178  function receiveEntityRecords(kind, name, records, query) {
1179    var invalidateCache = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
1180  
1181    // Auto drafts should not have titles, but some plugins rely on them so we can't filter this
1182    // on the server.
1183    if (kind === 'postType') {
1184      records = Object(external_this_lodash_["castArray"])(records).map(function (record) {
1185        return record.status === 'auto-draft' ? Object(objectSpread["a" /* default */])({}, record, {
1186          title: ''
1187        }) : record;
1188      });
1189    }
1190  
1191    var action;
1192  
1193    if (query) {
1194      action = receiveQueriedItems(records, query);
1195    } else {
1196      action = receiveItems(records);
1197    }
1198  
1199    return Object(objectSpread["a" /* default */])({}, action, {
1200      kind: kind,
1201      name: name,
1202      invalidateCache: invalidateCache
1203    });
1204  }
1205  /**
1206   * Returns an action object used in signalling that the index has been received.
1207   *
1208   * @param {Object} themeSupports Theme support for the current theme.
1209   *
1210   * @return {Object} Action object.
1211   */
1212  
1213  function receiveThemeSupports(themeSupports) {
1214    return {
1215      type: 'RECEIVE_THEME_SUPPORTS',
1216      themeSupports: themeSupports
1217    };
1218  }
1219  /**
1220   * Returns an action object used in signalling that the preview data for
1221   * a given URl has been received.
1222   *
1223   * @param {string}  url     URL to preview the embed for.
1224   * @param {*}       preview Preview data.
1225   *
1226   * @return {Object} Action object.
1227   */
1228  
1229  function receiveEmbedPreview(url, preview) {
1230    return {
1231      type: 'RECEIVE_EMBED_PREVIEW',
1232      url: url,
1233      preview: preview
1234    };
1235  }
1236  /**
1237   * Returns an action object that triggers an
1238   * edit to an entity record.
1239   *
1240   * @param {string} kind     Kind of the edited entity record.
1241   * @param {string} name     Name of the edited entity record.
1242   * @param {number} recordId Record ID of the edited entity record.
1243   * @param {Object} edits    The edits.
1244   * @param {Object} options  Options for the edit.
1245   * @param {boolean} options.undoIgnore Whether to ignore the edit in undo history or not.
1246   *
1247   * @return {Object} Action object.
1248   */
1249  
1250  function actions_editEntityRecord(kind, name, recordId, edits) {
1251    var options,
1252        entity,
1253        _entity$transientEdit,
1254        transientEdits,
1255        _entity$mergedEdits,
1256        mergedEdits,
1257        record,
1258        editedRecord,
1259        edit,
1260        _args = arguments;
1261  
1262    return external_this_regeneratorRuntime_default.a.wrap(function editEntityRecord$(_context) {
1263      while (1) {
1264        switch (_context.prev = _context.next) {
1265          case 0:
1266            options = _args.length > 4 && _args[4] !== undefined ? _args[4] : {};
1267            _context.next = 3;
1268            return controls_select('getEntity', kind, name);
1269  
1270          case 3:
1271            entity = _context.sent;
1272  
1273            if (entity) {
1274              _context.next = 6;
1275              break;
1276            }
1277  
1278            throw new Error("The entity being edited (".concat(kind, ", ").concat(name, ") does not have a loaded config."));
1279  
1280          case 6:
1281            _entity$transientEdit = entity.transientEdits, transientEdits = _entity$transientEdit === void 0 ? {} : _entity$transientEdit, _entity$mergedEdits = entity.mergedEdits, mergedEdits = _entity$mergedEdits === void 0 ? {} : _entity$mergedEdits;
1282            _context.next = 9;
1283            return controls_select('getRawEntityRecord', kind, name, recordId);
1284  
1285          case 9:
1286            record = _context.sent;
1287            _context.next = 12;
1288            return controls_select('getEditedEntityRecord', kind, name, recordId);
1289  
1290          case 12:
1291            editedRecord = _context.sent;
1292            edit = {
1293              kind: kind,
1294              name: name,
1295              recordId: recordId,
1296              // Clear edits when they are equal to their persisted counterparts
1297              // so that the property is not considered dirty.
1298              edits: Object.keys(edits).reduce(function (acc, key) {
1299                var recordValue = record[key];
1300                var editedRecordValue = editedRecord[key];
1301                var value = mergedEdits[key] ? Object(objectSpread["a" /* default */])({}, editedRecordValue, edits[key]) : edits[key];
1302                acc[key] = Object(external_this_lodash_["isEqual"])(recordValue, value) ? undefined : value;
1303                return acc;
1304              }, {}),
1305              transientEdits: transientEdits
1306            };
1307            return _context.abrupt("return", Object(objectSpread["a" /* default */])({
1308              type: 'EDIT_ENTITY_RECORD'
1309            }, edit, {
1310              meta: {
1311                undo: !options.undoIgnore && Object(objectSpread["a" /* default */])({}, edit, {
1312                  // Send the current values for things like the first undo stack entry.
1313                  edits: Object.keys(edits).reduce(function (acc, key) {
1314                    acc[key] = editedRecord[key];
1315                    return acc;
1316                  }, {})
1317                })
1318              }
1319            }));
1320  
1321          case 15:
1322          case "end":
1323            return _context.stop();
1324        }
1325      }
1326    }, _marked);
1327  }
1328  /**
1329   * Action triggered to undo the last edit to
1330   * an entity record, if any.
1331   */
1332  
1333  function undo() {
1334    var undoEdit;
1335    return external_this_regeneratorRuntime_default.a.wrap(function undo$(_context2) {
1336      while (1) {
1337        switch (_context2.prev = _context2.next) {
1338          case 0:
1339            _context2.next = 2;
1340            return controls_select('getUndoEdit');
1341  
1342          case 2:
1343            undoEdit = _context2.sent;
1344  
1345            if (undoEdit) {
1346              _context2.next = 5;
1347              break;
1348            }
1349  
1350            return _context2.abrupt("return");
1351  
1352          case 5:
1353            _context2.next = 7;
1354            return Object(objectSpread["a" /* default */])({
1355              type: 'EDIT_ENTITY_RECORD'
1356            }, undoEdit, {
1357              meta: {
1358                isUndo: true
1359              }
1360            });
1361  
1362          case 7:
1363          case "end":
1364            return _context2.stop();
1365        }
1366      }
1367    }, _marked2);
1368  }
1369  /**
1370   * Action triggered to redo the last undoed
1371   * edit to an entity record, if any.
1372   */
1373  
1374  function redo() {
1375    var redoEdit;
1376    return external_this_regeneratorRuntime_default.a.wrap(function redo$(_context3) {
1377      while (1) {
1378        switch (_context3.prev = _context3.next) {
1379          case 0:
1380            _context3.next = 2;
1381            return controls_select('getRedoEdit');
1382  
1383          case 2:
1384            redoEdit = _context3.sent;
1385  
1386            if (redoEdit) {
1387              _context3.next = 5;
1388              break;
1389            }
1390  
1391            return _context3.abrupt("return");
1392  
1393          case 5:
1394            _context3.next = 7;
1395            return Object(objectSpread["a" /* default */])({
1396              type: 'EDIT_ENTITY_RECORD'
1397            }, redoEdit, {
1398              meta: {
1399                isRedo: true
1400              }
1401            });
1402  
1403          case 7:
1404          case "end":
1405            return _context3.stop();
1406        }
1407      }
1408    }, _marked3);
1409  }
1410  /**
1411   * Forces the creation of a new undo level.
1412   *
1413   * @return {Object} Action object.
1414   */
1415  
1416  function __unstableCreateUndoLevel() {
1417    return {
1418      type: 'CREATE_UNDO_LEVEL'
1419    };
1420  }
1421  /**
1422   * Action triggered to save an entity record.
1423   *
1424   * @param {string} kind    Kind of the received entity.
1425   * @param {string} name    Name of the received entity.
1426   * @param {Object} record  Record to be saved.
1427   * @param {Object} options Saving options.
1428   */
1429  
1430  function actions_saveEntityRecord(kind, name, record) {
1431    var _ref,
1432        _ref$isAutosave,
1433        isAutosave,
1434        entities,
1435        entity,
1436        entityIdKey,
1437        recordId,
1438        updatedRecord,
1439        error,
1440        persistedEntity,
1441        currentEdits,
1442        path,
1443        persistedRecord,
1444        currentUser,
1445        currentUserId,
1446        autosavePost,
1447        data,
1448        newRecord,
1449        _data,
1450        _args4 = arguments;
1451  
1452    return external_this_regeneratorRuntime_default.a.wrap(function saveEntityRecord$(_context4) {
1453      while (1) {
1454        switch (_context4.prev = _context4.next) {
1455          case 0:
1456            _ref = _args4.length > 3 && _args4[3] !== undefined ? _args4[3] : {
1457              isAutosave: false
1458            }, _ref$isAutosave = _ref.isAutosave, isAutosave = _ref$isAutosave === void 0 ? false : _ref$isAutosave;
1459            _context4.next = 3;
1460            return getKindEntities(kind);
1461  
1462          case 3:
1463            entities = _context4.sent;
1464            entity = Object(external_this_lodash_["find"])(entities, {
1465              kind: kind,
1466              name: name
1467            });
1468  
1469            if (entity) {
1470              _context4.next = 7;
1471              break;
1472            }
1473  
1474            return _context4.abrupt("return");
1475  
1476          case 7:
1477            entityIdKey = entity.key || DEFAULT_ENTITY_KEY;
1478            recordId = record[entityIdKey];
1479            _context4.next = 11;
1480            return {
1481              type: 'SAVE_ENTITY_RECORD_START',
1482              kind: kind,
1483              name: name,
1484              recordId: recordId,
1485              isAutosave: isAutosave
1486            };
1487  
1488          case 11:
1489            _context4.prev = 11;
1490            path = "".concat(entity.baseURL).concat(recordId ? '/' + recordId : '');
1491            _context4.next = 15;
1492            return controls_select('getRawEntityRecord', kind, name, recordId);
1493  
1494          case 15:
1495            persistedRecord = _context4.sent;
1496  
1497            if (!isAutosave) {
1498              _context4.next = 40;
1499              break;
1500            }
1501  
1502            _context4.next = 19;
1503            return controls_select('getCurrentUser');
1504  
1505          case 19:
1506            currentUser = _context4.sent;
1507            currentUserId = currentUser ? currentUser.id : undefined;
1508            _context4.next = 23;
1509            return controls_select('getAutosave', persistedRecord.type, persistedRecord.id, currentUserId);
1510  
1511          case 23:
1512            autosavePost = _context4.sent;
1513            // Autosaves need all expected fields to be present.
1514            // So we fallback to the previous autosave and then
1515            // to the actual persisted entity if the edits don't
1516            // have a value.
1517            data = Object(objectSpread["a" /* default */])({}, persistedRecord, autosavePost, record);
1518            data = Object.keys(data).reduce(function (acc, key) {
1519              if (['title', 'excerpt', 'content'].includes(key)) {
1520                // Edits should be the "raw" attribute values.
1521                acc[key] = Object(external_this_lodash_["get"])(data[key], 'raw', data[key]);
1522              }
1523  
1524              return acc;
1525            }, {
1526              status: data.status === 'auto-draft' ? 'draft' : data.status
1527            });
1528            _context4.next = 28;
1529            return apiFetch({
1530              path: "".concat(path, "/autosaves"),
1531              method: 'POST',
1532              data: data
1533            });
1534  
1535          case 28:
1536            updatedRecord = _context4.sent;
1537  
1538            if (!(persistedRecord.id === updatedRecord.id)) {
1539              _context4.next = 36;
1540              break;
1541            }
1542  
1543            newRecord = Object(objectSpread["a" /* default */])({}, persistedRecord, data, updatedRecord);
1544            newRecord = Object.keys(newRecord).reduce(function (acc, key) {
1545              // These properties are persisted in autosaves.
1546              if (['title', 'excerpt', 'content'].includes(key)) {
1547                // Edits should be the "raw" attribute values.
1548                acc[key] = Object(external_this_lodash_["get"])(newRecord[key], 'raw', newRecord[key]);
1549              } else if (key === 'status') {
1550                // Status is only persisted in autosaves when going from
1551                // "auto-draft" to "draft".
1552                acc[key] = persistedRecord.status === 'auto-draft' && newRecord.status === 'draft' ? newRecord.status : persistedRecord.status;
1553              } else {
1554                // These properties are not persisted in autosaves.
1555                acc[key] = Object(external_this_lodash_["get"])(persistedRecord[key], 'raw', persistedRecord[key]);
1556              }
1557  
1558              return acc;
1559            }, {});
1560            _context4.next = 34;
1561            return receiveEntityRecords(kind, name, newRecord, undefined, true);
1562  
1563          case 34:
1564            _context4.next = 38;
1565            break;
1566  
1567          case 36:
1568            _context4.next = 38;
1569            return receiveAutosaves(persistedRecord.id, updatedRecord);
1570  
1571          case 38:
1572            _context4.next = 55;
1573            break;
1574  
1575          case 40:
1576            // Auto drafts should be converted to drafts on explicit saves and we should not respect their default title,
1577            // but some plugins break with this behavior so we can't filter it on the server.
1578            _data = record;
1579  
1580            if (kind === 'postType' && persistedRecord && persistedRecord.status === 'auto-draft') {
1581              if (!_data.status) {
1582                _data = Object(objectSpread["a" /* default */])({}, _data, {
1583                  status: 'draft'
1584                });
1585              }
1586  
1587              if (!_data.title || _data.title === 'Auto Draft') {
1588                _data = Object(objectSpread["a" /* default */])({}, _data, {
1589                  title: ''
1590                });
1591              }
1592            } // We perform an optimistic update here to clear all the edits that
1593            // will be persisted so that if the server filters them, the new
1594            // filtered values are always accepted.
1595  
1596  
1597            _context4.next = 44;
1598            return controls_select('getEntityRecord', kind, name, recordId);
1599  
1600          case 44:
1601            persistedEntity = _context4.sent;
1602            _context4.next = 47;
1603            return controls_select('getEntityRecordEdits', kind, name, recordId);
1604  
1605          case 47:
1606            currentEdits = _context4.sent;
1607            _context4.next = 50;
1608            return receiveEntityRecords(kind, name, Object(objectSpread["a" /* default */])({}, persistedEntity, _data), undefined, true);
1609  
1610          case 50:
1611            _context4.next = 52;
1612            return apiFetch({
1613              path: path,
1614              method: recordId ? 'PUT' : 'POST',
1615              data: _data
1616            });
1617  
1618          case 52:
1619            updatedRecord = _context4.sent;
1620            _context4.next = 55;
1621            return receiveEntityRecords(kind, name, updatedRecord, undefined, true);
1622  
1623          case 55:
1624            _context4.next = 77;
1625            break;
1626  
1627          case 57:
1628            _context4.prev = 57;
1629            _context4.t0 = _context4["catch"](11);
1630            error = _context4.t0; // If we got to the point in the try block where we made an optimistic update,
1631            // we need to roll it back here.
1632  
1633            if (!(persistedEntity && currentEdits)) {
1634              _context4.next = 77;
1635              break;
1636            }
1637  
1638            _context4.next = 63;
1639            return receiveEntityRecords(kind, name, persistedEntity, undefined, true);
1640  
1641          case 63:
1642            _context4.t1 = actions_editEntityRecord;
1643            _context4.t2 = kind;
1644            _context4.t3 = name;
1645            _context4.t4 = recordId;
1646            _context4.t5 = objectSpread["a" /* default */];
1647            _context4.t6 = {};
1648            _context4.t7 = currentEdits;
1649            _context4.next = 72;
1650            return controls_select('getEntityRecordEdits', kind, name, recordId);
1651  
1652          case 72:
1653            _context4.t8 = _context4.sent;
1654            _context4.t9 = (0, _context4.t5)(_context4.t6, _context4.t7, _context4.t8);
1655            _context4.t10 = {
1656              undoIgnore: true
1657            };
1658            _context4.next = 77;
1659            return (0, _context4.t1)(_context4.t2, _context4.t3, _context4.t4, _context4.t9, _context4.t10);
1660  
1661          case 77:
1662            _context4.next = 79;
1663            return {
1664              type: 'SAVE_ENTITY_RECORD_FINISH',
1665              kind: kind,
1666              name: name,
1667              recordId: recordId,
1668              error: error,
1669              isAutosave: isAutosave
1670            };
1671  
1672          case 79:
1673            return _context4.abrupt("return", updatedRecord);
1674  
1675          case 80:
1676          case "end":
1677            return _context4.stop();
1678        }
1679      }
1680    }, _marked4, null, [[11, 57]]);
1681  }
1682  /**
1683   * Action triggered to save an entity record's edits.
1684   *
1685   * @param {string} kind     Kind of the entity.
1686   * @param {string} name     Name of the entity.
1687   * @param {Object} recordId ID of the record.
1688   * @param {Object} options  Saving options.
1689   */
1690  
1691  function saveEditedEntityRecord(kind, name, recordId, options) {
1692    var edits, record;
1693    return external_this_regeneratorRuntime_default.a.wrap(function saveEditedEntityRecord$(_context5) {
1694      while (1) {
1695        switch (_context5.prev = _context5.next) {
1696          case 0:
1697            _context5.next = 2;
1698            return controls_select('hasEditsForEntityRecord', kind, name, recordId);
1699  
1700          case 2:
1701            if (_context5.sent) {
1702              _context5.next = 4;
1703              break;
1704            }
1705  
1706            return _context5.abrupt("return");
1707  
1708          case 4:
1709            _context5.next = 6;
1710            return controls_select('getEntityRecordNonTransientEdits', kind, name, recordId);
1711  
1712          case 6:
1713            edits = _context5.sent;
1714            record = Object(objectSpread["a" /* default */])({
1715              id: recordId
1716            }, edits);
1717            return _context5.delegateYield(actions_saveEntityRecord(kind, name, record, options), "t0", 9);
1718  
1719          case 9:
1720          case "end":
1721            return _context5.stop();
1722        }
1723      }
1724    }, _marked5);
1725  }
1726  /**
1727   * Returns an action object used in signalling that Upload permissions have been received.
1728   *
1729   * @param {boolean} hasUploadPermissions Does the user have permission to upload files?
1730   *
1731   * @return {Object} Action object.
1732   */
1733  
1734  function receiveUploadPermissions(hasUploadPermissions) {
1735    return {
1736      type: 'RECEIVE_USER_PERMISSION',
1737      key: 'create/media',
1738      isAllowed: hasUploadPermissions
1739    };
1740  }
1741  /**
1742   * Returns an action object used in signalling that the current user has
1743   * permission to perform an action on a REST resource.
1744   *
1745   * @param {string}  key       A key that represents the action and REST resource.
1746   * @param {boolean} isAllowed Whether or not the user can perform the action.
1747   *
1748   * @return {Object} Action object.
1749   */
1750  
1751  function receiveUserPermission(key, isAllowed) {
1752    return {
1753      type: 'RECEIVE_USER_PERMISSION',
1754      key: key,
1755      isAllowed: isAllowed
1756    };
1757  }
1758  /**
1759   * Returns an action object used in signalling that the autosaves for a
1760   * post have been received.
1761   *
1762   * @param {number}       postId    The id of the post that is parent to the autosave.
1763   * @param {Array|Object} autosaves An array of autosaves or singular autosave object.
1764   *
1765   * @return {Object} Action object.
1766   */
1767  
1768  function receiveAutosaves(postId, autosaves) {
1769    return {
1770      type: 'RECEIVE_AUTOSAVES',
1771      postId: postId,
1772      autosaves: Object(external_this_lodash_["castArray"])(autosaves)
1773    };
1774  }
1775  
1776  // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/entities.js
1777  
1778  
1779  var entities_marked =
1780  /*#__PURE__*/
1781  external_this_regeneratorRuntime_default.a.mark(loadPostTypeEntities),
1782      entities_marked2 =
1783  /*#__PURE__*/
1784  external_this_regeneratorRuntime_default.a.mark(loadTaxonomyEntities),
1785      entities_marked3 =
1786  /*#__PURE__*/
1787  external_this_regeneratorRuntime_default.a.mark(getKindEntities);
1788  
1789  /**
1790   * External dependencies
1791   */
1792  
1793  /**
1794   * Internal dependencies
1795   */
1796  
1797  
1798  
1799  var DEFAULT_ENTITY_KEY = 'id';
1800  var defaultEntities = [{
1801    name: 'site',
1802    kind: 'root',
1803    baseURL: '/wp/v2/settings'
1804  }, {
1805    name: 'postType',
1806    kind: 'root',
1807    key: 'slug',
1808    baseURL: '/wp/v2/types'
1809  }, {
1810    name: 'media',
1811    kind: 'root',
1812    baseURL: '/wp/v2/media',
1813    plural: 'mediaItems'
1814  }, {
1815    name: 'taxonomy',
1816    kind: 'root',
1817    key: 'slug',
1818    baseURL: '/wp/v2/taxonomies',
1819    plural: 'taxonomies'
1820  }, {
1821    name: 'widgetArea',
1822    kind: 'root',
1823    baseURL: '/__experimental/widget-areas',
1824    plural: 'widgetAreas',
1825    transientEdits: {
1826      blocks: true
1827    }
1828  }];
1829  var kinds = [{
1830    name: 'postType',
1831    loadEntities: loadPostTypeEntities
1832  }, {
1833    name: 'taxonomy',
1834    loadEntities: loadTaxonomyEntities
1835  }];
1836  /**
1837   * Returns the list of post type entities.
1838   *
1839   * @return {Promise} Entities promise
1840   */
1841  
1842  function loadPostTypeEntities() {
1843    var postTypes;
1844    return external_this_regeneratorRuntime_default.a.wrap(function loadPostTypeEntities$(_context) {
1845      while (1) {
1846        switch (_context.prev = _context.next) {
1847          case 0:
1848            _context.next = 2;
1849            return apiFetch({
1850              path: '/wp/v2/types?context=edit'
1851            });
1852  
1853          case 2:
1854            postTypes = _context.sent;
1855            return _context.abrupt("return", Object(external_this_lodash_["map"])(postTypes, function (postType, name) {
1856              return {
1857                kind: 'postType',
1858                baseURL: '/wp/v2/' + postType.rest_base,
1859                name: name,
1860                transientEdits: {
1861                  blocks: true,
1862                  selectionStart: true,
1863                  selectionEnd: true
1864                },
1865                mergedEdits: {
1866                  meta: true
1867                }
1868              };
1869            }));
1870  
1871          case 4:
1872          case "end":
1873            return _context.stop();
1874        }
1875      }
1876    }, entities_marked);
1877  }
1878  /**
1879   * Returns the list of the taxonomies entities.
1880   *
1881   * @return {Promise} Entities promise
1882   */
1883  
1884  
1885  function loadTaxonomyEntities() {
1886    var taxonomies;
1887    return external_this_regeneratorRuntime_default.a.wrap(function loadTaxonomyEntities$(_context2) {
1888      while (1) {
1889        switch (_context2.prev = _context2.next) {
1890          case 0:
1891            _context2.next = 2;
1892            return apiFetch({
1893              path: '/wp/v2/taxonomies?context=edit'
1894            });
1895  
1896          case 2:
1897            taxonomies = _context2.sent;
1898            return _context2.abrupt("return", Object(external_this_lodash_["map"])(taxonomies, function (taxonomy, name) {
1899              return {
1900                kind: 'taxonomy',
1901                baseURL: '/wp/v2/' + taxonomy.rest_base,
1902                name: name
1903              };
1904            }));
1905  
1906          case 4:
1907          case "end":
1908            return _context2.stop();
1909        }
1910      }
1911    }, entities_marked2);
1912  }
1913  /**
1914   * Returns the entity's getter method name given its kind and name.
1915   *
1916   * @param {string}  kind      Entity kind.
1917   * @param {string}  name      Entity name.
1918   * @param {string}  prefix    Function prefix.
1919   * @param {boolean} usePlural Whether to use the plural form or not.
1920   *
1921   * @return {string} Method name
1922   */
1923  
1924  
1925  var entities_getMethodName = function getMethodName(kind, name) {
1926    var prefix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'get';
1927    var usePlural = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
1928    var entity = Object(external_this_lodash_["find"])(defaultEntities, {
1929      kind: kind,
1930      name: name
1931    });
1932    var kindPrefix = kind === 'root' ? '' : Object(external_this_lodash_["upperFirst"])(Object(external_this_lodash_["camelCase"])(kind));
1933    var nameSuffix = Object(external_this_lodash_["upperFirst"])(Object(external_this_lodash_["camelCase"])(name)) + (usePlural ? 's' : '');
1934    var suffix = usePlural && entity.plural ? Object(external_this_lodash_["upperFirst"])(Object(external_this_lodash_["camelCase"])(entity.plural)) : nameSuffix;
1935    return "".concat(prefix).concat(kindPrefix).concat(suffix);
1936  };
1937  /**
1938   * Loads the kind entities into the store.
1939   *
1940   * @param {string} kind  Kind
1941   *
1942   * @return {Array} Entities
1943   */
1944  
1945  function getKindEntities(kind) {
1946    var entities, kindConfig;
1947    return external_this_regeneratorRuntime_default.a.wrap(function getKindEntities$(_context3) {
1948      while (1) {
1949        switch (_context3.prev = _context3.next) {
1950          case 0:
1951            _context3.next = 2;
1952            return controls_select('getEntitiesByKind', kind);
1953  
1954          case 2:
1955            entities = _context3.sent;
1956  
1957            if (!(entities && entities.length !== 0)) {
1958              _context3.next = 5;
1959              break;
1960            }
1961  
1962            return _context3.abrupt("return", entities);
1963  
1964          case 5:
1965            kindConfig = Object(external_this_lodash_["find"])(kinds, {
1966              name: kind
1967            });
1968  
1969            if (kindConfig) {
1970              _context3.next = 8;
1971              break;
1972            }
1973  
1974            return _context3.abrupt("return", []);
1975  
1976          case 8:
1977            _context3.next = 10;
1978            return kindConfig.loadEntities();
1979  
1980          case 10:
1981            entities = _context3.sent;
1982            _context3.next = 13;
1983            return addEntities(entities);
1984  
1985          case 13:
1986            return _context3.abrupt("return", entities);
1987  
1988          case 14:
1989          case "end":
1990            return _context3.stop();
1991        }
1992      }
1993    }, entities_marked3);
1994  }
1995  
1996  // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/queried-data/reducer.js
1997  
1998  
1999  /**
2000   * External dependencies
2001   */
2002  
2003  /**
2004   * WordPress dependencies
2005   */
2006  
2007  
2008  /**
2009   * Internal dependencies
2010   */
2011  
2012  
2013  
2014  
2015  /**
2016   * Returns a merged array of item IDs, given details of the received paginated
2017   * items. The array is sparse-like with `undefined` entries where holes exist.
2018   *
2019   * @param {?Array<number>} itemIds     Original item IDs (default empty array).
2020   * @param {number[]}       nextItemIds Item IDs to merge.
2021   * @param {number}         page        Page of items merged.
2022   * @param {number}         perPage     Number of items per page.
2023   *
2024   * @return {number[]} Merged array of item IDs.
2025   */
2026  
2027  function getMergedItemIds(itemIds, nextItemIds, page, perPage) {
2028    var nextItemIdsStartIndex = (page - 1) * perPage; // If later page has already been received, default to the larger known
2029    // size of the existing array, else calculate as extending the existing.
2030  
2031    var size = Math.max(itemIds.length, nextItemIdsStartIndex + nextItemIds.length); // Preallocate array since size is known.
2032  
2033    var mergedItemIds = new Array(size);
2034  
2035    for (var i = 0; i < size; i++) {
2036      // Preserve existing item ID except for subset of range of next items.
2037      var isInNextItemsRange = i >= nextItemIdsStartIndex && i < nextItemIdsStartIndex + nextItemIds.length;
2038      mergedItemIds[i] = isInNextItemsRange ? nextItemIds[i - nextItemIdsStartIndex] : itemIds[i];
2039    }
2040  
2041    return mergedItemIds;
2042  }
2043  /**
2044   * Reducer tracking items state, keyed by ID. Items are assumed to be normal,
2045   * where identifiers are common across all queries.
2046   *
2047   * @param {Object} state  Current state.
2048   * @param {Object} action Dispatched action.
2049   *
2050   * @return {Object} Next state.
2051   */
2052  
2053  function reducer_items() {
2054    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2055    var action = arguments.length > 1 ? arguments[1] : undefined;
2056  
2057    switch (action.type) {
2058      case 'RECEIVE_ITEMS':
2059        var key = action.key || DEFAULT_ENTITY_KEY;
2060        return Object(objectSpread["a" /* default */])({}, state, action.items.reduce(function (accumulator, value) {
2061          var itemId = value[key];
2062          accumulator[itemId] = conservativeMapItem(state[itemId], value);
2063          return accumulator;
2064        }, {}));
2065    }
2066  
2067    return state;
2068  }
2069  /**
2070   * Reducer tracking queries state, keyed by stable query key. Each reducer
2071   * query object includes `itemIds` and `requestingPageByPerPage`.
2072   *
2073   * @param {Object} state  Current state.
2074   * @param {Object} action Dispatched action.
2075   *
2076   * @return {Object} Next state.
2077   */
2078  
2079  
2080  var queries = Object(external_this_lodash_["flowRight"])([// Limit to matching action type so we don't attempt to replace action on
2081  // an unhandled action.
2082  if_matching_action(function (action) {
2083    return 'query' in action;
2084  }), // Inject query parts into action for use both in `onSubKey` and reducer.
2085  replace_action(function (action) {
2086    // `ifMatchingAction` still passes on initialization, where state is
2087    // undefined and a query is not assigned. Avoid attempting to parse
2088    // parts. `onSubKey` will omit by lack of `stableKey`.
2089    if (action.query) {
2090      return Object(objectSpread["a" /* default */])({}, action, get_query_parts(action.query));
2091    }
2092  
2093    return action;
2094  }), // Queries shape is shared, but keyed by query `stableKey` part. Original
2095  // reducer tracks only a single query object.
2096  on_sub_key('stableKey')])(function () {
2097    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
2098    var action = arguments.length > 1 ? arguments[1] : undefined;
2099    var type = action.type,
2100        page = action.page,
2101        perPage = action.perPage,
2102        _action$key = action.key,
2103        key = _action$key === void 0 ? DEFAULT_ENTITY_KEY : _action$key;
2104  
2105    if (type !== 'RECEIVE_ITEMS') {
2106      return state;
2107    }
2108  
2109    return getMergedItemIds(state || [], Object(external_this_lodash_["map"])(action.items, key), page, perPage);
2110  });
2111  /* harmony default export */ var queried_data_reducer = (Object(external_this_wp_data_["combineReducers"])({
2112    items: reducer_items,
2113    queries: queries
2114  }));
2115  
2116  // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/queried-data/index.js
2117  
2118  
2119  
2120  
2121  // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/reducer.js
2122  
2123  
2124  
2125  
2126  
2127  /**
2128   * External dependencies
2129   */
2130  
2131  /**
2132   * WordPress dependencies
2133   */
2134  
2135  
2136  
2137  /**
2138   * Internal dependencies
2139   */
2140  
2141  
2142  
2143  
2144  /**
2145   * Reducer managing terms state. Keyed by taxonomy slug, the value is either
2146   * undefined (if no request has been made for given taxonomy), null (if a
2147   * request is in-flight for given taxonomy), or the array of terms for the
2148   * taxonomy.
2149   *
2150   * @param {Object} state  Current state.
2151   * @param {Object} action Dispatched action.
2152   *
2153   * @return {Object} Updated state.
2154   */
2155  
2156  function terms() {
2157    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2158    var action = arguments.length > 1 ? arguments[1] : undefined;
2159  
2160    switch (action.type) {
2161      case 'RECEIVE_TERMS':
2162        return Object(objectSpread["a" /* default */])({}, state, Object(defineProperty["a" /* default */])({}, action.taxonomy, action.terms));
2163    }
2164  
2165    return state;
2166  }
2167  /**
2168   * Reducer managing authors state. Keyed by id.
2169   *
2170   * @param {Object} state  Current state.
2171   * @param {Object} action Dispatched action.
2172   *
2173   * @return {Object} Updated state.
2174   */
2175  
2176  function reducer_users() {
2177    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
2178      byId: {},
2179      queries: {}
2180    };
2181    var action = arguments.length > 1 ? arguments[1] : undefined;
2182  
2183    switch (action.type) {
2184      case 'RECEIVE_USER_QUERY':
2185        return {
2186          byId: Object(objectSpread["a" /* default */])({}, state.byId, Object(external_this_lodash_["keyBy"])(action.users, 'id')),
2187          queries: Object(objectSpread["a" /* default */])({}, state.queries, Object(defineProperty["a" /* default */])({}, action.queryID, Object(external_this_lodash_["map"])(action.users, function (user) {
2188            return user.id;
2189          })))
2190        };
2191    }
2192  
2193    return state;
2194  }
2195  /**
2196   * Reducer managing current user state.
2197   *
2198   * @param {Object} state  Current state.
2199   * @param {Object} action Dispatched action.
2200   *
2201   * @return {Object} Updated state.
2202   */
2203  
2204  function reducer_currentUser() {
2205    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2206    var action = arguments.length > 1 ? arguments[1] : undefined;
2207  
2208    switch (action.type) {
2209      case 'RECEIVE_CURRENT_USER':
2210        return action.currentUser;
2211    }
2212  
2213    return state;
2214  }
2215  /**
2216   * Reducer managing taxonomies.
2217   *
2218   * @param {Object} state  Current state.
2219   * @param {Object} action Dispatched action.
2220   *
2221   * @return {Object} Updated state.
2222   */
2223  
2224  function reducer_taxonomies() {
2225    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
2226    var action = arguments.length > 1 ? arguments[1] : undefined;
2227  
2228    switch (action.type) {
2229      case 'RECEIVE_TAXONOMIES':
2230        return action.taxonomies;
2231    }
2232  
2233    return state;
2234  }
2235  /**
2236   * Reducer managing theme supports data.
2237   *
2238   * @param {Object} state  Current state.
2239   * @param {Object} action Dispatched action.
2240   *
2241   * @return {Object} Updated state.
2242   */
2243  
2244  function themeSupports() {
2245    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2246    var action = arguments.length > 1 ? arguments[1] : undefined;
2247  
2248    switch (action.type) {
2249      case 'RECEIVE_THEME_SUPPORTS':
2250        return Object(objectSpread["a" /* default */])({}, state, action.themeSupports);
2251    }
2252  
2253    return state;
2254  }
2255  /**
2256   * Higher Order Reducer for a given entity config. It supports:
2257   *
2258   *  - Fetching
2259   *  - Editing
2260   *  - Saving
2261   *
2262   * @param {Object} entityConfig  Entity config.
2263   *
2264   * @return {Function} Reducer.
2265   */
2266  
2267  function reducer_entity(entityConfig) {
2268    return Object(external_this_lodash_["flowRight"])([// Limit to matching action type so we don't attempt to replace action on
2269    // an unhandled action.
2270    if_matching_action(function (action) {
2271      return action.name && action.kind && action.name === entityConfig.name && action.kind === entityConfig.kind;
2272    }), // Inject the entity config into the action.
2273    replace_action(function (action) {
2274      return Object(objectSpread["a" /* default */])({}, action, {
2275        key: entityConfig.key || DEFAULT_ENTITY_KEY
2276      });
2277    })])(Object(external_this_wp_data_["combineReducers"])({
2278      queriedData: queried_data_reducer,
2279      edits: function edits() {
2280        var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2281        var action = arguments.length > 1 ? arguments[1] : undefined;
2282  
2283        switch (action.type) {
2284          case 'RECEIVE_ITEMS':
2285            var nextState = Object(objectSpread["a" /* default */])({}, state);
2286  
2287            var _iteratorNormalCompletion = true;
2288            var _didIteratorError = false;
2289            var _iteratorError = undefined;
2290  
2291            try {
2292              var _loop = function _loop() {
2293                var record = _step.value;
2294                var recordId = record[action.key];
2295                var edits = nextState[recordId];
2296  
2297                if (!edits) {
2298                  return "continue";
2299                }
2300  
2301                var nextEdits = Object.keys(edits).reduce(function (acc, key) {
2302                  // If the edited value is still different to the persisted value,
2303                  // keep the edited value in edits.
2304                  if ( // Edits are the "raw" attribute values, but records may have
2305                  // objects with more properties, so we use `get` here for the
2306                  // comparison.
2307                  !Object(external_this_lodash_["isEqual"])(edits[key], Object(external_this_lodash_["get"])(record[key], 'raw', record[key]))) {
2308                    acc[key] = edits[key];
2309                  }
2310  
2311                  return acc;
2312                }, {});
2313  
2314                if (Object.keys(nextEdits).length) {
2315                  nextState[recordId] = nextEdits;
2316                } else {
2317                  delete nextState[recordId];
2318                }
2319              };
2320  
2321              for (var _iterator = action.items[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
2322                var _ret = _loop();
2323  
2324                if (_ret === "continue") continue;
2325              }
2326            } catch (err) {
2327              _didIteratorError = true;
2328              _iteratorError = err;
2329            } finally {
2330              try {
2331                if (!_iteratorNormalCompletion && _iterator.return != null) {
2332                  _iterator.return();
2333                }
2334              } finally {
2335                if (_didIteratorError) {
2336                  throw _iteratorError;
2337                }
2338              }
2339            }
2340  
2341            return nextState;
2342  
2343          case 'EDIT_ENTITY_RECORD':
2344            var nextEdits = Object(objectSpread["a" /* default */])({}, state[action.recordId], action.edits);
2345  
2346            Object.keys(nextEdits).forEach(function (key) {
2347              // Delete cleared edits so that the properties
2348              // are not considered dirty.
2349              if (nextEdits[key] === undefined) {
2350                delete nextEdits[key];
2351              }
2352            });
2353            return Object(objectSpread["a" /* default */])({}, state, Object(defineProperty["a" /* default */])({}, action.recordId, nextEdits));
2354        }
2355  
2356        return state;
2357      },
2358      saving: function saving() {
2359        var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2360        var action = arguments.length > 1 ? arguments[1] : undefined;
2361  
2362        switch (action.type) {
2363          case 'SAVE_ENTITY_RECORD_START':
2364          case 'SAVE_ENTITY_RECORD_FINISH':
2365            return Object(objectSpread["a" /* default */])({}, state, Object(defineProperty["a" /* default */])({}, action.recordId, {
2366              pending: action.type === 'SAVE_ENTITY_RECORD_START',
2367              error: action.error,
2368              isAutosave: action.isAutosave
2369            }));
2370        }
2371  
2372        return state;
2373      }
2374    }));
2375  }
2376  /**
2377   * Reducer keeping track of the registered entities.
2378   *
2379   * @param {Object} state  Current state.
2380   * @param {Object} action Dispatched action.
2381   *
2382   * @return {Object} Updated state.
2383   */
2384  
2385  
2386  function entitiesConfig() {
2387    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultEntities;
2388    var action = arguments.length > 1 ? arguments[1] : undefined;
2389  
2390    switch (action.type) {
2391      case 'ADD_ENTITIES':
2392        return [].concat(Object(toConsumableArray["a" /* default */])(state), Object(toConsumableArray["a" /* default */])(action.entities));
2393    }
2394  
2395    return state;
2396  }
2397  /**
2398   * Reducer keeping track of the registered entities config and data.
2399   *
2400   * @param {Object} state  Current state.
2401   * @param {Object} action Dispatched action.
2402   *
2403   * @return {Object} Updated state.
2404   */
2405  
2406  var reducer_entities = function entities() {
2407    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2408    var action = arguments.length > 1 ? arguments[1] : undefined;
2409    var newConfig = entitiesConfig(state.config, action); // Generates a dynamic reducer for the entities
2410  
2411    var entitiesDataReducer = state.reducer;
2412  
2413    if (!entitiesDataReducer || newConfig !== state.config) {
2414      var entitiesByKind = Object(external_this_lodash_["groupBy"])(newConfig, 'kind');
2415      entitiesDataReducer = Object(external_this_wp_data_["combineReducers"])(Object.entries(entitiesByKind).reduce(function (memo, _ref) {
2416        var _ref2 = Object(slicedToArray["a" /* default */])(_ref, 2),
2417            kind = _ref2[0],
2418            subEntities = _ref2[1];
2419  
2420        var kindReducer = Object(external_this_wp_data_["combineReducers"])(subEntities.reduce(function (kindMemo, entityConfig) {
2421          return Object(objectSpread["a" /* default */])({}, kindMemo, Object(defineProperty["a" /* default */])({}, entityConfig.name, reducer_entity(entityConfig)));
2422        }, {}));
2423        memo[kind] = kindReducer;
2424        return memo;
2425      }, {}));
2426    }
2427  
2428    var newData = entitiesDataReducer(state.data, action);
2429  
2430    if (newData === state.data && newConfig === state.config && entitiesDataReducer === state.reducer) {
2431      return state;
2432    }
2433  
2434    return {
2435      reducer: entitiesDataReducer,
2436      data: newData,
2437      config: newConfig
2438    };
2439  };
2440  /**
2441   * Reducer keeping track of entity edit undo history.
2442   *
2443   * @param {Object} state  Current state.
2444   * @param {Object} action Dispatched action.
2445   *
2446   * @return {Object} Updated state.
2447   */
2448  
2449  var UNDO_INITIAL_STATE = [];
2450  UNDO_INITIAL_STATE.offset = 0;
2451  var lastEditAction;
2452  function reducer_undo() {
2453    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : UNDO_INITIAL_STATE;
2454    var action = arguments.length > 1 ? arguments[1] : undefined;
2455  
2456    switch (action.type) {
2457      case 'EDIT_ENTITY_RECORD':
2458      case 'CREATE_UNDO_LEVEL':
2459        var isCreateUndoLevel = action.type === 'CREATE_UNDO_LEVEL';
2460        var isUndoOrRedo = !isCreateUndoLevel && (action.meta.isUndo || action.meta.isRedo);
2461  
2462        if (isCreateUndoLevel) {
2463          action = lastEditAction;
2464        } else if (!isUndoOrRedo) {
2465          // Don't lose the last edit cache if the new one only has transient edits.
2466          // Transient edits don't create new levels so updating the cache would make
2467          // us skip an edit later when creating levels explicitly.
2468          if (Object.keys(action.edits).some(function (key) {
2469            return !action.transientEdits[key];
2470          })) {
2471            lastEditAction = action;
2472          } else {
2473            lastEditAction = Object(objectSpread["a" /* default */])({}, action, {
2474              edits: Object(objectSpread["a" /* default */])({}, lastEditAction && lastEditAction.edits, action.edits)
2475            });
2476          }
2477        }
2478  
2479        var nextState;
2480  
2481        if (isUndoOrRedo) {
2482          nextState = Object(toConsumableArray["a" /* default */])(state);
2483          nextState.offset = state.offset + (action.meta.isUndo ? -1 : 1);
2484  
2485          if (state.flattenedUndo) {
2486            // The first undo in a sequence of undos might happen while we have
2487            // flattened undos in state. If this is the case, we want execution
2488            // to continue as if we were creating an explicit undo level. This
2489            // will result in an extra undo level being appended with the flattened
2490            // undo values.
2491            isCreateUndoLevel = true;
2492            action = lastEditAction;
2493          } else {
2494            return nextState;
2495          }
2496        }
2497  
2498        if (!action.meta.undo) {
2499          return state;
2500        } // Transient edits don't create an undo level, but are
2501        // reachable in the next meaningful edit to which they
2502        // are merged. They are defined in the entity's config.
2503  
2504  
2505        if (!isCreateUndoLevel && !Object.keys(action.edits).some(function (key) {
2506          return !action.transientEdits[key];
2507        })) {
2508          nextState = Object(toConsumableArray["a" /* default */])(state);
2509          nextState.flattenedUndo = Object(objectSpread["a" /* default */])({}, state.flattenedUndo, action.edits);
2510          nextState.offset = state.offset;
2511          return nextState;
2512        } // Clear potential redos, because this only supports linear history.
2513  
2514  
2515        nextState = nextState || state.slice(0, state.offset || undefined);
2516        nextState.offset = nextState.offset || 0;
2517        nextState.pop();
2518  
2519        if (!isCreateUndoLevel) {
2520          nextState.push({
2521            kind: action.meta.undo.kind,
2522            name: action.meta.undo.name,
2523            recordId: action.meta.undo.recordId,
2524            edits: Object(objectSpread["a" /* default */])({}, state.flattenedUndo, action.meta.undo.edits)
2525          });
2526        } // When an edit is a function it's an optimization to avoid running some expensive operation.
2527        // We can't rely on the function references being the same so we opt out of comparing them here.
2528  
2529  
2530        var comparisonUndoEdits = Object.values(action.meta.undo.edits).filter(function (edit) {
2531          return typeof edit !== 'function';
2532        });
2533        var comparisonEdits = Object.values(action.edits).filter(function (edit) {
2534          return typeof edit !== 'function';
2535        });
2536  
2537        if (!external_this_wp_isShallowEqual_default()(comparisonUndoEdits, comparisonEdits)) {
2538          nextState.push({
2539            kind: action.kind,
2540            name: action.name,
2541            recordId: action.recordId,
2542            edits: isCreateUndoLevel ? Object(objectSpread["a" /* default */])({}, state.flattenedUndo, action.edits) : action.edits
2543          });
2544        }
2545  
2546        return nextState;
2547    }
2548  
2549    return state;
2550  }
2551  /**
2552   * Reducer managing embed preview data.
2553   *
2554   * @param {Object} state  Current state.
2555   * @param {Object} action Dispatched action.
2556   *
2557   * @return {Object} Updated state.
2558   */
2559  
2560  function embedPreviews() {
2561    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2562    var action = arguments.length > 1 ? arguments[1] : undefined;
2563  
2564    switch (action.type) {
2565      case 'RECEIVE_EMBED_PREVIEW':
2566        var url = action.url,
2567            preview = action.preview;
2568        return Object(objectSpread["a" /* default */])({}, state, Object(defineProperty["a" /* default */])({}, url, preview));
2569    }
2570  
2571    return state;
2572  }
2573  /**
2574   * State which tracks whether the user can perform an action on a REST
2575   * resource.
2576   *
2577   * @param  {Object} state  Current state.
2578   * @param  {Object} action Dispatched action.
2579   *
2580   * @return {Object} Updated state.
2581   */
2582  
2583  function userPermissions() {
2584    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2585    var action = arguments.length > 1 ? arguments[1] : undefined;
2586  
2587    switch (action.type) {
2588      case 'RECEIVE_USER_PERMISSION':
2589        return Object(objectSpread["a" /* default */])({}, state, Object(defineProperty["a" /* default */])({}, action.key, action.isAllowed));
2590    }
2591  
2592    return state;
2593  }
2594  /**
2595   * Reducer returning autosaves keyed by their parent's post id.
2596   *
2597   * @param  {Object} state  Current state.
2598   * @param  {Object} action Dispatched action.
2599   *
2600   * @return {Object} Updated state.
2601   */
2602  
2603  function reducer_autosaves() {
2604    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2605    var action = arguments.length > 1 ? arguments[1] : undefined;
2606  
2607    switch (action.type) {
2608      case 'RECEIVE_AUTOSAVES':
2609        var postId = action.postId,
2610            autosavesData = action.autosaves;
2611        return Object(objectSpread["a" /* default */])({}, state, Object(defineProperty["a" /* default */])({}, postId, autosavesData));
2612    }
2613  
2614    return state;
2615  }
2616  /* harmony default export */ var build_module_reducer = (Object(external_this_wp_data_["combineReducers"])({
2617    terms: terms,
2618    users: reducer_users,
2619    currentUser: reducer_currentUser,
2620    taxonomies: reducer_taxonomies,
2621    themeSupports: themeSupports,
2622    entities: reducer_entities,
2623    undo: reducer_undo,
2624    embedPreviews: embedPreviews,
2625    userPermissions: userPermissions,
2626    autosaves: reducer_autosaves
2627  }));
2628  
2629  // EXTERNAL MODULE: external {"this":["wp","deprecated"]}
2630  var external_this_wp_deprecated_ = __webpack_require__(33);
2631  var external_this_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_deprecated_);
2632  
2633  // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/name.js
2634  /**
2635   * The reducer key used by core data in store registration.
2636   * This is defined in a separate file to avoid cycle-dependency
2637   *
2638   * @type {string}
2639   */
2640  var REDUCER_KEY = 'core';
2641  
2642  // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/selectors.js
2643  
2644  
2645  /**
2646   * External dependencies
2647   */
2648  
2649  
2650  /**
2651   * WordPress dependencies
2652   */
2653  
2654  
2655  
2656  /**
2657   * Internal dependencies
2658   */
2659  
2660  
2661  
2662  /**
2663   * Returns true if a request is in progress for embed preview data, or false
2664   * otherwise.
2665   *
2666   * @param {Object} state Data state.
2667   * @param {string} url   URL the preview would be for.
2668   *
2669   * @return {boolean} Whether a request is in progress for an embed preview.
2670   */
2671  
2672  var isRequestingEmbedPreview = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
2673    return function (state, url) {
2674      return select('core/data').isResolving(REDUCER_KEY, 'getEmbedPreview', [url]);
2675    };
2676  });
2677  /**
2678   * Returns all available authors.
2679   *
2680   * @param {Object} state Data state.
2681   *
2682   * @return {Array} Authors list.
2683   */
2684  
2685  function getAuthors(state) {
2686    return getUserQueryResults(state, 'authors');
2687  }
2688  /**
2689   * Returns the current user.
2690   *
2691   * @param {Object} state Data state.
2692   *
2693   * @return {Object} Current user object.
2694   */
2695  
2696  function getCurrentUser(state) {
2697    return state.currentUser;
2698  }
2699  /**
2700   * Returns all the users returned by a query ID.
2701   *
2702   * @param {Object} state   Data state.
2703   * @param {string} queryID Query ID.
2704   *
2705   * @return {Array} Users list.
2706   */
2707  
2708  var getUserQueryResults = Object(rememo["a" /* default */])(function (state, queryID) {
2709    var queryResults = state.users.queries[queryID];
2710    return Object(external_this_lodash_["map"])(queryResults, function (id) {
2711      return state.users.byId[id];
2712    });
2713  }, function (state, queryID) {
2714    return [state.users.queries[queryID], state.users.byId];
2715  });
2716  /**
2717   * Returns whether the entities for the give kind are loaded.
2718   *
2719   * @param {Object} state   Data state.
2720   * @param {string} kind  Entity kind.
2721   *
2722   * @return {boolean} Whether the entities are loaded
2723   */
2724  
2725  function getEntitiesByKind(state, kind) {
2726    return Object(external_this_lodash_["filter"])(state.entities.config, {
2727      kind: kind
2728    });
2729  }
2730  /**
2731   * Returns the entity object given its kind and name.
2732   *
2733   * @param {Object} state   Data state.
2734   * @param {string} kind  Entity kind.
2735   * @param {string} name  Entity name.
2736   *
2737   * @return {Object} Entity
2738   */
2739  
2740  function selectors_getEntity(state, kind, name) {
2741    return Object(external_this_lodash_["find"])(state.entities.config, {
2742      kind: kind,
2743      name: name
2744    });
2745  }
2746  /**
2747   * Returns the Entity's record object by key.
2748   *
2749   * @param {Object} state  State tree
2750   * @param {string} kind   Entity kind.
2751   * @param {string} name   Entity name.
2752   * @param {number} key    Record's key
2753   *
2754   * @return {Object?} Record.
2755   */
2756  
2757  function getEntityRecord(state, kind, name, key) {
2758    return Object(external_this_lodash_["get"])(state.entities.data, [kind, name, 'queriedData', 'items', key]);
2759  }
2760  /**
2761   * Returns the entity's record object by key,
2762   * with its attributes mapped to their raw values.
2763   *
2764   * @param {Object} state  State tree.
2765   * @param {string} kind   Entity kind.
2766   * @param {string} name   Entity name.
2767   * @param {number} key    Record's key.
2768   *
2769   * @return {Object?} Object with the entity's raw attributes.
2770   */
2771  
2772  var getRawEntityRecord = Object(rememo["a" /* default */])(function (state, kind, name, key) {
2773    var record = getEntityRecord(state, kind, name, key);
2774    return record && Object.keys(record).reduce(function (accumulator, _key) {
2775      // Because edits are the "raw" attribute values,
2776      // we return those from record selectors to make rendering,
2777      // comparisons, and joins with edits easier.
2778      accumulator[_key] = Object(external_this_lodash_["get"])(record[_key], 'raw', record[_key]);
2779      return accumulator;
2780    }, {});
2781  }, function (state) {
2782    return [state.entities.data];
2783  });
2784  /**
2785   * Returns the Entity's records.
2786   *
2787   * @param {Object}  state  State tree
2788   * @param {string}  kind   Entity kind.
2789   * @param {string}  name   Entity name.
2790   * @param {?Object} query  Optional terms query.
2791   *
2792   * @return {Array} Records.
2793   */
2794  
2795  function getEntityRecords(state, kind, name, query) {
2796    var queriedState = Object(external_this_lodash_["get"])(state.entities.data, [kind, name, 'queriedData']);
2797  
2798    if (!queriedState) {
2799      return [];
2800    }
2801  
2802    return getQueriedItems(queriedState, query);
2803  }
2804  /**
2805   * Returns a map of objects with each edited
2806   * raw entity record and its corresponding edits.
2807   *
2808   * The map is keyed by entity `kind => name => key => { rawRecord, edits }`.
2809   *
2810   * @param {Object} state State tree.
2811   *
2812   * @return {{ [kind: string]: { [name: string]: { [key: string]: { rawRecord: Object<string,*>, edits: Object<string,*> } } } }} The map of edited records with their edits.
2813   */
2814  
2815  var getEntityRecordChangesByRecord = Object(rememo["a" /* default */])(function (state) {
2816    var data = state.entities.data;
2817    return Object.keys(data).reduce(function (acc, kind) {
2818      Object.keys(data[kind]).forEach(function (name) {
2819        var editsKeys = Object.keys(data[kind][name].edits).filter(function (editsKey) {
2820          return hasEditsForEntityRecord(state, kind, name, editsKey);
2821        });
2822  
2823        if (editsKeys.length) {
2824          if (!acc[kind]) {
2825            acc[kind] = {};
2826          }
2827  
2828          if (!acc[kind][name]) {
2829            acc[kind][name] = {};
2830          }
2831  
2832          editsKeys.forEach(function (editsKey) {
2833            return acc[kind][name][editsKey] = {
2834              rawRecord: getRawEntityRecord(state, kind, name, editsKey),
2835              edits: getEntityRecordNonTransientEdits(state, kind, name, editsKey)
2836            };
2837          });
2838        }
2839      });
2840      return acc;
2841    }, {});
2842  }, function (state) {
2843    return [state.entities.data];
2844  });
2845  /**
2846   * Returns the specified entity record's edits.
2847   *
2848   * @param {Object} state    State tree.
2849   * @param {string} kind     Entity kind.
2850   * @param {string} name     Entity name.
2851   * @param {number} recordId Record ID.
2852   *
2853   * @return {Object?} The entity record's edits.
2854   */
2855  
2856  function getEntityRecordEdits(state, kind, name, recordId) {
2857    return Object(external_this_lodash_["get"])(state.entities.data, [kind, name, 'edits', recordId]);
2858  }
2859  /**
2860   * Returns the specified entity record's non transient edits.
2861   *
2862   * Transient edits don't create an undo level, and
2863   * are not considered for change detection.
2864   * They are defined in the entity's config.
2865   *
2866   * @param {Object} state    State tree.
2867   * @param {string} kind     Entity kind.
2868   * @param {string} name     Entity name.
2869   * @param {number} recordId Record ID.
2870   *
2871   * @return {Object?} The entity record's non transient edits.
2872   */
2873  
2874  var getEntityRecordNonTransientEdits = Object(rememo["a" /* default */])(function (state, kind, name, recordId) {
2875    var _ref = selectors_getEntity(state, kind, name) || {},
2876        transientEdits = _ref.transientEdits;
2877  
2878    var edits = getEntityRecordEdits(state, kind, name, recordId) || {};
2879  
2880    if (!transientEdits) {
2881      return edits;
2882    }
2883  
2884    return Object.keys(edits).reduce(function (acc, key) {
2885      if (!transientEdits[key]) {
2886        acc[key] = edits[key];
2887      }
2888  
2889      return acc;
2890    }, {});
2891  }, function (state) {
2892    return [state.entities.config, state.entities.data];
2893  });
2894  /**
2895   * Returns true if the specified entity record has edits,
2896   * and false otherwise.
2897   *
2898   * @param {Object} state    State tree.
2899   * @param {string} kind     Entity kind.
2900   * @param {string} name     Entity name.
2901   * @param {number} recordId Record ID.
2902   *
2903   * @return {boolean} Whether the entity record has edits or not.
2904   */
2905  
2906  function hasEditsForEntityRecord(state, kind, name, recordId) {
2907    return isSavingEntityRecord(state, kind, name, recordId) || Object.keys(getEntityRecordNonTransientEdits(state, kind, name, recordId)).length > 0;
2908  }
2909  /**
2910   * Returns the specified entity record, merged with its edits.
2911   *
2912   * @param {Object} state    State tree.
2913   * @param {string} kind     Entity kind.
2914   * @param {string} name     Entity name.
2915   * @param {number} recordId Record ID.
2916   *
2917   * @return {Object?} The entity record, merged with its edits.
2918   */
2919  
2920  var getEditedEntityRecord = Object(rememo["a" /* default */])(function (state, kind, name, recordId) {
2921    return Object(objectSpread["a" /* default */])({}, getRawEntityRecord(state, kind, name, recordId), getEntityRecordEdits(state, kind, name, recordId));
2922  }, function (state) {
2923    return [state.entities.data];
2924  });
2925  /**
2926   * Returns true if the specified entity record is autosaving, and false otherwise.
2927   *
2928   * @param {Object} state    State tree.
2929   * @param {string} kind     Entity kind.
2930   * @param {string} name     Entity name.
2931   * @param {number} recordId Record ID.
2932   *
2933   * @return {boolean} Whether the entity record is autosaving or not.
2934   */
2935  
2936  function isAutosavingEntityRecord(state, kind, name, recordId) {
2937    var _get = Object(external_this_lodash_["get"])(state.entities.data, [kind, name, 'saving', recordId], {}),
2938        pending = _get.pending,
2939        isAutosave = _get.isAutosave;
2940  
2941    return Boolean(pending && isAutosave);
2942  }
2943  /**
2944   * Returns true if the specified entity record is saving, and false otherwise.
2945   *
2946   * @param {Object} state    State tree.
2947   * @param {string} kind     Entity kind.
2948   * @param {string} name     Entity name.
2949   * @param {number} recordId Record ID.
2950   *
2951   * @return {boolean} Whether the entity record is saving or not.
2952   */
2953  
2954  function isSavingEntityRecord(state, kind, name, recordId) {
2955    return Object(external_this_lodash_["get"])(state.entities.data, [kind, name, 'saving', recordId, 'pending'], false);
2956  }
2957  /**
2958   * Returns the specified entity record's last save error.
2959   *
2960   * @param {Object} state    State tree.
2961   * @param {string} kind     Entity kind.
2962   * @param {string} name     Entity name.
2963   * @param {number} recordId Record ID.
2964   *
2965   * @return {Object?} The entity record's save error.
2966   */
2967  
2968  function getLastEntitySaveError(state, kind, name, recordId) {
2969    return Object(external_this_lodash_["get"])(state.entities.data, [kind, name, 'saving', recordId, 'error']);
2970  }
2971  /**
2972   * Returns the current undo offset for the
2973   * entity records edits history. The offset
2974   * represents how many items from the end
2975   * of the history stack we are at. 0 is the
2976   * last edit, -1 is the second last, and so on.
2977   *
2978   * @param {Object} state State tree.
2979   *
2980   * @return {number} The current undo offset.
2981   */
2982  
2983  function getCurrentUndoOffset(state) {
2984    return state.undo.offset;
2985  }
2986  /**
2987   * Returns the previous edit from the current undo offset
2988   * for the entity records edits history, if any.
2989   *
2990   * @param {Object} state State tree.
2991   *
2992   * @return {Object?} The edit.
2993   */
2994  
2995  
2996  function getUndoEdit(state) {
2997    return state.undo[state.undo.length - 2 + getCurrentUndoOffset(state)];
2998  }
2999  /**
3000   * Returns the next edit from the current undo offset
3001   * for the entity records edits history, if any.
3002   *
3003   * @param {Object} state State tree.
3004   *
3005   * @return {Object?} The edit.
3006   */
3007  
3008  function getRedoEdit(state) {
3009    return state.undo[state.undo.length + getCurrentUndoOffset(state)];
3010  }
3011  /**
3012   * Returns true if there is a previous edit from the current undo offset
3013   * for the entity records edits history, and false otherwise.
3014   *
3015   * @param {Object} state State tree.
3016   *
3017   * @return {boolean} Whether there is a previous edit or not.
3018   */
3019  
3020  function hasUndo(state) {
3021    return Boolean(getUndoEdit(state));
3022  }
3023  /**
3024   * Returns true if there is a next edit from the current undo offset
3025   * for the entity records edits history, and false otherwise.
3026   *
3027   * @param {Object} state State tree.
3028   *
3029   * @return {boolean} Whether there is a next edit or not.
3030   */
3031  
3032  function hasRedo(state) {
3033    return Boolean(getRedoEdit(state));
3034  }
3035  /**
3036   * Return theme supports data in the index.
3037   *
3038   * @param {Object} state Data state.
3039   *
3040   * @return {*}           Index data.
3041   */
3042  
3043  function getThemeSupports(state) {
3044    return state.themeSupports;
3045  }
3046  /**
3047   * Returns the embed preview for the given URL.
3048   *
3049   * @param {Object} state    Data state.
3050   * @param {string} url      Embedded URL.
3051   *
3052   * @return {*} Undefined if the preview has not been fetched, otherwise, the preview fetched from the embed preview API.
3053   */
3054  
3055  function getEmbedPreview(state, url) {
3056    return state.embedPreviews[url];
3057  }
3058  /**
3059   * Determines if the returned preview is an oEmbed link fallback.
3060   *
3061   * WordPress can be configured to return a simple link to a URL if it is not embeddable.
3062   * We need to be able to determine if a URL is embeddable or not, based on what we
3063   * get back from the oEmbed preview API.
3064   *
3065   * @param {Object} state    Data state.
3066   * @param {string} url      Embedded URL.
3067   *
3068   * @return {boolean} Is the preview for the URL an oEmbed link fallback.
3069   */
3070  
3071  function isPreviewEmbedFallback(state, url) {
3072    var preview = state.embedPreviews[url];
3073    var oEmbedLinkCheck = '<a href="' + url + '">' + url + '</a>';
3074  
3075    if (!preview) {
3076      return false;
3077    }
3078  
3079    return preview.html === oEmbedLinkCheck;
3080  }
3081  /**
3082   * Returns whether the current user can upload media.
3083   *
3084   * Calling this may trigger an OPTIONS request to the REST API via the
3085   * `canUser()` resolver.
3086   *
3087   * https://developer.wordpress.org/rest-api/reference/
3088   *
3089   * @deprecated since 5.0. Callers should use the more generic `canUser()` selector instead of
3090   *             `hasUploadPermissions()`, e.g. `canUser( 'create', 'media' )`.
3091   *
3092   * @param {Object} state Data state.
3093   *
3094   * @return {boolean} Whether or not the user can upload media. Defaults to `true` if the OPTIONS
3095   *                   request is being made.
3096   */
3097  
3098  function hasUploadPermissions(state) {
3099    external_this_wp_deprecated_default()("select( 'core' ).hasUploadPermissions()", {
3100      alternative: "select( 'core' ).canUser( 'create', 'media' )"
3101    });
3102    return Object(external_this_lodash_["defaultTo"])(canUser(state, 'create', 'media'), true);
3103  }
3104  /**
3105   * Returns whether the current user can perform the given action on the given
3106   * REST resource.
3107   *
3108   * Calling this may trigger an OPTIONS request to the REST API via the
3109   * `canUser()` resolver.
3110   *
3111   * https://developer.wordpress.org/rest-api/reference/
3112   *
3113   * @param {Object}   state            Data state.
3114   * @param {string}   action           Action to check. One of: 'create', 'read', 'update', 'delete'.
3115   * @param {string}   resource         REST resource to check, e.g. 'media' or 'posts'.
3116   * @param {string=}  id               Optional ID of the rest resource to check.
3117   *
3118   * @return {boolean|undefined} Whether or not the user can perform the action,
3119   *                             or `undefined` if the OPTIONS request is still being made.
3120   */
3121  
3122  function canUser(state, action, resource, id) {
3123    var key = Object(external_this_lodash_["compact"])([action, resource, id]).join('/');
3124    return Object(external_this_lodash_["get"])(state, ['userPermissions', key]);
3125  }
3126  /**
3127   * Returns the latest autosaves for the post.
3128   *
3129   * May return multiple autosaves since the backend stores one autosave per
3130   * author for each post.
3131   *
3132   * @param {Object} state    State tree.
3133   * @param {string} postType The type of the parent post.
3134   * @param {number} postId   The id of the parent post.
3135   *
3136   * @return {?Array} An array of autosaves for the post, or undefined if there is none.
3137   */
3138  
3139  function getAutosaves(state, postType, postId) {
3140    return state.autosaves[postId];
3141  }
3142  /**
3143   * Returns the autosave for the post and author.
3144   *
3145   * @param {Object} state    State tree.
3146   * @param {string} postType The type of the parent post.
3147   * @param {number} postId   The id of the parent post.
3148   * @param {number} authorId The id of the author.
3149   *
3150   * @return {?Object} The autosave for the post and author.
3151   */
3152  
3153  function getAutosave(state, postType, postId, authorId) {
3154    if (authorId === undefined) {
3155      return;
3156    }
3157  
3158    var autosaves = state.autosaves[postId];
3159    return Object(external_this_lodash_["find"])(autosaves, {
3160      author: authorId
3161    });
3162  }
3163  /**
3164   * Returns true if the REST request for autosaves has completed.
3165   *
3166   * @param {Object} state State tree.
3167   * @param {string} postType The type of the parent post.
3168   * @param {number} postId   The id of the parent post.
3169   *
3170   * @return {boolean} True if the REST request was completed. False otherwise.
3171   */
3172  
3173  var hasFetchedAutosaves = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
3174    return function (state, postType, postId) {
3175      return select(REDUCER_KEY).hasFinishedResolution('getAutosaves', [postType, postId]);
3176    };
3177  });
3178  /**
3179   * Returns a new reference when edited values have changed. This is useful in
3180   * inferring where an edit has been made between states by comparison of the
3181   * return values using strict equality.
3182   *
3183   * @example
3184   *
3185   * ```
3186   * const hasEditOccurred = (
3187   *    getReferenceByDistinctEdits( beforeState ) !==
3188   *    getReferenceByDistinctEdits( afterState )
3189   * );
3190   * ```
3191   *
3192   * @param {Object} state Editor state.
3193   *
3194   * @return {*} A value whose reference will change only when an edit occurs.
3195   */
3196  
3197  var getReferenceByDistinctEdits = Object(rememo["a" /* default */])(function () {
3198    return [];
3199  }, function (state) {
3200    return [state.undo.length, state.undo.offset];
3201  });
3202  
3203  // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/resolvers.js
3204  
3205  
3206  
3207  var resolvers_marked =
3208  /*#__PURE__*/
3209  external_this_regeneratorRuntime_default.a.mark(resolvers_getAuthors),
3210      resolvers_marked2 =
3211  /*#__PURE__*/
3212  external_this_regeneratorRuntime_default.a.mark(resolvers_getCurrentUser),
3213      resolvers_marked3 =
3214  /*#__PURE__*/
3215  external_this_regeneratorRuntime_default.a.mark(resolvers_getEntityRecord),
3216      resolvers_marked4 =
3217  /*#__PURE__*/
3218  external_this_regeneratorRuntime_default.a.mark(resolvers_getEntityRecords),
3219      resolvers_marked5 =
3220  /*#__PURE__*/
3221  external_this_regeneratorRuntime_default.a.mark(resolvers_getThemeSupports),
3222      _marked6 =
3223  /*#__PURE__*/
3224  external_this_regeneratorRuntime_default.a.mark(resolvers_getEmbedPreview),
3225      _marked7 =
3226  /*#__PURE__*/
3227  external_this_regeneratorRuntime_default.a.mark(resolvers_hasUploadPermissions),
3228      _marked8 =
3229  /*#__PURE__*/
3230  external_this_regeneratorRuntime_default.a.mark(resolvers_canUser),
3231      _marked9 =
3232  /*#__PURE__*/
3233  external_this_regeneratorRuntime_default.a.mark(resolvers_getAutosaves),
3234      _marked10 =
3235  /*#__PURE__*/
3236  external_this_regeneratorRuntime_default.a.mark(resolvers_getAutosave);
3237  
3238  /**
3239   * External dependencies
3240   */
3241  
3242  /**
3243   * WordPress dependencies
3244   */
3245  
3246  
3247  
3248  /**
3249   * Internal dependencies
3250   */
3251  
3252  
3253  
3254  
3255  /**
3256   * Requests authors from the REST API.
3257   */
3258  
3259  function resolvers_getAuthors() {
3260    var users;
3261    return external_this_regeneratorRuntime_default.a.wrap(function getAuthors$(_context) {
3262      while (1) {
3263        switch (_context.prev = _context.next) {
3264          case 0:
3265            _context.next = 2;
3266            return apiFetch({
3267              path: '/wp/v2/users/?who=authors&per_page=-1'
3268            });
3269  
3270          case 2:
3271            users = _context.sent;
3272            _context.next = 5;
3273            return receiveUserQuery('authors', users);
3274  
3275          case 5:
3276          case "end":
3277            return _context.stop();
3278        }
3279      }
3280    }, resolvers_marked);
3281  }
3282  /**
3283   * Requests the current user from the REST API.
3284   */
3285  
3286  function resolvers_getCurrentUser() {
3287    var currentUser;
3288    return external_this_regeneratorRuntime_default.a.wrap(function getCurrentUser$(_context2) {
3289      while (1) {
3290        switch (_context2.prev = _context2.next) {
3291          case 0:
3292            _context2.next = 2;
3293            return apiFetch({
3294              path: '/wp/v2/users/me'
3295            });
3296  
3297          case 2:
3298            currentUser = _context2.sent;
3299            _context2.next = 5;
3300            return receiveCurrentUser(currentUser);
3301  
3302          case 5:
3303          case "end":
3304            return _context2.stop();
3305        }
3306      }
3307    }, resolvers_marked2);
3308  }
3309  /**
3310   * Requests an entity's record from the REST API.
3311   *
3312   * @param {string} kind   Entity kind.
3313   * @param {string} name   Entity name.
3314   * @param {number} key    Record's key
3315   */
3316  
3317  function resolvers_getEntityRecord(kind, name) {
3318    var key,
3319        entities,
3320        entity,
3321        record,
3322        _args3 = arguments;
3323    return external_this_regeneratorRuntime_default.a.wrap(function getEntityRecord$(_context3) {
3324      while (1) {
3325        switch (_context3.prev = _context3.next) {
3326          case 0:
3327            key = _args3.length > 2 && _args3[2] !== undefined ? _args3[2] : '';
3328            _context3.next = 3;
3329            return getKindEntities(kind);
3330  
3331          case 3:
3332            entities = _context3.sent;
3333            entity = Object(external_this_lodash_["find"])(entities, {
3334              kind: kind,
3335              name: name
3336            });
3337  
3338            if (entity) {
3339              _context3.next = 7;
3340              break;
3341            }
3342  
3343            return _context3.abrupt("return");
3344  
3345          case 7:
3346            _context3.next = 9;
3347            return apiFetch({
3348              path: "".concat(entity.baseURL, "/").concat(key, "?context=edit")
3349            });
3350  
3351          case 9:
3352            record = _context3.sent;
3353            _context3.next = 12;
3354            return receiveEntityRecords(kind, name, record);
3355  
3356          case 12:
3357          case "end":
3358            return _context3.stop();
3359        }
3360      }
3361    }, resolvers_marked3);
3362  }
3363  /**
3364   * Requests the entity's records from the REST API.
3365   *
3366   * @param {string}  kind   Entity kind.
3367   * @param {string}  name   Entity name.
3368   * @param {Object?} query  Query Object.
3369   */
3370  
3371  function resolvers_getEntityRecords(kind, name) {
3372    var query,
3373        entities,
3374        entity,
3375        path,
3376        records,
3377        _args4 = arguments;
3378    return external_this_regeneratorRuntime_default.a.wrap(function getEntityRecords$(_context4) {
3379      while (1) {
3380        switch (_context4.prev = _context4.next) {
3381          case 0:
3382            query = _args4.length > 2 && _args4[2] !== undefined ? _args4[2] : {};
3383            _context4.next = 3;
3384            return getKindEntities(kind);
3385  
3386          case 3:
3387            entities = _context4.sent;
3388            entity = Object(external_this_lodash_["find"])(entities, {
3389              kind: kind,
3390              name: name
3391            });
3392  
3393            if (entity) {
3394              _context4.next = 7;
3395              break;
3396            }
3397  
3398            return _context4.abrupt("return");
3399  
3400          case 7:
3401            path = Object(external_this_wp_url_["addQueryArgs"])(entity.baseURL, Object(objectSpread["a" /* default */])({}, query, {
3402              context: 'edit'
3403            }));
3404            _context4.next = 10;
3405            return apiFetch({
3406              path: path
3407            });
3408  
3409          case 10:
3410            records = _context4.sent;
3411            _context4.next = 13;
3412            return receiveEntityRecords(kind, name, Object.values(records), query);
3413  
3414          case 13:
3415          case "end":
3416            return _context4.stop();
3417        }
3418      }
3419    }, resolvers_marked4);
3420  }
3421  
3422  resolvers_getEntityRecords.shouldInvalidate = function (action, kind, name) {
3423    return action.type === 'RECEIVE_ITEMS' && action.invalidateCache && kind === action.kind && name === action.name;
3424  };
3425  /**
3426   * Requests theme supports data from the index.
3427   */
3428  
3429  
3430  function resolvers_getThemeSupports() {
3431    var activeThemes;
3432    return external_this_regeneratorRuntime_default.a.wrap(function getThemeSupports$(_context5) {
3433      while (1) {
3434        switch (_context5.prev = _context5.next) {
3435          case 0:
3436            _context5.next = 2;
3437            return apiFetch({
3438              path: '/wp/v2/themes?status=active'
3439            });
3440  
3441          case 2:
3442            activeThemes = _context5.sent;
3443            _context5.next = 5;
3444            return receiveThemeSupports(activeThemes[0].theme_supports);
3445  
3446          case 5:
3447          case "end":
3448            return _context5.stop();
3449        }
3450      }
3451    }, resolvers_marked5);
3452  }
3453  /**
3454   * Requests a preview from the from the Embed API.
3455   *
3456   * @param {string} url   URL to get the preview for.
3457   */
3458  
3459  function resolvers_getEmbedPreview(url) {
3460    var embedProxyResponse;
3461    return external_this_regeneratorRuntime_default.a.wrap(function getEmbedPreview$(_context6) {
3462      while (1) {
3463        switch (_context6.prev = _context6.next) {
3464          case 0:
3465            _context6.prev = 0;
3466            _context6.next = 3;
3467            return apiFetch({
3468              path: Object(external_this_wp_url_["addQueryArgs"])('/oembed/1.0/proxy', {
3469                url: url
3470              })
3471            });
3472  
3473          case 3:
3474            embedProxyResponse = _context6.sent;
3475            _context6.next = 6;
3476            return receiveEmbedPreview(url, embedProxyResponse);
3477  
3478          case 6:
3479            _context6.next = 12;
3480            break;
3481  
3482          case 8:
3483            _context6.prev = 8;
3484            _context6.t0 = _context6["catch"](0);
3485            _context6.next = 12;
3486            return receiveEmbedPreview(url, false);
3487  
3488          case 12:
3489          case "end":
3490            return _context6.stop();
3491        }
3492      }
3493    }, _marked6, null, [[0, 8]]);
3494  }
3495  /**
3496   * Requests Upload Permissions from the REST API.
3497   *
3498   * @deprecated since 5.0. Callers should use the more generic `canUser()` selector instead of
3499   *            `hasUploadPermissions()`, e.g. `canUser( 'create', 'media' )`.
3500   */
3501  
3502  function resolvers_hasUploadPermissions() {
3503    return external_this_regeneratorRuntime_default.a.wrap(function hasUploadPermissions$(_context7) {
3504      while (1) {
3505        switch (_context7.prev = _context7.next) {
3506          case 0:
3507            external_this_wp_deprecated_default()("select( 'core' ).hasUploadPermissions()", {
3508              alternative: "select( 'core' ).canUser( 'create', 'media' )"
3509            });
3510            return _context7.delegateYield(resolvers_canUser('create', 'media'), "t0", 2);
3511  
3512          case 2:
3513          case "end":
3514            return _context7.stop();
3515        }
3516      }
3517    }, _marked7);
3518  }
3519  /**
3520   * Checks whether the current user can perform the given action on the given
3521   * REST resource.
3522   *
3523   * @param {string}  action   Action to check. One of: 'create', 'read', 'update',
3524   *                           'delete'.
3525   * @param {string}  resource REST resource to check, e.g. 'media' or 'posts'.
3526   * @param {?string} id       ID of the rest resource to check.
3527   */
3528  
3529  function resolvers_canUser(action, resource, id) {
3530    var methods, method, path, response, allowHeader, key, isAllowed;
3531    return external_this_regeneratorRuntime_default.a.wrap(function canUser$(_context8) {
3532      while (1) {
3533        switch (_context8.prev = _context8.next) {
3534          case 0:
3535            methods = {
3536              create: 'POST',
3537              read: 'GET',
3538              update: 'PUT',
3539              delete: 'DELETE'
3540            };
3541            method = methods[action];
3542  
3543            if (method) {
3544              _context8.next = 4;
3545              break;
3546            }
3547  
3548            throw new Error("'".concat(action, "' is not a valid action."));
3549  
3550          case 4:
3551            path = id ? "/wp/v2/".concat(resource, "/").concat(id) : "/wp/v2/".concat(resource);
3552            _context8.prev = 5;
3553            _context8.next = 8;
3554            return apiFetch({
3555              path: path,
3556              // Ideally this would always be an OPTIONS request, but unfortunately there's
3557              // a bug in the REST API which causes the Allow header to not be sent on
3558              // OPTIONS requests to /posts/:id routes.
3559              // https://core.trac.wordpress.org/ticket/45753
3560              method: id ? 'GET' : 'OPTIONS',
3561              parse: false
3562            });
3563  
3564          case 8:
3565            response = _context8.sent;
3566            _context8.next = 14;
3567            break;
3568  
3569          case 11:
3570            _context8.prev = 11;
3571            _context8.t0 = _context8["catch"](5);
3572            return _context8.abrupt("return");
3573  
3574          case 14:
3575            if (Object(external_this_lodash_["hasIn"])(response, ['headers', 'get'])) {
3576              // If the request is fetched using the fetch api, the header can be
3577              // retrieved using the 'get' method.
3578              allowHeader = response.headers.get('allow');
3579            } else {
3580              // If the request was preloaded server-side and is returned by the
3581              // preloading middleware, the header will be a simple property.
3582              allowHeader = Object(external_this_lodash_["get"])(response, ['headers', 'Allow'], '');
3583            }
3584  
3585            key = Object(external_this_lodash_["compact"])([action, resource, id]).join('/');
3586            isAllowed = Object(external_this_lodash_["includes"])(allowHeader, method);
3587            _context8.next = 19;
3588            return receiveUserPermission(key, isAllowed);
3589  
3590          case 19:
3591          case "end":
3592            return _context8.stop();
3593        }
3594      }
3595    }, _marked8, null, [[5, 11]]);
3596  }
3597  /**
3598   * Request autosave data from the REST API.
3599   *
3600   * @param {string} postType The type of the parent post.
3601   * @param {number} postId   The id of the parent post.
3602   */
3603  
3604  function resolvers_getAutosaves(postType, postId) {
3605    var _ref, restBase, autosaves;
3606  
3607    return external_this_regeneratorRuntime_default.a.wrap(function getAutosaves$(_context9) {
3608      while (1) {
3609        switch (_context9.prev = _context9.next) {
3610          case 0:
3611            _context9.next = 2;
3612            return resolveSelect('getPostType', postType);
3613  
3614          case 2:
3615            _ref = _context9.sent;
3616            restBase = _ref.rest_base;
3617            _context9.next = 6;
3618            return apiFetch({
3619              path: "/wp/v2/".concat(restBase, "/").concat(postId, "/autosaves?context=edit")
3620            });
3621  
3622          case 6:
3623            autosaves = _context9.sent;
3624  
3625            if (!(autosaves && autosaves.length)) {
3626              _context9.next = 10;
3627              break;
3628            }
3629  
3630            _context9.next = 10;
3631            return receiveAutosaves(postId, autosaves);
3632  
3633          case 10:
3634          case "end":
3635            return _context9.stop();
3636        }
3637      }
3638    }, _marked9);
3639  }
3640  /**
3641   * Request autosave data from the REST API.
3642   *
3643   * This resolver exists to ensure the underlying autosaves are fetched via
3644   * `getAutosaves` when a call to the `getAutosave` selector is made.
3645   *
3646   * @param {string} postType The type of the parent post.
3647   * @param {number} postId   The id of the parent post.
3648   */
3649  
3650  function resolvers_getAutosave(postType, postId) {
3651    return external_this_regeneratorRuntime_default.a.wrap(function getAutosave$(_context10) {
3652      while (1) {
3653        switch (_context10.prev = _context10.next) {
3654          case 0:
3655            _context10.next = 2;
3656            return resolveSelect('getAutosaves', postType, postId);
3657  
3658          case 2:
3659          case "end":
3660            return _context10.stop();
3661        }
3662      }
3663    }, _marked10);
3664  }
3665  
3666  // EXTERNAL MODULE: external {"this":["wp","element"]}
3667  var external_this_wp_element_ = __webpack_require__(0);
3668  
3669  // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/entity-provider.js
3670  
3671  
3672  
3673  
3674  
3675  /**
3676   * WordPress dependencies
3677   */
3678  
3679  
3680  /**
3681   * Internal dependencies
3682   */
3683  
3684  
3685  
3686  var entity_provider_entities = Object(objectSpread["a" /* default */])({}, defaultEntities.reduce(function (acc, entity) {
3687    if (!acc[entity.kind]) {
3688      acc[entity.kind] = {};
3689    }
3690  
3691    acc[entity.kind][entity.name] = {
3692      context: Object(external_this_wp_element_["createContext"])()
3693    };
3694    return acc;
3695  }, {}), kinds.reduce(function (acc, kind) {
3696    acc[kind.name] = {};
3697    return acc;
3698  }, {}));
3699  
3700  var entity_provider_getEntity = function getEntity(kind, type) {
3701    if (!entity_provider_entities[kind]) {
3702      throw new Error("Missing entity config for kind: ".concat(kind, "."));
3703    }
3704  
3705    if (!entity_provider_entities[kind][type]) {
3706      entity_provider_entities[kind][type] = {
3707        context: Object(external_this_wp_element_["createContext"])()
3708      };
3709    }
3710  
3711    return entity_provider_entities[kind][type];
3712  };
3713  /**
3714   * Context provider component for providing
3715   * an entity for a specific entity type.
3716   *
3717   * @param {Object} props          The component's props.
3718   * @param {string} props.kind     The entity kind.
3719   * @param {string} props.type     The entity type.
3720   * @param {number} props.id       The entity ID.
3721   * @param {*}      props.children The children to wrap.
3722   *
3723   * @return {Object} The provided children, wrapped with
3724   *                   the entity's context provider.
3725   */
3726  
3727  
3728  function EntityProvider(_ref) {
3729    var kind = _ref.kind,
3730        type = _ref.type,
3731        id = _ref.id,
3732        children = _ref.children;
3733    var Provider = entity_provider_getEntity(kind, type).context.Provider;
3734    return Object(external_this_wp_element_["createElement"])(Provider, {
3735      value: id
3736    }, children);
3737  }
3738  /**
3739   * Hook that returns the ID for the nearest
3740   * provided entity of the specified type.
3741   *
3742   * @param {string} kind The entity kind.
3743   * @param {string} type The entity type.
3744   */
3745  
3746  function useEntityId(kind, type) {
3747    return Object(external_this_wp_element_["useContext"])(entity_provider_getEntity(kind, type).context);
3748  }
3749  /**
3750   * Hook that returns the value and a setter for the
3751   * specified property of the nearest provided
3752   * entity of the specified type.
3753   *
3754   * @param {string} kind The entity kind.
3755   * @param {string} type The entity type.
3756   * @param {string} prop The property name.
3757   *
3758   * @return {[*, Function]} A tuple where the first item is the
3759   *                          property value and the second is the
3760   *                          setter.
3761   */
3762  
3763  function useEntityProp(kind, type, prop) {
3764    var id = useEntityId(kind, type);
3765    var value = Object(external_this_wp_data_["useSelect"])(function (select) {
3766      var _select = select('core'),
3767          getEntityRecord = _select.getEntityRecord,
3768          getEditedEntityRecord = _select.getEditedEntityRecord;
3769  
3770      getEntityRecord(kind, type, id); // Trigger resolver.
3771  
3772      var entity = getEditedEntityRecord(kind, type, id);
3773      return entity && entity[prop];
3774    }, [kind, type, id, prop]);
3775  
3776    var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core'),
3777        editEntityRecord = _useDispatch.editEntityRecord;
3778  
3779    var setValue = Object(external_this_wp_element_["useCallback"])(function (newValue) {
3780      editEntityRecord(kind, type, id, Object(defineProperty["a" /* default */])({}, prop, newValue));
3781    }, [kind, type, id, prop]);
3782    return [value, setValue];
3783  }
3784  /**
3785   * Hook that returns whether the nearest provided
3786   * entity of the specified type is dirty, saving,
3787   * and a function to save it.
3788   *
3789   * The last, optional parameter is for scoping the
3790   * selection to a single property or a list properties.
3791   *
3792   * By default, dirtyness detection and saving considers
3793   * and handles all properties of an entity, but this
3794   * last parameter lets you scope it to a single property
3795   * or a list of properties for each instance of this hook.
3796   *
3797   * @param {string}          kind    The entity kind.
3798   * @param {string}          type    The entity type.
3799   * @param {string|[string]} [props] The property name or list of property names.
3800   */
3801  
3802  function __experimentalUseEntitySaving(kind, type, props) {
3803    var id = useEntityId(kind, type);
3804  
3805    var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
3806      var _select2 = select('core'),
3807          getEntityRecordNonTransientEdits = _select2.getEntityRecordNonTransientEdits,
3808          isSavingEntityRecord = _select2.isSavingEntityRecord;
3809  
3810      var _edits = getEntityRecordNonTransientEdits(kind, type, id);
3811  
3812      var editKeys = Object.keys(_edits);
3813      return [props ? editKeys.some(function (key) {
3814        return typeof props === 'string' ? key === props : props.includes(key);
3815      }) : editKeys.length > 0, isSavingEntityRecord(kind, type, id), _edits];
3816    }, [kind, type, id, props]),
3817        _useSelect2 = Object(slicedToArray["a" /* default */])(_useSelect, 3),
3818        isDirty = _useSelect2[0],
3819        isSaving = _useSelect2[1],
3820        edits = _useSelect2[2];
3821  
3822    var _useDispatch2 = Object(external_this_wp_data_["useDispatch"])('core'),
3823        saveEntityRecord = _useDispatch2.saveEntityRecord;
3824  
3825    var save = Object(external_this_wp_element_["useCallback"])(function () {
3826      var filteredEdits = edits;
3827  
3828      if (typeof props === 'string') {
3829        filteredEdits = Object(defineProperty["a" /* default */])({}, props, filteredEdits[props]);
3830      } else if (props) {
3831        filteredEdits = filteredEdits.reduce(function (acc, key) {
3832          if (props.includes(key)) {
3833            acc[key] = filteredEdits[key];
3834          }
3835  
3836          return acc;
3837        }, {});
3838      }
3839  
3840      saveEntityRecord(kind, type, Object(objectSpread["a" /* default */])({
3841        id: id
3842      }, filteredEdits));
3843    }, [kind, type, id, props, edits]);
3844    return [isDirty, isSaving, save];
3845  }
3846  
3847  // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/index.js
3848  /* concated harmony reexport EntityProvider */__webpack_require__.d(__webpack_exports__, "EntityProvider", function() { return EntityProvider; });
3849  /* concated harmony reexport useEntityId */__webpack_require__.d(__webpack_exports__, "useEntityId", function() { return useEntityId; });
3850  /* concated harmony reexport useEntityProp */__webpack_require__.d(__webpack_exports__, "useEntityProp", function() { return useEntityProp; });
3851  /* concated harmony reexport __experimentalUseEntitySaving */__webpack_require__.d(__webpack_exports__, "__experimentalUseEntitySaving", function() { return __experimentalUseEntitySaving; });
3852  
3853  
3854  /**
3855   * WordPress dependencies
3856   */
3857  
3858  /**
3859   * Internal dependencies
3860   */
3861  
3862  
3863  
3864  
3865  
3866  
3867  
3868   // The entity selectors/resolvers and actions are shortcuts to their generic equivalents
3869  // (getEntityRecord, getEntityRecords, updateEntityRecord, updateEntityRecordss)
3870  // Instead of getEntityRecord, the consumer could use more user-frieldly named selector: getPostType, getTaxonomy...
3871  // The "kind" and the "name" of the entity are combined to generate these shortcuts.
3872  
3873  var entitySelectors = defaultEntities.reduce(function (result, entity) {
3874    var kind = entity.kind,
3875        name = entity.name;
3876  
3877    result[entities_getMethodName(kind, name)] = function (state, key) {
3878      return getEntityRecord(state, kind, name, key);
3879    };
3880  
3881    result[entities_getMethodName(kind, name, 'get', true)] = function (state) {
3882      for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
3883        args[_key - 1] = arguments[_key];
3884      }
3885  
3886      return getEntityRecords.apply(build_module_selectors_namespaceObject, [state, kind, name].concat(args));
3887    };
3888  
3889    return result;
3890  }, {});
3891  var entityResolvers = defaultEntities.reduce(function (result, entity) {
3892    var kind = entity.kind,
3893        name = entity.name;
3894  
3895    result[entities_getMethodName(kind, name)] = function (key) {
3896      return resolvers_getEntityRecord(kind, name, key);
3897    };
3898  
3899    var pluralMethodName = entities_getMethodName(kind, name, 'get', true);
3900  
3901    result[pluralMethodName] = function () {
3902      for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
3903        args[_key2] = arguments[_key2];
3904      }
3905  
3906      return resolvers_getEntityRecords.apply(resolvers_namespaceObject, [kind, name].concat(args));
3907    };
3908  
3909    result[pluralMethodName].shouldInvalidate = function (action) {
3910      var _resolvers$getEntityR;
3911  
3912      for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
3913        args[_key3 - 1] = arguments[_key3];
3914      }
3915  
3916      return (_resolvers$getEntityR = resolvers_getEntityRecords).shouldInvalidate.apply(_resolvers$getEntityR, [action, kind, name].concat(args));
3917    };
3918  
3919    return result;
3920  }, {});
3921  var entityActions = defaultEntities.reduce(function (result, entity) {
3922    var kind = entity.kind,
3923        name = entity.name;
3924  
3925    result[entities_getMethodName(kind, name, 'save')] = function (key) {
3926      return actions_saveEntityRecord(kind, name, key);
3927    };
3928  
3929    return result;
3930  }, {});
3931  Object(external_this_wp_data_["registerStore"])(REDUCER_KEY, {
3932    reducer: build_module_reducer,
3933    controls: build_module_controls,
3934    actions: Object(objectSpread["a" /* default */])({}, build_module_actions_namespaceObject, entityActions),
3935    selectors: Object(objectSpread["a" /* default */])({}, build_module_selectors_namespaceObject, entitySelectors),
3936    resolvers: Object(objectSpread["a" /* default */])({}, resolvers_namespaceObject, entityResolvers)
3937  });
3938  
3939  
3940  
3941  /***/ }),
3942  
3943  /***/ 38:
3944  /***/ (function(module, exports) {
3945  
3946  (function() { module.exports = this["wp"]["apiFetch"]; }());
3947  
3948  /***/ }),
3949  
3950  /***/ 4:
3951  /***/ (function(module, exports) {
3952  
3953  (function() { module.exports = this["wp"]["data"]; }());
3954  
3955  /***/ }),
3956  
3957  /***/ 46:
3958  /***/ (function(module, exports) {
3959  
3960  (function() { module.exports = this["wp"]["isShallowEqual"]; }());
3961  
3962  /***/ }),
3963  
3964  /***/ 57:
3965  /***/ (function(module, exports, __webpack_require__) {
3966  
3967  "use strict";
3968  
3969  
3970  function _typeof(obj) {
3971    if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
3972      _typeof = function (obj) {
3973        return typeof obj;
3974      };
3975    } else {
3976      _typeof = function (obj) {
3977        return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
3978      };
3979    }
3980  
3981    return _typeof(obj);
3982  }
3983  
3984  function _classCallCheck(instance, Constructor) {
3985    if (!(instance instanceof Constructor)) {
3986      throw new TypeError("Cannot call a class as a function");
3987    }
3988  }
3989  
3990  function _defineProperties(target, props) {
3991    for (var i = 0; i < props.length; i++) {
3992      var descriptor = props[i];
3993      descriptor.enumerable = descriptor.enumerable || false;
3994      descriptor.configurable = true;
3995      if ("value" in descriptor) descriptor.writable = true;
3996      Object.defineProperty(target, descriptor.key, descriptor);
3997    }
3998  }
3999  
4000  function _createClass(Constructor, protoProps, staticProps) {
4001    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
4002    if (staticProps) _defineProperties(Constructor, staticProps);
4003    return Constructor;
4004  }
4005  
4006  /**
4007   * Given an instance of EquivalentKeyMap, returns its internal value pair tuple
4008   * for a key, if one exists. The tuple members consist of the last reference
4009   * value for the key (used in efficient subsequent lookups) and the value
4010   * assigned for the key at the leaf node.
4011   *
4012   * @param {EquivalentKeyMap} instance EquivalentKeyMap instance.
4013   * @param {*} key                     The key for which to return value pair.
4014   *
4015   * @return {?Array} Value pair, if exists.
4016   */
4017  function getValuePair(instance, key) {
4018    var _map = instance._map,
4019        _arrayTreeMap = instance._arrayTreeMap,
4020        _objectTreeMap = instance._objectTreeMap; // Map keeps a reference to the last object-like key used to set the
4021    // value, which can be used to shortcut immediately to the value.
4022  
4023    if (_map.has(key)) {
4024      return _map.get(key);
4025    } // Sort keys to ensure stable retrieval from tree.
4026  
4027  
4028    var properties = Object.keys(key).sort(); // Tree by type to avoid conflicts on numeric object keys, empty value.
4029  
4030    var map = Array.isArray(key) ? _arrayTreeMap : _objectTreeMap;
4031  
4032    for (var i = 0; i < properties.length; i++) {
4033      var property = properties[i];
4034      map = map.get(property);
4035  
4036      if (map === undefined) {
4037        return;
4038      }
4039  
4040      var propertyValue = key[property];
4041      map = map.get(propertyValue);
4042  
4043      if (map === undefined) {
4044        return;
4045      }
4046    }
4047  
4048    var valuePair = map.get('_ekm_value');
4049  
4050    if (!valuePair) {
4051      return;
4052    } // If reached, it implies that an object-like key was set with another
4053    // reference, so delete the reference and replace with the current.
4054  
4055  
4056    _map.delete(valuePair[0]);
4057  
4058    valuePair[0] = key;
4059    map.set('_ekm_value', valuePair);
4060  
4061    _map.set(key, valuePair);
4062  
4063    return valuePair;
4064  }
4065  /**
4066   * Variant of a Map object which enables lookup by equivalent (deeply equal)
4067   * object and array keys.
4068   */
4069  
4070  
4071  var EquivalentKeyMap =
4072  /*#__PURE__*/
4073  function () {
4074    /**
4075     * Constructs a new instance of EquivalentKeyMap.
4076     *
4077     * @param {Iterable.<*>} iterable Initial pair of key, value for map.
4078     */
4079    function EquivalentKeyMap(iterable) {
4080      _classCallCheck(this, EquivalentKeyMap);
4081  
4082      this.clear();
4083  
4084      if (iterable instanceof EquivalentKeyMap) {
4085        // Map#forEach is only means of iterating with support for IE11.
4086        var iterablePairs = [];
4087        iterable.forEach(function (value, key) {
4088          iterablePairs.push([key, value]);
4089        });
4090        iterable = iterablePairs;
4091      }
4092  
4093      if (iterable != null) {
4094        for (var i = 0; i < iterable.length; i++) {
4095          this.set(iterable[i][0], iterable[i][1]);
4096        }
4097      }
4098    }
4099    /**
4100     * Accessor property returning the number of elements.
4101     *
4102     * @return {number} Number of elements.
4103     */
4104  
4105  
4106    _createClass(EquivalentKeyMap, [{
4107      key: "set",
4108  
4109      /**
4110       * Add or update an element with a specified key and value.
4111       *
4112       * @param {*} key   The key of the element to add.
4113       * @param {*} value The value of the element to add.
4114       *
4115       * @return {EquivalentKeyMap} Map instance.
4116       */
4117      value: function set(key, value) {
4118        // Shortcut non-object-like to set on internal Map.
4119        if (key === null || _typeof(key) !== 'object') {
4120          this._map.set(key, value);
4121  
4122          return this;
4123        } // Sort keys to ensure stable assignment into tree.
4124  
4125  
4126        var properties = Object.keys(key).sort();
4127        var valuePair = [key, value]; // Tree by type to avoid conflicts on numeric object keys, empty value.
4128  
4129        var map = Array.isArray(key) ? this._arrayTreeMap : this._objectTreeMap;
4130  
4131        for (var i = 0; i < properties.length; i++) {
4132          var property = properties[i];
4133  
4134          if (!map.has(property)) {
4135            map.set(property, new EquivalentKeyMap());
4136          }
4137  
4138          map = map.get(property);
4139          var propertyValue = key[property];
4140  
4141          if (!map.has(propertyValue)) {
4142            map.set(propertyValue, new EquivalentKeyMap());
4143          }
4144  
4145          map = map.get(propertyValue);
4146        } // If an _ekm_value exists, there was already an equivalent key. Before
4147        // overriding, ensure that the old key reference is removed from map to
4148        // avoid memory leak of accumulating equivalent keys. This is, in a
4149        // sense, a poor man's WeakMap, while still enabling iterability.
4150  
4151  
4152        var previousValuePair = map.get('_ekm_value');
4153  
4154        if (previousValuePair) {
4155          this._map.delete(previousValuePair[0]);
4156        }
4157  
4158        map.set('_ekm_value', valuePair);
4159  
4160        this._map.set(key, valuePair);
4161  
4162        return this;
4163      }
4164      /**
4165       * Returns a specified element.
4166       *
4167       * @param {*} key The key of the element to return.
4168       *
4169       * @return {?*} The element associated with the specified key or undefined
4170       *              if the key can't be found.
4171       */
4172  
4173    }, {
4174      key: "get",
4175      value: function get(key) {
4176        // Shortcut non-object-like to get from internal Map.
4177        if (key === null || _typeof(key) !== 'object') {
4178          return this._map.get(key);
4179        }
4180  
4181        var valuePair = getValuePair(this, key);
4182  
4183        if (valuePair) {
4184          return valuePair[1];
4185        }
4186      }
4187      /**
4188       * Returns a boolean indicating whether an element with the specified key
4189       * exists or not.
4190       *
4191       * @param {*} key The key of the element to test for presence.
4192       *
4193       * @return {boolean} Whether an element with the specified key exists.
4194       */
4195  
4196    }, {
4197      key: "has",
4198      value: function has(key) {
4199        if (key === null || _typeof(key) !== 'object') {
4200          return this._map.has(key);
4201        } // Test on the _presence_ of the pair, not its value, as even undefined
4202        // can be a valid member value for a key.
4203  
4204  
4205        return getValuePair(this, key) !== undefined;
4206      }
4207      /**
4208       * Removes the specified element.
4209       *
4210       * @param {*} key The key of the element to remove.
4211       *
4212       * @return {boolean} Returns true if an element existed and has been
4213       *                   removed, or false if the element does not exist.
4214       */
4215  
4216    }, {
4217      key: "delete",
4218      value: function _delete(key) {
4219        if (!this.has(key)) {
4220          return false;
4221        } // This naive implementation will leave orphaned child trees. A better
4222        // implementation should traverse and remove orphans.
4223  
4224  
4225        this.set(key, undefined);
4226        return true;
4227      }
4228      /**
4229       * Executes a provided function once per each key/value pair, in insertion
4230       * order.
4231       *
4232       * @param {Function} callback Function to execute for each element.
4233       * @param {*}        thisArg  Value to use as `this` when executing
4234       *                            `callback`.
4235       */
4236  
4237    }, {
4238      key: "forEach",
4239      value: function forEach(callback) {
4240        var _this = this;
4241  
4242        var thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this;
4243  
4244        this._map.forEach(function (value, key) {
4245          // Unwrap value from object-like value pair.
4246          if (key !== null && _typeof(key) === 'object') {
4247            value = value[1];
4248          }
4249  
4250          callback.call(thisArg, value, key, _this);
4251        });
4252      }
4253      /**
4254       * Removes all elements.
4255       */
4256  
4257    }, {
4258      key: "clear",
4259      value: function clear() {
4260        this._map = new Map();
4261        this._arrayTreeMap = new Map();
4262        this._objectTreeMap = new Map();
4263      }
4264    }, {
4265      key: "size",
4266      get: function get() {
4267        return this._map.size;
4268      }
4269    }]);
4270  
4271    return EquivalentKeyMap;
4272  }();
4273  
4274  module.exports = EquivalentKeyMap;
4275  
4276  
4277  /***/ }),
4278  
4279  /***/ 6:
4280  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4281  
4282  "use strict";
4283  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectSpread; });
4284  /* harmony import */ var _defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9);
4285  
4286  function _objectSpread(target) {
4287    for (var i = 1; i < arguments.length; i++) {
4288      var source = arguments[i] != null ? Object(arguments[i]) : {};
4289      var ownKeys = Object.keys(source);
4290  
4291      if (typeof Object.getOwnPropertySymbols === 'function') {
4292        ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
4293          return Object.getOwnPropertyDescriptor(source, sym).enumerable;
4294        }));
4295      }
4296  
4297      ownKeys.forEach(function (key) {
4298        Object(_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(target, key, source[key]);
4299      });
4300    }
4301  
4302    return target;
4303  }
4304  
4305  /***/ }),
4306  
4307  /***/ 9:
4308  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4309  
4310  "use strict";
4311  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; });
4312  function _defineProperty(obj, key, value) {
4313    if (key in obj) {
4314      Object.defineProperty(obj, key, {
4315        value: value,
4316        enumerable: true,
4317        configurable: true,
4318        writable: true
4319      });
4320    } else {
4321      obj[key] = value;
4322    }
4323  
4324    return obj;
4325  }
4326  
4327  /***/ })
4328  
4329  /******/ });


Generated: Mon Jan 27 01:00:03 2020 Cross-referenced by PHPXref 0.7.1