WordPress/wp-includes/js/dist/redux-routine.js

865 lines
23 KiB
JavaScript
Raw Normal View History

/******/ (function() { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ 9025:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.race = exports.join = exports.fork = exports.promise = undefined;
var _is = __webpack_require__(9681);
var _is2 = _interopRequireDefault(_is);
var _helpers = __webpack_require__(7783);
var _dispatcher = __webpack_require__(2451);
var _dispatcher2 = _interopRequireDefault(_dispatcher);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var promise = exports.promise = function promise(value, next, rungen, yieldNext, raiseNext) {
if (!_is2.default.promise(value)) return false;
value.then(next, raiseNext);
return true;
};
var forkedTasks = new Map();
var fork = exports.fork = function fork(value, next, rungen) {
if (!_is2.default.fork(value)) return false;
var task = Symbol('fork');
var dispatcher = (0, _dispatcher2.default)();
forkedTasks.set(task, dispatcher);
rungen(value.iterator.apply(null, value.args), function (result) {
return dispatcher.dispatch(result);
}, function (err) {
return dispatcher.dispatch((0, _helpers.error)(err));
});
var unsubscribe = dispatcher.subscribe(function () {
unsubscribe();
forkedTasks.delete(task);
});
next(task);
return true;
};
var join = exports.join = function join(value, next, rungen, yieldNext, raiseNext) {
if (!_is2.default.join(value)) return false;
var dispatcher = forkedTasks.get(value.task);
if (!dispatcher) {
raiseNext('join error : task not found');
} else {
(function () {
var unsubscribe = dispatcher.subscribe(function (result) {
unsubscribe();
next(result);
});
})();
}
return true;
};
var race = exports.race = function race(value, next, rungen, yieldNext, raiseNext) {
if (!_is2.default.race(value)) return false;
var finished = false;
var success = function success(result, k, v) {
if (finished) return;
finished = true;
result[k] = v;
next(result);
};
var fail = function fail(err) {
if (finished) return;
raiseNext(err);
};
if (_is2.default.array(value.competitors)) {
(function () {
var result = value.competitors.map(function () {
return false;
});
value.competitors.forEach(function (competitor, index) {
rungen(competitor, function (output) {
return success(result, index, output);
}, fail);
});
})();
} else {
(function () {
var result = Object.keys(value.competitors).reduce(function (p, c) {
p[c] = false;
return p;
}, {});
Object.keys(value.competitors).forEach(function (index) {
rungen(value.competitors[index], function (output) {
return success(result, index, output);
}, fail);
});
})();
}
return true;
};
var subscribe = function subscribe(value, next) {
if (!_is2.default.subscribe(value)) return false;
if (!_is2.default.channel(value.channel)) {
throw new Error('the first argument of "subscribe" must be a valid channel');
}
var unsubscribe = value.channel.subscribe(function (ret) {
unsubscribe && unsubscribe();
next(ret);
});
return true;
};
exports["default"] = [promise, fork, join, race, subscribe];
/***/ }),
/***/ 7961:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.iterator = exports.array = exports.object = exports.error = exports.any = undefined;
var _is = __webpack_require__(9681);
var _is2 = _interopRequireDefault(_is);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var any = exports.any = function any(value, next, rungen, yieldNext) {
yieldNext(value);
return true;
};
var error = exports.error = function error(value, next, rungen, yieldNext, raiseNext) {
if (!_is2.default.error(value)) return false;
raiseNext(value.error);
return true;
};
var object = exports.object = function object(value, next, rungen, yieldNext, raiseNext) {
if (!_is2.default.all(value) || !_is2.default.obj(value.value)) return false;
var result = {};
var keys = Object.keys(value.value);
var count = 0;
var hasError = false;
var gotResultSuccess = function gotResultSuccess(key, ret) {
if (hasError) return;
result[key] = ret;
count++;
if (count === keys.length) {
yieldNext(result);
}
};
var gotResultError = function gotResultError(key, error) {
if (hasError) return;
hasError = true;
raiseNext(error);
};
keys.map(function (key) {
rungen(value.value[key], function (ret) {
return gotResultSuccess(key, ret);
}, function (err) {
return gotResultError(key, err);
});
});
return true;
};
var array = exports.array = function array(value, next, rungen, yieldNext, raiseNext) {
if (!_is2.default.all(value) || !_is2.default.array(value.value)) return false;
var result = [];
var count = 0;
var hasError = false;
var gotResultSuccess = function gotResultSuccess(key, ret) {
if (hasError) return;
result[key] = ret;
count++;
if (count === value.value.length) {
yieldNext(result);
}
};
var gotResultError = function gotResultError(key, error) {
if (hasError) return;
hasError = true;
raiseNext(error);
};
value.value.map(function (v, key) {
rungen(v, function (ret) {
return gotResultSuccess(key, ret);
}, function (err) {
return gotResultError(key, err);
});
});
Editor: update packages; Port block supports to WordPress core. The following package versions were changed: @wordpress/a11y: 2.11.0 -> 2.13.0 @wordpress/annotations: 1.20.4 -> 1.22.0 @wordpress/api-fetch: 3.18.0 -> 3.20.0 @wordpress/autop: 2.9.0 -> 2.10.0 @wordpress/blob: 2.9.0 -> 2.10.0 @wordpress/block-directory: 1.13.7 -> 1.16.0 @wordpress/block-editor: 4.3.7 -> 5.0.0 @wordpress/block-library: 2.22.7 -> 2.25.0 @wordpress/block-serialization-default-parser: 3.7.0 -> 3.8.0 @wordpress/blocks: 6.20.3 -> 6.23.0 @wordpress/components: 10.0.6 -> 11.0.0 @wordpress/compose: 3.19.3 -> 3.21.0 @wordpress/core-data: 2.20.3 -> 2.23.0 @wordpress/data: 4.22.3 -> 4.24.0 @wordpress/data-controls: 1.16.3 -> 1.18.0 @wordpress/date: 3.10.0 -> 3.12.0 @wordpress/deprecated: 2.9.0 -> 2.10.0 @wordpress/dom: 2.13.1 -> 2.15.0 @wordpress/dom-ready: 2.10.0 -> 2.11.0 @wordpress/e2e-test-utils: 4.11.2 -> 4.14.0 @wordpress/edit-post: 3.21.7 -> 3.24.0 @wordpress/editor: 9.20.7 -> 9.23.0 @wordpress/element: 2.16.0 -> 2.18.0 @wordpress/escape-html: 1.9.0 -> 1.10.0 @wordpress/format-library: 1.22.7 -> 1.24.0 @wordpress/hooks: 2.9.0 -> 2.10.0 @wordpress/html-entities: 2.8.0 -> 2.9.0 @wordpress/i18n: 3.14.0 -> 3.16.0 @wordpress/icons: 2.4.0 -> 2.7.0 @wordpress/is-shallow-equal: 2.1.0 -> 2.3.0 @wordpress/keyboard-shortcuts: 1.9.3 -> 1.11.0 @wordpress/keycodes: 2.14.0 -> 2.16.0 @wordpress/library-export-default-webpack-plugin: 1.7.0 -> 1.9.0 @wordpress/list-reusable-blocks: 1.21.6 -> 1.23.0 @wordpress/media-utils: 1.15.0 -> 1.17.0 @wordpress/notices: 2.8.3 -> 2.10.0 @wordpress/nux: 3.20.6 -> 3.22.0 @wordpress/plugins: 2.20.3 -> 2.22.0 @wordpress/primitives: 1.7.0 -> 1.9.0 @wordpress/priority-queue: 1.7.0 -> 1.9.0 @wordpress/redux-routine: 3.10.0 -> 3.12.0 @wordpress/rich-text: 3.20.4 -> 3.22.0 @wordpress/scripts: 12.1.1 -> 12.3.0 @wordpress/server-side-render: 1.16.6 -> 1.18.0 @wordpress/shortcode: 2.9.0 -> 2.11.0 @wordpress/token-list: 1.11.0 -> 1.13.0 @wordpress/url: 2.17.0 -> 2.19.0 @wordpress/viewport: 2.21.3 -> 2.23.0 @wordpress/warning: 1.2.0 -> 1.3.0 @wordpress/wordcount: 2.10.0 -> 2.12.0 Props isabel_brison, youknowriad, mcsf. Fixes #51461. Built from https://develop.svn.wordpress.org/trunk@49135 git-svn-id: http://core.svn.wordpress.org/trunk@48897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-13 15:10:30 +02:00
return true;
};
Editor: update packages; Port block supports to WordPress core. The following package versions were changed: @wordpress/a11y: 2.11.0 -> 2.13.0 @wordpress/annotations: 1.20.4 -> 1.22.0 @wordpress/api-fetch: 3.18.0 -> 3.20.0 @wordpress/autop: 2.9.0 -> 2.10.0 @wordpress/blob: 2.9.0 -> 2.10.0 @wordpress/block-directory: 1.13.7 -> 1.16.0 @wordpress/block-editor: 4.3.7 -> 5.0.0 @wordpress/block-library: 2.22.7 -> 2.25.0 @wordpress/block-serialization-default-parser: 3.7.0 -> 3.8.0 @wordpress/blocks: 6.20.3 -> 6.23.0 @wordpress/components: 10.0.6 -> 11.0.0 @wordpress/compose: 3.19.3 -> 3.21.0 @wordpress/core-data: 2.20.3 -> 2.23.0 @wordpress/data: 4.22.3 -> 4.24.0 @wordpress/data-controls: 1.16.3 -> 1.18.0 @wordpress/date: 3.10.0 -> 3.12.0 @wordpress/deprecated: 2.9.0 -> 2.10.0 @wordpress/dom: 2.13.1 -> 2.15.0 @wordpress/dom-ready: 2.10.0 -> 2.11.0 @wordpress/e2e-test-utils: 4.11.2 -> 4.14.0 @wordpress/edit-post: 3.21.7 -> 3.24.0 @wordpress/editor: 9.20.7 -> 9.23.0 @wordpress/element: 2.16.0 -> 2.18.0 @wordpress/escape-html: 1.9.0 -> 1.10.0 @wordpress/format-library: 1.22.7 -> 1.24.0 @wordpress/hooks: 2.9.0 -> 2.10.0 @wordpress/html-entities: 2.8.0 -> 2.9.0 @wordpress/i18n: 3.14.0 -> 3.16.0 @wordpress/icons: 2.4.0 -> 2.7.0 @wordpress/is-shallow-equal: 2.1.0 -> 2.3.0 @wordpress/keyboard-shortcuts: 1.9.3 -> 1.11.0 @wordpress/keycodes: 2.14.0 -> 2.16.0 @wordpress/library-export-default-webpack-plugin: 1.7.0 -> 1.9.0 @wordpress/list-reusable-blocks: 1.21.6 -> 1.23.0 @wordpress/media-utils: 1.15.0 -> 1.17.0 @wordpress/notices: 2.8.3 -> 2.10.0 @wordpress/nux: 3.20.6 -> 3.22.0 @wordpress/plugins: 2.20.3 -> 2.22.0 @wordpress/primitives: 1.7.0 -> 1.9.0 @wordpress/priority-queue: 1.7.0 -> 1.9.0 @wordpress/redux-routine: 3.10.0 -> 3.12.0 @wordpress/rich-text: 3.20.4 -> 3.22.0 @wordpress/scripts: 12.1.1 -> 12.3.0 @wordpress/server-side-render: 1.16.6 -> 1.18.0 @wordpress/shortcode: 2.9.0 -> 2.11.0 @wordpress/token-list: 1.11.0 -> 1.13.0 @wordpress/url: 2.17.0 -> 2.19.0 @wordpress/viewport: 2.21.3 -> 2.23.0 @wordpress/warning: 1.2.0 -> 1.3.0 @wordpress/wordcount: 2.10.0 -> 2.12.0 Props isabel_brison, youknowriad, mcsf. Fixes #51461. Built from https://develop.svn.wordpress.org/trunk@49135 git-svn-id: http://core.svn.wordpress.org/trunk@48897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-13 15:10:30 +02:00
var iterator = exports.iterator = function iterator(value, next, rungen, yieldNext, raiseNext) {
if (!_is2.default.iterator(value)) return false;
rungen(value, next, raiseNext);
return true;
};
Editor: update packages; Port block supports to WordPress core. The following package versions were changed: @wordpress/a11y: 2.11.0 -> 2.13.0 @wordpress/annotations: 1.20.4 -> 1.22.0 @wordpress/api-fetch: 3.18.0 -> 3.20.0 @wordpress/autop: 2.9.0 -> 2.10.0 @wordpress/blob: 2.9.0 -> 2.10.0 @wordpress/block-directory: 1.13.7 -> 1.16.0 @wordpress/block-editor: 4.3.7 -> 5.0.0 @wordpress/block-library: 2.22.7 -> 2.25.0 @wordpress/block-serialization-default-parser: 3.7.0 -> 3.8.0 @wordpress/blocks: 6.20.3 -> 6.23.0 @wordpress/components: 10.0.6 -> 11.0.0 @wordpress/compose: 3.19.3 -> 3.21.0 @wordpress/core-data: 2.20.3 -> 2.23.0 @wordpress/data: 4.22.3 -> 4.24.0 @wordpress/data-controls: 1.16.3 -> 1.18.0 @wordpress/date: 3.10.0 -> 3.12.0 @wordpress/deprecated: 2.9.0 -> 2.10.0 @wordpress/dom: 2.13.1 -> 2.15.0 @wordpress/dom-ready: 2.10.0 -> 2.11.0 @wordpress/e2e-test-utils: 4.11.2 -> 4.14.0 @wordpress/edit-post: 3.21.7 -> 3.24.0 @wordpress/editor: 9.20.7 -> 9.23.0 @wordpress/element: 2.16.0 -> 2.18.0 @wordpress/escape-html: 1.9.0 -> 1.10.0 @wordpress/format-library: 1.22.7 -> 1.24.0 @wordpress/hooks: 2.9.0 -> 2.10.0 @wordpress/html-entities: 2.8.0 -> 2.9.0 @wordpress/i18n: 3.14.0 -> 3.16.0 @wordpress/icons: 2.4.0 -> 2.7.0 @wordpress/is-shallow-equal: 2.1.0 -> 2.3.0 @wordpress/keyboard-shortcuts: 1.9.3 -> 1.11.0 @wordpress/keycodes: 2.14.0 -> 2.16.0 @wordpress/library-export-default-webpack-plugin: 1.7.0 -> 1.9.0 @wordpress/list-reusable-blocks: 1.21.6 -> 1.23.0 @wordpress/media-utils: 1.15.0 -> 1.17.0 @wordpress/notices: 2.8.3 -> 2.10.0 @wordpress/nux: 3.20.6 -> 3.22.0 @wordpress/plugins: 2.20.3 -> 2.22.0 @wordpress/primitives: 1.7.0 -> 1.9.0 @wordpress/priority-queue: 1.7.0 -> 1.9.0 @wordpress/redux-routine: 3.10.0 -> 3.12.0 @wordpress/rich-text: 3.20.4 -> 3.22.0 @wordpress/scripts: 12.1.1 -> 12.3.0 @wordpress/server-side-render: 1.16.6 -> 1.18.0 @wordpress/shortcode: 2.9.0 -> 2.11.0 @wordpress/token-list: 1.11.0 -> 1.13.0 @wordpress/url: 2.17.0 -> 2.19.0 @wordpress/viewport: 2.21.3 -> 2.23.0 @wordpress/warning: 1.2.0 -> 1.3.0 @wordpress/wordcount: 2.10.0 -> 2.12.0 Props isabel_brison, youknowriad, mcsf. Fixes #51461. Built from https://develop.svn.wordpress.org/trunk@49135 git-svn-id: http://core.svn.wordpress.org/trunk@48897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-13 15:10:30 +02:00
exports["default"] = [error, iterator, array, object, any];
Editor: update packages; Port block supports to WordPress core. The following package versions were changed: @wordpress/a11y: 2.11.0 -> 2.13.0 @wordpress/annotations: 1.20.4 -> 1.22.0 @wordpress/api-fetch: 3.18.0 -> 3.20.0 @wordpress/autop: 2.9.0 -> 2.10.0 @wordpress/blob: 2.9.0 -> 2.10.0 @wordpress/block-directory: 1.13.7 -> 1.16.0 @wordpress/block-editor: 4.3.7 -> 5.0.0 @wordpress/block-library: 2.22.7 -> 2.25.0 @wordpress/block-serialization-default-parser: 3.7.0 -> 3.8.0 @wordpress/blocks: 6.20.3 -> 6.23.0 @wordpress/components: 10.0.6 -> 11.0.0 @wordpress/compose: 3.19.3 -> 3.21.0 @wordpress/core-data: 2.20.3 -> 2.23.0 @wordpress/data: 4.22.3 -> 4.24.0 @wordpress/data-controls: 1.16.3 -> 1.18.0 @wordpress/date: 3.10.0 -> 3.12.0 @wordpress/deprecated: 2.9.0 -> 2.10.0 @wordpress/dom: 2.13.1 -> 2.15.0 @wordpress/dom-ready: 2.10.0 -> 2.11.0 @wordpress/e2e-test-utils: 4.11.2 -> 4.14.0 @wordpress/edit-post: 3.21.7 -> 3.24.0 @wordpress/editor: 9.20.7 -> 9.23.0 @wordpress/element: 2.16.0 -> 2.18.0 @wordpress/escape-html: 1.9.0 -> 1.10.0 @wordpress/format-library: 1.22.7 -> 1.24.0 @wordpress/hooks: 2.9.0 -> 2.10.0 @wordpress/html-entities: 2.8.0 -> 2.9.0 @wordpress/i18n: 3.14.0 -> 3.16.0 @wordpress/icons: 2.4.0 -> 2.7.0 @wordpress/is-shallow-equal: 2.1.0 -> 2.3.0 @wordpress/keyboard-shortcuts: 1.9.3 -> 1.11.0 @wordpress/keycodes: 2.14.0 -> 2.16.0 @wordpress/library-export-default-webpack-plugin: 1.7.0 -> 1.9.0 @wordpress/list-reusable-blocks: 1.21.6 -> 1.23.0 @wordpress/media-utils: 1.15.0 -> 1.17.0 @wordpress/notices: 2.8.3 -> 2.10.0 @wordpress/nux: 3.20.6 -> 3.22.0 @wordpress/plugins: 2.20.3 -> 2.22.0 @wordpress/primitives: 1.7.0 -> 1.9.0 @wordpress/priority-queue: 1.7.0 -> 1.9.0 @wordpress/redux-routine: 3.10.0 -> 3.12.0 @wordpress/rich-text: 3.20.4 -> 3.22.0 @wordpress/scripts: 12.1.1 -> 12.3.0 @wordpress/server-side-render: 1.16.6 -> 1.18.0 @wordpress/shortcode: 2.9.0 -> 2.11.0 @wordpress/token-list: 1.11.0 -> 1.13.0 @wordpress/url: 2.17.0 -> 2.19.0 @wordpress/viewport: 2.21.3 -> 2.23.0 @wordpress/warning: 1.2.0 -> 1.3.0 @wordpress/wordcount: 2.10.0 -> 2.12.0 Props isabel_brison, youknowriad, mcsf. Fixes #51461. Built from https://develop.svn.wordpress.org/trunk@49135 git-svn-id: http://core.svn.wordpress.org/trunk@48897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-13 15:10:30 +02:00
/***/ }),
/***/ 2165:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Block Editor: Update the WordPress Packages from Gutenberg 5.3 - @wordpress/a11y@2.2.0 - @wordpress/annotations@1.2.0 - @wordpress/api-fetch@3.1.0 - @wordpress/autop@2.2.0 - @wordpress/babel-plugin-import-jsx-pragma@2.1.0 - @wordpress/babel-preset-default@4.1.0 - @wordpress/blob@2.3.0 - @wordpress/block-editor@1.1.0 - @wordpress/block-library@2.4.0 - @wordpress/block-serialization-default-parser@3.1.0 - @wordpress/blocks@6.2.0 - @wordpress/components@7.2.0 - @wordpress/compose@3.2.0 - @wordpress/core-data@2.2.0 - @wordpress/data@4.4.0 - @wordpress/date@3.2.0 - @wordpress/deprecated@2.2.0 - @wordpress/docgen@1.1.0 - @wordpress/dom-ready@2.2.0 - @wordpress/dom@2.2.0 - @wordpress/e2e-test-utils@1.1.0 - @wordpress/e2e-tests@1.1.0 - @wordpress/edit-post@3.3.0 - @wordpress/edit-widgets@0.2.0 - @wordpress/editor@9.2.0 - @wordpress/element@2.3.0 - @wordpress/escape-html@1.2.0 - @wordpress/eslint-plugin@2.1.0 - @wordpress/format-library@1.4.0 - @wordpress/hooks@2.2.0 - @wordpress/html-entities@2.2.0 - @wordpress/i18n@3.3.0 - @wordpress/keycodes@2.2.0 - @wordpress/list-reusable-blocks@1.3.0 - @wordpress/notices@1.3.0 - @wordpress/nux@3.2.0 - @wordpress/plugins@2.2.0 - @wordpress/priority-queue@1.1.0 - @wordpress/redux-routine@3.2.0 - @wordpress/rich-text@3.2.0 - @wordpress/scripts@3.1.0 - @wordpress/shortcode@2.2.0 - @wordpress/url@2.5.0 - @wordpress/viewport@2.3.0 - @wordpress/wordcount@2.2.0 Built from https://develop.svn.wordpress.org/trunk@44960 git-svn-id: http://core.svn.wordpress.org/trunk@44791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 13:48:00 +01:00
Object.defineProperty(exports, "__esModule", ({
Block Editor: Update the WordPress Packages from Gutenberg 5.3 - @wordpress/a11y@2.2.0 - @wordpress/annotations@1.2.0 - @wordpress/api-fetch@3.1.0 - @wordpress/autop@2.2.0 - @wordpress/babel-plugin-import-jsx-pragma@2.1.0 - @wordpress/babel-preset-default@4.1.0 - @wordpress/blob@2.3.0 - @wordpress/block-editor@1.1.0 - @wordpress/block-library@2.4.0 - @wordpress/block-serialization-default-parser@3.1.0 - @wordpress/blocks@6.2.0 - @wordpress/components@7.2.0 - @wordpress/compose@3.2.0 - @wordpress/core-data@2.2.0 - @wordpress/data@4.4.0 - @wordpress/date@3.2.0 - @wordpress/deprecated@2.2.0 - @wordpress/docgen@1.1.0 - @wordpress/dom-ready@2.2.0 - @wordpress/dom@2.2.0 - @wordpress/e2e-test-utils@1.1.0 - @wordpress/e2e-tests@1.1.0 - @wordpress/edit-post@3.3.0 - @wordpress/edit-widgets@0.2.0 - @wordpress/editor@9.2.0 - @wordpress/element@2.3.0 - @wordpress/escape-html@1.2.0 - @wordpress/eslint-plugin@2.1.0 - @wordpress/format-library@1.4.0 - @wordpress/hooks@2.2.0 - @wordpress/html-entities@2.2.0 - @wordpress/i18n@3.3.0 - @wordpress/keycodes@2.2.0 - @wordpress/list-reusable-blocks@1.3.0 - @wordpress/notices@1.3.0 - @wordpress/nux@3.2.0 - @wordpress/plugins@2.2.0 - @wordpress/priority-queue@1.1.0 - @wordpress/redux-routine@3.2.0 - @wordpress/rich-text@3.2.0 - @wordpress/scripts@3.1.0 - @wordpress/shortcode@2.2.0 - @wordpress/url@2.5.0 - @wordpress/viewport@2.3.0 - @wordpress/wordcount@2.2.0 Built from https://develop.svn.wordpress.org/trunk@44960 git-svn-id: http://core.svn.wordpress.org/trunk@44791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 13:48:00 +01:00
value: true
}));
exports.cps = exports.call = undefined;
Block Editor: Update the WordPress Packages from Gutenberg 5.3 - @wordpress/a11y@2.2.0 - @wordpress/annotations@1.2.0 - @wordpress/api-fetch@3.1.0 - @wordpress/autop@2.2.0 - @wordpress/babel-plugin-import-jsx-pragma@2.1.0 - @wordpress/babel-preset-default@4.1.0 - @wordpress/blob@2.3.0 - @wordpress/block-editor@1.1.0 - @wordpress/block-library@2.4.0 - @wordpress/block-serialization-default-parser@3.1.0 - @wordpress/blocks@6.2.0 - @wordpress/components@7.2.0 - @wordpress/compose@3.2.0 - @wordpress/core-data@2.2.0 - @wordpress/data@4.4.0 - @wordpress/date@3.2.0 - @wordpress/deprecated@2.2.0 - @wordpress/docgen@1.1.0 - @wordpress/dom-ready@2.2.0 - @wordpress/dom@2.2.0 - @wordpress/e2e-test-utils@1.1.0 - @wordpress/e2e-tests@1.1.0 - @wordpress/edit-post@3.3.0 - @wordpress/edit-widgets@0.2.0 - @wordpress/editor@9.2.0 - @wordpress/element@2.3.0 - @wordpress/escape-html@1.2.0 - @wordpress/eslint-plugin@2.1.0 - @wordpress/format-library@1.4.0 - @wordpress/hooks@2.2.0 - @wordpress/html-entities@2.2.0 - @wordpress/i18n@3.3.0 - @wordpress/keycodes@2.2.0 - @wordpress/list-reusable-blocks@1.3.0 - @wordpress/notices@1.3.0 - @wordpress/nux@3.2.0 - @wordpress/plugins@2.2.0 - @wordpress/priority-queue@1.1.0 - @wordpress/redux-routine@3.2.0 - @wordpress/rich-text@3.2.0 - @wordpress/scripts@3.1.0 - @wordpress/shortcode@2.2.0 - @wordpress/url@2.5.0 - @wordpress/viewport@2.3.0 - @wordpress/wordcount@2.2.0 Built from https://develop.svn.wordpress.org/trunk@44960 git-svn-id: http://core.svn.wordpress.org/trunk@44791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 13:48:00 +01:00
var _is = __webpack_require__(9681);
Block Editor: Update the WordPress Packages from Gutenberg 5.3 - @wordpress/a11y@2.2.0 - @wordpress/annotations@1.2.0 - @wordpress/api-fetch@3.1.0 - @wordpress/autop@2.2.0 - @wordpress/babel-plugin-import-jsx-pragma@2.1.0 - @wordpress/babel-preset-default@4.1.0 - @wordpress/blob@2.3.0 - @wordpress/block-editor@1.1.0 - @wordpress/block-library@2.4.0 - @wordpress/block-serialization-default-parser@3.1.0 - @wordpress/blocks@6.2.0 - @wordpress/components@7.2.0 - @wordpress/compose@3.2.0 - @wordpress/core-data@2.2.0 - @wordpress/data@4.4.0 - @wordpress/date@3.2.0 - @wordpress/deprecated@2.2.0 - @wordpress/docgen@1.1.0 - @wordpress/dom-ready@2.2.0 - @wordpress/dom@2.2.0 - @wordpress/e2e-test-utils@1.1.0 - @wordpress/e2e-tests@1.1.0 - @wordpress/edit-post@3.3.0 - @wordpress/edit-widgets@0.2.0 - @wordpress/editor@9.2.0 - @wordpress/element@2.3.0 - @wordpress/escape-html@1.2.0 - @wordpress/eslint-plugin@2.1.0 - @wordpress/format-library@1.4.0 - @wordpress/hooks@2.2.0 - @wordpress/html-entities@2.2.0 - @wordpress/i18n@3.3.0 - @wordpress/keycodes@2.2.0 - @wordpress/list-reusable-blocks@1.3.0 - @wordpress/notices@1.3.0 - @wordpress/nux@3.2.0 - @wordpress/plugins@2.2.0 - @wordpress/priority-queue@1.1.0 - @wordpress/redux-routine@3.2.0 - @wordpress/rich-text@3.2.0 - @wordpress/scripts@3.1.0 - @wordpress/shortcode@2.2.0 - @wordpress/url@2.5.0 - @wordpress/viewport@2.3.0 - @wordpress/wordcount@2.2.0 Built from https://develop.svn.wordpress.org/trunk@44960 git-svn-id: http://core.svn.wordpress.org/trunk@44791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 13:48:00 +01:00
var _is2 = _interopRequireDefault(_is);
Block Editor: Update the WordPress Packages from Gutenberg 5.3 - @wordpress/a11y@2.2.0 - @wordpress/annotations@1.2.0 - @wordpress/api-fetch@3.1.0 - @wordpress/autop@2.2.0 - @wordpress/babel-plugin-import-jsx-pragma@2.1.0 - @wordpress/babel-preset-default@4.1.0 - @wordpress/blob@2.3.0 - @wordpress/block-editor@1.1.0 - @wordpress/block-library@2.4.0 - @wordpress/block-serialization-default-parser@3.1.0 - @wordpress/blocks@6.2.0 - @wordpress/components@7.2.0 - @wordpress/compose@3.2.0 - @wordpress/core-data@2.2.0 - @wordpress/data@4.4.0 - @wordpress/date@3.2.0 - @wordpress/deprecated@2.2.0 - @wordpress/docgen@1.1.0 - @wordpress/dom-ready@2.2.0 - @wordpress/dom@2.2.0 - @wordpress/e2e-test-utils@1.1.0 - @wordpress/e2e-tests@1.1.0 - @wordpress/edit-post@3.3.0 - @wordpress/edit-widgets@0.2.0 - @wordpress/editor@9.2.0 - @wordpress/element@2.3.0 - @wordpress/escape-html@1.2.0 - @wordpress/eslint-plugin@2.1.0 - @wordpress/format-library@1.4.0 - @wordpress/hooks@2.2.0 - @wordpress/html-entities@2.2.0 - @wordpress/i18n@3.3.0 - @wordpress/keycodes@2.2.0 - @wordpress/list-reusable-blocks@1.3.0 - @wordpress/notices@1.3.0 - @wordpress/nux@3.2.0 - @wordpress/plugins@2.2.0 - @wordpress/priority-queue@1.1.0 - @wordpress/redux-routine@3.2.0 - @wordpress/rich-text@3.2.0 - @wordpress/scripts@3.1.0 - @wordpress/shortcode@2.2.0 - @wordpress/url@2.5.0 - @wordpress/viewport@2.3.0 - @wordpress/wordcount@2.2.0 Built from https://develop.svn.wordpress.org/trunk@44960 git-svn-id: http://core.svn.wordpress.org/trunk@44791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 13:48:00 +01:00
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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); } }
var call = exports.call = function call(value, next, rungen, yieldNext, raiseNext) {
if (!_is2.default.call(value)) return false;
try {
next(value.func.apply(value.context, value.args));
} catch (err) {
raiseNext(err);
Block Editor: Update the WordPress Packages from Gutenberg 5.3 - @wordpress/a11y@2.2.0 - @wordpress/annotations@1.2.0 - @wordpress/api-fetch@3.1.0 - @wordpress/autop@2.2.0 - @wordpress/babel-plugin-import-jsx-pragma@2.1.0 - @wordpress/babel-preset-default@4.1.0 - @wordpress/blob@2.3.0 - @wordpress/block-editor@1.1.0 - @wordpress/block-library@2.4.0 - @wordpress/block-serialization-default-parser@3.1.0 - @wordpress/blocks@6.2.0 - @wordpress/components@7.2.0 - @wordpress/compose@3.2.0 - @wordpress/core-data@2.2.0 - @wordpress/data@4.4.0 - @wordpress/date@3.2.0 - @wordpress/deprecated@2.2.0 - @wordpress/docgen@1.1.0 - @wordpress/dom-ready@2.2.0 - @wordpress/dom@2.2.0 - @wordpress/e2e-test-utils@1.1.0 - @wordpress/e2e-tests@1.1.0 - @wordpress/edit-post@3.3.0 - @wordpress/edit-widgets@0.2.0 - @wordpress/editor@9.2.0 - @wordpress/element@2.3.0 - @wordpress/escape-html@1.2.0 - @wordpress/eslint-plugin@2.1.0 - @wordpress/format-library@1.4.0 - @wordpress/hooks@2.2.0 - @wordpress/html-entities@2.2.0 - @wordpress/i18n@3.3.0 - @wordpress/keycodes@2.2.0 - @wordpress/list-reusable-blocks@1.3.0 - @wordpress/notices@1.3.0 - @wordpress/nux@3.2.0 - @wordpress/plugins@2.2.0 - @wordpress/priority-queue@1.1.0 - @wordpress/redux-routine@3.2.0 - @wordpress/rich-text@3.2.0 - @wordpress/scripts@3.1.0 - @wordpress/shortcode@2.2.0 - @wordpress/url@2.5.0 - @wordpress/viewport@2.3.0 - @wordpress/wordcount@2.2.0 Built from https://develop.svn.wordpress.org/trunk@44960 git-svn-id: http://core.svn.wordpress.org/trunk@44791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 13:48:00 +01:00
}
return true;
Block Editor: Update the WordPress Packages from Gutenberg 5.3 - @wordpress/a11y@2.2.0 - @wordpress/annotations@1.2.0 - @wordpress/api-fetch@3.1.0 - @wordpress/autop@2.2.0 - @wordpress/babel-plugin-import-jsx-pragma@2.1.0 - @wordpress/babel-preset-default@4.1.0 - @wordpress/blob@2.3.0 - @wordpress/block-editor@1.1.0 - @wordpress/block-library@2.4.0 - @wordpress/block-serialization-default-parser@3.1.0 - @wordpress/blocks@6.2.0 - @wordpress/components@7.2.0 - @wordpress/compose@3.2.0 - @wordpress/core-data@2.2.0 - @wordpress/data@4.4.0 - @wordpress/date@3.2.0 - @wordpress/deprecated@2.2.0 - @wordpress/docgen@1.1.0 - @wordpress/dom-ready@2.2.0 - @wordpress/dom@2.2.0 - @wordpress/e2e-test-utils@1.1.0 - @wordpress/e2e-tests@1.1.0 - @wordpress/edit-post@3.3.0 - @wordpress/edit-widgets@0.2.0 - @wordpress/editor@9.2.0 - @wordpress/element@2.3.0 - @wordpress/escape-html@1.2.0 - @wordpress/eslint-plugin@2.1.0 - @wordpress/format-library@1.4.0 - @wordpress/hooks@2.2.0 - @wordpress/html-entities@2.2.0 - @wordpress/i18n@3.3.0 - @wordpress/keycodes@2.2.0 - @wordpress/list-reusable-blocks@1.3.0 - @wordpress/notices@1.3.0 - @wordpress/nux@3.2.0 - @wordpress/plugins@2.2.0 - @wordpress/priority-queue@1.1.0 - @wordpress/redux-routine@3.2.0 - @wordpress/rich-text@3.2.0 - @wordpress/scripts@3.1.0 - @wordpress/shortcode@2.2.0 - @wordpress/url@2.5.0 - @wordpress/viewport@2.3.0 - @wordpress/wordcount@2.2.0 Built from https://develop.svn.wordpress.org/trunk@44960 git-svn-id: http://core.svn.wordpress.org/trunk@44791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 13:48:00 +01:00
};
var cps = exports.cps = function cps(value, next, rungen, yieldNext, raiseNext) {
var _value$func;
if (!_is2.default.cps(value)) return false;
(_value$func = value.func).call.apply(_value$func, [null].concat(_toConsumableArray(value.args), [function (err, result) {
if (err) raiseNext(err);else next(result);
}]));
return true;
};
exports["default"] = [call, cps];
Block Editor: Update the WordPress Packages to the ones used in the Gutenberg 6.8 release. Updated packages: @wordpress/a11y@2.5.1 @wordpress/annotations@1.7.2 @wordpress/api-fetch@3.6.2 @wordpress/autop@2.5.1 @wordpress/babel-preset-default@4.6.2 @wordpress/blob@2.5.1 @wordpress/block-directory@1.0.2 @wordpress/block-editor@3.2.2 @wordpress/block-library@2.9.2 @wordpress/block-serialization-default-parser@3.4.1 @wordpress/block-serialization-spec-parser@3.3.1 @wordpress/blocks@6.7.2 @wordpress/components@8.3.2 @wordpress/compose@3.7.2 @wordpress/core-data@2.7.2 @wordpress/data-controls@1.3.2 @wordpress/data@4.9.2 @wordpress/deprecated@2.6.1 @wordpress/dom-ready@2.5.1 @wordpress/dom@2.5.2 @wordpress/e2e-test-utils@2.4.2 @wordpress/e2e-tests@1.7.2 @wordpress/edit-post@3.8.2 @wordpress/editor@9.7.2 @wordpress/element@2.8.2 @wordpress/escape-html@1.5.1 @wordpress/format-library@1.9.2 @wordpress/is-shallow-equal@1.6.1 @wordpress/keycodes@2.6.2 @wordpress/list-reusable-blocks@1.8.2 @wordpress/media-utils@1.2.2 @wordpress/notices@1.8.2 @wordpress/nux@3.7.2 @wordpress/plugins@2.7.2 @wordpress/priority-queue@1.3.1 @wordpress/redux-routine@3.6.2 @wordpress/rich-text@3.7.2 @wordpress/scripts@5.1.0 @wordpress/server-side-render@1.3.2 @wordpress/url@2.8.1 @wordpress/viewport@2.8.2 @wordpress/wordcount@2.6.2 Props gziolo, youknowriad. Fixes: #48310 Built from https://develop.svn.wordpress.org/trunk@46546 git-svn-id: http://core.svn.wordpress.org/trunk@46343 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-10-15 18:17:12 +02:00
/***/ }),
/***/ 6288:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({
value: true
}));
var _builtin = __webpack_require__(7961);
var _builtin2 = _interopRequireDefault(_builtin);
var _is = __webpack_require__(9681);
var _is2 = _interopRequireDefault(_is);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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); } }
var create = function create() {
var userControls = arguments.length <= 0 || arguments[0] === undefined ? [] : arguments[0];
var controls = [].concat(_toConsumableArray(userControls), _toConsumableArray(_builtin2.default));
var runtime = function runtime(input) {
var success = arguments.length <= 1 || arguments[1] === undefined ? function () {} : arguments[1];
var error = arguments.length <= 2 || arguments[2] === undefined ? function () {} : arguments[2];
var iterate = function iterate(gen) {
var yieldValue = function yieldValue(isError) {
return function (ret) {
try {
var _ref = isError ? gen.throw(ret) : gen.next(ret);
var value = _ref.value;
var done = _ref.done;
if (done) return success(value);
next(value);
} catch (e) {
return error(e);
}
};
};
var next = function next(ret) {
controls.some(function (control) {
return control(ret, next, runtime, yieldValue(false), yieldValue(true));
});
};
yieldValue(false)();
};
var iterator = _is2.default.iterator(input) ? input : regeneratorRuntime.mark(function _callee() {
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return input;
case 2:
return _context.abrupt('return', _context.sent);
case 3:
case 'end':
return _context.stop();
}
}
}, _callee, this);
})();
iterate(iterator, success, error);
};
return runtime;
};
exports["default"] = create;
/***/ }),
/***/ 2290:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.wrapControls = exports.asyncControls = exports.create = undefined;
var _helpers = __webpack_require__(7783);
Object.keys(_helpers).forEach(function (key) {
if (key === "default") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _helpers[key];
}
});
});
var _create = __webpack_require__(6288);
var _create2 = _interopRequireDefault(_create);
var _async = __webpack_require__(9025);
var _async2 = _interopRequireDefault(_async);
var _wrap = __webpack_require__(2165);
var _wrap2 = _interopRequireDefault(_wrap);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.create = _create2.default;
exports.asyncControls = _async2.default;
exports.wrapControls = _wrap2.default;
/***/ }),
/***/ 2451:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({
value: true
}));
var createDispatcher = function createDispatcher() {
var listeners = [];
return {
subscribe: function subscribe(listener) {
listeners.push(listener);
return function () {
listeners = listeners.filter(function (l) {
return l !== listener;
});
};
},
dispatch: function dispatch(action) {
listeners.slice().forEach(function (listener) {
return listener(action);
});
}
};
};
exports["default"] = createDispatcher;
/***/ }),
/***/ 7783:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({
value: true
}));
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;
var _keys = __webpack_require__(9851);
var _keys2 = _interopRequireDefault(_keys);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var all = exports.all = function all(value) {
return {
type: _keys2.default.all,
value: value
};
};
var error = exports.error = function error(err) {
return {
type: _keys2.default.error,
error: err
};
};
var fork = exports.fork = function fork(iterator) {
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
return {
type: _keys2.default.fork,
iterator: iterator,
args: args
};
};
var join = exports.join = function join(task) {
return {
type: _keys2.default.join,
task: task
};
};
var race = exports.race = function race(competitors) {
return {
type: _keys2.default.race,
competitors: competitors
};
};
var delay = exports.delay = function delay(timeout) {
return new Promise(function (resolve) {
setTimeout(function () {
return resolve(true);
}, timeout);
});
};
var invoke = exports.invoke = function invoke(func) {
for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
args[_key2 - 1] = arguments[_key2];
}
return {
type: _keys2.default.call,
func: func,
context: null,
args: args
};
};
var call = exports.call = function call(func, context) {
for (var _len3 = arguments.length, args = Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
args[_key3 - 2] = arguments[_key3];
}
return {
type: _keys2.default.call,
func: func,
context: context,
args: args
};
};
var apply = exports.apply = function apply(func, context, args) {
return {
type: _keys2.default.call,
func: func,
context: context,
args: args
};
};
var cps = exports.cps = function cps(func) {
for (var _len4 = arguments.length, args = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
args[_key4 - 1] = arguments[_key4];
}
return {
type: _keys2.default.cps,
func: func,
args: args
};
};
var subscribe = exports.subscribe = function subscribe(channel) {
return {
type: _keys2.default.subscribe,
channel: channel
};
};
var createChannel = exports.createChannel = function createChannel(callback) {
var listeners = [];
var subscribe = function subscribe(l) {
listeners.push(l);
return function () {
return listeners.splice(listeners.indexOf(l), 1);
};
};
var next = function next(val) {
return listeners.forEach(function (l) {
return l(val);
});
};
callback(next);
return {
subscribe: subscribe
};
};
/***/ }),
/***/ 9681:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({
value: true
}));
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; };
var _keys = __webpack_require__(9851);
var _keys2 = _interopRequireDefault(_keys);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var is = {
obj: function obj(value) {
return (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && !!value;
},
all: function all(value) {
return is.obj(value) && value.type === _keys2.default.all;
},
error: function error(value) {
return is.obj(value) && value.type === _keys2.default.error;
},
array: Array.isArray,
func: function func(value) {
return typeof value === 'function';
},
promise: function promise(value) {
return value && is.func(value.then);
},
iterator: function iterator(value) {
return value && is.func(value.next) && is.func(value.throw);
},
fork: function fork(value) {
return is.obj(value) && value.type === _keys2.default.fork;
},
join: function join(value) {
return is.obj(value) && value.type === _keys2.default.join;
},
race: function race(value) {
return is.obj(value) && value.type === _keys2.default.race;
},
call: function call(value) {
return is.obj(value) && value.type === _keys2.default.call;
},
cps: function cps(value) {
return is.obj(value) && value.type === _keys2.default.cps;
},
subscribe: function subscribe(value) {
return is.obj(value) && value.type === _keys2.default.subscribe;
},
channel: function channel(value) {
return is.obj(value) && is.func(value.subscribe);
}
};
exports["default"] = is;
/***/ }),
/***/ 9851:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({
value: true
}));
var keys = {
all: Symbol('all'),
error: Symbol('error'),
fork: Symbol('fork'),
join: Symbol('join'),
race: Symbol('race'),
call: Symbol('call'),
cps: Symbol('cps'),
subscribe: Symbol('subscribe')
};
exports["default"] = keys;
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ !function() {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = function(exports, definition) {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ !function() {
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ }();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
!function() {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ createMiddleware; }
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/redux-routine/build-module/is-generator.js
/* eslint-disable jsdoc/valid-types */
/**
* Returns true if the given object is a generator, or false otherwise.
*
* @see https://www.ecma-international.org/ecma-262/6.0/#sec-generator-objects
*
* @param {any} object Object to test.
*
* @return {object is Generator} Whether object is a generator.
*/
function isGenerator(object) {
/* eslint-enable jsdoc/valid-types */
// Check that iterator (next) and iterable (Symbol.iterator) interfaces are satisfied.
// These checks seem to be compatible with several generator helpers as well as the native implementation.
return !!object && typeof object[Symbol.iterator] === 'function' && typeof object.next === 'function';
}
// EXTERNAL MODULE: ./node_modules/rungen/dist/index.js
var dist = __webpack_require__(2290);
;// CONCATENATED MODULE: external "lodash"
var external_lodash_namespaceObject = window["lodash"];
;// CONCATENATED MODULE: ./node_modules/is-promise/index.mjs
function isPromise(obj) {
return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/redux-routine/build-module/is-action.js
/**
* External dependencies
*/
/* eslint-disable jsdoc/valid-types */
/**
* Returns true if the given object quacks like an action.
*
* @param {any} object Object to test
*
* @return {object is import('redux').AnyAction} Whether object is an action.
*/
function isAction(object) {
return (0,external_lodash_namespaceObject.isPlainObject)(object) && (0,external_lodash_namespaceObject.isString)(object.type);
}
/**
* Returns true if the given object quacks like an action and has a specific
* action type
*
* @param {unknown} object Object to test
* @param {string} expectedType The expected type for the action.
*
* @return {object is import('redux').AnyAction} Whether object is an action and is of specific type.
*/
function isActionOfType(object, expectedType) {
/* eslint-enable jsdoc/valid-types */
return isAction(object) && object.type === expectedType;
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/redux-routine/build-module/runtime.js
/**
* External dependencies
*/
/**
* Internal dependencies
*/
/**
* Create a co-routine runtime.
*
* @param controls Object of control handlers.
* @param dispatch Unhandled action dispatch.
*/
function createRuntime() {
let controls = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
let dispatch = arguments.length > 1 ? arguments[1] : undefined;
const rungenControls = (0,external_lodash_namespaceObject.map)(controls, (control, actionType) => (value, next, iterate, yieldNext, yieldError) => {
if (!isActionOfType(value, actionType)) {
return false;
}
const routine = control(value);
if (isPromise(routine)) {
// Async control routine awaits resolution.
routine.then(yieldNext, yieldError);
} else {
yieldNext(routine);
}
return true;
});
const unhandledActionControl = (value, next) => {
if (!isAction(value)) {
return false;
}
dispatch(value);
next();
return true;
};
rungenControls.push(unhandledActionControl);
const rungenRuntime = (0,dist.create)(rungenControls);
return action => new Promise((resolve, reject) => rungenRuntime(action, result => {
if (isAction(result)) {
dispatch(result);
}
resolve(result);
}, reject));
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/redux-routine/build-module/index.js
/**
* Internal dependencies
*/
/**
* Creates a Redux middleware, given an object of controls where each key is an
* action type for which to act upon, the value a function which returns either
* a promise which is to resolve when evaluation of the action should continue,
* or a value. The value or resolved promise value is assigned on the return
* value of the yield assignment. If the control handler returns undefined, the
* execution is not continued.
*
* @param {Record<string, (value: import('redux').AnyAction) => Promise<boolean> | boolean>} controls Object of control handlers.
*
* @return {import('redux').Middleware} Co-routine runtime
*/
function createMiddleware() {
let controls = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
return store => {
const runtime = createRuntime(controls, store.dispatch);
return next => action => {
if (!isGenerator(action)) {
return next(action);
}
return runtime(action);
};
};
}
}();
(window.wp = window.wp || {}).reduxRoutine = __webpack_exports__["default"];
/******/ })()
;