this["wp"] = this["wp"] || {}; this["wp"]["blockDirectory"] = /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 563); /******/ }) /************************************************************************/ /******/ ({ /***/ 0: /***/ (function(module, exports) { (function() { module.exports = window["wp"]["element"]; }()); /***/ }), /***/ 1: /***/ (function(module, exports) { (function() { module.exports = window["wp"]["i18n"]; }()); /***/ }), /***/ 10: /***/ (function(module, exports) { (function() { module.exports = window["wp"]["compose"]; }()); /***/ }), /***/ 134: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ const blockDefault = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { d: "M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z" })); /* harmony default export */ __webpack_exports__["a"] = (blockDefault); /***/ }), /***/ 161: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ const starFilled = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { d: "M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z" })); /* harmony default export */ __webpack_exports__["a"] = (starFilled); /***/ }), /***/ 162: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ const starEmpty = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { fillRule: "evenodd", d: "M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z", clipRule: "evenodd" })); /* harmony default export */ __webpack_exports__["a"] = (starEmpty); /***/ }), /***/ 18: /***/ (function(module, exports) { (function() { module.exports = window["wp"]["coreData"]; }()); /***/ }), /***/ 2: /***/ (function(module, exports) { (function() { module.exports = window["lodash"]; }()); /***/ }), /***/ 204: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ const starHalf = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { d: "M9.518 8.783a.25.25 0 00.188-.137l2.069-4.192a.25.25 0 01.448 0l2.07 4.192a.25.25 0 00.187.137l4.626.672a.25.25 0 01.139.427l-3.347 3.262a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.363.264l-4.137-2.176a.25.25 0 00-.233 0l-4.138 2.175a.25.25 0 01-.362-.263l.79-4.607a.25.25 0 00-.072-.222L4.753 9.882a.25.25 0 01.14-.427l4.625-.672zM12 14.533c.28 0 .559.067.814.2l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39v7.143z" })); /* harmony default export */ __webpack_exports__["a"] = (starHalf); /***/ }), /***/ 21: /***/ (function(module, exports) { (function() { module.exports = window["wp"]["hooks"]; }()); /***/ }), /***/ 22: /***/ (function(module, exports) { (function() { module.exports = window["wp"]["editor"]; }()); /***/ }), /***/ 3: /***/ (function(module, exports) { (function() { module.exports = window["wp"]["primitives"]; }()); /***/ }), /***/ 30: /***/ (function(module, exports) { (function() { module.exports = window["wp"]["a11y"]; }()); /***/ }), /***/ 32: /***/ (function(module, exports) { (function() { module.exports = window["wp"]["dataControls"]; }()); /***/ }), /***/ 33: /***/ (function(module, exports) { (function() { module.exports = window["wp"]["apiFetch"]; }()); /***/ }), /***/ 36: /***/ (function(module, exports) { (function() { module.exports = window["wp"]["notices"]; }()); /***/ }), /***/ 394: /***/ (function(module, exports) { (function() { module.exports = window["wp"]["editPost"]; }()); /***/ }), /***/ 4: /***/ (function(module, exports) { (function() { module.exports = window["wp"]["components"]; }()); /***/ }), /***/ 41: /***/ (function(module, exports) { (function() { module.exports = window["wp"]["htmlEntities"]; }()); /***/ }), /***/ 5: /***/ (function(module, exports) { (function() { module.exports = window["wp"]["data"]; }()); /***/ }), /***/ 54: /***/ (function(module, exports) { (function() { module.exports = window["wp"]["plugins"]; }()); /***/ }), /***/ 563: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, "store", function() { return /* reexport */ store; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-directory/build-module/store/selectors.js var selectors_namespaceObject = {}; __webpack_require__.r(selectors_namespaceObject); __webpack_require__.d(selectors_namespaceObject, "isRequestingDownloadableBlocks", function() { return selectors_isRequestingDownloadableBlocks; }); __webpack_require__.d(selectors_namespaceObject, "getDownloadableBlocks", function() { return selectors_getDownloadableBlocks; }); __webpack_require__.d(selectors_namespaceObject, "getInstalledBlockTypes", function() { return getInstalledBlockTypes; }); __webpack_require__.d(selectors_namespaceObject, "getNewBlockTypes", function() { return getNewBlockTypes; }); __webpack_require__.d(selectors_namespaceObject, "getUnusedBlockTypes", function() { return getUnusedBlockTypes; }); __webpack_require__.d(selectors_namespaceObject, "isInstalling", function() { return selectors_isInstalling; }); __webpack_require__.d(selectors_namespaceObject, "getErrorNotices", function() { return getErrorNotices; }); __webpack_require__.d(selectors_namespaceObject, "getErrorNoticeForBlock", function() { return selectors_getErrorNoticeForBlock; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-directory/build-module/store/actions.js var actions_namespaceObject = {}; __webpack_require__.r(actions_namespaceObject); __webpack_require__.d(actions_namespaceObject, "fetchDownloadableBlocks", function() { return fetchDownloadableBlocks; }); __webpack_require__.d(actions_namespaceObject, "receiveDownloadableBlocks", function() { return receiveDownloadableBlocks; }); __webpack_require__.d(actions_namespaceObject, "installBlockType", function() { return actions_installBlockType; }); __webpack_require__.d(actions_namespaceObject, "uninstallBlockType", function() { return actions_uninstallBlockType; }); __webpack_require__.d(actions_namespaceObject, "addInstalledBlockType", function() { return addInstalledBlockType; }); __webpack_require__.d(actions_namespaceObject, "removeInstalledBlockType", function() { return removeInstalledBlockType; }); __webpack_require__.d(actions_namespaceObject, "setIsInstalling", function() { return setIsInstalling; }); __webpack_require__.d(actions_namespaceObject, "setErrorNotice", function() { return setErrorNotice; }); __webpack_require__.d(actions_namespaceObject, "clearErrorNotice", function() { return clearErrorNotice; }); // EXTERNAL MODULE: external ["wp","element"] var external_wp_element_ = __webpack_require__(0); // EXTERNAL MODULE: external ["wp","plugins"] var external_wp_plugins_ = __webpack_require__(54); // EXTERNAL MODULE: external ["wp","hooks"] var external_wp_hooks_ = __webpack_require__(21); // EXTERNAL MODULE: external ["wp","blocks"] var external_wp_blocks_ = __webpack_require__(8); // EXTERNAL MODULE: external ["wp","data"] var external_wp_data_ = __webpack_require__(5); // EXTERNAL MODULE: external ["wp","editor"] var external_wp_editor_ = __webpack_require__(22); // EXTERNAL MODULE: external ["wp","dataControls"] var external_wp_dataControls_ = __webpack_require__(32); // EXTERNAL MODULE: external "lodash" var external_lodash_ = __webpack_require__(2); // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/reducer.js /** * External dependencies */ /** * WordPress dependencies */ /** * Reducer returning an array of downloadable blocks. * * @param {Object} state Current state. * @param {Object} action Dispatched action. * * @return {Object} Updated state. */ const downloadableBlocks = (state = {}, action) => { switch (action.type) { case 'FETCH_DOWNLOADABLE_BLOCKS': return { ...state, [action.filterValue]: { isRequesting: true } }; case 'RECEIVE_DOWNLOADABLE_BLOCKS': return { ...state, [action.filterValue]: { results: action.downloadableBlocks, isRequesting: false } }; } return state; }; /** * Reducer managing the installation and deletion of blocks. * * @param {Object} state Current state. * @param {Object} action Dispatched action. * * @return {Object} Updated state. */ const blockManagement = (state = { installedBlockTypes: [], isInstalling: {} }, action) => { switch (action.type) { case 'ADD_INSTALLED_BLOCK_TYPE': return { ...state, installedBlockTypes: [...state.installedBlockTypes, action.item] }; case 'REMOVE_INSTALLED_BLOCK_TYPE': return { ...state, installedBlockTypes: state.installedBlockTypes.filter(blockType => blockType.name !== action.item.name) }; case 'SET_INSTALLING_BLOCK': return { ...state, isInstalling: { ...state.isInstalling, [action.blockId]: action.isInstalling } }; } return state; }; /** * Reducer returning an object of error notices. * * @param {Object} state Current state. * @param {Object} action Dispatched action. * * @return {Object} Updated state. */ const errorNotices = (state = {}, action) => { switch (action.type) { case 'SET_ERROR_NOTICE': return { ...state, [action.blockId]: { message: action.message, isFatal: action.isFatal } }; case 'CLEAR_ERROR_NOTICE': return Object(external_lodash_["omit"])(state, action.blockId); } return state; }; /* harmony default export */ var reducer = (Object(external_wp_data_["combineReducers"])({ downloadableBlocks, blockManagement, errorNotices })); // EXTERNAL MODULE: external ["wp","blockEditor"] var external_wp_blockEditor_ = __webpack_require__(6); // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/utils/has-block-type.js /** * Check if a block list contains a specific block type. Recursively searches * through `innerBlocks` if they exist. * * @param {Object} blockType A block object to search for. * @param {Object[]} blocks The list of blocks to look through. * * @return {boolean} Whether the blockType is found. */ function hasBlockType(blockType, blocks = []) { if (!blocks.length) { return false; } if (blocks.some(({ name }) => name === blockType.name)) { return true; } for (let i = 0; i < blocks.length; i++) { if (hasBlockType(blockType, blocks[i].innerBlocks)) { return true; } } return false; } // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/selectors.js /** * WordPress dependencies */ /** * Internal dependencies */ /** * Returns true if application is requesting for downloadable blocks. * * @param {Object} state Global application state. * @param {string} filterValue Search string. * * @return {boolean} Whether a request is in progress for the blocks list. */ function selectors_isRequestingDownloadableBlocks(state, filterValue) { if (!state.downloadableBlocks[filterValue] || !state.downloadableBlocks[filterValue].isRequesting) { return false; } return state.downloadableBlocks[filterValue].isRequesting; } /** * Returns the available uninstalled blocks. * * @param {Object} state Global application state. * @param {string} filterValue Search string. * * @return {Array} Downloadable blocks. */ function selectors_getDownloadableBlocks(state, filterValue) { if (!state.downloadableBlocks[filterValue] || !state.downloadableBlocks[filterValue].results) { return []; } return state.downloadableBlocks[filterValue].results; } /** * Returns the block types that have been installed on the server in this * session. * * @param {Object} state Global application state. * * @return {Array} Block type items */ function getInstalledBlockTypes(state) { return state.blockManagement.installedBlockTypes; } /** * Returns block types that have been installed on the server and used in the * current post. * * @param {Object} state Global application state. * * @return {Array} Block type items. */ const getNewBlockTypes = Object(external_wp_data_["createRegistrySelector"])(select => state => { const usedBlockTree = select(external_wp_blockEditor_["store"]).getBlocks(); const installedBlockTypes = getInstalledBlockTypes(state); return installedBlockTypes.filter(blockType => hasBlockType(blockType, usedBlockTree)); }); /** * Returns the block types that have been installed on the server but are not * used in the current post. * * @param {Object} state Global application state. * * @return {Array} Block type items. */ const getUnusedBlockTypes = Object(external_wp_data_["createRegistrySelector"])(select => state => { const usedBlockTree = select(external_wp_blockEditor_["store"]).getBlocks(); const installedBlockTypes = getInstalledBlockTypes(state); return installedBlockTypes.filter(blockType => !hasBlockType(blockType, usedBlockTree)); }); /** * Returns true if a block plugin install is in progress. * * @param {Object} state Global application state. * @param {string} blockId Id of the block. * * @return {boolean} Whether this block is currently being installed. */ function selectors_isInstalling(state, blockId) { return state.blockManagement.isInstalling[blockId] || false; } /** * Returns all block error notices. * * @param {Object} state Global application state. * * @return {Object} Object with error notices. */ function getErrorNotices(state) { return state.errorNotices; } /** * Returns the error notice for a given block. * * @param {Object} state Global application state. * @param {string} blockId The ID of the block plugin. eg: my-block * * @return {string|boolean} The error text, or false if no error. */ function selectors_getErrorNoticeForBlock(state, blockId) { return state.errorNotices[blockId]; } // EXTERNAL MODULE: external ["wp","i18n"] var external_wp_i18n_ = __webpack_require__(1); // EXTERNAL MODULE: external ["wp","notices"] var external_wp_notices_ = __webpack_require__(36); // EXTERNAL MODULE: external ["wp","apiFetch"] var external_wp_apiFetch_ = __webpack_require__(33); var external_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_wp_apiFetch_); // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/controls.js /** * WordPress dependencies */ /** * Load an asset for a block. * * This function returns a Promise that will resolve once the asset is loaded, * or in the case of Stylesheets and Inline JavaScript, will resolve immediately. * * @param {HTMLElement} el A HTML Element asset to inject. * * @return {Promise} Promise which will resolve when the asset is loaded. */ const loadAsset = el => { return new Promise((resolve, reject) => { /* * Reconstruct the passed element, this is required as inserting the Node directly * won't always fire the required onload events, even if the asset wasn't already loaded. */ const newNode = document.createElement(el.nodeName); ['id', 'rel', 'src', 'href', 'type'].forEach(attr => { if (el[attr]) { newNode[attr] = el[attr]; } }); // Append inline