[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

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

   1  this["wp"] = this["wp"] || {}; this["wp"]["data"] =
   2  /******/ (function(modules) { // webpackBootstrap
   3  /******/     // The module cache
   4  /******/     var installedModules = {};
   5  /******/
   6  /******/     // The require function
   7  /******/ 	function __webpack_require__(moduleId) {
   8  /******/
   9  /******/         // Check if module is in cache
  10  /******/         if(installedModules[moduleId]) {
  11  /******/             return installedModules[moduleId].exports;
  12  /******/         }
  13  /******/         // Create a new module (and put it into the cache)
  14  /******/         var module = installedModules[moduleId] = {
  15  /******/             i: moduleId,
  16  /******/             l: false,
  17  /******/             exports: {}
  18  /******/         };
  19  /******/
  20  /******/         // Execute the module function
  21  /******/         modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  22  /******/
  23  /******/         // Flag the module as loaded
  24  /******/         module.l = true;
  25  /******/
  26  /******/         // Return the exports of the module
  27  /******/         return module.exports;
  28  /******/     }
  29  /******/
  30  /******/
  31  /******/     // expose the modules object (__webpack_modules__)
  32  /******/     __webpack_require__.m = modules;
  33  /******/
  34  /******/     // expose the module cache
  35  /******/     __webpack_require__.c = installedModules;
  36  /******/
  37  /******/     // define getter function for harmony exports
  38  /******/     __webpack_require__.d = function(exports, name, getter) {
  39  /******/         if(!__webpack_require__.o(exports, name)) {
  40  /******/             Object.defineProperty(exports, name, { enumerable: true, get: getter });
  41  /******/         }
  42  /******/     };
  43  /******/
  44  /******/     // define __esModule on exports
  45  /******/     __webpack_require__.r = function(exports) {
  46  /******/         if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  47  /******/             Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  48  /******/         }
  49  /******/         Object.defineProperty(exports, '__esModule', { value: true });
  50  /******/     };
  51  /******/
  52  /******/     // create a fake namespace object
  53  /******/     // mode & 1: value is a module id, require it
  54  /******/     // mode & 2: merge all properties of value into the ns
  55  /******/     // mode & 4: return value when already ns object
  56  /******/     // mode & 8|1: behave like require
  57  /******/     __webpack_require__.t = function(value, mode) {
  58  /******/         if(mode & 1) value = __webpack_require__(value);
  59  /******/         if(mode & 8) return value;
  60  /******/         if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  61  /******/         var ns = Object.create(null);
  62  /******/         __webpack_require__.r(ns);
  63  /******/         Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  64  /******/         if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  65  /******/         return ns;
  66  /******/     };
  67  /******/
  68  /******/     // getDefaultExport function for compatibility with non-harmony modules
  69  /******/     __webpack_require__.n = function(module) {
  70  /******/         var getter = module && module.__esModule ?
  71  /******/ 			function getDefault() { return module['default']; } :
  72  /******/ 			function getModuleExports() { return module; };
  73  /******/         __webpack_require__.d(getter, 'a', getter);
  74  /******/         return getter;
  75  /******/     };
  76  /******/
  77  /******/     // Object.prototype.hasOwnProperty.call
  78  /******/     __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  79  /******/
  80  /******/     // __webpack_public_path__
  81  /******/     __webpack_require__.p = "";
  82  /******/
  83  /******/
  84  /******/     // Load entry module and return exports
  85  /******/     return __webpack_require__(__webpack_require__.s = 457);
  86  /******/ })
  87  /************************************************************************/
  88  /******/ ({
  89  
  90  /***/ 0:
  91  /***/ (function(module, exports) {
  92  
  93  (function() { module.exports = window["wp"]["element"]; }());
  94  
  95  /***/ }),
  96  
  97  /***/ 107:
  98  /***/ (function(module, exports, __webpack_require__) {
  99  
 100  "use strict";
 101  
 102  
 103  function _typeof(obj) {
 104    if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
 105      _typeof = function (obj) {
 106        return typeof obj;
 107      };
 108    } else {
 109      _typeof = function (obj) {
 110        return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
 111      };
 112    }
 113  
 114    return _typeof(obj);
 115  }
 116  
 117  function _classCallCheck(instance, Constructor) {
 118    if (!(instance instanceof Constructor)) {
 119      throw new TypeError("Cannot call a class as a function");
 120    }
 121  }
 122  
 123  function _defineProperties(target, props) {
 124    for (var i = 0; i < props.length; i++) {
 125      var descriptor = props[i];
 126      descriptor.enumerable = descriptor.enumerable || false;
 127      descriptor.configurable = true;
 128      if ("value" in descriptor) descriptor.writable = true;
 129      Object.defineProperty(target, descriptor.key, descriptor);
 130    }
 131  }
 132  
 133  function _createClass(Constructor, protoProps, staticProps) {
 134    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
 135    if (staticProps) _defineProperties(Constructor, staticProps);
 136    return Constructor;
 137  }
 138  
 139  /**
 140   * Given an instance of EquivalentKeyMap, returns its internal value pair tuple
 141   * for a key, if one exists. The tuple members consist of the last reference
 142   * value for the key (used in efficient subsequent lookups) and the value
 143   * assigned for the key at the leaf node.
 144   *
 145   * @param {EquivalentKeyMap} instance EquivalentKeyMap instance.
 146   * @param {*} key                     The key for which to return value pair.
 147   *
 148   * @return {?Array} Value pair, if exists.
 149   */
 150  function getValuePair(instance, key) {
 151    var _map = instance._map,
 152        _arrayTreeMap = instance._arrayTreeMap,
 153        _objectTreeMap = instance._objectTreeMap; // Map keeps a reference to the last object-like key used to set the
 154    // value, which can be used to shortcut immediately to the value.
 155  
 156    if (_map.has(key)) {
 157      return _map.get(key);
 158    } // Sort keys to ensure stable retrieval from tree.
 159  
 160  
 161    var properties = Object.keys(key).sort(); // Tree by type to avoid conflicts on numeric object keys, empty value.
 162  
 163    var map = Array.isArray(key) ? _arrayTreeMap : _objectTreeMap;
 164  
 165    for (var i = 0; i < properties.length; i++) {
 166      var property = properties[i];
 167      map = map.get(property);
 168  
 169      if (map === undefined) {
 170        return;
 171      }
 172  
 173      var propertyValue = key[property];
 174      map = map.get(propertyValue);
 175  
 176      if (map === undefined) {
 177        return;
 178      }
 179    }
 180  
 181    var valuePair = map.get('_ekm_value');
 182  
 183    if (!valuePair) {
 184      return;
 185    } // If reached, it implies that an object-like key was set with another
 186    // reference, so delete the reference and replace with the current.
 187  
 188  
 189    _map.delete(valuePair[0]);
 190  
 191    valuePair[0] = key;
 192    map.set('_ekm_value', valuePair);
 193  
 194    _map.set(key, valuePair);
 195  
 196    return valuePair;
 197  }
 198  /**
 199   * Variant of a Map object which enables lookup by equivalent (deeply equal)
 200   * object and array keys.
 201   */
 202  
 203  
 204  var EquivalentKeyMap =
 205  /*#__PURE__*/
 206  function () {
 207    /**
 208     * Constructs a new instance of EquivalentKeyMap.
 209     *
 210     * @param {Iterable.<*>} iterable Initial pair of key, value for map.
 211     */
 212    function EquivalentKeyMap(iterable) {
 213      _classCallCheck(this, EquivalentKeyMap);
 214  
 215      this.clear();
 216  
 217      if (iterable instanceof EquivalentKeyMap) {
 218        // Map#forEach is only means of iterating with support for IE11.
 219        var iterablePairs = [];
 220        iterable.forEach(function (value, key) {
 221          iterablePairs.push([key, value]);
 222        });
 223        iterable = iterablePairs;
 224      }
 225  
 226      if (iterable != null) {
 227        for (var i = 0; i < iterable.length; i++) {
 228          this.set(iterable[i][0], iterable[i][1]);
 229        }
 230      }
 231    }
 232    /**
 233     * Accessor property returning the number of elements.
 234     *
 235     * @return {number} Number of elements.
 236     */
 237  
 238  
 239    _createClass(EquivalentKeyMap, [{
 240      key: "set",
 241  
 242      /**
 243       * Add or update an element with a specified key and value.
 244       *
 245       * @param {*} key   The key of the element to add.
 246       * @param {*} value The value of the element to add.
 247       *
 248       * @return {EquivalentKeyMap} Map instance.
 249       */
 250      value: function set(key, value) {
 251        // Shortcut non-object-like to set on internal Map.
 252        if (key === null || _typeof(key) !== 'object') {
 253          this._map.set(key, value);
 254  
 255          return this;
 256        } // Sort keys to ensure stable assignment into tree.
 257  
 258  
 259        var properties = Object.keys(key).sort();
 260        var valuePair = [key, value]; // Tree by type to avoid conflicts on numeric object keys, empty value.
 261  
 262        var map = Array.isArray(key) ? this._arrayTreeMap : this._objectTreeMap;
 263  
 264        for (var i = 0; i < properties.length; i++) {
 265          var property = properties[i];
 266  
 267          if (!map.has(property)) {
 268            map.set(property, new EquivalentKeyMap());
 269          }
 270  
 271          map = map.get(property);
 272          var propertyValue = key[property];
 273  
 274          if (!map.has(propertyValue)) {
 275            map.set(propertyValue, new EquivalentKeyMap());
 276          }
 277  
 278          map = map.get(propertyValue);
 279        } // If an _ekm_value exists, there was already an equivalent key. Before
 280        // overriding, ensure that the old key reference is removed from map to
 281        // avoid memory leak of accumulating equivalent keys. This is, in a
 282        // sense, a poor man's WeakMap, while still enabling iterability.
 283  
 284  
 285        var previousValuePair = map.get('_ekm_value');
 286  
 287        if (previousValuePair) {
 288          this._map.delete(previousValuePair[0]);
 289        }
 290  
 291        map.set('_ekm_value', valuePair);
 292  
 293        this._map.set(key, valuePair);
 294  
 295        return this;
 296      }
 297      /**
 298       * Returns a specified element.
 299       *
 300       * @param {*} key The key of the element to return.
 301       *
 302       * @return {?*} The element associated with the specified key or undefined
 303       *              if the key can't be found.
 304       */
 305  
 306    }, {
 307      key: "get",
 308      value: function get(key) {
 309        // Shortcut non-object-like to get from internal Map.
 310        if (key === null || _typeof(key) !== 'object') {
 311          return this._map.get(key);
 312        }
 313  
 314        var valuePair = getValuePair(this, key);
 315  
 316        if (valuePair) {
 317          return valuePair[1];
 318        }
 319      }
 320      /**
 321       * Returns a boolean indicating whether an element with the specified key
 322       * exists or not.
 323       *
 324       * @param {*} key The key of the element to test for presence.
 325       *
 326       * @return {boolean} Whether an element with the specified key exists.
 327       */
 328  
 329    }, {
 330      key: "has",
 331      value: function has(key) {
 332        if (key === null || _typeof(key) !== 'object') {
 333          return this._map.has(key);
 334        } // Test on the _presence_ of the pair, not its value, as even undefined
 335        // can be a valid member value for a key.
 336  
 337  
 338        return getValuePair(this, key) !== undefined;
 339      }
 340      /**
 341       * Removes the specified element.
 342       *
 343       * @param {*} key The key of the element to remove.
 344       *
 345       * @return {boolean} Returns true if an element existed and has been
 346       *                   removed, or false if the element does not exist.
 347       */
 348  
 349    }, {
 350      key: "delete",
 351      value: function _delete(key) {
 352        if (!this.has(key)) {
 353          return false;
 354        } // This naive implementation will leave orphaned child trees. A better
 355        // implementation should traverse and remove orphans.
 356  
 357  
 358        this.set(key, undefined);
 359        return true;
 360      }
 361      /**
 362       * Executes a provided function once per each key/value pair, in insertion
 363       * order.
 364       *
 365       * @param {Function} callback Function to execute for each element.
 366       * @param {*}        thisArg  Value to use as `this` when executing
 367       *                            `callback`.
 368       */
 369  
 370    }, {
 371      key: "forEach",
 372      value: function forEach(callback) {
 373        var _this = this;
 374  
 375        var thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this;
 376  
 377        this._map.forEach(function (value, key) {
 378          // Unwrap value from object-like value pair.
 379          if (key !== null && _typeof(key) === 'object') {
 380            value = value[1];
 381          }
 382  
 383          callback.call(thisArg, value, key, _this);
 384        });
 385      }
 386      /**
 387       * Removes all elements.
 388       */
 389  
 390    }, {
 391      key: "clear",
 392      value: function clear() {
 393        this._map = new Map();
 394        this._arrayTreeMap = new Map();
 395        this._objectTreeMap = new Map();
 396      }
 397    }, {
 398      key: "size",
 399      get: function get() {
 400        return this._map.size;
 401      }
 402    }]);
 403  
 404    return EquivalentKeyMap;
 405  }();
 406  
 407  module.exports = EquivalentKeyMap;
 408  
 409  
 410  /***/ }),
 411  
 412  /***/ 11:
 413  /***/ (function(module, exports) {
 414  
 415  (function() { module.exports = window["wp"]["compose"]; }());
 416  
 417  /***/ }),
 418  
 419  /***/ 12:
 420  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 421  
 422  "use strict";
 423  
 424  // EXPORTS
 425  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _slicedToArray; });
 426  
 427  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
 428  var arrayWithHoles = __webpack_require__(38);
 429  
 430  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
 431  function _iterableToArrayLimit(arr, i) {
 432    var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]);
 433  
 434    if (_i == null) return;
 435    var _arr = [];
 436    var _n = true;
 437    var _d = false;
 438  
 439    var _s, _e;
 440  
 441    try {
 442      for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
 443        _arr.push(_s.value);
 444  
 445        if (i && _arr.length === i) break;
 446      }
 447    } catch (err) {
 448      _d = true;
 449      _e = err;
 450    } finally {
 451      try {
 452        if (!_n && _i["return"] != null) _i["return"]();
 453      } finally {
 454        if (_d) throw _e;
 455      }
 456    }
 457  
 458    return _arr;
 459  }
 460  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
 461  var unsupportedIterableToArray = __webpack_require__(28);
 462  
 463  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
 464  var nonIterableRest = __webpack_require__(39);
 465  
 466  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
 467  
 468  
 469  
 470  
 471  function _slicedToArray(arr, i) {
 472    return Object(arrayWithHoles["a" /* default */])(arr) || _iterableToArrayLimit(arr, i) || Object(unsupportedIterableToArray["a" /* default */])(arr, i) || Object(nonIterableRest["a" /* default */])();
 473  }
 474  
 475  /***/ }),
 476  
 477  /***/ 13:
 478  /***/ (function(module, exports) {
 479  
 480  (function() { module.exports = window["React"]; }());
 481  
 482  /***/ }),
 483  
 484  /***/ 130:
 485  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 486  
 487  "use strict";
 488  /* unused harmony export useCallback */
 489  /* unused harmony export useCallbackOne */
 490  /* unused harmony export useMemo */
 491  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useMemoOne; });
 492  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
 493  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
 494  
 495  
 496  function areInputsEqual(newInputs, lastInputs) {
 497    if (newInputs.length !== lastInputs.length) {
 498      return false;
 499    }
 500  
 501    for (var i = 0; i < newInputs.length; i++) {
 502      if (newInputs[i] !== lastInputs[i]) {
 503        return false;
 504      }
 505    }
 506  
 507    return true;
 508  }
 509  
 510  function useMemoOne(getResult, inputs) {
 511    var initial = Object(react__WEBPACK_IMPORTED_MODULE_0__["useState"])(function () {
 512      return {
 513        inputs: inputs,
 514        result: getResult()
 515      };
 516    })[0];
 517    var isFirstRun = Object(react__WEBPACK_IMPORTED_MODULE_0__["useRef"])(true);
 518    var committed = Object(react__WEBPACK_IMPORTED_MODULE_0__["useRef"])(initial);
 519    var useCache = isFirstRun.current || Boolean(inputs && committed.current.inputs && areInputsEqual(inputs, committed.current.inputs));
 520    var cache = useCache ? committed.current : {
 521      inputs: inputs,
 522      result: getResult()
 523    };
 524    Object(react__WEBPACK_IMPORTED_MODULE_0__["useEffect"])(function () {
 525      isFirstRun.current = false;
 526      committed.current = cache;
 527    }, [cache]);
 528    return cache.result;
 529  }
 530  function useCallbackOne(callback, inputs) {
 531    return useMemoOne(function () {
 532      return callback;
 533    }, inputs);
 534  }
 535  var useMemo = useMemoOne;
 536  var useCallback = useCallbackOne;
 537  
 538  
 539  
 540  
 541  /***/ }),
 542  
 543  /***/ 15:
 544  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 545  
 546  "use strict";
 547  
 548  // EXPORTS
 549  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _toConsumableArray; });
 550  
 551  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
 552  var arrayLikeToArray = __webpack_require__(24);
 553  
 554  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
 555  
 556  function _arrayWithoutHoles(arr) {
 557    if (Array.isArray(arr)) return Object(arrayLikeToArray["a" /* default */])(arr);
 558  }
 559  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
 560  var iterableToArray = __webpack_require__(42);
 561  
 562  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
 563  var unsupportedIterableToArray = __webpack_require__(28);
 564  
 565  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
 566  function _nonIterableSpread() {
 567    throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
 568  }
 569  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
 570  
 571  
 572  
 573  
 574  function _toConsumableArray(arr) {
 575    return _arrayWithoutHoles(arr) || Object(iterableToArray["a" /* default */])(arr) || Object(unsupportedIterableToArray["a" /* default */])(arr) || _nonIterableSpread();
 576  }
 577  
 578  /***/ }),
 579  
 580  /***/ 156:
 581  /***/ (function(module, exports) {
 582  
 583  (function() { module.exports = window["wp"]["priorityQueue"]; }());
 584  
 585  /***/ }),
 586  
 587  /***/ 157:
 588  /***/ (function(module, exports) {
 589  
 590  module.exports = isPromise;
 591  module.exports.default = isPromise;
 592  
 593  function isPromise(obj) {
 594    return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
 595  }
 596  
 597  
 598  /***/ }),
 599  
 600  /***/ 16:
 601  /***/ (function(module, exports) {
 602  
 603  (function() { module.exports = window["regeneratorRuntime"]; }());
 604  
 605  /***/ }),
 606  
 607  /***/ 178:
 608  /***/ (function(module, exports) {
 609  
 610  function combineReducers( reducers ) {
 611      var keys = Object.keys( reducers ),
 612          getNextState;
 613  
 614      getNextState = ( function() {
 615          var fn, i, key;
 616  
 617          fn = 'return {';
 618          for ( i = 0; i < keys.length; i++ ) {
 619              // Rely on Quoted escaping of JSON.stringify with guarantee that
 620              // each member of Object.keys is a string.
 621              //
 622              // "If Type(value) is String, then return the result of calling the
 623              // abstract operation Quote with argument value. [...] The abstract
 624              // operation Quote(value) wraps a String value in double quotes and
 625              // escapes characters within it."
 626              //
 627              // https://www.ecma-international.org/ecma-262/5.1/#sec-15.12.3
 628              key = JSON.stringify( keys[ i ] );
 629  
 630              fn += key + ':r[' + key + '](s[' + key + '],a),';
 631          }
 632          fn += '}';
 633  
 634          return new Function( 'r,s,a', fn );
 635      } )();
 636  
 637      return function combinedReducer( state, action ) {
 638          var nextState, i, key;
 639  
 640          // Assumed changed if initial state.
 641          if ( state === undefined ) {
 642              return getNextState( reducers, {}, action );
 643          }
 644  
 645          nextState = getNextState( reducers, state, action );
 646  
 647          // Determine whether state has changed.
 648          i = keys.length;
 649          while ( i-- ) {
 650              key = keys[ i ];
 651              if ( state[ key ] !== nextState[ key ] ) {
 652                  // Return immediately if a changed value is encountered.
 653                  return nextState;
 654              }
 655          }
 656  
 657          return state;
 658      };
 659  }
 660  
 661  module.exports = combineReducers;
 662  
 663  
 664  /***/ }),
 665  
 666  /***/ 2:
 667  /***/ (function(module, exports) {
 668  
 669  (function() { module.exports = window["lodash"]; }());
 670  
 671  /***/ }),
 672  
 673  /***/ 24:
 674  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 675  
 676  "use strict";
 677  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayLikeToArray; });
 678  function _arrayLikeToArray(arr, len) {
 679    if (len == null || len > arr.length) len = arr.length;
 680  
 681    for (var i = 0, arr2 = new Array(len); i < len; i++) {
 682      arr2[i] = arr[i];
 683    }
 684  
 685    return arr2;
 686  }
 687  
 688  /***/ }),
 689  
 690  /***/ 28:
 691  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 692  
 693  "use strict";
 694  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _unsupportedIterableToArray; });
 695  /* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(24);
 696  
 697  function _unsupportedIterableToArray(o, minLen) {
 698    if (!o) return;
 699    if (typeof o === "string") return Object(_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
 700    var n = Object.prototype.toString.call(o).slice(8, -1);
 701    if (n === "Object" && o.constructor) n = o.constructor.name;
 702    if (n === "Map" || n === "Set") return Array.from(o);
 703    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Object(_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
 704  }
 705  
 706  /***/ }),
 707  
 708  /***/ 290:
 709  /***/ (function(module, exports) {
 710  
 711  (function() { module.exports = window["wp"]["reduxRoutine"]; }());
 712  
 713  /***/ }),
 714  
 715  /***/ 35:
 716  /***/ (function(module, exports) {
 717  
 718  (function() { module.exports = window["wp"]["deprecated"]; }());
 719  
 720  /***/ }),
 721  
 722  /***/ 38:
 723  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 724  
 725  "use strict";
 726  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayWithHoles; });
 727  function _arrayWithHoles(arr) {
 728    if (Array.isArray(arr)) return arr;
 729  }
 730  
 731  /***/ }),
 732  
 733  /***/ 39:
 734  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 735  
 736  "use strict";
 737  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _nonIterableRest; });
 738  function _nonIterableRest() {
 739    throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
 740  }
 741  
 742  /***/ }),
 743  
 744  /***/ 42:
 745  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 746  
 747  "use strict";
 748  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterableToArray; });
 749  function _iterableToArray(iter) {
 750    if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
 751  }
 752  
 753  /***/ }),
 754  
 755  /***/ 457:
 756  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 757  
 758  "use strict";
 759  // ESM COMPAT FLAG
 760  __webpack_require__.r(__webpack_exports__);
 761  
 762  // EXPORTS
 763  __webpack_require__.d(__webpack_exports__, "withSelect", function() { return /* reexport */ with_select; });
 764  __webpack_require__.d(__webpack_exports__, "withDispatch", function() { return /* reexport */ with_dispatch; });
 765  __webpack_require__.d(__webpack_exports__, "withRegistry", function() { return /* reexport */ with_registry; });
 766  __webpack_require__.d(__webpack_exports__, "RegistryProvider", function() { return /* reexport */ context; });
 767  __webpack_require__.d(__webpack_exports__, "RegistryConsumer", function() { return /* reexport */ RegistryConsumer; });
 768  __webpack_require__.d(__webpack_exports__, "useRegistry", function() { return /* reexport */ useRegistry; });
 769  __webpack_require__.d(__webpack_exports__, "useSelect", function() { return /* reexport */ useSelect; });
 770  __webpack_require__.d(__webpack_exports__, "useDispatch", function() { return /* reexport */ use_dispatch; });
 771  __webpack_require__.d(__webpack_exports__, "AsyncModeProvider", function() { return /* reexport */ async_mode_provider_context; });
 772  __webpack_require__.d(__webpack_exports__, "createRegistry", function() { return /* reexport */ createRegistry; });
 773  __webpack_require__.d(__webpack_exports__, "createRegistrySelector", function() { return /* reexport */ createRegistrySelector; });
 774  __webpack_require__.d(__webpack_exports__, "createRegistryControl", function() { return /* reexport */ createRegistryControl; });
 775  __webpack_require__.d(__webpack_exports__, "controls", function() { return /* reexport */ controls_controls; });
 776  __webpack_require__.d(__webpack_exports__, "createReduxStore", function() { return /* reexport */ createReduxStore; });
 777  __webpack_require__.d(__webpack_exports__, "plugins", function() { return /* reexport */ plugins_namespaceObject; });
 778  __webpack_require__.d(__webpack_exports__, "combineReducers", function() { return /* reexport */ turbo_combine_reducers_default.a; });
 779  __webpack_require__.d(__webpack_exports__, "select", function() { return /* binding */ build_module_select; });
 780  __webpack_require__.d(__webpack_exports__, "resolveSelect", function() { return /* binding */ build_module_resolveSelect; });
 781  __webpack_require__.d(__webpack_exports__, "dispatch", function() { return /* binding */ build_module_dispatch; });
 782  __webpack_require__.d(__webpack_exports__, "subscribe", function() { return /* binding */ build_module_subscribe; });
 783  __webpack_require__.d(__webpack_exports__, "registerGenericStore", function() { return /* binding */ build_module_registerGenericStore; });
 784  __webpack_require__.d(__webpack_exports__, "registerStore", function() { return /* binding */ build_module_registerStore; });
 785  __webpack_require__.d(__webpack_exports__, "use", function() { return /* binding */ build_module_use; });
 786  __webpack_require__.d(__webpack_exports__, "register", function() { return /* binding */ build_module_register; });
 787  
 788  // NAMESPACE OBJECT: ./node_modules/@wordpress/data/build-module/redux-store/metadata/selectors.js
 789  var selectors_namespaceObject = {};
 790  __webpack_require__.r(selectors_namespaceObject);
 791  __webpack_require__.d(selectors_namespaceObject, "getIsResolving", function() { return getIsResolving; });
 792  __webpack_require__.d(selectors_namespaceObject, "hasStartedResolution", function() { return hasStartedResolution; });
 793  __webpack_require__.d(selectors_namespaceObject, "hasFinishedResolution", function() { return hasFinishedResolution; });
 794  __webpack_require__.d(selectors_namespaceObject, "isResolving", function() { return isResolving; });
 795  __webpack_require__.d(selectors_namespaceObject, "getCachedResolvers", function() { return getCachedResolvers; });
 796  
 797  // NAMESPACE OBJECT: ./node_modules/@wordpress/data/build-module/redux-store/metadata/actions.js
 798  var actions_namespaceObject = {};
 799  __webpack_require__.r(actions_namespaceObject);
 800  __webpack_require__.d(actions_namespaceObject, "startResolution", function() { return startResolution; });
 801  __webpack_require__.d(actions_namespaceObject, "finishResolution", function() { return finishResolution; });
 802  __webpack_require__.d(actions_namespaceObject, "invalidateResolution", function() { return invalidateResolution; });
 803  __webpack_require__.d(actions_namespaceObject, "invalidateResolutionForStore", function() { return invalidateResolutionForStore; });
 804  __webpack_require__.d(actions_namespaceObject, "invalidateResolutionForStoreSelector", function() { return invalidateResolutionForStoreSelector; });
 805  
 806  // NAMESPACE OBJECT: ./node_modules/@wordpress/data/build-module/plugins/index.js
 807  var plugins_namespaceObject = {};
 808  __webpack_require__.r(plugins_namespaceObject);
 809  __webpack_require__.d(plugins_namespaceObject, "controls", function() { return plugins_controls; });
 810  __webpack_require__.d(plugins_namespaceObject, "persistence", function() { return plugins_persistence; });
 811  
 812  // EXTERNAL MODULE: ./node_modules/turbo-combine-reducers/index.js
 813  var turbo_combine_reducers = __webpack_require__(178);
 814  var turbo_combine_reducers_default = /*#__PURE__*/__webpack_require__.n(turbo_combine_reducers);
 815  
 816  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
 817  var slicedToArray = __webpack_require__(12);
 818  
 819  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
 820  var defineProperty = __webpack_require__(5);
 821  
 822  // EXTERNAL MODULE: external "lodash"
 823  var external_lodash_ = __webpack_require__(2);
 824  
 825  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
 826  var asyncToGenerator = __webpack_require__(48);
 827  
 828  // EXTERNAL MODULE: external "regeneratorRuntime"
 829  var external_regeneratorRuntime_ = __webpack_require__(16);
 830  var external_regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(external_regeneratorRuntime_);
 831  
 832  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
 833  
 834  
 835  function ownKeys(object, enumerableOnly) {
 836    var keys = Object.keys(object);
 837  
 838    if (Object.getOwnPropertySymbols) {
 839      var symbols = Object.getOwnPropertySymbols(object);
 840  
 841      if (enumerableOnly) {
 842        symbols = symbols.filter(function (sym) {
 843          return Object.getOwnPropertyDescriptor(object, sym).enumerable;
 844        });
 845      }
 846  
 847      keys.push.apply(keys, symbols);
 848    }
 849  
 850    return keys;
 851  }
 852  
 853  function _objectSpread2(target) {
 854    for (var i = 1; i < arguments.length; i++) {
 855      var source = arguments[i] != null ? arguments[i] : {};
 856  
 857      if (i % 2) {
 858        ownKeys(Object(source), true).forEach(function (key) {
 859          Object(defineProperty["a" /* default */])(target, key, source[key]);
 860        });
 861      } else if (Object.getOwnPropertyDescriptors) {
 862        Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
 863      } else {
 864        ownKeys(Object(source)).forEach(function (key) {
 865          Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
 866        });
 867      }
 868    }
 869  
 870    return target;
 871  }
 872  // CONCATENATED MODULE: ./node_modules/redux/es/redux.js
 873  
 874  
 875  /**
 876   * Adapted from React: https://github.com/facebook/react/blob/master/packages/shared/formatProdErrorMessage.js
 877   *
 878   * Do not require this module directly! Use normal throw error calls. These messages will be replaced with error codes
 879   * during build.
 880   * @param {number} code
 881   */
 882  function formatProdErrorMessage(code) {
 883    return "Minified Redux error #" + code + "; visit https://redux.js.org/Errors?code=" + code + " for the full message or " + 'use the non-minified dev environment for full errors. ';
 884  }
 885  
 886  // Inlined version of the `symbol-observable` polyfill
 887  var $$observable = (function () {
 888    return typeof Symbol === 'function' && Symbol.observable || '@@observable';
 889  })();
 890  
 891  /**
 892   * These are private action types reserved by Redux.
 893   * For any unknown actions, you must return the current state.
 894   * If the current state is undefined, you must return the initial state.
 895   * Do not reference these action types directly in your code.
 896   */
 897  var randomString = function randomString() {
 898    return Math.random().toString(36).substring(7).split('').join('.');
 899  };
 900  
 901  var ActionTypes = {
 902    INIT: "@@redux/INIT" + randomString(),
 903    REPLACE: "@@redux/REPLACE" + randomString(),
 904    PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {
 905      return "@@redux/PROBE_UNKNOWN_ACTION" + randomString();
 906    }
 907  };
 908  
 909  /**
 910   * @param {any} obj The object to inspect.
 911   * @returns {boolean} True if the argument appears to be a plain object.
 912   */
 913  function isPlainObject(obj) {
 914    if (typeof obj !== 'object' || obj === null) return false;
 915    var proto = obj;
 916  
 917    while (Object.getPrototypeOf(proto) !== null) {
 918      proto = Object.getPrototypeOf(proto);
 919    }
 920  
 921    return Object.getPrototypeOf(obj) === proto;
 922  }
 923  
 924  function kindOf(val) {
 925    var typeOfVal = typeof val;
 926  
 927    if (false) {}
 928  
 929    return typeOfVal;
 930  }
 931  
 932  /**
 933   * Creates a Redux store that holds the state tree.
 934   * The only way to change the data in the store is to call `dispatch()` on it.
 935   *
 936   * There should only be a single store in your app. To specify how different
 937   * parts of the state tree respond to actions, you may combine several reducers
 938   * into a single reducer function by using `combineReducers`.
 939   *
 940   * @param {Function} reducer A function that returns the next state tree, given
 941   * the current state tree and the action to handle.
 942   *
 943   * @param {any} [preloadedState] The initial state. You may optionally specify it
 944   * to hydrate the state from the server in universal apps, or to restore a
 945   * previously serialized user session.
 946   * If you use `combineReducers` to produce the root reducer function, this must be
 947   * an object with the same shape as `combineReducers` keys.
 948   *
 949   * @param {Function} [enhancer] The store enhancer. You may optionally specify it
 950   * to enhance the store with third-party capabilities such as middleware,
 951   * time travel, persistence, etc. The only store enhancer that ships with Redux
 952   * is `applyMiddleware()`.
 953   *
 954   * @returns {Store} A Redux store that lets you read the state, dispatch actions
 955   * and subscribe to changes.
 956   */
 957  
 958  function redux_createStore(reducer, preloadedState, enhancer) {
 959    var _ref2;
 960  
 961    if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') {
 962      throw new Error( true ? formatProdErrorMessage(0) : undefined);
 963    }
 964  
 965    if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {
 966      enhancer = preloadedState;
 967      preloadedState = undefined;
 968    }
 969  
 970    if (typeof enhancer !== 'undefined') {
 971      if (typeof enhancer !== 'function') {
 972        throw new Error( true ? formatProdErrorMessage(1) : undefined);
 973      }
 974  
 975      return enhancer(redux_createStore)(reducer, preloadedState);
 976    }
 977  
 978    if (typeof reducer !== 'function') {
 979      throw new Error( true ? formatProdErrorMessage(2) : undefined);
 980    }
 981  
 982    var currentReducer = reducer;
 983    var currentState = preloadedState;
 984    var currentListeners = [];
 985    var nextListeners = currentListeners;
 986    var isDispatching = false;
 987    /**
 988     * This makes a shallow copy of currentListeners so we can use
 989     * nextListeners as a temporary list while dispatching.
 990     *
 991     * This prevents any bugs around consumers calling
 992     * subscribe/unsubscribe in the middle of a dispatch.
 993     */
 994  
 995    function ensureCanMutateNextListeners() {
 996      if (nextListeners === currentListeners) {
 997        nextListeners = currentListeners.slice();
 998      }
 999    }
