wp/wp-includes/js/dist/core-data.js
changeset 16 a86126ab1dd4
parent 9 177826044cd9
child 18 be944660c56a
equal deleted inserted replaced
15:3d4e9c994f10 16:a86126ab1dd4
    80 /******/ 	// __webpack_public_path__
    80 /******/ 	// __webpack_public_path__
    81 /******/ 	__webpack_require__.p = "";
    81 /******/ 	__webpack_require__.p = "";
    82 /******/
    82 /******/
    83 /******/
    83 /******/
    84 /******/ 	// Load entry module and return exports
    84 /******/ 	// Load entry module and return exports
    85 /******/ 	return __webpack_require__(__webpack_require__.s = 364);
    85 /******/ 	return __webpack_require__(__webpack_require__.s = 447);
    86 /******/ })
    86 /******/ })
    87 /************************************************************************/
    87 /************************************************************************/
    88 /******/ ({
    88 /******/ ({
    89 
    89 
    90 /***/ 132:
    90 /***/ 0:
    91 /***/ (function(module, exports) {
    91 /***/ (function(module, exports) {
    92 
    92 
    93 module.exports = function(originalModule) {
    93 (function() { module.exports = this["wp"]["element"]; }());
    94 	if (!originalModule.webpackPolyfill) {
       
    95 		var module = Object.create(originalModule);
       
    96 		// module.parent = undefined by default
       
    97 		if (!module.children) module.children = [];
       
    98 		Object.defineProperty(module, "loaded", {
       
    99 			enumerable: true,
       
   100 			get: function() {
       
   101 				return module.l;
       
   102 			}
       
   103 		});
       
   104 		Object.defineProperty(module, "id", {
       
   105 			enumerable: true,
       
   106 			get: function() {
       
   107 				return module.i;
       
   108 			}
       
   109 		});
       
   110 		Object.defineProperty(module, "exports", {
       
   111 			enumerable: true
       
   112 		});
       
   113 		module.webpackPolyfill = 1;
       
   114 	}
       
   115 	return module;
       
   116 };
       
   117 
       
   118 
    94 
   119 /***/ }),
    95 /***/ }),
   120 
    96 
   121 /***/ 15:
    97 /***/ 1:
       
    98 /***/ (function(module, exports) {
       
    99 
       
   100 (function() { module.exports = this["wp"]["i18n"]; }());
       
   101 
       
   102 /***/ }),
       
   103 
       
   104 /***/ 10:
       
   105 /***/ (function(module, exports) {
       
   106 
       
   107 (function() { module.exports = this["wp"]["blocks"]; }());
       
   108 
       
   109 /***/ }),
       
   110 
       
   111 /***/ 126:
       
   112 /***/ (function(module, exports, __webpack_require__) {
       
   113 
       
   114 "use strict";
       
   115 
       
   116 
       
   117 function _typeof(obj) {
       
   118   if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
       
   119     _typeof = function (obj) {
       
   120       return typeof obj;
       
   121     };
       
   122   } else {
       
   123     _typeof = function (obj) {
       
   124       return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
       
   125     };
       
   126   }
       
   127 
       
   128   return _typeof(obj);
       
   129 }
       
   130 
       
   131 function _classCallCheck(instance, Constructor) {
       
   132   if (!(instance instanceof Constructor)) {
       
   133     throw new TypeError("Cannot call a class as a function");
       
   134   }
       
   135 }
       
   136 
       
   137 function _defineProperties(target, props) {
       
   138   for (var i = 0; i < props.length; i++) {
       
   139     var descriptor = props[i];
       
   140     descriptor.enumerable = descriptor.enumerable || false;
       
   141     descriptor.configurable = true;
       
   142     if ("value" in descriptor) descriptor.writable = true;
       
   143     Object.defineProperty(target, descriptor.key, descriptor);
       
   144   }
       
   145 }
       
   146 
       
   147 function _createClass(Constructor, protoProps, staticProps) {
       
   148   if (protoProps) _defineProperties(Constructor.prototype, protoProps);
       
   149   if (staticProps) _defineProperties(Constructor, staticProps);
       
   150   return Constructor;
       
   151 }
       
   152 
       
   153 /**
       
   154  * Given an instance of EquivalentKeyMap, returns its internal value pair tuple
       
   155  * for a key, if one exists. The tuple members consist of the last reference
       
   156  * value for the key (used in efficient subsequent lookups) and the value
       
   157  * assigned for the key at the leaf node.
       
   158  *
       
   159  * @param {EquivalentKeyMap} instance EquivalentKeyMap instance.
       
   160  * @param {*} key                     The key for which to return value pair.
       
   161  *
       
   162  * @return {?Array} Value pair, if exists.
       
   163  */
       
   164 function getValuePair(instance, key) {
       
   165   var _map = instance._map,
       
   166       _arrayTreeMap = instance._arrayTreeMap,
       
   167       _objectTreeMap = instance._objectTreeMap; // Map keeps a reference to the last object-like key used to set the
       
   168   // value, which can be used to shortcut immediately to the value.
       
   169 
       
   170   if (_map.has(key)) {
       
   171     return _map.get(key);
       
   172   } // Sort keys to ensure stable retrieval from tree.
       
   173 
       
   174 
       
   175   var properties = Object.keys(key).sort(); // Tree by type to avoid conflicts on numeric object keys, empty value.
       
   176 
       
   177   var map = Array.isArray(key) ? _arrayTreeMap : _objectTreeMap;
       
   178 
       
   179   for (var i = 0; i < properties.length; i++) {
       
   180     var property = properties[i];
       
   181     map = map.get(property);
       
   182 
       
   183     if (map === undefined) {
       
   184       return;
       
   185     }
       
   186 
       
   187     var propertyValue = key[property];
       
   188     map = map.get(propertyValue);
       
   189 
       
   190     if (map === undefined) {
       
   191       return;
       
   192     }
       
   193   }
       
   194 
       
   195   var valuePair = map.get('_ekm_value');
       
   196 
       
   197   if (!valuePair) {
       
   198     return;
       
   199   } // If reached, it implies that an object-like key was set with another
       
   200   // reference, so delete the reference and replace with the current.
       
   201 
       
   202 
       
   203   _map.delete(valuePair[0]);
       
   204 
       
   205   valuePair[0] = key;
       
   206   map.set('_ekm_value', valuePair);
       
   207 
       
   208   _map.set(key, valuePair);
       
   209 
       
   210   return valuePair;
       
   211 }
       
   212 /**
       
   213  * Variant of a Map object which enables lookup by equivalent (deeply equal)
       
   214  * object and array keys.
       
   215  */
       
   216 
       
   217 
       
   218 var EquivalentKeyMap =
       
   219 /*#__PURE__*/
       
   220 function () {
       
   221   /**
       
   222    * Constructs a new instance of EquivalentKeyMap.
       
   223    *
       
   224    * @param {Iterable.<*>} iterable Initial pair of key, value for map.
       
   225    */
       
   226   function EquivalentKeyMap(iterable) {
       
   227     _classCallCheck(this, EquivalentKeyMap);
       
   228 
       
   229     this.clear();
       
   230 
       
   231     if (iterable instanceof EquivalentKeyMap) {
       
   232       // Map#forEach is only means of iterating with support for IE11.
       
   233       var iterablePairs = [];
       
   234       iterable.forEach(function (value, key) {
       
   235         iterablePairs.push([key, value]);
       
   236       });
       
   237       iterable = iterablePairs;
       
   238     }
       
   239 
       
   240     if (iterable != null) {
       
   241       for (var i = 0; i < iterable.length; i++) {
       
   242         this.set(iterable[i][0], iterable[i][1]);
       
   243       }
       
   244     }
       
   245   }
       
   246   /**
       
   247    * Accessor property returning the number of elements.
       
   248    *
       
   249    * @return {number} Number of elements.
       
   250    */
       
   251 
       
   252 
       
   253   _createClass(EquivalentKeyMap, [{
       
   254     key: "set",
       
   255 
       
   256     /**
       
   257      * Add or update an element with a specified key and value.
       
   258      *
       
   259      * @param {*} key   The key of the element to add.
       
   260      * @param {*} value The value of the element to add.
       
   261      *
       
   262      * @return {EquivalentKeyMap} Map instance.
       
   263      */
       
   264     value: function set(key, value) {
       
   265       // Shortcut non-object-like to set on internal Map.
       
   266       if (key === null || _typeof(key) !== 'object') {
       
   267         this._map.set(key, value);
       
   268 
       
   269         return this;
       
   270       } // Sort keys to ensure stable assignment into tree.
       
   271 
       
   272 
       
   273       var properties = Object.keys(key).sort();
       
   274       var valuePair = [key, value]; // Tree by type to avoid conflicts on numeric object keys, empty value.
       
   275 
       
   276       var map = Array.isArray(key) ? this._arrayTreeMap : this._objectTreeMap;
       
   277 
       
   278       for (var i = 0; i < properties.length; i++) {
       
   279         var property = properties[i];
       
   280 
       
   281         if (!map.has(property)) {
       
   282           map.set(property, new EquivalentKeyMap());
       
   283         }
       
   284 
       
   285         map = map.get(property);
       
   286         var propertyValue = key[property];
       
   287 
       
   288         if (!map.has(propertyValue)) {
       
   289           map.set(propertyValue, new EquivalentKeyMap());
       
   290         }
       
   291 
       
   292         map = map.get(propertyValue);
       
   293       } // If an _ekm_value exists, there was already an equivalent key. Before
       
   294       // overriding, ensure that the old key reference is removed from map to
       
   295       // avoid memory leak of accumulating equivalent keys. This is, in a
       
   296       // sense, a poor man's WeakMap, while still enabling iterability.
       
   297 
       
   298 
       
   299       var previousValuePair = map.get('_ekm_value');
       
   300 
       
   301       if (previousValuePair) {
       
   302         this._map.delete(previousValuePair[0]);
       
   303       }
       
   304 
       
   305       map.set('_ekm_value', valuePair);
       
   306 
       
   307       this._map.set(key, valuePair);
       
   308 
       
   309       return this;
       
   310     }
       
   311     /**
       
   312      * Returns a specified element.
       
   313      *
       
   314      * @param {*} key The key of the element to return.
       
   315      *
       
   316      * @return {?*} The element associated with the specified key or undefined
       
   317      *              if the key can't be found.
       
   318      */
       
   319 
       
   320   }, {
       
   321     key: "get",
       
   322     value: function get(key) {
       
   323       // Shortcut non-object-like to get from internal Map.
       
   324       if (key === null || _typeof(key) !== 'object') {
       
   325         return this._map.get(key);
       
   326       }
       
   327 
       
   328       var valuePair = getValuePair(this, key);
       
   329 
       
   330       if (valuePair) {
       
   331         return valuePair[1];
       
   332       }
       
   333     }
       
   334     /**
       
   335      * Returns a boolean indicating whether an element with the specified key
       
   336      * exists or not.
       
   337      *
       
   338      * @param {*} key The key of the element to test for presence.
       
   339      *
       
   340      * @return {boolean} Whether an element with the specified key exists.
       
   341      */
       
   342 
       
   343   }, {
       
   344     key: "has",
       
   345     value: function has(key) {
       
   346       if (key === null || _typeof(key) !== 'object') {
       
   347         return this._map.has(key);
       
   348       } // Test on the _presence_ of the pair, not its value, as even undefined
       
   349       // can be a valid member value for a key.
       
   350 
       
   351 
       
   352       return getValuePair(this, key) !== undefined;
       
   353     }
       
   354     /**
       
   355      * Removes the specified element.
       
   356      *
       
   357      * @param {*} key The key of the element to remove.
       
   358      *
       
   359      * @return {boolean} Returns true if an element existed and has been
       
   360      *                   removed, or false if the element does not exist.
       
   361      */
       
   362 
       
   363   }, {
       
   364     key: "delete",
       
   365     value: function _delete(key) {
       
   366       if (!this.has(key)) {
       
   367         return false;
       
   368       } // This naive implementation will leave orphaned child trees. A better
       
   369       // implementation should traverse and remove orphans.
       
   370 
       
   371 
       
   372       this.set(key, undefined);
       
   373       return true;
       
   374     }
       
   375     /**
       
   376      * Executes a provided function once per each key/value pair, in insertion
       
   377      * order.
       
   378      *
       
   379      * @param {Function} callback Function to execute for each element.
       
   380      * @param {*}        thisArg  Value to use as `this` when executing
       
   381      *                            `callback`.
       
   382      */
       
   383 
       
   384   }, {
       
   385     key: "forEach",
       
   386     value: function forEach(callback) {
       
   387       var _this = this;
       
   388 
       
   389       var thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this;
       
   390 
       
   391       this._map.forEach(function (value, key) {
       
   392         // Unwrap value from object-like value pair.
       
   393         if (key !== null && _typeof(key) === 'object') {
       
   394           value = value[1];
       
   395         }
       
   396 
       
   397         callback.call(thisArg, value, key, _this);
       
   398       });
       
   399     }
       
   400     /**
       
   401      * Removes all elements.
       
   402      */
       
   403 
       
   404   }, {
       
   405     key: "clear",
       
   406     value: function clear() {
       
   407       this._map = new Map();
       
   408       this._arrayTreeMap = new Map();
       
   409       this._objectTreeMap = new Map();
       
   410     }
       
   411   }, {
       
   412     key: "size",
       
   413     get: function get() {
       
   414       return this._map.size;
       
   415     }
       
   416   }]);
       
   417 
       
   418   return EquivalentKeyMap;
       
   419 }();
       
   420 
       
   421 module.exports = EquivalentKeyMap;
       
   422 
       
   423 
       
   424 /***/ }),
       
   425 
       
   426 /***/ 14:
   122 /***/ (function(module, __webpack_exports__, __webpack_require__) {
   427 /***/ (function(module, __webpack_exports__, __webpack_require__) {
   123 
   428 
   124 "use strict";
   429 "use strict";
   125 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; });
   430 
   126 function _defineProperty(obj, key, value) {
   431 // EXPORTS
   127   if (key in obj) {
   432 __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _slicedToArray; });
   128     Object.defineProperty(obj, key, {
       
   129       value: value,
       
   130       enumerable: true,
       
   131       configurable: true,
       
   132       writable: true
       
   133     });
       
   134   } else {
       
   135     obj[key] = value;
       
   136   }
       
   137 
       
   138   return obj;
       
   139 }
       
   140 
       
   141 /***/ }),
       
   142 
       
   143 /***/ 17:
       
   144 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   145 
       
   146 "use strict";
       
   147 
       
   148 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
       
   149 function _arrayWithoutHoles(arr) {
       
   150   if (Array.isArray(arr)) {
       
   151     for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {
       
   152       arr2[i] = arr[i];
       
   153     }
       
   154 
       
   155     return arr2;
       
   156   }
       
   157 }
       
   158 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
       
   159 var iterableToArray = __webpack_require__(34);
       
   160 
       
   161 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
       
   162 function _nonIterableSpread() {
       
   163   throw new TypeError("Invalid attempt to spread non-iterable instance");
       
   164 }
       
   165 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
       
   166 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _toConsumableArray; });
       
   167 
       
   168 
       
   169 
       
   170 function _toConsumableArray(arr) {
       
   171   return _arrayWithoutHoles(arr) || Object(iterableToArray["a" /* default */])(arr) || _nonIterableSpread();
       
   172 }
       
   173 
       
   174 /***/ }),
       
   175 
       
   176 /***/ 2:
       
   177 /***/ (function(module, exports) {
       
   178 
       
   179 (function() { module.exports = this["lodash"]; }());
       
   180 
       
   181 /***/ }),
       
   182 
       
   183 /***/ 23:
       
   184 /***/ (function(module, exports, __webpack_require__) {
       
   185 
       
   186 module.exports = __webpack_require__(54);
       
   187 
       
   188 
       
   189 /***/ }),
       
   190 
       
   191 /***/ 25:
       
   192 /***/ (function(module, exports) {
       
   193 
       
   194 (function() { module.exports = this["wp"]["url"]; }());
       
   195 
       
   196 /***/ }),
       
   197 
       
   198 /***/ 28:
       
   199 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   200 
       
   201 "use strict";
       
   202 
   433 
   203 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
   434 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
   204 var arrayWithHoles = __webpack_require__(37);
   435 var arrayWithHoles = __webpack_require__(38);
   205 
   436 
   206 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
   437 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
   207 function _iterableToArrayLimit(arr, i) {
   438 function _iterableToArrayLimit(arr, i) {
       
   439   if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
   208   var _arr = [];
   440   var _arr = [];
   209   var _n = true;
   441   var _n = true;
   210   var _d = false;
   442   var _d = false;
   211   var _e = undefined;
   443   var _e = undefined;
   212 
   444 
   227     }
   459     }
   228   }
   460   }
   229 
   461 
   230   return _arr;
   462   return _arr;
   231 }
   463 }
       
   464 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
       
   465 var unsupportedIterableToArray = __webpack_require__(29);
       
   466 
   232 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
   467 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
   233 var nonIterableRest = __webpack_require__(38);
   468 var nonIterableRest = __webpack_require__(39);
   234 
   469 
   235 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
   470 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
   236 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _slicedToArray; });
   471 
   237 
   472 
   238 
   473 
   239 
   474 
   240 function _slicedToArray(arr, i) {
   475 function _slicedToArray(arr, i) {
   241   return Object(arrayWithHoles["a" /* default */])(arr) || _iterableToArrayLimit(arr, i) || Object(nonIterableRest["a" /* default */])();
   476   return Object(arrayWithHoles["a" /* default */])(arr) || _iterableToArrayLimit(arr, i) || Object(unsupportedIterableToArray["a" /* default */])(arr, i) || Object(nonIterableRest["a" /* default */])();
   242 }
   477 }
   243 
   478 
   244 /***/ }),
   479 /***/ }),
   245 
   480 
   246 /***/ 30:
   481 /***/ 18:
       
   482 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   483 
       
   484 "use strict";
       
   485 
       
   486 // EXPORTS
       
   487 __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _toConsumableArray; });
       
   488 
       
   489 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
       
   490 var arrayLikeToArray = __webpack_require__(26);
       
   491 
       
   492 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
       
   493 
       
   494 function _arrayWithoutHoles(arr) {
       
   495   if (Array.isArray(arr)) return Object(arrayLikeToArray["a" /* default */])(arr);
       
   496 }
       
   497 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
       
   498 var iterableToArray = __webpack_require__(35);
       
   499 
       
   500 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
       
   501 var unsupportedIterableToArray = __webpack_require__(29);
       
   502 
       
   503 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
       
   504 function _nonIterableSpread() {
       
   505   throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
       
   506 }
       
   507 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
       
   508 
       
   509 
       
   510 
       
   511 
       
   512 function _toConsumableArray(arr) {
       
   513   return _arrayWithoutHoles(arr) || Object(iterableToArray["a" /* default */])(arr) || Object(unsupportedIterableToArray["a" /* default */])(arr) || _nonIterableSpread();
       
   514 }
       
   515 
       
   516 /***/ }),
       
   517 
       
   518 /***/ 2:
       
   519 /***/ (function(module, exports) {
       
   520 
       
   521 (function() { module.exports = this["lodash"]; }());
       
   522 
       
   523 /***/ }),
       
   524 
       
   525 /***/ 24:
       
   526 /***/ (function(module, exports) {
       
   527 
       
   528 (function() { module.exports = this["regeneratorRuntime"]; }());
       
   529 
       
   530 /***/ }),
       
   531 
       
   532 /***/ 26:
       
   533 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   534 
       
   535 "use strict";
       
   536 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayLikeToArray; });
       
   537 function _arrayLikeToArray(arr, len) {
       
   538   if (len == null || len > arr.length) len = arr.length;
       
   539 
       
   540   for (var i = 0, arr2 = new Array(len); i < len; i++) {
       
   541     arr2[i] = arr[i];
       
   542   }
       
   543 
       
   544   return arr2;
       
   545 }
       
   546 
       
   547 /***/ }),
       
   548 
       
   549 /***/ 29:
       
   550 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   551 
       
   552 "use strict";
       
   553 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _unsupportedIterableToArray; });
       
   554 /* harmony import */ var _arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26);
       
   555 
       
   556 function _unsupportedIterableToArray(o, minLen) {
       
   557   if (!o) return;
       
   558   if (typeof o === "string") return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
       
   559   var n = Object.prototype.toString.call(o).slice(8, -1);
       
   560   if (n === "Object" && o.constructor) n = o.constructor.name;
       
   561   if (n === "Map" || n === "Set") return Array.from(o);
       
   562   if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
       
   563 }
       
   564 
       
   565 /***/ }),
       
   566 
       
   567 /***/ 31:
       
   568 /***/ (function(module, exports) {
       
   569 
       
   570 (function() { module.exports = this["wp"]["url"]; }());
       
   571 
       
   572 /***/ }),
       
   573 
       
   574 /***/ 35:
       
   575 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   576 
       
   577 "use strict";
       
   578 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterableToArray; });
       
   579 function _iterableToArray(iter) {
       
   580   if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
       
   581 }
       
   582 
       
   583 /***/ }),
       
   584 
       
   585 /***/ 36:
       
   586 /***/ (function(module, exports) {
       
   587 
       
   588 (function() { module.exports = this["wp"]["dataControls"]; }());
       
   589 
       
   590 /***/ }),
       
   591 
       
   592 /***/ 37:
       
   593 /***/ (function(module, exports) {
       
   594 
       
   595 (function() { module.exports = this["wp"]["deprecated"]; }());
       
   596 
       
   597 /***/ }),
       
   598 
       
   599 /***/ 38:
       
   600 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   601 
       
   602 "use strict";
       
   603 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayWithHoles; });
       
   604 function _arrayWithHoles(arr) {
       
   605   if (Array.isArray(arr)) return arr;
       
   606 }
       
   607 
       
   608 /***/ }),
       
   609 
       
   610 /***/ 39:
       
   611 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   612 
       
   613 "use strict";
       
   614 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _nonIterableRest; });
       
   615 function _nonIterableRest() {
       
   616   throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
       
   617 }
       
   618 
       
   619 /***/ }),
       
   620 
       
   621 /***/ 4:
       
   622 /***/ (function(module, exports) {
       
   623 
       
   624 (function() { module.exports = this["wp"]["data"]; }());
       
   625 
       
   626 /***/ }),
       
   627 
       
   628 /***/ 42:
   247 /***/ (function(module, __webpack_exports__, __webpack_require__) {
   629 /***/ (function(module, __webpack_exports__, __webpack_require__) {
   248 
   630 
   249 "use strict";
   631 "use strict";
   250 
   632 
   251 
   633 
   523 });
   905 });
   524 
   906 
   525 
   907 
   526 /***/ }),
   908 /***/ }),
   527 
   909 
   528 /***/ 33:
   910 /***/ 447:
   529 /***/ (function(module, exports) {
       
   530 
       
   531 (function() { module.exports = this["wp"]["apiFetch"]; }());
       
   532 
       
   533 /***/ }),
       
   534 
       
   535 /***/ 34:
       
   536 /***/ (function(module, __webpack_exports__, __webpack_require__) {
   911 /***/ (function(module, __webpack_exports__, __webpack_require__) {
   537 
   912 
   538 "use strict";
   913 "use strict";
   539 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterableToArray; });
   914 // ESM COMPAT FLAG
   540 function _iterableToArray(iter) {
       
   541   if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
       
   542 }
       
   543 
       
   544 /***/ }),
       
   545 
       
   546 /***/ 364:
       
   547 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   548 
       
   549 "use strict";
       
   550 __webpack_require__.r(__webpack_exports__);
   915 __webpack_require__.r(__webpack_exports__);
       
   916 
       
   917 // EXPORTS
       
   918 __webpack_require__.d(__webpack_exports__, "EntityProvider", function() { return /* reexport */ EntityProvider; });
       
   919 __webpack_require__.d(__webpack_exports__, "useEntityId", function() { return /* reexport */ useEntityId; });
       
   920 __webpack_require__.d(__webpack_exports__, "useEntityProp", function() { return /* reexport */ useEntityProp; });
       
   921 __webpack_require__.d(__webpack_exports__, "useEntityBlockEditor", function() { return /* reexport */ useEntityBlockEditor; });
       
   922 
       
   923 // NAMESPACE OBJECT: ./node_modules/@wordpress/core-data/build-module/actions.js
   551 var build_module_actions_namespaceObject = {};
   924 var build_module_actions_namespaceObject = {};
   552 __webpack_require__.r(build_module_actions_namespaceObject);
   925 __webpack_require__.r(build_module_actions_namespaceObject);
   553 __webpack_require__.d(build_module_actions_namespaceObject, "receiveUserQuery", function() { return receiveUserQuery; });
   926 __webpack_require__.d(build_module_actions_namespaceObject, "receiveUserQuery", function() { return receiveUserQuery; });
       
   927 __webpack_require__.d(build_module_actions_namespaceObject, "receiveCurrentUser", function() { return receiveCurrentUser; });
   554 __webpack_require__.d(build_module_actions_namespaceObject, "addEntities", function() { return addEntities; });
   928 __webpack_require__.d(build_module_actions_namespaceObject, "addEntities", function() { return addEntities; });
   555 __webpack_require__.d(build_module_actions_namespaceObject, "receiveEntityRecords", function() { return receiveEntityRecords; });
   929 __webpack_require__.d(build_module_actions_namespaceObject, "receiveEntityRecords", function() { return receiveEntityRecords; });
       
   930 __webpack_require__.d(build_module_actions_namespaceObject, "receiveCurrentTheme", function() { return receiveCurrentTheme; });
   556 __webpack_require__.d(build_module_actions_namespaceObject, "receiveThemeSupports", function() { return receiveThemeSupports; });
   931 __webpack_require__.d(build_module_actions_namespaceObject, "receiveThemeSupports", function() { return receiveThemeSupports; });
   557 __webpack_require__.d(build_module_actions_namespaceObject, "receiveEmbedPreview", function() { return receiveEmbedPreview; });
   932 __webpack_require__.d(build_module_actions_namespaceObject, "receiveEmbedPreview", function() { return receiveEmbedPreview; });
       
   933 __webpack_require__.d(build_module_actions_namespaceObject, "editEntityRecord", function() { return actions_editEntityRecord; });
       
   934 __webpack_require__.d(build_module_actions_namespaceObject, "undo", function() { return undo; });
       
   935 __webpack_require__.d(build_module_actions_namespaceObject, "redo", function() { return redo; });
       
   936 __webpack_require__.d(build_module_actions_namespaceObject, "__unstableCreateUndoLevel", function() { return __unstableCreateUndoLevel; });
   558 __webpack_require__.d(build_module_actions_namespaceObject, "saveEntityRecord", function() { return saveEntityRecord; });
   937 __webpack_require__.d(build_module_actions_namespaceObject, "saveEntityRecord", function() { return saveEntityRecord; });
       
   938 __webpack_require__.d(build_module_actions_namespaceObject, "saveEditedEntityRecord", function() { return saveEditedEntityRecord; });
   559 __webpack_require__.d(build_module_actions_namespaceObject, "receiveUploadPermissions", function() { return receiveUploadPermissions; });
   939 __webpack_require__.d(build_module_actions_namespaceObject, "receiveUploadPermissions", function() { return receiveUploadPermissions; });
   560 __webpack_require__.d(build_module_actions_namespaceObject, "receiveUserPermission", function() { return receiveUserPermission; });
   940 __webpack_require__.d(build_module_actions_namespaceObject, "receiveUserPermission", function() { return receiveUserPermission; });
       
   941 __webpack_require__.d(build_module_actions_namespaceObject, "receiveAutosaves", function() { return receiveAutosaves; });
       
   942 
       
   943 // NAMESPACE OBJECT: ./node_modules/@wordpress/core-data/build-module/selectors.js
   561 var build_module_selectors_namespaceObject = {};
   944 var build_module_selectors_namespaceObject = {};
   562 __webpack_require__.r(build_module_selectors_namespaceObject);
   945 __webpack_require__.r(build_module_selectors_namespaceObject);
   563 __webpack_require__.d(build_module_selectors_namespaceObject, "isRequestingEmbedPreview", function() { return isRequestingEmbedPreview; });
   946 __webpack_require__.d(build_module_selectors_namespaceObject, "isRequestingEmbedPreview", function() { return isRequestingEmbedPreview; });
   564 __webpack_require__.d(build_module_selectors_namespaceObject, "getAuthors", function() { return getAuthors; });
   947 __webpack_require__.d(build_module_selectors_namespaceObject, "getAuthors", function() { return getAuthors; });
       
   948 __webpack_require__.d(build_module_selectors_namespaceObject, "getCurrentUser", function() { return getCurrentUser; });
   565 __webpack_require__.d(build_module_selectors_namespaceObject, "getUserQueryResults", function() { return getUserQueryResults; });
   949 __webpack_require__.d(build_module_selectors_namespaceObject, "getUserQueryResults", function() { return getUserQueryResults; });
   566 __webpack_require__.d(build_module_selectors_namespaceObject, "getEntitiesByKind", function() { return getEntitiesByKind; });
   950 __webpack_require__.d(build_module_selectors_namespaceObject, "getEntitiesByKind", function() { return getEntitiesByKind; });
   567 __webpack_require__.d(build_module_selectors_namespaceObject, "getEntity", function() { return getEntity; });
   951 __webpack_require__.d(build_module_selectors_namespaceObject, "getEntity", function() { return selectors_getEntity; });
   568 __webpack_require__.d(build_module_selectors_namespaceObject, "getEntityRecord", function() { return getEntityRecord; });
   952 __webpack_require__.d(build_module_selectors_namespaceObject, "getEntityRecord", function() { return getEntityRecord; });
       
   953 __webpack_require__.d(build_module_selectors_namespaceObject, "__experimentalGetEntityRecordNoResolver", function() { return __experimentalGetEntityRecordNoResolver; });
       
   954 __webpack_require__.d(build_module_selectors_namespaceObject, "getRawEntityRecord", function() { return getRawEntityRecord; });
   569 __webpack_require__.d(build_module_selectors_namespaceObject, "getEntityRecords", function() { return getEntityRecords; });
   955 __webpack_require__.d(build_module_selectors_namespaceObject, "getEntityRecords", function() { return getEntityRecords; });
       
   956 __webpack_require__.d(build_module_selectors_namespaceObject, "__experimentalGetDirtyEntityRecords", function() { return __experimentalGetDirtyEntityRecords; });
       
   957 __webpack_require__.d(build_module_selectors_namespaceObject, "getEntityRecordEdits", function() { return getEntityRecordEdits; });
       
   958 __webpack_require__.d(build_module_selectors_namespaceObject, "getEntityRecordNonTransientEdits", function() { return getEntityRecordNonTransientEdits; });
       
   959 __webpack_require__.d(build_module_selectors_namespaceObject, "hasEditsForEntityRecord", function() { return hasEditsForEntityRecord; });
       
   960 __webpack_require__.d(build_module_selectors_namespaceObject, "getEditedEntityRecord", function() { return getEditedEntityRecord; });
       
   961 __webpack_require__.d(build_module_selectors_namespaceObject, "isAutosavingEntityRecord", function() { return isAutosavingEntityRecord; });
       
   962 __webpack_require__.d(build_module_selectors_namespaceObject, "isSavingEntityRecord", function() { return isSavingEntityRecord; });
       
   963 __webpack_require__.d(build_module_selectors_namespaceObject, "getLastEntitySaveError", function() { return getLastEntitySaveError; });
       
   964 __webpack_require__.d(build_module_selectors_namespaceObject, "getUndoEdit", function() { return getUndoEdit; });
       
   965 __webpack_require__.d(build_module_selectors_namespaceObject, "getRedoEdit", function() { return getRedoEdit; });
       
   966 __webpack_require__.d(build_module_selectors_namespaceObject, "hasUndo", function() { return hasUndo; });
       
   967 __webpack_require__.d(build_module_selectors_namespaceObject, "hasRedo", function() { return hasRedo; });
       
   968 __webpack_require__.d(build_module_selectors_namespaceObject, "getCurrentTheme", function() { return getCurrentTheme; });
   570 __webpack_require__.d(build_module_selectors_namespaceObject, "getThemeSupports", function() { return getThemeSupports; });
   969 __webpack_require__.d(build_module_selectors_namespaceObject, "getThemeSupports", function() { return getThemeSupports; });
   571 __webpack_require__.d(build_module_selectors_namespaceObject, "getEmbedPreview", function() { return getEmbedPreview; });
   970 __webpack_require__.d(build_module_selectors_namespaceObject, "getEmbedPreview", function() { return getEmbedPreview; });
   572 __webpack_require__.d(build_module_selectors_namespaceObject, "isPreviewEmbedFallback", function() { return isPreviewEmbedFallback; });
   971 __webpack_require__.d(build_module_selectors_namespaceObject, "isPreviewEmbedFallback", function() { return isPreviewEmbedFallback; });
   573 __webpack_require__.d(build_module_selectors_namespaceObject, "hasUploadPermissions", function() { return hasUploadPermissions; });
   972 __webpack_require__.d(build_module_selectors_namespaceObject, "hasUploadPermissions", function() { return hasUploadPermissions; });
   574 __webpack_require__.d(build_module_selectors_namespaceObject, "canUser", function() { return canUser; });
   973 __webpack_require__.d(build_module_selectors_namespaceObject, "canUser", function() { return canUser; });
       
   974 __webpack_require__.d(build_module_selectors_namespaceObject, "getAutosaves", function() { return getAutosaves; });
       
   975 __webpack_require__.d(build_module_selectors_namespaceObject, "getAutosave", function() { return getAutosave; });
       
   976 __webpack_require__.d(build_module_selectors_namespaceObject, "hasFetchedAutosaves", function() { return hasFetchedAutosaves; });
       
   977 __webpack_require__.d(build_module_selectors_namespaceObject, "getReferenceByDistinctEdits", function() { return getReferenceByDistinctEdits; });
       
   978 
       
   979 // NAMESPACE OBJECT: ./node_modules/@wordpress/core-data/build-module/resolvers.js
   575 var resolvers_namespaceObject = {};
   980 var resolvers_namespaceObject = {};
   576 __webpack_require__.r(resolvers_namespaceObject);
   981 __webpack_require__.r(resolvers_namespaceObject);
   577 __webpack_require__.d(resolvers_namespaceObject, "getAuthors", function() { return resolvers_getAuthors; });
   982 __webpack_require__.d(resolvers_namespaceObject, "getAuthors", function() { return resolvers_getAuthors; });
       
   983 __webpack_require__.d(resolvers_namespaceObject, "getCurrentUser", function() { return resolvers_getCurrentUser; });
   578 __webpack_require__.d(resolvers_namespaceObject, "getEntityRecord", function() { return resolvers_getEntityRecord; });
   984 __webpack_require__.d(resolvers_namespaceObject, "getEntityRecord", function() { return resolvers_getEntityRecord; });
       
   985 __webpack_require__.d(resolvers_namespaceObject, "getRawEntityRecord", function() { return resolvers_getRawEntityRecord; });
       
   986 __webpack_require__.d(resolvers_namespaceObject, "getEditedEntityRecord", function() { return resolvers_getEditedEntityRecord; });
   579 __webpack_require__.d(resolvers_namespaceObject, "getEntityRecords", function() { return resolvers_getEntityRecords; });
   987 __webpack_require__.d(resolvers_namespaceObject, "getEntityRecords", function() { return resolvers_getEntityRecords; });
       
   988 __webpack_require__.d(resolvers_namespaceObject, "getCurrentTheme", function() { return resolvers_getCurrentTheme; });
   580 __webpack_require__.d(resolvers_namespaceObject, "getThemeSupports", function() { return resolvers_getThemeSupports; });
   989 __webpack_require__.d(resolvers_namespaceObject, "getThemeSupports", function() { return resolvers_getThemeSupports; });
   581 __webpack_require__.d(resolvers_namespaceObject, "getEmbedPreview", function() { return resolvers_getEmbedPreview; });
   990 __webpack_require__.d(resolvers_namespaceObject, "getEmbedPreview", function() { return resolvers_getEmbedPreview; });
   582 __webpack_require__.d(resolvers_namespaceObject, "hasUploadPermissions", function() { return resolvers_hasUploadPermissions; });
   991 __webpack_require__.d(resolvers_namespaceObject, "hasUploadPermissions", function() { return resolvers_hasUploadPermissions; });
   583 __webpack_require__.d(resolvers_namespaceObject, "canUser", function() { return resolvers_canUser; });
   992 __webpack_require__.d(resolvers_namespaceObject, "canUser", function() { return resolvers_canUser; });
   584 
   993 __webpack_require__.d(resolvers_namespaceObject, "getAutosaves", function() { return resolvers_getAutosaves; });
   585 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread.js
   994 __webpack_require__.d(resolvers_namespaceObject, "getAutosave", function() { return resolvers_getAutosave; });
   586 var objectSpread = __webpack_require__(7);
   995 
       
   996 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
       
   997 var defineProperty = __webpack_require__(5);
   587 
   998 
   588 // EXTERNAL MODULE: external {"this":["wp","data"]}
   999 // EXTERNAL MODULE: external {"this":["wp","data"]}
   589 var external_this_wp_data_ = __webpack_require__(5);
  1000 var external_this_wp_data_ = __webpack_require__(4);
   590 
  1001 
   591 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
  1002 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
   592 var slicedToArray = __webpack_require__(28);
  1003 var slicedToArray = __webpack_require__(14);
   593 
  1004 
   594 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
  1005 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
   595 var toConsumableArray = __webpack_require__(17);
  1006 var toConsumableArray = __webpack_require__(18);
   596 
  1007 
   597 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
  1008 // EXTERNAL MODULE: external {"this":"lodash"}
   598 var defineProperty = __webpack_require__(15);
  1009 var external_this_lodash_ = __webpack_require__(2);
   599 
  1010 
   600 // EXTERNAL MODULE: external "lodash"
  1011 // EXTERNAL MODULE: external {"this":["wp","isShallowEqual"]}
   601 var external_lodash_ = __webpack_require__(2);
  1012 var external_this_wp_isShallowEqual_ = __webpack_require__(64);
       
  1013 var external_this_wp_isShallowEqual_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_isShallowEqual_);
   602 
  1014 
   603 // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/utils/if-matching-action.js
  1015 // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/utils/if-matching-action.js
   604 /**
  1016 /**
   605  * A higher-order reducer creator which invokes the original reducer only if
  1017  * A higher-order reducer creator which invokes the original reducer only if
   606  * the dispatching action matches the given predicate, **OR** if state is
  1018  * the dispatching action matches the given predicate, **OR** if state is
   622   };
  1034   };
   623 };
  1035 };
   624 
  1036 
   625 /* harmony default export */ var if_matching_action = (ifMatchingAction);
  1037 /* harmony default export */ var if_matching_action = (ifMatchingAction);
   626 
  1038 
       
  1039 // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/utils/replace-action.js
       
  1040 /**
       
  1041  * Higher-order reducer creator which substitutes the action object before
       
  1042  * passing to the original reducer.
       
  1043  *
       
  1044  * @param {Function} replacer Function mapping original action to replacement.
       
  1045  *
       
  1046  * @return {Function} Higher-order reducer.
       
  1047  */
       
  1048 var replaceAction = function replaceAction(replacer) {
       
  1049   return function (reducer) {
       
  1050     return function (state, action) {
       
  1051       return reducer(state, replacer(action));
       
  1052     };
       
  1053   };
       
  1054 };
       
  1055 
       
  1056 /* harmony default export */ var replace_action = (replaceAction);
       
  1057 
       
  1058 // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/utils/conservative-map-item.js
       
  1059 /**
       
  1060  * External dependencies
       
  1061  */
       
  1062 
       
  1063 /**
       
  1064  * Given the current and next item entity, returns the minimally "modified"
       
  1065  * result of the next item, preferring value references from the original item
       
  1066  * if equal. If all values match, the original item is returned.
       
  1067  *
       
  1068  * @param {Object} item     Original item.
       
  1069  * @param {Object} nextItem Next item.
       
  1070  *
       
  1071  * @return {Object} Minimally modified merged item.
       
  1072  */
       
  1073 
       
  1074 function conservativeMapItem(item, nextItem) {
       
  1075   // Return next item in its entirety if there is no original item.
       
  1076   if (!item) {
       
  1077     return nextItem;
       
  1078   }
       
  1079 
       
  1080   var hasChanges = false;
       
  1081   var result = {};
       
  1082 
       
  1083   for (var key in nextItem) {
       
  1084     if (Object(external_this_lodash_["isEqual"])(item[key], nextItem[key])) {
       
  1085       result[key] = item[key];
       
  1086     } else {
       
  1087       hasChanges = true;
       
  1088       result[key] = nextItem[key];
       
  1089     }
       
  1090   }
       
  1091 
       
  1092   if (!hasChanges) {
       
  1093     return item;
       
  1094   }
       
  1095 
       
  1096   return result;
       
  1097 }
       
  1098 
   627 // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/utils/on-sub-key.js
  1099 // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/utils/on-sub-key.js
   628 
  1100 
   629 
  1101 
       
  1102 function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
       
  1103 
       
  1104 function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
   630 
  1105 
   631 /**
  1106 /**
   632  * Higher-order reducer creator which creates a combined reducer object, keyed
  1107  * Higher-order reducer creator which creates a combined reducer object, keyed
   633  * by a property on the action object.
  1108  * by a property on the action object.
   634  *
  1109  *
   655 
  1130 
   656       if (nextKeyState === state[key]) {
  1131       if (nextKeyState === state[key]) {
   657         return state;
  1132         return state;
   658       }
  1133       }
   659 
  1134 
   660       return Object(objectSpread["a" /* default */])({}, state, Object(defineProperty["a" /* default */])({}, key, nextKeyState));
  1135       return _objectSpread({}, state, Object(defineProperty["a" /* default */])({}, key, nextKeyState));
   661     };
  1136     };
   662   };
  1137   };
   663 };
  1138 };
   664 /* harmony default export */ var on_sub_key = (on_sub_key_onSubKey);
  1139 /* harmony default export */ var on_sub_key = (on_sub_key_onSubKey);
   665 
  1140 
   666 // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/utils/replace-action.js
  1141 // EXTERNAL MODULE: external {"this":"regeneratorRuntime"}
   667 /**
  1142 var external_this_regeneratorRuntime_ = __webpack_require__(24);
   668  * Higher-order reducer creator which substitutes the action object before
  1143 var external_this_regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(external_this_regeneratorRuntime_);
   669  * passing to the original reducer.
  1144 
   670  *
  1145 // EXTERNAL MODULE: external {"this":["wp","i18n"]}
   671  * @param {Function} replacer Function mapping original action to replacement.
  1146 var external_this_wp_i18n_ = __webpack_require__(1);
   672  *
  1147 
   673  * @return {Function} Higher-order reducer.
  1148 // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/queried-data/actions.js
   674  */
  1149 
   675 var replaceAction = function replaceAction(replacer) {
  1150 
   676   return function (reducer) {
  1151 function actions_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
   677     return function (state, action) {
  1152 
   678       return reducer(state, replacer(action));
  1153 function actions_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { actions_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { actions_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
  1154 
       
  1155 /**
       
  1156  * External dependencies
       
  1157  */
       
  1158 
       
  1159 /**
       
  1160  * Returns an action object used in signalling that items have been received.
       
  1161  *
       
  1162  * @param {Array} items Items received.
       
  1163  *
       
  1164  * @return {Object} Action object.
       
  1165  */
       
  1166 
       
  1167 function receiveItems(items) {
       
  1168   return {
       
  1169     type: 'RECEIVE_ITEMS',
       
  1170     items: Object(external_this_lodash_["castArray"])(items)
       
  1171   };
       
  1172 }
       
  1173 /**
       
  1174  * Returns an action object used in signalling that queried data has been
       
  1175  * received.
       
  1176  *
       
  1177  * @param {Array}   items Queried items received.
       
  1178  * @param {?Object} query Optional query object.
       
  1179  *
       
  1180  * @return {Object} Action object.
       
  1181  */
       
  1182 
       
  1183 function receiveQueriedItems(items) {
       
  1184   var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
       
  1185   return actions_objectSpread({}, receiveItems(items), {
       
  1186     query: query
       
  1187   });
       
  1188 }
       
  1189 
       
  1190 // EXTERNAL MODULE: external {"this":["wp","apiFetch"]}
       
  1191 var external_this_wp_apiFetch_ = __webpack_require__(45);
       
  1192 var external_this_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_apiFetch_);
       
  1193 
       
  1194 // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/controls.js
       
  1195 
       
  1196 
       
  1197 /**
       
  1198  * WordPress dependencies
       
  1199  */
       
  1200 
       
  1201 
       
  1202 /**
       
  1203  * Trigger an API Fetch request.
       
  1204  *
       
  1205  * @param {Object} request API Fetch Request Object.
       
  1206  * @return {Object} control descriptor.
       
  1207  */
       
  1208 
       
  1209 function apiFetch(request) {
       
  1210   return {
       
  1211     type: 'API_FETCH',
       
  1212     request: request
       
  1213   };
       
  1214 }
       
  1215 /**
       
  1216  * Calls a selector using the current state.
       
  1217  *
       
  1218  * @param {string} selectorName Selector name.
       
  1219  * @param  {Array} args         Selector arguments.
       
  1220  *
       
  1221  * @return {Object} control descriptor.
       
  1222  */
       
  1223 
       
  1224 function controls_select(selectorName) {
       
  1225   for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
       
  1226     args[_key - 1] = arguments[_key];
       
  1227   }
       
  1228 
       
  1229   return {
       
  1230     type: 'SELECT',
       
  1231     selectorName: selectorName,
       
  1232     args: args
       
  1233   };
       
  1234 }
       
  1235 /**
       
  1236  * Dispatches a control action for triggering a registry select that has a
       
  1237  * resolver.
       
  1238  *
       
  1239  * @param {string}  selectorName
       
  1240  * @param {Array}   args  Arguments for the select.
       
  1241  *
       
  1242  * @return {Object} control descriptor.
       
  1243  */
       
  1244 
       
  1245 function resolveSelect(selectorName) {
       
  1246   for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
       
  1247     args[_key2 - 1] = arguments[_key2];
       
  1248   }
       
  1249 
       
  1250   return {
       
  1251     type: 'RESOLVE_SELECT',
       
  1252     selectorName: selectorName,
       
  1253     args: args
       
  1254   };
       
  1255 }
       
  1256 var controls = {
       
  1257   API_FETCH: function API_FETCH(_ref) {
       
  1258     var request = _ref.request;
       
  1259     return external_this_wp_apiFetch_default()(request);
       
  1260   },
       
  1261   SELECT: Object(external_this_wp_data_["createRegistryControl"])(function (registry) {
       
  1262     return function (_ref2) {
       
  1263       var _registry$select;
       
  1264 
       
  1265       var selectorName = _ref2.selectorName,
       
  1266           args = _ref2.args;
       
  1267       return (_registry$select = registry.select('core'))[selectorName].apply(_registry$select, Object(toConsumableArray["a" /* default */])(args));
   679     };
  1268     };
       
  1269   }),
       
  1270   RESOLVE_SELECT: Object(external_this_wp_data_["createRegistryControl"])(function (registry) {
       
  1271     return function (_ref3) {
       
  1272       var _registry$__experimen;
       
  1273 
       
  1274       var selectorName = _ref3.selectorName,
       
  1275           args = _ref3.args;
       
  1276       return (_registry$__experimen = registry.__experimentalResolveSelect('core'))[selectorName].apply(_registry$__experimen, Object(toConsumableArray["a" /* default */])(args));
       
  1277     };
       
  1278   })
       
  1279 };
       
  1280 /* harmony default export */ var build_module_controls = (controls);
       
  1281 
       
  1282 // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/actions.js
       
  1283 
       
  1284 
       
  1285 
       
  1286 
       
  1287 var _marked = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(actions_editEntityRecord),
       
  1288     _marked2 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(undo),
       
  1289     _marked3 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(redo),
       
  1290     _marked4 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(saveEntityRecord),
       
  1291     _marked5 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(saveEditedEntityRecord);
       
  1292 
       
  1293 function build_module_actions_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
       
  1294 
       
  1295 function build_module_actions_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { build_module_actions_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { build_module_actions_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
  1296 
       
  1297 /**
       
  1298  * External dependencies
       
  1299  */
       
  1300 
       
  1301 /**
       
  1302  * Internal dependencies
       
  1303  */
       
  1304 
       
  1305 
       
  1306 
       
  1307 
       
  1308 /**
       
  1309  * Returns an action object used in signalling that authors have been received.
       
  1310  *
       
  1311  * @param {string}       queryID Query ID.
       
  1312  * @param {Array|Object} users   Users received.
       
  1313  *
       
  1314  * @return {Object} Action object.
       
  1315  */
       
  1316 
       
  1317 function receiveUserQuery(queryID, users) {
       
  1318   return {
       
  1319     type: 'RECEIVE_USER_QUERY',
       
  1320     users: Object(external_this_lodash_["castArray"])(users),
       
  1321     queryID: queryID
   680   };
  1322   };
       
  1323 }
       
  1324 /**
       
  1325  * Returns an action used in signalling that the current user has been received.
       
  1326  *
       
  1327  * @param {Object} currentUser Current user object.
       
  1328  *
       
  1329  * @return {Object} Action object.
       
  1330  */
       
  1331 
       
  1332 function receiveCurrentUser(currentUser) {
       
  1333   return {
       
  1334     type: 'RECEIVE_CURRENT_USER',
       
  1335     currentUser: currentUser
       
  1336   };
       
  1337 }
       
  1338 /**
       
  1339  * Returns an action object used in adding new entities.
       
  1340  *
       
  1341  * @param {Array} entities  Entities received.
       
  1342  *
       
  1343  * @return {Object} Action object.
       
  1344  */
       
  1345 
       
  1346 function addEntities(entities) {
       
  1347   return {
       
  1348     type: 'ADD_ENTITIES',
       
  1349     entities: entities
       
  1350   };
       
  1351 }
       
  1352 /**
       
  1353  * Returns an action object used in signalling that entity records have been received.
       
  1354  *
       
  1355  * @param {string}       kind            Kind of the received entity.
       
  1356  * @param {string}       name            Name of the received entity.
       
  1357  * @param {Array|Object} records         Records received.
       
  1358  * @param {?Object}      query           Query Object.
       
  1359  * @param {?boolean}     invalidateCache Should invalidate query caches
       
  1360  *
       
  1361  * @return {Object} Action object.
       
  1362  */
       
  1363 
       
  1364 function receiveEntityRecords(kind, name, records, query) {
       
  1365   var invalidateCache = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
       
  1366 
       
  1367   // Auto drafts should not have titles, but some plugins rely on them so we can't filter this
       
  1368   // on the server.
       
  1369   if (kind === 'postType') {
       
  1370     records = Object(external_this_lodash_["castArray"])(records).map(function (record) {
       
  1371       return record.status === 'auto-draft' ? build_module_actions_objectSpread({}, record, {
       
  1372         title: ''
       
  1373       }) : record;
       
  1374     });
       
  1375   }
       
  1376 
       
  1377   var action;
       
  1378 
       
  1379   if (query) {
       
  1380     action = receiveQueriedItems(records, query);
       
  1381   } else {
       
  1382     action = receiveItems(records);
       
  1383   }
       
  1384 
       
  1385   return build_module_actions_objectSpread({}, action, {
       
  1386     kind: kind,
       
  1387     name: name,
       
  1388     invalidateCache: invalidateCache
       
  1389   });
       
  1390 }
       
  1391 /**
       
  1392  * Returns an action object used in signalling that the current theme has been received.
       
  1393  *
       
  1394  * @param {Object} currentTheme The current theme.
       
  1395  *
       
  1396  * @return {Object} Action object.
       
  1397  */
       
  1398 
       
  1399 function receiveCurrentTheme(currentTheme) {
       
  1400   return {
       
  1401     type: 'RECEIVE_CURRENT_THEME',
       
  1402     currentTheme: currentTheme
       
  1403   };
       
  1404 }
       
  1405 /**
       
  1406  * Returns an action object used in signalling that the index has been received.
       
  1407  *
       
  1408  * @param {Object} themeSupports Theme support for the current theme.
       
  1409  *
       
  1410  * @return {Object} Action object.
       
  1411  */
       
  1412 
       
  1413 function receiveThemeSupports(themeSupports) {
       
  1414   return {
       
  1415     type: 'RECEIVE_THEME_SUPPORTS',
       
  1416     themeSupports: themeSupports
       
  1417   };
       
  1418 }
       
  1419 /**
       
  1420  * Returns an action object used in signalling that the preview data for
       
  1421  * a given URl has been received.
       
  1422  *
       
  1423  * @param {string}  url     URL to preview the embed for.
       
  1424  * @param {*}       preview Preview data.
       
  1425  *
       
  1426  * @return {Object} Action object.
       
  1427  */
       
  1428 
       
  1429 function receiveEmbedPreview(url, preview) {
       
  1430   return {
       
  1431     type: 'RECEIVE_EMBED_PREVIEW',
       
  1432     url: url,
       
  1433     preview: preview
       
  1434   };
       
  1435 }
       
  1436 /**
       
  1437  * Returns an action object that triggers an
       
  1438  * edit to an entity record.
       
  1439  *
       
  1440  * @param {string} kind     Kind of the edited entity record.
       
  1441  * @param {string} name     Name of the edited entity record.
       
  1442  * @param {number} recordId Record ID of the edited entity record.
       
  1443  * @param {Object} edits    The edits.
       
  1444  * @param {Object} options  Options for the edit.
       
  1445  * @param {boolean} options.undoIgnore Whether to ignore the edit in undo history or not.
       
  1446  *
       
  1447  * @return {Object} Action object.
       
  1448  */
       
  1449 
       
  1450 function actions_editEntityRecord(kind, name, recordId, edits) {
       
  1451   var options,
       
  1452       entity,
       
  1453       _entity$transientEdit,
       
  1454       transientEdits,
       
  1455       _entity$mergedEdits,
       
  1456       mergedEdits,
       
  1457       record,
       
  1458       editedRecord,
       
  1459       edit,
       
  1460       _args = arguments;
       
  1461 
       
  1462   return external_this_regeneratorRuntime_default.a.wrap(function editEntityRecord$(_context) {
       
  1463     while (1) {
       
  1464       switch (_context.prev = _context.next) {
       
  1465         case 0:
       
  1466           options = _args.length > 4 && _args[4] !== undefined ? _args[4] : {};
       
  1467           _context.next = 3;
       
  1468           return controls_select('getEntity', kind, name);
       
  1469 
       
  1470         case 3:
       
  1471           entity = _context.sent;
       
  1472 
       
  1473           if (entity) {
       
  1474             _context.next = 6;
       
  1475             break;
       
  1476           }
       
  1477 
       
  1478           throw new Error("The entity being edited (".concat(kind, ", ").concat(name, ") does not have a loaded config."));
       
  1479 
       
  1480         case 6:
       
  1481           _entity$transientEdit = entity.transientEdits, transientEdits = _entity$transientEdit === void 0 ? {} : _entity$transientEdit, _entity$mergedEdits = entity.mergedEdits, mergedEdits = _entity$mergedEdits === void 0 ? {} : _entity$mergedEdits;
       
  1482           _context.next = 9;
       
  1483           return controls_select('getRawEntityRecord', kind, name, recordId);
       
  1484 
       
  1485         case 9:
       
  1486           record = _context.sent;
       
  1487           _context.next = 12;
       
  1488           return controls_select('getEditedEntityRecord', kind, name, recordId);
       
  1489 
       
  1490         case 12:
       
  1491           editedRecord = _context.sent;
       
  1492           edit = {
       
  1493             kind: kind,
       
  1494             name: name,
       
  1495             recordId: recordId,
       
  1496             // Clear edits when they are equal to their persisted counterparts
       
  1497             // so that the property is not considered dirty.
       
  1498             edits: Object.keys(edits).reduce(function (acc, key) {
       
  1499               var recordValue = record[key];
       
  1500               var editedRecordValue = editedRecord[key];
       
  1501               var value = mergedEdits[key] ? build_module_actions_objectSpread({}, editedRecordValue, {}, edits[key]) : edits[key];
       
  1502               acc[key] = Object(external_this_lodash_["isEqual"])(recordValue, value) ? undefined : value;
       
  1503               return acc;
       
  1504             }, {}),
       
  1505             transientEdits: transientEdits
       
  1506           };
       
  1507           return _context.abrupt("return", build_module_actions_objectSpread({
       
  1508             type: 'EDIT_ENTITY_RECORD'
       
  1509           }, edit, {
       
  1510             meta: {
       
  1511               undo: !options.undoIgnore && build_module_actions_objectSpread({}, edit, {
       
  1512                 // Send the current values for things like the first undo stack entry.
       
  1513                 edits: Object.keys(edits).reduce(function (acc, key) {
       
  1514                   acc[key] = editedRecord[key];
       
  1515                   return acc;
       
  1516                 }, {})
       
  1517               })
       
  1518             }
       
  1519           }));
       
  1520 
       
  1521         case 15:
       
  1522         case "end":
       
  1523           return _context.stop();
       
  1524       }
       
  1525     }
       
  1526   }, _marked);
       
  1527 }
       
  1528 /**
       
  1529  * Action triggered to undo the last edit to
       
  1530  * an entity record, if any.
       
  1531  */
       
  1532 
       
  1533 function undo() {
       
  1534   var undoEdit;
       
  1535   return external_this_regeneratorRuntime_default.a.wrap(function undo$(_context2) {
       
  1536     while (1) {
       
  1537       switch (_context2.prev = _context2.next) {
       
  1538         case 0:
       
  1539           _context2.next = 2;
       
  1540           return controls_select('getUndoEdit');
       
  1541 
       
  1542         case 2:
       
  1543           undoEdit = _context2.sent;
       
  1544 
       
  1545           if (undoEdit) {
       
  1546             _context2.next = 5;
       
  1547             break;
       
  1548           }
       
  1549 
       
  1550           return _context2.abrupt("return");
       
  1551 
       
  1552         case 5:
       
  1553           _context2.next = 7;
       
  1554           return build_module_actions_objectSpread({
       
  1555             type: 'EDIT_ENTITY_RECORD'
       
  1556           }, undoEdit, {
       
  1557             meta: {
       
  1558               isUndo: true
       
  1559             }
       
  1560           });
       
  1561 
       
  1562         case 7:
       
  1563         case "end":
       
  1564           return _context2.stop();
       
  1565       }
       
  1566     }
       
  1567   }, _marked2);
       
  1568 }
       
  1569 /**
       
  1570  * Action triggered to redo the last undoed
       
  1571  * edit to an entity record, if any.
       
  1572  */
       
  1573 
       
  1574 function redo() {
       
  1575   var redoEdit;
       
  1576   return external_this_regeneratorRuntime_default.a.wrap(function redo$(_context3) {
       
  1577     while (1) {
       
  1578       switch (_context3.prev = _context3.next) {
       
  1579         case 0:
       
  1580           _context3.next = 2;
       
  1581           return controls_select('getRedoEdit');
       
  1582 
       
  1583         case 2:
       
  1584           redoEdit = _context3.sent;
       
  1585 
       
  1586           if (redoEdit) {
       
  1587             _context3.next = 5;
       
  1588             break;
       
  1589           }
       
  1590 
       
  1591           return _context3.abrupt("return");
       
  1592 
       
  1593         case 5:
       
  1594           _context3.next = 7;
       
  1595           return build_module_actions_objectSpread({
       
  1596             type: 'EDIT_ENTITY_RECORD'
       
  1597           }, redoEdit, {
       
  1598             meta: {
       
  1599               isRedo: true
       
  1600             }
       
  1601           });
       
  1602 
       
  1603         case 7:
       
  1604         case "end":
       
  1605           return _context3.stop();
       
  1606       }
       
  1607     }
       
  1608   }, _marked3);
       
  1609 }
       
  1610 /**
       
  1611  * Forces the creation of a new undo level.
       
  1612  *
       
  1613  * @return {Object} Action object.
       
  1614  */
       
  1615 
       
  1616 function __unstableCreateUndoLevel() {
       
  1617   return {
       
  1618     type: 'CREATE_UNDO_LEVEL'
       
  1619   };
       
  1620 }
       
  1621 /**
       
  1622  * Action triggered to save an entity record.
       
  1623  *
       
  1624  * @param {string}  kind                       Kind of the received entity.
       
  1625  * @param {string}  name                       Name of the received entity.
       
  1626  * @param {Object}  record                     Record to be saved.
       
  1627  * @param {Object}  options                    Saving options.
       
  1628  * @param {boolean} [options.isAutosave=false] Whether this is an autosave.
       
  1629  */
       
  1630 
       
  1631 function saveEntityRecord(kind, name, record) {
       
  1632   var _ref,
       
  1633       _ref$isAutosave,
       
  1634       isAutosave,
       
  1635       entities,
       
  1636       entity,
       
  1637       entityIdKey,
       
  1638       recordId,
       
  1639       _i,
       
  1640       _Object$entries,
       
  1641       _Object$entries$_i,
       
  1642       key,
       
  1643       value,
       
  1644       evaluatedValue,
       
  1645       updatedRecord,
       
  1646       error,
       
  1647       persistedEntity,
       
  1648       currentEdits,
       
  1649       path,
       
  1650       persistedRecord,
       
  1651       currentUser,
       
  1652       currentUserId,
       
  1653       autosavePost,
       
  1654       data,
       
  1655       newRecord,
       
  1656       _data,
       
  1657       _args4 = arguments;
       
  1658 
       
  1659   return external_this_regeneratorRuntime_default.a.wrap(function saveEntityRecord$(_context4) {
       
  1660     while (1) {
       
  1661       switch (_context4.prev = _context4.next) {
       
  1662         case 0:
       
  1663           _ref = _args4.length > 3 && _args4[3] !== undefined ? _args4[3] : {
       
  1664             isAutosave: false
       
  1665           }, _ref$isAutosave = _ref.isAutosave, isAutosave = _ref$isAutosave === void 0 ? false : _ref$isAutosave;
       
  1666           _context4.next = 3;
       
  1667           return getKindEntities(kind);
       
  1668 
       
  1669         case 3:
       
  1670           entities = _context4.sent;
       
  1671           entity = Object(external_this_lodash_["find"])(entities, {
       
  1672             kind: kind,
       
  1673             name: name
       
  1674           });
       
  1675 
       
  1676           if (entity) {
       
  1677             _context4.next = 7;
       
  1678             break;
       
  1679           }
       
  1680 
       
  1681           return _context4.abrupt("return");
       
  1682 
       
  1683         case 7:
       
  1684           entityIdKey = entity.key || DEFAULT_ENTITY_KEY;
       
  1685           recordId = record[entityIdKey]; // Evaluate optimized edits.
       
  1686           // (Function edits that should be evaluated on save to avoid expensive computations on every edit.)
       
  1687 
       
  1688           _i = 0, _Object$entries = Object.entries(record);
       
  1689 
       
  1690         case 10:
       
  1691           if (!(_i < _Object$entries.length)) {
       
  1692             _context4.next = 24;
       
  1693             break;
       
  1694           }
       
  1695 
       
  1696           _Object$entries$_i = Object(slicedToArray["a" /* default */])(_Object$entries[_i], 2), key = _Object$entries$_i[0], value = _Object$entries$_i[1];
       
  1697 
       
  1698           if (!(typeof value === 'function')) {
       
  1699             _context4.next = 21;
       
  1700             break;
       
  1701           }
       
  1702 
       
  1703           _context4.t0 = value;
       
  1704           _context4.next = 16;
       
  1705           return controls_select('getEditedEntityRecord', kind, name, recordId);
       
  1706 
       
  1707         case 16:
       
  1708           _context4.t1 = _context4.sent;
       
  1709           evaluatedValue = (0, _context4.t0)(_context4.t1);
       
  1710           _context4.next = 20;
       
  1711           return actions_editEntityRecord(kind, name, recordId, Object(defineProperty["a" /* default */])({}, key, evaluatedValue), {
       
  1712             undoIgnore: true
       
  1713           });
       
  1714 
       
  1715         case 20:
       
  1716           record[key] = evaluatedValue;
       
  1717 
       
  1718         case 21:
       
  1719           _i++;
       
  1720           _context4.next = 10;
       
  1721           break;
       
  1722 
       
  1723         case 24:
       
  1724           _context4.next = 26;
       
  1725           return {
       
  1726             type: 'SAVE_ENTITY_RECORD_START',
       
  1727             kind: kind,
       
  1728             name: name,
       
  1729             recordId: recordId,
       
  1730             isAutosave: isAutosave
       
  1731           };
       
  1732 
       
  1733         case 26:
       
  1734           _context4.prev = 26;
       
  1735           path = "".concat(entity.baseURL).concat(recordId ? '/' + recordId : '');
       
  1736           _context4.next = 30;
       
  1737           return controls_select('getRawEntityRecord', kind, name, recordId);
       
  1738 
       
  1739         case 30:
       
  1740           persistedRecord = _context4.sent;
       
  1741 
       
  1742           if (!isAutosave) {
       
  1743             _context4.next = 55;
       
  1744             break;
       
  1745           }
       
  1746 
       
  1747           _context4.next = 34;
       
  1748           return controls_select('getCurrentUser');
       
  1749 
       
  1750         case 34:
       
  1751           currentUser = _context4.sent;
       
  1752           currentUserId = currentUser ? currentUser.id : undefined;
       
  1753           _context4.next = 38;
       
  1754           return controls_select('getAutosave', persistedRecord.type, persistedRecord.id, currentUserId);
       
  1755 
       
  1756         case 38:
       
  1757           autosavePost = _context4.sent;
       
  1758           // Autosaves need all expected fields to be present.
       
  1759           // So we fallback to the previous autosave and then
       
  1760           // to the actual persisted entity if the edits don't
       
  1761           // have a value.
       
  1762           data = build_module_actions_objectSpread({}, persistedRecord, {}, autosavePost, {}, record);
       
  1763           data = Object.keys(data).reduce(function (acc, key) {
       
  1764             if (['title', 'excerpt', 'content'].includes(key)) {
       
  1765               // Edits should be the "raw" attribute values.
       
  1766               acc[key] = Object(external_this_lodash_["get"])(data[key], 'raw', data[key]);
       
  1767             }
       
  1768 
       
  1769             return acc;
       
  1770           }, {
       
  1771             status: data.status === 'auto-draft' ? 'draft' : data.status
       
  1772           });
       
  1773           _context4.next = 43;
       
  1774           return apiFetch({
       
  1775             path: "".concat(path, "/autosaves"),
       
  1776             method: 'POST',
       
  1777             data: data
       
  1778           });
       
  1779 
       
  1780         case 43:
       
  1781           updatedRecord = _context4.sent;
       
  1782 
       
  1783           if (!(persistedRecord.id === updatedRecord.id)) {
       
  1784             _context4.next = 51;
       
  1785             break;
       
  1786           }
       
  1787 
       
  1788           newRecord = build_module_actions_objectSpread({}, persistedRecord, {}, data, {}, updatedRecord);
       
  1789           newRecord = Object.keys(newRecord).reduce(function (acc, key) {
       
  1790             // These properties are persisted in autosaves.
       
  1791             if (['title', 'excerpt', 'content'].includes(key)) {
       
  1792               // Edits should be the "raw" attribute values.
       
  1793               acc[key] = Object(external_this_lodash_["get"])(newRecord[key], 'raw', newRecord[key]);
       
  1794             } else if (key === 'status') {
       
  1795               // Status is only persisted in autosaves when going from
       
  1796               // "auto-draft" to "draft".
       
  1797               acc[key] = persistedRecord.status === 'auto-draft' && newRecord.status === 'draft' ? newRecord.status : persistedRecord.status;
       
  1798             } else {
       
  1799               // These properties are not persisted in autosaves.
       
  1800               acc[key] = Object(external_this_lodash_["get"])(persistedRecord[key], 'raw', persistedRecord[key]);
       
  1801             }
       
  1802 
       
  1803             return acc;
       
  1804           }, {});
       
  1805           _context4.next = 49;
       
  1806           return receiveEntityRecords(kind, name, newRecord, undefined, true);
       
  1807 
       
  1808         case 49:
       
  1809           _context4.next = 53;
       
  1810           break;
       
  1811 
       
  1812         case 51:
       
  1813           _context4.next = 53;
       
  1814           return receiveAutosaves(persistedRecord.id, updatedRecord);
       
  1815 
       
  1816         case 53:
       
  1817           _context4.next = 70;
       
  1818           break;
       
  1819 
       
  1820         case 55:
       
  1821           // Auto drafts should be converted to drafts on explicit saves and we should not respect their default title,
       
  1822           // but some plugins break with this behavior so we can't filter it on the server.
       
  1823           _data = record;
       
  1824 
       
  1825           if (kind === 'postType' && persistedRecord && persistedRecord.status === 'auto-draft') {
       
  1826             if (!_data.status) {
       
  1827               _data = build_module_actions_objectSpread({}, _data, {
       
  1828                 status: 'draft'
       
  1829               });
       
  1830             }
       
  1831 
       
  1832             if (!_data.title || _data.title === 'Auto Draft') {
       
  1833               _data = build_module_actions_objectSpread({}, _data, {
       
  1834                 title: ''
       
  1835               });
       
  1836             }
       
  1837           } // Get the full local version of the record before the update,
       
  1838           // to merge it with the edits and then propagate it to subscribers
       
  1839 
       
  1840 
       
  1841           _context4.next = 59;
       
  1842           return controls_select('__experimentalGetEntityRecordNoResolver', kind, name, recordId);
       
  1843 
       
  1844         case 59:
       
  1845           persistedEntity = _context4.sent;
       
  1846           _context4.next = 62;
       
  1847           return controls_select('getEntityRecordEdits', kind, name, recordId);
       
  1848 
       
  1849         case 62:
       
  1850           currentEdits = _context4.sent;
       
  1851           _context4.next = 65;
       
  1852           return receiveEntityRecords(kind, name, build_module_actions_objectSpread({}, persistedEntity, {}, _data), undefined, true);
       
  1853 
       
  1854         case 65:
       
  1855           _context4.next = 67;
       
  1856           return apiFetch({
       
  1857             path: path,
       
  1858             method: recordId ? 'PUT' : 'POST',
       
  1859             data: _data
       
  1860           });
       
  1861 
       
  1862         case 67:
       
  1863           updatedRecord = _context4.sent;
       
  1864           _context4.next = 70;
       
  1865           return receiveEntityRecords(kind, name, updatedRecord, undefined, true);
       
  1866 
       
  1867         case 70:
       
  1868           _context4.next = 93;
       
  1869           break;
       
  1870 
       
  1871         case 72:
       
  1872           _context4.prev = 72;
       
  1873           _context4.t2 = _context4["catch"](26);
       
  1874           error = _context4.t2; // If we got to the point in the try block where we made an optimistic update,
       
  1875           // we need to roll it back here.
       
  1876 
       
  1877           if (!(persistedEntity && currentEdits)) {
       
  1878             _context4.next = 93;
       
  1879             break;
       
  1880           }
       
  1881 
       
  1882           _context4.next = 78;
       
  1883           return receiveEntityRecords(kind, name, persistedEntity, undefined, true);
       
  1884 
       
  1885         case 78:
       
  1886           _context4.t3 = actions_editEntityRecord;
       
  1887           _context4.t4 = kind;
       
  1888           _context4.t5 = name;
       
  1889           _context4.t6 = recordId;
       
  1890           _context4.t7 = build_module_actions_objectSpread;
       
  1891           _context4.t8 = {};
       
  1892           _context4.t9 = currentEdits;
       
  1893           _context4.t10 = {};
       
  1894           _context4.next = 88;
       
  1895           return controls_select('getEntityRecordEdits', kind, name, recordId);
       
  1896 
       
  1897         case 88:
       
  1898           _context4.t11 = _context4.sent;
       
  1899           _context4.t12 = (0, _context4.t7)(_context4.t8, _context4.t9, _context4.t10, _context4.t11);
       
  1900           _context4.t13 = {
       
  1901             undoIgnore: true
       
  1902           };
       
  1903           _context4.next = 93;
       
  1904           return (0, _context4.t3)(_context4.t4, _context4.t5, _context4.t6, _context4.t12, _context4.t13);
       
  1905 
       
  1906         case 93:
       
  1907           _context4.next = 95;
       
  1908           return {
       
  1909             type: 'SAVE_ENTITY_RECORD_FINISH',
       
  1910             kind: kind,
       
  1911             name: name,
       
  1912             recordId: recordId,
       
  1913             error: error,
       
  1914             isAutosave: isAutosave
       
  1915           };
       
  1916 
       
  1917         case 95:
       
  1918           return _context4.abrupt("return", updatedRecord);
       
  1919 
       
  1920         case 96:
       
  1921         case "end":
       
  1922           return _context4.stop();
       
  1923       }
       
  1924     }
       
  1925   }, _marked4, null, [[26, 72]]);
       
  1926 }
       
  1927 /**
       
  1928  * Action triggered to save an entity record's edits.
       
  1929  *
       
  1930  * @param {string} kind     Kind of the entity.
       
  1931  * @param {string} name     Name of the entity.
       
  1932  * @param {Object} recordId ID of the record.
       
  1933  * @param {Object} options  Saving options.
       
  1934  */
       
  1935 
       
  1936 function saveEditedEntityRecord(kind, name, recordId, options) {
       
  1937   var edits, record;
       
  1938   return external_this_regeneratorRuntime_default.a.wrap(function saveEditedEntityRecord$(_context5) {
       
  1939     while (1) {
       
  1940       switch (_context5.prev = _context5.next) {
       
  1941         case 0:
       
  1942           _context5.next = 2;
       
  1943           return controls_select('hasEditsForEntityRecord', kind, name, recordId);
       
  1944 
       
  1945         case 2:
       
  1946           if (_context5.sent) {
       
  1947             _context5.next = 4;
       
  1948             break;
       
  1949           }
       
  1950 
       
  1951           return _context5.abrupt("return");
       
  1952 
       
  1953         case 4:
       
  1954           _context5.next = 6;
       
  1955           return controls_select('getEntityRecordNonTransientEdits', kind, name, recordId);
       
  1956 
       
  1957         case 6:
       
  1958           edits = _context5.sent;
       
  1959           record = build_module_actions_objectSpread({
       
  1960             id: recordId
       
  1961           }, edits);
       
  1962           return _context5.delegateYield(saveEntityRecord(kind, name, record, options), "t0", 9);
       
  1963 
       
  1964         case 9:
       
  1965         case "end":
       
  1966           return _context5.stop();
       
  1967       }
       
  1968     }
       
  1969   }, _marked5);
       
  1970 }
       
  1971 /**
       
  1972  * Returns an action object used in signalling that Upload permissions have been received.
       
  1973  *
       
  1974  * @param {boolean} hasUploadPermissions Does the user have permission to upload files?
       
  1975  *
       
  1976  * @return {Object} Action object.
       
  1977  */
       
  1978 
       
  1979 function receiveUploadPermissions(hasUploadPermissions) {
       
  1980   return {
       
  1981     type: 'RECEIVE_USER_PERMISSION',
       
  1982     key: 'create/media',
       
  1983     isAllowed: hasUploadPermissions
       
  1984   };
       
  1985 }
       
  1986 /**
       
  1987  * Returns an action object used in signalling that the current user has
       
  1988  * permission to perform an action on a REST resource.
       
  1989  *
       
  1990  * @param {string}  key       A key that represents the action and REST resource.
       
  1991  * @param {boolean} isAllowed Whether or not the user can perform the action.
       
  1992  *
       
  1993  * @return {Object} Action object.
       
  1994  */
       
  1995 
       
  1996 function receiveUserPermission(key, isAllowed) {
       
  1997   return {
       
  1998     type: 'RECEIVE_USER_PERMISSION',
       
  1999     key: key,
       
  2000     isAllowed: isAllowed
       
  2001   };
       
  2002 }
       
  2003 /**
       
  2004  * Returns an action object used in signalling that the autosaves for a
       
  2005  * post have been received.
       
  2006  *
       
  2007  * @param {number}       postId    The id of the post that is parent to the autosave.
       
  2008  * @param {Array|Object} autosaves An array of autosaves or singular autosave object.
       
  2009  *
       
  2010  * @return {Object} Action object.
       
  2011  */
       
  2012 
       
  2013 function receiveAutosaves(postId, autosaves) {
       
  2014   return {
       
  2015     type: 'RECEIVE_AUTOSAVES',
       
  2016     postId: postId,
       
  2017     autosaves: Object(external_this_lodash_["castArray"])(autosaves)
       
  2018   };
       
  2019 }
       
  2020 
       
  2021 // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/entities.js
       
  2022 
       
  2023 
       
  2024 var entities_marked = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(loadPostTypeEntities),
       
  2025     entities_marked2 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(loadTaxonomyEntities),
       
  2026     entities_marked3 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(getKindEntities);
       
  2027 
       
  2028 /**
       
  2029  * External dependencies
       
  2030  */
       
  2031 
       
  2032 /**
       
  2033  * WordPress dependencies
       
  2034  */
       
  2035 
       
  2036 
       
  2037 /**
       
  2038  * Internal dependencies
       
  2039  */
       
  2040 
       
  2041 
       
  2042 
       
  2043 var DEFAULT_ENTITY_KEY = 'id';
       
  2044 var defaultEntities = [{
       
  2045   label: Object(external_this_wp_i18n_["__"])('Site'),
       
  2046   name: 'site',
       
  2047   kind: 'root',
       
  2048   baseURL: '/wp/v2/settings',
       
  2049   getTitle: function getTitle(record) {
       
  2050     return Object(external_this_lodash_["get"])(record, ['title'], Object(external_this_wp_i18n_["__"])('Site Title'));
       
  2051   }
       
  2052 }, {
       
  2053   label: Object(external_this_wp_i18n_["__"])('Post Type'),
       
  2054   name: 'postType',
       
  2055   kind: 'root',
       
  2056   key: 'slug',
       
  2057   baseURL: '/wp/v2/types'
       
  2058 }, {
       
  2059   name: 'media',
       
  2060   kind: 'root',
       
  2061   baseURL: '/wp/v2/media',
       
  2062   plural: 'mediaItems',
       
  2063   label: Object(external_this_wp_i18n_["__"])('Media')
       
  2064 }, {
       
  2065   name: 'taxonomy',
       
  2066   kind: 'root',
       
  2067   key: 'slug',
       
  2068   baseURL: '/wp/v2/taxonomies',
       
  2069   plural: 'taxonomies',
       
  2070   label: Object(external_this_wp_i18n_["__"])('Taxonomy')
       
  2071 }, {
       
  2072   name: 'widgetArea',
       
  2073   kind: 'root',
       
  2074   baseURL: '/__experimental/widget-areas',
       
  2075   plural: 'widgetAreas',
       
  2076   transientEdits: {
       
  2077     blocks: true
       
  2078   },
       
  2079   label: Object(external_this_wp_i18n_["__"])('Widget area')
       
  2080 }, {
       
  2081   label: Object(external_this_wp_i18n_["__"])('User'),
       
  2082   name: 'user',
       
  2083   kind: 'root',
       
  2084   baseURL: '/wp/v2/users',
       
  2085   plural: 'users'
       
  2086 }, {
       
  2087   name: 'comment',
       
  2088   kind: 'root',
       
  2089   baseURL: '/wp/v2/comments',
       
  2090   plural: 'comments',
       
  2091   label: Object(external_this_wp_i18n_["__"])('Comment')
       
  2092 }, {
       
  2093   name: 'menu',
       
  2094   kind: 'root',
       
  2095   baseURL: '/__experimental/menus',
       
  2096   plural: 'menus',
       
  2097   label: Object(external_this_wp_i18n_["__"])('Menu')
       
  2098 }, {
       
  2099   name: 'menuItem',
       
  2100   kind: 'root',
       
  2101   baseURL: '/__experimental/menu-items',
       
  2102   plural: 'menuItems',
       
  2103   label: Object(external_this_wp_i18n_["__"])('Menu Item')
       
  2104 }, {
       
  2105   name: 'menuLocation',
       
  2106   kind: 'root',
       
  2107   baseURL: '/__experimental/menu-locations',
       
  2108   plural: 'menuLocations',
       
  2109   label: Object(external_this_wp_i18n_["__"])('Menu Location'),
       
  2110   key: 'name'
       
  2111 }];
       
  2112 var kinds = [{
       
  2113   name: 'postType',
       
  2114   loadEntities: loadPostTypeEntities
       
  2115 }, {
       
  2116   name: 'taxonomy',
       
  2117   loadEntities: loadTaxonomyEntities
       
  2118 }];
       
  2119 /**
       
  2120  * Returns the list of post type entities.
       
  2121  *
       
  2122  * @return {Promise} Entities promise
       
  2123  */
       
  2124 
       
  2125 function loadPostTypeEntities() {
       
  2126   var postTypes;
       
  2127   return external_this_regeneratorRuntime_default.a.wrap(function loadPostTypeEntities$(_context) {
       
  2128     while (1) {
       
  2129       switch (_context.prev = _context.next) {
       
  2130         case 0:
       
  2131           _context.next = 2;
       
  2132           return apiFetch({
       
  2133             path: '/wp/v2/types?context=edit'
       
  2134           });
       
  2135 
       
  2136         case 2:
       
  2137           postTypes = _context.sent;
       
  2138           return _context.abrupt("return", Object(external_this_lodash_["map"])(postTypes, function (postType, name) {
       
  2139             return {
       
  2140               kind: 'postType',
       
  2141               baseURL: '/wp/v2/' + postType.rest_base,
       
  2142               name: name,
       
  2143               label: postType.labels.singular_name,
       
  2144               transientEdits: {
       
  2145                 blocks: true,
       
  2146                 selectionStart: true,
       
  2147                 selectionEnd: true
       
  2148               },
       
  2149               mergedEdits: {
       
  2150                 meta: true
       
  2151               },
       
  2152               getTitle: function getTitle(record) {
       
  2153                 if (name === 'wp_template_part' || name === 'wp_template') {
       
  2154                   return Object(external_this_lodash_["startCase"])(record.slug);
       
  2155                 }
       
  2156 
       
  2157                 return Object(external_this_lodash_["get"])(record, ['title', 'rendered'], record.id);
       
  2158               }
       
  2159             };
       
  2160           }));
       
  2161 
       
  2162         case 4:
       
  2163         case "end":
       
  2164           return _context.stop();
       
  2165       }
       
  2166     }
       
  2167   }, entities_marked);
       
  2168 }
       
  2169 /**
       
  2170  * Returns the list of the taxonomies entities.
       
  2171  *
       
  2172  * @return {Promise} Entities promise
       
  2173  */
       
  2174 
       
  2175 
       
  2176 function loadTaxonomyEntities() {
       
  2177   var taxonomies;
       
  2178   return external_this_regeneratorRuntime_default.a.wrap(function loadTaxonomyEntities$(_context2) {
       
  2179     while (1) {
       
  2180       switch (_context2.prev = _context2.next) {
       
  2181         case 0:
       
  2182           _context2.next = 2;
       
  2183           return apiFetch({
       
  2184             path: '/wp/v2/taxonomies?context=edit'
       
  2185           });
       
  2186 
       
  2187         case 2:
       
  2188           taxonomies = _context2.sent;
       
  2189           return _context2.abrupt("return", Object(external_this_lodash_["map"])(taxonomies, function (taxonomy, name) {
       
  2190             return {
       
  2191               kind: 'taxonomy',
       
  2192               baseURL: '/wp/v2/' + taxonomy.rest_base,
       
  2193               name: name,
       
  2194               label: taxonomy.labels.singular_name
       
  2195             };
       
  2196           }));
       
  2197 
       
  2198         case 4:
       
  2199         case "end":
       
  2200           return _context2.stop();
       
  2201       }
       
  2202     }
       
  2203   }, entities_marked2);
       
  2204 }
       
  2205 /**
       
  2206  * Returns the entity's getter method name given its kind and name.
       
  2207  *
       
  2208  * @param {string}  kind      Entity kind.
       
  2209  * @param {string}  name      Entity name.
       
  2210  * @param {string}  prefix    Function prefix.
       
  2211  * @param {boolean} usePlural Whether to use the plural form or not.
       
  2212  *
       
  2213  * @return {string} Method name
       
  2214  */
       
  2215 
       
  2216 
       
  2217 var entities_getMethodName = function getMethodName(kind, name) {
       
  2218   var prefix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'get';
       
  2219   var usePlural = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
       
  2220   var entity = Object(external_this_lodash_["find"])(defaultEntities, {
       
  2221     kind: kind,
       
  2222     name: name
       
  2223   });
       
  2224   var kindPrefix = kind === 'root' ? '' : Object(external_this_lodash_["upperFirst"])(Object(external_this_lodash_["camelCase"])(kind));
       
  2225   var nameSuffix = Object(external_this_lodash_["upperFirst"])(Object(external_this_lodash_["camelCase"])(name)) + (usePlural ? 's' : '');
       
  2226   var suffix = usePlural && entity.plural ? Object(external_this_lodash_["upperFirst"])(Object(external_this_lodash_["camelCase"])(entity.plural)) : nameSuffix;
       
  2227   return "".concat(prefix).concat(kindPrefix).concat(suffix);
   681 };
  2228 };
   682 
  2229 /**
   683 /* harmony default export */ var replace_action = (replaceAction);
  2230  * Loads the kind entities into the store.
       
  2231  *
       
  2232  * @param {string} kind  Kind
       
  2233  *
       
  2234  * @return {Array} Entities
       
  2235  */
       
  2236 
       
  2237 function getKindEntities(kind) {
       
  2238   var entities, kindConfig;
       
  2239   return external_this_regeneratorRuntime_default.a.wrap(function getKindEntities$(_context3) {
       
  2240     while (1) {
       
  2241       switch (_context3.prev = _context3.next) {
       
  2242         case 0:
       
  2243           _context3.next = 2;
       
  2244           return controls_select('getEntitiesByKind', kind);
       
  2245 
       
  2246         case 2:
       
  2247           entities = _context3.sent;
       
  2248 
       
  2249           if (!(entities && entities.length !== 0)) {
       
  2250             _context3.next = 5;
       
  2251             break;
       
  2252           }
       
  2253 
       
  2254           return _context3.abrupt("return", entities);
       
  2255 
       
  2256         case 5:
       
  2257           kindConfig = Object(external_this_lodash_["find"])(kinds, {
       
  2258             name: kind
       
  2259           });
       
  2260 
       
  2261           if (kindConfig) {
       
  2262             _context3.next = 8;
       
  2263             break;
       
  2264           }
       
  2265 
       
  2266           return _context3.abrupt("return", []);
       
  2267 
       
  2268         case 8:
       
  2269           _context3.next = 10;
       
  2270           return kindConfig.loadEntities();
       
  2271 
       
  2272         case 10:
       
  2273           entities = _context3.sent;
       
  2274           _context3.next = 13;
       
  2275           return addEntities(entities);
       
  2276 
       
  2277         case 13:
       
  2278           return _context3.abrupt("return", entities);
       
  2279 
       
  2280         case 14:
       
  2281         case "end":
       
  2282           return _context3.stop();
       
  2283       }
       
  2284     }
       
  2285   }, entities_marked3);
       
  2286 }
       
  2287 
       
  2288 // EXTERNAL MODULE: external {"this":["wp","url"]}
       
  2289 var external_this_wp_url_ = __webpack_require__(31);
   684 
  2290 
   685 // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/utils/with-weak-map-cache.js
  2291 // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/utils/with-weak-map-cache.js
   686 /**
  2292 /**
   687  * External dependencies
  2293  * External dependencies
   688  */
  2294  */
   707     } else {
  2313     } else {
   708       value = fn(key); // Can reach here if key is not valid for WeakMap, since `has`
  2314       value = fn(key); // Can reach here if key is not valid for WeakMap, since `has`
   709       // will return false for invalid key. Since `set` will throw,
  2315       // will return false for invalid key. Since `set` will throw,
   710       // ensure that key is valid before setting into cache.
  2316       // ensure that key is valid before setting into cache.
   711 
  2317 
   712       if (Object(external_lodash_["isObjectLike"])(key)) {
  2318       if (Object(external_this_lodash_["isObjectLike"])(key)) {
   713         cache.set(key, value);
  2319         cache.set(key, value);
   714       }
  2320       }
   715     }
  2321     }
   716 
  2322 
   717     return value;
  2323     return value;
   718   };
  2324   };
   719 }
  2325 }
   720 
  2326 
   721 /* harmony default export */ var with_weak_map_cache = (withWeakMapCache);
  2327 /* harmony default export */ var with_weak_map_cache = (withWeakMapCache);
   722 
  2328 
   723 // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/utils/index.js
       
   724 
       
   725 
       
   726 
       
   727 
       
   728 
       
   729 // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/queried-data/actions.js
       
   730 
       
   731 
       
   732 /**
       
   733  * External dependencies
       
   734  */
       
   735 
       
   736 /**
       
   737  * Returns an action object used in signalling that items have been received.
       
   738  *
       
   739  * @param {Array} items Items received.
       
   740  *
       
   741  * @return {Object} Action object.
       
   742  */
       
   743 
       
   744 function receiveItems(items) {
       
   745   return {
       
   746     type: 'RECEIVE_ITEMS',
       
   747     items: Object(external_lodash_["castArray"])(items)
       
   748   };
       
   749 }
       
   750 /**
       
   751  * Returns an action object used in signalling that queried data has been
       
   752  * received.
       
   753  *
       
   754  * @param {Array}   items Queried items received.
       
   755  * @param {?Object} query Optional query object.
       
   756  *
       
   757  * @return {Object} Action object.
       
   758  */
       
   759 
       
   760 function receiveQueriedItems(items) {
       
   761   var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
       
   762   return Object(objectSpread["a" /* default */])({}, receiveItems(items), {
       
   763     query: query
       
   764   });
       
   765 }
       
   766 
       
   767 // EXTERNAL MODULE: ./node_modules/rememo/es/rememo.js
       
   768 var rememo = __webpack_require__(30);
       
   769 
       
   770 // EXTERNAL MODULE: ./node_modules/equivalent-key-map/equivalent-key-map.js
       
   771 var equivalent_key_map = __webpack_require__(76);
       
   772 var equivalent_key_map_default = /*#__PURE__*/__webpack_require__.n(equivalent_key_map);
       
   773 
       
   774 // EXTERNAL MODULE: external {"this":["wp","url"]}
       
   775 var external_this_wp_url_ = __webpack_require__(25);
       
   776 
       
   777 // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/queried-data/get-query-parts.js
  2329 // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/queried-data/get-query-parts.js
   778 
  2330 
   779 
  2331 
   780 /**
  2332 /**
   781  * WordPress dependencies
  2333  * WordPress dependencies
   787 
  2339 
   788 
  2340 
   789 /**
  2341 /**
   790  * An object of properties describing a specific query.
  2342  * An object of properties describing a specific query.
   791  *
  2343  *
   792  * @typedef {WPQueriedDataQueryParts}
  2344  * @typedef {Object} WPQueriedDataQueryParts
   793  *
  2345  *
   794  * @property {number} page      The query page (1-based index, default 1).
  2346  * @property {number} page      The query page (1-based index, default 1).
   795  * @property {number} perPage   Items per page for query (default 10).
  2347  * @property {number} perPage   Items per page for query (default 10).
   796  * @property {string} stableKey An encoded stable string of all non-pagination
  2348  * @property {string} stableKey An encoded stable string of all non-pagination
   797  *                              query parameters.
  2349  *                              query parameters.
   846 
  2398 
   847   return parts;
  2399   return parts;
   848 }
  2400 }
   849 /* harmony default export */ var get_query_parts = (with_weak_map_cache(getQueryParts));
  2401 /* harmony default export */ var get_query_parts = (with_weak_map_cache(getQueryParts));
   850 
  2402 
   851 // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/queried-data/selectors.js
  2403 // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/queried-data/reducer.js
       
  2404 
       
  2405 
       
  2406 function reducer_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
       
  2407 
       
  2408 function reducer_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { reducer_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { reducer_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
  2409 
   852 /**
  2410 /**
   853  * External dependencies
  2411  * External dependencies
   854  */
  2412  */
   855 
  2413 
   856 
       
   857 /**
       
   858  * Internal dependencies
       
   859  */
       
   860 
       
   861 
       
   862 /**
       
   863  * Cache of state keys to EquivalentKeyMap where the inner map tracks queries
       
   864  * to their resulting items set. WeakMap allows garbage collection on expired
       
   865  * state references.
       
   866  *
       
   867  * @type {WeakMap<Object,EquivalentKeyMap>}
       
   868  */
       
   869 
       
   870 var queriedItemsCacheByState = new WeakMap();
       
   871 /**
       
   872  * Returns items for a given query, or null if the items are not known.
       
   873  *
       
   874  * @param {Object}  state State object.
       
   875  * @param {?Object} query Optional query.
       
   876  *
       
   877  * @return {?Array} Query items.
       
   878  */
       
   879 
       
   880 function getQueriedItemsUncached(state, query) {
       
   881   var _getQueryParts = get_query_parts(query),
       
   882       stableKey = _getQueryParts.stableKey,
       
   883       page = _getQueryParts.page,
       
   884       perPage = _getQueryParts.perPage;
       
   885 
       
   886   if (!state.queries[stableKey]) {
       
   887     return null;
       
   888   }
       
   889 
       
   890   var itemIds = state.queries[stableKey];
       
   891 
       
   892   if (!itemIds) {
       
   893     return null;
       
   894   }
       
   895 
       
   896   var startOffset = perPage === -1 ? 0 : (page - 1) * perPage;
       
   897   var endOffset = perPage === -1 ? itemIds.length : Math.min(startOffset + perPage, itemIds.length);
       
   898   var items = [];
       
   899 
       
   900   for (var i = startOffset; i < endOffset; i++) {
       
   901     var itemId = itemIds[i];
       
   902     items.push(state.items[itemId]);
       
   903   }
       
   904 
       
   905   return items;
       
   906 }
       
   907 /**
       
   908  * Returns items for a given query, or null if the items are not known. Caches
       
   909  * result both per state (by reference) and per query (by deep equality).
       
   910  * The caching approach is intended to be durable to query objects which are
       
   911  * deeply but not referentially equal, since otherwise:
       
   912  *
       
   913  * `getQueriedItems( state, {} ) !== getQueriedItems( state, {} )`
       
   914  *
       
   915  * @param {Object}  state State object.
       
   916  * @param {?Object} query Optional query.
       
   917  *
       
   918  * @return {?Array} Query items.
       
   919  */
       
   920 
       
   921 
       
   922 var getQueriedItems = Object(rememo["a" /* default */])(function (state) {
       
   923   var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
       
   924   var queriedItemsCache = queriedItemsCacheByState.get(state);
       
   925 
       
   926   if (queriedItemsCache) {
       
   927     var queriedItems = queriedItemsCache.get(query);
       
   928 
       
   929     if (queriedItems !== undefined) {
       
   930       return queriedItems;
       
   931     }
       
   932   } else {
       
   933     queriedItemsCache = new equivalent_key_map_default.a();
       
   934     queriedItemsCacheByState.set(state, queriedItemsCache);
       
   935   }
       
   936 
       
   937   var items = getQueriedItemsUncached(state, query);
       
   938   queriedItemsCache.set(query, items);
       
   939   return items;
       
   940 });
       
   941 
       
   942 // EXTERNAL MODULE: ./node_modules/redux/es/redux.js
       
   943 var redux = __webpack_require__(71);
       
   944 
       
   945 // EXTERNAL MODULE: ./node_modules/@babel/runtime/regenerator/index.js
       
   946 var regenerator = __webpack_require__(23);
       
   947 var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
       
   948 
       
   949 // EXTERNAL MODULE: external {"this":["wp","apiFetch"]}
       
   950 var external_this_wp_apiFetch_ = __webpack_require__(33);
       
   951 var external_this_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_apiFetch_);
       
   952 
       
   953 // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/controls.js
       
   954 
       
   955 
       
   956 /**
  2414 /**
   957  * WordPress dependencies
  2415  * WordPress dependencies
   958  */
       
   959 
       
   960 
       
   961 /**
       
   962  * Trigger an API Fetch request.
       
   963  *
       
   964  * @param {Object} request API Fetch Request Object.
       
   965  * @return {Object} control descriptor.
       
   966  */
       
   967 
       
   968 function apiFetch(request) {
       
   969   return {
       
   970     type: 'API_FETCH',
       
   971     request: request
       
   972   };
       
   973 }
       
   974 /**
       
   975  * Calls a selector using the current state.
       
   976  * @param {string} selectorName Selector name.
       
   977  * @param  {Array} args         Selector arguments.
       
   978  *
       
   979  * @return {Object} control descriptor.
       
   980  */
       
   981 
       
   982 function controls_select(selectorName) {
       
   983   for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
       
   984     args[_key - 1] = arguments[_key];
       
   985   }
       
   986 
       
   987   return {
       
   988     type: 'SELECT',
       
   989     selectorName: selectorName,
       
   990     args: args
       
   991   };
       
   992 }
       
   993 var controls = {
       
   994   API_FETCH: function API_FETCH(_ref) {
       
   995     var request = _ref.request;
       
   996     return external_this_wp_apiFetch_default()(request);
       
   997   },
       
   998   SELECT: Object(external_this_wp_data_["createRegistryControl"])(function (registry) {
       
   999     return function (_ref2) {
       
  1000       var _registry$select;
       
  1001 
       
  1002       var selectorName = _ref2.selectorName,
       
  1003           args = _ref2.args;
       
  1004       return (_registry$select = registry.select('core'))[selectorName].apply(_registry$select, Object(toConsumableArray["a" /* default */])(args));
       
  1005     };
       
  1006   })
       
  1007 };
       
  1008 /* harmony default export */ var build_module_controls = (controls);
       
  1009 
       
  1010 // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/actions.js
       
  1011 
       
  1012 
       
  1013 
       
  1014 var _marked =
       
  1015 /*#__PURE__*/
       
  1016 regenerator_default.a.mark(saveEntityRecord);
       
  1017 
       
  1018 /**
       
  1019  * External dependencies
       
  1020  */
       
  1021 
       
  1022 /**
       
  1023  * Internal dependencies
       
  1024  */
       
  1025 
       
  1026 
       
  1027 
       
  1028 
       
  1029 /**
       
  1030  * Returns an action object used in signalling that authors have been received.
       
  1031  *
       
  1032  * @param {string}       queryID Query ID.
       
  1033  * @param {Array|Object} users   Users received.
       
  1034  *
       
  1035  * @return {Object} Action object.
       
  1036  */
       
  1037 
       
  1038 function receiveUserQuery(queryID, users) {
       
  1039   return {
       
  1040     type: 'RECEIVE_USER_QUERY',
       
  1041     users: Object(external_lodash_["castArray"])(users),
       
  1042     queryID: queryID
       
  1043   };
       
  1044 }
       
  1045 /**
       
  1046  * Returns an action object used in adding new entities.
       
  1047  *
       
  1048  * @param {Array} entities  Entities received.
       
  1049  *
       
  1050  * @return {Object} Action object.
       
  1051  */
       
  1052 
       
  1053 function addEntities(entities) {
       
  1054   return {
       
  1055     type: 'ADD_ENTITIES',
       
  1056     entities: entities
       
  1057   };
       
  1058 }
       
  1059 /**
       
  1060  * Returns an action object used in signalling that entity records have been received.
       
  1061  *
       
  1062  * @param {string}       kind            Kind of the received entity.
       
  1063  * @param {string}       name            Name of the received entity.
       
  1064  * @param {Array|Object} records         Records received.
       
  1065  * @param {?Object}      query           Query Object.
       
  1066  * @param {?boolean}     invalidateCache Should invalidate query caches
       
  1067  *
       
  1068  * @return {Object} Action object.
       
  1069  */
       
  1070 
       
  1071 function receiveEntityRecords(kind, name, records, query) {
       
  1072   var invalidateCache = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
       
  1073   var action;
       
  1074 
       
  1075   if (query) {
       
  1076     action = receiveQueriedItems(records, query);
       
  1077   } else {
       
  1078     action = receiveItems(records);
       
  1079   }
       
  1080 
       
  1081   return Object(objectSpread["a" /* default */])({}, action, {
       
  1082     kind: kind,
       
  1083     name: name,
       
  1084     invalidateCache: invalidateCache
       
  1085   });
       
  1086 }
       
  1087 /**
       
  1088  * Returns an action object used in signalling that the index has been received.
       
  1089  *
       
  1090  * @param {Object} themeSupports Theme support for the current theme.
       
  1091  *
       
  1092  * @return {Object} Action object.
       
  1093  */
       
  1094 
       
  1095 function receiveThemeSupports(themeSupports) {
       
  1096   return {
       
  1097     type: 'RECEIVE_THEME_SUPPORTS',
       
  1098     themeSupports: themeSupports
       
  1099   };
       
  1100 }
       
  1101 /**
       
  1102  * Returns an action object used in signalling that the preview data for
       
  1103  * a given URl has been received.
       
  1104  *
       
  1105  * @param {string}  url      URL to preview the embed for.
       
  1106  * @param {Mixed}   preview  Preview data.
       
  1107  *
       
  1108  * @return {Object} Action object.
       
  1109  */
       
  1110 
       
  1111 function receiveEmbedPreview(url, preview) {
       
  1112   return {
       
  1113     type: 'RECEIVE_EMBED_PREVIEW',
       
  1114     url: url,
       
  1115     preview: preview
       
  1116   };
       
  1117 }
       
  1118 /**
       
  1119  * Action triggered to save an entity record.
       
  1120  *
       
  1121  * @param {string} kind    Kind of the received entity.
       
  1122  * @param {string} name    Name of the received entity.
       
  1123  * @param {Object} record  Record to be saved.
       
  1124  *
       
  1125  * @return {Object} Updated record.
       
  1126  */
       
  1127 
       
  1128 function saveEntityRecord(kind, name, record) {
       
  1129   var entities, entity, key, recordId, updatedRecord;
       
  1130   return regenerator_default.a.wrap(function saveEntityRecord$(_context) {
       
  1131     while (1) {
       
  1132       switch (_context.prev = _context.next) {
       
  1133         case 0:
       
  1134           _context.next = 2;
       
  1135           return getKindEntities(kind);
       
  1136 
       
  1137         case 2:
       
  1138           entities = _context.sent;
       
  1139           entity = Object(external_lodash_["find"])(entities, {
       
  1140             kind: kind,
       
  1141             name: name
       
  1142           });
       
  1143 
       
  1144           if (entity) {
       
  1145             _context.next = 6;
       
  1146             break;
       
  1147           }
       
  1148 
       
  1149           return _context.abrupt("return");
       
  1150 
       
  1151         case 6:
       
  1152           key = entity.key || DEFAULT_ENTITY_KEY;
       
  1153           recordId = record[key];
       
  1154           _context.next = 10;
       
  1155           return apiFetch({
       
  1156             path: "".concat(entity.baseURL).concat(recordId ? '/' + recordId : ''),
       
  1157             method: recordId ? 'PUT' : 'POST',
       
  1158             data: record
       
  1159           });
       
  1160 
       
  1161         case 10:
       
  1162           updatedRecord = _context.sent;
       
  1163           _context.next = 13;
       
  1164           return receiveEntityRecords(kind, name, updatedRecord, undefined, true);
       
  1165 
       
  1166         case 13:
       
  1167           return _context.abrupt("return", updatedRecord);
       
  1168 
       
  1169         case 14:
       
  1170         case "end":
       
  1171           return _context.stop();
       
  1172       }
       
  1173     }
       
  1174   }, _marked, this);
       
  1175 }
       
  1176 /**
       
  1177  * Returns an action object used in signalling that Upload permissions have been received.
       
  1178  *
       
  1179  * @param {boolean} hasUploadPermissions Does the user have permission to upload files?
       
  1180  *
       
  1181  * @return {Object} Action object.
       
  1182  */
       
  1183 
       
  1184 function receiveUploadPermissions(hasUploadPermissions) {
       
  1185   return {
       
  1186     type: 'RECEIVE_USER_PERMISSION',
       
  1187     key: 'create/media',
       
  1188     isAllowed: hasUploadPermissions
       
  1189   };
       
  1190 }
       
  1191 /**
       
  1192  * Returns an action object used in signalling that the current user has
       
  1193  * permission to perform an action on a REST resource.
       
  1194  *
       
  1195  * @param {string}  key       A key that represents the action and REST resource.
       
  1196  * @param {boolean} isAllowed Whether or not the user can perform the action.
       
  1197  *
       
  1198  * @return {Object} Action object.
       
  1199  */
       
  1200 
       
  1201 function receiveUserPermission(key, isAllowed) {
       
  1202   return {
       
  1203     type: 'RECEIVE_USER_PERMISSION',
       
  1204     key: key,
       
  1205     isAllowed: isAllowed
       
  1206   };
       
  1207 }
       
  1208 
       
  1209 // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/entities.js
       
  1210 
       
  1211 
       
  1212 var entities_marked =
       
  1213 /*#__PURE__*/
       
  1214 regenerator_default.a.mark(loadPostTypeEntities),
       
  1215     _marked2 =
       
  1216 /*#__PURE__*/
       
  1217 regenerator_default.a.mark(loadTaxonomyEntities),
       
  1218     _marked3 =
       
  1219 /*#__PURE__*/
       
  1220 regenerator_default.a.mark(getKindEntities);
       
  1221 
       
  1222 /**
       
  1223  * External dependencies
       
  1224  */
       
  1225 
       
  1226 /**
       
  1227  * Internal dependencies
       
  1228  */
       
  1229 
       
  1230 
       
  1231 
       
  1232 var DEFAULT_ENTITY_KEY = 'id';
       
  1233 var defaultEntities = [{
       
  1234   name: 'postType',
       
  1235   kind: 'root',
       
  1236   key: 'slug',
       
  1237   baseURL: '/wp/v2/types'
       
  1238 }, {
       
  1239   name: 'media',
       
  1240   kind: 'root',
       
  1241   baseURL: '/wp/v2/media',
       
  1242   plural: 'mediaItems'
       
  1243 }, {
       
  1244   name: 'taxonomy',
       
  1245   kind: 'root',
       
  1246   key: 'slug',
       
  1247   baseURL: '/wp/v2/taxonomies',
       
  1248   plural: 'taxonomies'
       
  1249 }];
       
  1250 var kinds = [{
       
  1251   name: 'postType',
       
  1252   loadEntities: loadPostTypeEntities
       
  1253 }, {
       
  1254   name: 'taxonomy',
       
  1255   loadEntities: loadTaxonomyEntities
       
  1256 }];
       
  1257 /**
       
  1258  * Returns the list of post type entities.
       
  1259  *
       
  1260  * @return {Promise} Entities promise
       
  1261  */
       
  1262 
       
  1263 function loadPostTypeEntities() {
       
  1264   var postTypes;
       
  1265   return regenerator_default.a.wrap(function loadPostTypeEntities$(_context) {
       
  1266     while (1) {
       
  1267       switch (_context.prev = _context.next) {
       
  1268         case 0:
       
  1269           _context.next = 2;
       
  1270           return apiFetch({
       
  1271             path: '/wp/v2/types?context=edit'
       
  1272           });
       
  1273 
       
  1274         case 2:
       
  1275           postTypes = _context.sent;
       
  1276           return _context.abrupt("return", Object(external_lodash_["map"])(postTypes, function (postType, name) {
       
  1277             return {
       
  1278               kind: 'postType',
       
  1279               baseURL: '/wp/v2/' + postType.rest_base,
       
  1280               name: name
       
  1281             };
       
  1282           }));
       
  1283 
       
  1284         case 4:
       
  1285         case "end":
       
  1286           return _context.stop();
       
  1287       }
       
  1288     }
       
  1289   }, entities_marked, this);
       
  1290 }
       
  1291 /**
       
  1292  * Returns the list of the taxonomies entities.
       
  1293  *
       
  1294  * @return {Promise} Entities promise
       
  1295  */
       
  1296 
       
  1297 
       
  1298 function loadTaxonomyEntities() {
       
  1299   var taxonomies;
       
  1300   return regenerator_default.a.wrap(function loadTaxonomyEntities$(_context2) {
       
  1301     while (1) {
       
  1302       switch (_context2.prev = _context2.next) {
       
  1303         case 0:
       
  1304           _context2.next = 2;
       
  1305           return apiFetch({
       
  1306             path: '/wp/v2/taxonomies?context=edit'
       
  1307           });
       
  1308 
       
  1309         case 2:
       
  1310           taxonomies = _context2.sent;
       
  1311           return _context2.abrupt("return", Object(external_lodash_["map"])(taxonomies, function (taxonomy, name) {
       
  1312             return {
       
  1313               kind: 'taxonomy',
       
  1314               baseURL: '/wp/v2/' + taxonomy.rest_base,
       
  1315               name: name
       
  1316             };
       
  1317           }));
       
  1318 
       
  1319         case 4:
       
  1320         case "end":
       
  1321           return _context2.stop();
       
  1322       }
       
  1323     }
       
  1324   }, _marked2, this);
       
  1325 }
       
  1326 /**
       
  1327  * Returns the entity's getter method name given its kind and name.
       
  1328  *
       
  1329  * @param {string}  kind      Entity kind.
       
  1330  * @param {string}  name      Entity name.
       
  1331  * @param {string}  prefix    Function prefix.
       
  1332  * @param {boolean} usePlural Whether to use the plural form or not.
       
  1333  *
       
  1334  * @return {string} Method name
       
  1335  */
       
  1336 
       
  1337 
       
  1338 var entities_getMethodName = function getMethodName(kind, name) {
       
  1339   var prefix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'get';
       
  1340   var usePlural = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
       
  1341   var entity = Object(external_lodash_["find"])(defaultEntities, {
       
  1342     kind: kind,
       
  1343     name: name
       
  1344   });
       
  1345   var kindPrefix = kind === 'root' ? '' : Object(external_lodash_["upperFirst"])(Object(external_lodash_["camelCase"])(kind));
       
  1346   var nameSuffix = Object(external_lodash_["upperFirst"])(Object(external_lodash_["camelCase"])(name)) + (usePlural ? 's' : '');
       
  1347   var suffix = usePlural && entity.plural ? Object(external_lodash_["upperFirst"])(Object(external_lodash_["camelCase"])(entity.plural)) : nameSuffix;
       
  1348   return "".concat(prefix).concat(kindPrefix).concat(suffix);
       
  1349 };
       
  1350 /**
       
  1351  * Loads the kind entities into the store.
       
  1352  *
       
  1353  * @param {string} kind  Kind
       
  1354  *
       
  1355  * @return {Array} Entities
       
  1356  */
       
  1357 
       
  1358 function getKindEntities(kind) {
       
  1359   var entities, kindConfig;
       
  1360   return regenerator_default.a.wrap(function getKindEntities$(_context3) {
       
  1361     while (1) {
       
  1362       switch (_context3.prev = _context3.next) {
       
  1363         case 0:
       
  1364           _context3.next = 2;
       
  1365           return controls_select('getEntitiesByKind', kind);
       
  1366 
       
  1367         case 2:
       
  1368           entities = _context3.sent;
       
  1369 
       
  1370           if (!(entities && entities.length !== 0)) {
       
  1371             _context3.next = 5;
       
  1372             break;
       
  1373           }
       
  1374 
       
  1375           return _context3.abrupt("return", entities);
       
  1376 
       
  1377         case 5:
       
  1378           kindConfig = Object(external_lodash_["find"])(kinds, {
       
  1379             name: kind
       
  1380           });
       
  1381 
       
  1382           if (kindConfig) {
       
  1383             _context3.next = 8;
       
  1384             break;
       
  1385           }
       
  1386 
       
  1387           return _context3.abrupt("return", []);
       
  1388 
       
  1389         case 8:
       
  1390           _context3.next = 10;
       
  1391           return kindConfig.loadEntities();
       
  1392 
       
  1393         case 10:
       
  1394           entities = _context3.sent;
       
  1395           _context3.next = 13;
       
  1396           return addEntities(entities);
       
  1397 
       
  1398         case 13:
       
  1399           return _context3.abrupt("return", entities);
       
  1400 
       
  1401         case 14:
       
  1402         case "end":
       
  1403           return _context3.stop();
       
  1404       }
       
  1405     }
       
  1406   }, _marked3, this);
       
  1407 }
       
  1408 
       
  1409 // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/queried-data/reducer.js
       
  1410 
       
  1411 
       
  1412 /**
       
  1413  * External dependencies
       
  1414  */
  2416  */
  1415 
  2417 
  1416 
  2418 
  1417 /**
  2419 /**
  1418  * Internal dependencies
  2420  * Internal dependencies
  1432  *
  2434  *
  1433  * @return {number[]} Merged array of item IDs.
  2435  * @return {number[]} Merged array of item IDs.
  1434  */
  2436  */
  1435 
  2437 
  1436 function getMergedItemIds(itemIds, nextItemIds, page, perPage) {
  2438 function getMergedItemIds(itemIds, nextItemIds, page, perPage) {
       
  2439   var receivedAllIds = page === 1 && perPage === -1;
       
  2440 
       
  2441   if (receivedAllIds) {
       
  2442     return nextItemIds;
       
  2443   }
       
  2444 
  1437   var nextItemIdsStartIndex = (page - 1) * perPage; // If later page has already been received, default to the larger known
  2445   var nextItemIdsStartIndex = (page - 1) * perPage; // If later page has already been received, default to the larger known
  1438   // size of the existing array, else calculate as extending the existing.
  2446   // size of the existing array, else calculate as extending the existing.
  1439 
  2447 
  1440   var size = Math.max(itemIds.length, nextItemIdsStartIndex + nextItemIds.length); // Preallocate array since size is known.
  2448   var size = Math.max(itemIds.length, nextItemIdsStartIndex + nextItemIds.length); // Preallocate array since size is known.
  1441 
  2449 
  1463   var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  2471   var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1464   var action = arguments.length > 1 ? arguments[1] : undefined;
  2472   var action = arguments.length > 1 ? arguments[1] : undefined;
  1465 
  2473 
  1466   switch (action.type) {
  2474   switch (action.type) {
  1467     case 'RECEIVE_ITEMS':
  2475     case 'RECEIVE_ITEMS':
  1468       return Object(objectSpread["a" /* default */])({}, state, Object(external_lodash_["keyBy"])(action.items, action.key || DEFAULT_ENTITY_KEY));
  2476       var key = action.key || DEFAULT_ENTITY_KEY;
       
  2477       return reducer_objectSpread({}, state, {}, action.items.reduce(function (accumulator, value) {
       
  2478         var itemId = value[key];
       
  2479         accumulator[itemId] = conservativeMapItem(state[itemId], value);
       
  2480         return accumulator;
       
  2481       }, {}));
  1469   }
  2482   }
  1470 
  2483 
  1471   return state;
  2484   return state;
  1472 }
  2485 }
  1473 /**
  2486 /**
  1479  *
  2492  *
  1480  * @return {Object} Next state.
  2493  * @return {Object} Next state.
  1481  */
  2494  */
  1482 
  2495 
  1483 
  2496 
  1484 var queries = Object(external_lodash_["flowRight"])([// Limit to matching action type so we don't attempt to replace action on
  2497 var queries = Object(external_this_lodash_["flowRight"])([// Limit to matching action type so we don't attempt to replace action on
  1485 // an unhandled action.
  2498 // an unhandled action.
  1486 if_matching_action(function (action) {
  2499 if_matching_action(function (action) {
  1487   return 'query' in action;
  2500   return 'query' in action;
  1488 }), // Inject query parts into action for use both in `onSubKey` and reducer.
  2501 }), // Inject query parts into action for use both in `onSubKey` and reducer.
  1489 replace_action(function (action) {
  2502 replace_action(function (action) {
  1490   // `ifMatchingAction` still passes on initialization, where state is
  2503   // `ifMatchingAction` still passes on initialization, where state is
  1491   // undefined and a query is not assigned. Avoid attempting to parse
  2504   // undefined and a query is not assigned. Avoid attempting to parse
  1492   // parts. `onSubKey` will omit by lack of `stableKey`.
  2505   // parts. `onSubKey` will omit by lack of `stableKey`.
  1493   if (action.query) {
  2506   if (action.query) {
  1494     return Object(objectSpread["a" /* default */])({}, action, get_query_parts(action.query));
  2507     return reducer_objectSpread({}, action, {}, get_query_parts(action.query));
  1495   }
  2508   }
  1496 
  2509 
  1497   return action;
  2510   return action;
  1498 }), // Queries shape is shared, but keyed by query `stableKey` part. Original
  2511 }), // Queries shape is shared, but keyed by query `stableKey` part. Original
  1499 // reducer tracks only a single query object.
  2512 // reducer tracks only a single query object.
  1508 
  2521 
  1509   if (type !== 'RECEIVE_ITEMS') {
  2522   if (type !== 'RECEIVE_ITEMS') {
  1510     return state;
  2523     return state;
  1511   }
  2524   }
  1512 
  2525 
  1513   return getMergedItemIds(state || [], Object(external_lodash_["map"])(action.items, key), page, perPage);
  2526   return getMergedItemIds(state || [], Object(external_this_lodash_["map"])(action.items, key), page, perPage);
  1514 });
  2527 });
  1515 /* harmony default export */ var queried_data_reducer = (Object(redux["b" /* combineReducers */])({
  2528 /* harmony default export */ var queried_data_reducer = (Object(external_this_wp_data_["combineReducers"])({
  1516   items: reducer_items,
  2529   items: reducer_items,
  1517   queries: queries
  2530   queries: queries
  1518 }));
  2531 }));
  1519 
  2532 
  1520 // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/queried-data/index.js
       
  1521 
       
  1522 
       
  1523 
       
  1524 
       
  1525 // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/reducer.js
  2533 // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/reducer.js
  1526 
  2534 
  1527 
  2535 
  1528 
  2536 
  1529 
  2537 
       
  2538 function _createForOfIteratorHelper(o) { if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) { var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var it, normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
       
  2539 
       
  2540 function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
       
  2541 
       
  2542 function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
       
  2543 
       
  2544 function build_module_reducer_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
       
  2545 
       
  2546 function build_module_reducer_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { build_module_reducer_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { build_module_reducer_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
  1530 
  2547 
  1531 /**
  2548 /**
  1532  * External dependencies
  2549  * External dependencies
  1533  */
  2550  */
  1534 
  2551 
  1535 /**
  2552 /**
  1536  * WordPress dependencies
  2553  * WordPress dependencies
  1537  */
  2554  */
       
  2555 
  1538 
  2556 
  1539 
  2557 
  1540 /**
  2558 /**
  1541  * Internal dependencies
  2559  * Internal dependencies
  1542  */
  2560  */
  1560   var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  2578   var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1561   var action = arguments.length > 1 ? arguments[1] : undefined;
  2579   var action = arguments.length > 1 ? arguments[1] : undefined;
  1562 
  2580 
  1563   switch (action.type) {
  2581   switch (action.type) {
  1564     case 'RECEIVE_TERMS':
  2582     case 'RECEIVE_TERMS':
  1565       return Object(objectSpread["a" /* default */])({}, state, Object(defineProperty["a" /* default */])({}, action.taxonomy, action.terms));
  2583       return build_module_reducer_objectSpread({}, state, Object(defineProperty["a" /* default */])({}, action.taxonomy, action.terms));
  1566   }
  2584   }
  1567 
  2585 
  1568   return state;
  2586   return state;
  1569 }
  2587 }
  1570 /**
  2588 /**
  1584   var action = arguments.length > 1 ? arguments[1] : undefined;
  2602   var action = arguments.length > 1 ? arguments[1] : undefined;
  1585 
  2603 
  1586   switch (action.type) {
  2604   switch (action.type) {
  1587     case 'RECEIVE_USER_QUERY':
  2605     case 'RECEIVE_USER_QUERY':
  1588       return {
  2606       return {
  1589         byId: Object(objectSpread["a" /* default */])({}, state.byId, Object(external_lodash_["keyBy"])(action.users, 'id')),
  2607         byId: build_module_reducer_objectSpread({}, state.byId, {}, Object(external_this_lodash_["keyBy"])(action.users, 'id')),
  1590         queries: Object(objectSpread["a" /* default */])({}, state.queries, Object(defineProperty["a" /* default */])({}, action.queryID, Object(external_lodash_["map"])(action.users, function (user) {
  2608         queries: build_module_reducer_objectSpread({}, state.queries, Object(defineProperty["a" /* default */])({}, action.queryID, Object(external_this_lodash_["map"])(action.users, function (user) {
  1591           return user.id;
  2609           return user.id;
  1592         })))
  2610         })))
  1593       };
  2611       };
  1594   }
  2612   }
  1595 
  2613 
  1596   return state;
  2614   return state;
  1597 }
  2615 }
  1598 /**
  2616 /**
       
  2617  * Reducer managing current user state.
       
  2618  *
       
  2619  * @param {Object} state  Current state.
       
  2620  * @param {Object} action Dispatched action.
       
  2621  *
       
  2622  * @return {Object} Updated state.
       
  2623  */
       
  2624 
       
  2625 function reducer_currentUser() {
       
  2626   var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
       
  2627   var action = arguments.length > 1 ? arguments[1] : undefined;
       
  2628 
       
  2629   switch (action.type) {
       
  2630     case 'RECEIVE_CURRENT_USER':
       
  2631       return action.currentUser;
       
  2632   }
       
  2633 
       
  2634   return state;
       
  2635 }
       
  2636 /**
  1599  * Reducer managing taxonomies.
  2637  * Reducer managing taxonomies.
  1600  *
  2638  *
  1601  * @param {Object} state  Current state.
  2639  * @param {Object} state  Current state.
  1602  * @param {Object} action Dispatched action.
  2640  * @param {Object} action Dispatched action.
  1603  *
  2641  *
  1614   }
  2652   }
  1615 
  2653 
  1616   return state;
  2654   return state;
  1617 }
  2655 }
  1618 /**
  2656 /**
       
  2657  * Reducer managing the current theme.
       
  2658  *
       
  2659  * @param {string} state  Current state.
       
  2660  * @param {Object} action Dispatched action.
       
  2661  *
       
  2662  * @return {string} Updated state.
       
  2663  */
       
  2664 
       
  2665 function currentTheme() {
       
  2666   var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;
       
  2667   var action = arguments.length > 1 ? arguments[1] : undefined;
       
  2668 
       
  2669   switch (action.type) {
       
  2670     case 'RECEIVE_CURRENT_THEME':
       
  2671       return action.currentTheme.stylesheet;
       
  2672   }
       
  2673 
       
  2674   return state;
       
  2675 }
       
  2676 /**
       
  2677  * Reducer managing installed themes.
       
  2678  *
       
  2679  * @param {Object} state  Current state.
       
  2680  * @param {Object} action Dispatched action.
       
  2681  *
       
  2682  * @return {Object} Updated state.
       
  2683  */
       
  2684 
       
  2685 function themes() {
       
  2686   var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
       
  2687   var action = arguments.length > 1 ? arguments[1] : undefined;
       
  2688 
       
  2689   switch (action.type) {
       
  2690     case 'RECEIVE_CURRENT_THEME':
       
  2691       return build_module_reducer_objectSpread({}, state, Object(defineProperty["a" /* default */])({}, action.currentTheme.stylesheet, action.currentTheme));
       
  2692   }
       
  2693 
       
  2694   return state;
       
  2695 }
       
  2696 /**
  1619  * Reducer managing theme supports data.
  2697  * Reducer managing theme supports data.
  1620  *
  2698  *
  1621  * @param {Object} state  Current state.
  2699  * @param {Object} state  Current state.
  1622  * @param {Object} action Dispatched action.
  2700  * @param {Object} action Dispatched action.
  1623  *
  2701  *
  1628   var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  2706   var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1629   var action = arguments.length > 1 ? arguments[1] : undefined;
  2707   var action = arguments.length > 1 ? arguments[1] : undefined;
  1630 
  2708 
  1631   switch (action.type) {
  2709   switch (action.type) {
  1632     case 'RECEIVE_THEME_SUPPORTS':
  2710     case 'RECEIVE_THEME_SUPPORTS':
  1633       return Object(objectSpread["a" /* default */])({}, state, action.themeSupports);
  2711       return build_module_reducer_objectSpread({}, state, {}, action.themeSupports);
  1634   }
  2712   }
  1635 
  2713 
  1636   return state;
  2714   return state;
  1637 }
  2715 }
  1638 /**
  2716 /**
  1639  * Higher Order Reducer for a given entity config. It supports:
  2717  * Higher Order Reducer for a given entity config. It supports:
  1640  *
  2718  *
  1641  *  - Fetching a record by primary key
  2719  *  - Fetching
       
  2720  *  - Editing
       
  2721  *  - Saving
  1642  *
  2722  *
  1643  * @param {Object} entityConfig  Entity config.
  2723  * @param {Object} entityConfig  Entity config.
  1644  *
  2724  *
  1645  * @return {Function} Reducer.
  2725  * @return {Function} Reducer.
  1646  */
  2726  */
  1647 
  2727 
  1648 function reducer_entity(entityConfig) {
  2728 function reducer_entity(entityConfig) {
  1649   return Object(external_lodash_["flowRight"])([// Limit to matching action type so we don't attempt to replace action on
  2729   return Object(external_this_lodash_["flowRight"])([// Limit to matching action type so we don't attempt to replace action on
  1650   // an unhandled action.
  2730   // an unhandled action.
  1651   if_matching_action(function (action) {
  2731   if_matching_action(function (action) {
  1652     return action.name && action.kind && action.name === entityConfig.name && action.kind === entityConfig.kind;
  2732     return action.name && action.kind && action.name === entityConfig.name && action.kind === entityConfig.kind;
  1653   }), // Inject the entity config into the action.
  2733   }), // Inject the entity config into the action.
  1654   replace_action(function (action) {
  2734   replace_action(function (action) {
  1655     return Object(objectSpread["a" /* default */])({}, action, {
  2735     return build_module_reducer_objectSpread({}, action, {
  1656       key: entityConfig.key || DEFAULT_ENTITY_KEY
  2736       key: entityConfig.key || DEFAULT_ENTITY_KEY
  1657     });
  2737     });
  1658   })])(queried_data_reducer);
  2738   })])(Object(external_this_wp_data_["combineReducers"])({
       
  2739     queriedData: queried_data_reducer,
       
  2740     edits: function edits() {
       
  2741       var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
       
  2742       var action = arguments.length > 1 ? arguments[1] : undefined;
       
  2743 
       
  2744       switch (action.type) {
       
  2745         case 'RECEIVE_ITEMS':
       
  2746           var nextState = build_module_reducer_objectSpread({}, state);
       
  2747 
       
  2748           var _iterator = _createForOfIteratorHelper(action.items),
       
  2749               _step;
       
  2750 
       
  2751           try {
       
  2752             var _loop = function _loop() {
       
  2753               var record = _step.value;
       
  2754               var recordId = record[action.key];
       
  2755               var edits = nextState[recordId];
       
  2756 
       
  2757               if (!edits) {
       
  2758                 return "continue";
       
  2759               }
       
  2760 
       
  2761               var nextEdits = Object.keys(edits).reduce(function (acc, key) {
       
  2762                 // If the edited value is still different to the persisted value,
       
  2763                 // keep the edited value in edits.
       
  2764                 if ( // Edits are the "raw" attribute values, but records may have
       
  2765                 // objects with more properties, so we use `get` here for the
       
  2766                 // comparison.
       
  2767                 !Object(external_this_lodash_["isEqual"])(edits[key], Object(external_this_lodash_["get"])(record[key], 'raw', record[key]))) {
       
  2768                   acc[key] = edits[key];
       
  2769                 }
       
  2770 
       
  2771                 return acc;
       
  2772               }, {});
       
  2773 
       
  2774               if (Object.keys(nextEdits).length) {
       
  2775                 nextState[recordId] = nextEdits;
       
  2776               } else {
       
  2777                 delete nextState[recordId];
       
  2778               }
       
  2779             };
       
  2780 
       
  2781             for (_iterator.s(); !(_step = _iterator.n()).done;) {
       
  2782               var _ret = _loop();
       
  2783 
       
  2784               if (_ret === "continue") continue;
       
  2785             }
       
  2786           } catch (err) {
       
  2787             _iterator.e(err);
       
  2788           } finally {
       
  2789             _iterator.f();
       
  2790           }
       
  2791 
       
  2792           return nextState;
       
  2793 
       
  2794         case 'EDIT_ENTITY_RECORD':
       
  2795           var nextEdits = build_module_reducer_objectSpread({}, state[action.recordId], {}, action.edits);
       
  2796 
       
  2797           Object.keys(nextEdits).forEach(function (key) {
       
  2798             // Delete cleared edits so that the properties
       
  2799             // are not considered dirty.
       
  2800             if (nextEdits[key] === undefined) {
       
  2801               delete nextEdits[key];
       
  2802             }
       
  2803           });
       
  2804           return build_module_reducer_objectSpread({}, state, Object(defineProperty["a" /* default */])({}, action.recordId, nextEdits));
       
  2805       }
       
  2806 
       
  2807       return state;
       
  2808     },
       
  2809     saving: function saving() {
       
  2810       var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
       
  2811       var action = arguments.length > 1 ? arguments[1] : undefined;
       
  2812 
       
  2813       switch (action.type) {
       
  2814         case 'SAVE_ENTITY_RECORD_START':
       
  2815         case 'SAVE_ENTITY_RECORD_FINISH':
       
  2816           return build_module_reducer_objectSpread({}, state, Object(defineProperty["a" /* default */])({}, action.recordId, {
       
  2817             pending: action.type === 'SAVE_ENTITY_RECORD_START',
       
  2818             error: action.error,
       
  2819             isAutosave: action.isAutosave
       
  2820           }));
       
  2821       }
       
  2822 
       
  2823       return state;
       
  2824     }
       
  2825   }));
  1659 }
  2826 }
  1660 /**
  2827 /**
  1661  * Reducer keeping track of the registered entities.
  2828  * Reducer keeping track of the registered entities.
  1662  *
  2829  *
  1663  * @param {Object} state  Current state.
  2830  * @param {Object} state  Current state.
  1693   var newConfig = entitiesConfig(state.config, action); // Generates a dynamic reducer for the entities
  2860   var newConfig = entitiesConfig(state.config, action); // Generates a dynamic reducer for the entities
  1694 
  2861 
  1695   var entitiesDataReducer = state.reducer;
  2862   var entitiesDataReducer = state.reducer;
  1696 
  2863 
  1697   if (!entitiesDataReducer || newConfig !== state.config) {
  2864   if (!entitiesDataReducer || newConfig !== state.config) {
  1698     var entitiesByKind = Object(external_lodash_["groupBy"])(newConfig, 'kind');
  2865     var entitiesByKind = Object(external_this_lodash_["groupBy"])(newConfig, 'kind');
  1699     entitiesDataReducer = Object(external_this_wp_data_["combineReducers"])(Object.entries(entitiesByKind).reduce(function (memo, _ref) {
  2866     entitiesDataReducer = Object(external_this_wp_data_["combineReducers"])(Object.entries(entitiesByKind).reduce(function (memo, _ref) {
  1700       var _ref2 = Object(slicedToArray["a" /* default */])(_ref, 2),
  2867       var _ref2 = Object(slicedToArray["a" /* default */])(_ref, 2),
  1701           kind = _ref2[0],
  2868           kind = _ref2[0],
  1702           subEntities = _ref2[1];
  2869           subEntities = _ref2[1];
  1703 
  2870 
  1704       var kindReducer = Object(external_this_wp_data_["combineReducers"])(subEntities.reduce(function (kindMemo, entityConfig) {
  2871       var kindReducer = Object(external_this_wp_data_["combineReducers"])(subEntities.reduce(function (kindMemo, entityConfig) {
  1705         return Object(objectSpread["a" /* default */])({}, kindMemo, Object(defineProperty["a" /* default */])({}, entityConfig.name, reducer_entity(entityConfig)));
  2872         return build_module_reducer_objectSpread({}, kindMemo, Object(defineProperty["a" /* default */])({}, entityConfig.name, reducer_entity(entityConfig)));
  1706       }, {}));
  2873       }, {}));
  1707       memo[kind] = kindReducer;
  2874       memo[kind] = kindReducer;
  1708       return memo;
  2875       return memo;
  1709     }, {}));
  2876     }, {}));
  1710   }
  2877   }
  1720     data: newData,
  2887     data: newData,
  1721     config: newConfig
  2888     config: newConfig
  1722   };
  2889   };
  1723 };
  2890 };
  1724 /**
  2891 /**
       
  2892  * Reducer keeping track of entity edit undo history.
       
  2893  *
       
  2894  * @param {Object} state  Current state.
       
  2895  * @param {Object} action Dispatched action.
       
  2896  *
       
  2897  * @return {Object} Updated state.
       
  2898  */
       
  2899 
       
  2900 var UNDO_INITIAL_STATE = [];
       
  2901 UNDO_INITIAL_STATE.offset = 0;
       
  2902 var lastEditAction;
       
  2903 function reducer_undo() {
       
  2904   var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : UNDO_INITIAL_STATE;
       
  2905   var action = arguments.length > 1 ? arguments[1] : undefined;
       
  2906 
       
  2907   switch (action.type) {
       
  2908     case 'EDIT_ENTITY_RECORD':
       
  2909     case 'CREATE_UNDO_LEVEL':
       
  2910       var isCreateUndoLevel = action.type === 'CREATE_UNDO_LEVEL';
       
  2911       var isUndoOrRedo = !isCreateUndoLevel && (action.meta.isUndo || action.meta.isRedo);
       
  2912 
       
  2913       if (isCreateUndoLevel) {
       
  2914         action = lastEditAction;
       
  2915       } else if (!isUndoOrRedo) {
       
  2916         // Don't lose the last edit cache if the new one only has transient edits.
       
  2917         // Transient edits don't create new levels so updating the cache would make
       
  2918         // us skip an edit later when creating levels explicitly.
       
  2919         if (Object.keys(action.edits).some(function (key) {
       
  2920           return !action.transientEdits[key];
       
  2921         })) {
       
  2922           lastEditAction = action;
       
  2923         } else {
       
  2924           lastEditAction = build_module_reducer_objectSpread({}, action, {
       
  2925             edits: build_module_reducer_objectSpread({}, lastEditAction && lastEditAction.edits, {}, action.edits)
       
  2926           });
       
  2927         }
       
  2928       }
       
  2929 
       
  2930       var nextState;
       
  2931 
       
  2932       if (isUndoOrRedo) {
       
  2933         nextState = Object(toConsumableArray["a" /* default */])(state);
       
  2934         nextState.offset = state.offset + (action.meta.isUndo ? -1 : 1);
       
  2935 
       
  2936         if (state.flattenedUndo) {
       
  2937           // The first undo in a sequence of undos might happen while we have
       
  2938           // flattened undos in state. If this is the case, we want execution
       
  2939           // to continue as if we were creating an explicit undo level. This
       
  2940           // will result in an extra undo level being appended with the flattened
       
  2941           // undo values.
       
  2942           isCreateUndoLevel = true;
       
  2943           action = lastEditAction;
       
  2944         } else {
       
  2945           return nextState;
       
  2946         }
       
  2947       }
       
  2948 
       
  2949       if (!action.meta.undo) {
       
  2950         return state;
       
  2951       } // Transient edits don't create an undo level, but are
       
  2952       // reachable in the next meaningful edit to which they
       
  2953       // are merged. They are defined in the entity's config.
       
  2954 
       
  2955 
       
  2956       if (!isCreateUndoLevel && !Object.keys(action.edits).some(function (key) {
       
  2957         return !action.transientEdits[key];
       
  2958       })) {
       
  2959         nextState = Object(toConsumableArray["a" /* default */])(state);
       
  2960         nextState.flattenedUndo = build_module_reducer_objectSpread({}, state.flattenedUndo, {}, action.edits);
       
  2961         nextState.offset = state.offset;
       
  2962         return nextState;
       
  2963       } // Clear potential redos, because this only supports linear history.
       
  2964 
       
  2965 
       
  2966       nextState = nextState || state.slice(0, state.offset || undefined);
       
  2967       nextState.offset = nextState.offset || 0;
       
  2968       nextState.pop();
       
  2969 
       
  2970       if (!isCreateUndoLevel) {
       
  2971         nextState.push({
       
  2972           kind: action.meta.undo.kind,
       
  2973           name: action.meta.undo.name,
       
  2974           recordId: action.meta.undo.recordId,
       
  2975           edits: build_module_reducer_objectSpread({}, state.flattenedUndo, {}, action.meta.undo.edits)
       
  2976         });
       
  2977       } // When an edit is a function it's an optimization to avoid running some expensive operation.
       
  2978       // We can't rely on the function references being the same so we opt out of comparing them here.
       
  2979 
       
  2980 
       
  2981       var comparisonUndoEdits = Object.values(action.meta.undo.edits).filter(function (edit) {
       
  2982         return typeof edit !== 'function';
       
  2983       });
       
  2984       var comparisonEdits = Object.values(action.edits).filter(function (edit) {
       
  2985         return typeof edit !== 'function';
       
  2986       });
       
  2987 
       
  2988       if (!external_this_wp_isShallowEqual_default()(comparisonUndoEdits, comparisonEdits)) {
       
  2989         nextState.push({
       
  2990           kind: action.kind,
       
  2991           name: action.name,
       
  2992           recordId: action.recordId,
       
  2993           edits: isCreateUndoLevel ? build_module_reducer_objectSpread({}, state.flattenedUndo, {}, action.edits) : action.edits
       
  2994         });
       
  2995       }
       
  2996 
       
  2997       return nextState;
       
  2998   }
       
  2999 
       
  3000   return state;
       
  3001 }
       
  3002 /**
  1725  * Reducer managing embed preview data.
  3003  * Reducer managing embed preview data.
  1726  *
  3004  *
  1727  * @param {Object} state  Current state.
  3005  * @param {Object} state  Current state.
  1728  * @param {Object} action Dispatched action.
  3006  * @param {Object} action Dispatched action.
  1729  *
  3007  *
  1736 
  3014 
  1737   switch (action.type) {
  3015   switch (action.type) {
  1738     case 'RECEIVE_EMBED_PREVIEW':
  3016     case 'RECEIVE_EMBED_PREVIEW':
  1739       var url = action.url,
  3017       var url = action.url,
  1740           preview = action.preview;
  3018           preview = action.preview;
  1741       return Object(objectSpread["a" /* default */])({}, state, Object(defineProperty["a" /* default */])({}, url, preview));
  3019       return build_module_reducer_objectSpread({}, state, Object(defineProperty["a" /* default */])({}, url, preview));
  1742   }
  3020   }
  1743 
  3021 
  1744   return state;
  3022   return state;
  1745 }
  3023 }
  1746 /**
  3024 /**
  1757   var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  3035   var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1758   var action = arguments.length > 1 ? arguments[1] : undefined;
  3036   var action = arguments.length > 1 ? arguments[1] : undefined;
  1759 
  3037 
  1760   switch (action.type) {
  3038   switch (action.type) {
  1761     case 'RECEIVE_USER_PERMISSION':
  3039     case 'RECEIVE_USER_PERMISSION':
  1762       return Object(objectSpread["a" /* default */])({}, state, Object(defineProperty["a" /* default */])({}, action.key, action.isAllowed));
  3040       return build_module_reducer_objectSpread({}, state, Object(defineProperty["a" /* default */])({}, action.key, action.isAllowed));
       
  3041   }
       
  3042 
       
  3043   return state;
       
  3044 }
       
  3045 /**
       
  3046  * Reducer returning autosaves keyed by their parent's post id.
       
  3047  *
       
  3048  * @param  {Object} state  Current state.
       
  3049  * @param  {Object} action Dispatched action.
       
  3050  *
       
  3051  * @return {Object} Updated state.
       
  3052  */
       
  3053 
       
  3054 function reducer_autosaves() {
       
  3055   var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
       
  3056   var action = arguments.length > 1 ? arguments[1] : undefined;
       
  3057 
       
  3058   switch (action.type) {
       
  3059     case 'RECEIVE_AUTOSAVES':
       
  3060       var postId = action.postId,
       
  3061           autosavesData = action.autosaves;
       
  3062       return build_module_reducer_objectSpread({}, state, Object(defineProperty["a" /* default */])({}, postId, autosavesData));
  1763   }
  3063   }
  1764 
  3064 
  1765   return state;
  3065   return state;
  1766 }
  3066 }
  1767 /* harmony default export */ var build_module_reducer = (Object(external_this_wp_data_["combineReducers"])({
  3067 /* harmony default export */ var build_module_reducer = (Object(external_this_wp_data_["combineReducers"])({
  1768   terms: terms,
  3068   terms: terms,
  1769   users: reducer_users,
  3069   users: reducer_users,
       
  3070   currentTheme: currentTheme,
       
  3071   currentUser: reducer_currentUser,
  1770   taxonomies: reducer_taxonomies,
  3072   taxonomies: reducer_taxonomies,
       
  3073   themes: themes,
  1771   themeSupports: themeSupports,
  3074   themeSupports: themeSupports,
  1772   entities: reducer_entities,
  3075   entities: reducer_entities,
       
  3076   undo: reducer_undo,
  1773   embedPreviews: embedPreviews,
  3077   embedPreviews: embedPreviews,
  1774   userPermissions: userPermissions
  3078   userPermissions: userPermissions,
       
  3079   autosaves: reducer_autosaves
  1775 }));
  3080 }));
  1776 
  3081 
       
  3082 // EXTERNAL MODULE: ./node_modules/rememo/es/rememo.js
       
  3083 var rememo = __webpack_require__(42);
       
  3084 
  1777 // EXTERNAL MODULE: external {"this":["wp","deprecated"]}
  3085 // EXTERNAL MODULE: external {"this":["wp","deprecated"]}
  1778 var external_this_wp_deprecated_ = __webpack_require__(49);
  3086 var external_this_wp_deprecated_ = __webpack_require__(37);
  1779 var external_this_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_deprecated_);
  3087 var external_this_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_deprecated_);
  1780 
  3088 
  1781 // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/name.js
  3089 // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/name.js
  1782 /**
  3090 /**
  1783  * The reducer key used by core data in store registration.
  3091  * The reducer key used by core data in store registration.
  1785  *
  3093  *
  1786  * @type {string}
  3094  * @type {string}
  1787  */
  3095  */
  1788 var REDUCER_KEY = 'core';
  3096 var REDUCER_KEY = 'core';
  1789 
  3097 
       
  3098 // EXTERNAL MODULE: ./node_modules/equivalent-key-map/equivalent-key-map.js
       
  3099 var equivalent_key_map = __webpack_require__(126);
       
  3100 var equivalent_key_map_default = /*#__PURE__*/__webpack_require__.n(equivalent_key_map);
       
  3101 
       
  3102 // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/queried-data/selectors.js
       
  3103 /**
       
  3104  * External dependencies
       
  3105  */
       
  3106 
       
  3107 
       
  3108 /**
       
  3109  * Internal dependencies
       
  3110  */
       
  3111 
       
  3112 
       
  3113 /**
       
  3114  * Cache of state keys to EquivalentKeyMap where the inner map tracks queries
       
  3115  * to their resulting items set. WeakMap allows garbage collection on expired
       
  3116  * state references.
       
  3117  *
       
  3118  * @type {WeakMap<Object,EquivalentKeyMap>}
       
  3119  */
       
  3120 
       
  3121 var queriedItemsCacheByState = new WeakMap();
       
  3122 /**
       
  3123  * Returns items for a given query, or null if the items are not known.
       
  3124  *
       
  3125  * @param {Object}  state State object.
       
  3126  * @param {?Object} query Optional query.
       
  3127  *
       
  3128  * @return {?Array} Query items.
       
  3129  */
       
  3130 
       
  3131 function getQueriedItemsUncached(state, query) {
       
  3132   var _getQueryParts = get_query_parts(query),
       
  3133       stableKey = _getQueryParts.stableKey,
       
  3134       page = _getQueryParts.page,
       
  3135       perPage = _getQueryParts.perPage;
       
  3136 
       
  3137   if (!state.queries[stableKey]) {
       
  3138     return null;
       
  3139   }
       
  3140 
       
  3141   var itemIds = state.queries[stableKey];
       
  3142 
       
  3143   if (!itemIds) {
       
  3144     return null;
       
  3145   }
       
  3146 
       
  3147   var startOffset = perPage === -1 ? 0 : (page - 1) * perPage;
       
  3148   var endOffset = perPage === -1 ? itemIds.length : Math.min(startOffset + perPage, itemIds.length);
       
  3149   var items = [];
       
  3150 
       
  3151   for (var i = startOffset; i < endOffset; i++) {
       
  3152     var itemId = itemIds[i];
       
  3153     items.push(state.items[itemId]);
       
  3154   }
       
  3155 
       
  3156   return items;
       
  3157 }
       
  3158 /**
       
  3159  * Returns items for a given query, or null if the items are not known. Caches
       
  3160  * result both per state (by reference) and per query (by deep equality).
       
  3161  * The caching approach is intended to be durable to query objects which are
       
  3162  * deeply but not referentially equal, since otherwise:
       
  3163  *
       
  3164  * `getQueriedItems( state, {} ) !== getQueriedItems( state, {} )`
       
  3165  *
       
  3166  * @param {Object}  state State object.
       
  3167  * @param {?Object} query Optional query.
       
  3168  *
       
  3169  * @return {?Array} Query items.
       
  3170  */
       
  3171 
       
  3172 
       
  3173 var getQueriedItems = Object(rememo["a" /* default */])(function (state) {
       
  3174   var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
       
  3175   var queriedItemsCache = queriedItemsCacheByState.get(state);
       
  3176 
       
  3177   if (queriedItemsCache) {
       
  3178     var queriedItems = queriedItemsCache.get(query);
       
  3179 
       
  3180     if (queriedItems !== undefined) {
       
  3181       return queriedItems;
       
  3182     }
       
  3183   } else {
       
  3184     queriedItemsCache = new equivalent_key_map_default.a();
       
  3185     queriedItemsCacheByState.set(state, queriedItemsCache);
       
  3186   }
       
  3187 
       
  3188   var items = getQueriedItemsUncached(state, query);
       
  3189   queriedItemsCache.set(query, items);
       
  3190   return items;
       
  3191 });
       
  3192 
  1790 // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/selectors.js
  3193 // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/selectors.js
       
  3194 
       
  3195 
       
  3196 function selectors_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
       
  3197 
       
  3198 function selectors_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { selectors_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { selectors_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
  3199 
  1791 /**
  3200 /**
  1792  * External dependencies
  3201  * External dependencies
  1793  */
  3202  */
  1794 
  3203 
  1795 
  3204 
  1800 
  3209 
  1801 
  3210 
  1802 /**
  3211 /**
  1803  * Internal dependencies
  3212  * Internal dependencies
  1804  */
  3213  */
       
  3214 
  1805 
  3215 
  1806 
  3216 
  1807 
  3217 
  1808 /**
  3218 /**
  1809  * Returns true if a request is in progress for embed preview data, or false
  3219  * Returns true if a request is in progress for embed preview data, or false
  1830 
  3240 
  1831 function getAuthors(state) {
  3241 function getAuthors(state) {
  1832   return getUserQueryResults(state, 'authors');
  3242   return getUserQueryResults(state, 'authors');
  1833 }
  3243 }
  1834 /**
  3244 /**
       
  3245  * Returns the current user.
       
  3246  *
       
  3247  * @param {Object} state Data state.
       
  3248  *
       
  3249  * @return {Object} Current user object.
       
  3250  */
       
  3251 
       
  3252 function getCurrentUser(state) {
       
  3253   return state.currentUser;
       
  3254 }
       
  3255 /**
  1835  * Returns all the users returned by a query ID.
  3256  * Returns all the users returned by a query ID.
  1836  *
  3257  *
  1837  * @param {Object} state   Data state.
  3258  * @param {Object} state   Data state.
  1838  * @param {string} queryID Query ID.
  3259  * @param {string} queryID Query ID.
  1839  *
  3260  *
  1840  * @return {Array} Users list.
  3261  * @return {Array} Users list.
  1841  */
  3262  */
  1842 
  3263 
  1843 var getUserQueryResults = Object(rememo["a" /* default */])(function (state, queryID) {
  3264 var getUserQueryResults = Object(rememo["a" /* default */])(function (state, queryID) {
  1844   var queryResults = state.users.queries[queryID];
  3265   var queryResults = state.users.queries[queryID];
  1845   return Object(external_lodash_["map"])(queryResults, function (id) {
  3266   return Object(external_this_lodash_["map"])(queryResults, function (id) {
  1846     return state.users.byId[id];
  3267     return state.users.byId[id];
  1847   });
  3268   });
  1848 }, function (state, queryID) {
  3269 }, function (state, queryID) {
  1849   return [state.users.queries[queryID], state.users.byId];
  3270   return [state.users.queries[queryID], state.users.byId];
  1850 });
  3271 });
  1856  *
  3277  *
  1857  * @return {boolean} Whether the entities are loaded
  3278  * @return {boolean} Whether the entities are loaded
  1858  */
  3279  */
  1859 
  3280 
  1860 function getEntitiesByKind(state, kind) {
  3281 function getEntitiesByKind(state, kind) {
  1861   return Object(external_lodash_["filter"])(state.entities.config, {
  3282   return Object(external_this_lodash_["filter"])(state.entities.config, {
  1862     kind: kind
  3283     kind: kind
  1863   });
  3284   });
  1864 }
  3285 }
  1865 /**
  3286 /**
  1866  * Returns the entity object given its kind and name.
  3287  * Returns the entity object given its kind and name.
  1870  * @param {string} name  Entity name.
  3291  * @param {string} name  Entity name.
  1871  *
  3292  *
  1872  * @return {Object} Entity
  3293  * @return {Object} Entity
  1873  */
  3294  */
  1874 
  3295 
  1875 function getEntity(state, kind, name) {
  3296 function selectors_getEntity(state, kind, name) {
  1876   return Object(external_lodash_["find"])(state.entities.config, {
  3297   return Object(external_this_lodash_["find"])(state.entities.config, {
  1877     kind: kind,
  3298     kind: kind,
  1878     name: name
  3299     name: name
  1879   });
  3300   });
  1880 }
  3301 }
  1881 /**
  3302 /**
  1888  *
  3309  *
  1889  * @return {Object?} Record.
  3310  * @return {Object?} Record.
  1890  */
  3311  */
  1891 
  3312 
  1892 function getEntityRecord(state, kind, name, key) {
  3313 function getEntityRecord(state, kind, name, key) {
  1893   return Object(external_lodash_["get"])(state.entities.data, [kind, name, 'items', key]);
  3314   return Object(external_this_lodash_["get"])(state.entities.data, [kind, name, 'queriedData', 'items', key]);
  1894 }
  3315 }
       
  3316 /**
       
  3317  * Returns the Entity's record object by key. Doesn't trigger a resolver nor requests the entity from the API if the entity record isn't available in the local state.
       
  3318  *
       
  3319  * @param {Object} state  State tree
       
  3320  * @param {string} kind   Entity kind.
       
  3321  * @param {string} name   Entity name.
       
  3322  * @param {number} key    Record's key
       
  3323  *
       
  3324  * @return {Object?} Record.
       
  3325  */
       
  3326 
       
  3327 function __experimentalGetEntityRecordNoResolver(state, kind, name, key) {
       
  3328   return getEntityRecord(state, kind, name, key);
       
  3329 }
       
  3330 /**
       
  3331  * Returns the entity's record object by key,
       
  3332  * with its attributes mapped to their raw values.
       
  3333  *
       
  3334  * @param {Object} state  State tree.
       
  3335  * @param {string} kind   Entity kind.
       
  3336  * @param {string} name   Entity name.
       
  3337  * @param {number} key    Record's key.
       
  3338  *
       
  3339  * @return {Object?} Object with the entity's raw attributes.
       
  3340  */
       
  3341 
       
  3342 var getRawEntityRecord = Object(rememo["a" /* default */])(function (state, kind, name, key) {
       
  3343   var record = getEntityRecord(state, kind, name, key);
       
  3344   return record && Object.keys(record).reduce(function (accumulator, _key) {
       
  3345     // Because edits are the "raw" attribute values,
       
  3346     // we return those from record selectors to make rendering,
       
  3347     // comparisons, and joins with edits easier.
       
  3348     accumulator[_key] = Object(external_this_lodash_["get"])(record[_key], 'raw', record[_key]);
       
  3349     return accumulator;
       
  3350   }, {});
       
  3351 }, function (state) {
       
  3352   return [state.entities.data];
       
  3353 });
  1895 /**
  3354 /**
  1896  * Returns the Entity's records.
  3355  * Returns the Entity's records.
  1897  *
  3356  *
  1898  * @param {Object}  state  State tree
  3357  * @param {Object}  state  State tree
  1899  * @param {string}  kind   Entity kind.
  3358  * @param {string}  kind   Entity kind.
  1900  * @param {string}  name   Entity name.
  3359  * @param {string}  name   Entity name.
  1901  * @param {?Object} query  Optional terms query.
  3360  * @param {?Object} query  Optional terms query.
  1902  *
  3361  *
  1903  * @return {Array} Records.
  3362  * @return {?Array} Records.
  1904  */
  3363  */
  1905 
  3364 
  1906 function getEntityRecords(state, kind, name, query) {
  3365 function getEntityRecords(state, kind, name, query) {
  1907   var queriedState = Object(external_lodash_["get"])(state.entities.data, [kind, name]);
  3366   var queriedState = Object(external_this_lodash_["get"])(state.entities.data, [kind, name, 'queriedData']);
  1908 
  3367 
  1909   if (!queriedState) {
  3368   if (!queriedState) {
  1910     return [];
  3369     return [];
  1911   }
  3370   }
  1912 
  3371 
  1913   return getQueriedItems(queriedState, query);
  3372   return getQueriedItems(queriedState, query);
  1914 }
  3373 }
  1915 /**
  3374 /**
       
  3375  * Returns the  list of dirty entity records.
       
  3376  *
       
  3377  * @param {Object} state State tree.
       
  3378  *
       
  3379  * @return {[{ title: string, key: string, name: string, kind: string }]} The list of updated records
       
  3380  */
       
  3381 
       
  3382 var __experimentalGetDirtyEntityRecords = Object(rememo["a" /* default */])(function (state) {
       
  3383   var data = state.entities.data;
       
  3384   var dirtyRecords = [];
       
  3385   Object.keys(data).forEach(function (kind) {
       
  3386     Object.keys(data[kind]).forEach(function (name) {
       
  3387       var primaryKeys = Object.keys(data[kind][name].edits).filter(function (primaryKey) {
       
  3388         return hasEditsForEntityRecord(state, kind, name, primaryKey);
       
  3389       });
       
  3390 
       
  3391       if (primaryKeys.length) {
       
  3392         var entity = selectors_getEntity(state, kind, name);
       
  3393         primaryKeys.forEach(function (primaryKey) {
       
  3394           var entityRecord = getEntityRecord(state, kind, name, primaryKey);
       
  3395           dirtyRecords.push({
       
  3396             // We avoid using primaryKey because it's transformed into a string
       
  3397             // when it's used as an object key.
       
  3398             key: entityRecord[entity.key || DEFAULT_ENTITY_KEY],
       
  3399             title: !entity.getTitle ? '' : entity.getTitle(entityRecord),
       
  3400             name: name,
       
  3401             kind: kind
       
  3402           });
       
  3403         });
       
  3404       }
       
  3405     });
       
  3406   });
       
  3407   return dirtyRecords;
       
  3408 }, function (state) {
       
  3409   return [state.entities.data];
       
  3410 });
       
  3411 /**
       
  3412  * Returns the specified entity record's edits.
       
  3413  *
       
  3414  * @param {Object} state    State tree.
       
  3415  * @param {string} kind     Entity kind.
       
  3416  * @param {string} name     Entity name.
       
  3417  * @param {number} recordId Record ID.
       
  3418  *
       
  3419  * @return {Object?} The entity record's edits.
       
  3420  */
       
  3421 
       
  3422 function getEntityRecordEdits(state, kind, name, recordId) {
       
  3423   return Object(external_this_lodash_["get"])(state.entities.data, [kind, name, 'edits', recordId]);
       
  3424 }
       
  3425 /**
       
  3426  * Returns the specified entity record's non transient edits.
       
  3427  *
       
  3428  * Transient edits don't create an undo level, and
       
  3429  * are not considered for change detection.
       
  3430  * They are defined in the entity's config.
       
  3431  *
       
  3432  * @param {Object} state    State tree.
       
  3433  * @param {string} kind     Entity kind.
       
  3434  * @param {string} name     Entity name.
       
  3435  * @param {number} recordId Record ID.
       
  3436  *
       
  3437  * @return {Object?} The entity record's non transient edits.
       
  3438  */
       
  3439 
       
  3440 var getEntityRecordNonTransientEdits = Object(rememo["a" /* default */])(function (state, kind, name, recordId) {
       
  3441   var _ref = selectors_getEntity(state, kind, name) || {},
       
  3442       transientEdits = _ref.transientEdits;
       
  3443 
       
  3444   var edits = getEntityRecordEdits(state, kind, name, recordId) || {};
       
  3445 
       
  3446   if (!transientEdits) {
       
  3447     return edits;
       
  3448   }
       
  3449 
       
  3450   return Object.keys(edits).reduce(function (acc, key) {
       
  3451     if (!transientEdits[key]) {
       
  3452       acc[key] = edits[key];
       
  3453     }
       
  3454 
       
  3455     return acc;
       
  3456   }, {});
       
  3457 }, function (state) {
       
  3458   return [state.entities.config, state.entities.data];
       
  3459 });
       
  3460 /**
       
  3461  * Returns true if the specified entity record has edits,
       
  3462  * and false otherwise.
       
  3463  *
       
  3464  * @param {Object} state    State tree.
       
  3465  * @param {string} kind     Entity kind.
       
  3466  * @param {string} name     Entity name.
       
  3467  * @param {number} recordId Record ID.
       
  3468  *
       
  3469  * @return {boolean} Whether the entity record has edits or not.
       
  3470  */
       
  3471 
       
  3472 function hasEditsForEntityRecord(state, kind, name, recordId) {
       
  3473   return isSavingEntityRecord(state, kind, name, recordId) || Object.keys(getEntityRecordNonTransientEdits(state, kind, name, recordId)).length > 0;
       
  3474 }
       
  3475 /**
       
  3476  * Returns the specified entity record, merged with its edits.
       
  3477  *
       
  3478  * @param {Object} state    State tree.
       
  3479  * @param {string} kind     Entity kind.
       
  3480  * @param {string} name     Entity name.
       
  3481  * @param {number} recordId Record ID.
       
  3482  *
       
  3483  * @return {Object?} The entity record, merged with its edits.
       
  3484  */
       
  3485 
       
  3486 var getEditedEntityRecord = Object(rememo["a" /* default */])(function (state, kind, name, recordId) {
       
  3487   return selectors_objectSpread({}, getRawEntityRecord(state, kind, name, recordId), {}, getEntityRecordEdits(state, kind, name, recordId));
       
  3488 }, function (state) {
       
  3489   return [state.entities.data];
       
  3490 });
       
  3491 /**
       
  3492  * Returns true if the specified entity record is autosaving, and false otherwise.
       
  3493  *
       
  3494  * @param {Object} state    State tree.
       
  3495  * @param {string} kind     Entity kind.
       
  3496  * @param {string} name     Entity name.
       
  3497  * @param {number} recordId Record ID.
       
  3498  *
       
  3499  * @return {boolean} Whether the entity record is autosaving or not.
       
  3500  */
       
  3501 
       
  3502 function isAutosavingEntityRecord(state, kind, name, recordId) {
       
  3503   var _get = Object(external_this_lodash_["get"])(state.entities.data, [kind, name, 'saving', recordId], {}),
       
  3504       pending = _get.pending,
       
  3505       isAutosave = _get.isAutosave;
       
  3506 
       
  3507   return Boolean(pending && isAutosave);
       
  3508 }
       
  3509 /**
       
  3510  * Returns true if the specified entity record is saving, and false otherwise.
       
  3511  *
       
  3512  * @param {Object} state    State tree.
       
  3513  * @param {string} kind     Entity kind.
       
  3514  * @param {string} name     Entity name.
       
  3515  * @param {number} recordId Record ID.
       
  3516  *
       
  3517  * @return {boolean} Whether the entity record is saving or not.
       
  3518  */
       
  3519 
       
  3520 function isSavingEntityRecord(state, kind, name, recordId) {
       
  3521   return Object(external_this_lodash_["get"])(state.entities.data, [kind, name, 'saving', recordId, 'pending'], false);
       
  3522 }
       
  3523 /**
       
  3524  * Returns the specified entity record's last save error.
       
  3525  *
       
  3526  * @param {Object} state    State tree.
       
  3527  * @param {string} kind     Entity kind.
       
  3528  * @param {string} name     Entity name.
       
  3529  * @param {number} recordId Record ID.
       
  3530  *
       
  3531  * @return {Object?} The entity record's save error.
       
  3532  */
       
  3533 
       
  3534 function getLastEntitySaveError(state, kind, name, recordId) {
       
  3535   return Object(external_this_lodash_["get"])(state.entities.data, [kind, name, 'saving', recordId, 'error']);
       
  3536 }
       
  3537 /**
       
  3538  * Returns the current undo offset for the
       
  3539  * entity records edits history. The offset
       
  3540  * represents how many items from the end
       
  3541  * of the history stack we are at. 0 is the
       
  3542  * last edit, -1 is the second last, and so on.
       
  3543  *
       
  3544  * @param {Object} state State tree.
       
  3545  *
       
  3546  * @return {number} The current undo offset.
       
  3547  */
       
  3548 
       
  3549 function getCurrentUndoOffset(state) {
       
  3550   return state.undo.offset;
       
  3551 }
       
  3552 /**
       
  3553  * Returns the previous edit from the current undo offset
       
  3554  * for the entity records edits history, if any.
       
  3555  *
       
  3556  * @param {Object} state State tree.
       
  3557  *
       
  3558  * @return {Object?} The edit.
       
  3559  */
       
  3560 
       
  3561 
       
  3562 function getUndoEdit(state) {
       
  3563   return state.undo[state.undo.length - 2 + getCurrentUndoOffset(state)];
       
  3564 }
       
  3565 /**
       
  3566  * Returns the next edit from the current undo offset
       
  3567  * for the entity records edits history, if any.
       
  3568  *
       
  3569  * @param {Object} state State tree.
       
  3570  *
       
  3571  * @return {Object?} The edit.
       
  3572  */
       
  3573 
       
  3574 function getRedoEdit(state) {
       
  3575   return state.undo[state.undo.length + getCurrentUndoOffset(state)];
       
  3576 }
       
  3577 /**
       
  3578  * Returns true if there is a previous edit from the current undo offset
       
  3579  * for the entity records edits history, and false otherwise.
       
  3580  *
       
  3581  * @param {Object} state State tree.
       
  3582  *
       
  3583  * @return {boolean} Whether there is a previous edit or not.
       
  3584  */
       
  3585 
       
  3586 function hasUndo(state) {
       
  3587   return Boolean(getUndoEdit(state));
       
  3588 }
       
  3589 /**
       
  3590  * Returns true if there is a next edit from the current undo offset
       
  3591  * for the entity records edits history, and false otherwise.
       
  3592  *
       
  3593  * @param {Object} state State tree.
       
  3594  *
       
  3595  * @return {boolean} Whether there is a next edit or not.
       
  3596  */
       
  3597 
       
  3598 function hasRedo(state) {
       
  3599   return Boolean(getRedoEdit(state));
       
  3600 }
       
  3601 /**
       
  3602  * Return the current theme.
       
  3603  *
       
  3604  * @param {Object} state Data state.
       
  3605  *
       
  3606  * @return {Object}      The current theme.
       
  3607  */
       
  3608 
       
  3609 function getCurrentTheme(state) {
       
  3610   return state.themes[state.currentTheme];
       
  3611 }
       
  3612 /**
  1916  * Return theme supports data in the index.
  3613  * Return theme supports data in the index.
  1917  *
  3614  *
  1918  * @param {Object} state Data state.
  3615  * @param {Object} state Data state.
  1919  *
  3616  *
  1920  * @return {*}           Index data.
  3617  * @return {*}           Index data.
  1943  * get back from the oEmbed preview API.
  3640  * get back from the oEmbed preview API.
  1944  *
  3641  *
  1945  * @param {Object} state    Data state.
  3642  * @param {Object} state    Data state.
  1946  * @param {string} url      Embedded URL.
  3643  * @param {string} url      Embedded URL.
  1947  *
  3644  *
  1948  * @return {booleans} Is the preview for the URL an oEmbed link fallback.
  3645  * @return {boolean} Is the preview for the URL an oEmbed link fallback.
  1949  */
  3646  */
  1950 
  3647 
  1951 function isPreviewEmbedFallback(state, url) {
  3648 function isPreviewEmbedFallback(state, url) {
  1952   var preview = state.embedPreviews[url];
  3649   var preview = state.embedPreviews[url];
  1953   var oEmbedLinkCheck = '<a href="' + url + '">' + url + '</a>';
  3650   var oEmbedLinkCheck = '<a href="' + url + '">' + url + '</a>';
  1977 
  3674 
  1978 function hasUploadPermissions(state) {
  3675 function hasUploadPermissions(state) {
  1979   external_this_wp_deprecated_default()("select( 'core' ).hasUploadPermissions()", {
  3676   external_this_wp_deprecated_default()("select( 'core' ).hasUploadPermissions()", {
  1980     alternative: "select( 'core' ).canUser( 'create', 'media' )"
  3677     alternative: "select( 'core' ).canUser( 'create', 'media' )"
  1981   });
  3678   });
  1982   return Object(external_lodash_["defaultTo"])(canUser(state, 'create', 'media'), true);
  3679   return Object(external_this_lodash_["defaultTo"])(canUser(state, 'create', 'media'), true);
  1983 }
  3680 }
  1984 /**
  3681 /**
  1985  * Returns whether the current user can perform the given action on the given
  3682  * Returns whether the current user can perform the given action on the given
  1986  * REST resource.
  3683  * REST resource.
  1987  *
  3684  *
  1998  * @return {boolean|undefined} Whether or not the user can perform the action,
  3695  * @return {boolean|undefined} Whether or not the user can perform the action,
  1999  *                             or `undefined` if the OPTIONS request is still being made.
  3696  *                             or `undefined` if the OPTIONS request is still being made.
  2000  */
  3697  */
  2001 
  3698 
  2002 function canUser(state, action, resource, id) {
  3699 function canUser(state, action, resource, id) {
  2003   var key = Object(external_lodash_["compact"])([action, resource, id]).join('/');
  3700   var key = Object(external_this_lodash_["compact"])([action, resource, id]).join('/');
  2004   return Object(external_lodash_["get"])(state, ['userPermissions', key]);
  3701   return Object(external_this_lodash_["get"])(state, ['userPermissions', key]);
  2005 }
  3702 }
       
  3703 /**
       
  3704  * Returns the latest autosaves for the post.
       
  3705  *
       
  3706  * May return multiple autosaves since the backend stores one autosave per
       
  3707  * author for each post.
       
  3708  *
       
  3709  * @param {Object} state    State tree.
       
  3710  * @param {string} postType The type of the parent post.
       
  3711  * @param {number} postId   The id of the parent post.
       
  3712  *
       
  3713  * @return {?Array} An array of autosaves for the post, or undefined if there is none.
       
  3714  */
       
  3715 
       
  3716 function getAutosaves(state, postType, postId) {
       
  3717   return state.autosaves[postId];
       
  3718 }
       
  3719 /**
       
  3720  * Returns the autosave for the post and author.
       
  3721  *
       
  3722  * @param {Object} state    State tree.
       
  3723  * @param {string} postType The type of the parent post.
       
  3724  * @param {number} postId   The id of the parent post.
       
  3725  * @param {number} authorId The id of the author.
       
  3726  *
       
  3727  * @return {?Object} The autosave for the post and author.
       
  3728  */
       
  3729 
       
  3730 function getAutosave(state, postType, postId, authorId) {
       
  3731   if (authorId === undefined) {
       
  3732     return;
       
  3733   }
       
  3734 
       
  3735   var autosaves = state.autosaves[postId];
       
  3736   return Object(external_this_lodash_["find"])(autosaves, {
       
  3737     author: authorId
       
  3738   });
       
  3739 }
       
  3740 /**
       
  3741  * Returns true if the REST request for autosaves has completed.
       
  3742  *
       
  3743  * @param {Object} state State tree.
       
  3744  * @param {string} postType The type of the parent post.
       
  3745  * @param {number} postId   The id of the parent post.
       
  3746  *
       
  3747  * @return {boolean} True if the REST request was completed. False otherwise.
       
  3748  */
       
  3749 
       
  3750 var hasFetchedAutosaves = Object(external_this_wp_data_["createRegistrySelector"])(function (select) {
       
  3751   return function (state, postType, postId) {
       
  3752     return select(REDUCER_KEY).hasFinishedResolution('getAutosaves', [postType, postId]);
       
  3753   };
       
  3754 });
       
  3755 /**
       
  3756  * Returns a new reference when edited values have changed. This is useful in
       
  3757  * inferring where an edit has been made between states by comparison of the
       
  3758  * return values using strict equality.
       
  3759  *
       
  3760  * @example
       
  3761  *
       
  3762  * ```
       
  3763  * const hasEditOccurred = (
       
  3764  *    getReferenceByDistinctEdits( beforeState ) !==
       
  3765  *    getReferenceByDistinctEdits( afterState )
       
  3766  * );
       
  3767  * ```
       
  3768  *
       
  3769  * @param {Object} state Editor state.
       
  3770  *
       
  3771  * @return {*} A value whose reference will change only when an edit occurs.
       
  3772  */
       
  3773 
       
  3774 var getReferenceByDistinctEdits = Object(rememo["a" /* default */])(function () {
       
  3775   return [];
       
  3776 }, function (state) {
       
  3777   return [state.undo.length, state.undo.offset];
       
  3778 });
       
  3779 
       
  3780 // EXTERNAL MODULE: external {"this":["wp","dataControls"]}
       
  3781 var external_this_wp_dataControls_ = __webpack_require__(36);
       
  3782 
       
  3783 // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/utils/if-not-resolved.js
       
  3784 
       
  3785 
       
  3786 /**
       
  3787  * WordPress dependencies
       
  3788  */
       
  3789 
       
  3790 /**
       
  3791  * Higher-order function which invokes the given resolver only if it has not
       
  3792  * already been resolved with the arguments passed to the enhanced function.
       
  3793  *
       
  3794  * This only considers resolution state, and notably does not support resolver
       
  3795  * custom `isFulfilled` behavior.
       
  3796  *
       
  3797  * @param {Function} resolver     Original resolver.
       
  3798  * @param {string}   selectorName Selector name associated with resolver.
       
  3799  *
       
  3800  * @return {Function} Enhanced resolver.
       
  3801  */
       
  3802 
       
  3803 var if_not_resolved_ifNotResolved = function ifNotResolved(resolver, selectorName) {
       
  3804   return (
       
  3805     /*#__PURE__*/
       
  3806 
       
  3807     /**
       
  3808      * @param {...any} args Original resolver arguments.
       
  3809      */
       
  3810     external_this_regeneratorRuntime_default.a.mark(function resolveIfNotResolved() {
       
  3811       var _len,
       
  3812           args,
       
  3813           _key,
       
  3814           hasStartedResolution,
       
  3815           _args = arguments;
       
  3816 
       
  3817       return external_this_regeneratorRuntime_default.a.wrap(function resolveIfNotResolved$(_context) {
       
  3818         while (1) {
       
  3819           switch (_context.prev = _context.next) {
       
  3820             case 0:
       
  3821               for (_len = _args.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
       
  3822                 args[_key] = _args[_key];
       
  3823               }
       
  3824 
       
  3825               _context.next = 3;
       
  3826               return Object(external_this_wp_dataControls_["select"])('core', 'hasStartedResolution', selectorName, args);
       
  3827 
       
  3828             case 3:
       
  3829               hasStartedResolution = _context.sent;
       
  3830 
       
  3831               if (hasStartedResolution) {
       
  3832                 _context.next = 6;
       
  3833                 break;
       
  3834               }
       
  3835 
       
  3836               return _context.delegateYield(resolver.apply(void 0, args), "t0", 6);
       
  3837 
       
  3838             case 6:
       
  3839             case "end":
       
  3840               return _context.stop();
       
  3841           }
       
  3842         }
       
  3843       }, resolveIfNotResolved);
       
  3844     })
       
  3845   );
       
  3846 };
       
  3847 
       
  3848 /* harmony default export */ var if_not_resolved = (if_not_resolved_ifNotResolved);
  2006 
  3849 
  2007 // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/resolvers.js
  3850 // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/resolvers.js
  2008 
  3851 
  2009 
  3852 
  2010 
  3853 
  2011 var resolvers_marked =
  3854 function resolvers_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
  2012 /*#__PURE__*/
  3855 
  2013 regenerator_default.a.mark(resolvers_getAuthors),
  3856 function resolvers_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { resolvers_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { resolvers_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
  2014     resolvers_marked2 =
  3857 
  2015 /*#__PURE__*/
  3858 var resolvers_marked = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(resolvers_getAuthors),
  2016 regenerator_default.a.mark(resolvers_getEntityRecord),
  3859     resolvers_marked2 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(resolvers_getCurrentUser),
  2017     resolvers_marked3 =
  3860     resolvers_marked3 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(resolvers_getEntityRecord),
  2018 /*#__PURE__*/
  3861     resolvers_marked4 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(resolvers_getEntityRecords),
  2019 regenerator_default.a.mark(resolvers_getEntityRecords),
  3862     resolvers_marked5 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(resolvers_getCurrentTheme),
  2020     _marked4 =
  3863     _marked6 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(resolvers_getThemeSupports),
  2021 /*#__PURE__*/
  3864     _marked7 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(resolvers_getEmbedPreview),
  2022 regenerator_default.a.mark(resolvers_getThemeSupports),
  3865     _marked8 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(resolvers_hasUploadPermissions),
  2023     _marked5 =
  3866     _marked9 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(resolvers_canUser),
  2024 /*#__PURE__*/
  3867     _marked10 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(resolvers_getAutosaves),
  2025 regenerator_default.a.mark(resolvers_getEmbedPreview),
  3868     _marked11 = /*#__PURE__*/external_this_regeneratorRuntime_default.a.mark(resolvers_getAutosave);
  2026     _marked6 =
       
  2027 /*#__PURE__*/
       
  2028 regenerator_default.a.mark(resolvers_hasUploadPermissions),
       
  2029     _marked7 =
       
  2030 /*#__PURE__*/
       
  2031 regenerator_default.a.mark(resolvers_canUser);
       
  2032 
  3869 
  2033 /**
  3870 /**
  2034  * External dependencies
  3871  * External dependencies
  2035  */
  3872  */
  2036 
  3873 
  2041 
  3878 
  2042 
  3879 
  2043 /**
  3880 /**
  2044  * Internal dependencies
  3881  * Internal dependencies
  2045  */
  3882  */
       
  3883 
  2046 
  3884 
  2047 
  3885 
  2048 
  3886 
  2049 
  3887 
  2050 /**
  3888 /**
  2051  * Requests authors from the REST API.
  3889  * Requests authors from the REST API.
  2052  */
  3890  */
  2053 
  3891 
  2054 function resolvers_getAuthors() {
  3892 function resolvers_getAuthors() {
  2055   var users;
  3893   var users;
  2056   return regenerator_default.a.wrap(function getAuthors$(_context) {
  3894   return external_this_regeneratorRuntime_default.a.wrap(function getAuthors$(_context) {
  2057     while (1) {
  3895     while (1) {
  2058       switch (_context.prev = _context.next) {
  3896       switch (_context.prev = _context.next) {
  2059         case 0:
  3897         case 0:
  2060           _context.next = 2;
  3898           _context.next = 2;
  2061           return apiFetch({
  3899           return apiFetch({
  2070         case 5:
  3908         case 5:
  2071         case "end":
  3909         case "end":
  2072           return _context.stop();
  3910           return _context.stop();
  2073       }
  3911       }
  2074     }
  3912     }
  2075   }, resolvers_marked, this);
  3913   }, resolvers_marked);
  2076 }
  3914 }
  2077 /**
  3915 /**
  2078  * Requests an entity's record from the REST API.
  3916  * Requests the current user from the REST API.
  2079  *
  3917  */
  2080  * @param {string} kind   Entity kind.
  3918 
  2081  * @param {string} name   Entity name.
  3919 function resolvers_getCurrentUser() {
  2082  * @param {number} key    Record's key
  3920   var currentUser;
  2083  */
  3921   return external_this_regeneratorRuntime_default.a.wrap(function getCurrentUser$(_context2) {
  2084 
       
  2085 function resolvers_getEntityRecord(kind, name, key) {
       
  2086   var entities, entity, record;
       
  2087   return regenerator_default.a.wrap(function getEntityRecord$(_context2) {
       
  2088     while (1) {
  3922     while (1) {
  2089       switch (_context2.prev = _context2.next) {
  3923       switch (_context2.prev = _context2.next) {
  2090         case 0:
  3924         case 0:
  2091           _context2.next = 2;
  3925           _context2.next = 2;
  2092           return getKindEntities(kind);
  3926           return apiFetch({
       
  3927             path: '/wp/v2/users/me'
       
  3928           });
  2093 
  3929 
  2094         case 2:
  3930         case 2:
  2095           entities = _context2.sent;
  3931           currentUser = _context2.sent;
  2096           entity = Object(external_lodash_["find"])(entities, {
  3932           _context2.next = 5;
  2097             kind: kind,
  3933           return receiveCurrentUser(currentUser);
  2098             name: name
  3934 
  2099           });
  3935         case 5:
  2100 
       
  2101           if (entity) {
       
  2102             _context2.next = 6;
       
  2103             break;
       
  2104           }
       
  2105 
       
  2106           return _context2.abrupt("return");
       
  2107 
       
  2108         case 6:
       
  2109           _context2.next = 8;
       
  2110           return apiFetch({
       
  2111             path: "".concat(entity.baseURL, "/").concat(key, "?context=edit")
       
  2112           });
       
  2113 
       
  2114         case 8:
       
  2115           record = _context2.sent;
       
  2116           _context2.next = 11;
       
  2117           return receiveEntityRecords(kind, name, record);
       
  2118 
       
  2119         case 11:
       
  2120         case "end":
  3936         case "end":
  2121           return _context2.stop();
  3937           return _context2.stop();
  2122       }
  3938       }
  2123     }
  3939     }
  2124   }, resolvers_marked2, this);
  3940   }, resolvers_marked2);
  2125 }
  3941 }
       
  3942 /**
       
  3943  * Requests an entity's record from the REST API.
       
  3944  *
       
  3945  * @param {string} kind   Entity kind.
       
  3946  * @param {string} name   Entity name.
       
  3947  * @param {number} key    Record's key
       
  3948  */
       
  3949 
       
  3950 function resolvers_getEntityRecord(kind, name) {
       
  3951   var key,
       
  3952       entities,
       
  3953       entity,
       
  3954       record,
       
  3955       _args3 = arguments;
       
  3956   return external_this_regeneratorRuntime_default.a.wrap(function getEntityRecord$(_context3) {
       
  3957     while (1) {
       
  3958       switch (_context3.prev = _context3.next) {
       
  3959         case 0:
       
  3960           key = _args3.length > 2 && _args3[2] !== undefined ? _args3[2] : '';
       
  3961           _context3.next = 3;
       
  3962           return getKindEntities(kind);
       
  3963 
       
  3964         case 3:
       
  3965           entities = _context3.sent;
       
  3966           entity = Object(external_this_lodash_["find"])(entities, {
       
  3967             kind: kind,
       
  3968             name: name
       
  3969           });
       
  3970 
       
  3971           if (entity) {
       
  3972             _context3.next = 7;
       
  3973             break;
       
  3974           }
       
  3975 
       
  3976           return _context3.abrupt("return");
       
  3977 
       
  3978         case 7:
       
  3979           _context3.next = 9;
       
  3980           return apiFetch({
       
  3981             path: "".concat(entity.baseURL, "/").concat(key, "?context=edit")
       
  3982           });
       
  3983 
       
  3984         case 9:
       
  3985           record = _context3.sent;
       
  3986           _context3.next = 12;
       
  3987           return receiveEntityRecords(kind, name, record);
       
  3988 
       
  3989         case 12:
       
  3990         case "end":
       
  3991           return _context3.stop();
       
  3992       }
       
  3993     }
       
  3994   }, resolvers_marked3);
       
  3995 }
       
  3996 /**
       
  3997  * Requests an entity's record from the REST API.
       
  3998  */
       
  3999 
       
  4000 var resolvers_getRawEntityRecord = if_not_resolved(resolvers_getEntityRecord, 'getEntityRecord');
       
  4001 /**
       
  4002  * Requests an entity's record from the REST API.
       
  4003  */
       
  4004 
       
  4005 var resolvers_getEditedEntityRecord = if_not_resolved(resolvers_getRawEntityRecord, 'getRawEntityRecord');
  2126 /**
  4006 /**
  2127  * Requests the entity's records from the REST API.
  4007  * Requests the entity's records from the REST API.
  2128  *
  4008  *
  2129  * @param {string}  kind   Entity kind.
  4009  * @param {string}  kind   Entity kind.
  2130  * @param {string}  name   Entity name.
  4010  * @param {string}  name   Entity name.
  2135   var query,
  4015   var query,
  2136       entities,
  4016       entities,
  2137       entity,
  4017       entity,
  2138       path,
  4018       path,
  2139       records,
  4019       records,
  2140       _args3 = arguments;
  4020       _args4 = arguments;
  2141   return regenerator_default.a.wrap(function getEntityRecords$(_context3) {
  4021   return external_this_regeneratorRuntime_default.a.wrap(function getEntityRecords$(_context4) {
  2142     while (1) {
  4022     while (1) {
  2143       switch (_context3.prev = _context3.next) {
  4023       switch (_context4.prev = _context4.next) {
  2144         case 0:
  4024         case 0:
  2145           query = _args3.length > 2 && _args3[2] !== undefined ? _args3[2] : {};
  4025           query = _args4.length > 2 && _args4[2] !== undefined ? _args4[2] : {};
  2146           _context3.next = 3;
  4026           _context4.next = 3;
  2147           return getKindEntities(kind);
  4027           return getKindEntities(kind);
  2148 
  4028 
  2149         case 3:
  4029         case 3:
  2150           entities = _context3.sent;
  4030           entities = _context4.sent;
  2151           entity = Object(external_lodash_["find"])(entities, {
  4031           entity = Object(external_this_lodash_["find"])(entities, {
  2152             kind: kind,
  4032             kind: kind,
  2153             name: name
  4033             name: name
  2154           });
  4034           });
  2155 
  4035 
  2156           if (entity) {
  4036           if (entity) {
  2157             _context3.next = 7;
  4037             _context4.next = 7;
  2158             break;
  4038             break;
  2159           }
  4039           }
  2160 
  4040 
  2161           return _context3.abrupt("return");
  4041           return _context4.abrupt("return");
  2162 
  4042 
  2163         case 7:
  4043         case 7:
  2164           path = Object(external_this_wp_url_["addQueryArgs"])(entity.baseURL, Object(objectSpread["a" /* default */])({}, query, {
  4044           path = Object(external_this_wp_url_["addQueryArgs"])(entity.baseURL, resolvers_objectSpread({}, query, {
  2165             context: 'edit'
  4045             context: 'edit'
  2166           }));
  4046           }));
  2167           _context3.next = 10;
  4047           _context4.next = 10;
  2168           return apiFetch({
  4048           return apiFetch({
  2169             path: path
  4049             path: path
  2170           });
  4050           });
  2171 
  4051 
  2172         case 10:
  4052         case 10:
  2173           records = _context3.sent;
  4053           records = _context4.sent;
  2174           _context3.next = 13;
  4054           _context4.next = 13;
  2175           return receiveEntityRecords(kind, name, Object.values(records), query);
  4055           return receiveEntityRecords(kind, name, Object.values(records), query);
  2176 
  4056 
  2177         case 13:
  4057         case 13:
  2178         case "end":
       
  2179           return _context3.stop();
       
  2180       }
       
  2181     }
       
  2182   }, resolvers_marked3, this);
       
  2183 }
       
  2184 
       
  2185 resolvers_getEntityRecords.shouldInvalidate = function (action, kind, name) {
       
  2186   return action.type === 'RECEIVE_ITEMS' && action.invalidateCache && kind === action.kind && name === action.name;
       
  2187 };
       
  2188 /**
       
  2189  * Requests theme supports data from the index.
       
  2190  */
       
  2191 
       
  2192 
       
  2193 function resolvers_getThemeSupports() {
       
  2194   var activeThemes;
       
  2195   return regenerator_default.a.wrap(function getThemeSupports$(_context4) {
       
  2196     while (1) {
       
  2197       switch (_context4.prev = _context4.next) {
       
  2198         case 0:
       
  2199           _context4.next = 2;
       
  2200           return apiFetch({
       
  2201             path: '/wp/v2/themes?status=active'
       
  2202           });
       
  2203 
       
  2204         case 2:
       
  2205           activeThemes = _context4.sent;
       
  2206           _context4.next = 5;
       
  2207           return receiveThemeSupports(activeThemes[0].theme_supports);
       
  2208 
       
  2209         case 5:
       
  2210         case "end":
  4058         case "end":
  2211           return _context4.stop();
  4059           return _context4.stop();
  2212       }
  4060       }
  2213     }
  4061     }
  2214   }, _marked4, this);
  4062   }, resolvers_marked4);
  2215 }
  4063 }
  2216 /**
  4064 
  2217  * Requests a preview from the from the Embed API.
  4065 resolvers_getEntityRecords.shouldInvalidate = function (action, kind, name) {
  2218  *
  4066   return action.type === 'RECEIVE_ITEMS' && action.invalidateCache && kind === action.kind && name === action.name;
  2219  * @param {string} url   URL to get the preview for.
  4067 };
  2220  */
  4068 /**
  2221 
  4069  * Requests the current theme.
  2222 function resolvers_getEmbedPreview(url) {
  4070  */
  2223   var embedProxyResponse;
  4071 
  2224   return regenerator_default.a.wrap(function getEmbedPreview$(_context5) {
  4072 
       
  4073 function resolvers_getCurrentTheme() {
       
  4074   var activeThemes;
       
  4075   return external_this_regeneratorRuntime_default.a.wrap(function getCurrentTheme$(_context5) {
  2225     while (1) {
  4076     while (1) {
  2226       switch (_context5.prev = _context5.next) {
  4077       switch (_context5.prev = _context5.next) {
  2227         case 0:
  4078         case 0:
  2228           _context5.prev = 0;
  4079           _context5.next = 2;
  2229           _context5.next = 3;
  4080           return apiFetch({
       
  4081             path: '/wp/v2/themes?status=active'
       
  4082           });
       
  4083 
       
  4084         case 2:
       
  4085           activeThemes = _context5.sent;
       
  4086           _context5.next = 5;
       
  4087           return receiveCurrentTheme(activeThemes[0]);
       
  4088 
       
  4089         case 5:
       
  4090         case "end":
       
  4091           return _context5.stop();
       
  4092       }
       
  4093     }
       
  4094   }, resolvers_marked5);
       
  4095 }
       
  4096 /**
       
  4097  * Requests theme supports data from the index.
       
  4098  */
       
  4099 
       
  4100 function resolvers_getThemeSupports() {
       
  4101   var activeThemes;
       
  4102   return external_this_regeneratorRuntime_default.a.wrap(function getThemeSupports$(_context6) {
       
  4103     while (1) {
       
  4104       switch (_context6.prev = _context6.next) {
       
  4105         case 0:
       
  4106           _context6.next = 2;
       
  4107           return apiFetch({
       
  4108             path: '/wp/v2/themes?status=active'
       
  4109           });
       
  4110 
       
  4111         case 2:
       
  4112           activeThemes = _context6.sent;
       
  4113           _context6.next = 5;
       
  4114           return receiveThemeSupports(activeThemes[0].theme_supports);
       
  4115 
       
  4116         case 5:
       
  4117         case "end":
       
  4118           return _context6.stop();
       
  4119       }
       
  4120     }
       
  4121   }, _marked6);
       
  4122 }
       
  4123 /**
       
  4124  * Requests a preview from the from the Embed API.
       
  4125  *
       
  4126  * @param {string} url   URL to get the preview for.
       
  4127  */
       
  4128 
       
  4129 function resolvers_getEmbedPreview(url) {
       
  4130   var embedProxyResponse;
       
  4131   return external_this_regeneratorRuntime_default.a.wrap(function getEmbedPreview$(_context7) {
       
  4132     while (1) {
       
  4133       switch (_context7.prev = _context7.next) {
       
  4134         case 0:
       
  4135           _context7.prev = 0;
       
  4136           _context7.next = 3;
  2230           return apiFetch({
  4137           return apiFetch({
  2231             path: Object(external_this_wp_url_["addQueryArgs"])('/oembed/1.0/proxy', {
  4138             path: Object(external_this_wp_url_["addQueryArgs"])('/oembed/1.0/proxy', {
  2232               url: url
  4139               url: url
  2233             })
  4140             })
  2234           });
  4141           });
  2235 
  4142 
  2236         case 3:
  4143         case 3:
  2237           embedProxyResponse = _context5.sent;
  4144           embedProxyResponse = _context7.sent;
  2238           _context5.next = 6;
  4145           _context7.next = 6;
  2239           return receiveEmbedPreview(url, embedProxyResponse);
  4146           return receiveEmbedPreview(url, embedProxyResponse);
  2240 
  4147 
  2241         case 6:
  4148         case 6:
  2242           _context5.next = 12;
  4149           _context7.next = 12;
  2243           break;
  4150           break;
  2244 
  4151 
  2245         case 8:
  4152         case 8:
  2246           _context5.prev = 8;
  4153           _context7.prev = 8;
  2247           _context5.t0 = _context5["catch"](0);
  4154           _context7.t0 = _context7["catch"](0);
  2248           _context5.next = 12;
  4155           _context7.next = 12;
  2249           return receiveEmbedPreview(url, false);
  4156           return receiveEmbedPreview(url, false);
  2250 
  4157 
  2251         case 12:
  4158         case 12:
  2252         case "end":
  4159         case "end":
  2253           return _context5.stop();
  4160           return _context7.stop();
  2254       }
  4161       }
  2255     }
  4162     }
  2256   }, _marked5, this, [[0, 8]]);
  4163   }, _marked7, null, [[0, 8]]);
  2257 }
  4164 }
  2258 /**
  4165 /**
  2259  * Requests Upload Permissions from the REST API.
  4166  * Requests Upload Permissions from the REST API.
  2260  *
  4167  *
  2261  * @deprecated since 5.0. Callers should use the more generic `canUser()` selector instead of
  4168  * @deprecated since 5.0. Callers should use the more generic `canUser()` selector instead of
  2262  *            `hasUploadPermissions()`, e.g. `canUser( 'create', 'media' )`.
  4169  *            `hasUploadPermissions()`, e.g. `canUser( 'create', 'media' )`.
  2263  */
  4170  */
  2264 
  4171 
  2265 function resolvers_hasUploadPermissions() {
  4172 function resolvers_hasUploadPermissions() {
  2266   return regenerator_default.a.wrap(function hasUploadPermissions$(_context6) {
  4173   return external_this_regeneratorRuntime_default.a.wrap(function hasUploadPermissions$(_context8) {
  2267     while (1) {
  4174     while (1) {
  2268       switch (_context6.prev = _context6.next) {
  4175       switch (_context8.prev = _context8.next) {
  2269         case 0:
  4176         case 0:
  2270           external_this_wp_deprecated_default()("select( 'core' ).hasUploadPermissions()", {
  4177           external_this_wp_deprecated_default()("select( 'core' ).hasUploadPermissions()", {
  2271             alternative: "select( 'core' ).canUser( 'create', 'media' )"
  4178             alternative: "select( 'core' ).canUser( 'create', 'media' )"
  2272           });
  4179           });
  2273           return _context6.delegateYield(resolvers_canUser('create', 'media'), "t0", 2);
  4180           return _context8.delegateYield(resolvers_canUser('create', 'media'), "t0", 2);
  2274 
  4181 
  2275         case 2:
  4182         case 2:
  2276         case "end":
  4183         case "end":
  2277           return _context6.stop();
  4184           return _context8.stop();
  2278       }
  4185       }
  2279     }
  4186     }
  2280   }, _marked6, this);
  4187   }, _marked8);
  2281 }
  4188 }
  2282 /**
  4189 /**
  2283  * Checks whether the current user can perform the given action on the given
  4190  * Checks whether the current user can perform the given action on the given
  2284  * REST resource.
  4191  * REST resource.
  2285  *
  4192  *
  2289  * @param {?string} id       ID of the rest resource to check.
  4196  * @param {?string} id       ID of the rest resource to check.
  2290  */
  4197  */
  2291 
  4198 
  2292 function resolvers_canUser(action, resource, id) {
  4199 function resolvers_canUser(action, resource, id) {
  2293   var methods, method, path, response, allowHeader, key, isAllowed;
  4200   var methods, method, path, response, allowHeader, key, isAllowed;
  2294   return regenerator_default.a.wrap(function canUser$(_context7) {
  4201   return external_this_regeneratorRuntime_default.a.wrap(function canUser$(_context9) {
  2295     while (1) {
  4202     while (1) {
  2296       switch (_context7.prev = _context7.next) {
  4203       switch (_context9.prev = _context9.next) {
  2297         case 0:
  4204         case 0:
  2298           methods = {
  4205           methods = {
  2299             create: 'POST',
  4206             create: 'POST',
  2300             read: 'GET',
  4207             read: 'GET',
  2301             update: 'PUT',
  4208             update: 'PUT',
  2302             delete: 'DELETE'
  4209             delete: 'DELETE'
  2303           };
  4210           };
  2304           method = methods[action];
  4211           method = methods[action];
  2305 
  4212 
  2306           if (method) {
  4213           if (method) {
  2307             _context7.next = 4;
  4214             _context9.next = 4;
  2308             break;
  4215             break;
  2309           }
  4216           }
  2310 
  4217 
  2311           throw new Error("'".concat(action, "' is not a valid action."));
  4218           throw new Error("'".concat(action, "' is not a valid action."));
  2312 
  4219 
  2313         case 4:
  4220         case 4:
  2314           path = id ? "/wp/v2/".concat(resource, "/").concat(id) : "/wp/v2/".concat(resource);
  4221           path = id ? "/wp/v2/".concat(resource, "/").concat(id) : "/wp/v2/".concat(resource);
  2315           _context7.prev = 5;
  4222           _context9.prev = 5;
  2316           _context7.next = 8;
  4223           _context9.next = 8;
  2317           return apiFetch({
  4224           return apiFetch({
  2318             path: path,
  4225             path: path,
  2319             // Ideally this would always be an OPTIONS request, but unfortunately there's
  4226             // Ideally this would always be an OPTIONS request, but unfortunately there's
  2320             // a bug in the REST API which causes the Allow header to not be sent on
  4227             // a bug in the REST API which causes the Allow header to not be sent on
  2321             // OPTIONS requests to /posts/:id routes.
  4228             // OPTIONS requests to /posts/:id routes.
  2323             method: id ? 'GET' : 'OPTIONS',
  4230             method: id ? 'GET' : 'OPTIONS',
  2324             parse: false
  4231             parse: false
  2325           });
  4232           });
  2326 
  4233 
  2327         case 8:
  4234         case 8:
  2328           response = _context7.sent;
  4235           response = _context9.sent;
  2329           _context7.next = 14;
  4236           _context9.next = 14;
  2330           break;
  4237           break;
  2331 
  4238 
  2332         case 11:
  4239         case 11:
  2333           _context7.prev = 11;
  4240           _context9.prev = 11;
  2334           _context7.t0 = _context7["catch"](5);
  4241           _context9.t0 = _context9["catch"](5);
  2335           return _context7.abrupt("return");
  4242           return _context9.abrupt("return");
  2336 
  4243 
  2337         case 14:
  4244         case 14:
  2338           if (Object(external_lodash_["hasIn"])(response, ['headers', 'get'])) {
  4245           if (Object(external_this_lodash_["hasIn"])(response, ['headers', 'get'])) {
  2339             // If the request is fetched using the fetch api, the header can be
  4246             // If the request is fetched using the fetch api, the header can be
  2340             // retrieved using the 'get' method.
  4247             // retrieved using the 'get' method.
  2341             allowHeader = response.headers.get('allow');
  4248             allowHeader = response.headers.get('allow');
  2342           } else {
  4249           } else {
  2343             // If the request was preloaded server-side and is returned by the
  4250             // If the request was preloaded server-side and is returned by the
  2344             // preloading middleware, the header will be a simple property.
  4251             // preloading middleware, the header will be a simple property.
  2345             allowHeader = Object(external_lodash_["get"])(response, ['headers', 'Allow'], '');
  4252             allowHeader = Object(external_this_lodash_["get"])(response, ['headers', 'Allow'], '');
  2346           }
  4253           }
  2347 
  4254 
  2348           key = Object(external_lodash_["compact"])([action, resource, id]).join('/');
  4255           key = Object(external_this_lodash_["compact"])([action, resource, id]).join('/');
  2349           isAllowed = Object(external_lodash_["includes"])(allowHeader, method);
  4256           isAllowed = Object(external_this_lodash_["includes"])(allowHeader, method);
  2350           _context7.next = 19;
  4257           _context9.next = 19;
  2351           return receiveUserPermission(key, isAllowed);
  4258           return receiveUserPermission(key, isAllowed);
  2352 
  4259 
  2353         case 19:
  4260         case 19:
  2354         case "end":
  4261         case "end":
  2355           return _context7.stop();
  4262           return _context9.stop();
  2356       }
  4263       }
  2357     }
  4264     }
  2358   }, _marked7, this, [[5, 11]]);
  4265   }, _marked9, null, [[5, 11]]);
       
  4266 }
       
  4267 /**
       
  4268  * Request autosave data from the REST API.
       
  4269  *
       
  4270  * @param {string} postType The type of the parent post.
       
  4271  * @param {number} postId   The id of the parent post.
       
  4272  */
       
  4273 
       
  4274 function resolvers_getAutosaves(postType, postId) {
       
  4275   var _yield$resolveSelect, restBase, autosaves;
       
  4276 
       
  4277   return external_this_regeneratorRuntime_default.a.wrap(function getAutosaves$(_context10) {
       
  4278     while (1) {
       
  4279       switch (_context10.prev = _context10.next) {
       
  4280         case 0:
       
  4281           _context10.next = 2;
       
  4282           return resolveSelect('getPostType', postType);
       
  4283 
       
  4284         case 2:
       
  4285           _yield$resolveSelect = _context10.sent;
       
  4286           restBase = _yield$resolveSelect.rest_base;
       
  4287           _context10.next = 6;
       
  4288           return apiFetch({
       
  4289             path: "/wp/v2/".concat(restBase, "/").concat(postId, "/autosaves?context=edit")
       
  4290           });
       
  4291 
       
  4292         case 6:
       
  4293           autosaves = _context10.sent;
       
  4294 
       
  4295           if (!(autosaves && autosaves.length)) {
       
  4296             _context10.next = 10;
       
  4297             break;
       
  4298           }
       
  4299 
       
  4300           _context10.next = 10;
       
  4301           return receiveAutosaves(postId, autosaves);
       
  4302 
       
  4303         case 10:
       
  4304         case "end":
       
  4305           return _context10.stop();
       
  4306       }
       
  4307     }
       
  4308   }, _marked10);
       
  4309 }
       
  4310 /**
       
  4311  * Request autosave data from the REST API.
       
  4312  *
       
  4313  * This resolver exists to ensure the underlying autosaves are fetched via
       
  4314  * `getAutosaves` when a call to the `getAutosave` selector is made.
       
  4315  *
       
  4316  * @param {string} postType The type of the parent post.
       
  4317  * @param {number} postId   The id of the parent post.
       
  4318  */
       
  4319 
       
  4320 function resolvers_getAutosave(postType, postId) {
       
  4321   return external_this_regeneratorRuntime_default.a.wrap(function getAutosave$(_context11) {
       
  4322     while (1) {
       
  4323       switch (_context11.prev = _context11.next) {
       
  4324         case 0:
       
  4325           _context11.next = 2;
       
  4326           return resolveSelect('getAutosaves', postType, postId);
       
  4327 
       
  4328         case 2:
       
  4329         case "end":
       
  4330           return _context11.stop();
       
  4331       }
       
  4332     }
       
  4333   }, _marked11);
       
  4334 }
       
  4335 
       
  4336 // EXTERNAL MODULE: external {"this":["wp","element"]}
       
  4337 var external_this_wp_element_ = __webpack_require__(0);
       
  4338 
       
  4339 // EXTERNAL MODULE: external {"this":["wp","blocks"]}
       
  4340 var external_this_wp_blocks_ = __webpack_require__(10);
       
  4341 
       
  4342 // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/entity-provider.js
       
  4343 
       
  4344 
       
  4345 
       
  4346 
       
  4347 function entity_provider_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
       
  4348 
       
  4349 function entity_provider_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { entity_provider_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { entity_provider_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
  4350 
       
  4351 /**
       
  4352  * WordPress dependencies
       
  4353  */
       
  4354 
       
  4355 
       
  4356 
       
  4357 /**
       
  4358  * Internal dependencies
       
  4359  */
       
  4360 
       
  4361 
       
  4362 
       
  4363 var entity_provider_entities = entity_provider_objectSpread({}, defaultEntities.reduce(function (acc, entity) {
       
  4364   if (!acc[entity.kind]) {
       
  4365     acc[entity.kind] = {};
       
  4366   }
       
  4367 
       
  4368   acc[entity.kind][entity.name] = {
       
  4369     context: Object(external_this_wp_element_["createContext"])()
       
  4370   };
       
  4371   return acc;
       
  4372 }, {}), {}, kinds.reduce(function (acc, kind) {
       
  4373   acc[kind.name] = {};
       
  4374   return acc;
       
  4375 }, {}));
       
  4376 
       
  4377 var entity_provider_getEntity = function getEntity(kind, type) {
       
  4378   if (!entity_provider_entities[kind]) {
       
  4379     throw new Error("Missing entity config for kind: ".concat(kind, "."));
       
  4380   }
       
  4381 
       
  4382   if (!entity_provider_entities[kind][type]) {
       
  4383     entity_provider_entities[kind][type] = {
       
  4384       context: Object(external_this_wp_element_["createContext"])()
       
  4385     };
       
  4386   }
       
  4387 
       
  4388   return entity_provider_entities[kind][type];
       
  4389 };
       
  4390 /**
       
  4391  * Context provider component for providing
       
  4392  * an entity for a specific entity type.
       
  4393  *
       
  4394  * @param {Object} props          The component's props.
       
  4395  * @param {string} props.kind     The entity kind.
       
  4396  * @param {string} props.type     The entity type.
       
  4397  * @param {number} props.id       The entity ID.
       
  4398  * @param {*}      props.children The children to wrap.
       
  4399  *
       
  4400  * @return {Object} The provided children, wrapped with
       
  4401  *                   the entity's context provider.
       
  4402  */
       
  4403 
       
  4404 
       
  4405 function EntityProvider(_ref) {
       
  4406   var kind = _ref.kind,
       
  4407       type = _ref.type,
       
  4408       id = _ref.id,
       
  4409       children = _ref.children;
       
  4410   var Provider = entity_provider_getEntity(kind, type).context.Provider;
       
  4411   return Object(external_this_wp_element_["createElement"])(Provider, {
       
  4412     value: id
       
  4413   }, children);
       
  4414 }
       
  4415 /**
       
  4416  * Hook that returns the ID for the nearest
       
  4417  * provided entity of the specified type.
       
  4418  *
       
  4419  * @param {string} kind The entity kind.
       
  4420  * @param {string} type The entity type.
       
  4421  */
       
  4422 
       
  4423 function useEntityId(kind, type) {
       
  4424   return Object(external_this_wp_element_["useContext"])(entity_provider_getEntity(kind, type).context);
       
  4425 }
       
  4426 /**
       
  4427  * Hook that returns the value and a setter for the
       
  4428  * specified property of the nearest provided
       
  4429  * entity of the specified type.
       
  4430  *
       
  4431  * @param {string} kind  The entity kind.
       
  4432  * @param {string} type  The entity type.
       
  4433  * @param {string} prop  The property name.
       
  4434  * @param {string} [_id] An entity ID to use instead of the context-provided one.
       
  4435  *
       
  4436  * @return {[*, Function]} A tuple where the first item is the
       
  4437  *                          property value and the second is the
       
  4438  *                          setter.
       
  4439  */
       
  4440 
       
  4441 function useEntityProp(kind, type, prop, _id) {
       
  4442   var providerId = useEntityId(kind, type);
       
  4443   var id = _id !== null && _id !== void 0 ? _id : providerId;
       
  4444 
       
  4445   var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) {
       
  4446     var _select = select('core'),
       
  4447         getEntityRecord = _select.getEntityRecord,
       
  4448         getEditedEntityRecord = _select.getEditedEntityRecord;
       
  4449 
       
  4450     var entity = getEntityRecord(kind, type, id); // Trigger resolver.
       
  4451 
       
  4452     var editedEntity = getEditedEntityRecord(kind, type, id);
       
  4453     return entity && editedEntity ? {
       
  4454       value: editedEntity[prop],
       
  4455       fullValue: entity[prop]
       
  4456     } : {};
       
  4457   }, [kind, type, id, prop]),
       
  4458       value = _useSelect.value,
       
  4459       fullValue = _useSelect.fullValue;
       
  4460 
       
  4461   var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core'),
       
  4462       editEntityRecord = _useDispatch.editEntityRecord;
       
  4463 
       
  4464   var setValue = Object(external_this_wp_element_["useCallback"])(function (newValue) {
       
  4465     editEntityRecord(kind, type, id, Object(defineProperty["a" /* default */])({}, prop, newValue));
       
  4466   }, [kind, type, id, prop]);
       
  4467   return [value, setValue, fullValue];
       
  4468 }
       
  4469 /**
       
  4470  * Hook that returns block content getters and setters for
       
  4471  * the nearest provided entity of the specified type.
       
  4472  *
       
  4473  * The return value has the shape `[ blocks, onInput, onChange ]`.
       
  4474  * `onInput` is for block changes that don't create undo levels
       
  4475  * or dirty the post, non-persistent changes, and `onChange` is for
       
  4476  * peristent changes. They map directly to the props of a
       
  4477  * `BlockEditorProvider` and are intended to be used with it,
       
  4478  * or similar components or hooks.
       
  4479  *
       
  4480  * @param {string} kind                            The entity kind.
       
  4481  * @param {string} type                            The entity type.
       
  4482  * @param {Object} options
       
  4483  * @param {Object} [options.initialEdits]          Initial edits object for the entity record.
       
  4484  * @param {string} [options.blocksProp='blocks']   The name of the entity prop that holds the blocks array.
       
  4485  * @param {string} [options.contentProp='content'] The name of the entity prop that holds the serialized blocks.
       
  4486  * @param {string} [options.id]                    An entity ID to use instead of the context-provided one.
       
  4487  *
       
  4488  * @return {[WPBlock[], Function, Function]} The block array and setters.
       
  4489  */
       
  4490 
       
  4491 function useEntityBlockEditor(kind, type) {
       
  4492   var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
       
  4493       initialEdits = _ref2.initialEdits,
       
  4494       _ref2$blocksProp = _ref2.blocksProp,
       
  4495       blocksProp = _ref2$blocksProp === void 0 ? 'blocks' : _ref2$blocksProp,
       
  4496       _ref2$contentProp = _ref2.contentProp,
       
  4497       contentProp = _ref2$contentProp === void 0 ? 'content' : _ref2$contentProp,
       
  4498       _id = _ref2.id;
       
  4499 
       
  4500   var providerId = useEntityId(kind, type);
       
  4501   var id = _id !== null && _id !== void 0 ? _id : providerId;
       
  4502 
       
  4503   var _useEntityProp = useEntityProp(kind, type, contentProp, id),
       
  4504       _useEntityProp2 = Object(slicedToArray["a" /* default */])(_useEntityProp, 2),
       
  4505       content = _useEntityProp2[0],
       
  4506       setContent = _useEntityProp2[1];
       
  4507 
       
  4508   var _useDispatch2 = Object(external_this_wp_data_["useDispatch"])('core'),
       
  4509       editEntityRecord = _useDispatch2.editEntityRecord;
       
  4510 
       
  4511   Object(external_this_wp_element_["useEffect"])(function () {
       
  4512     if (initialEdits) {
       
  4513       editEntityRecord(kind, type, id, initialEdits, {
       
  4514         undoIgnore: true
       
  4515       });
       
  4516     }
       
  4517   }, [id]);
       
  4518   var initialBlocks = Object(external_this_wp_element_["useMemo"])(function () {
       
  4519     // Guard against other instances that might have
       
  4520     // set content to a function already.
       
  4521     if (content && typeof content !== 'function') {
       
  4522       var parsedContent = Object(external_this_wp_blocks_["parse"])(content);
       
  4523       return parsedContent.length ? parsedContent : [];
       
  4524     }
       
  4525 
       
  4526     return [];
       
  4527   }, [content]);
       
  4528 
       
  4529   var _useEntityProp3 = useEntityProp(kind, type, blocksProp, id),
       
  4530       _useEntityProp4 = Object(slicedToArray["a" /* default */])(_useEntityProp3, 2),
       
  4531       _useEntityProp4$ = _useEntityProp4[0],
       
  4532       blocks = _useEntityProp4$ === void 0 ? initialBlocks : _useEntityProp4$,
       
  4533       onInput = _useEntityProp4[1];
       
  4534 
       
  4535   var onChange = Object(external_this_wp_element_["useCallback"])(function (nextBlocks) {
       
  4536     onInput(nextBlocks); // Use a function edit to avoid serializing often.
       
  4537 
       
  4538     setContent(function (_ref3) {
       
  4539       var blocksToSerialize = _ref3.blocks;
       
  4540       return Object(external_this_wp_blocks_["serialize"])(blocksToSerialize);
       
  4541     });
       
  4542   }, [onInput, setContent]);
       
  4543   return [blocks, onInput, onChange];
  2359 }
  4544 }
  2360 
  4545 
  2361 // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/index.js
  4546 // CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/index.js
  2362 
  4547 
       
  4548 
       
  4549 function build_module_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
       
  4550 
       
  4551 function build_module_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { build_module_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { build_module_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
  2363 
  4552 
  2364 /**
  4553 /**
  2365  * WordPress dependencies
  4554  * WordPress dependencies
  2366  */
  4555  */
  2367 
  4556 
  2439   return result;
  4628   return result;
  2440 }, {});
  4629 }, {});
  2441 Object(external_this_wp_data_["registerStore"])(REDUCER_KEY, {
  4630 Object(external_this_wp_data_["registerStore"])(REDUCER_KEY, {
  2442   reducer: build_module_reducer,
  4631   reducer: build_module_reducer,
  2443   controls: build_module_controls,
  4632   controls: build_module_controls,
  2444   actions: Object(objectSpread["a" /* default */])({}, build_module_actions_namespaceObject, entityActions),
  4633   actions: build_module_objectSpread({}, build_module_actions_namespaceObject, {}, entityActions),
  2445   selectors: Object(objectSpread["a" /* default */])({}, build_module_selectors_namespaceObject, entitySelectors),
  4634   selectors: build_module_objectSpread({}, build_module_selectors_namespaceObject, {}, entitySelectors),
  2446   resolvers: Object(objectSpread["a" /* default */])({}, resolvers_namespaceObject, entityResolvers)
  4635   resolvers: build_module_objectSpread({}, resolvers_namespaceObject, {}, entityResolvers)
  2447 });
  4636 });
  2448 
  4637 
  2449 
  4638 
       
  4639 
       
  4640 
  2450 /***/ }),
  4641 /***/ }),
  2451 
  4642 
  2452 /***/ 37:
  4643 /***/ 45:
       
  4644 /***/ (function(module, exports) {
       
  4645 
       
  4646 (function() { module.exports = this["wp"]["apiFetch"]; }());
       
  4647 
       
  4648 /***/ }),
       
  4649 
       
  4650 /***/ 5:
  2453 /***/ (function(module, __webpack_exports__, __webpack_require__) {
  4651 /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2454 
  4652 
  2455 "use strict";
  4653 "use strict";
  2456 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayWithHoles; });
  4654 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; });
  2457 function _arrayWithHoles(arr) {
       
  2458   if (Array.isArray(arr)) return arr;
       
  2459 }
       
  2460 
       
  2461 /***/ }),
       
  2462 
       
  2463 /***/ 38:
       
  2464 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  2465 
       
  2466 "use strict";
       
  2467 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _nonIterableRest; });
       
  2468 function _nonIterableRest() {
       
  2469   throw new TypeError("Invalid attempt to destructure non-iterable instance");
       
  2470 }
       
  2471 
       
  2472 /***/ }),
       
  2473 
       
  2474 /***/ 49:
       
  2475 /***/ (function(module, exports) {
       
  2476 
       
  2477 (function() { module.exports = this["wp"]["deprecated"]; }());
       
  2478 
       
  2479 /***/ }),
       
  2480 
       
  2481 /***/ 5:
       
  2482 /***/ (function(module, exports) {
       
  2483 
       
  2484 (function() { module.exports = this["wp"]["data"]; }());
       
  2485 
       
  2486 /***/ }),
       
  2487 
       
  2488 /***/ 54:
       
  2489 /***/ (function(module, exports, __webpack_require__) {
       
  2490 
       
  2491 /**
       
  2492  * Copyright (c) 2014-present, Facebook, Inc.
       
  2493  *
       
  2494  * This source code is licensed under the MIT license found in the
       
  2495  * LICENSE file in the root directory of this source tree.
       
  2496  */
       
  2497 
       
  2498 // This method of obtaining a reference to the global object needs to be
       
  2499 // kept identical to the way it is obtained in runtime.js
       
  2500 var g = (function() {
       
  2501   return this || (typeof self === "object" && self);
       
  2502 })() || Function("return this")();
       
  2503 
       
  2504 // Use `getOwnPropertyNames` because not all browsers support calling
       
  2505 // `hasOwnProperty` on the global `self` object in a worker. See #183.
       
  2506 var hadRuntime = g.regeneratorRuntime &&
       
  2507   Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0;
       
  2508 
       
  2509 // Save the old regeneratorRuntime in case it needs to be restored later.
       
  2510 var oldRuntime = hadRuntime && g.regeneratorRuntime;
       
  2511 
       
  2512 // Force reevalutation of runtime.js.
       
  2513 g.regeneratorRuntime = undefined;
       
  2514 
       
  2515 module.exports = __webpack_require__(55);
       
  2516 
       
  2517 if (hadRuntime) {
       
  2518   // Restore the original runtime.
       
  2519   g.regeneratorRuntime = oldRuntime;
       
  2520 } else {
       
  2521   // Remove the global property added by runtime.js.
       
  2522   try {
       
  2523     delete g.regeneratorRuntime;
       
  2524   } catch(e) {
       
  2525     g.regeneratorRuntime = undefined;
       
  2526   }
       
  2527 }
       
  2528 
       
  2529 
       
  2530 /***/ }),
       
  2531 
       
  2532 /***/ 55:
       
  2533 /***/ (function(module, exports) {
       
  2534 
       
  2535 /**
       
  2536  * Copyright (c) 2014-present, Facebook, Inc.
       
  2537  *
       
  2538  * This source code is licensed under the MIT license found in the
       
  2539  * LICENSE file in the root directory of this source tree.
       
  2540  */
       
  2541 
       
  2542 !(function(global) {
       
  2543   "use strict";
       
  2544 
       
  2545   var Op = Object.prototype;
       
  2546   var hasOwn = Op.hasOwnProperty;
       
  2547   var undefined; // More compressible than void 0.
       
  2548   var $Symbol = typeof Symbol === "function" ? Symbol : {};
       
  2549   var iteratorSymbol = $Symbol.iterator || "@@iterator";
       
  2550   var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
       
  2551   var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
       
  2552 
       
  2553   var inModule = typeof module === "object";
       
  2554   var runtime = global.regeneratorRuntime;
       
  2555   if (runtime) {
       
  2556     if (inModule) {
       
  2557       // If regeneratorRuntime is defined globally and we're in a module,
       
  2558       // make the exports object identical to regeneratorRuntime.
       
  2559       module.exports = runtime;
       
  2560     }
       
  2561     // Don't bother evaluating the rest of this file if the runtime was
       
  2562     // already defined globally.
       
  2563     return;
       
  2564   }
       
  2565 
       
  2566   // Define the runtime globally (as expected by generated code) as either
       
  2567   // module.exports (if we're in a module) or a new, empty object.
       
  2568   runtime = global.regeneratorRuntime = inModule ? module.exports : {};
       
  2569 
       
  2570   function wrap(innerFn, outerFn, self, tryLocsList) {
       
  2571     // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
       
  2572     var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
       
  2573     var generator = Object.create(protoGenerator.prototype);
       
  2574     var context = new Context(tryLocsList || []);
       
  2575 
       
  2576     // The ._invoke method unifies the implementations of the .next,
       
  2577     // .throw, and .return methods.
       
  2578     generator._invoke = makeInvokeMethod(innerFn, self, context);
       
  2579 
       
  2580     return generator;
       
  2581   }
       
  2582   runtime.wrap = wrap;
       
  2583 
       
  2584   // Try/catch helper to minimize deoptimizations. Returns a completion
       
  2585   // record like context.tryEntries[i].completion. This interface could
       
  2586   // have been (and was previously) designed to take a closure to be
       
  2587   // invoked without arguments, but in all the cases we care about we
       
  2588   // already have an existing method we want to call, so there's no need
       
  2589   // to create a new function object. We can even get away with assuming
       
  2590   // the method takes exactly one argument, since that happens to be true
       
  2591   // in every case, so we don't have to touch the arguments object. The
       
  2592   // only additional allocation required is the completion record, which
       
  2593   // has a stable shape and so hopefully should be cheap to allocate.
       
  2594   function tryCatch(fn, obj, arg) {
       
  2595     try {
       
  2596       return { type: "normal", arg: fn.call(obj, arg) };
       
  2597     } catch (err) {
       
  2598       return { type: "throw", arg: err };
       
  2599     }
       
  2600   }
       
  2601 
       
  2602   var GenStateSuspendedStart = "suspendedStart";
       
  2603   var GenStateSuspendedYield = "suspendedYield";
       
  2604   var GenStateExecuting = "executing";
       
  2605   var GenStateCompleted = "completed";
       
  2606 
       
  2607   // Returning this object from the innerFn has the same effect as
       
  2608   // breaking out of the dispatch switch statement.
       
  2609   var ContinueSentinel = {};
       
  2610 
       
  2611   // Dummy constructor functions that we use as the .constructor and
       
  2612   // .constructor.prototype properties for functions that return Generator
       
  2613   // objects. For full spec compliance, you may wish to configure your
       
  2614   // minifier not to mangle the names of these two functions.
       
  2615   function Generator() {}
       
  2616   function GeneratorFunction() {}
       
  2617   function GeneratorFunctionPrototype() {}
       
  2618 
       
  2619   // This is a polyfill for %IteratorPrototype% for environments that
       
  2620   // don't natively support it.
       
  2621   var IteratorPrototype = {};
       
  2622   IteratorPrototype[iteratorSymbol] = function () {
       
  2623     return this;
       
  2624   };
       
  2625 
       
  2626   var getProto = Object.getPrototypeOf;
       
  2627   var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
       
  2628   if (NativeIteratorPrototype &&
       
  2629       NativeIteratorPrototype !== Op &&
       
  2630       hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
       
  2631     // This environment has a native %IteratorPrototype%; use it instead
       
  2632     // of the polyfill.
       
  2633     IteratorPrototype = NativeIteratorPrototype;
       
  2634   }
       
  2635 
       
  2636   var Gp = GeneratorFunctionPrototype.prototype =
       
  2637     Generator.prototype = Object.create(IteratorPrototype);
       
  2638   GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
       
  2639   GeneratorFunctionPrototype.constructor = GeneratorFunction;
       
  2640   GeneratorFunctionPrototype[toStringTagSymbol] =
       
  2641     GeneratorFunction.displayName = "GeneratorFunction";
       
  2642 
       
  2643   // Helper for defining the .next, .throw, and .return methods of the
       
  2644   // Iterator interface in terms of a single ._invoke method.
       
  2645   function defineIteratorMethods(prototype) {
       
  2646     ["next", "throw", "return"].forEach(function(method) {
       
  2647       prototype[method] = function(arg) {
       
  2648         return this._invoke(method, arg);
       
  2649       };
       
  2650     });
       
  2651   }
       
  2652 
       
  2653   runtime.isGeneratorFunction = function(genFun) {
       
  2654     var ctor = typeof genFun === "function" && genFun.constructor;
       
  2655     return ctor
       
  2656       ? ctor === GeneratorFunction ||
       
  2657         // For the native GeneratorFunction constructor, the best we can
       
  2658         // do is to check its .name property.
       
  2659         (ctor.displayName || ctor.name) === "GeneratorFunction"
       
  2660       : false;
       
  2661   };
       
  2662 
       
  2663   runtime.mark = function(genFun) {
       
  2664     if (Object.setPrototypeOf) {
       
  2665       Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
       
  2666     } else {
       
  2667       genFun.__proto__ = GeneratorFunctionPrototype;
       
  2668       if (!(toStringTagSymbol in genFun)) {
       
  2669         genFun[toStringTagSymbol] = "GeneratorFunction";
       
  2670       }
       
  2671     }
       
  2672     genFun.prototype = Object.create(Gp);
       
  2673     return genFun;
       
  2674   };
       
  2675 
       
  2676   // Within the body of any async function, `await x` is transformed to
       
  2677   // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
       
  2678   // `hasOwn.call(value, "__await")` to determine if the yielded value is
       
  2679   // meant to be awaited.
       
  2680   runtime.awrap = function(arg) {
       
  2681     return { __await: arg };
       
  2682   };
       
  2683 
       
  2684   function AsyncIterator(generator) {
       
  2685     function invoke(method, arg, resolve, reject) {
       
  2686       var record = tryCatch(generator[method], generator, arg);
       
  2687       if (record.type === "throw") {
       
  2688         reject(record.arg);
       
  2689       } else {
       
  2690         var result = record.arg;
       
  2691         var value = result.value;
       
  2692         if (value &&
       
  2693             typeof value === "object" &&
       
  2694             hasOwn.call(value, "__await")) {
       
  2695           return Promise.resolve(value.__await).then(function(value) {
       
  2696             invoke("next", value, resolve, reject);
       
  2697           }, function(err) {
       
  2698             invoke("throw", err, resolve, reject);
       
  2699           });
       
  2700         }
       
  2701 
       
  2702         return Promise.resolve(value).then(function(unwrapped) {
       
  2703           // When a yielded Promise is resolved, its final value becomes
       
  2704           // the .value of the Promise<{value,done}> result for the
       
  2705           // current iteration.
       
  2706           result.value = unwrapped;
       
  2707           resolve(result);
       
  2708         }, function(error) {
       
  2709           // If a rejected Promise was yielded, throw the rejection back
       
  2710           // into the async generator function so it can be handled there.
       
  2711           return invoke("throw", error, resolve, reject);
       
  2712         });
       
  2713       }
       
  2714     }
       
  2715 
       
  2716     var previousPromise;
       
  2717 
       
  2718     function enqueue(method, arg) {
       
  2719       function callInvokeWithMethodAndArg() {
       
  2720         return new Promise(function(resolve, reject) {
       
  2721           invoke(method, arg, resolve, reject);
       
  2722         });
       
  2723       }
       
  2724 
       
  2725       return previousPromise =
       
  2726         // If enqueue has been called before, then we want to wait until
       
  2727         // all previous Promises have been resolved before calling invoke,
       
  2728         // so that results are always delivered in the correct order. If
       
  2729         // enqueue has not been called before, then it is important to
       
  2730         // call invoke immediately, without waiting on a callback to fire,
       
  2731         // so that the async generator function has the opportunity to do
       
  2732         // any necessary setup in a predictable way. This predictability
       
  2733         // is why the Promise constructor synchronously invokes its
       
  2734         // executor callback, and why async functions synchronously
       
  2735         // execute code before the first await. Since we implement simple
       
  2736         // async functions in terms of async generators, it is especially
       
  2737         // important to get this right, even though it requires care.
       
  2738         previousPromise ? previousPromise.then(
       
  2739           callInvokeWithMethodAndArg,
       
  2740           // Avoid propagating failures to Promises returned by later
       
  2741           // invocations of the iterator.
       
  2742           callInvokeWithMethodAndArg
       
  2743         ) : callInvokeWithMethodAndArg();
       
  2744     }
       
  2745 
       
  2746     // Define the unified helper method that is used to implement .next,
       
  2747     // .throw, and .return (see defineIteratorMethods).
       
  2748     this._invoke = enqueue;
       
  2749   }
       
  2750 
       
  2751   defineIteratorMethods(AsyncIterator.prototype);
       
  2752   AsyncIterator.prototype[asyncIteratorSymbol] = function () {
       
  2753     return this;
       
  2754   };
       
  2755   runtime.AsyncIterator = AsyncIterator;
       
  2756 
       
  2757   // Note that simple async functions are implemented on top of
       
  2758   // AsyncIterator objects; they just return a Promise for the value of
       
  2759   // the final result produced by the iterator.
       
  2760   runtime.async = function(innerFn, outerFn, self, tryLocsList) {
       
  2761     var iter = new AsyncIterator(
       
  2762       wrap(innerFn, outerFn, self, tryLocsList)
       
  2763     );
       
  2764 
       
  2765     return runtime.isGeneratorFunction(outerFn)
       
  2766       ? iter // If outerFn is a generator, return the full iterator.
       
  2767       : iter.next().then(function(result) {
       
  2768           return result.done ? result.value : iter.next();
       
  2769         });
       
  2770   };
       
  2771 
       
  2772   function makeInvokeMethod(innerFn, self, context) {
       
  2773     var state = GenStateSuspendedStart;
       
  2774 
       
  2775     return function invoke(method, arg) {
       
  2776       if (state === GenStateExecuting) {
       
  2777         throw new Error("Generator is already running");
       
  2778       }
       
  2779 
       
  2780       if (state === GenStateCompleted) {
       
  2781         if (method === "throw") {
       
  2782           throw arg;
       
  2783         }
       
  2784 
       
  2785         // Be forgiving, per 25.3.3.3.3 of the spec:
       
  2786         // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
       
  2787         return doneResult();
       
  2788       }
       
  2789 
       
  2790       context.method = method;
       
  2791       context.arg = arg;
       
  2792 
       
  2793       while (true) {
       
  2794         var delegate = context.delegate;
       
  2795         if (delegate) {
       
  2796           var delegateResult = maybeInvokeDelegate(delegate, context);
       
  2797           if (delegateResult) {
       
  2798             if (delegateResult === ContinueSentinel) continue;
       
  2799             return delegateResult;
       
  2800           }
       
  2801         }
       
  2802 
       
  2803         if (context.method === "next") {
       
  2804           // Setting context._sent for legacy support of Babel's
       
  2805           // function.sent implementation.
       
  2806           context.sent = context._sent = context.arg;
       
  2807 
       
  2808         } else if (context.method === "throw") {
       
  2809           if (state === GenStateSuspendedStart) {
       
  2810             state = GenStateCompleted;
       
  2811             throw context.arg;
       
  2812           }
       
  2813 
       
  2814           context.dispatchException(context.arg);
       
  2815 
       
  2816         } else if (context.method === "return") {
       
  2817           context.abrupt("return", context.arg);
       
  2818         }
       
  2819 
       
  2820         state = GenStateExecuting;
       
  2821 
       
  2822         var record = tryCatch(innerFn, self, context);
       
  2823         if (record.type === "normal") {
       
  2824           // If an exception is thrown from innerFn, we leave state ===
       
  2825           // GenStateExecuting and loop back for another invocation.
       
  2826           state = context.done
       
  2827             ? GenStateCompleted
       
  2828             : GenStateSuspendedYield;
       
  2829 
       
  2830           if (record.arg === ContinueSentinel) {
       
  2831             continue;
       
  2832           }
       
  2833 
       
  2834           return {
       
  2835             value: record.arg,
       
  2836             done: context.done
       
  2837           };
       
  2838 
       
  2839         } else if (record.type === "throw") {
       
  2840           state = GenStateCompleted;
       
  2841           // Dispatch the exception by looping back around to the
       
  2842           // context.dispatchException(context.arg) call above.
       
  2843           context.method = "throw";
       
  2844           context.arg = record.arg;
       
  2845         }
       
  2846       }
       
  2847     };
       
  2848   }
       
  2849 
       
  2850   // Call delegate.iterator[context.method](context.arg) and handle the
       
  2851   // result, either by returning a { value, done } result from the
       
  2852   // delegate iterator, or by modifying context.method and context.arg,
       
  2853   // setting context.delegate to null, and returning the ContinueSentinel.
       
  2854   function maybeInvokeDelegate(delegate, context) {
       
  2855     var method = delegate.iterator[context.method];
       
  2856     if (method === undefined) {
       
  2857       // A .throw or .return when the delegate iterator has no .throw
       
  2858       // method always terminates the yield* loop.
       
  2859       context.delegate = null;
       
  2860 
       
  2861       if (context.method === "throw") {
       
  2862         if (delegate.iterator.return) {
       
  2863           // If the delegate iterator has a return method, give it a
       
  2864           // chance to clean up.
       
  2865           context.method = "return";
       
  2866           context.arg = undefined;
       
  2867           maybeInvokeDelegate(delegate, context);
       
  2868 
       
  2869           if (context.method === "throw") {
       
  2870             // If maybeInvokeDelegate(context) changed context.method from
       
  2871             // "return" to "throw", let that override the TypeError below.
       
  2872             return ContinueSentinel;
       
  2873           }
       
  2874         }
       
  2875 
       
  2876         context.method = "throw";
       
  2877         context.arg = new TypeError(
       
  2878           "The iterator does not provide a 'throw' method");
       
  2879       }
       
  2880 
       
  2881       return ContinueSentinel;
       
  2882     }
       
  2883 
       
  2884     var record = tryCatch(method, delegate.iterator, context.arg);
       
  2885 
       
  2886     if (record.type === "throw") {
       
  2887       context.method = "throw";
       
  2888       context.arg = record.arg;
       
  2889       context.delegate = null;
       
  2890       return ContinueSentinel;
       
  2891     }
       
  2892 
       
  2893     var info = record.arg;
       
  2894 
       
  2895     if (! info) {
       
  2896       context.method = "throw";
       
  2897       context.arg = new TypeError("iterator result is not an object");
       
  2898       context.delegate = null;
       
  2899       return ContinueSentinel;
       
  2900     }
       
  2901 
       
  2902     if (info.done) {
       
  2903       // Assign the result of the finished delegate to the temporary
       
  2904       // variable specified by delegate.resultName (see delegateYield).
       
  2905       context[delegate.resultName] = info.value;
       
  2906 
       
  2907       // Resume execution at the desired location (see delegateYield).
       
  2908       context.next = delegate.nextLoc;
       
  2909 
       
  2910       // If context.method was "throw" but the delegate handled the
       
  2911       // exception, let the outer generator proceed normally. If
       
  2912       // context.method was "next", forget context.arg since it has been
       
  2913       // "consumed" by the delegate iterator. If context.method was
       
  2914       // "return", allow the original .return call to continue in the
       
  2915       // outer generator.
       
  2916       if (context.method !== "return") {
       
  2917         context.method = "next";
       
  2918         context.arg = undefined;
       
  2919       }
       
  2920 
       
  2921     } else {
       
  2922       // Re-yield the result returned by the delegate method.
       
  2923       return info;
       
  2924     }
       
  2925 
       
  2926     // The delegate iterator is finished, so forget it and continue with
       
  2927     // the outer generator.
       
  2928     context.delegate = null;
       
  2929     return ContinueSentinel;
       
  2930   }
       
  2931 
       
  2932   // Define Generator.prototype.{next,throw,return} in terms of the
       
  2933   // unified ._invoke helper method.
       
  2934   defineIteratorMethods(Gp);
       
  2935 
       
  2936   Gp[toStringTagSymbol] = "Generator";
       
  2937 
       
  2938   // A Generator should always return itself as the iterator object when the
       
  2939   // @@iterator function is called on it. Some browsers' implementations of the
       
  2940   // iterator prototype chain incorrectly implement this, causing the Generator
       
  2941   // object to not be returned from this call. This ensures that doesn't happen.
       
  2942   // See https://github.com/facebook/regenerator/issues/274 for more details.
       
  2943   Gp[iteratorSymbol] = function() {
       
  2944     return this;
       
  2945   };
       
  2946 
       
  2947   Gp.toString = function() {
       
  2948     return "[object Generator]";
       
  2949   };
       
  2950 
       
  2951   function pushTryEntry(locs) {
       
  2952     var entry = { tryLoc: locs[0] };
       
  2953 
       
  2954     if (1 in locs) {
       
  2955       entry.catchLoc = locs[1];
       
  2956     }
       
  2957 
       
  2958     if (2 in locs) {
       
  2959       entry.finallyLoc = locs[2];
       
  2960       entry.afterLoc = locs[3];
       
  2961     }
       
  2962 
       
  2963     this.tryEntries.push(entry);
       
  2964   }
       
  2965 
       
  2966   function resetTryEntry(entry) {
       
  2967     var record = entry.completion || {};
       
  2968     record.type = "normal";
       
  2969     delete record.arg;
       
  2970     entry.completion = record;
       
  2971   }
       
  2972 
       
  2973   function Context(tryLocsList) {
       
  2974     // The root entry object (effectively a try statement without a catch
       
  2975     // or a finally block) gives us a place to store values thrown from
       
  2976     // locations where there is no enclosing try statement.
       
  2977     this.tryEntries = [{ tryLoc: "root" }];
       
  2978     tryLocsList.forEach(pushTryEntry, this);
       
  2979     this.reset(true);
       
  2980   }
       
  2981 
       
  2982   runtime.keys = function(object) {
       
  2983     var keys = [];
       
  2984     for (var key in object) {
       
  2985       keys.push(key);
       
  2986     }
       
  2987     keys.reverse();
       
  2988 
       
  2989     // Rather than returning an object with a next method, we keep
       
  2990     // things simple and return the next function itself.
       
  2991     return function next() {
       
  2992       while (keys.length) {
       
  2993         var key = keys.pop();
       
  2994         if (key in object) {
       
  2995           next.value = key;
       
  2996           next.done = false;
       
  2997           return next;
       
  2998         }
       
  2999       }
       
  3000 
       
  3001       // To avoid creating an additional object, we just hang the .value
       
  3002       // and .done properties off the next function object itself. This
       
  3003       // also ensures that the minifier will not anonymize the function.
       
  3004       next.done = true;
       
  3005       return next;
       
  3006     };
       
  3007   };
       
  3008 
       
  3009   function values(iterable) {
       
  3010     if (iterable) {
       
  3011       var iteratorMethod = iterable[iteratorSymbol];
       
  3012       if (iteratorMethod) {
       
  3013         return iteratorMethod.call(iterable);
       
  3014       }
       
  3015 
       
  3016       if (typeof iterable.next === "function") {
       
  3017         return iterable;
       
  3018       }
       
  3019 
       
  3020       if (!isNaN(iterable.length)) {
       
  3021         var i = -1, next = function next() {
       
  3022           while (++i < iterable.length) {
       
  3023             if (hasOwn.call(iterable, i)) {
       
  3024               next.value = iterable[i];
       
  3025               next.done = false;
       
  3026               return next;
       
  3027             }
       
  3028           }
       
  3029 
       
  3030           next.value = undefined;
       
  3031           next.done = true;
       
  3032 
       
  3033           return next;
       
  3034         };
       
  3035 
       
  3036         return next.next = next;
       
  3037       }
       
  3038     }
       
  3039 
       
  3040     // Return an iterator with no values.
       
  3041     return { next: doneResult };
       
  3042   }
       
  3043   runtime.values = values;
       
  3044 
       
  3045   function doneResult() {
       
  3046     return { value: undefined, done: true };
       
  3047   }
       
  3048 
       
  3049   Context.prototype = {
       
  3050     constructor: Context,
       
  3051 
       
  3052     reset: function(skipTempReset) {
       
  3053       this.prev = 0;
       
  3054       this.next = 0;
       
  3055       // Resetting context._sent for legacy support of Babel's
       
  3056       // function.sent implementation.
       
  3057       this.sent = this._sent = undefined;
       
  3058       this.done = false;
       
  3059       this.delegate = null;
       
  3060 
       
  3061       this.method = "next";
       
  3062       this.arg = undefined;
       
  3063 
       
  3064       this.tryEntries.forEach(resetTryEntry);
       
  3065 
       
  3066       if (!skipTempReset) {
       
  3067         for (var name in this) {
       
  3068           // Not sure about the optimal order of these conditions:
       
  3069           if (name.charAt(0) === "t" &&
       
  3070               hasOwn.call(this, name) &&
       
  3071               !isNaN(+name.slice(1))) {
       
  3072             this[name] = undefined;
       
  3073           }
       
  3074         }
       
  3075       }
       
  3076     },
       
  3077 
       
  3078     stop: function() {
       
  3079       this.done = true;
       
  3080 
       
  3081       var rootEntry = this.tryEntries[0];
       
  3082       var rootRecord = rootEntry.completion;
       
  3083       if (rootRecord.type === "throw") {
       
  3084         throw rootRecord.arg;
       
  3085       }
       
  3086 
       
  3087       return this.rval;
       
  3088     },
       
  3089 
       
  3090     dispatchException: function(exception) {
       
  3091       if (this.done) {
       
  3092         throw exception;
       
  3093       }
       
  3094 
       
  3095       var context = this;
       
  3096       function handle(loc, caught) {
       
  3097         record.type = "throw";
       
  3098         record.arg = exception;
       
  3099         context.next = loc;
       
  3100 
       
  3101         if (caught) {
       
  3102           // If the dispatched exception was caught by a catch block,
       
  3103           // then let that catch block handle the exception normally.
       
  3104           context.method = "next";
       
  3105           context.arg = undefined;
       
  3106         }
       
  3107 
       
  3108         return !! caught;
       
  3109       }
       
  3110 
       
  3111       for (var i = this.tryEntries.length - 1; i >= 0; --i) {
       
  3112         var entry = this.tryEntries[i];
       
  3113         var record = entry.completion;
       
  3114 
       
  3115         if (entry.tryLoc === "root") {
       
  3116           // Exception thrown outside of any try block that could handle
       
  3117           // it, so set the completion value of the entire function to
       
  3118           // throw the exception.
       
  3119           return handle("end");
       
  3120         }
       
  3121 
       
  3122         if (entry.tryLoc <= this.prev) {
       
  3123           var hasCatch = hasOwn.call(entry, "catchLoc");
       
  3124           var hasFinally = hasOwn.call(entry, "finallyLoc");
       
  3125 
       
  3126           if (hasCatch && hasFinally) {
       
  3127             if (this.prev < entry.catchLoc) {
       
  3128               return handle(entry.catchLoc, true);
       
  3129             } else if (this.prev < entry.finallyLoc) {
       
  3130               return handle(entry.finallyLoc);
       
  3131             }
       
  3132 
       
  3133           } else if (hasCatch) {
       
  3134             if (this.prev < entry.catchLoc) {
       
  3135               return handle(entry.catchLoc, true);
       
  3136             }
       
  3137 
       
  3138           } else if (hasFinally) {
       
  3139             if (this.prev < entry.finallyLoc) {
       
  3140               return handle(entry.finallyLoc);
       
  3141             }
       
  3142 
       
  3143           } else {
       
  3144             throw new Error("try statement without catch or finally");
       
  3145           }
       
  3146         }
       
  3147       }
       
  3148     },
       
  3149 
       
  3150     abrupt: function(type, arg) {
       
  3151       for (var i = this.tryEntries.length - 1; i >= 0; --i) {
       
  3152         var entry = this.tryEntries[i];
       
  3153         if (entry.tryLoc <= this.prev &&
       
  3154             hasOwn.call(entry, "finallyLoc") &&
       
  3155             this.prev < entry.finallyLoc) {
       
  3156           var finallyEntry = entry;
       
  3157           break;
       
  3158         }
       
  3159       }
       
  3160 
       
  3161       if (finallyEntry &&
       
  3162           (type === "break" ||
       
  3163            type === "continue") &&
       
  3164           finallyEntry.tryLoc <= arg &&
       
  3165           arg <= finallyEntry.finallyLoc) {
       
  3166         // Ignore the finally entry if control is not jumping to a
       
  3167         // location outside the try/catch block.
       
  3168         finallyEntry = null;
       
  3169       }
       
  3170 
       
  3171       var record = finallyEntry ? finallyEntry.completion : {};
       
  3172       record.type = type;
       
  3173       record.arg = arg;
       
  3174 
       
  3175       if (finallyEntry) {
       
  3176         this.method = "next";
       
  3177         this.next = finallyEntry.finallyLoc;
       
  3178         return ContinueSentinel;
       
  3179       }
       
  3180 
       
  3181       return this.complete(record);
       
  3182     },
       
  3183 
       
  3184     complete: function(record, afterLoc) {
       
  3185       if (record.type === "throw") {
       
  3186         throw record.arg;
       
  3187       }
       
  3188 
       
  3189       if (record.type === "break" ||
       
  3190           record.type === "continue") {
       
  3191         this.next = record.arg;
       
  3192       } else if (record.type === "return") {
       
  3193         this.rval = this.arg = record.arg;
       
  3194         this.method = "return";
       
  3195         this.next = "end";
       
  3196       } else if (record.type === "normal" && afterLoc) {
       
  3197         this.next = afterLoc;
       
  3198       }
       
  3199 
       
  3200       return ContinueSentinel;
       
  3201     },
       
  3202 
       
  3203     finish: function(finallyLoc) {
       
  3204       for (var i = this.tryEntries.length - 1; i >= 0; --i) {
       
  3205         var entry = this.tryEntries[i];
       
  3206         if (entry.finallyLoc === finallyLoc) {
       
  3207           this.complete(entry.completion, entry.afterLoc);
       
  3208           resetTryEntry(entry);
       
  3209           return ContinueSentinel;
       
  3210         }
       
  3211       }
       
  3212     },
       
  3213 
       
  3214     "catch": function(tryLoc) {
       
  3215       for (var i = this.tryEntries.length - 1; i >= 0; --i) {
       
  3216         var entry = this.tryEntries[i];
       
  3217         if (entry.tryLoc === tryLoc) {
       
  3218           var record = entry.completion;
       
  3219           if (record.type === "throw") {
       
  3220             var thrown = record.arg;
       
  3221             resetTryEntry(entry);
       
  3222           }
       
  3223           return thrown;
       
  3224         }
       
  3225       }
       
  3226 
       
  3227       // The context.catch method must only be called with a location
       
  3228       // argument that corresponds to a known catch block.
       
  3229       throw new Error("illegal catch attempt");
       
  3230     },
       
  3231 
       
  3232     delegateYield: function(iterable, resultName, nextLoc) {
       
  3233       this.delegate = {
       
  3234         iterator: values(iterable),
       
  3235         resultName: resultName,
       
  3236         nextLoc: nextLoc
       
  3237       };
       
  3238 
       
  3239       if (this.method === "next") {
       
  3240         // Deliberately forget the last sent value so that we don't
       
  3241         // accidentally pass it on to the delegate.
       
  3242         this.arg = undefined;
       
  3243       }
       
  3244 
       
  3245       return ContinueSentinel;
       
  3246     }
       
  3247   };
       
  3248 })(
       
  3249   // In sloppy mode, unbound `this` refers to the global object, fallback to
       
  3250   // Function constructor if we're in global strict mode. That is sadly a form
       
  3251   // of indirect eval which violates Content Security Policy.
       
  3252   (function() {
       
  3253     return this || (typeof self === "object" && self);
       
  3254   })() || Function("return this")()
       
  3255 );
       
  3256 
       
  3257 
       
  3258 /***/ }),
       
  3259 
       
  3260 /***/ 59:
       
  3261 /***/ (function(module, exports) {
       
  3262 
       
  3263 var g;
       
  3264 
       
  3265 // This works in non-strict mode
       
  3266 g = (function() {
       
  3267 	return this;
       
  3268 })();
       
  3269 
       
  3270 try {
       
  3271 	// This works if eval is allowed (see CSP)
       
  3272 	g = g || new Function("return this")();
       
  3273 } catch (e) {
       
  3274 	// This works if the window reference is available
       
  3275 	if (typeof window === "object") g = window;
       
  3276 }
       
  3277 
       
  3278 // g can still be undefined, but nothing to do about it...
       
  3279 // We return undefined, instead of nothing here, so it's
       
  3280 // easier to handle this case. if(!global) { ...}
       
  3281 
       
  3282 module.exports = g;
       
  3283 
       
  3284 
       
  3285 /***/ }),
       
  3286 
       
  3287 /***/ 7:
       
  3288 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  3289 
       
  3290 "use strict";
       
  3291 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectSpread; });
       
  3292 /* harmony import */ var _defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15);
       
  3293 
       
  3294 function _objectSpread(target) {
       
  3295   for (var i = 1; i < arguments.length; i++) {
       
  3296     var source = arguments[i] != null ? arguments[i] : {};
       
  3297     var ownKeys = Object.keys(source);
       
  3298 
       
  3299     if (typeof Object.getOwnPropertySymbols === 'function') {
       
  3300       ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
       
  3301         return Object.getOwnPropertyDescriptor(source, sym).enumerable;
       
  3302       }));
       
  3303     }
       
  3304 
       
  3305     ownKeys.forEach(function (key) {
       
  3306       Object(_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(target, key, source[key]);
       
  3307     });
       
  3308   }
       
  3309 
       
  3310   return target;
       
  3311 }
       
  3312 
       
  3313 /***/ }),
       
  3314 
       
  3315 /***/ 71:
       
  3316 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  3317 
       
  3318 "use strict";
       
  3319 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return createStore; });
       
  3320 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return combineReducers; });
       
  3321 /* unused harmony export bindActionCreators */
       
  3322 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return applyMiddleware; });
       
  3323 /* unused harmony export compose */
       
  3324 /* unused harmony export __DO_NOT_USE__ActionTypes */
       
  3325 /* harmony import */ var symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(77);
       
  3326 
       
  3327 
       
  3328 /**
       
  3329  * These are private action types reserved by Redux.
       
  3330  * For any unknown actions, you must return the current state.
       
  3331  * If the current state is undefined, you must return the initial state.
       
  3332  * Do not reference these action types directly in your code.
       
  3333  */
       
  3334 var randomString = function randomString() {
       
  3335   return Math.random().toString(36).substring(7).split('').join('.');
       
  3336 };
       
  3337 
       
  3338 var ActionTypes = {
       
  3339   INIT: "@@redux/INIT" + randomString(),
       
  3340   REPLACE: "@@redux/REPLACE" + randomString(),
       
  3341   PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {
       
  3342     return "@@redux/PROBE_UNKNOWN_ACTION" + randomString();
       
  3343   }
       
  3344 };
       
  3345 
       
  3346 /**
       
  3347  * @param {any} obj The object to inspect.
       
  3348  * @returns {boolean} True if the argument appears to be a plain object.
       
  3349  */
       
  3350 function isPlainObject(obj) {
       
  3351   if (typeof obj !== 'object' || obj === null) return false;
       
  3352   var proto = obj;
       
  3353 
       
  3354   while (Object.getPrototypeOf(proto) !== null) {
       
  3355     proto = Object.getPrototypeOf(proto);
       
  3356   }
       
  3357 
       
  3358   return Object.getPrototypeOf(obj) === proto;
       
  3359 }
       
  3360 
       
  3361 /**
       
  3362  * Creates a Redux store that holds the state tree.
       
  3363  * The only way to change the data in the store is to call `dispatch()` on it.
       
  3364  *
       
  3365  * There should only be a single store in your app. To specify how different
       
  3366  * parts of the state tree respond to actions, you may combine several reducers
       
  3367  * into a single reducer function by using `combineReducers`.
       
  3368  *
       
  3369  * @param {Function} reducer A function that returns the next state tree, given
       
  3370  * the current state tree and the action to handle.
       
  3371  *
       
  3372  * @param {any} [preloadedState] The initial state. You may optionally specify it
       
  3373  * to hydrate the state from the server in universal apps, or to restore a
       
  3374  * previously serialized user session.
       
  3375  * If you use `combineReducers` to produce the root reducer function, this must be
       
  3376  * an object with the same shape as `combineReducers` keys.
       
  3377  *
       
  3378  * @param {Function} [enhancer] The store enhancer. You may optionally specify it
       
  3379  * to enhance the store with third-party capabilities such as middleware,
       
  3380  * time travel, persistence, etc. The only store enhancer that ships with Redux
       
  3381  * is `applyMiddleware()`.
       
  3382  *
       
  3383  * @returns {Store} A Redux store that lets you read the state, dispatch actions
       
  3384  * and subscribe to changes.
       
  3385  */
       
  3386 
       
  3387 function createStore(reducer, preloadedState, enhancer) {
       
  3388   var _ref2;
       
  3389 
       
  3390   if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') {
       
  3391     throw new Error('It looks like you are passing several store enhancers to ' + 'createStore(). This is not supported. Instead, compose them ' + 'together to a single function');
       
  3392   }
       
  3393 
       
  3394   if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {
       
  3395     enhancer = preloadedState;
       
  3396     preloadedState = undefined;
       
  3397   }
       
  3398 
       
  3399   if (typeof enhancer !== 'undefined') {
       
  3400     if (typeof enhancer !== 'function') {
       
  3401       throw new Error('Expected the enhancer to be a function.');
       
  3402     }
       
  3403 
       
  3404     return enhancer(createStore)(reducer, preloadedState);
       
  3405   }
       
  3406 
       
  3407   if (typeof reducer !== 'function') {
       
  3408     throw new Error('Expected the reducer to be a function.');
       
  3409   }
       
  3410 
       
  3411   var currentReducer = reducer;
       
  3412   var currentState = preloadedState;
       
  3413   var currentListeners = [];
       
  3414   var nextListeners = currentListeners;
       
  3415   var isDispatching = false;
       
  3416 
       
  3417   function ensureCanMutateNextListeners() {
       
  3418     if (nextListeners === currentListeners) {
       
  3419       nextListeners = currentListeners.slice();
       
  3420     }
       
  3421   }
       
  3422   /**
       
  3423    * Reads the state tree managed by the store.
       
  3424    *
       
  3425    * @returns {any} The current state tree of your application.
       
  3426    */
       
  3427 
       
  3428 
       
  3429   function getState() {
       
  3430     if (isDispatching) {
       
  3431       throw new Error('You may not call store.getState() while the reducer is executing. ' + 'The reducer has already received the state as an argument. ' + 'Pass it down from the top reducer instead of reading it from the store.');
       
  3432     }
       
  3433 
       
  3434     return currentState;
       
  3435   }
       
  3436   /**
       
  3437    * Adds a change listener. It will be called any time an action is dispatched,
       
  3438    * and some part of the state tree may potentially have changed. You may then
       
  3439    * call `getState()` to read the current state tree inside the callback.
       
  3440    *
       
  3441    * You may call `dispatch()` from a change listener, with the following
       
  3442    * caveats:
       
  3443    *
       
  3444    * 1. The subscriptions are snapshotted just before every `dispatch()` call.
       
  3445    * If you subscribe or unsubscribe while the listeners are being invoked, this
       
  3446    * will not have any effect on the `dispatch()` that is currently in progress.
       
  3447    * However, the next `dispatch()` call, whether nested or not, will use a more
       
  3448    * recent snapshot of the subscription list.
       
  3449    *
       
  3450    * 2. The listener should not expect to see all state changes, as the state
       
  3451    * might have been updated multiple times during a nested `dispatch()` before
       
  3452    * the listener is called. It is, however, guaranteed that all subscribers
       
  3453    * registered before the `dispatch()` started will be called with the latest
       
  3454    * state by the time it exits.
       
  3455    *
       
  3456    * @param {Function} listener A callback to be invoked on every dispatch.
       
  3457    * @returns {Function} A function to remove this change listener.
       
  3458    */
       
  3459 
       
  3460 
       
  3461   function subscribe(listener) {
       
  3462     if (typeof listener !== 'function') {
       
  3463       throw new Error('Expected the listener to be a function.');
       
  3464     }
       
  3465 
       
  3466     if (isDispatching) {
       
  3467       throw new Error('You may not call store.subscribe() while the reducer is executing. ' + 'If you would like to be notified after the store has been updated, subscribe from a ' + 'component and invoke store.getState() in the callback to access the latest state. ' + 'See https://redux.js.org/api-reference/store#subscribe(listener) for more details.');
       
  3468     }
       
  3469 
       
  3470     var isSubscribed = true;
       
  3471     ensureCanMutateNextListeners();
       
  3472     nextListeners.push(listener);
       
  3473     return function unsubscribe() {
       
  3474       if (!isSubscribed) {
       
  3475         return;
       
  3476       }
       
  3477 
       
  3478       if (isDispatching) {
       
  3479         throw new Error('You may not unsubscribe from a store listener while the reducer is executing. ' + 'See https://redux.js.org/api-reference/store#subscribe(listener) for more details.');
       
  3480       }
       
  3481 
       
  3482       isSubscribed = false;
       
  3483       ensureCanMutateNextListeners();
       
  3484       var index = nextListeners.indexOf(listener);
       
  3485       nextListeners.splice(index, 1);
       
  3486     };
       
  3487   }
       
  3488   /**
       
  3489    * Dispatches an action. It is the only way to trigger a state change.
       
  3490    *
       
  3491    * The `reducer` function, used to create the store, will be called with the
       
  3492    * current state tree and the given `action`. Its return value will
       
  3493    * be considered the **next** state of the tree, and the change listeners
       
  3494    * will be notified.
       
  3495    *
       
  3496    * The base implementation only supports plain object actions. If you want to
       
  3497    * dispatch a Promise, an Observable, a thunk, or something else, you need to
       
  3498    * wrap your store creating function into the corresponding middleware. For
       
  3499    * example, see the documentation for the `redux-thunk` package. Even the
       
  3500    * middleware will eventually dispatch plain object actions using this method.
       
  3501    *
       
  3502    * @param {Object} action A plain object representing “what changed”. It is
       
  3503    * a good idea to keep actions serializable so you can record and replay user
       
  3504    * sessions, or use the time travelling `redux-devtools`. An action must have
       
  3505    * a `type` property which may not be `undefined`. It is a good idea to use
       
  3506    * string constants for action types.
       
  3507    *
       
  3508    * @returns {Object} For convenience, the same action object you dispatched.
       
  3509    *
       
  3510    * Note that, if you use a custom middleware, it may wrap `dispatch()` to
       
  3511    * return something else (for example, a Promise you can await).
       
  3512    */
       
  3513 
       
  3514 
       
  3515   function dispatch(action) {
       
  3516     if (!isPlainObject(action)) {
       
  3517       throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');
       
  3518     }
       
  3519 
       
  3520     if (typeof action.type === 'undefined') {
       
  3521       throw new Error('Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?');
       
  3522     }
       
  3523 
       
  3524     if (isDispatching) {
       
  3525       throw new Error('Reducers may not dispatch actions.');
       
  3526     }
       
  3527 
       
  3528     try {
       
  3529       isDispatching = true;
       
  3530       currentState = currentReducer(currentState, action);
       
  3531     } finally {
       
  3532       isDispatching = false;
       
  3533     }
       
  3534 
       
  3535     var listeners = currentListeners = nextListeners;
       
  3536 
       
  3537     for (var i = 0; i < listeners.length; i++) {
       
  3538       var listener = listeners[i];
       
  3539       listener();
       
  3540     }
       
  3541 
       
  3542     return action;
       
  3543   }
       
  3544   /**
       
  3545    * Replaces the reducer currently used by the store to calculate the state.
       
  3546    *
       
  3547    * You might need this if your app implements code splitting and you want to
       
  3548    * load some of the reducers dynamically. You might also need this if you
       
  3549    * implement a hot reloading mechanism for Redux.
       
  3550    *
       
  3551    * @param {Function} nextReducer The reducer for the store to use instead.
       
  3552    * @returns {void}
       
  3553    */
       
  3554 
       
  3555 
       
  3556   function replaceReducer(nextReducer) {
       
  3557     if (typeof nextReducer !== 'function') {
       
  3558       throw new Error('Expected the nextReducer to be a function.');
       
  3559     }
       
  3560 
       
  3561     currentReducer = nextReducer;
       
  3562     dispatch({
       
  3563       type: ActionTypes.REPLACE
       
  3564     });
       
  3565   }
       
  3566   /**
       
  3567    * Interoperability point for observable/reactive libraries.
       
  3568    * @returns {observable} A minimal observable of state changes.
       
  3569    * For more information, see the observable proposal:
       
  3570    * https://github.com/tc39/proposal-observable
       
  3571    */
       
  3572 
       
  3573 
       
  3574   function observable() {
       
  3575     var _ref;
       
  3576 
       
  3577     var outerSubscribe = subscribe;
       
  3578     return _ref = {
       
  3579       /**
       
  3580        * The minimal observable subscription method.
       
  3581        * @param {Object} observer Any object that can be used as an observer.
       
  3582        * The observer object should have a `next` method.
       
  3583        * @returns {subscription} An object with an `unsubscribe` method that can
       
  3584        * be used to unsubscribe the observable from the store, and prevent further
       
  3585        * emission of values from the observable.
       
  3586        */
       
  3587       subscribe: function subscribe(observer) {
       
  3588         if (typeof observer !== 'object' || observer === null) {
       
  3589           throw new TypeError('Expected the observer to be an object.');
       
  3590         }
       
  3591 
       
  3592         function observeState() {
       
  3593           if (observer.next) {
       
  3594             observer.next(getState());
       
  3595           }
       
  3596         }
       
  3597 
       
  3598         observeState();
       
  3599         var unsubscribe = outerSubscribe(observeState);
       
  3600         return {
       
  3601           unsubscribe: unsubscribe
       
  3602         };
       
  3603       }
       
  3604     }, _ref[symbol_observable__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]] = function () {
       
  3605       return this;
       
  3606     }, _ref;
       
  3607   } // When a store is created, an "INIT" action is dispatched so that every
       
  3608   // reducer returns their initial state. This effectively populates
       
  3609   // the initial state tree.
       
  3610 
       
  3611 
       
  3612   dispatch({
       
  3613     type: ActionTypes.INIT
       
  3614   });
       
  3615   return _ref2 = {
       
  3616     dispatch: dispatch,
       
  3617     subscribe: subscribe,
       
  3618     getState: getState,
       
  3619     replaceReducer: replaceReducer
       
  3620   }, _ref2[symbol_observable__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]] = observable, _ref2;
       
  3621 }
       
  3622 
       
  3623 /**
       
  3624  * Prints a warning in the console if it exists.
       
  3625  *
       
  3626  * @param {String} message The warning message.
       
  3627  * @returns {void}
       
  3628  */
       
  3629 function warning(message) {
       
  3630   /* eslint-disable no-console */
       
  3631   if (typeof console !== 'undefined' && typeof console.error === 'function') {
       
  3632     console.error(message);
       
  3633   }
       
  3634   /* eslint-enable no-console */
       
  3635 
       
  3636 
       
  3637   try {
       
  3638     // This error was thrown as a convenience so that if you enable
       
  3639     // "break on all exceptions" in your console,
       
  3640     // it would pause the execution at this line.
       
  3641     throw new Error(message);
       
  3642   } catch (e) {} // eslint-disable-line no-empty
       
  3643 
       
  3644 }
       
  3645 
       
  3646 function getUndefinedStateErrorMessage(key, action) {
       
  3647   var actionType = action && action.type;
       
  3648   var actionDescription = actionType && "action \"" + String(actionType) + "\"" || 'an action';
       
  3649   return "Given " + actionDescription + ", reducer \"" + key + "\" returned undefined. " + "To ignore an action, you must explicitly return the previous state. " + "If you want this reducer to hold no value, you can return null instead of undefined.";
       
  3650 }
       
  3651 
       
  3652 function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {
       
  3653   var reducerKeys = Object.keys(reducers);
       
  3654   var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';
       
  3655 
       
  3656   if (reducerKeys.length === 0) {
       
  3657     return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';
       
  3658   }
       
  3659 
       
  3660   if (!isPlainObject(inputState)) {
       
  3661     return "The " + argumentName + " has unexpected type of \"" + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + "\". Expected argument to be an object with the following " + ("keys: \"" + reducerKeys.join('", "') + "\"");
       
  3662   }
       
  3663 
       
  3664   var unexpectedKeys = Object.keys(inputState).filter(function (key) {
       
  3665     return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];
       
  3666   });
       
  3667   unexpectedKeys.forEach(function (key) {
       
  3668     unexpectedKeyCache[key] = true;
       
  3669   });
       
  3670   if (action && action.type === ActionTypes.REPLACE) return;
       
  3671 
       
  3672   if (unexpectedKeys.length > 0) {
       
  3673     return "Unexpected " + (unexpectedKeys.length > 1 ? 'keys' : 'key') + " " + ("\"" + unexpectedKeys.join('", "') + "\" found in " + argumentName + ". ") + "Expected to find one of the known reducer keys instead: " + ("\"" + reducerKeys.join('", "') + "\". Unexpected keys will be ignored.");
       
  3674   }
       
  3675 }
       
  3676 
       
  3677 function assertReducerShape(reducers) {
       
  3678   Object.keys(reducers).forEach(function (key) {
       
  3679     var reducer = reducers[key];
       
  3680     var initialState = reducer(undefined, {
       
  3681       type: ActionTypes.INIT
       
  3682     });
       
  3683 
       
  3684     if (typeof initialState === 'undefined') {
       
  3685       throw new Error("Reducer \"" + key + "\" returned undefined during initialization. " + "If the state passed to the reducer is undefined, you must " + "explicitly return the initial state. The initial state may " + "not be undefined. If you don't want to set a value for this reducer, " + "you can use null instead of undefined.");
       
  3686     }
       
  3687 
       
  3688     if (typeof reducer(undefined, {
       
  3689       type: ActionTypes.PROBE_UNKNOWN_ACTION()
       
  3690     }) === 'undefined') {
       
  3691       throw new Error("Reducer \"" + key + "\" returned undefined when probed with a random type. " + ("Don't try to handle " + ActionTypes.INIT + " or other actions in \"redux/*\" ") + "namespace. They are considered private. Instead, you must return the " + "current state for any unknown actions, unless it is undefined, " + "in which case you must return the initial state, regardless of the " + "action type. The initial state may not be undefined, but can be null.");
       
  3692     }
       
  3693   });
       
  3694 }
       
  3695 /**
       
  3696  * Turns an object whose values are different reducer functions, into a single
       
  3697  * reducer function. It will call every child reducer, and gather their results
       
  3698  * into a single state object, whose keys correspond to the keys of the passed
       
  3699  * reducer functions.
       
  3700  *
       
  3701  * @param {Object} reducers An object whose values correspond to different
       
  3702  * reducer functions that need to be combined into one. One handy way to obtain
       
  3703  * it is to use ES6 `import * as reducers` syntax. The reducers may never return
       
  3704  * undefined for any action. Instead, they should return their initial state
       
  3705  * if the state passed to them was undefined, and the current state for any
       
  3706  * unrecognized action.
       
  3707  *
       
  3708  * @returns {Function} A reducer function that invokes every reducer inside the
       
  3709  * passed object, and builds a state object with the same shape.
       
  3710  */
       
  3711 
       
  3712 
       
  3713 function combineReducers(reducers) {
       
  3714   var reducerKeys = Object.keys(reducers);
       
  3715   var finalReducers = {};
       
  3716 
       
  3717   for (var i = 0; i < reducerKeys.length; i++) {
       
  3718     var key = reducerKeys[i];
       
  3719 
       
  3720     if (false) {}
       
  3721 
       
  3722     if (typeof reducers[key] === 'function') {
       
  3723       finalReducers[key] = reducers[key];
       
  3724     }
       
  3725   }
       
  3726 
       
  3727   var finalReducerKeys = Object.keys(finalReducers);
       
  3728   var unexpectedKeyCache;
       
  3729 
       
  3730   if (false) {}
       
  3731 
       
  3732   var shapeAssertionError;
       
  3733 
       
  3734   try {
       
  3735     assertReducerShape(finalReducers);
       
  3736   } catch (e) {
       
  3737     shapeAssertionError = e;
       
  3738   }
       
  3739 
       
  3740   return function combination(state, action) {
       
  3741     if (state === void 0) {
       
  3742       state = {};
       
  3743     }
       
  3744 
       
  3745     if (shapeAssertionError) {
       
  3746       throw shapeAssertionError;
       
  3747     }
       
  3748 
       
  3749     if (false) { var warningMessage; }
       
  3750 
       
  3751     var hasChanged = false;
       
  3752     var nextState = {};
       
  3753 
       
  3754     for (var _i = 0; _i < finalReducerKeys.length; _i++) {
       
  3755       var _key = finalReducerKeys[_i];
       
  3756       var reducer = finalReducers[_key];
       
  3757       var previousStateForKey = state[_key];
       
  3758       var nextStateForKey = reducer(previousStateForKey, action);
       
  3759 
       
  3760       if (typeof nextStateForKey === 'undefined') {
       
  3761         var errorMessage = getUndefinedStateErrorMessage(_key, action);
       
  3762         throw new Error(errorMessage);
       
  3763       }
       
  3764 
       
  3765       nextState[_key] = nextStateForKey;
       
  3766       hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
       
  3767     }
       
  3768 
       
  3769     return hasChanged ? nextState : state;
       
  3770   };
       
  3771 }
       
  3772 
       
  3773 function bindActionCreator(actionCreator, dispatch) {
       
  3774   return function () {
       
  3775     return dispatch(actionCreator.apply(this, arguments));
       
  3776   };
       
  3777 }
       
  3778 /**
       
  3779  * Turns an object whose values are action creators, into an object with the
       
  3780  * same keys, but with every function wrapped into a `dispatch` call so they
       
  3781  * may be invoked directly. This is just a convenience method, as you can call
       
  3782  * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.
       
  3783  *
       
  3784  * For convenience, you can also pass a single function as the first argument,
       
  3785  * and get a function in return.
       
  3786  *
       
  3787  * @param {Function|Object} actionCreators An object whose values are action
       
  3788  * creator functions. One handy way to obtain it is to use ES6 `import * as`
       
  3789  * syntax. You may also pass a single function.
       
  3790  *
       
  3791  * @param {Function} dispatch The `dispatch` function available on your Redux
       
  3792  * store.
       
  3793  *
       
  3794  * @returns {Function|Object} The object mimicking the original object, but with
       
  3795  * every action creator wrapped into the `dispatch` call. If you passed a
       
  3796  * function as `actionCreators`, the return value will also be a single
       
  3797  * function.
       
  3798  */
       
  3799 
       
  3800 
       
  3801 function bindActionCreators(actionCreators, dispatch) {
       
  3802   if (typeof actionCreators === 'function') {
       
  3803     return bindActionCreator(actionCreators, dispatch);
       
  3804   }
       
  3805 
       
  3806   if (typeof actionCreators !== 'object' || actionCreators === null) {
       
  3807     throw new Error("bindActionCreators expected an object or a function, instead received " + (actionCreators === null ? 'null' : typeof actionCreators) + ". " + "Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?");
       
  3808   }
       
  3809 
       
  3810   var keys = Object.keys(actionCreators);
       
  3811   var boundActionCreators = {};
       
  3812 
       
  3813   for (var i = 0; i < keys.length; i++) {
       
  3814     var key = keys[i];
       
  3815     var actionCreator = actionCreators[key];
       
  3816 
       
  3817     if (typeof actionCreator === 'function') {
       
  3818       boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);
       
  3819     }
       
  3820   }
       
  3821 
       
  3822   return boundActionCreators;
       
  3823 }
       
  3824 
       
  3825 function _defineProperty(obj, key, value) {
  4655 function _defineProperty(obj, key, value) {
  3826   if (key in obj) {
  4656   if (key in obj) {
  3827     Object.defineProperty(obj, key, {
  4657     Object.defineProperty(obj, key, {
  3828       value: value,
  4658       value: value,
  3829       enumerable: true,
  4659       enumerable: true,
  3835   }
  4665   }
  3836 
  4666 
  3837   return obj;
  4667   return obj;
  3838 }
  4668 }
  3839 
  4669 
  3840 function _objectSpread(target) {
       
  3841   for (var i = 1; i < arguments.length; i++) {
       
  3842     var source = arguments[i] != null ? arguments[i] : {};
       
  3843     var ownKeys = Object.keys(source);
       
  3844 
       
  3845     if (typeof Object.getOwnPropertySymbols === 'function') {
       
  3846       ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
       
  3847         return Object.getOwnPropertyDescriptor(source, sym).enumerable;
       
  3848       }));
       
  3849     }
       
  3850 
       
  3851     ownKeys.forEach(function (key) {
       
  3852       _defineProperty(target, key, source[key]);
       
  3853     });
       
  3854   }
       
  3855 
       
  3856   return target;
       
  3857 }
       
  3858 
       
  3859 /**
       
  3860  * Composes single-argument functions from right to left. The rightmost
       
  3861  * function can take multiple arguments as it provides the signature for
       
  3862  * the resulting composite function.
       
  3863  *
       
  3864  * @param {...Function} funcs The functions to compose.
       
  3865  * @returns {Function} A function obtained by composing the argument functions
       
  3866  * from right to left. For example, compose(f, g, h) is identical to doing
       
  3867  * (...args) => f(g(h(...args))).
       
  3868  */
       
  3869 function compose() {
       
  3870   for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {
       
  3871     funcs[_key] = arguments[_key];
       
  3872   }
       
  3873 
       
  3874   if (funcs.length === 0) {
       
  3875     return function (arg) {
       
  3876       return arg;
       
  3877     };
       
  3878   }
       
  3879 
       
  3880   if (funcs.length === 1) {
       
  3881     return funcs[0];
       
  3882   }
       
  3883 
       
  3884   return funcs.reduce(function (a, b) {
       
  3885     return function () {
       
  3886       return a(b.apply(void 0, arguments));
       
  3887     };
       
  3888   });
       
  3889 }
       
  3890 
       
  3891 /**
       
  3892  * Creates a store enhancer that applies middleware to the dispatch method
       
  3893  * of the Redux store. This is handy for a variety of tasks, such as expressing
       
  3894  * asynchronous actions in a concise manner, or logging every action payload.
       
  3895  *
       
  3896  * See `redux-thunk` package as an example of the Redux middleware.
       
  3897  *
       
  3898  * Because middleware is potentially asynchronous, this should be the first
       
  3899  * store enhancer in the composition chain.
       
  3900  *
       
  3901  * Note that each middleware will be given the `dispatch` and `getState` functions
       
  3902  * as named arguments.
       
  3903  *
       
  3904  * @param {...Function} middlewares The middleware chain to be applied.
       
  3905  * @returns {Function} A store enhancer applying the middleware.
       
  3906  */
       
  3907 
       
  3908 function applyMiddleware() {
       
  3909   for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) {
       
  3910     middlewares[_key] = arguments[_key];
       
  3911   }
       
  3912 
       
  3913   return function (createStore) {
       
  3914     return function () {
       
  3915       var store = createStore.apply(void 0, arguments);
       
  3916 
       
  3917       var _dispatch = function dispatch() {
       
  3918         throw new Error("Dispatching while constructing your middleware is not allowed. " + "Other middleware would not be applied to this dispatch.");
       
  3919       };
       
  3920 
       
  3921       var middlewareAPI = {
       
  3922         getState: store.getState,
       
  3923         dispatch: function dispatch() {
       
  3924           return _dispatch.apply(void 0, arguments);
       
  3925         }
       
  3926       };
       
  3927       var chain = middlewares.map(function (middleware) {
       
  3928         return middleware(middlewareAPI);
       
  3929       });
       
  3930       _dispatch = compose.apply(void 0, chain)(store.dispatch);
       
  3931       return _objectSpread({}, store, {
       
  3932         dispatch: _dispatch
       
  3933       });
       
  3934     };
       
  3935   };
       
  3936 }
       
  3937 
       
  3938 /*
       
  3939  * This is a dummy function to check if the function name has been altered by minification.
       
  3940  * If the function has been minified and NODE_ENV !== 'production', warn the user.
       
  3941  */
       
  3942 
       
  3943 function isCrushed() {}
       
  3944 
       
  3945 if (false) {}
       
  3946 
       
  3947 
       
  3948 
       
  3949 
       
  3950 /***/ }),
  4670 /***/ }),
  3951 
  4671 
  3952 /***/ 76:
  4672 /***/ 64:
  3953 /***/ (function(module, exports, __webpack_require__) {
  4673 /***/ (function(module, exports) {
  3954 
  4674 
  3955 "use strict";
  4675 (function() { module.exports = this["wp"]["isShallowEqual"]; }());
  3956 
       
  3957 
       
  3958 function _typeof(obj) {
       
  3959   if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
       
  3960     _typeof = function (obj) {
       
  3961       return typeof obj;
       
  3962     };
       
  3963   } else {
       
  3964     _typeof = function (obj) {
       
  3965       return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
       
  3966     };
       
  3967   }
       
  3968 
       
  3969   return _typeof(obj);
       
  3970 }
       
  3971 
       
  3972 function _classCallCheck(instance, Constructor) {
       
  3973   if (!(instance instanceof Constructor)) {
       
  3974     throw new TypeError("Cannot call a class as a function");
       
  3975   }
       
  3976 }
       
  3977 
       
  3978 function _defineProperties(target, props) {
       
  3979   for (var i = 0; i < props.length; i++) {
       
  3980     var descriptor = props[i];
       
  3981     descriptor.enumerable = descriptor.enumerable || false;
       
  3982     descriptor.configurable = true;
       
  3983     if ("value" in descriptor) descriptor.writable = true;
       
  3984     Object.defineProperty(target, descriptor.key, descriptor);
       
  3985   }
       
  3986 }
       
  3987 
       
  3988 function _createClass(Constructor, protoProps, staticProps) {
       
  3989   if (protoProps) _defineProperties(Constructor.prototype, protoProps);
       
  3990   if (staticProps) _defineProperties(Constructor, staticProps);
       
  3991   return Constructor;
       
  3992 }
       
  3993 
       
  3994 /**
       
  3995  * Given an instance of EquivalentKeyMap, returns its internal value pair tuple
       
  3996  * for a key, if one exists. The tuple members consist of the last reference
       
  3997  * value for the key (used in efficient subsequent lookups) and the value
       
  3998  * assigned for the key at the leaf node.
       
  3999  *
       
  4000  * @param {EquivalentKeyMap} instance EquivalentKeyMap instance.
       
  4001  * @param {*} key                     The key for which to return value pair.
       
  4002  *
       
  4003  * @return {?Array} Value pair, if exists.
       
  4004  */
       
  4005 function getValuePair(instance, key) {
       
  4006   var _map = instance._map,
       
  4007       _arrayTreeMap = instance._arrayTreeMap,
       
  4008       _objectTreeMap = instance._objectTreeMap; // Map keeps a reference to the last object-like key used to set the
       
  4009   // value, which can be used to shortcut immediately to the value.
       
  4010 
       
  4011   if (_map.has(key)) {
       
  4012     return _map.get(key);
       
  4013   } // Sort keys to ensure stable retrieval from tree.
       
  4014 
       
  4015 
       
  4016   var properties = Object.keys(key).sort(); // Tree by type to avoid conflicts on numeric object keys, empty value.
       
  4017 
       
  4018   var map = Array.isArray(key) ? _arrayTreeMap : _objectTreeMap;
       
  4019 
       
  4020   for (var i = 0; i < properties.length; i++) {
       
  4021     var property = properties[i];
       
  4022     map = map.get(property);
       
  4023 
       
  4024     if (map === undefined) {
       
  4025       return;
       
  4026     }
       
  4027 
       
  4028     var propertyValue = key[property];
       
  4029     map = map.get(propertyValue);
       
  4030 
       
  4031     if (map === undefined) {
       
  4032       return;
       
  4033     }
       
  4034   }
       
  4035 
       
  4036   var valuePair = map.get('_ekm_value');
       
  4037 
       
  4038   if (!valuePair) {
       
  4039     return;
       
  4040   } // If reached, it implies that an object-like key was set with another
       
  4041   // reference, so delete the reference and replace with the current.
       
  4042 
       
  4043 
       
  4044   _map.delete(valuePair[0]);
       
  4045 
       
  4046   valuePair[0] = key;
       
  4047   map.set('_ekm_value', valuePair);
       
  4048 
       
  4049   _map.set(key, valuePair);
       
  4050 
       
  4051   return valuePair;
       
  4052 }
       
  4053 /**
       
  4054  * Variant of a Map object which enables lookup by equivalent (deeply equal)
       
  4055  * object and array keys.
       
  4056  */
       
  4057 
       
  4058 
       
  4059 var EquivalentKeyMap =
       
  4060 /*#__PURE__*/
       
  4061 function () {
       
  4062   /**
       
  4063    * Constructs a new instance of EquivalentKeyMap.
       
  4064    *
       
  4065    * @param {Iterable.<*>} iterable Initial pair of key, value for map.
       
  4066    */
       
  4067   function EquivalentKeyMap(iterable) {
       
  4068     _classCallCheck(this, EquivalentKeyMap);
       
  4069 
       
  4070     this.clear();
       
  4071 
       
  4072     if (iterable instanceof EquivalentKeyMap) {
       
  4073       // Map#forEach is only means of iterating with support for IE11.
       
  4074       var iterablePairs = [];
       
  4075       iterable.forEach(function (value, key) {
       
  4076         iterablePairs.push([key, value]);
       
  4077       });
       
  4078       iterable = iterablePairs;
       
  4079     }
       
  4080 
       
  4081     if (iterable != null) {
       
  4082       for (var i = 0; i < iterable.length; i++) {
       
  4083         this.set(iterable[i][0], iterable[i][1]);
       
  4084       }
       
  4085     }
       
  4086   }
       
  4087   /**
       
  4088    * Accessor property returning the number of elements.
       
  4089    *
       
  4090    * @return {number} Number of elements.
       
  4091    */
       
  4092 
       
  4093 
       
  4094   _createClass(EquivalentKeyMap, [{
       
  4095     key: "set",
       
  4096 
       
  4097     /**
       
  4098      * Add or update an element with a specified key and value.
       
  4099      *
       
  4100      * @param {*} key   The key of the element to add.
       
  4101      * @param {*} value The value of the element to add.
       
  4102      *
       
  4103      * @return {EquivalentKeyMap} Map instance.
       
  4104      */
       
  4105     value: function set(key, value) {
       
  4106       // Shortcut non-object-like to set on internal Map.
       
  4107       if (key === null || _typeof(key) !== 'object') {
       
  4108         this._map.set(key, value);
       
  4109 
       
  4110         return this;
       
  4111       } // Sort keys to ensure stable assignment into tree.
       
  4112 
       
  4113 
       
  4114       var properties = Object.keys(key).sort();
       
  4115       var valuePair = [key, value]; // Tree by type to avoid conflicts on numeric object keys, empty value.
       
  4116 
       
  4117       var map = Array.isArray(key) ? this._arrayTreeMap : this._objectTreeMap;
       
  4118 
       
  4119       for (var i = 0; i < properties.length; i++) {
       
  4120         var property = properties[i];
       
  4121 
       
  4122         if (!map.has(property)) {
       
  4123           map.set(property, new EquivalentKeyMap());
       
  4124         }
       
  4125 
       
  4126         map = map.get(property);
       
  4127         var propertyValue = key[property];
       
  4128 
       
  4129         if (!map.has(propertyValue)) {
       
  4130           map.set(propertyValue, new EquivalentKeyMap());
       
  4131         }
       
  4132 
       
  4133         map = map.get(propertyValue);
       
  4134       } // If an _ekm_value exists, there was already an equivalent key. Before
       
  4135       // overriding, ensure that the old key reference is removed from map to
       
  4136       // avoid memory leak of accumulating equivalent keys. This is, in a
       
  4137       // sense, a poor man's WeakMap, while still enabling iterability.
       
  4138 
       
  4139 
       
  4140       var previousValuePair = map.get('_ekm_value');
       
  4141 
       
  4142       if (previousValuePair) {
       
  4143         this._map.delete(previousValuePair[0]);
       
  4144       }
       
  4145 
       
  4146       map.set('_ekm_value', valuePair);
       
  4147 
       
  4148       this._map.set(key, valuePair);
       
  4149 
       
  4150       return this;
       
  4151     }
       
  4152     /**
       
  4153      * Returns a specified element.
       
  4154      *
       
  4155      * @param {*} key The key of the element to return.
       
  4156      *
       
  4157      * @return {?*} The element associated with the specified key or undefined
       
  4158      *              if the key can't be found.
       
  4159      */
       
  4160 
       
  4161   }, {
       
  4162     key: "get",
       
  4163     value: function get(key) {
       
  4164       // Shortcut non-object-like to get from internal Map.
       
  4165       if (key === null || _typeof(key) !== 'object') {
       
  4166         return this._map.get(key);
       
  4167       }
       
  4168 
       
  4169       var valuePair = getValuePair(this, key);
       
  4170 
       
  4171       if (valuePair) {
       
  4172         return valuePair[1];
       
  4173       }
       
  4174     }
       
  4175     /**
       
  4176      * Returns a boolean indicating whether an element with the specified key
       
  4177      * exists or not.
       
  4178      *
       
  4179      * @param {*} key The key of the element to test for presence.
       
  4180      *
       
  4181      * @return {boolean} Whether an element with the specified key exists.
       
  4182      */
       
  4183 
       
  4184   }, {
       
  4185     key: "has",
       
  4186     value: function has(key) {
       
  4187       if (key === null || _typeof(key) !== 'object') {
       
  4188         return this._map.has(key);
       
  4189       } // Test on the _presence_ of the pair, not its value, as even undefined
       
  4190       // can be a valid member value for a key.
       
  4191 
       
  4192 
       
  4193       return getValuePair(this, key) !== undefined;
       
  4194     }
       
  4195     /**
       
  4196      * Removes the specified element.
       
  4197      *
       
  4198      * @param {*} key The key of the element to remove.
       
  4199      *
       
  4200      * @return {boolean} Returns true if an element existed and has been
       
  4201      *                   removed, or false if the element does not exist.
       
  4202      */
       
  4203 
       
  4204   }, {
       
  4205     key: "delete",
       
  4206     value: function _delete(key) {
       
  4207       if (!this.has(key)) {
       
  4208         return false;
       
  4209       } // This naive implementation will leave orphaned child trees. A better
       
  4210       // implementation should traverse and remove orphans.
       
  4211 
       
  4212 
       
  4213       this.set(key, undefined);
       
  4214       return true;
       
  4215     }
       
  4216     /**
       
  4217      * Executes a provided function once per each key/value pair, in insertion
       
  4218      * order.
       
  4219      *
       
  4220      * @param {Function} callback Function to execute for each element.
       
  4221      * @param {*}        thisArg  Value to use as `this` when executing
       
  4222      *                            `callback`.
       
  4223      */
       
  4224 
       
  4225   }, {
       
  4226     key: "forEach",
       
  4227     value: function forEach(callback) {
       
  4228       var _this = this;
       
  4229 
       
  4230       var thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this;
       
  4231 
       
  4232       this._map.forEach(function (value, key) {
       
  4233         // Unwrap value from object-like value pair.
       
  4234         if (key !== null && _typeof(key) === 'object') {
       
  4235           value = value[1];
       
  4236         }
       
  4237 
       
  4238         callback.call(thisArg, value, key, _this);
       
  4239       });
       
  4240     }
       
  4241     /**
       
  4242      * Removes all elements.
       
  4243      */
       
  4244 
       
  4245   }, {
       
  4246     key: "clear",
       
  4247     value: function clear() {
       
  4248       this._map = new Map();
       
  4249       this._arrayTreeMap = new Map();
       
  4250       this._objectTreeMap = new Map();
       
  4251     }
       
  4252   }, {
       
  4253     key: "size",
       
  4254     get: function get() {
       
  4255       return this._map.size;
       
  4256     }
       
  4257   }]);
       
  4258 
       
  4259   return EquivalentKeyMap;
       
  4260 }();
       
  4261 
       
  4262 module.exports = EquivalentKeyMap;
       
  4263 
       
  4264 
       
  4265 /***/ }),
       
  4266 
       
  4267 /***/ 77:
       
  4268 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  4269 
       
  4270 "use strict";
       
  4271 /* WEBPACK VAR INJECTION */(function(global, module) {/* harmony import */ var _ponyfill_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(99);
       
  4272 /* global window */
       
  4273 
       
  4274 
       
  4275 var root;
       
  4276 
       
  4277 if (typeof self !== 'undefined') {
       
  4278   root = self;
       
  4279 } else if (typeof window !== 'undefined') {
       
  4280   root = window;
       
  4281 } else if (typeof global !== 'undefined') {
       
  4282   root = global;
       
  4283 } else if (true) {
       
  4284   root = module;
       
  4285 } else {}
       
  4286 
       
  4287 var result = Object(_ponyfill_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(root);
       
  4288 /* harmony default export */ __webpack_exports__["a"] = (result);
       
  4289 
       
  4290 /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(59), __webpack_require__(132)(module)))
       
  4291 
       
  4292 /***/ }),
       
  4293 
       
  4294 /***/ 99:
       
  4295 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
  4296 
       
  4297 "use strict";
       
  4298 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return symbolObservablePonyfill; });
       
  4299 function symbolObservablePonyfill(root) {
       
  4300 	var result;
       
  4301 	var Symbol = root.Symbol;
       
  4302 
       
  4303 	if (typeof Symbol === 'function') {
       
  4304 		if (Symbol.observable) {
       
  4305 			result = Symbol.observable;
       
  4306 		} else {
       
  4307 			result = Symbol('observable');
       
  4308 			Symbol.observable = result;
       
  4309 		}
       
  4310 	} else {
       
  4311 		result = '@@observable';
       
  4312 	}
       
  4313 
       
  4314 	return result;
       
  4315 };
       
  4316 
       
  4317 
  4676 
  4318 /***/ })
  4677 /***/ })
  4319 
  4678 
  4320 /******/ });
  4679 /******/ });