[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/js/dist/ -> redux-routine.js (source)

   1  this["wp"] = this["wp"] || {}; this["wp"]["reduxRoutine"] =
   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 = 448);
  86  /******/ })
  87  /************************************************************************/
  88  /******/ ({
  89  
  90  /***/ 129:
  91  /***/ (function(module, exports) {
  92  
  93  module.exports = isPromise;
  94  
  95  function isPromise(obj) {
  96    return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  97  }
  98  
  99  
 100  /***/ }),
 101  
 102  /***/ 139:
 103  /***/ (function(module, exports, __webpack_require__) {
 104  
 105  "use strict";
 106  
 107  
 108  Object.defineProperty(exports, "__esModule", {
 109    value: true
 110  });
 111  
 112  var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
 113  
 114  var _keys = __webpack_require__(255);
 115  
 116  var _keys2 = _interopRequireDefault(_keys);
 117  
 118  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 119  
 120  var is = {
 121    obj: function obj(value) {
 122      return (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && !!value;
 123    },
 124    all: function all(value) {
 125      return is.obj(value) && value.type === _keys2.default.all;
 126    },
 127    error: function error(value) {
 128      return is.obj(value) && value.type === _keys2.default.error;
 129    },
 130    array: Array.isArray,
 131    func: function func(value) {
 132      return typeof value === 'function';
 133    },
 134    promise: function promise(value) {
 135      return value && is.func(value.then);
 136    },
 137    iterator: function iterator(value) {
 138      return value && is.func(value.next) && is.func(value.throw);
 139    },
 140    fork: function fork(value) {
 141      return is.obj(value) && value.type === _keys2.default.fork;
 142    },
 143    join: function join(value) {
 144      return is.obj(value) && value.type === _keys2.default.join;
 145    },
 146    race: function race(value) {
 147      return is.obj(value) && value.type === _keys2.default.race;
 148    },
 149    call: function call(value) {
 150      return is.obj(value) && value.type === _keys2.default.call;
 151    },
 152    cps: function cps(value) {
 153      return is.obj(value) && value.type === _keys2.default.cps;
 154    },
 155    subscribe: function subscribe(value) {
 156      return is.obj(value) && value.type === _keys2.default.subscribe;
 157    },
 158    channel: function channel(value) {
 159      return is.obj(value) && is.func(value.subscribe);
 160    }
 161  };
 162  
 163  exports.default = is;
 164  
 165  /***/ }),
 166  
 167  /***/ 2:
 168  /***/ (function(module, exports) {
 169  
 170  (function() { module.exports = this["lodash"]; }());
 171  
 172  /***/ }),
 173  
 174  /***/ 254:
 175  /***/ (function(module, exports, __webpack_require__) {
 176  
 177  "use strict";
 178  
 179  
 180  Object.defineProperty(exports, "__esModule", {
 181    value: true
 182  });
 183  exports.createChannel = exports.subscribe = exports.cps = exports.apply = exports.call = exports.invoke = exports.delay = exports.race = exports.join = exports.fork = exports.error = exports.all = undefined;
 184  
 185  var _keys = __webpack_require__(255);
 186  
 187  var _keys2 = _interopRequireDefault(_keys);
 188  
 189  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 190  
 191  var all = exports.all = function all(value) {
 192    return {
 193      type: _keys2.default.all,
 194      value: value
 195    };
 196  };
 197  
 198  var error = exports.error = function error(err) {
 199    return {
 200      type: _keys2.default.error,
 201      error: err
 202    };
 203  };
 204  
 205  var fork = exports.fork = function fork(iterator) {
 206    for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
 207      args[_key - 1] = arguments[_key];
 208    }
 209  
 210    return {
 211      type: _keys2.default.fork,
 212      iterator: iterator,
 213      args: args
 214    };
 215  };
 216  
 217  var join = exports.join = function join(task) {
 218    return {
 219      type: _keys2.default.join,
 220      task: task
 221    };
 222  };
 223  
 224  var race = exports.race = function race(competitors) {
 225    return {
 226      type: _keys2.default.race,
 227      competitors: competitors
 228    };
 229  };
 230  
 231  var delay = exports.delay = function delay(timeout) {
 232    return new Promise(function (resolve) {
 233      setTimeout(function () {
 234        return resolve(true);
 235      }, timeout);
 236    });
 237  };
 238  
 239  var invoke = exports.invoke = function invoke(func) {
 240    for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
 241      args[_key2 - 1] = arguments[_key2];
 242    }
 243  
 244    return {
 245      type: _keys2.default.call,
 246      func: func,
 247      context: null,
 248      args: args
 249    };
 250  };
 251  
 252  var call = exports.call = function call(func, context) {
 253    for (var _len3 = arguments.length, args = Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
 254      args[_key3 - 2] = arguments[_key3];
 255    }
 256  
 257    return {
 258      type: _keys2.default.call,
 259      func: func,
 260      context: context,
 261      args: args
 262    };
 263  };
 264  
 265  var apply = exports.apply = function apply(func, context, args) {
 266    return {
 267      type: _keys2.default.call,
 268      func: func,
 269      context: context,
 270      args: args
 271    };
 272  };
 273  
 274  var cps = exports.cps = function cps(func) {
 275    for (var _len4 = arguments.length, args = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
 276      args[_key4 - 1] = arguments[_key4];
 277    }
 278  
 279    return {
 280      type: _keys2.default.cps,
 281      func: func,
 282      args: args
 283    };
 284  };
 285  
 286  var subscribe = exports.subscribe = function subscribe(channel) {
 287    return {
 288      type: _keys2.default.subscribe,
 289      channel: channel
 290    };
 291  };
 292  
 293  var createChannel = exports.createChannel = function createChannel(callback) {
 294    var listeners = [];
 295    var subscribe = function subscribe(l) {
 296      listeners.push(l);
 297      return function () {
 298        return listeners.splice(listeners.indexOf(l), 1);
 299      };
 300    };
 301    var next = function next(val) {
 302      return listeners.forEach(function (l) {
 303        return l(val);
 304      });
 305    };
 306    callback(next);
 307  
 308    return {
 309      subscribe: subscribe
 310    };
 311  };
 312  
 313  /***/ }),
 314  
 315  /***/ 255:
 316  /***/ (function(module, exports, __webpack_require__) {
 317  
 318  "use strict";
 319  
 320  
 321  Object.defineProperty(exports, "__esModule", {
 322    value: true
 323  });
 324  var keys = {
 325    all: Symbol('all'),
 326    error: Symbol('error'),
 327    fork: Symbol('fork'),
 328    join: Symbol('join'),
 329    race: Symbol('race'),
 330    call: Symbol('call'),
 331    cps: Symbol('cps'),
 332    subscribe: Symbol('subscribe')
 333  };
 334  
 335  exports.default = keys;
 336  
 337  /***/ }),
 338  
 339  /***/ 276:
 340  /***/ (function(module, exports, __webpack_require__) {
 341  
 342  "use strict";
 343  
 344  
 345  Object.defineProperty(exports, "__esModule", {
 346    value: true
 347  });
 348  exports.wrapControls = exports.asyncControls = exports.create = undefined;
 349  
 350  var _helpers = __webpack_require__(254);
 351  
 352  Object.keys(_helpers).forEach(function (key) {
 353    if (key === "default") return;
 354    Object.defineProperty(exports, key, {
 355      enumerable: true,
 356      get: function get() {
 357        return _helpers[key];
 358      }
 359    });
 360  });
 361  
 362  var _create = __webpack_require__(410);
 363  
 364  var _create2 = _interopRequireDefault(_create);
 365  
 366  var _async = __webpack_require__(412);
 367  
 368  var _async2 = _interopRequireDefault(_async);
 369  
 370  var _wrap = __webpack_require__(414);
 371  
 372  var _wrap2 = _interopRequireDefault(_wrap);
 373  
 374  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 375  
 376  exports.create = _create2.default;
 377  exports.asyncControls = _async2.default;
 378  exports.wrapControls = _wrap2.default;
 379  
 380  /***/ }),
 381  
 382  /***/ 410:
 383  /***/ (function(module, exports, __webpack_require__) {
 384  
 385  "use strict";
 386  
 387  
 388  Object.defineProperty(exports, "__esModule", {
 389    value: true
 390  });
 391  
 392  var _builtin = __webpack_require__(411);
 393  
 394  var _builtin2 = _interopRequireDefault(_builtin);
 395  
 396  var _is = __webpack_require__(139);
 397  
 398  var _is2 = _interopRequireDefault(_is);
 399  
 400  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 401  
 402  function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
 403  
 404  var create = function create() {
 405    var userControls = arguments.length <= 0 || arguments[0] === undefined ? [] : arguments[0];
 406  
 407    var controls = [].concat(_toConsumableArray(userControls), _toConsumableArray(_builtin2.default));
 408  
 409    var runtime = function runtime(input) {
 410      var success = arguments.length <= 1 || arguments[1] === undefined ? function () {} : arguments[1];
 411      var error = arguments.length <= 2 || arguments[2] === undefined ? function () {} : arguments[2];
 412  
 413      var iterate = function iterate(gen) {
 414        var yieldValue = function yieldValue(isError) {
 415          return function (ret) {
 416            try {
 417              var _ref = isError ? gen.throw(ret) : gen.next(ret);
 418  
 419              var value = _ref.value;
 420              var done = _ref.done;
 421  
 422              if (done) return success(value);
 423              next(value);
 424            } catch (e) {
 425              return error(e);
 426            }
 427          };
 428        };
 429  
 430        var next = function next(ret) {
 431          controls.some(function (control) {
 432            return control(ret, next, runtime, yieldValue(false), yieldValue(true));
 433          });
 434        };
 435  
 436        yieldValue(false)();
 437      };
 438  
 439      var iterator = _is2.default.iterator(input) ? input : regeneratorRuntime.mark(function _callee() {
 440        return regeneratorRuntime.wrap(function _callee$(_context) {
 441          while (1) {
 442            switch (_context.prev = _context.next) {
 443              case 0:
 444                _context.next = 2;
 445                return input;
 446  
 447              case 2:
 448                return _context.abrupt('return', _context.sent);
 449  
 450              case 3:
 451              case 'end':
 452                return _context.stop();
 453            }
 454          }
 455        }, _callee, this);
 456      })();
 457  
 458      iterate(iterator, success, error);
 459    };
 460  
 461    return runtime;
 462  };
 463  
 464  exports.default = create;
 465  
 466  /***/ }),
 467  
 468  /***/ 411:
 469  /***/ (function(module, exports, __webpack_require__) {
 470  
 471  "use strict";
 472  
 473  
 474  Object.defineProperty(exports, "__esModule", {
 475    value: true
 476  });
 477  exports.iterator = exports.array = exports.object = exports.error = exports.any = undefined;
 478  
 479  var _is = __webpack_require__(139);
 480  
 481  var _is2 = _interopRequireDefault(_is);
 482  
 483  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 484  
 485  var any = exports.any = function any(value, next, rungen, yieldNext) {
 486    yieldNext(value);
 487    return true;
 488  };
 489  
 490  var error = exports.error = function error(value, next, rungen, yieldNext, raiseNext) {
 491    if (!_is2.default.error(value)) return false;
 492    raiseNext(value.error);
 493    return true;
 494  };
 495  
 496  var object = exports.object = function object(value, next, rungen, yieldNext, raiseNext) {
 497    if (!_is2.default.all(value) || !_is2.default.obj(value.value)) return false;
 498    var result = {};
 499    var keys = Object.keys(value.value);
 500    var count = 0;
 501    var hasError = false;
 502    var gotResultSuccess = function gotResultSuccess(key, ret) {
 503      if (hasError) return;
 504      result[key] = ret;
 505      count++;
 506      if (count === keys.length) {
 507        yieldNext(result);
 508      }
 509    };
 510  
 511    var gotResultError = function gotResultError(key, error) {
 512      if (hasError) return;
 513      hasError = true;
 514      raiseNext(error);
 515    };
 516  
 517    keys.map(function (key) {
 518      rungen(value.value[key], function (ret) {
 519        return gotResultSuccess(key, ret);
 520      }, function (err) {
 521        return gotResultError(key, err);
 522      });
 523    });
 524  
 525    return true;
 526  };
 527  
 528  var array = exports.array = function array(value, next, rungen, yieldNext, raiseNext) {
 529    if (!_is2.default.all(value) || !_is2.default.array(value.value)) return false;
 530    var result = [];
 531    var count = 0;
 532    var hasError = false;
 533    var gotResultSuccess = function gotResultSuccess(key, ret) {
 534      if (hasError) return;
 535      result[key] = ret;
 536      count++;
 537      if (count === value.value.length) {
 538        yieldNext(result);
 539      }
 540    };
 541  
 542    var gotResultError = function gotResultError(key, error) {
 543      if (hasError) return;
 544      hasError = true;
 545      raiseNext(error);
 546    };
 547  
 548    value.value.map(function (v, key) {
 549      rungen(v, function (ret) {
 550        return gotResultSuccess(key, ret);
 551      }, function (err) {
 552        return gotResultError(key, err);
 553      });
 554    });
 555  
 556    return true;
 557  };
 558  
 559  var iterator = exports.iterator = function iterator(value, next, rungen, yieldNext, raiseNext) {
 560    if (!_is2.default.iterator(value)) return false;
 561    rungen(value, next, raiseNext);
 562    return true;
 563  };
 564  
 565  exports.default = [error, iterator, array, object, any];
 566  
 567  /***/ }),
 568  
 569  /***/ 412:
 570  /***/ (function(module, exports, __webpack_require__) {
 571  
 572  "use strict";
 573  
 574  
 575  Object.defineProperty(exports, "__esModule", {
 576    value: true
 577  });
 578  exports.race = exports.join = exports.fork = exports.promise = undefined;
 579  
 580  var _is = __webpack_require__(139);
 581  
 582  var _is2 = _interopRequireDefault(_is);
 583  
 584  var _helpers = __webpack_require__(254);
 585  
 586  var _dispatcher = __webpack_require__(413);
 587  
 588  var _dispatcher2 = _interopRequireDefault(_dispatcher);
 589  
 590  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 591  
 592  var promise = exports.promise = function promise(value, next, rungen, yieldNext, raiseNext) {
 593    if (!_is2.default.promise(value)) return false;
 594    value.then(next, raiseNext);
 595    return true;
 596  };
 597  
 598  var forkedTasks = new Map();
 599  var fork = exports.fork = function fork(value, next, rungen) {
 600    if (!_is2.default.fork(value)) return false;
 601    var task = Symbol('fork');
 602    var dispatcher = (0, _dispatcher2.default)();
 603    forkedTasks.set(task, dispatcher);
 604    rungen(value.iterator.apply(null, value.args), function (result) {
 605      return dispatcher.dispatch(result);
 606    }, function (err) {
 607      return dispatcher.dispatch((0, _helpers.error)(err));
 608    });
 609    var unsubscribe = dispatcher.subscribe(function () {
 610      unsubscribe();
 611      forkedTasks.delete(task);
 612    });
 613    next(task);
 614    return true;
 615  };
 616  
 617  var join = exports.join = function join(value, next, rungen, yieldNext, raiseNext) {
 618    if (!_is2.default.join(value)) return false;
 619    var dispatcher = forkedTasks.get(value.task);
 620    if (!dispatcher) {
 621      raiseNext('join error : task not found');
 622    } else {
 623      (function () {
 624        var unsubscribe = dispatcher.subscribe(function (result) {
 625          unsubscribe();
 626          next(result);
 627        });
 628      })();
 629    }
 630    return true;
 631  };
 632  
 633  var race = exports.race = function race(value, next, rungen, yieldNext, raiseNext) {
 634    if (!_is2.default.race(value)) return false;
 635    var finished = false;
 636    var success = function success(result, k, v) {
 637      if (finished) return;
 638      finished = true;
 639      result[k] = v;
 640      next(result);
 641    };
 642  
 643    var fail = function fail(err) {
 644      if (finished) return;
 645      raiseNext(err);
 646    };
 647    if (_is2.default.array(value.competitors)) {
 648      (function () {
 649        var result = value.competitors.map(function () {
 650          return false;
 651        });
 652        value.competitors.forEach(function (competitor, index) {
 653          rungen(competitor, function (output) {
 654            return success(result, index, output);
 655          }, fail);
 656        });
 657      })();
 658    } else {
 659      (function () {
 660        var result = Object.keys(value.competitors).reduce(function (p, c) {
 661          p[c] = false;
 662          return p;
 663        }, {});
 664        Object.keys(value.competitors).forEach(function (index) {
 665          rungen(value.competitors[index], function (output) {
 666            return success(result, index, output);
 667          }, fail);
 668        });
 669      })();
 670    }
 671    return true;
 672  };
 673  
 674  var subscribe = function subscribe(value, next) {
 675    if (!_is2.default.subscribe(value)) return false;
 676    if (!_is2.default.channel(value.channel)) {
 677      throw new Error('the first argument of "subscribe" must be a valid channel');
 678    }
 679    var unsubscribe = value.channel.subscribe(function (ret) {
 680      unsubscribe && unsubscribe();
 681      next(ret);
 682    });
 683  
 684    return true;
 685  };
 686  
 687  exports.default = [promise, fork, join, race, subscribe];
 688  
 689  /***/ }),
 690  
 691  /***/ 413:
 692  /***/ (function(module, exports, __webpack_require__) {
 693  
 694  "use strict";
 695  
 696  
 697  Object.defineProperty(exports, "__esModule", {
 698    value: true
 699  });
 700  var createDispatcher = function createDispatcher() {
 701    var listeners = [];
 702  
 703    return {
 704      subscribe: function subscribe(listener) {
 705        listeners.push(listener);
 706        return function () {
 707          listeners = listeners.filter(function (l) {
 708            return l !== listener;
 709          });
 710        };
 711      },
 712      dispatch: function dispatch(action) {
 713        listeners.slice().forEach(function (listener) {
 714          return listener(action);
 715        });
 716      }
 717    };
 718  };
 719  
 720  exports.default = createDispatcher;
 721  
 722  /***/ }),
 723  
 724  /***/ 414:
 725  /***/ (function(module, exports, __webpack_require__) {
 726  
 727  "use strict";
 728  
 729  
 730  Object.defineProperty(exports, "__esModule", {
 731    value: true
 732  });
 733  exports.cps = exports.call = undefined;
 734  
 735  var _is = __webpack_require__(139);
 736  
 737  var _is2 = _interopRequireDefault(_is);
 738  
 739  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 740  
 741  function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
 742  
 743  var call = exports.call = function call(value, next, rungen, yieldNext, raiseNext) {
 744    if (!_is2.default.call(value)) return false;
 745    try {
 746      next(value.func.apply(value.context, value.args));
 747    } catch (err) {
 748      raiseNext(err);
 749    }
 750    return true;
 751  };
 752  
 753  var cps = exports.cps = function cps(value, next, rungen, yieldNext, raiseNext) {
 754    var _value$func;
 755  
 756    if (!_is2.default.cps(value)) return false;
 757    (_value$func = value.func).call.apply(_value$func, [null].concat(_toConsumableArray(value.args), [function (err, result) {
 758      if (err) raiseNext(err);else next(result);
 759    }]));
 760    return true;
 761  };
 762  
 763  exports.default = [call, cps];
 764  
 765  /***/ }),
 766  
 767  /***/ 448:
 768  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 769  
 770  "use strict";
 771  __webpack_require__.r(__webpack_exports__);
 772  
 773  // CONCATENATED MODULE: ./node_modules/@wordpress/redux-routine/build-module/is-generator.js
 774  /**
 775   * Returns true if the given object is a generator, or false otherwise.
 776   *
 777   * @see https://www.ecma-international.org/ecma-262/6.0/#sec-generator-objects
 778   *
 779   * @param {*} object Object to test.
 780   *
 781   * @return {boolean} Whether object is a generator.
 782   */
 783  function isGenerator(object) {
 784    // Check that iterator (next) and iterable (Symbol.iterator) interfaces are satisfied.
 785    // These checks seem to be compatible with several generator helpers as well as the native implementation.
 786    return !!object && typeof object[Symbol.iterator] === 'function' && typeof object.next === 'function';
 787  }
 788  
 789  // EXTERNAL MODULE: ./node_modules/rungen/dist/index.js
 790  var dist = __webpack_require__(276);
 791  
 792  // EXTERNAL MODULE: external {"this":"lodash"}
 793  var external_this_lodash_ = __webpack_require__(2);
 794  
 795  // EXTERNAL MODULE: ./node_modules/is-promise/index.js
 796  var is_promise = __webpack_require__(129);
 797  var is_promise_default = /*#__PURE__*/__webpack_require__.n(is_promise);
 798  
 799  // CONCATENATED MODULE: ./node_modules/@wordpress/redux-routine/build-module/is-action.js
 800  /**
 801   * External dependencies
 802   */
 803  
 804  /**
 805   * Returns true if the given object quacks like an action.
 806   *
 807   * @param {*} object Object to test
 808   *
 809   * @return {boolean}  Whether object is an action.
 810   */
 811  
 812  function isAction(object) {
 813    return Object(external_this_lodash_["isPlainObject"])(object) && Object(external_this_lodash_["isString"])(object.type);
 814  }
 815  /**
 816   * Returns true if the given object quacks like an action and has a specific
 817   * action type
 818   *
 819   * @param {*}      object       Object to test
 820   * @param {string} expectedType The expected type for the action.
 821   *
 822   * @return {boolean} Whether object is an action and is of specific type.
 823   */
 824  
 825  function isActionOfType(object, expectedType) {
 826    return isAction(object) && object.type === expectedType;
 827  }
 828  
 829  // CONCATENATED MODULE: ./node_modules/@wordpress/redux-routine/build-module/runtime.js
 830  /**
 831   * External dependencies
 832   */
 833  
 834  
 835  
 836  /**
 837   * Internal dependencies
 838   */
 839  
 840  
 841  /**
 842   * Create a co-routine runtime.
 843   *
 844   * @param {Object}    controls Object of control handlers.
 845   * @param {Function}  dispatch Unhandled action dispatch.
 846   *
 847   * @return {Function} co-routine runtime
 848   */
 849  
 850  function createRuntime() {
 851    var controls = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 852    var dispatch = arguments.length > 1 ? arguments[1] : undefined;
 853    var rungenControls = Object(external_this_lodash_["map"])(controls, function (control, actionType) {
 854      return function (value, next, iterate, yieldNext, yieldError) {
 855        if (!isActionOfType(value, actionType)) {
 856          return false;
 857        }
 858  
 859        var routine = control(value);
 860  
 861        if (is_promise_default()(routine)) {
 862          // Async control routine awaits resolution.
 863          routine.then(yieldNext, yieldError);
 864        } else {
 865          yieldNext(routine);
 866        }
 867  
 868        return true;
 869      };
 870    });
 871  
 872    var unhandledActionControl = function unhandledActionControl(value, next) {
 873      if (!isAction(value)) {
 874        return false;
 875      }
 876  
 877      dispatch(value);
 878      next();
 879      return true;
 880    };
 881  
 882    rungenControls.push(unhandledActionControl);
 883    var rungenRuntime = Object(dist["create"])(rungenControls);
 884    return function (action) {
 885      return new Promise(function (resolve, reject) {
 886        return rungenRuntime(action, function (result) {
 887          if (isAction(result)) {
 888            dispatch(result);
 889          }
 890  
 891          resolve(result);
 892        }, reject);
 893      });
 894    };
 895  }
 896  
 897  // CONCATENATED MODULE: ./node_modules/@wordpress/redux-routine/build-module/index.js
 898  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return createMiddleware; });
 899  /**
 900   * Internal dependencies
 901   */
 902  
 903  
 904  /**
 905   * Creates a Redux middleware, given an object of controls where each key is an
 906   * action type for which to act upon, the value a function which returns either
 907   * a promise which is to resolve when evaluation of the action should continue,
 908   * or a value. The value or resolved promise value is assigned on the return
 909   * value of the yield assignment. If the control handler returns undefined, the
 910   * execution is not continued.
 911   *
 912   * @param {Object} controls Object of control handlers.
 913   *
 914   * @return {Function} Co-routine runtime
 915   */
 916  
 917  function createMiddleware() {
 918    var controls = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 919    return function (store) {
 920      var runtime = createRuntime(controls, store.dispatch);
 921      return function (next) {
 922        return function (action) {
 923          if (!isGenerator(action)) {
 924            return next(action);
 925          }
 926  
 927          return runtime(action);
 928        };
 929      };
 930    };
 931  }
 932  
 933  
 934  /***/ })
 935  
 936  /******/ })["default"];


Generated: Mon Apr 6 01:00:03 2020 Cross-referenced by PHPXref 0.7.1