1000    /**
1001     * Reads the state tree managed by the store.
1002     *
1003     * @returns {any} The current state tree of your application.
1004     */
1005  
1006  
1007    function getState() {
1008      if (isDispatching) {
1009        throw new Error( true ? formatProdErrorMessage(3) : undefined);
1010      }
1011  
1012      return currentState;
1013    }
1014    /**
1015     * Adds a change listener. It will be called any time an action is dispatched,
1016     * and some part of the state tree may potentially have changed. You may then
1017     * call `getState()` to read the current state tree inside the callback.
1018     *
1019     * You may call `dispatch()` from a change listener, with the following
1020     * caveats:
1021     *
1022     * 1. The subscriptions are snapshotted just before every `dispatch()` call.
1023     * If you subscribe or unsubscribe while the listeners are being invoked, this
1024     * will not have any effect on the `dispatch()` that is currently in progress.
1025     * However, the next `dispatch()` call, whether nested or not, will use a more
1026     * recent snapshot of the subscription list.
1027     *
1028     * 2. The listener should not expect to see all state changes, as the state
1029     * might have been updated multiple times during a nested `dispatch()` before
1030     * the listener is called. It is, however, guaranteed that all subscribers
1031     * registered before the `dispatch()` started will be called with the latest
1032     * state by the time it exits.
1033     *
1034     * @param {Function} listener A callback to be invoked on every dispatch.
1035     * @returns {Function} A function to remove this change listener.
1036     */
1037  
1038  
1039    function subscribe(listener) {
1040      if (typeof listener !== 'function') {
1041        throw new Error( true ? formatProdErrorMessage(4) : undefined);
1042      }
1043  
1044      if (isDispatching) {
1045        throw new Error( true ? formatProdErrorMessage(5) : undefined);
1046      }
1047  
1048      var isSubscribed = true;
1049      ensureCanMutateNextListeners();
1050      nextListeners.push(listener);
1051      return function unsubscribe() {
1052        if (!isSubscribed) {
1053          return;
1054        }
1055  
1056        if (isDispatching) {
1057          throw new Error( true ? formatProdErrorMessage(6) : undefined);
1058        }
1059  
1060        isSubscribed = false;
1061        ensureCanMutateNextListeners();
1062        var index = nextListeners.indexOf(listener);
1063        nextListeners.splice(index, 1);
1064        currentListeners = null;
1065      };
1066    }
1067    /**
1068     * Dispatches an action. It is the only way to trigger a state change.
1069     *
1070     * The `reducer` function, used to create the store, will be called with the
1071     * current state tree and the given `action`. Its return value will
1072     * be considered the **next** state of the tree, and the change listeners
1073     * will be notified.
1074     *
1075     * The base implementation only supports plain object actions. If you want to
1076     * dispatch a Promise, an Observable, a thunk, or something else, you need to
1077     * wrap your store creating function into the corresponding middleware. For
1078     * example, see the documentation for the `redux-thunk` package. Even the
1079     * middleware will eventually dispatch plain object actions using this method.
1080     *
1081     * @param {Object} action A plain object representing “what changed”. It is
1082     * a good idea to keep actions serializable so you can record and replay user
1083     * sessions, or use the time travelling `redux-devtools`. An action must have
1084     * a `type` property which may not be `undefined`. It is a good idea to use
1085     * string constants for action types.
1086     *
1087     * @returns {Object} For convenience, the same action object you dispatched.
1088     *
1089     * Note that, if you use a custom middleware, it may wrap `dispatch()` to
1090     * return something else (for example, a Promise you can await).
1091     */
1092  
1093  
1094    function dispatch(action) {
1095      if (!isPlainObject(action)) {
1096        throw new Error( true ? formatProdErrorMessage(7) : undefined);
1097      }
1098  
1099      if (typeof action.type === 'undefined') {
1100        throw new Error( true ? formatProdErrorMessage(8) : undefined);
1101      }
1102  
1103      if (isDispatching) {
1104        throw new Error( true ? formatProdErrorMessage(9) : undefined);
1105      }
1106  
1107      try {
1108        isDispatching = true;
1109        currentState = currentReducer(currentState, action);
1110      } finally {
1111        isDispatching = false;
1112      }
1113  
1114      var listeners = currentListeners = nextListeners;
1115  
1116      for (var i = 0; i < listeners.length; i++) {
1117        var listener = listeners[i];
1118        listener();
1119      }
1120  
1121      return action;
1122    }
1123    /**
1124     * Replaces the reducer currently used by the store to calculate the state.
1125     *
1126     * You might need this if your app implements code splitting and you want to
1127     * load some of the reducers dynamically. You might also need this if you
1128     * implement a hot reloading mechanism for Redux.
1129     *
1130     * @param {Function} nextReducer The reducer for the store to use instead.
1131     * @returns {void}
1132     */
1133  
1134  
1135    function replaceReducer(nextReducer) {
1136      if (typeof nextReducer !== 'function') {
1137        throw new Error( true ? formatProdErrorMessage(10) : undefined);
1138      }
1139  
1140      currentReducer = nextReducer; // This action has a similiar effect to ActionTypes.INIT.
1141      // Any reducers that existed in both the new and old rootReducer
1142      // will receive the previous state. This effectively populates
1143      // the new state tree with any relevant data from the old one.
1144  
1145      dispatch({
1146        type: ActionTypes.REPLACE
1147      });
1148    }
1149    /**
1150     * Interoperability point for observable/reactive libraries.
1151     * @returns {observable} A minimal observable of state changes.
1152     * For more information, see the observable proposal:
1153     * https://github.com/tc39/proposal-observable
1154     */
1155  
1156  
1157    function observable() {
1158      var _ref;
1159  
1160      var outerSubscribe = subscribe;
1161      return _ref = {
1162        /**
1163         * The minimal observable subscription method.
1164         * @param {Object} observer Any object that can be used as an observer.
1165         * The observer object should have a `next` method.
1166         * @returns {subscription} An object with an `unsubscribe` method that can
1167         * be used to unsubscribe the observable from the store, and prevent further
1168         * emission of values from the observable.
1169         */
1170        subscribe: function subscribe(observer) {
1171          if (typeof observer !== 'object' || observer === null) {
1172            throw new Error( true ? formatProdErrorMessage(11) : undefined);
1173          }
1174  
1175          function observeState() {
1176            if (observer.next) {
1177              observer.next(getState());
1178            }
1179          }
1180  
1181          observeState();
1182          var unsubscribe = outerSubscribe(observeState);
1183          return {
1184            unsubscribe: unsubscribe
1185          };
1186        }
1187      }, _ref[$$observable] = function () {
1188        return this;
1189      }, _ref;
1190    } // When a store is created, an "INIT" action is dispatched so that every
1191    // reducer returns their initial state. This effectively populates
1192    // the initial state tree.
1193  
1194  
1195    dispatch({
1196      type: ActionTypes.INIT
1197    });
1198    return _ref2 = {
1199      dispatch: dispatch,
1200      subscribe: subscribe,
1201      getState: getState,
1202      replaceReducer: replaceReducer
1203    }, _ref2[$$observable] = observable, _ref2;
1204  }
1205  
1206  /**
1207   * Prints a warning in the console if it exists.
1208   *
1209   * @param {String} message The warning message.
1210   * @returns {void}
1211   */
1212  function warning(message) {
1213    /* eslint-disable no-console */
1214    if (typeof console !== 'undefined' && typeof console.error === 'function') {
1215      console.error(message);
1216    }
1217    /* eslint-enable no-console */
1218  
1219  
1220    try {
1221      // This error was thrown as a convenience so that if you enable
1222      // "break on all exceptions" in your console,
1223      // it would pause the execution at this line.
1224      throw new Error(message);
1225    } catch (e) {} // eslint-disable-line no-empty
1226  
1227  }
1228  
1229  function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {
1230    var reducerKeys = Object.keys(reducers);
1231    var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';
1232  
1233    if (reducerKeys.length === 0) {
1234      return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';
1235    }
1236  
1237    if (!isPlainObject(inputState)) {
1238      return "The " + argumentName + " has unexpected type of \"" + kindOf(inputState) + "\". Expected argument to be an object with the following " + ("keys: \"" + reducerKeys.join('", "') + "\"");
1239    }
1240  
1241    var unexpectedKeys = Object.keys(inputState).filter(function (key) {
1242      return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];
1243    });
1244    unexpectedKeys.forEach(function (key) {
1245      unexpectedKeyCache[key] = true;
1246    });
1247    if (action && action.type === ActionTypes.REPLACE) return;
1248  
1249    if (unexpectedKeys.length > 0) {
1250      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.");
1251    }
1252  }
1253  
1254  function assertReducerShape(reducers) {
1255    Object.keys(reducers).forEach(function (key) {
1256      var reducer = reducers[key];
1257      var initialState = reducer(undefined, {
1258        type: ActionTypes.INIT
1259      });
1260  
1261      if (typeof initialState === 'undefined') {
1262        throw new Error( true ? formatProdErrorMessage(12) : undefined);
1263      }
1264  
1265      if (typeof reducer(undefined, {
1266        type: ActionTypes.PROBE_UNKNOWN_ACTION()
1267      }) === 'undefined') {
1268        throw new Error( true ? formatProdErrorMessage(13) : undefined);
1269      }
1270    });
1271  }
1272  /**
1273   * Turns an object whose values are different reducer functions, into a single
1274   * reducer function. It will call every child reducer, and gather their results
1275   * into a single state object, whose keys correspond to the keys of the passed
1276   * reducer functions.
1277   *
1278   * @param {Object} reducers An object whose values correspond to different
1279   * reducer functions that need to be combined into one. One handy way to obtain
1280   * it is to use ES6 `import * as reducers` syntax. The reducers may never return
1281   * undefined for any action. Instead, they should return their initial state
1282   * if the state passed to them was undefined, and the current state for any
1283   * unrecognized action.
1284   *
1285   * @returns {Function} A reducer function that invokes every reducer inside the
1286   * passed object, and builds a state object with the same shape.
1287   */
1288  
1289  
1290  function combineReducers(reducers) {
1291    var reducerKeys = Object.keys(reducers);
1292    var finalReducers = {};
1293  
1294    for (var i = 0; i < reducerKeys.length; i++) {
1295      var key = reducerKeys[i];
1296  
1297      if (false) {}
1298  
1299      if (typeof reducers[key] === 'function') {
1300        finalReducers[key] = reducers[key];
1301      }
1302    }
1303  
1304    var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don't warn about the same
1305    // keys multiple times.
1306  
1307    var unexpectedKeyCache;
1308  
1309    if (false) {}
1310  
1311    var shapeAssertionError;
1312  
1313    try {
1314      assertReducerShape(finalReducers);
1315    } catch (e) {
1316      shapeAssertionError = e;
1317    }
1318  
1319    return function combination(state, action) {
1320      if (state === void 0) {
1321        state = {};
1322      }
1323  
1324      if (shapeAssertionError) {
1325        throw shapeAssertionError;
1326      }
1327  
1328      if (false) { var warningMessage; }
1329  
1330      var hasChanged = false;
1331      var nextState = {};
1332  
1333      for (var _i = 0; _i < finalReducerKeys.length; _i++) {
1334        var _key = finalReducerKeys[_i];
1335        var reducer = finalReducers[_key];
1336        var previousStateForKey = state[_key];
1337        var nextStateForKey = reducer(previousStateForKey, action);
1338  
1339        if (typeof nextStateForKey === 'undefined') {
1340          var actionType = action && action.type;
1341          throw new Error( true ? formatProdErrorMessage(14) : undefined);
1342        }
1343  
1344        nextState[_key] = nextStateForKey;
1345        hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
1346      }
1347  
1348      hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length;
1349      return hasChanged ? nextState : state;
1350    };
1351  }
1352  
1353  function bindActionCreator(actionCreator, dispatch) {
1354    return function () {
1355      return dispatch(actionCreator.apply(this, arguments));
1356    };
1357  }
1358  /**
1359   * Turns an object whose values are action creators, into an object with the
1360   * same keys, but with every function wrapped into a `dispatch` call so they
1361   * may be invoked directly. This is just a convenience method, as you can call
1362   * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.
1363   *
1364   * For convenience, you can also pass an action creator as the first argument,
1365   * and get a dispatch wrapped function in return.
1366   *
1367   * @param {Function|Object} actionCreators An object whose values are action
1368   * creator functions. One handy way to obtain it is to use ES6 `import * as`
1369   * syntax. You may also pass a single function.
1370   *
1371   * @param {Function} dispatch The `dispatch` function available on your Redux
1372   * store.
1373   *
1374   * @returns {Function|Object} The object mimicking the original object, but with
1375   * every action creator wrapped into the `dispatch` call. If you passed a
1376   * function as `actionCreators`, the return value will also be a single
1377   * function.
1378   */
1379  
1380  
1381  function bindActionCreators(actionCreators, dispatch) {
1382    if (typeof actionCreators === 'function') {
1383      return bindActionCreator(actionCreators, dispatch);
1384    }
1385  
1386    if (typeof actionCreators !== 'object' || actionCreators === null) {
1387      throw new Error( true ? formatProdErrorMessage(16) : undefined);
1388    }
1389  
1390    var boundActionCreators = {};
1391  
1392    for (var key in actionCreators) {
1393      var actionCreator = actionCreators[key];
1394  
1395      if (typeof actionCreator === 'function') {
1396        boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);
1397      }
1398    }
1399  
1400    return boundActionCreators;
1401  }
1402  
1403  /**
1404   * Composes single-argument functions from right to left. The rightmost
1405   * function can take multiple arguments as it provides the signature for
1406   * the resulting composite function.
1407   *
1408   * @param {...Function} funcs The functions to compose.
1409   * @returns {Function} A function obtained by composing the argument functions
1410   * from right to left. For example, compose(f, g, h) is identical to doing
1411   * (...args) => f(g(h(...args))).
1412   */
1413  function compose() {
1414    for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {
1415      funcs[_key] = arguments[_key];
1416    }
1417  
1418    if (funcs.length === 0) {
1419      return function (arg) {
1420        return arg;
1421      };
1422    }
1423  
1424    if (funcs.length === 1) {
1425      return funcs[0];
1426    }
1427  
1428    return funcs.reduce(function (a, b) {
1429      return function () {
1430        return a(b.apply(void 0, arguments));
1431      };
1432    });
1433  }
1434  
1435  /**
1436   * Creates a store enhancer that applies middleware to the dispatch method
1437   * of the Redux store. This is handy for a variety of tasks, such as expressing
1438   * asynchronous actions in a concise manner, or logging every action payload.
1439   *
1440   * See `redux-thunk` package as an example of the Redux middleware.
1441   *
1442   * Because middleware is potentially asynchronous, this should be the first
1443   * store enhancer in the composition chain.
1444   *
1445   * Note that each middleware will be given the `dispatch` and `getState` functions
1446   * as named arguments.
1447   *
1448   * @param {...Function} middlewares The middleware chain to be applied.
1449   * @returns {Function} A store enhancer applying the middleware.
1450   */
1451  
1452  function applyMiddleware() {
1453    for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) {
1454      middlewares[_key] = arguments[_key];
1455    }
1456  
1457    return function (createStore) {
1458      return function () {
1459        var store = createStore.apply(void 0, arguments);
1460  
1461        var _dispatch = function dispatch() {
1462          throw new Error( true ? formatProdErrorMessage(15) : undefined);
1463        };
1464  
1465        var middlewareAPI = {
1466          getState: store.getState,
1467          dispatch: function dispatch() {
1468            return _dispatch.apply(void 0, arguments);
1469          }
1470        };
1471        var chain = middlewares.map(function (middleware) {
1472          return middleware(middlewareAPI);
1473        });
1474        _dispatch = compose.apply(void 0, chain)(store.dispatch);
1475        return _objectSpread2(_objectSpread2({}, store), {}, {
1476          dispatch: _dispatch
1477        });
1478      };
1479    };
1480  }
1481  
1482  /*
1483   * This is a dummy function to check if the function name has been altered by minification.
1484   * If the function has been minified and NODE_ENV !== 'production', warn the user.
1485   */
1486  
1487  function isCrushed() {}
1488  
1489  if (false) {}
1490  
1491  
1492  
1493  // EXTERNAL MODULE: ./node_modules/equivalent-key-map/equivalent-key-map.js
1494  var equivalent_key_map = __webpack_require__(107);
1495  var equivalent_key_map_default = /*#__PURE__*/__webpack_require__.n(equivalent_key_map);
1496  
1497  // EXTERNAL MODULE: external ["wp","reduxRoutine"]
1498  var external_wp_reduxRoutine_ = __webpack_require__(290);
1499  var external_wp_reduxRoutine_default = /*#__PURE__*/__webpack_require__.n(external_wp_reduxRoutine_);
1500  
1501  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
1502  var toConsumableArray = __webpack_require__(15);
1503  
1504  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/factory.js
1505  /**
1506   * Creates a selector function that takes additional curried argument with the
1507   * registry `select` function. While a regular selector has signature
1508   * ```js
1509   * ( state, ...selectorArgs ) => ( result )
1510   * ```
1511   * that allows to select data from the store's `state`, a registry selector
1512   * has signature:
1513   * ```js
1514   * ( select ) => ( state, ...selectorArgs ) => ( result )
1515   * ```
1516   * that supports also selecting from other registered stores.
1517   *
1518   * @example
1519   * ```js
1520   * const getCurrentPostId = createRegistrySelector( ( select ) => ( state ) => {
1521   *   return select( 'core/editor' ).getCurrentPostId();
1522   * } );
1523   *
1524   * const getPostEdits = createRegistrySelector( ( select ) => ( state ) => {
1525   *   // calling another registry selector just like any other function
1526   *   const postType = getCurrentPostType( state );
1527   *   const postId = getCurrentPostId( state );
1528   *     return select( 'core' ).getEntityRecordEdits( 'postType', postType, postId );
1529   * } );
1530   * ```
1531   *
1532   * Note how the `getCurrentPostId` selector can be called just like any other function,
1533   * (it works even inside a regular non-registry selector) and we don't need to pass the
1534   * registry as argument. The registry binding happens automatically when registering the selector
1535   * with a store.
1536   *
1537   * @param {Function} registrySelector Function receiving a registry `select`
1538   * function and returning a state selector.
1539   *
1540   * @return {Function} Registry selector that can be registered with a store.
1541   */
1542  function createRegistrySelector(registrySelector) {
1543    // create a selector function that is bound to the registry referenced by `selector.registry`
1544    // and that has the same API as a regular selector. Binding it in such a way makes it
1545    // possible to call the selector directly from another selector.
1546    var selector = function selector() {
1547      return registrySelector(selector.registry.select).apply(void 0, arguments);
1548    };
1549    /**
1550     * Flag indicating that the selector is a registry selector that needs the correct registry
1551     * reference to be assigned to `selecto.registry` to make it work correctly.
1552     * be mapped as a registry selector.
1553     *
1554     * @type {boolean}
1555     */
1556  
1557  
1558    selector.isRegistrySelector = true;
1559    return selector;
1560  }
1561  /**
1562   * Creates a control function that takes additional curried argument with the `registry` object.
1563   * While a regular control has signature
1564   * ```js
1565   * ( action ) => ( iteratorOrPromise )
1566   * ```
1567   * where the control works with the `action` that it's bound to, a registry control has signature:
1568   * ```js
1569   * ( registry ) => ( action ) => ( iteratorOrPromise )
1570   * ```
1571   * A registry control is typically used to select data or dispatch an action to a registered
1572   * store.
1573   *
1574   * When registering a control created with `createRegistryControl` with a store, the store
1575   * knows which calling convention to use when executing the control.
1576   *
1577   * @param {Function} registryControl Function receiving a registry object and returning a control.
1578   *
1579   * @return {Function} Registry control that can be registered with a store.
1580   */
1581  
1582  function createRegistryControl(registryControl) {
1583    registryControl.isRegistryControl = true;
1584    return registryControl;
1585  }
1586  
1587  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/controls.js
1588  
1589  
1590  
1591  var _builtinControls;
1592  
1593  /**
1594   * Internal dependencies
1595   */
1596  
1597  var SELECT = '@@data/SELECT';
1598  var RESOLVE_SELECT = '@@data/RESOLVE_SELECT';
1599  var DISPATCH = '@@data/DISPATCH';
1600  /**
1601   * Dispatches a control action for triggering a synchronous registry select.
1602   *
1603   * Note: This control synchronously returns the current selector value, triggering the
1604   * resolution, but not waiting for it.
1605   *
1606   * @param {string} storeKey     The key for the store the selector belongs to.
1607   * @param {string} selectorName The name of the selector.
1608   * @param {Array}  args         Arguments for the selector.
1609   *
1610   * @example
1611   * ```js
1612   * import { controls } from '@wordpress/data';
1613   *
1614   * // Action generator using `select`.
1615   * export function* myAction() {
1616   *   const isEditorSideBarOpened = yield controls.select( 'core/edit-post', 'isEditorSideBarOpened' );
1617   *   // Do stuff with the result from the `select`.
1618   * }
1619   * ```
1620   *
1621   * @return {Object} The control descriptor.
1622   */
1623  
1624  function controls_select(storeKey, selectorName) {
1625    for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
1626      args[_key - 2] = arguments[_key];
1627    }
1628  
1629    return {
1630      type: SELECT,
1631      storeKey: storeKey,
1632      selectorName: selectorName,
1633      args: args
1634    };
1635  }
1636  /**
1637   * Dispatches a control action for triggering and resolving a registry select.
1638   *
1639   * Note: when this control action is handled, it automatically considers
1640   * selectors that may have a resolver. In such case, it will return a `Promise` that resolves
1641   * after the selector finishes resolving, with the final result value.
1642   *
1643   * @param {string} storeKey      The key for the store the selector belongs to
1644   * @param {string} selectorName  The name of the selector
1645   * @param {Array}  args          Arguments for the selector.
1646   *
1647   * @example
1648   * ```js
1649   * import { controls } from '@wordpress/data';
1650   *
1651   * // Action generator using resolveSelect
1652   * export function* myAction() {
1653   *     const isSidebarOpened = yield controls.resolveSelect( 'core/edit-post', 'isEditorSideBarOpened' );
1654   *     // do stuff with the result from the select.
1655   * }
1656   * ```
1657   *
1658   * @return {Object} The control descriptor.
1659   */
1660  
1661  
1662  function controls_resolveSelect(storeKey, selectorName) {
1663    for (var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
1664      args[_key2 - 2] = arguments[_key2];
1665    }
1666  
1667    return {
1668      type: RESOLVE_SELECT,
1669      storeKey: storeKey,
1670      selectorName: selectorName,
1671      args: args
1672    };
1673  }
1674  /**
1675   * Dispatches a control action for triggering a registry dispatch.
1676   *
1677   * @param {string} storeKey    The key for the store the action belongs to
1678   * @param {string} actionName  The name of the action to dispatch
1679   * @param {Array}  args        Arguments for the dispatch action.
1680   *
1681   * @example
1682   * ```js
1683   * import { controls } from '@wordpress/data-controls';
1684   *
1685   * // Action generator using dispatch
1686   * export function* myAction() {
1687   *   yield controls.dispatch( 'core/edit-post', 'togglePublishSidebar' );
1688   *   // do some other things.
1689   * }
1690   * ```
1691   *
1692   * @return {Object}  The control descriptor.
1693   */
1694  
1695  
1696  function controls_dispatch(storeKey, actionName) {
1697    for (var _len3 = arguments.length, args = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
1698      args[_key3 - 2] = arguments[_key3];
1699    }
1700  
1701    return {
1702      type: DISPATCH,
1703      storeKey: storeKey,
1704      actionName: actionName,
1705      args: args
1706    };
1707  }
1708  
1709  var controls_controls = {
1710    select: controls_select,
1711    resolveSelect: controls_resolveSelect,
1712    dispatch: controls_dispatch
1713  };
1714  var builtinControls = (_builtinControls = {}, Object(defineProperty["a" /* default */])(_builtinControls, SELECT, createRegistryControl(function (registry) {
1715    return function (_ref) {
1716      var _registry$select;
1717  
1718      var storeKey = _ref.storeKey,
1719          selectorName = _ref.selectorName,
1720          args = _ref.args;
1721      return (_registry$select = registry.select(storeKey))[selectorName].apply(_registry$select, Object(toConsumableArray["a" /* default */])(args));
1722    };
1723  })), Object(defineProperty["a" /* default */])(_builtinControls, RESOLVE_SELECT, createRegistryControl(function (registry) {
1724    return function (_ref2) {
1725      var _registry$method;
1726  
1727      var storeKey = _ref2.storeKey,
1728          selectorName = _ref2.selectorName,
1729          args = _ref2.args;
1730      var method = registry.select(storeKey)[selectorName].hasResolver ? 'resolveSelect' : 'select';
1731      return (_registry$method = registry[method](storeKey))[selectorName].apply(_registry$method, Object(toConsumableArray["a" /* default */])(args));
1732    };
1733  })), Object(defineProperty["a" /* default */])(_builtinControls, DISPATCH, createRegistryControl(function (registry) {
1734    return function (_ref3) {
1735      var _registry$dispatch;
1736  
1737      var storeKey = _ref3.storeKey,
1738          actionName = _ref3.actionName,
1739          args = _ref3.args;
1740      return (_registry$dispatch = registry.dispatch(storeKey))[actionName].apply(_registry$dispatch, Object(toConsumableArray["a" /* default */])(args));
1741    };
1742  })), _builtinControls);
1743  
1744  // EXTERNAL MODULE: ./node_modules/is-promise/index.js
1745  var is_promise = __webpack_require__(157);
1746  var is_promise_default = /*#__PURE__*/__webpack_require__.n(is_promise);
1747  
1748  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/promise-middleware.js
1749  /**
1750   * External dependencies
1751   */
1752  
1753  /**
1754   * Simplest possible promise redux middleware.
1755   *
1756   * @return {Function} middleware.
1757   */
1758  
1759  var promise_middleware_promiseMiddleware = function promiseMiddleware() {
1760    return function (next) {
1761      return function (action) {
1762        if (is_promise_default()(action)) {
1763          return action.then(function (resolvedAction) {
1764            if (resolvedAction) {
1765              return next(resolvedAction);
1766            }
1767          });
1768        }
1769  
1770        return next(action);
1771      };
1772    };
1773  };
1774  
1775  /* harmony default export */ var promise_middleware = (promise_middleware_promiseMiddleware);
1776  
1777  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/resolvers-cache-middleware.js
1778  
1779  
1780  
1781  /**
1782   * External dependencies
1783   */
1784  
1785  /** @typedef {import('./registry').WPDataRegistry} WPDataRegistry */
1786  
1787  /**
1788   * Creates a middleware handling resolvers cache invalidation.
1789   *
1790   * @param {WPDataRegistry} registry   The registry reference for which to create
1791   *                                    the middleware.
1792   * @param {string}         reducerKey The namespace for which to create the
1793   *                                    middleware.
1794   *
1795   * @return {Function} Middleware function.
1796   */
1797  
1798  var resolvers_cache_middleware_createResolversCacheMiddleware = function createResolversCacheMiddleware(registry, reducerKey) {
1799    return function () {
1800      return function (next) {
1801        return function (action) {
1802          var resolvers = registry.select('core/data').getCachedResolvers(reducerKey);
1803          Object.entries(resolvers).forEach(function (_ref) {
1804            var _ref2 = Object(slicedToArray["a" /* default */])(_ref, 2),
1805                selectorName = _ref2[0],
1806                resolversByArgs = _ref2[1];
1807  
1808            var resolver = Object(external_lodash_["get"])(registry.stores, [reducerKey, 'resolvers', selectorName]);
1809  
1810            if (!resolver || !resolver.shouldInvalidate) {
1811              return;
1812            }
1813  
1814            resolversByArgs.forEach(function (value, args) {
1815              // resolversByArgs is the map Map([ args ] => boolean) storing the cache resolution status for a given selector.
1816              // If the value is false it means this resolver has finished its resolution which means we need to invalidate it,
1817              // if it's true it means it's inflight and the invalidation is not necessary.
1818              if (value !== false || !resolver.shouldInvalidate.apply(resolver, [action].concat(Object(toConsumableArray["a" /* default */])(args)))) {
1819                return;
1820              } // Trigger cache invalidation
1821  
1822  
1823              registry.dispatch('core/data').invalidateResolution(reducerKey, selectorName, args);
1824            });
1825          });
1826          return next(action);
1827        };
1828      };
1829    };
1830  };
1831  
1832  /* harmony default export */ var resolvers_cache_middleware = (resolvers_cache_middleware_createResolversCacheMiddleware);
1833  
1834  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/redux-store/thunk-middleware.js
1835  function createThunkMiddleware(args) {
1836    return function () {
1837      return function (next) {
1838        return function (action) {
1839          if (typeof action === 'function') {
1840            return action(args);
1841          }
1842  
1843          return next(action);
1844        };
1845      };
1846    };
1847  }
1848  
1849  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/redux-store/metadata/utils.js
1850  
1851  
1852  function utils_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; }
1853  
1854  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { utils_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 { utils_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
1855  
1856  /**
1857   * Higher-order reducer creator which creates a combined reducer object, keyed
1858   * by a property on the action object.
1859   *
1860   * @param {string} actionProperty Action property by which to key object.
1861   *
1862   * @return {Function} Higher-order reducer.
1863   */
1864  var utils_onSubKey = function onSubKey(actionProperty) {
1865    return function (reducer) {
1866      return function () {
1867        var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1868        var action = arguments.length > 1 ? arguments[1] : undefined;
1869        // Retrieve subkey from action. Do not track if undefined; useful for cases
1870        // where reducer is scoped by action shape.
1871        var key = action[actionProperty];
1872  
1873        if (key === undefined) {
1874          return state;
1875        } // Avoid updating state if unchanged. Note that this also accounts for a
1876        // reducer which returns undefined on a key which is not yet tracked.
1877  
1878  
1879        var nextKeyState = reducer(state[key], action);
1880  
1881        if (nextKeyState === state[key]) {
1882          return state;
1883        }
1884  
1885        return _objectSpread(_objectSpread({}, state), {}, Object(defineProperty["a" /* default */])({}, key, nextKeyState));
1886      };
1887    };
1888  };
1889  
1890  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/redux-store/metadata/reducer.js
1891  /**
1892   * External dependencies
1893   */
1894  
1895  
1896  /**
1897   * Internal dependencies
1898   */
1899  
1900  
1901  /**
1902   * Reducer function returning next state for selector resolution of
1903   * subkeys, object form:
1904   *
1905   *  selectorName -> EquivalentKeyMap<Array,boolean>
1906   *
1907   * @param {Object} state  Current state.
1908   * @param {Object} action Dispatched action.
1909   *
1910   * @return {Object} Next state.
1911   */
1912  
1913  var subKeysIsResolved = utils_onSubKey('selectorName')(function () {
1914    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new equivalent_key_map_default.a();
1915    var action = arguments.length > 1 ? arguments[1] : undefined;
1916  
1917    switch (action.type) {
1918      case 'START_RESOLUTION':
1919      case 'FINISH_RESOLUTION':
1920        {
1921          var isStarting = action.type === 'START_RESOLUTION';
1922          var nextState = new equivalent_key_map_default.a(state);
1923          nextState.set(action.args, isStarting);
1924          return nextState;
1925        }
1926  
1927      case 'INVALIDATE_RESOLUTION':
1928        {
1929          var _nextState = new equivalent_key_map_default.a(state);
1930  
1931          _nextState.delete(action.args);
1932  
1933          return _nextState;
1934        }
1935    }
1936  
1937    return state;
1938  });
1939  /**
1940   * Reducer function returning next state for selector resolution, object form:
1941   *
1942   *   selectorName -> EquivalentKeyMap<Array, boolean>
1943   *
1944   * @param {Object} state   Current state.
1945   * @param {Object} action  Dispatched action.
1946   *
1947   * @return {Object} Next state.
1948   */
1949  
1950  var reducer_isResolved = function isResolved() {
1951    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1952    var action = arguments.length > 1 ? arguments[1] : undefined;
1953  
1954    switch (action.type) {
1955      case 'INVALIDATE_RESOLUTION_FOR_STORE':
1956        return {};
1957  
1958      case 'INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR':
1959        return Object(external_lodash_["has"])(state, [action.selectorName]) ? Object(external_lodash_["omit"])(state, [action.selectorName]) : state;
1960  
1961      case 'START_RESOLUTION':
1962      case 'FINISH_RESOLUTION':
1963      case 'INVALIDATE_RESOLUTION':
1964        return subKeysIsResolved(state, action);
1965    }
1966  
1967    return state;
1968  };
1969  
1970  /* harmony default export */ var metadata_reducer = (reducer_isResolved);
1971  
1972  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/redux-store/metadata/selectors.js
1973  /**
1974   * External dependencies
1975   */
1976  
1977  /**
1978   * Returns the raw `isResolving` value for a given selector name,
1979   * and arguments set. May be undefined if the selector has never been resolved
1980   * or not resolved for the given set of arguments, otherwise true or false for
1981   * resolution started and completed respectively.
1982   *
1983   * @param {Object} state        Data state.
1984   * @param {string} selectorName Selector name.
1985   * @param {Array}  args         Arguments passed to selector.
1986   *
1987   * @return {?boolean} isResolving value.
1988   */
1989  
1990  function getIsResolving(state, selectorName, args) {
1991    var map = Object(external_lodash_["get"])(state, [selectorName]);
1992  
1993    if (!map) {
1994      return;
1995    }
1996  
1997    return map.get(args);
1998  }
1999  /**
2000   * Returns true if resolution has already been triggered for a given
2001   * selector name, and arguments set.
2002   *
2003   * @param {Object} state        Data state.
2004   * @param {string} selectorName Selector name.
2005   * @param {?Array} args         Arguments passed to selector (default `[]`).
2006   *
2007   * @return {boolean} Whether resolution has been triggered.
2008   */
2009  
2010  function hasStartedResolution(state, selectorName) {
2011    var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
2012    return getIsResolving(state, selectorName, args) !== undefined;
2013  }
2014  /**
2015   * Returns true if resolution has completed for a given selector
2016   * name, and arguments set.
2017   *
2018   * @param {Object} state        Data state.
2019   * @param {string} selectorName Selector name.
2020   * @param {?Array} args         Arguments passed to selector.
2021   *
2022   * @return {boolean} Whether resolution has completed.
2023   */
2024  
2025  function hasFinishedResolution(state, selectorName) {
2026    var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
2027    return getIsResolving(state, selectorName, args) === false;
2028  }
2029  /**
2030   * Returns true if resolution has been triggered but has not yet completed for
2031   * a given selector name, and arguments set.
2032   *
2033   * @param {Object} state        Data state.
2034   * @param {string} selectorName Selector name.
2035   * @param {?Array} args         Arguments passed to selector.
2036   *
2037   * @return {boolean} Whether resolution is in progress.
2038   */
2039  
2040  function isResolving(state, selectorName) {
2041    var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
2042    return getIsResolving(state, selectorName, args) === true;
2043  }
2044  /**
2045   * Returns the list of the cached resolvers.
2046   *
2047   * @param {Object} state      Data state.
2048   *
2049   * @return {Object} Resolvers mapped by args and selectorName.
2050   */
2051  
2052  function getCachedResolvers(state) {
2053    return state;
2054  }
2055  
2056  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/redux-store/metadata/actions.js
2057  /**
2058   * Returns an action object used in signalling that selector resolution has
2059   * started.
2060   *
2061   * @param {string} selectorName Name of selector for which resolver triggered.
2062   * @param {...*}   args         Arguments to associate for uniqueness.
2063   *
2064   * @return {Object} Action object.
2065   */
2066  function startResolution(selectorName, args) {
2067    return {
2068      type: 'START_RESOLUTION',
2069      selectorName: selectorName,
2070      args: args
2071    };
2072  }
2073  /**
2074   * Returns an action object used in signalling that selector resolution has
2075   * completed.
2076   *
2077   * @param {string} selectorName Name of selector for which resolver triggered.
2078   * @param {...*}   args         Arguments to associate for uniqueness.
2079   *
2080   * @return {Object} Action object.
2081   */
2082  
2083  function finishResolution(selectorName, args) {
2084    return {
2085      type: 'FINISH_RESOLUTION',
2086      selectorName: selectorName,
2087      args: args
2088    };
2089  }
2090  /**
2091   * Returns an action object used in signalling that we should invalidate the resolution cache.
2092   *
2093   * @param {string} selectorName Name of selector for which resolver should be invalidated.
2094   * @param {Array}  args         Arguments to associate for uniqueness.
2095   *
2096   * @return {Object} Action object.
2097   */
2098  
2099  function invalidateResolution(selectorName, args) {
2100    return {
2101      type: 'INVALIDATE_RESOLUTION',
2102      selectorName: selectorName,
2103      args: args
2104    };
2105  }
2106  /**
2107   * Returns an action object used in signalling that the resolution
2108   * should be invalidated.
2109   *
2110   * @return {Object} Action object.
2111   */
2112  
2113  function invalidateResolutionForStore() {
2114    return {
2115      type: 'INVALIDATE_RESOLUTION_FOR_STORE'
2116    };
2117  }
2118  /**
2119   * Returns an action object used in signalling that the resolution cache for a
2120   * given selectorName should be invalidated.
2121   *
2122   * @param {string} selectorName Name of selector for which all resolvers should
2123   *                              be invalidated.
2124   *
2125   * @return  {Object} Action object.
2126   */
2127  
2128  function invalidateResolutionForStoreSelector(selectorName) {
2129    return {
2130      type: 'INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR',
2131      selectorName: selectorName
2132    };
2133  }
2134  
2135  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/redux-store/index.js
2136  
2137  
2138  
2139  
2140  function redux_store_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; }
2141  
2142  function redux_store_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { redux_store_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 { redux_store_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
2143  
2144  /**
2145   * External dependencies
2146   */
2147  
2148  
2149  
2150  
2151  /**
2152   * WordPress dependencies
2153   */
2154  
2155  
2156  /**
2157   * Internal dependencies
2158   */
2159  
2160  
2161  
2162  
2163  
2164  
2165  
2166  
2167  /** @typedef {import('../types').WPDataRegistry} WPDataRegistry */
2168  
2169  /** @typedef {import('../types').WPDataStore} WPDataStore */
2170  
2171  /** @typedef {import('../types').WPDataReduxStoreConfig} WPDataReduxStoreConfig */
2172  
2173  /**
2174   * Create a cache to track whether resolvers started running or not.
2175   *
2176   * @return {Object} Resolvers Cache.
2177   */
2178  
2179  function createResolversCache() {
2180    var cache = {};
2181    return {
2182      isRunning: function isRunning(selectorName, args) {
2183        return cache[selectorName] && cache[selectorName].get(args);
2184      },
2185      clear: function clear(selectorName, args) {
2186        if (cache[selectorName]) {
2187          cache[selectorName].delete(args);
2188        }
2189      },
2190      markAsRunning: function markAsRunning(selectorName, args) {
2191        if (!cache[selectorName]) {
2192          cache[selectorName] = new equivalent_key_map_default.a();
2193        }
2194  
2195        cache[selectorName].set(args, true);
2196      }
2197    };
2198  }
2199  /**
2200   * Creates a data store definition for the provided Redux store options containing
2201   * properties describing reducer, actions, selectors, controls and resolvers.
2202   *
2203   * @example
2204   * ```js
2205   * import { createReduxStore } from '@wordpress/data';
2206   *
2207   * const store = createReduxStore( 'demo', {
2208   *     reducer: ( state = 'OK' ) => state,
2209   *     selectors: {
2210   *         getValue: ( state ) => state,
2211   *     },
2212   * } );
2213   * ```
2214   *
2215   * @param {string}                 key      Unique namespace identifier.
2216   * @param {WPDataReduxStoreConfig} options  Registered store options, with properties
2217   *                                          describing reducer, actions, selectors,
2218   *                                          and resolvers.
2219   *
2220   * @return {WPDataStore} Store Object.
2221   */
2222  
2223  
2224  function createReduxStore(key, options) {
2225    return {
2226      name: key,
2227      instantiate: function instantiate(registry) {
2228        var reducer = options.reducer;
2229        var thunkArgs = {
2230          registry: registry,
2231  
2232          get dispatch() {
2233            return Object.assign(function (action) {
2234              return store.dispatch(action);
2235            }, getActions());
2236          },
2237  
2238          get select() {
2239            return Object.assign(function (selector) {
2240              return selector(store.__unstableOriginalGetState());
2241            }, getSelectors());
2242          },
2243  
2244          get resolveSelect() {
2245            return getResolveSelectors();
2246          }
2247  
2248        };
2249        var store = instantiateReduxStore(key, options, registry, thunkArgs);
2250        var resolversCache = createResolversCache();
2251        var resolvers;
2252        var actions = mapActions(redux_store_objectSpread(redux_store_objectSpread({}, actions_namespaceObject), options.actions), store);
2253        var selectors = mapSelectors(redux_store_objectSpread(redux_store_objectSpread({}, Object(external_lodash_["mapValues"])(selectors_namespaceObject, function (selector) {
2254          return function (state) {
2255            for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
2256              args[_key - 1] = arguments[_key];
2257            }
2258  
2259            return selector.apply(void 0, [state.metadata].concat(args));
2260          };
2261        })), Object(external_lodash_["mapValues"])(options.selectors, function (selector) {
2262          if (selector.isRegistrySelector) {
2263            selector.registry = registry;
2264          }
2265  
2266          return function (state) {
2267            for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
2268              args[_key2 - 1] = arguments[_key2];
2269            }
2270  
2271            return selector.apply(void 0, [state.root].concat(args));
2272          };
2273        })), store);
2274  
2275        if (options.resolvers) {
2276          var result = mapResolvers(options.resolvers, selectors, store, resolversCache);
2277          resolvers = result.resolvers;
2278          selectors = result.selectors;
2279        }
2280  
2281        var resolveSelectors = mapResolveSelectors(selectors, store);
2282  
2283        var getSelectors = function getSelectors() {
2284          return selectors;
2285        };
2286  
2287        var getActions = function getActions() {
2288          return actions;
2289        };
2290  
2291        var getResolveSelectors = function getResolveSelectors() {
2292          return resolveSelectors;
2293        }; // We have some modules monkey-patching the store object
2294        // It's wrong to do so but until we refactor all of our effects to controls
2295        // We need to keep the same "store" instance here.
2296  
2297  
2298        store.__unstableOriginalGetState = store.getState;
2299  
2300        store.getState = function () {
2301          return store.__unstableOriginalGetState().root;
2302        }; // Customize subscribe behavior to call listeners only on effective change,
2303        // not on every dispatch.
2304  
2305  
2306        var subscribe = store && function (listener) {
2307          var lastState = store.__unstableOriginalGetState();
2308  
2309          return store.subscribe(function () {
2310            var state = store.__unstableOriginalGetState();
2311  
2312            var hasChanged = state !== lastState;
2313            lastState = state;
2314  
2315            if (hasChanged) {
2316              listener();
2317            }
2318          });
2319        }; // This can be simplified to just { subscribe, getSelectors, getActions }
2320        // Once we remove the use function.
2321  
2322  
2323        return {
2324          reducer: reducer,
2325          store: store,
2326          actions: actions,
2327          selectors: selectors,
2328          resolvers: resolvers,
2329          getSelectors: getSelectors,
2330          getResolveSelectors: getResolveSelectors,
2331          getActions: getActions,
2332          subscribe: subscribe
2333        };
2334      }
2335    };
2336  }
2337  /**
2338   * Creates a redux store for a namespace.
2339   *
2340   * @param {string}         key      Unique namespace identifier.
2341   * @param {Object}         options  Registered store options, with properties
2342   *                                  describing reducer, actions, selectors,
2343   *                                  and resolvers.
2344   * @param {WPDataRegistry} registry Registry reference.
2345   * @param {Object} thunkArgs        Argument object for the thunk middleware.
2346   * @return {Object} Newly created redux store.
2347   */
2348  
2349  function instantiateReduxStore(key, options, registry, thunkArgs) {
2350    var controls = redux_store_objectSpread(redux_store_objectSpread({}, options.controls), builtinControls);
2351  
2352    var normalizedControls = Object(external_lodash_["mapValues"])(controls, function (control) {
2353      return control.isRegistryControl ? control(registry) : control;
2354    });
2355    var middlewares = [resolvers_cache_middleware(registry, key), promise_middleware, external_wp_reduxRoutine_default()(normalizedControls)];
2356  
2357    if (options.__experimentalUseThunks) {
2358      middlewares.push(createThunkMiddleware(thunkArgs));
2359    }
2360  
2361    var enhancers = [applyMiddleware.apply(void 0, middlewares)];
2362  
2363    if (typeof window !== 'undefined' && window.__REDUX_DEVTOOLS_EXTENSION__) {
2364      enhancers.push(window.__REDUX_DEVTOOLS_EXTENSION__({
2365        name: key,
2366        instanceId: key
2367      }));
2368    }
2369  
2370    var reducer = options.reducer,
2371        initialState = options.initialState;
2372    var enhancedReducer = turbo_combine_reducers_default()({
2373      metadata: metadata_reducer,
2374      root: reducer
2375    });
2376    return redux_createStore(enhancedReducer, {
2377      root: initialState
2378    }, Object(external_lodash_["flowRight"])(enhancers));
2379  }
2380  /**
2381   * Maps selectors to a store.
2382   *
2383   * @param {Object} selectors Selectors to register. Keys will be used as the
2384   *                           public facing API. Selectors will get passed the
2385   *                           state as first argument.
2386   * @param {Object} store     The store to which the selectors should be mapped.
2387   * @return {Object} Selectors mapped to the provided store.
2388   */
2389  
2390  
2391  function mapSelectors(selectors, store) {
2392    var createStateSelector = function createStateSelector(registrySelector) {
2393      var selector = function runSelector() {
2394        // This function is an optimized implementation of:
2395        //
2396        //   selector( store.getState(), ...arguments )
2397        //
2398        // Where the above would incur an `Array#concat` in its application,
2399        // the logic here instead efficiently constructs an arguments array via
2400        // direct assignment.
2401        var argsLength = arguments.length;
2402        var args = new Array(argsLength + 1);
2403        args[0] = store.__unstableOriginalGetState();
2404  
2405        for (var i = 0; i < argsLength; i++) {
2406          args[i + 1] = arguments[i];
2407        }
2408  
2409        return registrySelector.apply(void 0, args);
2410      };
2411  
2412      selector.hasResolver = false;
2413      return selector;
2414    };
2415  
2416    return Object(external_lodash_["mapValues"])(selectors, createStateSelector);
2417  }
2418  /**
2419   * Maps actions to dispatch from a given store.
2420   *
2421   * @param {Object} actions    Actions to register.
2422   * @param {Object} store      The redux store to which the actions should be mapped.
2423   * @return {Object}           Actions mapped to the redux store provided.
2424   */
2425  
2426  
2427  function mapActions(actions, store) {
2428    var createBoundAction = function createBoundAction(action) {
2429      return function () {
2430        return Promise.resolve(store.dispatch(action.apply(void 0, arguments)));
2431      };
2432    };
2433  
2434    return Object(external_lodash_["mapValues"])(actions, createBoundAction);
2435  }
2436  /**
2437   * Maps selectors to functions that return a resolution promise for them
2438   *
2439   * @param {Object} selectors Selectors to map.
2440   * @param {Object} store     The redux store the selectors select from.
2441   * @return {Object}          Selectors mapped to their resolution functions.
2442   */
2443  
2444  
2445  function mapResolveSelectors(selectors, store) {
2446    return Object(external_lodash_["mapValues"])(Object(external_lodash_["omit"])(selectors, ['getIsResolving', 'hasStartedResolution', 'hasFinishedResolution', 'isResolving', 'getCachedResolvers']), function (selector, selectorName) {
2447      return function () {
2448        for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
2449          args[_key3] = arguments[_key3];
2450        }
2451  
2452        return new Promise(function (resolve) {
2453          var hasFinished = function hasFinished() {
2454            return selectors.hasFinishedResolution(selectorName, args);
2455          };
2456  
2457          var getResult = function getResult() {
2458            return selector.apply(null, args);
2459          }; // trigger the selector (to trigger the resolver)
2460  
2461  
2462          var result = getResult();
2463  
2464          if (hasFinished()) {
2465            return resolve(result);
2466          }
2467  
2468          var unsubscribe = store.subscribe(function () {
2469            if (hasFinished()) {
2470              unsubscribe();
2471              resolve(getResult());
2472            }
2473          });
2474        });
2475      };
2476    });
2477  }
2478  /**
2479   * Returns resolvers with matched selectors for a given namespace.
2480   * Resolvers are side effects invoked once per argument set of a given selector call,
2481   * used in ensuring that the data needs for the selector are satisfied.
2482   *
2483   * @param {Object} resolvers      Resolvers to register.
2484   * @param {Object} selectors      The current selectors to be modified.
2485   * @param {Object} store          The redux store to which the resolvers should be mapped.
2486   * @param {Object} resolversCache Resolvers Cache.
2487   */
2488  
2489  
2490  function mapResolvers(resolvers, selectors, store, resolversCache) {
2491    // The `resolver` can be either a function that does the resolution, or, in more advanced
2492    // cases, an object with a `fullfill` method and other optional methods like `isFulfilled`.
2493    // Here we normalize the `resolver` function to an object with `fulfill` method.
2494    var mappedResolvers = Object(external_lodash_["mapValues"])(resolvers, function (resolver) {
2495      if (resolver.fulfill) {
2496        return resolver;
2497      }
2498  
2499      return redux_store_objectSpread(redux_store_objectSpread({}, resolver), {}, {
2500        // copy the enumerable properties of the resolver function
2501        fulfill: resolver // add the fulfill method
2502  
2503      });
2504    });
2505  
2506    var mapSelector = function mapSelector(selector, selectorName) {
2507      var resolver = resolvers[selectorName];
2508  
2509      if (!resolver) {
2510        selector.hasResolver = false;
2511        return selector;
2512      }
2513  
2514      var selectorResolver = function selectorResolver() {
2515        for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
2516          args[_key4] = arguments[_key4];
2517        }
2518  
2519        function fulfillSelector() {
2520          return _fulfillSelector.apply(this, arguments);
2521        }
2522  
2523        function _fulfillSelector() {
2524          _fulfillSelector = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/external_regeneratorRuntime_default.a.mark(function _callee2() {
2525            var state, _store$__unstableOrig, metadata;
2526  
2527            return external_regeneratorRuntime_default.a.wrap(function _callee2$(_context2) {
2528              while (1) {
2529                switch (_context2.prev = _context2.next) {
2530                  case 0:
2531                    state = store.getState();
2532  
2533                    if (!(resolversCache.isRunning(selectorName, args) || typeof resolver.isFulfilled === 'function' && resolver.isFulfilled.apply(resolver, [state].concat(args)))) {
2534                      _context2.next = 3;
2535                      break;
2536                    }
2537  
2538                    return _context2.abrupt("return");
2539  
2540                  case 3:
2541                    _store$__unstableOrig = store.__unstableOriginalGetState(), metadata = _store$__unstableOrig.metadata;
2542  
2543                    if (!hasStartedResolution(metadata, selectorName, args)) {
2544                      _context2.next = 6;
2545                      break;
2546                    }
2547  
2548                    return _context2.abrupt("return");
2549  
2550                  case 6:
2551                    resolversCache.markAsRunning(selectorName, args);
2552                    setTimeout( /*#__PURE__*/Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/external_regeneratorRuntime_default.a.mark(function _callee() {
2553                      return external_regeneratorRuntime_default.a.wrap(function _callee$(_context) {
2554                        while (1) {
2555                          switch (_context.prev = _context.next) {
2556                            case 0:
2557                              resolversCache.clear(selectorName, args);
2558                              store.dispatch(startResolution(selectorName, args));
2559                              _context.next = 4;
2560                              return fulfillResolver.apply(void 0, [store, mappedResolvers, selectorName].concat(args));
2561  
2562                            case 4:
2563                              store.dispatch(finishResolution(selectorName, args));
2564  
2565                            case 5:
2566                            case "end":
2567                              return _context.stop();
2568                          }
2569                        }
2570                      }, _callee);
2571                    })));
2572  
2573                  case 8:
2574                  case "end":
2575                    return _context2.stop();
2576                }
2577              }
2578            }, _callee2);
2579          }));
2580          return _fulfillSelector.apply(this, arguments);
2581        }
2582  
2583        fulfillSelector.apply(void 0, args);
2584        return selector.apply(void 0, args);
2585      };
2586  
2587      selectorResolver.hasResolver = true;
2588      return selectorResolver;
2589    };
2590  
2591    return {
2592      resolvers: mappedResolvers,
2593      selectors: Object(external_lodash_["mapValues"])(selectors, mapSelector)
2594    };
2595  }
2596  /**
2597   * Calls a resolver given arguments
2598   *
2599   * @param {Object} store        Store reference, for fulfilling via resolvers
2600   * @param {Object} resolvers    Store Resolvers
2601   * @param {string} selectorName Selector name to fulfill.
2602   * @param {Array} args          Selector Arguments.
2603   */
2604  
2605  
2606  function fulfillResolver(_x, _x2, _x3) {
2607    return _fulfillResolver.apply(this, arguments);
2608  }
2609  
2610  function _fulfillResolver() {
2611    _fulfillResolver = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/external_regeneratorRuntime_default.a.mark(function _callee3(store, resolvers, selectorName) {
2612      var resolver,
2613          _len5,
2614          args,
2615          _key5,
2616          action,
2617          _args3 = arguments;
2618  
2619      return external_regeneratorRuntime_default.a.wrap(function _callee3$(_context3) {
2620        while (1) {
2621          switch (_context3.prev = _context3.next) {
2622            case 0:
2623              resolver = Object(external_lodash_["get"])(resolvers, [selectorName]);
2624  
2625              if (resolver) {
2626                _context3.next = 3;
2627                break;
2628              }
2629  
2630              return _context3.abrupt("return");
2631  
2632            case 3:
2633              for (_len5 = _args3.length, args = new Array(_len5 > 3 ? _len5 - 3 : 0), _key5 = 3; _key5 < _len5; _key5++) {
2634                args[_key5 - 3] = _args3[_key5];
2635              }
2636  
2637              action = resolver.fulfill.apply(resolver, args);
2638  
2639              if (!action) {
2640                _context3.next = 8;
2641                break;
2642              }
2643  
2644              _context3.next = 8;
2645              return store.dispatch(action);
2646  
2647            case 8:
2648            case "end":
2649              return _context3.stop();
2650          }
2651        }
2652      }, _callee3);
2653    }));
2654    return _fulfillResolver.apply(this, arguments);
2655  }
2656  
2657  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/store/index.js
2658  
2659  
2660  function store_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; }
2661  
2662  function store_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { store_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 { store_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
2663  
2664  function createCoreDataStore(registry) {
2665    var getCoreDataSelector = function getCoreDataSelector(selectorName) {
2666      return function (key) {
2667        var _registry$select;
2668  
2669        for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
2670          args[_key - 1] = arguments[_key];
2671        }
2672  
2673        return (_registry$select = registry.select(key))[selectorName].apply(_registry$select, args);
2674      };
2675    };
2676  
2677    var getCoreDataAction = function getCoreDataAction(actionName) {
2678      return function (key) {
2679        var _registry$dispatch;
2680  
2681        for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
2682          args[_key2 - 1] = arguments[_key2];
2683        }
2684  
2685        return (_registry$dispatch = registry.dispatch(key))[actionName].apply(_registry$dispatch, args);
2686      };
2687    };
2688  
2689    return {
2690      getSelectors: function getSelectors() {
2691        return ['getIsResolving', 'hasStartedResolution', 'hasFinishedResolution', 'isResolving', 'getCachedResolvers'].reduce(function (memo, selectorName) {
2692          return store_objectSpread(store_objectSpread({}, memo), {}, Object(defineProperty["a" /* default */])({}, selectorName, getCoreDataSelector(selectorName)));
2693        }, {});
2694      },
2695      getActions: function getActions() {
2696        return ['startResolution', 'finishResolution', 'invalidateResolution', 'invalidateResolutionForStore', 'invalidateResolutionForStoreSelector'].reduce(function (memo, actionName) {
2697          return store_objectSpread(store_objectSpread({}, memo), {}, Object(defineProperty["a" /* default */])({}, actionName, getCoreDataAction(actionName)));
2698        }, {});
2699      },
2700      subscribe: function subscribe() {
2701        // There's no reasons to trigger any listener when we subscribe to this store
2702        // because there's no state stored in this store that need to retrigger selectors
2703        // if a change happens, the corresponding store where the tracking stated live
2704        // would have already triggered a "subscribe" call.
2705        return function () {};
2706      }
2707    };
2708  }
2709  
2710  /* harmony default export */ var build_module_store = (createCoreDataStore);
2711  
2712  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/registry.js
2713  
2714  
2715  
2716  function registry_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; }
2717  
2718  function registry_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { registry_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 { registry_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
2719  
2720  /**
2721   * External dependencies
2722   */
2723  
2724  /**
2725   * Internal dependencies
2726   */
2727  
2728  
2729  
2730  /** @typedef {import('./types').WPDataStore} WPDataStore */
2731  
2732  /**
2733   * @typedef {Object} WPDataRegistry An isolated orchestrator of store registrations.
2734   *
2735   * @property {Function} registerGenericStore Given a namespace key and settings
2736   *                                           object, registers a new generic
2737   *                                           store.
2738   * @property {Function} registerStore        Given a namespace key and settings
2739   *                                           object, registers a new namespace
2740   *                                           store.
2741   * @property {Function} subscribe            Given a function callback, invokes
2742   *                                           the callback on any change to state
2743   *                                           within any registered store.
2744   * @property {Function} select               Given a namespace key, returns an
2745   *                                           object of the  store's registered
2746   *                                           selectors.
2747   * @property {Function} dispatch             Given a namespace key, returns an
2748   *                                           object of the store's registered
2749   *                                           action dispatchers.
2750   */
2751  
2752  /**
2753   * @typedef {Object} WPDataPlugin An object of registry function overrides.
2754   *
2755   * @property {Function} registerStore registers store.
2756   */
2757  
2758  /**
2759   * Creates a new store registry, given an optional object of initial store
2760   * configurations.
2761   *
2762   * @param {Object}  storeConfigs Initial store configurations.
2763   * @param {Object?} parent       Parent registry.
2764   *
2765   * @return {WPDataRegistry} Data registry.
2766   */
2767  
2768  function createRegistry() {
2769    var storeConfigs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2770    var parent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
2771    var stores = {};
2772    var listeners = [];
2773  
2774    var __experimentalListeningStores = new Set();
2775    /**
2776     * Global listener called for each store's update.
2777     */
2778  
2779  
2780    function globalListener() {
2781      listeners.forEach(function (listener) {
2782        return listener();
2783      });
2784    }
2785    /**
2786     * Subscribe to changes to any data.
2787     *
2788     * @param {Function}   listener Listener function.
2789     *
2790     * @return {Function}           Unsubscribe function.
2791     */
2792  
2793  
2794    var subscribe = function subscribe(listener) {
2795      listeners.push(listener);
2796      return function () {
2797        listeners = Object(external_lodash_["without"])(listeners, listener);
2798      };
2799    };
2800    /**
2801     * Calls a selector given the current state and extra arguments.
2802     *
2803     * @param {string|WPDataStore} storeNameOrDefinition Unique namespace identifier for the store
2804     *                                                   or the store definition.
2805     *
2806     * @return {*} The selector's returned value.
2807     */
2808  
2809  
2810    function select(storeNameOrDefinition) {
2811      var storeName = Object(external_lodash_["isObject"])(storeNameOrDefinition) ? storeNameOrDefinition.name : storeNameOrDefinition;
2812  
2813      __experimentalListeningStores.add(storeName);
2814  
2815      var store = stores[storeName];
2816  
2817      if (store) {
2818        return store.getSelectors();
2819      }
2820  
2821      return parent && parent.select(storeName);
2822    }
2823  
2824    function __experimentalMarkListeningStores(callback, ref) {
2825      __experimentalListeningStores.clear();
2826  
2827      var result = callback.call(this);
2828      ref.current = Array.from(__experimentalListeningStores);
2829      return result;
2830    }
2831    /**
2832     * Given the name of a registered store, returns an object containing the store's
2833     * selectors pre-bound to state so that you only need to supply additional arguments,
2834     * and modified so that they return promises that resolve to their eventual values,
2835     * after any resolvers have ran.
2836     *
2837     * @param {string|WPDataStore} storeNameOrDefinition Unique namespace identifier for the store
2838     *                                                   or the store definition.
2839     *
2840     * @return {Object} Each key of the object matches the name of a selector.
2841     */
2842  
2843  
2844    function resolveSelect(storeNameOrDefinition) {
2845      var storeName = Object(external_lodash_["isObject"])(storeNameOrDefinition) ? storeNameOrDefinition.name : storeNameOrDefinition;
2846  
2847      __experimentalListeningStores.add(storeName);
2848  
2849      var store = stores[storeName];
2850  
2851      if (store) {
2852        return store.getResolveSelectors();
2853      }
2854  
2855      return parent && parent.resolveSelect(storeName);
2856    }
2857    /**
2858     * Returns the available actions for a part of the state.
2859     *
2860     * @param {string|WPDataStore} storeNameOrDefinition Unique namespace identifier for the store
2861     *                                                   or the store definition.
2862     *
2863     * @return {*} The action's returned value.
2864     */
2865  
2866  
2867    function dispatch(storeNameOrDefinition) {
2868      var storeName = Object(external_lodash_["isObject"])(storeNameOrDefinition) ? storeNameOrDefinition.name : storeNameOrDefinition;
2869      var store = stores[storeName];
2870  
2871      if (store) {
2872        return store.getActions();
2873      }
2874  
2875      return parent && parent.dispatch(storeName);
2876    } //
2877    // Deprecated
2878    // TODO: Remove this after `use()` is removed.
2879    //
2880  
2881  
2882    function withPlugins(attributes) {
2883      return Object(external_lodash_["mapValues"])(attributes, function (attribute, key) {
2884        if (typeof attribute !== 'function') {
2885          return attribute;
2886        }
2887  
2888        return function () {
2889          return registry[key].apply(null, arguments);
2890        };
2891      });
2892    }
2893    /**
2894     * Registers a generic store.
2895     *
2896     * @param {string} key    Store registry key.
2897     * @param {Object} config Configuration (getSelectors, getActions, subscribe).
2898     */
2899  
2900  
2901    function registerGenericStore(key, config) {
2902      if (typeof config.getSelectors !== 'function') {
2903        throw new TypeError('config.getSelectors must be a function');
2904      }
2905  
2906      if (typeof config.getActions !== 'function') {
2907        throw new TypeError('config.getActions must be a function');
2908      }
2909  
2910      if (typeof config.subscribe !== 'function') {
2911        throw new TypeError('config.subscribe must be a function');
2912      }
2913  
2914      stores[key] = config;
2915      config.subscribe(globalListener);
2916    }
2917    /**
2918     * Registers a new store definition.
2919     *
2920     * @param {WPDataStore} store Store definition.
2921     */
2922  
2923  
2924    function register(store) {
2925      registerGenericStore(store.name, store.instantiate(registry));
2926    }
2927    /**
2928     * Subscribe handler to a store.
2929     *
2930     * @param {string[]} storeName The store name.
2931     * @param {Function} handler   The function subscribed to the store.
2932     * @return {Function} A function to unsubscribe the handler.
2933     */
2934  
2935  
2936    function __experimentalSubscribeStore(storeName, handler) {
2937      if (storeName in stores) {
2938        return stores[storeName].subscribe(handler);
2939      } // Trying to access a store that hasn't been registered,
2940      // this is a pattern rarely used but seen in some places.
2941      // We fallback to regular `subscribe` here for backward-compatibility for now.
2942      // See https://github.com/WordPress/gutenberg/pull/27466 for more info.
2943  
2944  
2945      if (!parent) {
2946        return subscribe(handler);
2947      }
2948  
2949      return parent.__experimentalSubscribeStore(storeName, handler);
2950    }
2951  
2952    var registry = {
2953      registerGenericStore: registerGenericStore,
2954      stores: stores,
2955      namespaces: stores,
2956      // TODO: Deprecate/remove this.
2957      subscribe: subscribe,
2958      select: select,
2959      resolveSelect: resolveSelect,
2960      dispatch: dispatch,
2961      use: use,
2962      register: register,
2963      __experimentalMarkListeningStores: __experimentalMarkListeningStores,
2964      __experimentalSubscribeStore: __experimentalSubscribeStore
2965    };
2966    /**
2967     * Registers a standard `@wordpress/data` store.
2968     *
2969     * @param {string} storeName  Unique namespace identifier.
2970     * @param {Object} options    Store description (reducer, actions, selectors, resolvers).
2971     *
2972     * @return {Object} Registered store object.
2973     */
2974  
2975    registry.registerStore = function (storeName, options) {
2976      if (!options.reducer) {
2977        throw new TypeError('Must specify store reducer');
2978      }
2979  
2980      var store = createReduxStore(storeName, options).instantiate(registry);
2981      registerGenericStore(storeName, store);
2982      return store.store;
2983    }; //
2984    // TODO:
2985    // This function will be deprecated as soon as it is no longer internally referenced.
2986    //
2987  
2988  
2989    function use(plugin, options) {
2990      registry = registry_objectSpread(registry_objectSpread({}, registry), plugin(registry, options));
2991      return registry;
2992    }
2993  
2994    registerGenericStore('core/data', build_module_store(registry));
2995    Object.entries(storeConfigs).forEach(function (_ref) {
2996      var _ref2 = Object(slicedToArray["a" /* default */])(_ref, 2),
2997          name = _ref2[0],
2998          config = _ref2[1];
2999  
3000      return registry.registerStore(name, config);
3001    });
3002  
3003    if (parent) {
3004      parent.subscribe(globalListener);
3005    }
3006  
3007    return withPlugins(registry);
3008  }
3009  
3010  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/default-registry.js
3011  /**
3012   * Internal dependencies
3013   */
3014  
3015  /* harmony default export */ var default_registry = (createRegistry());
3016  
3017  // EXTERNAL MODULE: external ["wp","deprecated"]
3018  var external_wp_deprecated_ = __webpack_require__(35);
3019  var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_);
3020  
3021  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/plugins/controls/index.js
3022  /**
3023   * WordPress dependencies
3024   */
3025  
3026  /* harmony default export */ var plugins_controls = (function (registry) {
3027    external_wp_deprecated_default()('wp.data.plugins.controls', {
3028      since: '5.4',
3029      hint: 'The controls plugins is now baked-in.'
3030    });
3031    return registry;
3032  });
3033  
3034  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/plugins/persistence/storage/object.js
3035  var objectStorage;
3036  var object_storage = {
3037    getItem: function getItem(key) {
3038      if (!objectStorage || !objectStorage[key]) {
3039        return null;
3040      }
3041  
3042      return objectStorage[key];
3043    },
3044    setItem: function setItem(key, value) {
3045      if (!objectStorage) {
3046        object_storage.clear();
3047      }
3048  
3049      objectStorage[key] = String(value);
3050    },
3051    clear: function clear() {
3052      objectStorage = Object.create(null);
3053    }
3054  };
3055  /* harmony default export */ var object = (object_storage);
3056  
3057  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/plugins/persistence/storage/default.js
3058  /**
3059   * Internal dependencies
3060   */
3061  
3062  var default_storage;
3063  
3064  try {
3065    // Private Browsing in Safari 10 and earlier will throw an error when
3066    // attempting to set into localStorage. The test here is intentional in
3067    // causing a thrown error as condition for using fallback object storage.
3068    default_storage = window.localStorage;
3069    default_storage.setItem('__wpDataTestLocalStorage', '');
3070    default_storage.removeItem('__wpDataTestLocalStorage');
3071  } catch (error) {
3072    default_storage = object;
3073  }
3074  
3075  /* harmony default export */ var storage_default = (default_storage);
3076  
3077  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/plugins/persistence/index.js
3078  
3079  
3080  function persistence_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; }
3081  
3082  function persistence_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { persistence_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 { persistence_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
3083  
3084  /**
3085   * External dependencies
3086   */
3087  
3088  /**
3089   * Internal dependencies
3090   */
3091  
3092  
3093  
3094  /** @typedef {import('../../registry').WPDataRegistry} WPDataRegistry */
3095  
3096  /** @typedef {import('../../registry').WPDataPlugin} WPDataPlugin */
3097  
3098  /**
3099   * @typedef {Object} WPDataPersistencePluginOptions Persistence plugin options.
3100   *
3101   * @property {Storage} storage    Persistent storage implementation. This must
3102   *                                at least implement `getItem` and `setItem` of
3103   *                                the Web Storage API.
3104   * @property {string}  storageKey Key on which to set in persistent storage.
3105   *
3106   */
3107  
3108  /**
3109   * Default plugin storage.
3110   *
3111   * @type {Storage}
3112   */
3113  
3114  var DEFAULT_STORAGE = storage_default;
3115  /**
3116   * Default plugin storage key.
3117   *
3118   * @type {string}
3119   */
3120  
3121  var DEFAULT_STORAGE_KEY = 'WP_DATA';
3122  /**
3123   * Higher-order reducer which invokes the original reducer only if state is
3124   * inequal from that of the action's `nextState` property, otherwise returning
3125   * the original state reference.
3126   *
3127   * @param {Function} reducer Original reducer.
3128   *
3129   * @return {Function} Enhanced reducer.
3130   */
3131  
3132  var withLazySameState = function withLazySameState(reducer) {
3133    return function (state, action) {
3134      if (action.nextState === state) {
3135        return state;
3136      }
3137  
3138      return reducer(state, action);
3139    };
3140  };
3141  /**
3142   * Creates a persistence interface, exposing getter and setter methods (`get`
3143   * and `set` respectively).
3144   *
3145   * @param {WPDataPersistencePluginOptions} options Plugin options.
3146   *
3147   * @return {Object} Persistence interface.
3148   */
3149  
3150  function createPersistenceInterface(options) {
3151    var _options$storage = options.storage,
3152        storage = _options$storage === void 0 ? DEFAULT_STORAGE : _options$storage,
3153        _options$storageKey = options.storageKey,
3154        storageKey = _options$storageKey === void 0 ? DEFAULT_STORAGE_KEY : _options$storageKey;
3155    var data;
3156    /**
3157     * Returns the persisted data as an object, defaulting to an empty object.
3158     *
3159     * @return {Object} Persisted data.
3160     */
3161  
3162    function getData() {
3163      if (data === undefined) {
3164        // If unset, getItem is expected to return null. Fall back to
3165        // empty object.
3166        var persisted = storage.getItem(storageKey);
3167  
3168        if (persisted === null) {
3169          data = {};
3170        } else {
3171          try {
3172            data = JSON.parse(persisted);
3173          } catch (error) {
3174            // Similarly, should any error be thrown during parse of
3175            // the string (malformed JSON), fall back to empty object.
3176            data = {};
3177          }
3178        }
3179      }
3180  
3181      return data;
3182    }
3183    /**
3184     * Merges an updated reducer state into the persisted data.
3185     *
3186     * @param {string} key   Key to update.
3187     * @param {*}      value Updated value.
3188     */
3189  
3190  
3191    function setData(key, value) {
3192      data = persistence_objectSpread(persistence_objectSpread({}, data), {}, Object(defineProperty["a" /* default */])({}, key, value));
3193      storage.setItem(storageKey, JSON.stringify(data));
3194    }
3195  
3196    return {
3197      get: getData,
3198      set: setData
3199    };
3200  }
3201  /**
3202   * Data plugin to persist store state into a single storage key.
3203   *
3204   * @param {WPDataRegistry}                  registry      Data registry.
3205   * @param {?WPDataPersistencePluginOptions} pluginOptions Plugin options.
3206   *
3207   * @return {WPDataPlugin} Data plugin.
3208   */
3209  
3210  function persistencePlugin(registry, pluginOptions) {
3211    var persistence = createPersistenceInterface(pluginOptions);
3212    /**
3213     * Creates an enhanced store dispatch function, triggering the state of the
3214     * given store name to be persisted when changed.
3215     *
3216     * @param {Function}       getState  Function which returns current state.
3217     * @param {string}         storeName Store name.
3218     * @param {?Array<string>} keys      Optional subset of keys to save.
3219     *
3220     * @return {Function} Enhanced dispatch function.
3221     */
3222  
3223    function createPersistOnChange(getState, storeName, keys) {
3224      var getPersistedState;
3225  
3226      if (Array.isArray(keys)) {
3227        // Given keys, the persisted state should by produced as an object
3228        // of the subset of keys. This implementation uses combineReducers
3229        // to leverage its behavior of returning the same object when none
3230        // of the property values changes. This allows a strict reference
3231        // equality to bypass a persistence set on an unchanging state.
3232        var reducers = keys.reduce(function (accumulator, key) {
3233          return Object.assign(accumulator, Object(defineProperty["a" /* default */])({}, key, function (state, action) {
3234            return action.nextState[key];
3235          }));
3236        }, {});
3237        getPersistedState = withLazySameState(turbo_combine_reducers_default()(reducers));
3238      } else {
3239        getPersistedState = function getPersistedState(state, action) {
3240          return action.nextState;
3241        };
3242      }
3243  
3244      var lastState = getPersistedState(undefined, {
3245        nextState: getState()
3246      });
3247      return function () {
3248        var state = getPersistedState(lastState, {
3249          nextState: getState()
3250        });
3251  
3252        if (state !== lastState) {
3253          persistence.set(storeName, state);
3254          lastState = state;
3255        }
3256      };
3257    }
3258  
3259    return {
3260      registerStore: function registerStore(storeName, options) {
3261        if (!options.persist) {
3262          return registry.registerStore(storeName, options);
3263        } // Load from persistence to use as initial state.
3264  
3265  
3266        var persistedState = persistence.get()[storeName];
3267  
3268        if (persistedState !== undefined) {
3269          var initialState = options.reducer(options.initialState, {
3270            type: '@@WP/PERSISTENCE_RESTORE'
3271          });
3272  
3273          if (Object(external_lodash_["isPlainObject"])(initialState) && Object(external_lodash_["isPlainObject"])(persistedState)) {
3274            // If state is an object, ensure that:
3275            // - Other keys are left intact when persisting only a
3276            //   subset of keys.
3277            // - New keys in what would otherwise be used as initial
3278            //   state are deeply merged as base for persisted value.
3279            initialState = Object(external_lodash_["merge"])({}, initialState, persistedState);
3280          } else {
3281            // If there is a mismatch in object-likeness of default
3282            // initial or persisted state, defer to persisted value.
3283            initialState = persistedState;
3284          }
3285  
3286          options = persistence_objectSpread(persistence_objectSpread({}, options), {}, {
3287            initialState: initialState
3288          });
3289        }
3290  
3291        var store = registry.registerStore(storeName, options);
3292        store.subscribe(createPersistOnChange(store.getState, storeName, options.persist));
3293        return store;
3294      }
3295    };
3296  }
3297  /**
3298   * Deprecated: Remove this function and the code in WordPress Core that calls
3299   * it once WordPress 5.4 is released.
3300   */
3301  
3302  
3303  persistencePlugin.__unstableMigrate = function (pluginOptions) {
3304    var _state$coreEditor, _state$coreEditor$pre;
3305  
3306    var persistence = createPersistenceInterface(pluginOptions);
3307    var state = persistence.get(); // Migrate 'insertUsage' from 'core/editor' to 'core/block-editor'
3308  
3309    var editorInsertUsage = (_state$coreEditor = state['core/editor']) === null || _state$coreEditor === void 0 ? void 0 : (_state$coreEditor$pre = _state$coreEditor.preferences) === null || _state$coreEditor$pre === void 0 ? void 0 : _state$coreEditor$pre.insertUsage;
3310  
3311    if (editorInsertUsage) {
3312      var _state$coreBlockEdi, _state$coreBlockEdi$p;
3313  
3314      var blockEditorInsertUsage = (_state$coreBlockEdi = state['core/block-editor']) === null || _state$coreBlockEdi === void 0 ? void 0 : (_state$coreBlockEdi$p = _state$coreBlockEdi.preferences) === null || _state$coreBlockEdi$p === void 0 ? void 0 : _state$coreBlockEdi$p.insertUsage;
3315      persistence.set('core/block-editor', {
3316        preferences: {
3317          insertUsage: persistence_objectSpread(persistence_objectSpread({}, editorInsertUsage), blockEditorInsertUsage)
3318        }
3319      });
3320    }
3321  
3322    var editPostState = state['core/edit-post']; // Default `fullscreenMode` to `false` if any persisted state had existed
3323    // and the user hadn't made an explicit choice about fullscreen mode. This
3324    // is needed since `fullscreenMode` previously did not have a default value
3325    // and was implicitly false by its absence. It is now `true` by default, but
3326    // this change is not intended to affect upgrades from earlier versions.
3327  
3328    var hadPersistedState = Object.keys(state).length > 0;
3329    var hadFullscreenModePreference = Object(external_lodash_["has"])(state, ['core/edit-post', 'preferences', 'features', 'fullscreenMode']);
3330  
3331    if (hadPersistedState && !hadFullscreenModePreference) {
3332      editPostState = Object(external_lodash_["merge"])({}, editPostState, {
3333        preferences: {
3334          features: {
3335            fullscreenMode: false
3336          }
3337        }
3338      });
3339    } // Migrate 'areTipsEnabled' from 'core/nux' to 'showWelcomeGuide' in 'core/edit-post'
3340  
3341  
3342    var areTipsEnabled = Object(external_lodash_["get"])(state, ['core/nux', 'preferences', 'areTipsEnabled']);
3343    var hasWelcomeGuide = Object(external_lodash_["has"])(state, ['core/edit-post', 'preferences', 'features', 'welcomeGuide']);
3344  
3345    if (areTipsEnabled !== undefined && !hasWelcomeGuide) {
3346      editPostState = Object(external_lodash_["merge"])({}, editPostState, {
3347        preferences: {
3348          features: {
3349            welcomeGuide: areTipsEnabled
3350          }
3351        }
3352      });
3353    }
3354  
3355    if (editPostState !== state['core/edit-post']) {
3356      persistence.set('core/edit-post', editPostState);
3357    }
3358  };
3359  
3360  /* harmony default export */ var plugins_persistence = (persistencePlugin);
3361  
3362  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/plugins/index.js
3363  
3364  
3365  
3366  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
3367  var esm_extends = __webpack_require__(8);
3368  
3369  // EXTERNAL MODULE: external ["wp","element"]
3370  var external_wp_element_ = __webpack_require__(0);
3371  
3372  // EXTERNAL MODULE: external ["wp","compose"]
3373  var external_wp_compose_ = __webpack_require__(11);
3374  
3375  // EXTERNAL MODULE: ./node_modules/use-memo-one/dist/use-memo-one.esm.js
3376  var use_memo_one_esm = __webpack_require__(130);
3377  
3378  // EXTERNAL MODULE: external ["wp","priorityQueue"]
3379  var external_wp_priorityQueue_ = __webpack_require__(156);
3380  
3381  // EXTERNAL MODULE: external ["wp","isShallowEqual"]
3382  var external_wp_isShallowEqual_ = __webpack_require__(67);
3383  var external_wp_isShallowEqual_default = /*#__PURE__*/__webpack_require__.n(external_wp_isShallowEqual_);
3384  
3385  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/components/registry-provider/context.js
3386  /**
3387   * WordPress dependencies
3388   */
3389  
3390  /**
3391   * Internal dependencies
3392   */
3393  
3394  
3395  var Context = Object(external_wp_element_["createContext"])(default_registry);
3396  var Consumer = Context.Consumer,
3397      Provider = Context.Provider;
3398  /**
3399   * A custom react Context consumer exposing the provided `registry` to
3400   * children components. Used along with the RegistryProvider.
3401   *
3402   * You can read more about the react context api here:
3403   * https://reactjs.org/docs/context.html#contextprovider
3404   *
3405   * @example
3406   * ```js
3407   * import {
3408   *   RegistryProvider,
3409   *   RegistryConsumer,
3410   *   createRegistry
3411   * } from '@wordpress/data';
3412   *
3413   * const registry = createRegistry( {} );
3414   *
3415   * const App = ( { props } ) => {
3416   *   return <RegistryProvider value={ registry }>
3417   *     <div>Hello There</div>
3418   *     <RegistryConsumer>
3419   *       { ( registry ) => (
3420   *         <ComponentUsingRegistry
3421   *                 { ...props }
3422   *               registry={ registry }
3423   *       ) }
3424   *     </RegistryConsumer>
3425   *   </RegistryProvider>
3426   * }
3427   * ```
3428   */
3429  
3430  var RegistryConsumer = Consumer;
3431  /**
3432   * A custom Context provider for exposing the provided `registry` to children
3433   * components via a consumer.
3434   *
3435   * See <a name="#RegistryConsumer">RegistryConsumer</a> documentation for
3436   * example.
3437   */
3438  
3439  /* harmony default export */ var context = (Provider);
3440  
3441  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/components/registry-provider/use-registry.js
3442  /**
3443   * WordPress dependencies
3444   */
3445  
3446  /**
3447   * Internal dependencies
3448   */
3449  
3450  
3451  /**
3452   * A custom react hook exposing the registry context for use.
3453   *
3454   * This exposes the `registry` value provided via the
3455   * <a href="#RegistryProvider">Registry Provider</a> to a component implementing
3456   * this hook.
3457   *
3458   * It acts similarly to the `useContext` react hook.
3459   *
3460   * Note: Generally speaking, `useRegistry` is a low level hook that in most cases
3461   * won't be needed for implementation. Most interactions with the `@wordpress/data`
3462   * API can be performed via the `useSelect` hook,  or the `withSelect` and
3463   * `withDispatch` higher order components.
3464   *
3465   * @example
3466   * ```js
3467   * import {
3468   *   RegistryProvider,
3469   *   createRegistry,
3470   *   useRegistry,
3471   * } from '@wordpress/data';
3472   *
3473   * const registry = createRegistry( {} );
3474   *
3475   * const SomeChildUsingRegistry = ( props ) => {
3476   *   const registry = useRegistry( registry );
3477   *   // ...logic implementing the registry in other react hooks.
3478   * };
3479   *
3480   *
3481   * const ParentProvidingRegistry = ( props ) => {
3482   *   return <RegistryProvider value={ registry }>
3483   *     <SomeChildUsingRegistry { ...props } />
3484   *   </RegistryProvider>
3485   * };
3486   * ```
3487   *
3488   * @return {Function}  A custom react hook exposing the registry context value.
3489   */
3490  
3491  function useRegistry() {
3492    return Object(external_wp_element_["useContext"])(Context);
3493  }
3494  
3495  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/components/async-mode-provider/context.js
3496  /**
3497   * WordPress dependencies
3498   */
3499  
3500  var context_Context = Object(external_wp_element_["createContext"])(false);
3501  var context_Consumer = context_Context.Consumer,
3502      context_Provider = context_Context.Provider;
3503  var AsyncModeConsumer = context_Consumer;
3504  /**
3505   * Context Provider Component used to switch the data module component rerendering
3506   * between Sync and Async modes.
3507   *
3508   * @example
3509   *
3510   * ```js
3511   * import { useSelect, AsyncModeProvider } from '@wordpress/data';
3512   *
3513   * function BlockCount() {
3514   *   const count = useSelect( ( select ) => {
3515   *     return select( 'core/block-editor' ).getBlockCount()
3516   *   }, [] );
3517   *
3518   *   return count;
3519   * }
3520   *
3521   * function App() {
3522   *   return (
3523   *     <AsyncModeProvider value={ true }>
3524   *       <BlockCount />
3525   *     </AsyncModeProvider>
3526   *   );
3527   * }
3528   * ```
3529   *
3530   * In this example, the BlockCount component is rerendered asynchronously.
3531   * It means if a more critical task is being performed (like typing in an input),
3532   * the rerendering is delayed until the browser becomes IDLE.
3533   * It is possible to nest multiple levels of AsyncModeProvider to fine-tune the rendering behavior.
3534   *
3535   * @param {boolean}   props.value  Enable Async Mode.
3536   * @return {WPComponent} The component to be rendered.
3537   */
3538  
3539  /* harmony default export */ var async_mode_provider_context = (context_Provider);
3540  
3541  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/components/async-mode-provider/use-async-mode.js
3542  /**
3543   * WordPress dependencies
3544   */
3545  
3546  /**
3547   * Internal dependencies
3548   */
3549  
3550  
3551  function useAsyncMode() {
3552    return Object(external_wp_element_["useContext"])(context_Context);
3553  }
3554  
3555  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/components/use-select/index.js
3556  
3557  
3558  /**
3559   * External dependencies
3560   */
3561  
3562  /**
3563   * WordPress dependencies
3564   */
3565  
3566  
3567  
3568  
3569  
3570  /**
3571   * Internal dependencies
3572   */
3573  
3574  
3575  
3576  var renderQueue = Object(external_wp_priorityQueue_["createQueue"])();
3577  /** @typedef {import('./types').WPDataStore} WPDataStore */
3578  
3579  /**
3580   * Custom react hook for retrieving props from registered selectors.
3581   *
3582   * In general, this custom React hook follows the
3583   * [rules of hooks](https://reactjs.org/docs/hooks-rules.html).
3584   *
3585   * @param {Function|WPDataStore|string} _mapSelect  Function called on every state change. The
3586   *                                                  returned value is exposed to the component
3587   *                                                  implementing this hook. The function receives
3588   *                                                  the `registry.select` method on the first
3589   *                                                  argument and the `registry` on the second
3590   *                                                  argument.
3591   *                                                  When a store key is passed, all selectors for
3592   *                                                  the store will be returned. This is only meant
3593   *                                                  for usage of these selectors in event
3594   *                                                  callbacks, not for data needed to create the
3595   *                                                  element tree.
3596   * @param {Array}                       deps        If provided, this memoizes the mapSelect so the
3597   *                                                  same `mapSelect` is invoked on every state
3598   *                                                  change unless the dependencies change.
3599   *
3600   * @example
3601   * ```js
3602   * import { useSelect } from '@wordpress/data';
3603   *
3604   * function HammerPriceDisplay( { currency } ) {
3605   *   const price = useSelect( ( select ) => {
3606   *     return select( 'my-shop' ).getPrice( 'hammer', currency )
3607   *   }, [ currency ] );
3608   *   return new Intl.NumberFormat( 'en-US', {
3609   *     style: 'currency',
3610   *     currency,
3611   *   } ).format( price );
3612   * }
3613   *
3614   * // Rendered in the application:
3615   * // <HammerPriceDisplay currency="USD" />
3616   * ```
3617   *
3618   * In the above example, when `HammerPriceDisplay` is rendered into an
3619   * application, the price will be retrieved from the store state using the
3620   * `mapSelect` callback on `useSelect`. If the currency prop changes then
3621   * any price in the state for that currency is retrieved. If the currency prop
3622   * doesn't change and other props are passed in that do change, the price will
3623   * not change because the dependency is just the currency.
3624   *
3625   * When data is only used in an event callback, the data should not be retrieved
3626   * on render, so it may be useful to get the selectors function instead.
3627   *
3628   * **Don't use `useSelect` this way when calling the selectors in the render
3629   * function because your component won't re-render on a data change.**
3630   *
3631   * ```js
3632   * import { useSelect } from '@wordpress/data';
3633   *
3634   * function Paste( { children } ) {
3635   *   const { getSettings } = useSelect( 'my-shop' );
3636   *   function onPaste() {
3637   *     // Do something with the settings.
3638   *     const settings = getSettings();
3639   *   }
3640   *   return <div onPaste={ onPaste }>{ children }</div>;
3641   * }
3642   * ```
3643   *
3644   * @return {Function}  A custom react hook.
3645   */
3646  
3647  function useSelect(_mapSelect, deps) {
3648    var isWithoutMapping = typeof _mapSelect !== 'function';
3649  
3650    if (isWithoutMapping) {
3651      deps = [];
3652    }
3653  
3654    var mapSelect = Object(external_wp_element_["useCallback"])(_mapSelect, deps);
3655    var registry = useRegistry();
3656    var isAsync = useAsyncMode(); // React can sometimes clear the `useMemo` cache.
3657    // We use the cache-stable `useMemoOne` to avoid
3658    // losing queues.
3659  
3660    var queueContext = Object(use_memo_one_esm["a" /* useMemoOne */])(function () {
3661      return {
3662        queue: true
3663      };
3664    }, [registry]);
3665  
3666    var _useReducer = Object(external_wp_element_["useReducer"])(function (s) {
3667      return s + 1;
3668    }, 0),
3669        _useReducer2 = Object(slicedToArray["a" /* default */])(_useReducer, 2),
3670        forceRender = _useReducer2[1];
3671  
3672    var latestMapSelect = Object(external_wp_element_["useRef"])();
3673    var latestIsAsync = Object(external_wp_element_["useRef"])(isAsync);
3674    var latestMapOutput = Object(external_wp_element_["useRef"])();
3675    var latestMapOutputError = Object(external_wp_element_["useRef"])();
3676    var isMountedAndNotUnsubscribing = Object(external_wp_element_["useRef"])(); // Keep track of the stores being selected in the mapSelect function,
3677    // and only subscribe to those stores later.
3678  
3679    var listeningStores = Object(external_wp_element_["useRef"])([]);
3680    var trapSelect = Object(external_wp_element_["useCallback"])(function (callback) {
3681      return registry.__experimentalMarkListeningStores(callback, listeningStores);
3682    }, [registry]); // Generate a "flag" for used in the effect dependency array.
3683    // It's different than just using `mapSelect` since deps could be undefined,
3684    // in that case, we would still want to memoize it.
3685  
3686    var depsChangedFlag = Object(external_wp_element_["useMemo"])(function () {
3687      return {};
3688    }, deps || []);
3689    var mapOutput;
3690  
3691    if (!isWithoutMapping) {
3692      try {
3693        if (latestMapSelect.current !== mapSelect || latestMapOutputError.current) {
3694          mapOutput = trapSelect(function () {
3695            return mapSelect(registry.select, registry);
3696          });
3697        } else {
3698          mapOutput = latestMapOutput.current;
3699        }
3700      } catch (error) {
3701        var errorMessage = "An error occurred while running 'mapSelect': ".concat(error.message);
3702  
3703        if (latestMapOutputError.current) {
3704          errorMessage += "\nThe error may be correlated with this previous error:\n";
3705          errorMessage += "".concat(latestMapOutputError.current.stack, "\n\n");
3706          errorMessage += 'Original stack trace:';
3707          throw new Error(errorMessage);
3708        } else {
3709          // eslint-disable-next-line no-console
3710          console.error(errorMessage);
3711        }
3712      }
3713    }
3714  
3715    Object(external_wp_compose_["useIsomorphicLayoutEffect"])(function () {
3716      if (isWithoutMapping) {
3717        return;
3718      }
3719  
3720      latestMapSelect.current = mapSelect;
3721      latestMapOutput.current = mapOutput;
3722      latestMapOutputError.current = undefined;
3723      isMountedAndNotUnsubscribing.current = true; // This has to run after the other ref updates
3724      // to avoid using stale values in the flushed
3725      // callbacks or potentially overwriting a
3726      // changed `latestMapOutput.current`.
3727  
3728      if (latestIsAsync.current !== isAsync) {
3729        latestIsAsync.current = isAsync;
3730        renderQueue.flush(queueContext);
3731      }
3732    });
3733    Object(external_wp_compose_["useIsomorphicLayoutEffect"])(function () {
3734      if (isWithoutMapping) {
3735        return;
3736      }
3737  
3738      var onStoreChange = function onStoreChange() {
3739        if (isMountedAndNotUnsubscribing.current) {
3740          try {
3741            var newMapOutput = trapSelect(function () {
3742              return latestMapSelect.current(registry.select, registry);
3743            });
3744  
3745            if (external_wp_isShallowEqual_default()(latestMapOutput.current, newMapOutput)) {
3746              return;
3747            }
3748  
3749            latestMapOutput.current = newMapOutput;
3750          } catch (error) {
3751            latestMapOutputError.current = error;
3752          }
3753  
3754          forceRender();
3755        }
3756      }; // catch any possible state changes during mount before the subscription
3757      // could be set.
3758  
3759  
3760      if (latestIsAsync.current) {
3761        renderQueue.add(queueContext, onStoreChange);
3762      } else {
3763        onStoreChange();
3764      }
3765  
3766      var onChange = function onChange() {
3767        if (latestIsAsync.current) {
3768          renderQueue.add(queueContext, onStoreChange);
3769        } else {
3770          onStoreChange();
3771        }
3772      };
3773  
3774      var unsubscribers = listeningStores.current.map(function (storeName) {
3775        return registry.__experimentalSubscribeStore(storeName, onChange);
3776      });
3777      return function () {
3778        isMountedAndNotUnsubscribing.current = false; // The return value of the subscribe function could be undefined if the store is a custom generic store.
3779  
3780        unsubscribers.forEach(function (unsubscribe) {
3781          return unsubscribe === null || unsubscribe === void 0 ? void 0 : unsubscribe();
3782        });
3783        renderQueue.flush(queueContext);
3784      };
3785    }, [registry, trapSelect, depsChangedFlag, isWithoutMapping]);
3786    return isWithoutMapping ? registry.select(_mapSelect) : mapOutput;
3787  }
3788  
3789  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/components/with-select/index.js
3790  
3791  
3792  
3793  /**
3794   * WordPress dependencies
3795   */
3796  
3797  /**
3798   * Internal dependencies
3799   */
3800  
3801  
3802  /**
3803   * Higher-order component used to inject state-derived props using registered
3804   * selectors.
3805   *
3806   * @param {Function} mapSelectToProps Function called on every state change,
3807   *                                   expected to return object of props to
3808   *                                   merge with the component's own props.
3809   *
3810   * @example
3811   * ```js
3812   * import { withSelect } from '@wordpress/data';
3813   *
3814   * function PriceDisplay( { price, currency } ) {
3815   *     return new Intl.NumberFormat( 'en-US', {
3816   *         style: 'currency',
3817   *         currency,
3818   *     } ).format( price );
3819   * }
3820   *
3821   * const HammerPriceDisplay = withSelect( ( select, ownProps ) => {
3822   *     const { getPrice } = select( 'my-shop' );
3823   *     const { currency } = ownProps;
3824   *
3825   *     return {
3826   *         price: getPrice( 'hammer', currency ),
3827   *     };
3828   * } )( PriceDisplay );
3829   *
3830   * // Rendered in the application:
3831   * //
3832   * //  <HammerPriceDisplay currency="USD" />
3833   * ```
3834   * In the above example, when `HammerPriceDisplay` is rendered into an
3835   * application, it will pass the price into the underlying `PriceDisplay`
3836   * component and update automatically if the price of a hammer ever changes in
3837   * the store.
3838   *
3839   * @return {WPComponent} Enhanced component with merged state data props.
3840   */
3841  
3842  var with_select_withSelect = function withSelect(mapSelectToProps) {
3843    return Object(external_wp_compose_["createHigherOrderComponent"])(function (WrappedComponent) {
3844      return Object(external_wp_compose_["pure"])(function (ownProps) {
3845        var mapSelect = function mapSelect(select, registry) {
3846          return mapSelectToProps(select, ownProps, registry);
3847        };
3848  
3849        var mergeProps = useSelect(mapSelect);
3850        return Object(external_wp_element_["createElement"])(WrappedComponent, Object(esm_extends["a" /* default */])({}, ownProps, mergeProps));
3851      });
3852    }, 'withSelect');
3853  };
3854  
3855  /* harmony default export */ var with_select = (with_select_withSelect);
3856  
3857  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/components/use-dispatch/use-dispatch-with-map.js
3858  
3859  
3860  /**
3861   * External dependencies
3862   */
3863  
3864  /**
3865   * WordPress dependencies
3866   */
3867  
3868  
3869  
3870  /**
3871   * Internal dependencies
3872   */
3873  
3874  
3875  /**
3876   * Custom react hook for returning aggregate dispatch actions using the provided
3877   * dispatchMap.
3878   *
3879   * Currently this is an internal api only and is implemented by `withDispatch`
3880   *
3881   * @param {Function} dispatchMap  Receives the `registry.dispatch` function as
3882   *                                the first argument and the `registry` object
3883   *                                as the second argument.  Should return an
3884   *                                object mapping props to functions.
3885   * @param {Array}    deps         An array of dependencies for the hook.
3886   * @return {Object}  An object mapping props to functions created by the passed
3887   *                   in dispatchMap.
3888   */
3889  
3890  var use_dispatch_with_map_useDispatchWithMap = function useDispatchWithMap(dispatchMap, deps) {
3891    var registry = useRegistry();
3892    var currentDispatchMap = Object(external_wp_element_["useRef"])(dispatchMap);
3893    Object(external_wp_compose_["useIsomorphicLayoutEffect"])(function () {
3894      currentDispatchMap.current = dispatchMap;
3895    });
3896    return Object(external_wp_element_["useMemo"])(function () {
3897      var currentDispatchProps = currentDispatchMap.current(registry.dispatch, registry);
3898      return Object(external_lodash_["mapValues"])(currentDispatchProps, function (dispatcher, propName) {
3899        if (typeof dispatcher !== 'function') {
3900          // eslint-disable-next-line no-console
3901          console.warn("Property ".concat(propName, " returned from dispatchMap in useDispatchWithMap must be a function."));
3902        }
3903  
3904        return function () {
3905          var _currentDispatchMap$c;
3906  
3907          return (_currentDispatchMap$c = currentDispatchMap.current(registry.dispatch, registry))[propName].apply(_currentDispatchMap$c, arguments);
3908        };
3909      });
3910    }, [registry].concat(Object(toConsumableArray["a" /* default */])(deps)));
3911  };
3912  
3913  /* harmony default export */ var use_dispatch_with_map = (use_dispatch_with_map_useDispatchWithMap);
3914  
3915  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/components/with-dispatch/index.js
3916  
3917  
3918  
3919  /**
3920   * WordPress dependencies
3921   */
3922  
3923  /**
3924   * Internal dependencies
3925   */
3926  
3927  
3928  /**
3929   * Higher-order component used to add dispatch props using registered action
3930   * creators.
3931   *
3932   * @param {Function} mapDispatchToProps A function of returning an object of
3933   *                                      prop names where value is a
3934   *                                      dispatch-bound action creator, or a
3935   *                                      function to be called with the
3936   *                                      component's props and returning an
3937   *                                      action creator.
3938   *
3939   * @example
3940   * ```jsx
3941   * function Button( { onClick, children } ) {
3942   *     return <button type="button" onClick={ onClick }>{ children }</button>;
3943   * }
3944   *
3945   * import { withDispatch } from '@wordpress/data';
3946   *
3947   * const SaleButton = withDispatch( ( dispatch, ownProps ) => {
3948   *     const { startSale } = dispatch( 'my-shop' );
3949   *     const { discountPercent } = ownProps;
3950   *
3951   *     return {
3952   *         onClick() {
3953   *             startSale( discountPercent );
3954   *         },
3955   *     };
3956   * } )( Button );
3957   *
3958   * // Rendered in the application:
3959   * //
3960   * // <SaleButton discountPercent="20">Start Sale!</SaleButton>
3961   * ```
3962   *
3963   * @example
3964   * In the majority of cases, it will be sufficient to use only two first params
3965   * passed to `mapDispatchToProps` as illustrated in the previous example.
3966   * However, there might be some very advanced use cases where using the
3967   * `registry` object might be used as a tool to optimize the performance of
3968   * your component. Using `select` function from the registry might be useful
3969   * when you need to fetch some dynamic data from the store at the time when the
3970   * event is fired, but at the same time, you never use it to render your
3971   * component. In such scenario, you can avoid using the `withSelect` higher
3972   * order component to compute such prop, which might lead to unnecessary
3973   * re-renders of your component caused by its frequent value change.
3974   * Keep in mind, that `mapDispatchToProps` must return an object with functions
3975   * only.
3976   *
3977   * ```jsx
3978   * function Button( { onClick, children } ) {
3979   *     return <button type="button" onClick={ onClick }>{ children }</button>;
3980   * }
3981   *
3982   * import { withDispatch } from '@wordpress/data';
3983   *
3984   * const SaleButton = withDispatch( ( dispatch, ownProps, { select } ) => {
3985   *    // Stock number changes frequently.
3986   *    const { getStockNumber } = select( 'my-shop' );
3987   *    const { startSale } = dispatch( 'my-shop' );
3988   *    return {
3989   *        onClick() {
3990   *            const discountPercent = getStockNumber() > 50 ? 10 : 20;
3991   *            startSale( discountPercent );
3992   *        },
3993   *    };
3994   * } )( Button );
3995   *
3996   * // Rendered in the application:
3997   * //
3998   * //  <SaleButton>Start Sale!</SaleButton>
3999   * ```
4000   *
4001   * _Note:_ It is important that the `mapDispatchToProps` function always
4002   * returns an object with the same keys. For example, it should not contain
4003   * conditions under which a different value would be returned.
4004   *
4005   * @return {WPComponent} Enhanced component with merged dispatcher props.
4006   */
4007  
4008  var with_dispatch_withDispatch = function withDispatch(mapDispatchToProps) {
4009    return Object(external_wp_compose_["createHigherOrderComponent"])(function (WrappedComponent) {
4010      return function (ownProps) {
4011        var mapDispatch = function mapDispatch(dispatch, registry) {
4012          return mapDispatchToProps(dispatch, ownProps, registry);
4013        };
4014  
4015        var dispatchProps = use_dispatch_with_map(mapDispatch, []);
4016        return Object(external_wp_element_["createElement"])(WrappedComponent, Object(esm_extends["a" /* default */])({}, ownProps, dispatchProps));
4017      };
4018    }, 'withDispatch');
4019  };
4020  
4021  /* harmony default export */ var with_dispatch = (with_dispatch_withDispatch);
4022  
4023  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/components/with-registry/index.js
4024  
4025  
4026  
4027  /**
4028   * WordPress dependencies
4029   */
4030  
4031  /**
4032   * Internal dependencies
4033   */
4034  
4035  
4036  /**
4037   * Higher-order component which renders the original component with the current
4038   * registry context passed as its `registry` prop.
4039   *
4040   * @param {WPComponent} OriginalComponent Original component.
4041   *
4042   * @return {WPComponent} Enhanced component.
4043   */
4044  
4045  var withRegistry = Object(external_wp_compose_["createHigherOrderComponent"])(function (OriginalComponent) {
4046    return function (props) {
4047      return Object(external_wp_element_["createElement"])(RegistryConsumer, null, function (registry) {
4048        return Object(external_wp_element_["createElement"])(OriginalComponent, Object(esm_extends["a" /* default */])({}, props, {
4049          registry: registry
4050        }));
4051      });
4052    };
4053  }, 'withRegistry');
4054  /* harmony default export */ var with_registry = (withRegistry);
4055  
4056  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/components/use-dispatch/use-dispatch.js
4057  /**
4058   * Internal dependencies
4059   */
4060  
4061  /** @typedef {import('./types').WPDataStore} WPDataStore */
4062  
4063  /**
4064   * A custom react hook returning the current registry dispatch actions creators.
4065   *
4066   * Note: The component using this hook must be within the context of a
4067   * RegistryProvider.
4068   *
4069   * @param {string|WPDataStore} [storeNameOrDefinition] Optionally provide the name of the
4070   *                                                     store or its definition from which to
4071   *                                                     retrieve action creators. If not
4072   *                                                     provided, the registry.dispatch
4073   *                                                     function is returned instead.
4074   *
4075   * @example
4076   * This illustrates a pattern where you may need to retrieve dynamic data from
4077   * the server via the `useSelect` hook to use in combination with the dispatch
4078   * action.
4079   *
4080   * ```jsx
4081   * import { useDispatch, useSelect } from '@wordpress/data';
4082   * import { useCallback } from '@wordpress/element';
4083   *
4084   * function Button( { onClick, children } ) {
4085   *   return <button type="button" onClick={ onClick }>{ children }</button>
4086   * }
4087   *
4088   * const SaleButton = ( { children } ) => {
4089   *   const { stockNumber } = useSelect(
4090   *     ( select ) => select( 'my-shop' ).getStockNumber(),
4091   *     []
4092   *   );
4093   *   const { startSale } = useDispatch( 'my-shop' );
4094   *   const onClick = useCallback( () => {
4095   *     const discountPercent = stockNumber > 50 ? 10: 20;
4096   *     startSale( discountPercent );
4097   *   }, [ stockNumber ] );
4098   *   return <Button onClick={ onClick }>{ children }</Button>
4099   * }
4100   *
4101   * // Rendered somewhere in the application:
4102   * //
4103   * // <SaleButton>Start Sale!</SaleButton>
4104   * ```
4105   * @return {Function}  A custom react hook.
4106   */
4107  
4108  var use_dispatch_useDispatch = function useDispatch(storeNameOrDefinition) {
4109    var _useRegistry = useRegistry(),
4110        dispatch = _useRegistry.dispatch;
4111  
4112    return storeNameOrDefinition === void 0 ? dispatch : dispatch(storeNameOrDefinition);
4113  };
4114  
4115  /* harmony default export */ var use_dispatch = (use_dispatch_useDispatch);
4116  
4117  // CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/index.js
4118  /**
4119   * External dependencies
4120   */
4121  
4122  /**
4123   * Internal dependencies
4124   */
4125  
4126  
4127  
4128  /** @typedef {import('./types').WPDataStore} WPDataStore */
4129  
4130  
4131  
4132  
4133  
4134  
4135  
4136  
4137  
4138  
4139  
4140  
4141  /**
4142   * Object of available plugins to use with a registry.
4143   *
4144   * @see [use](#use)
4145   *
4146   * @type {Object}
4147   */
4148  
4149  
4150  /**
4151   * The combineReducers helper function turns an object whose values are different
4152   * reducing functions into a single reducing function you can pass to registerReducer.
4153   *
4154   * @param {Object} reducers An object whose values correspond to different reducing
4155   *                          functions that need to be combined into one.
4156   *
4157   * @example
4158   * ```js
4159   * import { combineReducers, createReduxStore, register } from '@wordpress/data';
4160   *
4161   * const prices = ( state = {}, action ) => {
4162   *     return action.type === 'SET_PRICE' ?
4163   *         {
4164   *             ...state,
4165   *             [ action.item ]: action.price,
4166   *         } :
4167   *         state;
4168   * };
4169   *
4170   * const discountPercent = ( state = 0, action ) => {
4171   *     return action.type === 'START_SALE' ?
4172   *         action.discountPercent :
4173   *         state;
4174   * };
4175   *
4176   * const store = createReduxStore( 'my-shop', {
4177   *     reducer: combineReducers( {
4178   *         prices,
4179   *         discountPercent,
4180   *     } ),
4181   * } );
4182   * register( store );
4183   * ```
4184   *
4185   * @return {Function}       A reducer that invokes every reducer inside the reducers
4186   *                          object, and constructs a state object with the same shape.
4187   */
4188  
4189  
4190  /**
4191   * Given the name or definition of a registered store, returns an object of the store's selectors.
4192   * The selector functions are been pre-bound to pass the current state automatically.
4193   * As a consumer, you need only pass arguments of the selector, if applicable.
4194   *
4195   * @param {string|WPDataStore} storeNameOrDefinition Unique namespace identifier for the store
4196   *                                                   or the store definition.
4197   *
4198   * @example
4199   * ```js
4200   * import { select } from '@wordpress/data';
4201   *
4202   * select( 'my-shop' ).getPrice( 'hammer' );
4203   * ```
4204   *
4205   * @return {Object} Object containing the store's selectors.
4206   */
4207  
4208  var build_module_select = default_registry.select;
4209  /**
4210   * Given the name of a registered store, returns an object containing the store's
4211   * selectors pre-bound to state so that you only need to supply additional arguments,
4212   * and modified so that they return promises that resolve to their eventual values,
4213   * after any resolvers have ran.
4214   *
4215   * @param {string|WPDataStore} storeNameOrDefinition Unique namespace identifier for the store
4216   *                                                   or the store definition.
4217   *
4218   * @example
4219   * ```js
4220   * import { resolveSelect } from '@wordpress/data';
4221   *
4222   * resolveSelect( 'my-shop' ).getPrice( 'hammer' ).then(console.log)
4223   * ```
4224   *
4225   * @return {Object} Object containing the store's promise-wrapped selectors.
4226   */
4227  
4228  var build_module_resolveSelect = default_registry.resolveSelect;
4229  /**
4230   * Given the name of a registered store, returns an object of the store's action creators.
4231   * Calling an action creator will cause it to be dispatched, updating the state value accordingly.
4232   *
4233   * Note: Action creators returned by the dispatch will return a promise when
4234   * they are called.
4235   *
4236   * @param {string|WPDataStore} storeNameOrDefinition Unique namespace identifier for the store
4237   *                                                   or the store definition.
4238   *
4239   * @example
4240   * ```js
4241   * import { dispatch } from '@wordpress/data';
4242   *
4243   * dispatch( 'my-shop' ).setPrice( 'hammer', 9.75 );
4244   * ```
4245   * @return {Object} Object containing the action creators.
4246   */
4247  
4248  var build_module_dispatch = default_registry.dispatch;
4249  /**
4250   * Given a listener function, the function will be called any time the state value
4251   * of one of the registered stores has changed. This function returns a `unsubscribe`
4252   * function used to stop the subscription.
4253   *
4254   * @param {Function} listener Callback function.
4255   *
4256   * @example
4257   * ```js
4258   * import { subscribe } from '@wordpress/data';
4259   *
4260   * const unsubscribe = subscribe( () => {
4261   *     // You could use this opportunity to test whether the derived result of a
4262   *     // selector has subsequently changed as the result of a state update.
4263   * } );
4264   *
4265   * // Later, if necessary...
4266   * unsubscribe();
4267   * ```
4268   */
4269  
4270  var build_module_subscribe = default_registry.subscribe;
4271  /**
4272   * Registers a generic store.
4273   *
4274   * @deprecated Use `register` instead.
4275   *
4276   * @param {string} key    Store registry key.
4277   * @param {Object} config Configuration (getSelectors, getActions, subscribe).
4278   */
4279  
4280  var build_module_registerGenericStore = default_registry.registerGenericStore;
4281  /**
4282   * Registers a standard `@wordpress/data` store.
4283   *
4284   * @deprecated Use `register` instead.
4285   *
4286   * @param {string} storeName Unique namespace identifier for the store.
4287   * @param {Object} options   Store description (reducer, actions, selectors, resolvers).
4288   *
4289   * @return {Object} Registered store object.
4290   */
4291  
4292  var build_module_registerStore = default_registry.registerStore;
4293  /**
4294   * Extends a registry to inherit functionality provided by a given plugin. A
4295   * plugin is an object with properties aligning to that of a registry, merged
4296   * to extend the default registry behavior.
4297   *
4298   * @param {Object} plugin Plugin object.
4299   */
4300  
4301  var build_module_use = default_registry.use;
4302  /**
4303   * Registers a standard `@wordpress/data` store definition.
4304   *
4305   * @example
4306   * ```js
4307   * import { createReduxStore, register } from '@wordpress/data';
4308   *
4309   * const store = createReduxStore( 'demo', {
4310   *     reducer: ( state = 'OK' ) => state,
4311   *     selectors: {
4312   *         getValue: ( state ) => state,
4313   *     },
4314   * } );
4315   * register( store );
4316   * ```
4317   *
4318   * @param {WPDataStore} store Store definition.
4319   */
4320  
4321  var build_module_register = default_registry.register;
4322  
4323  
4324  /***/ }),
4325  
4326  /***/ 48:
4327  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4328  
4329  "use strict";
4330  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _asyncToGenerator; });
4331  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
4332    try {
4333      var info = gen[key](arg);
4334      var value = info.value;
4335    } catch (error) {
4336      reject(error);
4337      return;
4338    }
4339  
4340    if (info.done) {
4341      resolve(value);
4342    } else {
4343      Promise.resolve(value).then(_next, _throw);
4344    }
4345  }
4346  
4347  function _asyncToGenerator(fn) {
4348    return function () {
4349      var self = this,
4350          args = arguments;
4351      return new Promise(function (resolve, reject) {
4352        var gen = fn.apply(self, args);
4353  
4354        function _next(value) {
4355          asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
4356        }
4357  
4358        function _throw(err) {
4359          asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
4360        }
4361  
4362        _next(undefined);
4363      });
4364    };
4365  }
4366  
4367  /***/ }),
4368  
4369  /***/ 5:
4370  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4371  
4372  "use strict";
4373  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; });
4374  function _defineProperty(obj, key, value) {
4375    if (key in obj) {
4376      Object.defineProperty(obj, key, {
4377        value: value,
4378        enumerable: true,
4379        configurable: true,
4380        writable: true
4381      });
4382    } else {
4383      obj[key] = value;
4384    }
4385  
4386    return obj;
4387  }
4388  
4389  /***/ }),
4390  
4391  /***/ 67:
4392  /***/ (function(module, exports) {
4393  
4394  (function() { module.exports = window["wp"]["isShallowEqual"]; }());
4395  
4396  /***/ }),
4397  
4398  /***/ 8:
4399  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4400  
4401  "use strict";
4402  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _extends; });
4403  function _extends() {
4404    _extends = Object.assign || function (target) {
4405      for (var i = 1; i < arguments.length; i++) {
4406        var source = arguments[i];
4407  
4408        for (var key in source) {
4409          if (Object.prototype.hasOwnProperty.call(source, key)) {
4410            target[key] = source[key];
4411          }
4412        }
4413      }
4414  
4415      return target;
4416    };
4417  
4418    return _extends.apply(this, arguments);
4419  }
4420  
4421  /***/ })
4422  
4423  /******/ });


Generated: Sat May 15 01:00:05 2021 Cross-referenced by PHPXref 0.7.1