/******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ /***/ 3533: /***/ ((module) => { "use strict"; module.exports = window["wp"]["latexToMathml"]; /***/ }), /***/ 7734: /***/ ((module) => { "use strict"; // do not edit .js files directly - edit src/index.jst var envHasBigInt64Array = typeof BigInt64Array !== 'undefined'; module.exports = function equal(a, b) { if (a === b) return true; if (a && b && typeof a == 'object' && typeof b == 'object') { if (a.constructor !== b.constructor) return false; var length, i, keys; if (Array.isArray(a)) { length = a.length; if (length != b.length) return false; for (i = length; i-- !== 0;) if (!equal(a[i], b[i])) return false; return true; } if ((a instanceof Map) && (b instanceof Map)) { if (a.size !== b.size) return false; for (i of a.entries()) if (!b.has(i[0])) return false; for (i of a.entries()) if (!equal(i[1], b.get(i[0]))) return false; return true; } if ((a instanceof Set) && (b instanceof Set)) { if (a.size !== b.size) return false; for (i of a.entries()) if (!b.has(i[0])) return false; return true; } if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) { length = a.length; if (length != b.length) return false; for (i = length; i-- !== 0;) if (a[i] !== b[i]) return false; return true; } if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags; if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf(); if (a.toString !== Object.prototype.toString) return a.toString() === b.toString(); keys = Object.keys(a); length = keys.length; if (length !== Object.keys(b).length) return false; for (i = length; i-- !== 0;) if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false; for (i = length; i-- !== 0;) { var key = keys[i]; if (!equal(a[key], b[key])) return false; } return true; } // true if both NaN, false otherwise return a!==a && b!==b; }; /***/ }), /***/ 9681: /***/ ((module) => { var characterMap = { "À": "A", "Á": "A", "Â": "A", "Ã": "A", "Ä": "A", "Å": "A", "Ấ": "A", "Ắ": "A", "Ẳ": "A", "Ẵ": "A", "Ặ": "A", "Æ": "AE", "Ầ": "A", "Ằ": "A", "Ȃ": "A", "Ả": "A", "Ạ": "A", "Ẩ": "A", "Ẫ": "A", "Ậ": "A", "Ç": "C", "Ḉ": "C", "È": "E", "É": "E", "Ê": "E", "Ë": "E", "Ế": "E", "Ḗ": "E", "Ề": "E", "Ḕ": "E", "Ḝ": "E", "Ȇ": "E", "Ẻ": "E", "Ẽ": "E", "Ẹ": "E", "Ể": "E", "Ễ": "E", "Ệ": "E", "Ì": "I", "Í": "I", "Î": "I", "Ï": "I", "Ḯ": "I", "Ȋ": "I", "Ỉ": "I", "Ị": "I", "Ð": "D", "Ñ": "N", "Ò": "O", "Ó": "O", "Ô": "O", "Õ": "O", "Ö": "O", "Ø": "O", "Ố": "O", "Ṍ": "O", "Ṓ": "O", "Ȏ": "O", "Ỏ": "O", "Ọ": "O", "Ổ": "O", "Ỗ": "O", "Ộ": "O", "Ờ": "O", "Ở": "O", "Ỡ": "O", "Ớ": "O", "Ợ": "O", "Ù": "U", "Ú": "U", "Û": "U", "Ü": "U", "Ủ": "U", "Ụ": "U", "Ử": "U", "Ữ": "U", "Ự": "U", "Ý": "Y", "à": "a", "á": "a", "â": "a", "ã": "a", "ä": "a", "å": "a", "ấ": "a", "ắ": "a", "ẳ": "a", "ẵ": "a", "ặ": "a", "æ": "ae", "ầ": "a", "ằ": "a", "ȃ": "a", "ả": "a", "ạ": "a", "ẩ": "a", "ẫ": "a", "ậ": "a", "ç": "c", "ḉ": "c", "è": "e", "é": "e", "ê": "e", "ë": "e", "ế": "e", "ḗ": "e", "ề": "e", "ḕ": "e", "ḝ": "e", "ȇ": "e", "ẻ": "e", "ẽ": "e", "ẹ": "e", "ể": "e", "ễ": "e", "ệ": "e", "ì": "i", "í": "i", "î": "i", "ï": "i", "ḯ": "i", "ȋ": "i", "ỉ": "i", "ị": "i", "ð": "d", "ñ": "n", "ò": "o", "ó": "o", "ô": "o", "õ": "o", "ö": "o", "ø": "o", "ố": "o", "ṍ": "o", "ṓ": "o", "ȏ": "o", "ỏ": "o", "ọ": "o", "ổ": "o", "ỗ": "o", "ộ": "o", "ờ": "o", "ở": "o", "ỡ": "o", "ớ": "o", "ợ": "o", "ù": "u", "ú": "u", "û": "u", "ü": "u", "ủ": "u", "ụ": "u", "ử": "u", "ữ": "u", "ự": "u", "ý": "y", "ÿ": "y", "Ā": "A", "ā": "a", "Ă": "A", "ă": "a", "Ą": "A", "ą": "a", "Ć": "C", "ć": "c", "Ĉ": "C", "ĉ": "c", "Ċ": "C", "ċ": "c", "Č": "C", "č": "c", "C̆": "C", "c̆": "c", "Ď": "D", "ď": "d", "Đ": "D", "đ": "d", "Ē": "E", "ē": "e", "Ĕ": "E", "ĕ": "e", "Ė": "E", "ė": "e", "Ę": "E", "ę": "e", "Ě": "E", "ě": "e", "Ĝ": "G", "Ǵ": "G", "ĝ": "g", "ǵ": "g", "Ğ": "G", "ğ": "g", "Ġ": "G", "ġ": "g", "Ģ": "G", "ģ": "g", "Ĥ": "H", "ĥ": "h", "Ħ": "H", "ħ": "h", "Ḫ": "H", "ḫ": "h", "Ĩ": "I", "ĩ": "i", "Ī": "I", "ī": "i", "Ĭ": "I", "ĭ": "i", "Į": "I", "į": "i", "İ": "I", "ı": "i", "IJ": "IJ", "ij": "ij", "Ĵ": "J", "ĵ": "j", "Ķ": "K", "ķ": "k", "Ḱ": "K", "ḱ": "k", "K̆": "K", "k̆": "k", "Ĺ": "L", "ĺ": "l", "Ļ": "L", "ļ": "l", "Ľ": "L", "ľ": "l", "Ŀ": "L", "ŀ": "l", "Ł": "l", "ł": "l", "Ḿ": "M", "ḿ": "m", "M̆": "M", "m̆": "m", "Ń": "N", "ń": "n", "Ņ": "N", "ņ": "n", "Ň": "N", "ň": "n", "ʼn": "n", "N̆": "N", "n̆": "n", "Ō": "O", "ō": "o", "Ŏ": "O", "ŏ": "o", "Ő": "O", "ő": "o", "Œ": "OE", "œ": "oe", "P̆": "P", "p̆": "p", "Ŕ": "R", "ŕ": "r", "Ŗ": "R", "ŗ": "r", "Ř": "R", "ř": "r", "R̆": "R", "r̆": "r", "Ȓ": "R", "ȓ": "r", "Ś": "S", "ś": "s", "Ŝ": "S", "ŝ": "s", "Ş": "S", "Ș": "S", "ș": "s", "ş": "s", "Š": "S", "š": "s", "Ţ": "T", "ţ": "t", "ț": "t", "Ț": "T", "Ť": "T", "ť": "t", "Ŧ": "T", "ŧ": "t", "T̆": "T", "t̆": "t", "Ũ": "U", "ũ": "u", "Ū": "U", "ū": "u", "Ŭ": "U", "ŭ": "u", "Ů": "U", "ů": "u", "Ű": "U", "ű": "u", "Ų": "U", "ų": "u", "Ȗ": "U", "ȗ": "u", "V̆": "V", "v̆": "v", "Ŵ": "W", "ŵ": "w", "Ẃ": "W", "ẃ": "w", "X̆": "X", "x̆": "x", "Ŷ": "Y", "ŷ": "y", "Ÿ": "Y", "Y̆": "Y", "y̆": "y", "Ź": "Z", "ź": "z", "Ż": "Z", "ż": "z", "Ž": "Z", "ž": "z", "ſ": "s", "ƒ": "f", "Ơ": "O", "ơ": "o", "Ư": "U", "ư": "u", "Ǎ": "A", "ǎ": "a", "Ǐ": "I", "ǐ": "i", "Ǒ": "O", "ǒ": "o", "Ǔ": "U", "ǔ": "u", "Ǖ": "U", "ǖ": "u", "Ǘ": "U", "ǘ": "u", "Ǚ": "U", "ǚ": "u", "Ǜ": "U", "ǜ": "u", "Ứ": "U", "ứ": "u", "Ṹ": "U", "ṹ": "u", "Ǻ": "A", "ǻ": "a", "Ǽ": "AE", "ǽ": "ae", "Ǿ": "O", "ǿ": "o", "Þ": "TH", "þ": "th", "Ṕ": "P", "ṕ": "p", "Ṥ": "S", "ṥ": "s", "X́": "X", "x́": "x", "Ѓ": "Г", "ѓ": "г", "Ќ": "К", "ќ": "к", "A̋": "A", "a̋": "a", "E̋": "E", "e̋": "e", "I̋": "I", "i̋": "i", "Ǹ": "N", "ǹ": "n", "Ồ": "O", "ồ": "o", "Ṑ": "O", "ṑ": "o", "Ừ": "U", "ừ": "u", "Ẁ": "W", "ẁ": "w", "Ỳ": "Y", "ỳ": "y", "Ȁ": "A", "ȁ": "a", "Ȅ": "E", "ȅ": "e", "Ȉ": "I", "ȉ": "i", "Ȍ": "O", "ȍ": "o", "Ȑ": "R", "ȑ": "r", "Ȕ": "U", "ȕ": "u", "B̌": "B", "b̌": "b", "Č̣": "C", "č̣": "c", "Ê̌": "E", "ê̌": "e", "F̌": "F", "f̌": "f", "Ǧ": "G", "ǧ": "g", "Ȟ": "H", "ȟ": "h", "J̌": "J", "ǰ": "j", "Ǩ": "K", "ǩ": "k", "M̌": "M", "m̌": "m", "P̌": "P", "p̌": "p", "Q̌": "Q", "q̌": "q", "Ř̩": "R", "ř̩": "r", "Ṧ": "S", "ṧ": "s", "V̌": "V", "v̌": "v", "W̌": "W", "w̌": "w", "X̌": "X", "x̌": "x", "Y̌": "Y", "y̌": "y", "A̧": "A", "a̧": "a", "B̧": "B", "b̧": "b", "Ḑ": "D", "ḑ": "d", "Ȩ": "E", "ȩ": "e", "Ɛ̧": "E", "ɛ̧": "e", "Ḩ": "H", "ḩ": "h", "I̧": "I", "i̧": "i", "Ɨ̧": "I", "ɨ̧": "i", "M̧": "M", "m̧": "m", "O̧": "O", "o̧": "o", "Q̧": "Q", "q̧": "q", "U̧": "U", "u̧": "u", "X̧": "X", "x̧": "x", "Z̧": "Z", "z̧": "z", "й":"и", "Й":"И", "ё":"е", "Ё":"Е", }; var chars = Object.keys(characterMap).join('|'); var allAccents = new RegExp(chars, 'g'); var firstAccent = new RegExp(chars, ''); function matcher(match) { return characterMap[match]; } var removeAccents = function(string) { return string.replace(allAccents, matcher); }; var hasAccents = function(string) { return !!string.match(firstAccent); }; module.exports = removeAccents; module.exports.has = hasAccents; module.exports.remove = removeAccents; /***/ }) /******/ }); /************************************************************************/ /******/ // 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/compat get default export */ /******/ (() => { /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = (module) => { /******/ var getter = module && module.__esModule ? /******/ () => (module['default']) : /******/ () => (module); /******/ __webpack_require__.d(getter, { a: getter }); /******/ return getter; /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/create fake namespace object */ /******/ (() => { /******/ var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__); /******/ var leafPrototypes; /******/ // 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 & 16: return value when it's Promise-like /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = this(value); /******/ if(mode & 8) return value; /******/ if(typeof value === 'object' && value) { /******/ if((mode & 4) && value.__esModule) return value; /******/ if((mode & 16) && typeof value.then === 'function') return value; /******/ } /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ var def = {}; /******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)]; /******/ for(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) { /******/ Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key]))); /******/ } /******/ def['default'] = () => (value); /******/ __webpack_require__.d(ns, def); /******/ return ns; /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/define property getters */ /******/ (() => { /******/ // define getter functions for harmony exports /******/ __webpack_require__.d = (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 */ /******/ (() => { /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) /******/ })(); /******/ /******/ /* webpack/runtime/make namespace object */ /******/ (() => { /******/ // define __esModule on exports /******/ __webpack_require__.r = (exports) => { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ })(); /******/ /************************************************************************/ var __webpack_exports__ = {}; // This entry needs to be wrapped in an IIFE because it needs to be in strict mode. (() => { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { __experimentalGetCoreBlocks: () => (/* binding */ __experimentalGetCoreBlocks), __experimentalRegisterExperimentalCoreBlocks: () => (/* binding */ __experimentalRegisterExperimentalCoreBlocks), privateApis: () => (/* reexport */ privateApis), registerCoreBlocks: () => (/* binding */ registerCoreBlocks) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/accordion/index.js var accordion_namespaceObject = {}; __webpack_require__.r(accordion_namespaceObject); __webpack_require__.d(accordion_namespaceObject, { init: () => (init), metadata: () => (block_namespaceObject), name: () => (accordion_name), settings: () => (settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/accordion-item/index.js var accordion_item_namespaceObject = {}; __webpack_require__.r(accordion_item_namespaceObject); __webpack_require__.d(accordion_item_namespaceObject, { init: () => (accordion_item_init), metadata: () => (accordion_item_block_namespaceObject), name: () => (accordion_item_name), settings: () => (accordion_item_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/accordion-heading/index.js var accordion_heading_namespaceObject = {}; __webpack_require__.r(accordion_heading_namespaceObject); __webpack_require__.d(accordion_heading_namespaceObject, { init: () => (accordion_heading_init), metadata: () => (accordion_heading_block_namespaceObject), name: () => (accordion_heading_name), settings: () => (accordion_heading_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/accordion-panel/index.js var accordion_panel_namespaceObject = {}; __webpack_require__.r(accordion_panel_namespaceObject); __webpack_require__.d(accordion_panel_namespaceObject, { init: () => (accordion_panel_init), metadata: () => (accordion_panel_block_namespaceObject), name: () => (accordion_panel_name), settings: () => (accordion_panel_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/archives/index.js var archives_namespaceObject = {}; __webpack_require__.r(archives_namespaceObject); __webpack_require__.d(archives_namespaceObject, { init: () => (archives_init), metadata: () => (archives_block_namespaceObject), name: () => (archives_name), settings: () => (archives_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/avatar/index.js var avatar_namespaceObject = {}; __webpack_require__.r(avatar_namespaceObject); __webpack_require__.d(avatar_namespaceObject, { init: () => (avatar_init), metadata: () => (avatar_block_namespaceObject), name: () => (avatar_name), settings: () => (avatar_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/audio/index.js var build_module_audio_namespaceObject = {}; __webpack_require__.r(build_module_audio_namespaceObject); __webpack_require__.d(build_module_audio_namespaceObject, { init: () => (audio_init), metadata: () => (audio_block_namespaceObject), name: () => (audio_name), settings: () => (audio_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/breadcrumbs/index.js var build_module_breadcrumbs_namespaceObject = {}; __webpack_require__.r(build_module_breadcrumbs_namespaceObject); __webpack_require__.d(build_module_breadcrumbs_namespaceObject, { init: () => (breadcrumbs_init), metadata: () => (breadcrumbs_block_namespaceObject), name: () => (breadcrumbs_name), settings: () => (breadcrumbs_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/button/index.js var build_module_button_namespaceObject = {}; __webpack_require__.r(build_module_button_namespaceObject); __webpack_require__.d(build_module_button_namespaceObject, { init: () => (button_init), metadata: () => (button_block_namespaceObject), name: () => (button_name), settings: () => (button_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/buttons/index.js var build_module_buttons_namespaceObject = {}; __webpack_require__.r(build_module_buttons_namespaceObject); __webpack_require__.d(build_module_buttons_namespaceObject, { init: () => (buttons_init), metadata: () => (buttons_block_namespaceObject), name: () => (buttons_name), settings: () => (buttons_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/calendar/index.js var build_module_calendar_namespaceObject = {}; __webpack_require__.r(build_module_calendar_namespaceObject); __webpack_require__.d(build_module_calendar_namespaceObject, { init: () => (calendar_init), metadata: () => (calendar_block_namespaceObject), name: () => (calendar_name), settings: () => (calendar_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/categories/index.js var categories_namespaceObject = {}; __webpack_require__.r(categories_namespaceObject); __webpack_require__.d(categories_namespaceObject, { init: () => (categories_init), metadata: () => (categories_block_namespaceObject), name: () => (categories_name), settings: () => (categories_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/freeform/index.js var freeform_namespaceObject = {}; __webpack_require__.r(freeform_namespaceObject); __webpack_require__.d(freeform_namespaceObject, { init: () => (freeform_init), metadata: () => (freeform_block_namespaceObject), name: () => (freeform_name), settings: () => (freeform_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/code/index.js var build_module_code_namespaceObject = {}; __webpack_require__.r(build_module_code_namespaceObject); __webpack_require__.d(build_module_code_namespaceObject, { init: () => (code_init), metadata: () => (code_block_namespaceObject), name: () => (code_name), settings: () => (code_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/column/index.js var build_module_column_namespaceObject = {}; __webpack_require__.r(build_module_column_namespaceObject); __webpack_require__.d(build_module_column_namespaceObject, { init: () => (column_init), metadata: () => (column_block_namespaceObject), name: () => (column_name), settings: () => (column_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/columns/index.js var build_module_columns_namespaceObject = {}; __webpack_require__.r(build_module_columns_namespaceObject); __webpack_require__.d(build_module_columns_namespaceObject, { init: () => (columns_init), metadata: () => (columns_block_namespaceObject), name: () => (columns_name), settings: () => (columns_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comments/index.js var comments_namespaceObject = {}; __webpack_require__.r(comments_namespaceObject); __webpack_require__.d(comments_namespaceObject, { init: () => (comments_init), metadata: () => (comments_block_namespaceObject), name: () => (comments_name), settings: () => (comments_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comment-author-avatar/index.js var build_module_comment_author_avatar_namespaceObject = {}; __webpack_require__.r(build_module_comment_author_avatar_namespaceObject); __webpack_require__.d(build_module_comment_author_avatar_namespaceObject, { init: () => (comment_author_avatar_init), metadata: () => (comment_author_avatar_block_namespaceObject), name: () => (comment_author_avatar_name), settings: () => (comment_author_avatar_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comment-author-name/index.js var build_module_comment_author_name_namespaceObject = {}; __webpack_require__.r(build_module_comment_author_name_namespaceObject); __webpack_require__.d(build_module_comment_author_name_namespaceObject, { init: () => (comment_author_name_init), metadata: () => (comment_author_name_block_namespaceObject), name: () => (comment_author_name_name), settings: () => (comment_author_name_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comment-content/index.js var build_module_comment_content_namespaceObject = {}; __webpack_require__.r(build_module_comment_content_namespaceObject); __webpack_require__.d(build_module_comment_content_namespaceObject, { init: () => (comment_content_init), metadata: () => (comment_content_block_namespaceObject), name: () => (comment_content_name), settings: () => (comment_content_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comment-date/index.js var comment_date_namespaceObject = {}; __webpack_require__.r(comment_date_namespaceObject); __webpack_require__.d(comment_date_namespaceObject, { init: () => (comment_date_init), metadata: () => (comment_date_block_namespaceObject), name: () => (comment_date_name), settings: () => (comment_date_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comment-edit-link/index.js var build_module_comment_edit_link_namespaceObject = {}; __webpack_require__.r(build_module_comment_edit_link_namespaceObject); __webpack_require__.d(build_module_comment_edit_link_namespaceObject, { init: () => (comment_edit_link_init), metadata: () => (comment_edit_link_block_namespaceObject), name: () => (comment_edit_link_name), settings: () => (comment_edit_link_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comment-reply-link/index.js var build_module_comment_reply_link_namespaceObject = {}; __webpack_require__.r(build_module_comment_reply_link_namespaceObject); __webpack_require__.d(build_module_comment_reply_link_namespaceObject, { init: () => (comment_reply_link_init), metadata: () => (comment_reply_link_block_namespaceObject), name: () => (comment_reply_link_name), settings: () => (comment_reply_link_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comment-template/index.js var comment_template_namespaceObject = {}; __webpack_require__.r(comment_template_namespaceObject); __webpack_require__.d(comment_template_namespaceObject, { init: () => (comment_template_init), metadata: () => (comment_template_block_namespaceObject), name: () => (comment_template_name), settings: () => (comment_template_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comments-pagination-previous/index.js var comments_pagination_previous_namespaceObject = {}; __webpack_require__.r(comments_pagination_previous_namespaceObject); __webpack_require__.d(comments_pagination_previous_namespaceObject, { init: () => (comments_pagination_previous_init), metadata: () => (comments_pagination_previous_block_namespaceObject), name: () => (comments_pagination_previous_name), settings: () => (comments_pagination_previous_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comments-pagination/index.js var comments_pagination_namespaceObject = {}; __webpack_require__.r(comments_pagination_namespaceObject); __webpack_require__.d(comments_pagination_namespaceObject, { init: () => (comments_pagination_init), metadata: () => (comments_pagination_block_namespaceObject), name: () => (comments_pagination_name), settings: () => (comments_pagination_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comments-pagination-next/index.js var comments_pagination_next_namespaceObject = {}; __webpack_require__.r(comments_pagination_next_namespaceObject); __webpack_require__.d(comments_pagination_next_namespaceObject, { init: () => (comments_pagination_next_init), metadata: () => (comments_pagination_next_block_namespaceObject), name: () => (comments_pagination_next_name), settings: () => (comments_pagination_next_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comments-pagination-numbers/index.js var comments_pagination_numbers_namespaceObject = {}; __webpack_require__.r(comments_pagination_numbers_namespaceObject); __webpack_require__.d(comments_pagination_numbers_namespaceObject, { init: () => (comments_pagination_numbers_init), metadata: () => (comments_pagination_numbers_block_namespaceObject), name: () => (comments_pagination_numbers_name), settings: () => (comments_pagination_numbers_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comments-title/index.js var comments_title_namespaceObject = {}; __webpack_require__.r(comments_title_namespaceObject); __webpack_require__.d(comments_title_namespaceObject, { init: () => (comments_title_init), metadata: () => (comments_title_block_namespaceObject), name: () => (comments_title_name), settings: () => (comments_title_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/cover/index.js var build_module_cover_namespaceObject = {}; __webpack_require__.r(build_module_cover_namespaceObject); __webpack_require__.d(build_module_cover_namespaceObject, { init: () => (cover_init), metadata: () => (cover_block_namespaceObject), name: () => (cover_name), settings: () => (cover_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/details/index.js var build_module_details_namespaceObject = {}; __webpack_require__.r(build_module_details_namespaceObject); __webpack_require__.d(build_module_details_namespaceObject, { init: () => (details_init), metadata: () => (details_block_namespaceObject), name: () => (details_name), settings: () => (details_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/embed/index.js var embed_namespaceObject = {}; __webpack_require__.r(embed_namespaceObject); __webpack_require__.d(embed_namespaceObject, { init: () => (embed_init), metadata: () => (embed_block_namespaceObject), name: () => (embed_name), settings: () => (embed_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/file/index.js var build_module_file_namespaceObject = {}; __webpack_require__.r(build_module_file_namespaceObject); __webpack_require__.d(build_module_file_namespaceObject, { init: () => (file_init), metadata: () => (file_block_namespaceObject), name: () => (file_name), settings: () => (file_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/form/index.js var build_module_form_namespaceObject = {}; __webpack_require__.r(build_module_form_namespaceObject); __webpack_require__.d(build_module_form_namespaceObject, { init: () => (form_init), metadata: () => (form_block_namespaceObject), name: () => (form_name), settings: () => (form_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/form-input/index.js var form_input_namespaceObject = {}; __webpack_require__.r(form_input_namespaceObject); __webpack_require__.d(form_input_namespaceObject, { init: () => (form_input_init), metadata: () => (form_input_block_namespaceObject), name: () => (form_input_name), settings: () => (form_input_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/form-submit-button/index.js var form_submit_button_namespaceObject = {}; __webpack_require__.r(form_submit_button_namespaceObject); __webpack_require__.d(form_submit_button_namespaceObject, { init: () => (form_submit_button_init), metadata: () => (form_submit_button_block_namespaceObject), name: () => (form_submit_button_name), settings: () => (form_submit_button_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/form-submission-notification/index.js var form_submission_notification_namespaceObject = {}; __webpack_require__.r(form_submission_notification_namespaceObject); __webpack_require__.d(form_submission_notification_namespaceObject, { init: () => (form_submission_notification_init), metadata: () => (form_submission_notification_block_namespaceObject), name: () => (form_submission_notification_name), settings: () => (form_submission_notification_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/gallery/index.js var build_module_gallery_namespaceObject = {}; __webpack_require__.r(build_module_gallery_namespaceObject); __webpack_require__.d(build_module_gallery_namespaceObject, { init: () => (gallery_init), metadata: () => (gallery_block_namespaceObject), name: () => (gallery_name), settings: () => (gallery_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/group/index.js var build_module_group_namespaceObject = {}; __webpack_require__.r(build_module_group_namespaceObject); __webpack_require__.d(build_module_group_namespaceObject, { init: () => (group_init), metadata: () => (group_block_namespaceObject), name: () => (group_name), settings: () => (group_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/heading/index.js var build_module_heading_namespaceObject = {}; __webpack_require__.r(build_module_heading_namespaceObject); __webpack_require__.d(build_module_heading_namespaceObject, { init: () => (heading_init), metadata: () => (heading_block_namespaceObject), name: () => (heading_name), settings: () => (heading_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/home-link/index.js var home_link_namespaceObject = {}; __webpack_require__.r(home_link_namespaceObject); __webpack_require__.d(home_link_namespaceObject, { init: () => (home_link_init), metadata: () => (home_link_block_namespaceObject), name: () => (home_link_name), settings: () => (home_link_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/html/index.js var build_module_html_namespaceObject = {}; __webpack_require__.r(build_module_html_namespaceObject); __webpack_require__.d(build_module_html_namespaceObject, { init: () => (html_init), metadata: () => (html_block_namespaceObject), name: () => (html_name), settings: () => (html_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/image/index.js var build_module_image_namespaceObject = {}; __webpack_require__.r(build_module_image_namespaceObject); __webpack_require__.d(build_module_image_namespaceObject, { init: () => (image_init), metadata: () => (image_block_namespaceObject), name: () => (image_name), settings: () => (image_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/latest-comments/index.js var latest_comments_namespaceObject = {}; __webpack_require__.r(latest_comments_namespaceObject); __webpack_require__.d(latest_comments_namespaceObject, { init: () => (latest_comments_init), metadata: () => (latest_comments_block_namespaceObject), name: () => (latest_comments_name), settings: () => (latest_comments_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/latest-posts/index.js var latest_posts_namespaceObject = {}; __webpack_require__.r(latest_posts_namespaceObject); __webpack_require__.d(latest_posts_namespaceObject, { init: () => (latest_posts_init), metadata: () => (latest_posts_block_namespaceObject), name: () => (latest_posts_name), settings: () => (latest_posts_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/list/index.js var build_module_list_namespaceObject = {}; __webpack_require__.r(build_module_list_namespaceObject); __webpack_require__.d(build_module_list_namespaceObject, { init: () => (list_init), metadata: () => (list_block_namespaceObject), name: () => (list_name), settings: () => (list_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/math/index.js var build_module_math_namespaceObject = {}; __webpack_require__.r(build_module_math_namespaceObject); __webpack_require__.d(build_module_math_namespaceObject, { init: () => (math_init), metadata: () => (math_block_namespaceObject), name: () => (math_name), settings: () => (math_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/list-item/index.js var build_module_list_item_namespaceObject = {}; __webpack_require__.r(build_module_list_item_namespaceObject); __webpack_require__.d(build_module_list_item_namespaceObject, { init: () => (list_item_init), metadata: () => (list_item_block_namespaceObject), name: () => (list_item_name), settings: () => (list_item_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/loginout/index.js var loginout_namespaceObject = {}; __webpack_require__.r(loginout_namespaceObject); __webpack_require__.d(loginout_namespaceObject, { init: () => (loginout_init), metadata: () => (loginout_block_namespaceObject), name: () => (loginout_name), settings: () => (loginout_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/media-text/index.js var media_text_namespaceObject = {}; __webpack_require__.r(media_text_namespaceObject); __webpack_require__.d(media_text_namespaceObject, { init: () => (media_text_init), metadata: () => (media_text_block_namespaceObject), name: () => (media_text_name), settings: () => (media_text_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/missing/index.js var missing_namespaceObject = {}; __webpack_require__.r(missing_namespaceObject); __webpack_require__.d(missing_namespaceObject, { init: () => (missing_init), metadata: () => (missing_block_namespaceObject), name: () => (missing_name), settings: () => (missing_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/more/index.js var build_module_more_namespaceObject = {}; __webpack_require__.r(build_module_more_namespaceObject); __webpack_require__.d(build_module_more_namespaceObject, { init: () => (more_init), metadata: () => (more_block_namespaceObject), name: () => (more_name), settings: () => (more_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/navigation/index.js var build_module_navigation_namespaceObject = {}; __webpack_require__.r(build_module_navigation_namespaceObject); __webpack_require__.d(build_module_navigation_namespaceObject, { init: () => (navigation_init), metadata: () => (navigation_block_namespaceObject), name: () => (navigation_name), settings: () => (navigation_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/navigation-link/index.js var navigation_link_namespaceObject = {}; __webpack_require__.r(navigation_link_namespaceObject); __webpack_require__.d(navigation_link_namespaceObject, { init: () => (navigation_link_init), metadata: () => (navigation_link_block_namespaceObject), name: () => (navigation_link_name), settings: () => (navigation_link_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/navigation-submenu/index.js var navigation_submenu_namespaceObject = {}; __webpack_require__.r(navigation_submenu_namespaceObject); __webpack_require__.d(navigation_submenu_namespaceObject, { init: () => (navigation_submenu_init), metadata: () => (navigation_submenu_block_namespaceObject), name: () => (navigation_submenu_name), settings: () => (navigation_submenu_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/nextpage/index.js var nextpage_namespaceObject = {}; __webpack_require__.r(nextpage_namespaceObject); __webpack_require__.d(nextpage_namespaceObject, { init: () => (nextpage_init), metadata: () => (nextpage_block_namespaceObject), name: () => (nextpage_name), settings: () => (nextpage_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/pattern/index.js var pattern_namespaceObject = {}; __webpack_require__.r(pattern_namespaceObject); __webpack_require__.d(pattern_namespaceObject, { init: () => (pattern_init), metadata: () => (pattern_block_namespaceObject), name: () => (pattern_name), settings: () => (pattern_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/page-list/index.js var page_list_namespaceObject = {}; __webpack_require__.r(page_list_namespaceObject); __webpack_require__.d(page_list_namespaceObject, { init: () => (page_list_init), metadata: () => (page_list_block_namespaceObject), name: () => (page_list_name), settings: () => (page_list_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/page-list-item/index.js var page_list_item_namespaceObject = {}; __webpack_require__.r(page_list_item_namespaceObject); __webpack_require__.d(page_list_item_namespaceObject, { init: () => (page_list_item_init), metadata: () => (page_list_item_block_namespaceObject), name: () => (page_list_item_name), settings: () => (page_list_item_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/paragraph/index.js var build_module_paragraph_namespaceObject = {}; __webpack_require__.r(build_module_paragraph_namespaceObject); __webpack_require__.d(build_module_paragraph_namespaceObject, { init: () => (paragraph_init), metadata: () => (paragraph_block_namespaceObject), name: () => (paragraph_name), settings: () => (paragraph_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-author/index.js var build_module_post_author_namespaceObject = {}; __webpack_require__.r(build_module_post_author_namespaceObject); __webpack_require__.d(build_module_post_author_namespaceObject, { init: () => (post_author_init), metadata: () => (post_author_block_namespaceObject), name: () => (post_author_name), settings: () => (post_author_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-author-name/index.js var post_author_name_namespaceObject = {}; __webpack_require__.r(post_author_name_namespaceObject); __webpack_require__.d(post_author_name_namespaceObject, { init: () => (post_author_name_init), metadata: () => (post_author_name_block_namespaceObject), name: () => (post_author_name_name), settings: () => (post_author_name_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-author-biography/index.js var post_author_biography_namespaceObject = {}; __webpack_require__.r(post_author_biography_namespaceObject); __webpack_require__.d(post_author_biography_namespaceObject, { init: () => (post_author_biography_init), metadata: () => (post_author_biography_block_namespaceObject), name: () => (post_author_biography_name), settings: () => (post_author_biography_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-comment/index.js var post_comment_namespaceObject = {}; __webpack_require__.r(post_comment_namespaceObject); __webpack_require__.d(post_comment_namespaceObject, { init: () => (post_comment_init), metadata: () => (post_comment_block_namespaceObject), name: () => (post_comment_name), settings: () => (post_comment_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-comments-count/index.js var build_module_post_comments_count_namespaceObject = {}; __webpack_require__.r(build_module_post_comments_count_namespaceObject); __webpack_require__.d(build_module_post_comments_count_namespaceObject, { init: () => (post_comments_count_init), metadata: () => (post_comments_count_block_namespaceObject), name: () => (post_comments_count_name), settings: () => (post_comments_count_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-comments-form/index.js var build_module_post_comments_form_namespaceObject = {}; __webpack_require__.r(build_module_post_comments_form_namespaceObject); __webpack_require__.d(build_module_post_comments_form_namespaceObject, { init: () => (post_comments_form_init), metadata: () => (post_comments_form_block_namespaceObject), name: () => (post_comments_form_name), settings: () => (post_comments_form_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-comments-link/index.js var post_comments_link_namespaceObject = {}; __webpack_require__.r(post_comments_link_namespaceObject); __webpack_require__.d(post_comments_link_namespaceObject, { init: () => (post_comments_link_init), metadata: () => (post_comments_link_block_namespaceObject), name: () => (post_comments_link_name), settings: () => (post_comments_link_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-content/index.js var build_module_post_content_namespaceObject = {}; __webpack_require__.r(build_module_post_content_namespaceObject); __webpack_require__.d(build_module_post_content_namespaceObject, { init: () => (post_content_init), metadata: () => (post_content_block_namespaceObject), name: () => (post_content_name), settings: () => (post_content_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-date/index.js var build_module_post_date_namespaceObject = {}; __webpack_require__.r(build_module_post_date_namespaceObject); __webpack_require__.d(build_module_post_date_namespaceObject, { init: () => (post_date_init), metadata: () => (post_date_block_namespaceObject), name: () => (post_date_name), settings: () => (post_date_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-excerpt/index.js var build_module_post_excerpt_namespaceObject = {}; __webpack_require__.r(build_module_post_excerpt_namespaceObject); __webpack_require__.d(build_module_post_excerpt_namespaceObject, { init: () => (post_excerpt_init), metadata: () => (post_excerpt_block_namespaceObject), name: () => (post_excerpt_name), settings: () => (post_excerpt_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-featured-image/index.js var build_module_post_featured_image_namespaceObject = {}; __webpack_require__.r(build_module_post_featured_image_namespaceObject); __webpack_require__.d(build_module_post_featured_image_namespaceObject, { init: () => (post_featured_image_init), metadata: () => (post_featured_image_block_namespaceObject), name: () => (post_featured_image_name), settings: () => (post_featured_image_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-navigation-link/index.js var post_navigation_link_namespaceObject = {}; __webpack_require__.r(post_navigation_link_namespaceObject); __webpack_require__.d(post_navigation_link_namespaceObject, { init: () => (post_navigation_link_init), metadata: () => (post_navigation_link_block_namespaceObject), name: () => (post_navigation_link_name), settings: () => (post_navigation_link_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-template/index.js var post_template_namespaceObject = {}; __webpack_require__.r(post_template_namespaceObject); __webpack_require__.d(post_template_namespaceObject, { init: () => (post_template_init), metadata: () => (post_template_block_namespaceObject), name: () => (post_template_name), settings: () => (post_template_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-terms/index.js var build_module_post_terms_namespaceObject = {}; __webpack_require__.r(build_module_post_terms_namespaceObject); __webpack_require__.d(build_module_post_terms_namespaceObject, { init: () => (post_terms_init), metadata: () => (post_terms_block_namespaceObject), name: () => (post_terms_name), settings: () => (post_terms_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-time-to-read/index.js var post_time_to_read_namespaceObject = {}; __webpack_require__.r(post_time_to_read_namespaceObject); __webpack_require__.d(post_time_to_read_namespaceObject, { init: () => (post_time_to_read_init), metadata: () => (post_time_to_read_block_namespaceObject), name: () => (post_time_to_read_name), settings: () => (post_time_to_read_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-title/index.js var post_title_namespaceObject = {}; __webpack_require__.r(post_title_namespaceObject); __webpack_require__.d(post_title_namespaceObject, { init: () => (post_title_init), metadata: () => (post_title_block_namespaceObject), name: () => (post_title_name), settings: () => (post_title_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/preformatted/index.js var build_module_preformatted_namespaceObject = {}; __webpack_require__.r(build_module_preformatted_namespaceObject); __webpack_require__.d(build_module_preformatted_namespaceObject, { init: () => (preformatted_init), metadata: () => (preformatted_block_namespaceObject), name: () => (preformatted_name), settings: () => (preformatted_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/pullquote/index.js var build_module_pullquote_namespaceObject = {}; __webpack_require__.r(build_module_pullquote_namespaceObject); __webpack_require__.d(build_module_pullquote_namespaceObject, { init: () => (pullquote_init), metadata: () => (pullquote_block_namespaceObject), name: () => (pullquote_name), settings: () => (pullquote_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query/index.js var query_namespaceObject = {}; __webpack_require__.r(query_namespaceObject); __webpack_require__.d(query_namespaceObject, { init: () => (query_init), metadata: () => (query_block_namespaceObject), name: () => (query_name), settings: () => (query_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-no-results/index.js var query_no_results_namespaceObject = {}; __webpack_require__.r(query_no_results_namespaceObject); __webpack_require__.d(query_no_results_namespaceObject, { init: () => (query_no_results_init), metadata: () => (query_no_results_block_namespaceObject), name: () => (query_no_results_name), settings: () => (query_no_results_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-pagination/index.js var build_module_query_pagination_namespaceObject = {}; __webpack_require__.r(build_module_query_pagination_namespaceObject); __webpack_require__.d(build_module_query_pagination_namespaceObject, { init: () => (query_pagination_init), metadata: () => (query_pagination_block_namespaceObject), name: () => (query_pagination_name), settings: () => (query_pagination_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-pagination-next/index.js var build_module_query_pagination_next_namespaceObject = {}; __webpack_require__.r(build_module_query_pagination_next_namespaceObject); __webpack_require__.d(build_module_query_pagination_next_namespaceObject, { init: () => (query_pagination_next_init), metadata: () => (query_pagination_next_block_namespaceObject), name: () => (query_pagination_next_name), settings: () => (query_pagination_next_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-pagination-numbers/index.js var build_module_query_pagination_numbers_namespaceObject = {}; __webpack_require__.r(build_module_query_pagination_numbers_namespaceObject); __webpack_require__.d(build_module_query_pagination_numbers_namespaceObject, { init: () => (query_pagination_numbers_init), metadata: () => (query_pagination_numbers_block_namespaceObject), name: () => (query_pagination_numbers_name), settings: () => (query_pagination_numbers_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-pagination-previous/index.js var build_module_query_pagination_previous_namespaceObject = {}; __webpack_require__.r(build_module_query_pagination_previous_namespaceObject); __webpack_require__.d(build_module_query_pagination_previous_namespaceObject, { init: () => (query_pagination_previous_init), metadata: () => (query_pagination_previous_block_namespaceObject), name: () => (query_pagination_previous_name), settings: () => (query_pagination_previous_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-title/index.js var query_title_namespaceObject = {}; __webpack_require__.r(query_title_namespaceObject); __webpack_require__.d(query_title_namespaceObject, { init: () => (query_title_init), metadata: () => (query_title_block_namespaceObject), name: () => (query_title_name), settings: () => (query_title_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-total/index.js var query_total_namespaceObject = {}; __webpack_require__.r(query_total_namespaceObject); __webpack_require__.d(query_total_namespaceObject, { init: () => (query_total_init), metadata: () => (query_total_block_namespaceObject), name: () => (query_total_name), settings: () => (query_total_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/quote/index.js var build_module_quote_namespaceObject = {}; __webpack_require__.r(build_module_quote_namespaceObject); __webpack_require__.d(build_module_quote_namespaceObject, { init: () => (quote_init), metadata: () => (quote_block_namespaceObject), name: () => (quote_name), settings: () => (quote_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/block/index.js var build_module_block_namespaceObject = {}; __webpack_require__.r(build_module_block_namespaceObject); __webpack_require__.d(build_module_block_namespaceObject, { init: () => (block_init), metadata: () => (block_block_namespaceObject), name: () => (block_name), settings: () => (block_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/read-more/index.js var read_more_namespaceObject = {}; __webpack_require__.r(read_more_namespaceObject); __webpack_require__.d(read_more_namespaceObject, { init: () => (read_more_init), metadata: () => (read_more_block_namespaceObject), name: () => (read_more_name), settings: () => (read_more_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/rss/index.js var build_module_rss_namespaceObject = {}; __webpack_require__.r(build_module_rss_namespaceObject); __webpack_require__.d(build_module_rss_namespaceObject, { init: () => (rss_init), metadata: () => (rss_block_namespaceObject), name: () => (rss_name), settings: () => (rss_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/search/index.js var build_module_search_namespaceObject = {}; __webpack_require__.r(build_module_search_namespaceObject); __webpack_require__.d(build_module_search_namespaceObject, { init: () => (search_init), metadata: () => (search_block_namespaceObject), name: () => (search_name), settings: () => (search_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/separator/index.js var build_module_separator_namespaceObject = {}; __webpack_require__.r(build_module_separator_namespaceObject); __webpack_require__.d(build_module_separator_namespaceObject, { init: () => (separator_init), metadata: () => (separator_block_namespaceObject), name: () => (separator_name), settings: () => (separator_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/shortcode/index.js var build_module_shortcode_namespaceObject = {}; __webpack_require__.r(build_module_shortcode_namespaceObject); __webpack_require__.d(build_module_shortcode_namespaceObject, { init: () => (shortcode_init), metadata: () => (shortcode_block_namespaceObject), name: () => (shortcode_name), settings: () => (shortcode_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/site-logo/index.js var build_module_site_logo_namespaceObject = {}; __webpack_require__.r(build_module_site_logo_namespaceObject); __webpack_require__.d(build_module_site_logo_namespaceObject, { init: () => (site_logo_init), metadata: () => (site_logo_block_namespaceObject), name: () => (site_logo_name), settings: () => (site_logo_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/site-tagline/index.js var site_tagline_namespaceObject = {}; __webpack_require__.r(site_tagline_namespaceObject); __webpack_require__.d(site_tagline_namespaceObject, { init: () => (site_tagline_init), metadata: () => (site_tagline_block_namespaceObject), name: () => (site_tagline_name), settings: () => (site_tagline_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/site-title/index.js var site_title_namespaceObject = {}; __webpack_require__.r(site_title_namespaceObject); __webpack_require__.d(site_title_namespaceObject, { init: () => (site_title_init), metadata: () => (site_title_block_namespaceObject), name: () => (site_title_name), settings: () => (site_title_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/social-link/index.js var social_link_namespaceObject = {}; __webpack_require__.r(social_link_namespaceObject); __webpack_require__.d(social_link_namespaceObject, { init: () => (social_link_init), metadata: () => (social_link_block_namespaceObject), name: () => (social_link_name), settings: () => (social_link_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/social-links/index.js var social_links_namespaceObject = {}; __webpack_require__.r(social_links_namespaceObject); __webpack_require__.d(social_links_namespaceObject, { init: () => (social_links_init), metadata: () => (social_links_block_namespaceObject), name: () => (social_links_name), settings: () => (social_links_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/spacer/index.js var spacer_namespaceObject = {}; __webpack_require__.r(spacer_namespaceObject); __webpack_require__.d(spacer_namespaceObject, { init: () => (spacer_init), metadata: () => (spacer_block_namespaceObject), name: () => (spacer_name), settings: () => (spacer_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/table/index.js var build_module_table_namespaceObject = {}; __webpack_require__.r(build_module_table_namespaceObject); __webpack_require__.d(build_module_table_namespaceObject, { init: () => (table_init), metadata: () => (table_block_namespaceObject), name: () => (table_name), settings: () => (table_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/table-of-contents/index.js var build_module_table_of_contents_namespaceObject = {}; __webpack_require__.r(build_module_table_of_contents_namespaceObject); __webpack_require__.d(build_module_table_of_contents_namespaceObject, { init: () => (table_of_contents_init), metadata: () => (table_of_contents_block_namespaceObject), name: () => (table_of_contents_name), settings: () => (table_of_contents_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/tag-cloud/index.js var tag_cloud_namespaceObject = {}; __webpack_require__.r(tag_cloud_namespaceObject); __webpack_require__.d(tag_cloud_namespaceObject, { init: () => (tag_cloud_init), metadata: () => (tag_cloud_block_namespaceObject), name: () => (tag_cloud_name), settings: () => (tag_cloud_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/template-part/index.js var template_part_namespaceObject = {}; __webpack_require__.r(template_part_namespaceObject); __webpack_require__.d(template_part_namespaceObject, { init: () => (template_part_init), metadata: () => (template_part_block_namespaceObject), name: () => (template_part_name), settings: () => (template_part_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/term-count/index.js var build_module_term_count_namespaceObject = {}; __webpack_require__.r(build_module_term_count_namespaceObject); __webpack_require__.d(build_module_term_count_namespaceObject, { init: () => (term_count_init), metadata: () => (term_count_block_namespaceObject), name: () => (term_count_name), settings: () => (term_count_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/term-description/index.js var build_module_term_description_namespaceObject = {}; __webpack_require__.r(build_module_term_description_namespaceObject); __webpack_require__.d(build_module_term_description_namespaceObject, { init: () => (term_description_init), metadata: () => (term_description_block_namespaceObject), name: () => (term_description_name), settings: () => (term_description_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/term-name/index.js var build_module_term_name_namespaceObject = {}; __webpack_require__.r(build_module_term_name_namespaceObject); __webpack_require__.d(build_module_term_name_namespaceObject, { init: () => (term_name_init), metadata: () => (term_name_block_namespaceObject), name: () => (term_name_name), settings: () => (term_name_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/terms-query/index.js var terms_query_namespaceObject = {}; __webpack_require__.r(terms_query_namespaceObject); __webpack_require__.d(terms_query_namespaceObject, { init: () => (terms_query_init), metadata: () => (terms_query_block_namespaceObject), name: () => (terms_query_name), settings: () => (terms_query_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/term-template/index.js var term_template_namespaceObject = {}; __webpack_require__.r(term_template_namespaceObject); __webpack_require__.d(term_template_namespaceObject, { init: () => (term_template_init), metadata: () => (term_template_block_namespaceObject), name: () => (term_template_name), settings: () => (term_template_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/text-columns/index.js var text_columns_namespaceObject = {}; __webpack_require__.r(text_columns_namespaceObject); __webpack_require__.d(text_columns_namespaceObject, { init: () => (text_columns_init), metadata: () => (text_columns_block_namespaceObject), name: () => (text_columns_name), settings: () => (text_columns_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/verse/index.js var build_module_verse_namespaceObject = {}; __webpack_require__.r(build_module_verse_namespaceObject); __webpack_require__.d(build_module_verse_namespaceObject, { init: () => (verse_init), metadata: () => (verse_block_namespaceObject), name: () => (verse_name), settings: () => (verse_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/video/index.js var build_module_video_namespaceObject = {}; __webpack_require__.r(build_module_video_namespaceObject); __webpack_require__.d(build_module_video_namespaceObject, { init: () => (video_init), metadata: () => (video_block_namespaceObject), name: () => (video_name), settings: () => (video_settings) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/footnotes/index.js var footnotes_namespaceObject = {}; __webpack_require__.r(footnotes_namespaceObject); __webpack_require__.d(footnotes_namespaceObject, { init: () => (footnotes_init), metadata: () => (footnotes_block_namespaceObject), name: () => (footnotes_name), settings: () => (footnotes_settings) }); ;// external "ReactJSXRuntime" const external_ReactJSXRuntime_namespaceObject = window["ReactJSXRuntime"]; ;// external ["wp","blocks"] const external_wp_blocks_namespaceObject = window["wp"]["blocks"]; ;// external ["wp","data"] const external_wp_data_namespaceObject = window["wp"]["data"]; ;// external ["wp","blockEditor"] const external_wp_blockEditor_namespaceObject = window["wp"]["blockEditor"]; ;// external ["wp","serverSideRender"] const external_wp_serverSideRender_namespaceObject = window["wp"]["serverSideRender"]; var external_wp_serverSideRender_default = /*#__PURE__*/__webpack_require__.n(external_wp_serverSideRender_namespaceObject); ;// external ["wp","i18n"] const external_wp_i18n_namespaceObject = window["wp"]["i18n"]; ;// external ["wp","components"] const external_wp_components_namespaceObject = window["wp"]["components"]; ;// external ["wp","element"] const external_wp_element_namespaceObject = window["wp"]["element"]; ;// external ["wp","blob"] const external_wp_blob_namespaceObject = window["wp"]["blob"]; ;// external ["wp","coreData"] const external_wp_coreData_namespaceObject = window["wp"]["coreData"]; ;// external ["wp","compose"] const external_wp_compose_namespaceObject = window["wp"]["compose"]; ;// ./node_modules/@wordpress/block-library/build-module/utils/hooks.js function useCanEditEntity(kind, name, recordId) { return (0,external_wp_data_namespaceObject.useSelect)( (select) => select(external_wp_coreData_namespaceObject.store).canUser("update", { kind, name, id: recordId }), [kind, name, recordId] ); } function useUploadMediaFromBlobURL(args = {}) { const latestArgsRef = (0,external_wp_element_namespaceObject.useRef)(args); const hasUploadStartedRef = (0,external_wp_element_namespaceObject.useRef)(false); const { getSettings } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store); (0,external_wp_element_namespaceObject.useLayoutEffect)(() => { latestArgsRef.current = args; }); (0,external_wp_element_namespaceObject.useEffect)(() => { if (hasUploadStartedRef.current) { return; } if (!latestArgsRef.current.url || !(0,external_wp_blob_namespaceObject.isBlobURL)(latestArgsRef.current.url)) { return; } const file = (0,external_wp_blob_namespaceObject.getBlobByURL)(latestArgsRef.current.url); if (!file) { return; } const { url, allowedTypes, onChange, onError } = latestArgsRef.current; const { mediaUpload } = getSettings(); if (!mediaUpload) { return; } hasUploadStartedRef.current = true; mediaUpload({ filesList: [file], allowedTypes, onFileChange: ([media]) => { if ((0,external_wp_blob_namespaceObject.isBlobURL)(media?.url)) { return; } (0,external_wp_blob_namespaceObject.revokeBlobURL)(url); onChange(media); hasUploadStartedRef.current = false; }, onError: (message) => { (0,external_wp_blob_namespaceObject.revokeBlobURL)(url); onError(message); hasUploadStartedRef.current = false; } }); }, [getSettings]); } function useDefaultAvatar() { const { avatarURL: defaultAvatarUrl } = (0,external_wp_data_namespaceObject.useSelect)((select) => { const { getSettings } = select(external_wp_blockEditor_namespaceObject.store); const { __experimentalDiscussionSettings } = getSettings(); return __experimentalDiscussionSettings; }); return defaultAvatarUrl; } function useToolsPanelDropdownMenuProps() { const isMobile = (0,external_wp_compose_namespaceObject.useViewportMatch)("medium", "<"); return !isMobile ? { popoverProps: { placement: "left-start", // For non-mobile, inner sidebar width (248px) - button width (24px) - border (1px) + padding (16px) + spacing (20px) offset: 259 } } : {}; } ;// ./node_modules/@wordpress/block-library/build-module/accordion/edit.js const ACCORDION_BLOCK_NAME = "core/accordion-item"; const ACCORDION_HEADING_BLOCK_NAME = "core/accordion-heading"; const ACCORDION_BLOCK = { name: ACCORDION_BLOCK_NAME }; function Edit({ attributes: { autoclose, iconPosition, showIcon, headingLevel, levelOptions }, clientId, setAttributes, isSelected: isSingleSelected }) { const registry = (0,external_wp_data_namespaceObject.useRegistry)(); const { getBlockOrder } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store); const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ role: "group" }); const dropdownMenuProps = useToolsPanelDropdownMenuProps(); const { updateBlockAttributes, insertBlock } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store); const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)(); const isContentOnlyMode = blockEditingMode === "contentOnly"; const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, { template: [[ACCORDION_BLOCK_NAME]], defaultBlock: ACCORDION_BLOCK, directInsert: true, templateInsertUpdatesSelection: true }); const addAccordionItemBlock = () => { const newAccordionItem = (0,external_wp_blocks_namespaceObject.createBlock)(ACCORDION_BLOCK_NAME, {}, [ (0,external_wp_blocks_namespaceObject.createBlock)(ACCORDION_HEADING_BLOCK_NAME, { level: headingLevel }), (0,external_wp_blocks_namespaceObject.createBlock)("core/accordion-panel", {}) ]); insertBlock(newAccordionItem, void 0, clientId); }; const updateHeadingLevel = (newHeadingLevel) => { const innerBlockClientIds = getBlockOrder(clientId); const accordionHeaderClientIds = []; innerBlockClientIds.forEach((contentClientId) => { const headerClientIds = getBlockOrder(contentClientId); accordionHeaderClientIds.push(...headerClientIds); }); registry.batch(() => { setAttributes({ headingLevel: newHeadingLevel }); updateBlockAttributes(accordionHeaderClientIds, { level: newHeadingLevel }); }); }; return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ isSingleSelected && !isContentOnlyMode && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.HeadingLevelDropdown, { value: headingLevel, options: levelOptions, onChange: updateHeadingLevel } ) }) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, { onClick: addAccordionItemBlock, children: (0,external_wp_i18n_namespaceObject.__)("Add item") }) }) ] }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)( external_wp_components_namespaceObject.__experimentalToolsPanel, { label: (0,external_wp_i18n_namespaceObject.__)("Settings"), resetAll: () => { setAttributes({ autoclose: false, showIcon: true, iconPosition: "right" }); }, dropdownMenuProps, children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)("Auto-close"), isShownByDefault: true, hasValue: () => !!autoclose, onDeselect: () => setAttributes({ autoclose: false }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToggleControl, { isBlock: true, __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Auto-close"), onChange: (value) => { setAttributes({ autoclose: value }); }, checked: autoclose, help: (0,external_wp_i18n_namespaceObject.__)( "Automatically close accordions when a new one is opened." ) } ) } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)("Show icon"), isShownByDefault: true, hasValue: () => !showIcon, onDeselect: () => setAttributes({ showIcon: true }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToggleControl, { isBlock: true, __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Show icon"), onChange: (value) => { setAttributes({ showIcon: value, iconPosition: value ? iconPosition : "right" }); }, checked: showIcon, help: (0,external_wp_i18n_namespaceObject.__)( "Display a plus icon next to the accordion header." ) } ) } ), showIcon && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)("Icon Position"), isShownByDefault: true, hasValue: () => iconPosition !== "right", onDeselect: () => setAttributes({ iconPosition: "right" }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)( external_wp_components_namespaceObject.__experimentalToggleGroupControl, { __nextHasNoMarginBottom: true, __next40pxDefaultSize: true, isBlock: true, label: (0,external_wp_i18n_namespaceObject.__)("Icon Position"), value: iconPosition, onChange: (value) => { setAttributes({ iconPosition: value }); }, children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { label: (0,external_wp_i18n_namespaceObject.__)("Left"), value: "left" } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { label: (0,external_wp_i18n_namespaceObject.__)("Right"), value: "right" } ) ] } ) } ) ] } ) }, "setting"), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps }) ] }); } ;// ./node_modules/@wordpress/block-library/build-module/accordion/save.js function save() { const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save({ role: "group" }); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps) }); } ;// ./node_modules/@wordpress/block-library/build-module/accordion/block.json const block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/accordion","title":"Accordion","category":"design","description":"Displays a foldable layout that groups content in collapsible sections.","example":{},"supports":{"anchor":true,"html":false,"align":["wide","full"],"background":{"backgroundImage":true,"backgroundSize":true,"__experimentalDefaultControls":{"backgroundImage":true}},"color":{"background":true,"gradients":true},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"spacing":{"padding":true,"margin":["top","bottom"],"blockGap":true},"shadow":true,"layout":true,"ariaLabel":true,"interactivity":true,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"contentRole":true},"attributes":{"iconPosition":{"type":"string","default":"right"},"showIcon":{"type":"boolean","default":true},"autoclose":{"type":"boolean","default":false},"headingLevel":{"type":"number","default":3},"levelOptions":{"type":"array"}},"providesContext":{"core/accordion-icon-position":"iconPosition","core/accordion-show-icon":"showIcon","core/accordion-heading-level":"headingLevel"},"allowedBlocks":["core/accordion-item"],"textdomain":"default","viewScriptModule":"@wordpress/block-library/accordion/view"}'); ;// ./node_modules/@wordpress/block-library/build-module/utils/init-block.js function initBlock(block) { if (!block) { return; } const { metadata, settings, name } = block; return (0,external_wp_blocks_namespaceObject.registerBlockType)({ name, ...metadata }, settings); } ;// external ["wp","primitives"] const external_wp_primitives_namespaceObject = window["wp"]["primitives"]; ;// ./node_modules/@wordpress/block-library/build-module/accordion/icon.js var icon_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_primitives_namespaceObject.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M19.5 9.25L9.5 9.25L9.5 7.75L19.5 7.75L19.5 9.25Z", fill: "currentColor" } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4.5 6L8.5 8.5L4.5 11L4.5 6Z", fill: "currentColor" }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_primitives_namespaceObject.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M19.5 16.25L9.5 16.25L9.5 14.75L19.5 14.75L19.5 16.25Z", fill: "currentColor" } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4.5 13L8.5 15.5L4.5 18L4.5 13Z", fill: "currentColor" }) ] }); ;// ./node_modules/@wordpress/block-library/build-module/accordion/index.js const { name: accordion_name } = block_namespaceObject; const settings = { icon: icon_default, example: { innerBlocks: [ { name: "core/accordion-item", innerBlocks: [ { name: "core/accordion-heading", attributes: { title: (0,external_wp_i18n_namespaceObject.__)( "Lorem ipsum dolor sit amet, consectetur." ) } } ] }, { name: "core/accordion-item", innerBlocks: [ { name: "core/accordion-heading", attributes: { title: (0,external_wp_i18n_namespaceObject.__)( "Suspendisse commodo lacus, interdum et." ) } } ] } ] }, edit: Edit, save: save }; const init = () => initBlock({ name: accordion_name, metadata: block_namespaceObject, settings }); ;// ./node_modules/clsx/dist/clsx.mjs function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t { const { isBlockSelected, hasSelectedInnerBlock, getBlockOrder: getBlockOrderSelector } = select(external_wp_blockEditor_namespaceObject.store); return { isSelected: isBlockSelected(clientId) || hasSelectedInnerBlock(clientId, true), getBlockOrder: getBlockOrderSelector }; }, [clientId] ); const contentBlockClientId = getBlockOrder(clientId)[1]; const { updateBlockAttributes, __unstableMarkNextChangeAsNotPersistent } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store); (0,external_wp_element_namespaceObject.useEffect)(() => { if (contentBlockClientId) { __unstableMarkNextChangeAsNotPersistent(); updateBlockAttributes(contentBlockClientId, { isSelected }); } }, [ isSelected, contentBlockClientId, __unstableMarkNextChangeAsNotPersistent, updateBlockAttributes ]); const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className: dist_clsx({ "is-open": openByDefault || isSelected }) }); const headingLevel = context && context["core/accordion-heading-level"]; const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, { template: [ [ "core/accordion-heading", headingLevel ? { level: headingLevel } : {} ], [ "core/accordion-panel", { openByDefault } ] ], templateLock: "all", directInsert: true, templateInsertUpdatesSelection: true }); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanel, { label: (0,external_wp_i18n_namespaceObject.__)("Settings"), resetAll: () => { setAttributes({ openByDefault: false }); if (contentBlockClientId) { updateBlockAttributes(contentBlockClientId, { openByDefault: false }); } }, dropdownMenuProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)("Open by default"), isShownByDefault: true, hasValue: () => !!openByDefault, onDeselect: () => { setAttributes({ openByDefault: false }); if (contentBlockClientId) { updateBlockAttributes(contentBlockClientId, { openByDefault: false }); } }, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToggleControl, { label: (0,external_wp_i18n_namespaceObject.__)("Open by default"), __nextHasNoMarginBottom: true, onChange: (value) => { setAttributes({ openByDefault: value }); if (contentBlockClientId) { updateBlockAttributes( contentBlockClientId, { openByDefault: value } ); } }, checked: openByDefault, help: (0,external_wp_i18n_namespaceObject.__)( "Accordion content will be displayed by default." ) } ) } ) } ) }, "setting"), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps }) ] }); } ;// ./node_modules/@wordpress/block-library/build-module/accordion-item/save.js function save_save({ attributes }) { const { openByDefault } = attributes; const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: dist_clsx({ "is-open": openByDefault }) }); const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps }); } ;// ./node_modules/@wordpress/block-library/build-module/accordion-item/block.json const accordion_item_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/accordion-item","title":"Accordion Item","category":"design","description":"Wraps the heading and panel in one unit.","parent":["core/accordion"],"allowedBlocks":["core/accordion-heading","core/accordion-panel"],"supports":{"html":false,"color":{"background":true,"gradients":true},"interactivity":true,"spacing":{"margin":["top","bottom"],"blockGap":true},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"shadow":true,"layout":{"allowEditing":false},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"contentRole":true},"attributes":{"openByDefault":{"type":"boolean","default":false}},"textdomain":"default","style":"wp-block-accordion-item"}'); ;// ./node_modules/@wordpress/block-library/build-module/accordion-item/icon.js var icon_icon_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_primitives_namespaceObject.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M19.5 9.5L9.5 9.5L9.5 8L19.5 8L19.5 9.5Z", fill: "currentColor" } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_primitives_namespaceObject.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M19.5 13L9.5 13L9.5 11.5L19.5 11.5L19.5 13Z", fill: "currentColor" } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_primitives_namespaceObject.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M19.5 16.3999L9.5 16.3999L9.5 14.8999L19.5 14.8999L19.5 16.3999Z", fill: "currentColor" } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4.5 6.25L8.5 8.75L4.5 11.25L4.5 6.25Z", fill: "currentColor" }) ] }); ;// ./node_modules/@wordpress/block-library/build-module/accordion-item/index.js const { name: accordion_item_name } = accordion_item_block_namespaceObject; const accordion_item_settings = { icon: icon_icon_default, edit: edit_Edit, save: save_save }; const accordion_item_init = () => initBlock({ name: accordion_item_name, metadata: accordion_item_block_namespaceObject, settings: accordion_item_settings }); ;// ./node_modules/@wordpress/block-library/build-module/accordion-heading/edit.js function accordion_heading_edit_Edit({ attributes, setAttributes, context }) { const { title } = attributes; const { "core/accordion-icon-position": iconPosition, "core/accordion-show-icon": showIcon, "core/accordion-heading-level": headingLevel } = context; const TagName = "h" + headingLevel; (0,external_wp_element_namespaceObject.useEffect)(() => { if (iconPosition !== void 0 && showIcon !== void 0) { setAttributes({ iconPosition, showIcon }); } }, [iconPosition, showIcon, setAttributes]); const [fluidTypographySettings, layout] = (0,external_wp_blockEditor_namespaceObject.useSettings)( "typography.fluid", "layout" ); const typographyProps = (0,external_wp_blockEditor_namespaceObject.getTypographyClassesAndStyles)(attributes, { typography: { fluid: fluidTypographySettings }, layout: { wideSize: layout?.wideSize } }); const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)(); const spacingProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetSpacingClassesAndStyles)(attributes); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)( "button", { className: "wp-block-accordion-heading__toggle", style: spacingProps.style, tabIndex: "-1", children: [ showIcon && iconPosition === "left" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "span", { className: "wp-block-accordion-heading__toggle-icon", "aria-hidden": "true", children: "+" } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.RichText, { withoutInteractiveFormatting: true, disableLineBreaks: true, tagName: "span", value: title, onChange: (newTitle) => setAttributes({ title: newTitle }), placeholder: (0,external_wp_i18n_namespaceObject.__)("Accordion title"), className: "wp-block-accordion-heading__toggle-title", style: { letterSpacing: typographyProps.style.letterSpacing, textDecoration: typographyProps.style.textDecoration } } ), showIcon && iconPosition === "right" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "span", { className: "wp-block-accordion-heading__toggle-icon", "aria-hidden": "true", children: "+" } ) ] } ) }); } ;// ./node_modules/@wordpress/block-library/build-module/accordion-heading/save.js function accordion_heading_save_save({ attributes }) { const { level, title, iconPosition, showIcon } = attributes; const TagName = "h" + (level || 3); const typographyProps = (0,external_wp_blockEditor_namespaceObject.getTypographyClassesAndStyles)(attributes); const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save(); const spacingProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetSpacingClassesAndStyles)(attributes); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)( "button", { className: "wp-block-accordion-heading__toggle", style: spacingProps.style, children: [ showIcon && iconPosition === "left" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "span", { className: "wp-block-accordion-heading__toggle-icon", "aria-hidden": "true", children: "+" } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.RichText.Content, { className: "wp-block-accordion-heading__toggle-title", tagName: "span", value: title, style: { letterSpacing: typographyProps.style.letterSpacing, textDecoration: typographyProps.style.textDecoration } } ), showIcon && iconPosition === "right" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "span", { className: "wp-block-accordion-heading__toggle-icon", "aria-hidden": "true", children: "+" } ) ] } ) }); } ;// ./node_modules/@wordpress/block-library/build-module/accordion-heading/block.json const accordion_heading_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/accordion-heading","title":"Accordion Heading","category":"design","description":"Displays a heading that toggles the accordion panel.","parent":["core/accordion-item"],"usesContext":["core/accordion-icon-position","core/accordion-show-icon","core/accordion-heading-level"],"supports":{"anchor":true,"color":{"background":true,"gradients":true},"align":false,"interactivity":true,"spacing":{"padding":true,"__experimentalDefaultControls":{"padding":true},"__experimentalSkipSerialization":true,"__experimentalSelector":".wp-block-accordion-heading__toggle"},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"typography":{"__experimentalSkipSerialization":["textDecoration","letterSpacing"],"fontSize":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true,"fontFamily":true}},"shadow":true,"visibility":false,"lock":false},"selectors":{"typography":{"letterSpacing":".wp-block-accordion-heading .wp-block-accordion-heading__toggle-title","textDecoration":".wp-block-accordion-heading .wp-block-accordion-heading__toggle-title"}},"attributes":{"openByDefault":{"type":"boolean","default":false},"title":{"type":"rich-text","source":"rich-text","selector":".wp-block-accordion-heading__toggle-title","role":"content"},"level":{"type":"number"},"iconPosition":{"type":"string","enum":["left","right"],"default":"right"},"showIcon":{"type":"boolean","default":true}},"textdomain":"default"}'); ;// ./node_modules/@wordpress/block-library/build-module/accordion-heading/icon.js var accordion_heading_icon_icon_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_primitives_namespaceObject.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M19.5 12.75L9.5 12.75L9.5 11.25L19.5 11.25L19.5 12.75Z", fill: "currentColor" } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4.5 9.5L8.5 12L4.5 14.5L4.5 9.5Z", fill: "currentColor" }) ] }); ;// ./node_modules/@wordpress/block-library/build-module/accordion-heading/deprecated.js const v1 = { attributes: { openByDefault: { type: "boolean", default: false }, title: { type: "rich-text", source: "rich-text", selector: ".wp-block-accordion-heading__toggle-title", role: "content" }, level: { type: "number" }, iconPosition: { type: "string", enum: ["left", "right"], default: "right" }, showIcon: { type: "boolean", default: true } }, supports: { anchor: true, color: { background: true, gradients: true }, align: false, interactivity: true, spacing: { padding: true, __experimentalDefaultControls: { padding: true }, __experimentalSkipSerialization: true, __experimentalSelector: ".wp-block-accordion-heading__toggle" }, __experimentalBorder: { color: true, radius: true, style: true, width: true, __experimentalDefaultControls: { color: true, radius: true, style: true, width: true } }, typography: { fontSize: true, __experimentalFontFamily: true, __experimentalFontWeight: true, __experimentalFontStyle: true, __experimentalTextTransform: true, __experimentalTextDecoration: true, __experimentalLetterSpacing: true, __experimentalDefaultControls: { fontSize: true, fontFamily: true } }, shadow: true, visibility: false }, save({ attributes }) { const { level, title, iconPosition, showIcon } = attributes; const TagName = "h" + (level || 3); const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save(); const spacingProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetSpacingClassesAndStyles)(attributes); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)( "button", { className: "wp-block-accordion-heading__toggle", style: spacingProps.style, children: [ showIcon && iconPosition === "left" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "span", { className: "wp-block-accordion-heading__toggle-icon", "aria-hidden": "true", children: "+" } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.RichText.Content, { className: "wp-block-accordion-heading__toggle-title", tagName: "span", value: title } ), showIcon && iconPosition === "right" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "span", { className: "wp-block-accordion-heading__toggle-icon", "aria-hidden": "true", children: "+" } ) ] } ) }); } }; var deprecated_default = [v1]; ;// ./node_modules/@wordpress/block-library/build-module/accordion-heading/index.js const { name: accordion_heading_name } = accordion_heading_block_namespaceObject; const accordion_heading_settings = { icon: accordion_heading_icon_icon_default, edit: accordion_heading_edit_Edit, save: accordion_heading_save_save, deprecated: deprecated_default }; const accordion_heading_init = () => initBlock({ name: accordion_heading_name, metadata: accordion_heading_block_namespaceObject, settings: accordion_heading_settings }); ;// ./node_modules/@wordpress/block-library/build-module/accordion-panel/edit.js function accordion_panel_edit_Edit({ attributes }) { const { allowedBlocks, templateLock, openByDefault, isSelected } = attributes; const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ "aria-hidden": !isSelected && !openByDefault, role: "region" }); const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, { allowedBlocks, template: [["core/paragraph", {}]], templateLock }); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps }); } ;// ./node_modules/@wordpress/block-library/build-module/accordion-panel/save.js function accordion_panel_save_save() { const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save({ role: "region" }); const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps }); } ;// ./node_modules/@wordpress/block-library/build-module/accordion-panel/block.json const accordion_panel_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/accordion-panel","title":"Accordion Panel","category":"design","description":"Contains the hidden or revealed content beneath the heading.","parent":["core/accordion-item"],"supports":{"html":false,"color":{"background":true,"gradients":true},"interactivity":true,"spacing":{"padding":true,"blockGap":true,"__experimentalDefaultControls":{"padding":true,"blockGap":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"shadow":true,"layout":{"allowEditing":false},"visibility":false,"contentRole":true,"allowedBlocks":true,"lock":false},"attributes":{"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false],"default":false},"openByDefault":{"type":"boolean","default":false},"isSelected":{"type":"boolean","default":false}},"textdomain":"default","style":"wp-block-accordion-panel"}'); ;// ./node_modules/@wordpress/block-library/build-module/accordion-panel/icon.js var accordion_panel_icon_icon_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_primitives_namespaceObject.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M8.10417 6.00024H6.5C5.39543 6.00024 4.5 6.89567 4.5 8.00024V10.3336H6V8.00024C6 7.7241 6.22386 7.50024 6.5 7.50024H8.10417V6.00024ZM4.5 13.6669V16.0002C4.5 17.1048 5.39543 18.0002 6.5 18.0002H8.10417V16.5002H6.5C6.22386 16.5002 6 16.2764 6 16.0002V13.6669H4.5ZM10.3958 6.00024V7.50024H13.6042V6.00024H10.3958ZM15.8958 6.00024V7.50024H17.5C17.7761 7.50024 18 7.7241 18 8.00024V10.3336H19.5V8.00024C19.5 6.89567 18.6046 6.00024 17.5 6.00024H15.8958ZM19.5 13.6669H18V16.0002C18 16.2764 17.7761 16.5002 17.5 16.5002H15.8958V18.0002H17.5C18.6046 18.0002 19.5 17.1048 19.5 16.0002V13.6669ZM13.6042 18.0002V16.5002H10.3958V18.0002H13.6042Z", fill: "currentColor" } ) }); ;// ./node_modules/@wordpress/block-library/build-module/accordion-panel/index.js const { name: accordion_panel_name } = accordion_panel_block_namespaceObject; const accordion_panel_settings = { icon: accordion_panel_icon_icon_default, edit: accordion_panel_edit_Edit, save: accordion_panel_save_save }; const accordion_panel_init = () => initBlock({ name: accordion_panel_name, metadata: accordion_panel_block_namespaceObject, settings: accordion_panel_settings }); ;// ./node_modules/@wordpress/icons/build-module/library/archive.js var archive_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_primitives_namespaceObject.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M11.934 7.406a1 1 0 0 0 .914.594H19a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5h5.764a.5.5 0 0 1 .447.276l.723 1.63Zm1.064-1.216a.5.5 0 0 0 .462.31H19a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h5.764a2 2 0 0 1 1.789 1.106l.445 1.084ZM8.5 10.5h7V12h-7v-1.5Zm7 3.5h-7v1.5h7V14Z" } ) }); ;// ./node_modules/@wordpress/block-library/build-module/archives/block.json const archives_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/archives","title":"Archives","category":"widgets","description":"Display a date archive of your posts.","textdomain":"default","attributes":{"displayAsDropdown":{"type":"boolean","default":false},"showLabel":{"type":"boolean","default":true},"showPostCounts":{"type":"boolean","default":false},"type":{"type":"string","default":"monthly"}},"supports":{"align":true,"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true},"html":false,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-archives-editor"}'); ;// ./node_modules/@wordpress/block-library/build-module/archives/edit.js function ArchivesEdit({ attributes, setAttributes }) { const { showLabel, showPostCounts, displayAsDropdown, type } = attributes; const dropdownMenuProps = useToolsPanelDropdownMenuProps(); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)( external_wp_components_namespaceObject.__experimentalToolsPanel, { label: (0,external_wp_i18n_namespaceObject.__)("Settings"), resetAll: () => { setAttributes({ displayAsDropdown: false, showLabel: true, showPostCounts: false, type: "monthly" }); }, dropdownMenuProps, children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)("Display as dropdown"), isShownByDefault: true, hasValue: () => displayAsDropdown, onDeselect: () => setAttributes({ displayAsDropdown: false }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Display as dropdown"), checked: displayAsDropdown, onChange: () => setAttributes({ displayAsDropdown: !displayAsDropdown }) } ) } ), displayAsDropdown && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)("Show label"), isShownByDefault: true, hasValue: () => !showLabel, onDeselect: () => setAttributes({ showLabel: true }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Show label"), checked: showLabel, onChange: () => setAttributes({ showLabel: !showLabel }) } ) } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)("Show post counts"), isShownByDefault: true, hasValue: () => showPostCounts, onDeselect: () => setAttributes({ showPostCounts: false }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Show post counts"), checked: showPostCounts, onChange: () => setAttributes({ showPostCounts: !showPostCounts }) } ) } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)("Group by"), isShownByDefault: true, hasValue: () => type !== "monthly", onDeselect: () => setAttributes({ type: "monthly" }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.SelectControl, { __next40pxDefaultSize: true, __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Group by"), options: [ { label: (0,external_wp_i18n_namespaceObject.__)("Year"), value: "yearly" }, { label: (0,external_wp_i18n_namespaceObject.__)("Month"), value: "monthly" }, { label: (0,external_wp_i18n_namespaceObject.__)("Week"), value: "weekly" }, { label: (0,external_wp_i18n_namespaceObject.__)("Day"), value: "daily" } ], value: type, onChange: (value) => setAttributes({ type: value }) } ) } ) ] } ) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)(), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Disabled, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( (external_wp_serverSideRender_default()), { block: "core/archives", skipBlockSupportAttributes: true, attributes } ) }) }) ] }); } ;// ./node_modules/@wordpress/block-library/build-module/archives/index.js const { name: archives_name } = archives_block_namespaceObject; const archives_settings = { icon: archive_default, example: {}, edit: ArchivesEdit }; const archives_init = () => initBlock({ name: archives_name, metadata: archives_block_namespaceObject, settings: archives_settings }); ;// ./node_modules/@wordpress/icons/build-module/library/comment-author-avatar.js var comment_author_avatar_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_primitives_namespaceObject.Path, { fillRule: "evenodd", d: "M7.25 16.437a6.5 6.5 0 1 1 9.5 0V16A2.75 2.75 0 0 0 14 13.25h-4A2.75 2.75 0 0 0 7.25 16v.437Zm1.5 1.193a6.47 6.47 0 0 0 3.25.87 6.47 6.47 0 0 0 3.25-.87V16c0-.69-.56-1.25-1.25-1.25h-4c-.69 0-1.25.56-1.25 1.25v1.63ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm10-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z", clipRule: "evenodd" } ) }); ;// ./node_modules/@wordpress/block-library/build-module/avatar/block.json const avatar_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/avatar","title":"Avatar","category":"theme","description":"Add a user’s avatar.","textdomain":"default","attributes":{"userId":{"type":"number"},"size":{"type":"number","default":96},"isLink":{"type":"boolean","default":false},"linkTarget":{"type":"string","default":"_self"}},"usesContext":["postType","postId","commentId"],"supports":{"html":false,"align":true,"alignWide":false,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"__experimentalBorder":{"__experimentalSkipSerialization":true,"radius":true,"width":true,"color":true,"style":true,"__experimentalDefaultControls":{"radius":true}},"color":{"text":false,"background":false},"filter":{"duotone":true},"interactivity":{"clientNavigation":true}},"selectors":{"border":".wp-block-avatar img","filter":{"duotone":".wp-block-avatar img"}},"editorStyle":"wp-block-avatar-editor","style":"wp-block-avatar"}'); ;// external ["wp","url"] const external_wp_url_namespaceObject = window["wp"]["url"]; ;// ./node_modules/@wordpress/block-library/build-module/avatar/hooks.js function getAvatarSizes(sizes) { const minSize = sizes ? sizes[0] : 24; const maxSize = sizes ? sizes[sizes.length - 1] : 96; const maxSizeBuffer = Math.floor(maxSize * 2.5); return { minSize, maxSize: maxSizeBuffer }; } function useCommentAvatar({ commentId }) { const [avatars] = (0,external_wp_coreData_namespaceObject.useEntityProp)( "root", "comment", "author_avatar_urls", commentId ); const [authorName] = (0,external_wp_coreData_namespaceObject.useEntityProp)( "root", "comment", "author_name", commentId ); const avatarUrls = avatars ? Object.values(avatars) : null; const sizes = avatars ? Object.keys(avatars) : null; const { minSize, maxSize } = getAvatarSizes(sizes); const defaultAvatar = useDefaultAvatar(); return { src: avatarUrls ? avatarUrls[avatarUrls.length - 1] : defaultAvatar, minSize, maxSize, alt: authorName ? ( // translators: %s: Author name. (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)("%s Avatar"), authorName) ) : (0,external_wp_i18n_namespaceObject.__)("Default Avatar") }; } function useUserAvatar({ userId, postId, postType }) { const { authorDetails } = (0,external_wp_data_namespaceObject.useSelect)( (select) => { const { getEditedEntityRecord, getUser } = select(external_wp_coreData_namespaceObject.store); if (userId) { return { authorDetails: getUser(userId) }; } const _authorId = getEditedEntityRecord( "postType", postType, postId )?.author; return { authorDetails: _authorId ? getUser(_authorId) : null }; }, [postType, postId, userId] ); const avatarUrls = authorDetails?.avatar_urls ? Object.values(authorDetails.avatar_urls) : null; const sizes = authorDetails?.avatar_urls ? Object.keys(authorDetails.avatar_urls) : null; const { minSize, maxSize } = getAvatarSizes(sizes); const defaultAvatar = useDefaultAvatar(); return { src: avatarUrls ? avatarUrls[avatarUrls.length - 1] : defaultAvatar, minSize, maxSize, alt: authorDetails ? ( // translators: %s: Author name. (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)("%s Avatar"), authorDetails?.name) ) : (0,external_wp_i18n_namespaceObject.__)("Default Avatar") }; } ;// external ["wp","htmlEntities"] const external_wp_htmlEntities_namespaceObject = window["wp"]["htmlEntities"]; ;// ./node_modules/@wordpress/block-library/build-module/avatar/user-control.js const AUTHORS_QUERY = { who: "authors", per_page: 100, _fields: "id,name", context: "view" }; function UserControl({ value, onChange }) { const [filterValue, setFilterValue] = (0,external_wp_element_namespaceObject.useState)(""); const { authors, isLoading } = (0,external_wp_data_namespaceObject.useSelect)( (select) => { const { getUsers, isResolving } = select(external_wp_coreData_namespaceObject.store); const query = { ...AUTHORS_QUERY }; if (filterValue) { query.search = filterValue; query.search_columns = ["name"]; } return { authors: getUsers(query), isLoading: isResolving("getUsers", [query]) }; }, [filterValue] ); const options = (0,external_wp_element_namespaceObject.useMemo)(() => { return (authors ?? []).map((author) => { return { value: author.id, label: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(author.name) }; }); }, [authors]); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ComboboxControl, { __next40pxDefaultSize: true, __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("User"), help: (0,external_wp_i18n_namespaceObject.__)( "Select the avatar user to display, if it is blank it will use the post/page author." ), value, onChange, options, onFilterValueChange: (0,external_wp_compose_namespaceObject.debounce)(setFilterValue, 300), isLoading } ); } ;// ./node_modules/@wordpress/block-library/build-module/avatar/edit.js const AvatarInspectorControls = ({ setAttributes, avatar, attributes, selectUser }) => { const dropdownMenuProps = useToolsPanelDropdownMenuProps(); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)( external_wp_components_namespaceObject.__experimentalToolsPanel, { label: (0,external_wp_i18n_namespaceObject.__)("Settings"), resetAll: () => { setAttributes({ size: 96, isLink: false, linkTarget: "_self", userId: void 0 }); }, dropdownMenuProps, children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)("Image size"), isShownByDefault: true, hasValue: () => attributes?.size !== 96, onDeselect: () => setAttributes({ size: 96 }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.RangeControl, { __nextHasNoMarginBottom: true, __next40pxDefaultSize: true, label: (0,external_wp_i18n_namespaceObject.__)("Image size"), onChange: (newSize) => setAttributes({ size: newSize }), min: avatar.minSize, max: avatar.maxSize, initialPosition: attributes?.size, value: attributes?.size } ) } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)("Link to user profile"), isShownByDefault: true, hasValue: () => attributes?.isLink, onDeselect: () => setAttributes({ isLink: false }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Link to user profile"), onChange: () => setAttributes({ isLink: !attributes.isLink }), checked: attributes.isLink } ) } ), attributes.isLink && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"), isShownByDefault: true, hasValue: () => attributes?.linkTarget !== "_self", onDeselect: () => setAttributes({ linkTarget: "_self" }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"), onChange: (value) => setAttributes({ linkTarget: value ? "_blank" : "_self" }), checked: attributes.linkTarget === "_blank" } ) } ), selectUser && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)("User"), isShownByDefault: true, hasValue: () => !!attributes?.userId, onDeselect: () => setAttributes({ userId: void 0 }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( UserControl, { value: attributes?.userId, onChange: (value) => { setAttributes({ userId: value }); } } ) } ) ] } ) }); }; const ResizableAvatar = ({ setAttributes, attributes, avatar, blockProps, isSelected }) => { const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBorderProps)(attributes); const doubledSizedSrc = (0,external_wp_url_namespaceObject.addQueryArgs)( (0,external_wp_url_namespaceObject.removeQueryArgs)(avatar?.src, ["s"]), { s: attributes?.size * 2 } ); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ResizableBox, { size: { width: attributes.size, height: attributes.size }, showHandle: isSelected, onResizeStop: (event, direction, elt, delta) => { setAttributes({ size: parseInt( attributes.size + (delta.height || delta.width), 10 ) }); }, lockAspectRatio: true, enable: { top: false, right: !(0,external_wp_i18n_namespaceObject.isRTL)(), bottom: true, left: (0,external_wp_i18n_namespaceObject.isRTL)() }, minWidth: avatar.minSize, maxWidth: avatar.maxSize, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "img", { src: doubledSizedSrc, alt: avatar.alt, className: dist_clsx( "avatar", "avatar-" + attributes.size, "photo", "wp-block-avatar__image", borderProps.className ), style: borderProps.style } ) } ) }); }; const CommentEdit = ({ attributes, context, setAttributes, isSelected }) => { const { commentId } = context; const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)(); const avatar = useCommentAvatar({ commentId }); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( AvatarInspectorControls, { avatar, setAttributes, attributes, selectUser: false } ), attributes.isLink ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "a", { href: "#avatar-pseudo-link", className: "wp-block-avatar__link", onClick: (event) => event.preventDefault(), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( ResizableAvatar, { attributes, avatar, blockProps, isSelected, setAttributes } ) } ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( ResizableAvatar, { attributes, avatar, blockProps, isSelected, setAttributes } ) ] }); }; const UserEdit = ({ attributes, context, setAttributes, isSelected }) => { const { postId, postType } = context; const avatar = useUserAvatar({ userId: attributes?.userId, postId, postType }); const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)(); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( AvatarInspectorControls, { selectUser: true, attributes, avatar, setAttributes } ), attributes.isLink ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "a", { href: "#avatar-pseudo-link", className: "wp-block-avatar__link", onClick: (event) => event.preventDefault(), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( ResizableAvatar, { attributes, avatar, blockProps, isSelected, setAttributes } ) } ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( ResizableAvatar, { attributes, avatar, blockProps, isSelected, setAttributes } ) ] }); }; function avatar_edit_Edit(props) { if (props?.context?.commentId || props?.context?.commentId === null) { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(CommentEdit, { ...props }); } return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(UserEdit, { ...props }); } ;// ./node_modules/@wordpress/block-library/build-module/avatar/index.js const { name: avatar_name } = avatar_block_namespaceObject; const avatar_settings = { icon: comment_author_avatar_default, edit: avatar_edit_Edit, example: {} }; const avatar_init = () => initBlock({ name: avatar_name, metadata: avatar_block_namespaceObject, settings: avatar_settings }); ;// ./node_modules/@wordpress/icons/build-module/library/audio.js var audio_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M17.7 4.3c-1.2 0-2.8 0-3.8 1-.6.6-.9 1.5-.9 2.6V14c-.6-.6-1.5-1-2.5-1C8.6 13 7 14.6 7 16.5S8.6 20 10.5 20c1.5 0 2.8-1 3.3-2.3.5-.8.7-1.8.7-2.5V7.9c0-.7.2-1.2.5-1.6.6-.6 1.8-.6 2.8-.6h.3V4.3h-.4z" }) }); ;// ./node_modules/@wordpress/block-library/build-module/audio/deprecated.js var deprecated_deprecated_default = [ { attributes: { src: { type: "string", source: "attribute", selector: "audio", attribute: "src" }, caption: { type: "string", source: "html", selector: "figcaption" }, id: { type: "number" }, autoplay: { type: "boolean", source: "attribute", selector: "audio", attribute: "autoplay" }, loop: { type: "boolean", source: "attribute", selector: "audio", attribute: "loop" }, preload: { type: "string", source: "attribute", selector: "audio", attribute: "preload" } }, supports: { align: true }, save({ attributes }) { const { autoplay, caption, loop, preload, src } = attributes; return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "audio", { controls: "controls", src, autoPlay: autoplay, loop, preload } ), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", value: caption } ) ] }); } } ]; ;// external ["wp","notices"] const external_wp_notices_namespaceObject = window["wp"]["notices"]; ;// ./node_modules/memize/dist/index.js /** * Memize options object. * * @typedef MemizeOptions * * @property {number} [maxSize] Maximum size of the cache. */ /** * Internal cache entry. * * @typedef MemizeCacheNode * * @property {?MemizeCacheNode|undefined} [prev] Previous node. * @property {?MemizeCacheNode|undefined} [next] Next node. * @property {Array<*>} args Function arguments for cache * entry. * @property {*} val Function result. */ /** * Properties of the enhanced function for controlling cache. * * @typedef MemizeMemoizedFunction * * @property {()=>void} clear Clear the cache. */ /** * Accepts a function to be memoized, and returns a new memoized function, with * optional options. * * @template {(...args: any[]) => any} F * * @param {F} fn Function to memoize. * @param {MemizeOptions} [options] Options object. * * @return {((...args: Parameters) => ReturnType) & MemizeMemoizedFunction} Memoized function. */ function memize(fn, options) { var size = 0; /** @type {?MemizeCacheNode|undefined} */ var head; /** @type {?MemizeCacheNode|undefined} */ var tail; options = options || {}; function memoized(/* ...args */) { var node = head, len = arguments.length, args, i; searchCache: while (node) { // Perform a shallow equality test to confirm that whether the node // under test is a candidate for the arguments passed. Two arrays // are shallowly equal if their length matches and each entry is // strictly equal between the two sets. Avoid abstracting to a // function which could incur an arguments leaking deoptimization. // Check whether node arguments match arguments length if (node.args.length !== arguments.length) { node = node.next; continue; } // Check whether node arguments match arguments values for (i = 0; i < len; i++) { if (node.args[i] !== arguments[i]) { node = node.next; continue searchCache; } } // At this point we can assume we've found a match // Surface matched node to head if not already if (node !== head) { // As tail, shift to previous. Must only shift if not also // head, since if both head and tail, there is no previous. if (node === tail) { tail = node.prev; } // Adjust siblings to point to each other. If node was tail, // this also handles new tail's empty `next` assignment. /** @type {MemizeCacheNode} */ (node.prev).next = node.next; if (node.next) { node.next.prev = node.prev; } node.next = head; node.prev = null; /** @type {MemizeCacheNode} */ (head).prev = node; head = node; } // Return immediately return node.val; } // No cached value found. Continue to insertion phase: // Create a copy of arguments (avoid leaking deoptimization) args = new Array(len); for (i = 0; i < len; i++) { args[i] = arguments[i]; } node = { args: args, // Generate the result from original function val: fn.apply(null, args), }; // Don't need to check whether node is already head, since it would // have been returned above already if it was // Shift existing head down list if (head) { head.prev = node; node.next = head; } else { // If no head, follows that there's no tail (at initial or reset) tail = node; } // Trim tail if we're reached max size and are pending cache insertion if (size === /** @type {MemizeOptions} */ (options).maxSize) { tail = /** @type {MemizeCacheNode} */ (tail).prev; /** @type {MemizeCacheNode} */ (tail).next = null; } else { size++; } head = node; return node.val; } memoized.clear = function () { head = null; tail = null; size = 0; }; // Ignore reason: There's not a clear solution to create an intersection of // the function with additional properties, where the goal is to retain the // function signature of the incoming argument and add control properties // on the return value. // @ts-ignore return memoized; } ;// ./node_modules/@wordpress/block-library/build-module/embed/block.json const embed_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/embed","title":"Embed","category":"embed","description":"Add a block that displays content pulled from other sites, like Twitter or YouTube.","textdomain":"default","attributes":{"url":{"type":"string","role":"content"},"caption":{"type":"rich-text","source":"rich-text","selector":"figcaption","role":"content"},"type":{"type":"string","role":"content"},"providerNameSlug":{"type":"string","role":"content"},"allowResponsive":{"type":"boolean","default":true},"responsive":{"type":"boolean","default":false,"role":"content"},"previewable":{"type":"boolean","default":true,"role":"content"}},"supports":{"align":true,"spacing":{"margin":true},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-embed-editor","style":"wp-block-embed"}'); ;// ./node_modules/@wordpress/block-library/build-module/embed/constants.js const ASPECT_RATIOS = [ // Common video resolutions. { ratio: "2.33", className: "wp-embed-aspect-21-9" }, { ratio: "2.00", className: "wp-embed-aspect-18-9" }, { ratio: "1.78", className: "wp-embed-aspect-16-9" }, { ratio: "1.33", className: "wp-embed-aspect-4-3" }, // Vertical video and instagram square video support. { ratio: "1.00", className: "wp-embed-aspect-1-1" }, { ratio: "0.56", className: "wp-embed-aspect-9-16" }, { ratio: "0.50", className: "wp-embed-aspect-1-2" } ]; const WP_EMBED_TYPE = "wp-embed"; ;// external ["wp","privateApis"] const external_wp_privateApis_namespaceObject = window["wp"]["privateApis"]; ;// ./node_modules/@wordpress/block-library/build-module/lock-unlock.js const { lock, unlock } = (0,external_wp_privateApis_namespaceObject.__dangerousOptInToUnstableAPIsOnlyForCoreModules)( "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.", "@wordpress/block-library" ); ;// ./node_modules/@wordpress/block-library/build-module/embed/util.js const { name: DEFAULT_EMBED_BLOCK } = embed_block_namespaceObject; const { kebabCase } = unlock(external_wp_components_namespaceObject.privateApis); const getEmbedInfoByProvider = (provider) => (0,external_wp_blocks_namespaceObject.getBlockVariations)(DEFAULT_EMBED_BLOCK)?.find( ({ name }) => name === provider ); const matchesPatterns = (url, patterns = []) => patterns.some((pattern) => url.match(pattern)); const findMoreSuitableBlock = (url) => (0,external_wp_blocks_namespaceObject.getBlockVariations)(DEFAULT_EMBED_BLOCK)?.find( ({ patterns }) => matchesPatterns(url, patterns) ); const isFromWordPress = (html) => html && html.includes('class="wp-embedded-content"'); const getPhotoHtml = (photo) => { const imageUrl = photo.url || photo.thumbnail_url; const photoPreview = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("img", { src: imageUrl, alt: photo.title, width: "100%" }) }); return (0,external_wp_element_namespaceObject.renderToString)(photoPreview); }; const createUpgradedEmbedBlock = (props, attributesFromPreview = {}) => { const { preview, attributes = {} } = props; const { url, providerNameSlug, type, ...restAttributes } = attributes; if (!url || !(0,external_wp_blocks_namespaceObject.getBlockType)(DEFAULT_EMBED_BLOCK)) { return; } const matchedBlock = findMoreSuitableBlock(url); const isCurrentBlockWP = providerNameSlug === "wordpress" || type === WP_EMBED_TYPE; const shouldCreateNewBlock = !isCurrentBlockWP && matchedBlock && (matchedBlock.attributes.providerNameSlug !== providerNameSlug || !providerNameSlug); if (shouldCreateNewBlock) { return (0,external_wp_blocks_namespaceObject.createBlock)(DEFAULT_EMBED_BLOCK, { url, ...restAttributes, ...matchedBlock.attributes }); } const wpVariation = (0,external_wp_blocks_namespaceObject.getBlockVariations)(DEFAULT_EMBED_BLOCK)?.find( ({ name }) => name === "wordpress" ); if (!wpVariation || !preview || !isFromWordPress(preview.html) || isCurrentBlockWP) { return; } return (0,external_wp_blocks_namespaceObject.createBlock)(DEFAULT_EMBED_BLOCK, { url, ...wpVariation.attributes, // By now we have the preview, but when the new block first renders, it // won't have had all the attributes set, and so won't get the correct // type and it won't render correctly. So, we pass through the current attributes // here so that the initial render works when we switch to the WordPress // block. This only affects the WordPress block because it can't be // rendered in the usual Sandbox (it has a sandbox of its own) and it // relies on the preview to set the correct render type. ...attributesFromPreview }); }; const hasAspectRatioClass = (existingClassNames) => { if (!existingClassNames) { return false; } return ASPECT_RATIOS.some( ({ className }) => existingClassNames.includes(className) ); }; const removeAspectRatioClasses = (existingClassNames) => { if (!existingClassNames) { return existingClassNames; } const aspectRatioClassNames = ASPECT_RATIOS.reduce( (accumulator, { className }) => { accumulator.push(className); return accumulator; }, ["wp-has-aspect-ratio"] ); let outputClassNames = existingClassNames; for (const className of aspectRatioClassNames) { outputClassNames = outputClassNames.replace(className, ""); } return outputClassNames.trim(); }; function getClassNames(html, existingClassNames, allowResponsive = true) { if (!allowResponsive) { return removeAspectRatioClasses(existingClassNames); } const previewDocument = document.implementation.createHTMLDocument(""); previewDocument.body.innerHTML = html; const iframe = previewDocument.body.querySelector("iframe"); if (iframe && iframe.height && iframe.width) { const aspectRatio = (iframe.width / iframe.height).toFixed(2); for (let ratioIndex = 0; ratioIndex < ASPECT_RATIOS.length; ratioIndex++) { const potentialRatio = ASPECT_RATIOS[ratioIndex]; if (aspectRatio >= potentialRatio.ratio) { const ratioDiff = aspectRatio - potentialRatio.ratio; if (ratioDiff > 0.1) { return removeAspectRatioClasses(existingClassNames); } return dist_clsx( removeAspectRatioClasses(existingClassNames), potentialRatio.className, "wp-has-aspect-ratio" ); } } } return existingClassNames; } function fallback(url, onReplace) { const link = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href: url, children: url }); onReplace( (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", { content: (0,external_wp_element_namespaceObject.renderToString)(link) }) ); } const getAttributesFromPreview = memize( (preview, title, currentClassNames, isResponsive, allowResponsive = true) => { if (!preview) { return {}; } const attributes = {}; let { type = "rich" } = preview; const { html, provider_name: providerName } = preview; const providerNameSlug = kebabCase( (providerName || title).toLowerCase() ); if (isFromWordPress(html)) { type = WP_EMBED_TYPE; } if (html || "photo" === type) { attributes.type = type; attributes.providerNameSlug = providerNameSlug; } if (hasAspectRatioClass(currentClassNames)) { return attributes; } attributes.className = getClassNames( html, currentClassNames, isResponsive && allowResponsive ); return attributes; } ); const getMergedAttributesWithPreview = (currentAttributes, preview, title, isResponsive) => { const { allowResponsive, className } = currentAttributes; return { ...currentAttributes, ...getAttributesFromPreview( preview, title, className, isResponsive, allowResponsive ) }; }; ;// ./node_modules/@wordpress/icons/build-module/library/caption.js var caption_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_primitives_namespaceObject.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M6 5.5h12a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5ZM4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6Zm4 10h2v-1.5H8V16Zm5 0h-2v-1.5h2V16Zm1 0h2v-1.5h-2V16Z" } ) }); ;// ./node_modules/@wordpress/block-library/build-module/utils/caption.js function Caption({ attributeKey = "caption", attributes, setAttributes, isSelected, insertBlocksAfter, placeholder = (0,external_wp_i18n_namespaceObject.__)("Add caption"), label = (0,external_wp_i18n_namespaceObject.__)("Caption text"), showToolbarButton = true, excludeElementClassName, className, readOnly, tagName = "figcaption", addLabel = (0,external_wp_i18n_namespaceObject.__)("Add caption"), removeLabel = (0,external_wp_i18n_namespaceObject.__)("Remove caption"), icon = caption_default, ...props }) { const caption = attributes[attributeKey]; const prevCaption = (0,external_wp_compose_namespaceObject.usePrevious)(caption); const { PrivateRichText: RichText } = unlock(external_wp_blockEditor_namespaceObject.privateApis); const isCaptionEmpty = RichText.isEmpty(caption); const isPrevCaptionEmpty = RichText.isEmpty(prevCaption); const [showCaption, setShowCaption] = (0,external_wp_element_namespaceObject.useState)(!isCaptionEmpty); (0,external_wp_element_namespaceObject.useEffect)(() => { if (!isCaptionEmpty && isPrevCaptionEmpty) { setShowCaption(true); } }, [isCaptionEmpty, isPrevCaptionEmpty]); (0,external_wp_element_namespaceObject.useEffect)(() => { if (!isSelected && isCaptionEmpty) { setShowCaption(false); } }, [isSelected, isCaptionEmpty]); const ref = (0,external_wp_element_namespaceObject.useCallback)( (node) => { if (node && isCaptionEmpty) { node.focus(); } }, [isCaptionEmpty] ); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ showToolbarButton && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToolbarButton, { onClick: () => { setShowCaption(!showCaption); if (showCaption && caption) { setAttributes({ [attributeKey]: void 0 }); } }, icon, isPressed: showCaption, label: showCaption ? removeLabel : addLabel } ) }), showCaption && (!RichText.isEmpty(caption) || isSelected) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( RichText, { identifier: attributeKey, tagName, className: dist_clsx( className, excludeElementClassName ? "" : (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)("caption") ), ref, "aria-label": label, placeholder, value: caption, onChange: (value) => setAttributes({ [attributeKey]: value }), inlineToolbar: true, __unstableOnSplitAtEnd: () => insertBlocksAfter( (0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)()) ), readOnly, ...props } ) ] }); } ;// ./node_modules/@wordpress/block-library/build-module/audio/edit.js const ALLOWED_MEDIA_TYPES = ["audio"]; function AudioEdit({ attributes, className, setAttributes, onReplace, isSelected: isSingleSelected, insertBlocksAfter }) { const { id, autoplay, loop, preload, src } = attributes; const [temporaryURL, setTemporaryURL] = (0,external_wp_element_namespaceObject.useState)(attributes.blob); const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)(); const hasNonContentControls = blockEditingMode === "default"; useUploadMediaFromBlobURL({ url: temporaryURL, allowedTypes: ALLOWED_MEDIA_TYPES, onChange: onSelectAudio, onError: onUploadError }); function toggleAttribute(attribute) { return (newValue) => { setAttributes({ [attribute]: newValue }); }; } function onSelectURL(newSrc) { if (newSrc !== src) { const embedBlock = createUpgradedEmbedBlock({ attributes: { url: newSrc } }); if (void 0 !== embedBlock && onReplace) { onReplace(embedBlock); return; } setAttributes({ src: newSrc, id: void 0, blob: void 0 }); setTemporaryURL(); } } const { createErrorNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store); function onUploadError(message) { createErrorNotice(message, { type: "snackbar" }); } function getAutoplayHelp(checked) { return checked ? (0,external_wp_i18n_namespaceObject.__)("Autoplay may cause usability issues for some users.") : null; } function onSelectAudio(media) { if (!media || !media.url) { setAttributes({ src: void 0, id: void 0, caption: void 0, blob: void 0 }); setTemporaryURL(); return; } if ((0,external_wp_blob_namespaceObject.isBlobURL)(media.url)) { setTemporaryURL(media.url); return; } setAttributes({ blob: void 0, src: media.url, id: media.id, caption: media.caption }); setTemporaryURL(); } const classes = dist_clsx(className, { "is-transient": !!temporaryURL }); const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className: classes }); const dropdownMenuProps = useToolsPanelDropdownMenuProps(); if (!src && !temporaryURL) { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.MediaPlaceholder, { icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, { icon: audio_default }), onSelect: onSelectAudio, onSelectURL, accept: "audio/*", allowedTypes: ALLOWED_MEDIA_TYPES, value: attributes, onError: onUploadError } ) }); } return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ isSingleSelected && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.MediaReplaceFlow, { mediaId: id, mediaURL: src, allowedTypes: ALLOWED_MEDIA_TYPES, accept: "audio/*", onSelect: onSelectAudio, onSelectURL, onError: onUploadError, onReset: () => onSelectAudio(void 0) } ) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)( external_wp_components_namespaceObject.__experimentalToolsPanel, { label: (0,external_wp_i18n_namespaceObject.__)("Settings"), resetAll: () => { setAttributes({ autoplay: false, loop: false, preload: void 0 }); }, dropdownMenuProps, children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)("Autoplay"), isShownByDefault: true, hasValue: () => !!autoplay, onDeselect: () => setAttributes({ autoplay: false }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Autoplay"), onChange: toggleAttribute("autoplay"), checked: !!autoplay, help: getAutoplayHelp } ) } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)("Loop"), isShownByDefault: true, hasValue: () => !!loop, onDeselect: () => setAttributes({ loop: false }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Loop"), onChange: toggleAttribute("loop"), checked: !!loop } ) } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)("Preload"), isShownByDefault: true, hasValue: () => !!preload, onDeselect: () => setAttributes({ preload: void 0 }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.SelectControl, { __next40pxDefaultSize: true, __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject._x)( "Preload", "noun; Audio block parameter" ), value: preload || "", onChange: (value) => setAttributes({ preload: value || void 0 }), options: [ { value: "", label: (0,external_wp_i18n_namespaceObject.__)("Browser default") }, { value: "auto", label: (0,external_wp_i18n_namespaceObject.__)("Auto") }, { value: "metadata", label: (0,external_wp_i18n_namespaceObject.__)("Metadata") }, { value: "none", label: (0,external_wp_i18n_namespaceObject._x)("None", "Preload value") } ] } ) } ) ] } ) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { ...blockProps, children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Disabled, { isDisabled: !isSingleSelected, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("audio", { controls: "controls", src: src ?? temporaryURL }) }), !!temporaryURL && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( Caption, { attributes, setAttributes, isSelected: isSingleSelected, insertBlocksAfter, label: (0,external_wp_i18n_namespaceObject.__)("Audio caption text"), showToolbarButton: isSingleSelected && hasNonContentControls } ) ] }) ] }); } var edit_default = AudioEdit; ;// ./node_modules/@wordpress/block-library/build-module/audio/block.json const audio_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/audio","title":"Audio","category":"media","description":"Embed a simple audio player.","keywords":["music","sound","podcast","recording"],"textdomain":"default","attributes":{"blob":{"type":"string","role":"local"},"src":{"type":"string","source":"attribute","selector":"audio","attribute":"src","role":"content"},"caption":{"type":"rich-text","source":"rich-text","selector":"figcaption","role":"content"},"id":{"type":"number","role":"content"},"autoplay":{"type":"boolean","source":"attribute","selector":"audio","attribute":"autoplay"},"loop":{"type":"boolean","source":"attribute","selector":"audio","attribute":"loop"},"preload":{"type":"string","source":"attribute","selector":"audio","attribute":"preload"}},"supports":{"anchor":true,"align":true,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-audio-editor","style":"wp-block-audio"}'); ;// ./node_modules/@wordpress/block-library/build-module/audio/save.js function audio_save_save({ attributes }) { const { autoplay, caption, loop, preload, src } = attributes; return src && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "audio", { controls: "controls", src, autoPlay: autoplay, loop, preload } ), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", value: caption, className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)( "caption" ) } ) ] }); } ;// ./node_modules/@wordpress/block-library/build-module/audio/transforms.js const transforms = { from: [ { type: "files", isMatch(files) { return files.length === 1 && files[0].type.indexOf("audio/") === 0; }, transform(files) { const file = files[0]; const block = (0,external_wp_blocks_namespaceObject.createBlock)("core/audio", { blob: (0,external_wp_blob_namespaceObject.createBlobURL)(file) }); return block; } }, { type: "shortcode", tag: "audio", attributes: { src: { type: "string", shortcode: ({ named: { src, mp3, m4a, ogg, wav, wma } }) => { return src || mp3 || m4a || ogg || wav || wma; } }, loop: { type: "string", shortcode: ({ named: { loop } }) => { return loop; } }, autoplay: { type: "string", shortcode: ({ named: { autoplay } }) => { return autoplay; } }, preload: { type: "string", shortcode: ({ named: { preload } }) => { return preload; } } } } ] }; var transforms_default = transforms; ;// ./node_modules/@wordpress/block-library/build-module/audio/index.js const { name: audio_name } = audio_block_namespaceObject; const audio_settings = { icon: audio_default, example: { attributes: { src: "https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg" }, viewportWidth: 350 }, transforms: transforms_default, deprecated: deprecated_deprecated_default, edit: edit_default, save: audio_save_save }; const audio_init = () => initBlock({ name: audio_name, metadata: audio_block_namespaceObject, settings: audio_settings }); ;// ./node_modules/@wordpress/icons/build-module/library/breadcrumbs.js var breadcrumbs_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4 13.5h3v-3H4v3Zm6-3.5 2 2-2 2 1 1 3-3-3-3-1 1Zm7 .5v3h3v-3h-3Z" }) }); ;// ./node_modules/@wordpress/block-library/build-module/breadcrumbs/block.json const breadcrumbs_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/breadcrumbs","title":"Breadcrumbs","__experimental":true,"category":"theme","description":"Display a breadcrumb trail for hierarchical post types or based on taxonomy terms.","textdomain":"default","attributes":{"type":{"type":"string","default":"auto","enum":["auto","postWithTerms","postWithAncestors"]},"separator":{"type":"string","default":"/"},"showHomeLink":{"type":"boolean","default":true}},"usesContext":["postId","postType","templateSlug"],"supports":{"html":false,"spacing":{"margin":true,"padding":true},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":false,"color":true,"width":true,"style":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"style":"wp-block-breadcrumbs"}'); ;// ./node_modules/@wordpress/block-library/build-module/breadcrumbs/edit.js const separatorDefaultValue = "/"; const typeDefaultValue = "auto"; const BREADCRUMB_TYPES = { auto: { help: (0,external_wp_i18n_namespaceObject.__)( "Try to automatically determine the best type of breadcrumb for the template." ) }, postWithAncestors: { help: (0,external_wp_i18n_namespaceObject.__)( "Shows breadcrumbs based on post hierarchy. Only works for hierarchical post types." ), placeholderItems: [(0,external_wp_i18n_namespaceObject.__)("Ancestor"), (0,external_wp_i18n_namespaceObject.__)("Parent")] }, postWithTerms: { help: (0,external_wp_i18n_namespaceObject.__)( "Shows breadcrumbs based on taxonomy terms. Chooses the first taxonomy with assigned terms and includes ancestors if the taxonomy is hierarchical." ), placeholderItems: [(0,external_wp_i18n_namespaceObject.__)("Category")] } }; function BreadcrumbEdit({ attributes, setAttributes, context: { postId, postType, templateSlug } }) { const { separator, showHomeLink, type } = attributes; const { post, isPostTypeHierarchical, hasTermsAssigned, isLoading } = (0,external_wp_data_namespaceObject.useSelect)( (select) => { if (!postType) { return {}; } const _post = select(external_wp_coreData_namespaceObject.store).getEntityRecord( "postType", postType, postId ); const postTypeObject = select(external_wp_coreData_namespaceObject.store).getPostType(postType); const postTypeHasTaxonomies = postTypeObject && postTypeObject.taxonomies.length; let taxonomies; if (postTypeHasTaxonomies) { taxonomies = select(external_wp_coreData_namespaceObject.store).getTaxonomies({ type: postType, per_page: -1 }); } return { post: _post, isPostTypeHierarchical: postTypeObject?.hierarchical, hasTermsAssigned: _post && (taxonomies || []).filter( ({ visibility }) => visibility?.publicly_queryable ).some((taxonomy) => { return !!_post[taxonomy.rest_base]?.length; }), isLoading: !_post || !postTypeObject || postTypeHasTaxonomies && !taxonomies }; }, [postType, postId] ); const [invalidationKey, setInvalidationKey] = (0,external_wp_element_namespaceObject.useState)(0); (0,external_wp_element_namespaceObject.useEffect)(() => { setInvalidationKey((c) => c + 1); }, [post]); const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)(); const dropdownMenuProps = useToolsPanelDropdownMenuProps(); const { content } = (0,external_wp_serverSideRender_namespaceObject.useServerSideRender)({ attributes, skipBlockSupportAttributes: true, block: "core/breadcrumbs", urlQueryArgs: { post_id: postId, invalidationKey } }); if (isLoading) { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}) }); } let breadcrumbsType; const isSpecificSupportedTypeSet = [ "postWithAncestors", "postWithTerms" ].includes(type); if (isSpecificSupportedTypeSet) { breadcrumbsType = type; } else { breadcrumbsType = isPostTypeHierarchical ? "postWithAncestors" : "postWithTerms"; } let placeholder = null; const showPlaceholder = !postId || !postType || // When `templateSlug` is set only show placeholder if the post type is not. // This is needed because when we are showing the template in post editor we // want to show the real breadcrumbs if we have the post type. templateSlug && !postType || breadcrumbsType === "postWithAncestors" && !isPostTypeHierarchical || breadcrumbsType === "postWithTerms" && !hasTermsAssigned; if (showPlaceholder) { const placeholderItems = [ showHomeLink && (0,external_wp_i18n_namespaceObject.__)("Home"), // For now if we are adding this in a template show a generic placeholder. ...templateSlug && !isSpecificSupportedTypeSet ? [(0,external_wp_i18n_namespaceObject.__)("Page")] : BREADCRUMB_TYPES[breadcrumbsType].placeholderItems ].filter(Boolean); placeholder = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "nav", { style: { "--separator": `'${separator}'` }, inert: "true", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("ol", { children: [ placeholderItems.map((text, index) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("li", { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href: `#breadcrumbs-pseudo-link-${index}`, children: text }) }, index)), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("li", { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { "aria-current": "page", children: (0,external_wp_i18n_namespaceObject.__)("Current") }) }) ] }) } ); } return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)( external_wp_components_namespaceObject.__experimentalToolsPanel, { label: (0,external_wp_i18n_namespaceObject.__)("Settings"), resetAll: () => { setAttributes({ separator: separatorDefaultValue, showHomeLink: true, type: typeDefaultValue }); }, dropdownMenuProps, children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)("Type"), isShownByDefault: true, hasValue: () => type !== typeDefaultValue, onDeselect: () => setAttributes({ type: typeDefaultValue }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.SelectControl, { __nextHasNoMarginBottom: true, __next40pxDefaultSize: true, label: (0,external_wp_i18n_namespaceObject.__)("Type"), value: type, onChange: (value) => setAttributes({ type: value }), options: [ { label: (0,external_wp_i18n_namespaceObject.__)("Auto"), value: "auto" }, { label: (0,external_wp_i18n_namespaceObject.__)("Post with ancestors"), value: "postWithAncestors" }, { label: (0,external_wp_i18n_namespaceObject.__)("Post with terms"), value: "postWithTerms" } ], help: BREADCRUMB_TYPES[type].help } ) } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)("Show home link"), isShownByDefault: true, hasValue: () => !showHomeLink, onDeselect: () => setAttributes({ showHomeLink: true }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Show home link"), onChange: (value) => setAttributes({ showHomeLink: value }), checked: showHomeLink } ) } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)("Separator"), isShownByDefault: true, hasValue: () => separator !== separatorDefaultValue, onDeselect: () => setAttributes({ separator: separatorDefaultValue }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.TextControl, { __nextHasNoMarginBottom: true, __next40pxDefaultSize: true, autoComplete: "off", label: (0,external_wp_i18n_namespaceObject.__)("Separator"), value: separator, onChange: (value) => setAttributes({ separator: value }), onBlur: () => { if (!separator) { setAttributes({ separator: separatorDefaultValue }); } } } ) } ) ] } ) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: showPlaceholder ? placeholder : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, { inert: "true", children: content }) }) ] }); } ;// ./node_modules/@wordpress/block-library/build-module/breadcrumbs/index.js const { name: breadcrumbs_name } = breadcrumbs_block_namespaceObject; const breadcrumbs_settings = { icon: breadcrumbs_default, edit: BreadcrumbEdit }; const breadcrumbs_init = () => initBlock({ name: breadcrumbs_name, metadata: breadcrumbs_block_namespaceObject, settings: breadcrumbs_settings }); ;// ./node_modules/@wordpress/icons/build-module/library/button.js var button_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M8 12.5h8V11H8v1.5Z M19 6.5H5a2 2 0 0 0-2 2V15a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a2 2 0 0 0-2-2ZM5 8h14a.5.5 0 0 1 .5.5V15a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V8.5A.5.5 0 0 1 5 8Z" }) }); ;// ./node_modules/@wordpress/block-library/build-module/utils/migrate-font-family.js const { cleanEmptyObject } = unlock(external_wp_blockEditor_namespaceObject.privateApis); function migrate_font_family_default(attributes) { if (!attributes?.style?.typography?.fontFamily) { return attributes; } const { fontFamily, ...typography } = attributes.style.typography; return { ...attributes, style: cleanEmptyObject({ ...attributes.style, typography }), fontFamily: fontFamily.split("|").pop() }; } ;// ./node_modules/@wordpress/block-library/build-module/button/deprecated.js const migrateBorderRadius = (attributes) => { const { borderRadius, ...newAttributes } = attributes; const oldBorderRadius = [ borderRadius, newAttributes.style?.border?.radius ].find((possibleBorderRadius) => { return typeof possibleBorderRadius === "number" && possibleBorderRadius !== 0; }); if (!oldBorderRadius) { return newAttributes; } return { ...newAttributes, style: { ...newAttributes.style, border: { ...newAttributes.style?.border, radius: `${oldBorderRadius}px` } } }; }; function migrateAlign(attributes) { if (!attributes.align) { return attributes; } const { align, ...otherAttributes } = attributes; return { ...otherAttributes, className: dist_clsx( otherAttributes.className, `align${attributes.align}` ) }; } const migrateCustomColorsAndGradients = (attributes) => { if (!attributes.customTextColor && !attributes.customBackgroundColor && !attributes.customGradient) { return attributes; } const style = { color: {} }; if (attributes.customTextColor) { style.color.text = attributes.customTextColor; } if (attributes.customBackgroundColor) { style.color.background = attributes.customBackgroundColor; } if (attributes.customGradient) { style.color.gradient = attributes.customGradient; } const { customTextColor, customBackgroundColor, customGradient, ...restAttributes } = attributes; return { ...restAttributes, style }; }; const oldColorsMigration = (attributes) => { const { color, textColor, ...restAttributes } = { ...attributes, customTextColor: attributes.textColor && "#" === attributes.textColor[0] ? attributes.textColor : void 0, customBackgroundColor: attributes.color && "#" === attributes.color[0] ? attributes.color : void 0 }; return migrateCustomColorsAndGradients(restAttributes); }; const blockAttributes = { url: { type: "string", source: "attribute", selector: "a", attribute: "href" }, title: { type: "string", source: "attribute", selector: "a", attribute: "title" }, text: { type: "string", source: "html", selector: "a" } }; const v12 = { attributes: { tagName: { type: "string", enum: ["a", "button"], default: "a" }, type: { type: "string", default: "button" }, textAlign: { type: "string" }, url: { type: "string", source: "attribute", selector: "a", attribute: "href" }, title: { type: "string", source: "attribute", selector: "a,button", attribute: "title", role: "content" }, text: { type: "rich-text", source: "rich-text", selector: "a,button", role: "content" }, linkTarget: { type: "string", source: "attribute", selector: "a", attribute: "target", role: "content" }, rel: { type: "string", source: "attribute", selector: "a", attribute: "rel", role: "content" }, placeholder: { type: "string" }, backgroundColor: { type: "string" }, textColor: { type: "string" }, gradient: { type: "string" }, width: { type: "number" } }, supports: { anchor: true, align: true, alignWide: false, color: { __experimentalSkipSerialization: true, gradients: true, __experimentalDefaultControls: { background: true, text: true } }, typography: { fontSize: true, lineHeight: true, __experimentalFontFamily: true, __experimentalFontWeight: true, __experimentalFontStyle: true, __experimentalTextTransform: true, __experimentalTextDecoration: true, __experimentalLetterSpacing: true, __experimentalWritingMode: true, __experimentalDefaultControls: { fontSize: true } }, reusable: false, shadow: { __experimentalSkipSerialization: true }, spacing: { __experimentalSkipSerialization: true, padding: ["horizontal", "vertical"], __experimentalDefaultControls: { padding: true } }, __experimentalBorder: { color: true, radius: true, style: true, width: true, __experimentalSkipSerialization: true, __experimentalDefaultControls: { color: true, radius: true, style: true, width: true } }, __experimentalSelector: ".wp-block-button__link", interactivity: { clientNavigation: true } }, save({ attributes, className }) { const { tagName, type, textAlign, fontSize, linkTarget, rel, style, text, title, url, width } = attributes; const TagName = tagName || "a"; const isButtonTag = "button" === TagName; const buttonType = type || "button"; const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes); const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes); const spacingProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetSpacingClassesAndStyles)(attributes); const shadowProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetShadowClassesAndStyles)(attributes); const buttonClasses = dist_clsx( "wp-block-button__link", colorProps.className, borderProps.className, { [`has-text-align-${textAlign}`]: textAlign, // For backwards compatibility add style that isn't provided via // block support. "no-border-radius": style?.border?.radius === 0 }, (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)("button") ); const buttonStyle = { ...borderProps.style, ...colorProps.style, ...spacingProps.style, ...shadowProps.style }; const wrapperClasses = dist_clsx(className, { [`has-custom-width wp-block-button__width-${width}`]: width, [`has-custom-font-size`]: fontSize || style?.typography?.fontSize }); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: TagName, type: isButtonTag ? buttonType : null, className: buttonClasses, href: isButtonTag ? null : url, title, style: buttonStyle, value: text, target: isButtonTag ? null : linkTarget, rel: isButtonTag ? null : rel } ) }); } }; const v11 = { attributes: { url: { type: "string", source: "attribute", selector: "a", attribute: "href" }, title: { type: "string", source: "attribute", selector: "a", attribute: "title" }, text: { type: "string", source: "html", selector: "a" }, linkTarget: { type: "string", source: "attribute", selector: "a", attribute: "target" }, rel: { type: "string", source: "attribute", selector: "a", attribute: "rel" }, placeholder: { type: "string" }, backgroundColor: { type: "string" }, textColor: { type: "string" }, gradient: { type: "string" }, width: { type: "number" } }, supports: { anchor: true, align: true, alignWide: false, color: { __experimentalSkipSerialization: true, gradients: true, __experimentalDefaultControls: { background: true, text: true } }, typography: { fontSize: true, __experimentalFontFamily: true, __experimentalDefaultControls: { fontSize: true } }, reusable: false, spacing: { __experimentalSkipSerialization: true, padding: ["horizontal", "vertical"], __experimentalDefaultControls: { padding: true } }, __experimentalBorder: { radius: true, __experimentalSkipSerialization: true, __experimentalDefaultControls: { radius: true } }, __experimentalSelector: ".wp-block-button__link" }, save({ attributes, className }) { const { fontSize, linkTarget, rel, style, text, title, url, width } = attributes; if (!text) { return null; } const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes); const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes); const spacingProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetSpacingClassesAndStyles)(attributes); const buttonClasses = dist_clsx( "wp-block-button__link", colorProps.className, borderProps.className, { // For backwards compatibility add style that isn't provided via // block support. "no-border-radius": style?.border?.radius === 0 } ); const buttonStyle = { ...borderProps.style, ...colorProps.style, ...spacingProps.style }; const wrapperClasses = dist_clsx(className, { [`has-custom-width wp-block-button__width-${width}`]: width, [`has-custom-font-size`]: fontSize || style?.typography?.fontSize }); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "a", className: buttonClasses, href: url, title, style: buttonStyle, value: text, target: linkTarget, rel } ) }); } }; const v10 = { attributes: { url: { type: "string", source: "attribute", selector: "a", attribute: "href" }, title: { type: "string", source: "attribute", selector: "a", attribute: "title" }, text: { type: "string", source: "html", selector: "a" }, linkTarget: { type: "string", source: "attribute", selector: "a", attribute: "target" }, rel: { type: "string", source: "attribute", selector: "a", attribute: "rel" }, placeholder: { type: "string" }, backgroundColor: { type: "string" }, textColor: { type: "string" }, gradient: { type: "string" }, width: { type: "number" } }, supports: { anchor: true, align: true, alignWide: false, color: { __experimentalSkipSerialization: true, gradients: true }, typography: { fontSize: true, __experimentalFontFamily: true }, reusable: false, spacing: { __experimentalSkipSerialization: true, padding: ["horizontal", "vertical"], __experimentalDefaultControls: { padding: true } }, __experimentalBorder: { radius: true, __experimentalSkipSerialization: true }, __experimentalSelector: ".wp-block-button__link" }, save({ attributes, className }) { const { fontSize, linkTarget, rel, style, text, title, url, width } = attributes; if (!text) { return null; } const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes); const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes); const spacingProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetSpacingClassesAndStyles)(attributes); const buttonClasses = dist_clsx( "wp-block-button__link", colorProps.className, borderProps.className, { // For backwards compatibility add style that isn't provided via // block support. "no-border-radius": style?.border?.radius === 0 } ); const buttonStyle = { ...borderProps.style, ...colorProps.style, ...spacingProps.style }; const wrapperClasses = dist_clsx(className, { [`has-custom-width wp-block-button__width-${width}`]: width, [`has-custom-font-size`]: fontSize || style?.typography?.fontSize }); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "a", className: buttonClasses, href: url, title, style: buttonStyle, value: text, target: linkTarget, rel } ) }); }, migrate: migrate_font_family_default, isEligible({ style }) { return style?.typography?.fontFamily; } }; const deprecated = [ v12, v11, v10, { supports: { anchor: true, align: true, alignWide: false, color: { __experimentalSkipSerialization: true, gradients: true }, typography: { fontSize: true, __experimentalFontFamily: true }, reusable: false, __experimentalSelector: ".wp-block-button__link" }, attributes: { ...blockAttributes, linkTarget: { type: "string", source: "attribute", selector: "a", attribute: "target" }, rel: { type: "string", source: "attribute", selector: "a", attribute: "rel" }, placeholder: { type: "string" }, backgroundColor: { type: "string" }, textColor: { type: "string" }, gradient: { type: "string" }, width: { type: "number" } }, isEligible({ style }) { return typeof style?.border?.radius === "number"; }, save({ attributes, className }) { const { fontSize, linkTarget, rel, style, text, title, url, width } = attributes; if (!text) { return null; } const borderRadius = style?.border?.radius; const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes); const buttonClasses = dist_clsx( "wp-block-button__link", colorProps.className, { "no-border-radius": style?.border?.radius === 0 } ); const buttonStyle = { borderRadius: borderRadius ? borderRadius : void 0, ...colorProps.style }; const wrapperClasses = dist_clsx(className, { [`has-custom-width wp-block-button__width-${width}`]: width, [`has-custom-font-size`]: fontSize || style?.typography?.fontSize }); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "a", className: buttonClasses, href: url, title, style: buttonStyle, value: text, target: linkTarget, rel } ) }); }, migrate: (0,external_wp_compose_namespaceObject.compose)(migrate_font_family_default, migrateBorderRadius) }, { supports: { anchor: true, align: true, alignWide: false, color: { __experimentalSkipSerialization: true }, reusable: false, __experimentalSelector: ".wp-block-button__link" }, attributes: { ...blockAttributes, linkTarget: { type: "string", source: "attribute", selector: "a", attribute: "target" }, rel: { type: "string", source: "attribute", selector: "a", attribute: "rel" }, placeholder: { type: "string" }, borderRadius: { type: "number" }, backgroundColor: { type: "string" }, textColor: { type: "string" }, gradient: { type: "string" }, style: { type: "object" }, width: { type: "number" } }, save({ attributes, className }) { const { borderRadius, linkTarget, rel, text, title, url, width } = attributes; const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes); const buttonClasses = dist_clsx( "wp-block-button__link", colorProps.className, { "no-border-radius": borderRadius === 0 } ); const buttonStyle = { borderRadius: borderRadius ? borderRadius + "px" : void 0, ...colorProps.style }; const wrapperClasses = dist_clsx(className, { [`has-custom-width wp-block-button__width-${width}`]: width }); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "a", className: buttonClasses, href: url, title, style: buttonStyle, value: text, target: linkTarget, rel } ) }); }, migrate: (0,external_wp_compose_namespaceObject.compose)(migrate_font_family_default, migrateBorderRadius) }, { supports: { anchor: true, align: true, alignWide: false, color: { __experimentalSkipSerialization: true }, reusable: false, __experimentalSelector: ".wp-block-button__link" }, attributes: { ...blockAttributes, linkTarget: { type: "string", source: "attribute", selector: "a", attribute: "target" }, rel: { type: "string", source: "attribute", selector: "a", attribute: "rel" }, placeholder: { type: "string" }, borderRadius: { type: "number" }, backgroundColor: { type: "string" }, textColor: { type: "string" }, gradient: { type: "string" }, style: { type: "object" }, width: { type: "number" } }, save({ attributes, className }) { const { borderRadius, linkTarget, rel, text, title, url, width } = attributes; const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes); const buttonClasses = dist_clsx( "wp-block-button__link", colorProps.className, { "no-border-radius": borderRadius === 0 } ); const buttonStyle = { borderRadius: borderRadius ? borderRadius + "px" : void 0, ...colorProps.style }; const wrapperClasses = dist_clsx(className, { [`has-custom-width wp-block-button__width-${width}`]: width }); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "a", className: buttonClasses, href: url, title, style: buttonStyle, value: text, target: linkTarget, rel } ) }); }, migrate: (0,external_wp_compose_namespaceObject.compose)(migrate_font_family_default, migrateBorderRadius) }, { supports: { align: true, alignWide: false, color: { gradients: true } }, attributes: { ...blockAttributes, linkTarget: { type: "string", source: "attribute", selector: "a", attribute: "target" }, rel: { type: "string", source: "attribute", selector: "a", attribute: "rel" }, placeholder: { type: "string" }, borderRadius: { type: "number" }, backgroundColor: { type: "string" }, textColor: { type: "string" }, gradient: { type: "string" }, style: { type: "object" } }, save({ attributes }) { const { borderRadius, linkTarget, rel, text, title, url } = attributes; const buttonClasses = dist_clsx("wp-block-button__link", { "no-border-radius": borderRadius === 0 }); const buttonStyle = { borderRadius: borderRadius ? borderRadius + "px" : void 0 }; return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "a", className: buttonClasses, href: url, title, style: buttonStyle, value: text, target: linkTarget, rel } ); }, migrate: migrateBorderRadius }, { supports: { align: true, alignWide: false }, attributes: { ...blockAttributes, linkTarget: { type: "string", source: "attribute", selector: "a", attribute: "target" }, rel: { type: "string", source: "attribute", selector: "a", attribute: "rel" }, placeholder: { type: "string" }, borderRadius: { type: "number" }, backgroundColor: { type: "string" }, textColor: { type: "string" }, customBackgroundColor: { type: "string" }, customTextColor: { type: "string" }, customGradient: { type: "string" }, gradient: { type: "string" } }, isEligible: (attributes) => !!attributes.customTextColor || !!attributes.customBackgroundColor || !!attributes.customGradient || !!attributes.align, migrate: (0,external_wp_compose_namespaceObject.compose)( migrateBorderRadius, migrateCustomColorsAndGradients, migrateAlign ), save({ attributes }) { const { backgroundColor, borderRadius, customBackgroundColor, customTextColor, customGradient, linkTarget, gradient, rel, text, textColor, title, url } = attributes; const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", textColor); const backgroundClass = !customGradient && (0,external_wp_blockEditor_namespaceObject.getColorClassName)("background-color", backgroundColor); const gradientClass = (0,external_wp_blockEditor_namespaceObject.__experimentalGetGradientClass)(gradient); const buttonClasses = dist_clsx("wp-block-button__link", { "has-text-color": textColor || customTextColor, [textClass]: textClass, "has-background": backgroundColor || customBackgroundColor || customGradient || gradient, [backgroundClass]: backgroundClass, "no-border-radius": borderRadius === 0, [gradientClass]: gradientClass }); const buttonStyle = { background: customGradient ? customGradient : void 0, backgroundColor: backgroundClass || customGradient || gradient ? void 0 : customBackgroundColor, color: textClass ? void 0 : customTextColor, borderRadius: borderRadius ? borderRadius + "px" : void 0 }; return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "a", className: buttonClasses, href: url, title, style: buttonStyle, value: text, target: linkTarget, rel } ) }); } }, { attributes: { ...blockAttributes, align: { type: "string", default: "none" }, backgroundColor: { type: "string" }, textColor: { type: "string" }, customBackgroundColor: { type: "string" }, customTextColor: { type: "string" }, linkTarget: { type: "string", source: "attribute", selector: "a", attribute: "target" }, rel: { type: "string", source: "attribute", selector: "a", attribute: "rel" }, placeholder: { type: "string" } }, isEligible(attribute) { return attribute.className && attribute.className.includes("is-style-squared"); }, migrate(attributes) { let newClassName = attributes.className; if (newClassName) { newClassName = newClassName.replace(/is-style-squared[\s]?/, "").trim(); } return migrateBorderRadius( migrateCustomColorsAndGradients({ ...attributes, className: newClassName ? newClassName : void 0, borderRadius: 0 }) ); }, save({ attributes }) { const { backgroundColor, customBackgroundColor, customTextColor, linkTarget, rel, text, textColor, title, url } = attributes; const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", textColor); const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)( "background-color", backgroundColor ); const buttonClasses = dist_clsx("wp-block-button__link", { "has-text-color": textColor || customTextColor, [textClass]: textClass, "has-background": backgroundColor || customBackgroundColor, [backgroundClass]: backgroundClass }); const buttonStyle = { backgroundColor: backgroundClass ? void 0 : customBackgroundColor, color: textClass ? void 0 : customTextColor }; return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "a", className: buttonClasses, href: url, title, style: buttonStyle, value: text, target: linkTarget, rel } ) }); } }, { attributes: { ...blockAttributes, align: { type: "string", default: "none" }, backgroundColor: { type: "string" }, textColor: { type: "string" }, customBackgroundColor: { type: "string" }, customTextColor: { type: "string" } }, migrate: oldColorsMigration, save({ attributes }) { const { url, text, title, backgroundColor, textColor, customBackgroundColor, customTextColor } = attributes; const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", textColor); const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)( "background-color", backgroundColor ); const buttonClasses = dist_clsx("wp-block-button__link", { "has-text-color": textColor || customTextColor, [textClass]: textClass, "has-background": backgroundColor || customBackgroundColor, [backgroundClass]: backgroundClass }); const buttonStyle = { backgroundColor: backgroundClass ? void 0 : customBackgroundColor, color: textClass ? void 0 : customTextColor }; return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "a", className: buttonClasses, href: url, title, style: buttonStyle, value: text } ) }); } }, { attributes: { ...blockAttributes, color: { type: "string" }, textColor: { type: "string" }, align: { type: "string", default: "none" } }, save({ attributes }) { const { url, text, title, align, color, textColor } = attributes; const buttonStyle = { backgroundColor: color, color: textColor }; const linkClass = "wp-block-button__link"; return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: `align${align}`, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "a", className: linkClass, href: url, title, style: buttonStyle, value: text } ) }); }, migrate: oldColorsMigration }, { attributes: { ...blockAttributes, color: { type: "string" }, textColor: { type: "string" }, align: { type: "string", default: "none" } }, save({ attributes }) { const { url, text, title, align, color, textColor } = attributes; return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "div", { className: `align${align}`, style: { backgroundColor: color }, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "a", href: url, title, style: { color: textColor }, value: text } ) } ); }, migrate: oldColorsMigration } ]; var button_deprecated_deprecated_default = deprecated; ;// ./node_modules/@wordpress/block-library/build-module/button/constants.js const NEW_TAB_REL = "noreferrer noopener"; const NEW_TAB_TARGET = "_blank"; const NOFOLLOW_REL = "nofollow"; ;// ./node_modules/@wordpress/block-library/build-module/button/get-updated-link-attributes.js function getUpdatedLinkAttributes({ rel = "", url = "", opensInNewTab, nofollow }) { let newLinkTarget; let updatedRel = rel; if (opensInNewTab) { newLinkTarget = NEW_TAB_TARGET; updatedRel = updatedRel?.includes(NEW_TAB_REL) ? updatedRel : updatedRel + ` ${NEW_TAB_REL}`; } else { const relRegex = new RegExp(`\\b${NEW_TAB_REL}\\s*`, "g"); updatedRel = updatedRel?.replace(relRegex, "").trim(); } if (nofollow) { updatedRel = updatedRel?.includes(NOFOLLOW_REL) ? updatedRel : (updatedRel + ` ${NOFOLLOW_REL}`).trim(); } else { const relRegex = new RegExp(`\\b${NOFOLLOW_REL}\\s*`, "g"); updatedRel = updatedRel?.replace(relRegex, "").trim(); } return { url: (0,external_wp_url_namespaceObject.prependHTTP)(url), linkTarget: newLinkTarget, rel: updatedRel || void 0 }; } ;// ./node_modules/@wordpress/block-library/build-module/utils/remove-anchor-tag.js function removeAnchorTag(value) { return value.toString().replace(/<\/?a[^>]*>/g, ""); } ;// external ["wp","keycodes"] const external_wp_keycodes_namespaceObject = window["wp"]["keycodes"]; ;// ./node_modules/@wordpress/icons/build-module/library/link.js var link_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z" }) }); ;// ./node_modules/@wordpress/icons/build-module/library/link-off.js var link_off_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z" }) }); ;// ./node_modules/@wordpress/block-library/build-module/button/edit.js const { HTMLElementControl } = unlock(external_wp_blockEditor_namespaceObject.privateApis); const LINK_SETTINGS = [ ...external_wp_blockEditor_namespaceObject.LinkControl.DEFAULT_LINK_SETTINGS, { id: "nofollow", title: (0,external_wp_i18n_namespaceObject.__)("Mark as nofollow") } ]; function useEnter(props) { const { replaceBlocks, selectionChange } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store); const { getBlock, getBlockRootClientId, getBlockIndex } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store); const propsRef = (0,external_wp_element_namespaceObject.useRef)(props); propsRef.current = props; return (0,external_wp_compose_namespaceObject.useRefEffect)((element) => { function onKeyDown(event) { if (event.defaultPrevented || event.keyCode !== external_wp_keycodes_namespaceObject.ENTER) { return; } const { content, clientId } = propsRef.current; if (content.length) { return; } event.preventDefault(); const topParentListBlock = getBlock( getBlockRootClientId(clientId) ); const blockIndex = getBlockIndex(clientId); const head = (0,external_wp_blocks_namespaceObject.cloneBlock)({ ...topParentListBlock, innerBlocks: topParentListBlock.innerBlocks.slice( 0, blockIndex ) }); const middle = (0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)()); const after = topParentListBlock.innerBlocks.slice( blockIndex + 1 ); const tail = after.length ? [ (0,external_wp_blocks_namespaceObject.cloneBlock)({ ...topParentListBlock, innerBlocks: after }) ] : []; replaceBlocks( topParentListBlock.clientId, [head, middle, ...tail], 1 ); selectionChange(middle.clientId); } element.addEventListener("keydown", onKeyDown); return () => { element.removeEventListener("keydown", onKeyDown); }; }, []); } function WidthPanel({ selectedWidth, setAttributes }) { const dropdownMenuProps = useToolsPanelDropdownMenuProps(); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanel, { label: (0,external_wp_i18n_namespaceObject.__)("Settings"), resetAll: () => setAttributes({ width: void 0 }), dropdownMenuProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)("Width"), isShownByDefault: true, hasValue: () => !!selectedWidth, onDeselect: () => setAttributes({ width: void 0 }), __nextHasNoMarginBottom: true, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToggleGroupControl, { label: (0,external_wp_i18n_namespaceObject.__)("Width"), value: selectedWidth, onChange: (newWidth) => setAttributes({ width: newWidth }), isBlock: true, __next40pxDefaultSize: true, __nextHasNoMarginBottom: true, children: [25, 50, 75, 100].map((widthValue) => { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { value: widthValue, label: (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %d: Percentage value. */ (0,external_wp_i18n_namespaceObject.__)("%d%%"), widthValue ) }, widthValue ); }) } ) } ) } ); } function ButtonEdit(props) { const { attributes, setAttributes, className, isSelected, onReplace, mergeBlocks, clientId, context } = props; const { tagName, textAlign, linkTarget, placeholder, rel, style, text, url, width, metadata } = attributes; const TagName = tagName || "a"; function onKeyDown(event) { if (external_wp_keycodes_namespaceObject.isKeyboardEvent.primary(event, "k")) { startEditing(event); } else if (external_wp_keycodes_namespaceObject.isKeyboardEvent.primaryShift(event, "k")) { unlink(); richTextRef.current?.focus(); } } const [popoverAnchor, setPopoverAnchor] = (0,external_wp_element_namespaceObject.useState)(null); const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBorderProps)(attributes); const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseColorProps)(attributes); const spacingProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetSpacingClassesAndStyles)(attributes); const shadowProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetShadowClassesAndStyles)(attributes); const ref = (0,external_wp_element_namespaceObject.useRef)(); const richTextRef = (0,external_wp_element_namespaceObject.useRef)(); const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([setPopoverAnchor, ref]), onKeyDown }); const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)(); const [isEditingURL, setIsEditingURL] = (0,external_wp_element_namespaceObject.useState)(false); const isURLSet = !!url; const opensInNewTab = linkTarget === NEW_TAB_TARGET; const nofollow = !!rel?.includes(NOFOLLOW_REL); const isLinkTag = "a" === TagName; const { createPageEntity, userCanCreatePages, lockUrlControls = false } = (0,external_wp_data_namespaceObject.useSelect)( (select) => { if (!isSelected) { return {}; } const _settings = select(external_wp_blockEditor_namespaceObject.store).getSettings(); const blockBindingsSource = (0,external_wp_blocks_namespaceObject.getBlockBindingsSource)( metadata?.bindings?.url?.source ); return { createPageEntity: _settings.__experimentalCreatePageEntity, userCanCreatePages: _settings.__experimentalUserCanCreatePages, lockUrlControls: !!metadata?.bindings?.url && !blockBindingsSource?.canUserEditValue?.({ select, context, args: metadata?.bindings?.url?.args }) }; }, [context, isSelected, metadata?.bindings?.url] ); async function handleCreate(pageTitle) { const page = await createPageEntity({ title: pageTitle, status: "draft" }); return { id: page.id, type: page.type, title: page.title.rendered, url: page.link, kind: "post-type" }; } function createButtonText(searchTerm) { return (0,external_wp_element_namespaceObject.createInterpolateElement)( (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: search term. */ (0,external_wp_i18n_namespaceObject.__)("Create page: %s"), searchTerm ), { mark: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("mark", {}) } ); } function startEditing(event) { event.preventDefault(); setIsEditingURL(true); } function unlink() { setAttributes({ url: void 0, linkTarget: void 0, rel: void 0 }); setIsEditingURL(false); } (0,external_wp_element_namespaceObject.useEffect)(() => { if (!isSelected) { setIsEditingURL(false); } }, [isSelected]); const linkValue = (0,external_wp_element_namespaceObject.useMemo)( () => ({ url, opensInNewTab, nofollow }), [url, opensInNewTab, nofollow] ); const useEnterRef = useEnter({ content: text, clientId }); const mergedRef = (0,external_wp_compose_namespaceObject.useMergeRefs)([useEnterRef, richTextRef]); const [fluidTypographySettings, layout] = (0,external_wp_blockEditor_namespaceObject.useSettings)( "typography.fluid", "layout" ); const typographyProps = (0,external_wp_blockEditor_namespaceObject.getTypographyClassesAndStyles)(attributes, { typography: { fluid: fluidTypographySettings }, layout: { wideSize: layout?.wideSize } }); const hasNonContentControls = blockEditingMode === "default"; const hasBlockControls = hasNonContentControls || isLinkTag && !lockUrlControls; return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "div", { ...blockProps, className: dist_clsx(blockProps.className, { [`has-custom-width wp-block-button__width-${width}`]: width }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.RichText, { ref: mergedRef, "aria-label": (0,external_wp_i18n_namespaceObject.__)("Button text"), placeholder: placeholder || (0,external_wp_i18n_namespaceObject.__)("Add text\u2026"), value: text, onChange: (value) => setAttributes({ text: removeAnchorTag(value) }), withoutInteractiveFormatting: true, className: dist_clsx( className, "wp-block-button__link", colorProps.className, borderProps.className, typographyProps.className, { [`has-text-align-${textAlign}`]: textAlign, // For backwards compatibility add style that isn't // provided via block support. "no-border-radius": style?.border?.radius === 0, [`has-custom-font-size`]: blockProps.style.fontSize }, (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)("button") ), style: { ...borderProps.style, ...colorProps.style, ...spacingProps.style, ...shadowProps.style, ...typographyProps.style, writingMode: void 0 }, onReplace, onMerge: mergeBlocks, identifier: "text" } ) } ), hasBlockControls && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: [ hasNonContentControls && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.AlignmentControl, { value: textAlign, onChange: (nextAlign) => { setAttributes({ textAlign: nextAlign }); } } ), isLinkTag && !lockUrlControls && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToolbarButton, { name: "link", icon: !isURLSet ? link_default : link_off_default, title: !isURLSet ? (0,external_wp_i18n_namespaceObject.__)("Link") : (0,external_wp_i18n_namespaceObject.__)("Unlink"), shortcut: !isURLSet ? external_wp_keycodes_namespaceObject.displayShortcut.primary("k") : external_wp_keycodes_namespaceObject.displayShortcut.primaryShift("k"), onClick: !isURLSet ? startEditing : unlink, isActive: isURLSet } ) ] }), isLinkTag && isSelected && (isEditingURL || isURLSet) && !lockUrlControls && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.Popover, { placement: "bottom", onClose: () => { setIsEditingURL(false); richTextRef.current?.focus(); }, anchor: popoverAnchor, focusOnMount: isEditingURL ? "firstElement" : false, __unstableSlotName: "__unstable-block-tools-after", shift: true, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.LinkControl, { value: linkValue, onChange: ({ url: newURL, opensInNewTab: newOpensInNewTab, nofollow: newNofollow }) => setAttributes( getUpdatedLinkAttributes({ rel, url: newURL, opensInNewTab: newOpensInNewTab, nofollow: newNofollow }) ), onRemove: () => { unlink(); richTextRef.current?.focus(); }, forceIsEditingLink: isEditingURL, settings: LINK_SETTINGS, createSuggestion: createPageEntity && handleCreate, withCreateSuggestion: userCanCreatePages, createSuggestionButtonText: createButtonText } ) } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( WidthPanel, { selectedWidth: width, setAttributes } ) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( HTMLElementControl, { tagName, onChange: (value) => setAttributes({ tagName: value }), options: [ { label: (0,external_wp_i18n_namespaceObject.__)("Default ()"), value: "a" }, { label: "" ), { button: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.Button, { __next40pxDefaultSize: true, onClick: handleButtonClick, variant: "link", disabled: isButtonDisabled, accessibleWhenDisabled: true } ) } ); return isNotice ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Notice, { status: "warning", isDismissible: false, children: message }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: message }); } var deleted_navigation_warning_default = DeletedNavigationWarning; ;// ./node_modules/@wordpress/icons/build-module/library/add-submenu.js var add_submenu_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M2 12c0 3.6 2.4 5.5 6 5.5h.5V19l3-2.5-3-2.5v2H8c-2.5 0-4.5-1.5-4.5-4s2-4.5 4.5-4.5h3.5V6H8c-3.6 0-6 2.4-6 6zm19.5-1h-8v1.5h8V11zm0 5h-8v1.5h8V16zm0-10h-8v1.5h8V6z" }) }); ;// ./node_modules/@wordpress/icons/build-module/library/chevron-up.js var chevron_up_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z" }) }); ;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/leaf-more-menu.js const POPOVER_PROPS = { className: "block-editor-block-settings-menu__popover", placement: "bottom-start" }; const BLOCKS_THAT_CAN_BE_CONVERTED_TO_SUBMENU = [ "core/navigation-link", "core/navigation-submenu" ]; function AddSubmenuItem({ block, onClose, expandedState, expand, setInsertedBlock }) { const { insertBlock, replaceBlock, replaceInnerBlocks } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store); const clientId = block.clientId; const isDisabled = !BLOCKS_THAT_CAN_BE_CONVERTED_TO_SUBMENU.includes( block.name ); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.MenuItem, { icon: add_submenu_default, disabled: isDisabled, onClick: () => { const updateSelectionOnInsert = false; const newLink = (0,external_wp_blocks_namespaceObject.createBlock)( constants_DEFAULT_BLOCK.name, constants_DEFAULT_BLOCK.attributes ); if (block.name === "core/navigation-submenu") { insertBlock( newLink, block.innerBlocks.length, clientId, updateSelectionOnInsert ); } else { const newSubmenu = (0,external_wp_blocks_namespaceObject.createBlock)( "core/navigation-submenu", block.attributes, block.innerBlocks ); replaceBlock(clientId, newSubmenu); replaceInnerBlocks( newSubmenu.clientId, [newLink], updateSelectionOnInsert ); } setInsertedBlock(newLink); if (!expandedState[block.clientId]) { expand(block.clientId); } onClose(); }, children: (0,external_wp_i18n_namespaceObject.__)("Add submenu link") } ); } function LeafMoreMenu(props) { const { block } = props; const { clientId } = block; const { moveBlocksDown, moveBlocksUp, removeBlocks } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store); const removeLabel = (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: block name */ (0,external_wp_i18n_namespaceObject.__)("Remove %s"), (0,external_wp_blockEditor_namespaceObject.BlockTitle)({ clientId, maximumLength: 25 }) ); const rootClientId = (0,external_wp_data_namespaceObject.useSelect)( (select) => { const { getBlockRootClientId } = select(external_wp_blockEditor_namespaceObject.store); return getBlockRootClientId(clientId); }, [clientId] ); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.DropdownMenu, { icon: more_vertical_default, label: (0,external_wp_i18n_namespaceObject.__)("Options"), className: "block-editor-block-settings-menu", popoverProps: POPOVER_PROPS, noIcons: true, ...props, children: ({ onClose }) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.MenuGroup, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.MenuItem, { icon: chevron_up_default, onClick: () => { moveBlocksUp([clientId], rootClientId); onClose(); }, children: (0,external_wp_i18n_namespaceObject.__)("Move up") } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.MenuItem, { icon: chevron_down_default, onClick: () => { moveBlocksDown([clientId], rootClientId); onClose(); }, children: (0,external_wp_i18n_namespaceObject.__)("Move down") } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( AddSubmenuItem, { block, onClose, expandedState: props.expandedState, expand: props.expand, setInsertedBlock: props.setInsertedBlock } ) ] }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuGroup, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.MenuItem, { onClick: () => { removeBlocks([clientId], false); onClose(); }, children: removeLabel } ) }) ] }) } ); } ;// ./node_modules/@wordpress/icons/build-module/library/plus.js var plus_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z" }) }); ;// ./node_modules/@wordpress/icons/build-module/library/chevron-right-small.js var chevron_right_small_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z" }) }); ;// ./node_modules/@wordpress/icons/build-module/library/chevron-left-small.js var chevron_left_small_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z" }) }); ;// ./node_modules/@wordpress/block-library/build-module/navigation-link/link-ui/dialog-wrapper.js function BackButton({ className, onBack }) { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.Button, { className, icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? chevron_right_small_default : chevron_left_small_default, onClick: (e) => { e.preventDefault(); onBack(); }, size: "small", children: (0,external_wp_i18n_namespaceObject.__)("Back") } ); } function DialogWrapper({ className, title, description, onBack, children }) { const dialogTitleId = (0,external_wp_compose_namespaceObject.useInstanceId)( DialogWrapper, "link-ui-dialog-title" ); const dialogDescriptionId = (0,external_wp_compose_namespaceObject.useInstanceId)( DialogWrapper, "link-ui-dialog-description" ); const focusOnMountRef = (0,external_wp_compose_namespaceObject.useFocusOnMount)("firstElement"); const backButtonClassName = `${className}__back`; return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)( "div", { className, role: "dialog", "aria-labelledby": dialogTitleId, "aria-describedby": dialogDescriptionId, ref: focusOnMountRef, children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.VisuallyHidden, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("h2", { id: dialogTitleId, children: title }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { id: dialogDescriptionId, children: description }) ] }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(BackButton, { className: backButtonClassName, onBack }), children ] } ); } var dialog_wrapper_default = DialogWrapper; ;// ./node_modules/@wordpress/block-library/build-module/navigation-link/link-ui/page-creator.js function LinkUIPageCreator({ postType, onBack, onPageCreated, initialTitle = "" }) { const [title, setTitle] = (0,external_wp_element_namespaceObject.useState)(initialTitle); const [shouldPublish, setShouldPublish] = (0,external_wp_element_namespaceObject.useState)(false); const isTitleValid = title.trim().length > 0; const { lastError, isSaving } = (0,external_wp_data_namespaceObject.useSelect)( (select) => ({ lastError: select(external_wp_coreData_namespaceObject.store).getLastEntitySaveError( "postType", postType ), isSaving: select(external_wp_coreData_namespaceObject.store).isSavingEntityRecord( "postType", postType ) }), [postType] ); const { saveEntityRecord } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store); async function createPage(event) { event.preventDefault(); if (isSaving || !isTitleValid) { return; } try { const savedRecord = await saveEntityRecord( "postType", postType, { title, status: shouldPublish ? "publish" : "draft" }, { throwOnError: true } ); if (savedRecord) { const pageLink = { id: savedRecord.id, type: postType, title: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(savedRecord.title.rendered), url: savedRecord.link, kind: "post-type" }; onPageCreated(pageLink); } } catch (error) { } } const isSubmitDisabled = isSaving || !isTitleValid; return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( dialog_wrapper_default, { className: "link-ui-page-creator", title: (0,external_wp_i18n_namespaceObject.__)("Create page"), description: (0,external_wp_i18n_namespaceObject.__)("Create a new page to add to your Navigation."), onBack, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalVStack, { className: "link-ui-page-creator__inner", spacing: 4, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("form", { onSubmit: createPage, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, { spacing: 4, children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.TextControl, { __next40pxDefaultSize: true, __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Title"), onChange: setTitle, placeholder: (0,external_wp_i18n_namespaceObject.__)("No title"), value: title } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.CheckboxControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Publish immediately"), help: (0,external_wp_i18n_namespaceObject.__)( "If unchecked, the page will be created as a draft." ), checked: shouldPublish, onChange: setShouldPublish } ), lastError && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Notice, { status: "error", isDismissible: false, children: lastError.message }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, { spacing: 2, justify: "flex-end", children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.Button, { __next40pxDefaultSize: true, variant: "tertiary", onClick: onBack, disabled: isSaving, accessibleWhenDisabled: true, children: (0,external_wp_i18n_namespaceObject.__)("Cancel") } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.Button, { __next40pxDefaultSize: true, variant: "primary", type: "submit", isBusy: isSaving, "aria-disabled": isSubmitDisabled, children: (0,external_wp_i18n_namespaceObject.__)("Create page") } ) ] }) ] }) }) }) } ); } ;// ./node_modules/@wordpress/block-library/build-module/navigation-link/link-ui/block-inserter.js const { PrivateQuickInserter: QuickInserter } = unlock( external_wp_blockEditor_namespaceObject.privateApis ); function LinkUIBlockInserter({ clientId, onBack, onBlockInsert }) { const { rootBlockClientId } = (0,external_wp_data_namespaceObject.useSelect)( (select) => { const { getBlockRootClientId } = select(external_wp_blockEditor_namespaceObject.store); return { rootBlockClientId: getBlockRootClientId(clientId) }; }, [clientId] ); if (!clientId) { return null; } return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( dialog_wrapper_default, { className: "link-ui-block-inserter", title: (0,external_wp_i18n_namespaceObject.__)("Add block"), description: (0,external_wp_i18n_namespaceObject.__)("Choose a block to add to your Navigation."), onBack, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( QuickInserter, { rootClientId: rootBlockClientId, clientId, isAppender: false, prioritizePatterns: false, selectBlockOnInsert: !onBlockInsert, onSelect: onBlockInsert ? onBlockInsert : void 0, hasSearch: false } ) } ); } var block_inserter_default = LinkUIBlockInserter; ;// ./node_modules/@wordpress/block-library/build-module/navigation-link/link-ui/index.js function getSuggestionsQuery(type, kind) { switch (type) { case "post": case "page": return { type: "post", subtype: type }; case "category": return { type: "term", subtype: "category" }; case "tag": return { type: "term", subtype: "post_tag" }; case "post_format": return { type: "post-format" }; default: if (kind === "taxonomy") { return { type: "term", subtype: type }; } if (kind === "post-type") { return { type: "post", subtype: type }; } return { // for custom link which has no type // always show pages as initial suggestions initialSuggestionsSearchOptions: { type: "post", subtype: "page", perPage: 20 } }; } } function UnforwardedLinkUI(props, ref) { const { label, url, opensInNewTab, type, kind, id } = props.link; const { clientId } = props; const postType = type || "page"; const [addingBlock, setAddingBlock] = (0,external_wp_element_namespaceObject.useState)(false); const [addingPage, setAddingPage] = (0,external_wp_element_namespaceObject.useState)(false); const [focusAddBlockButton, setFocusAddBlockButton] = (0,external_wp_element_namespaceObject.useState)(false); const [focusAddPageButton, setFocusAddPageButton] = (0,external_wp_element_namespaceObject.useState)(false); const permissions = (0,external_wp_coreData_namespaceObject.useResourcePermissions)({ kind: "postType", name: postType }); const { isBoundEntityAvailable } = useEntityBinding({ clientId, attributes: props.link }); const link = (0,external_wp_element_namespaceObject.useMemo)( () => ({ url, opensInNewTab, title: label && (0,external_wp_dom_namespaceObject.__unstableStripHTML)(label), kind, type, id }), [label, opensInNewTab, url, kind, type, id] ); const handlePageCreated = (pageLink) => { props.onChange(pageLink); setAddingPage(false); }; const dialogTitleId = (0,external_wp_compose_namespaceObject.useInstanceId)( LinkUI, "link-ui-link-control__title" ); const dialogDescriptionId = (0,external_wp_compose_namespaceObject.useInstanceId)( LinkUI, "link-ui-link-control__description" ); const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)(); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)( external_wp_components_namespaceObject.Popover, { ref, placement: "bottom", onClose: props.onClose, anchor: props.anchor, shift: true, children: [ !addingBlock && !addingPage && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)( "div", { role: "dialog", "aria-labelledby": dialogTitleId, "aria-describedby": dialogDescriptionId, children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.VisuallyHidden, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("h2", { id: dialogTitleId, children: (0,external_wp_i18n_namespaceObject.__)("Add link") }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { id: dialogDescriptionId, children: (0,external_wp_i18n_namespaceObject.__)( "Search for and add a link to your Navigation." ) }) ] }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.LinkControl, { hasTextControl: true, hasRichPreviews: true, value: link, showInitialSuggestions: true, withCreateSuggestion: false, noDirectEntry: !!type, noURLSuggestion: !!type, suggestionsQuery: getSuggestionsQuery(type, kind), onChange: props.onChange, onRemove: props.onRemove, onCancel: props.onCancel, handleEntities: isBoundEntityAvailable, renderControlBottom: () => { if (link?.url?.length) { return null; } return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( LinkUITools, { focusAddBlockButton, focusAddPageButton, setAddingBlock: () => { setAddingBlock(true); setFocusAddBlockButton(false); }, setAddingPage: () => { setAddingPage(true); setFocusAddPageButton(false); }, canAddPage: permissions?.canCreate && type === "page", canAddBlock: blockEditingMode === "default" } ); } } ) ] } ), addingBlock && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( block_inserter_default, { clientId: props.clientId, onBack: () => { setAddingBlock(false); setFocusAddBlockButton(true); setFocusAddPageButton(false); }, onBlockInsert: props?.onBlockInsert } ), addingPage && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( LinkUIPageCreator, { postType, onBack: () => { setAddingPage(false); setFocusAddPageButton(true); setFocusAddBlockButton(false); }, onPageCreated: handlePageCreated, initialTitle: link?.url || "" } ) ] } ); } const LinkUI = (0,external_wp_element_namespaceObject.forwardRef)(UnforwardedLinkUI); const LinkUITools = ({ setAddingBlock, setAddingPage, focusAddBlockButton, focusAddPageButton, canAddPage, canAddBlock }) => { const blockInserterAriaRole = "listbox"; const addBlockButtonRef = (0,external_wp_element_namespaceObject.useRef)(); const addPageButtonRef = (0,external_wp_element_namespaceObject.useRef)(); (0,external_wp_element_namespaceObject.useEffect)(() => { if (focusAddBlockButton) { addBlockButtonRef.current?.focus(); } }, [focusAddBlockButton]); (0,external_wp_element_namespaceObject.useEffect)(() => { if (focusAddPageButton) { addPageButtonRef.current?.focus(); } }, [focusAddPageButton]); if (!canAddPage && !canAddBlock) { return null; } return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, { spacing: 0, className: "link-ui-tools", children: [ canAddPage && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.Button, { __next40pxDefaultSize: true, ref: addPageButtonRef, icon: plus_default, onClick: (e) => { e.preventDefault(); setAddingPage(true); }, "aria-haspopup": blockInserterAriaRole, children: (0,external_wp_i18n_namespaceObject.__)("Create page") } ), canAddBlock && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.Button, { __next40pxDefaultSize: true, ref: addBlockButtonRef, icon: plus_default, onClick: (e) => { e.preventDefault(); setAddingBlock(true); }, "aria-haspopup": blockInserterAriaRole, children: (0,external_wp_i18n_namespaceObject.__)("Add block") } ) ] }); }; var link_ui_default = (/* unused pure expression or super */ null && (LinkUITools)); ;// external ["wp","escapeHtml"] const external_wp_escapeHtml_namespaceObject = window["wp"]["escapeHtml"]; ;// ./node_modules/@wordpress/block-library/build-module/navigation-link/shared/update-attributes.js const shouldSeverEntityLink = (originalUrl, newUrl) => { if (!originalUrl || !newUrl) { return false; } const normalizePath = (path) => { if (!path) { return ""; } return path.replace(/\/+$/, ""); }; const createUrlObject = (url, baseUrl = null) => { try { const base = baseUrl || (typeof window !== "undefined" ? window.location.origin : "https://wordpress.org"); return new URL(url, base); } catch (error) { return null; } }; const originalUrlObj = createUrlObject(originalUrl); if (!originalUrlObj) { return true; } const newUrlObj = createUrlObject(newUrl, originalUrl); if (!newUrlObj) { return true; } const originalHostname = originalUrlObj.hostname; const newHostname = newUrlObj.hostname; const originalPath = normalizePath((0,external_wp_url_namespaceObject.getPath)(originalUrlObj.toString())); const newPath = normalizePath((0,external_wp_url_namespaceObject.getPath)(newUrlObj.toString())); if (originalHostname !== newHostname || originalPath !== newPath) { return true; } const originalP = originalUrlObj.searchParams.get("p"); const newP = newUrlObj.searchParams.get("p"); if (originalP && newP && originalP !== newP) { return true; } const originalPageId = originalUrlObj.searchParams.get("page_id"); const newPageId = newUrlObj.searchParams.get("page_id"); if (originalPageId && newPageId && originalPageId !== newPageId) { return true; } if (originalP && newPageId || originalPageId && newP) { return true; } return false; }; const updateAttributes = (updatedValue = {}, setAttributes, blockAttributes = {}) => { const { label: originalLabel = "", kind: originalKind = "", type: originalType = "" } = blockAttributes; const { title: newLabel = "", // the title of any provided Post. label: newLabelFromLabel = "", // alternative to title url: newUrl, opensInNewTab, id: newID, kind: newKind = originalKind, type: newType = originalType } = updatedValue; const finalNewLabel = newLabel || newLabelFromLabel; const newLabelWithoutHttp = finalNewLabel.replace(/http(s?):\/\//gi, ""); const newUrlWithoutHttp = newUrl?.replace(/http(s?):\/\//gi, "") ?? ""; const useNewLabel = finalNewLabel && finalNewLabel !== originalLabel && // LinkControl without the title field relies // on the check below. Specifically, it assumes that // the URL is the same as a title. // This logic a) looks suspicious and b) should really // live in the LinkControl and not here. It's a great // candidate for future refactoring. newLabelWithoutHttp !== newUrlWithoutHttp; const label = useNewLabel ? (0,external_wp_escapeHtml_namespaceObject.escapeHTML)(finalNewLabel) : originalLabel || (0,external_wp_escapeHtml_namespaceObject.escapeHTML)(newUrlWithoutHttp); const type = newType === "post_tag" ? "tag" : newType.replace("-", "_"); const isBuiltInType = ["post", "page", "tag", "category"].indexOf(type) > -1; const isCustomLink = !newKind && !isBuiltInType || newKind === "custom"; const kind = isCustomLink ? "custom" : newKind; const attributes = { // Passed `url` may already be encoded. To prevent double encoding, decodeURI is executed to revert to the original string. ...newUrl !== void 0 ? { url: newUrl ? encodeURI((0,external_wp_url_namespaceObject.safeDecodeURI)(newUrl)) : newUrl } : {}, ...label && { label }, ...void 0 !== opensInNewTab && { opensInNewTab }, ...kind && { kind }, ...type && type !== "URL" && { type } }; if (newUrl && !newID && blockAttributes.id) { const shouldSever = shouldSeverEntityLink( blockAttributes.url, newUrl ); if (shouldSever) { attributes.id = void 0; attributes.kind = "custom"; attributes.type = "custom"; } } else if (newID && Number.isInteger(newID)) { attributes.id = newID; } else if (blockAttributes.id) { attributes.kind = kind; attributes.type = type; } setAttributes(attributes); const finalId = "id" in attributes ? attributes.id : blockAttributes.id; const finalKind = "kind" in attributes ? attributes.kind : blockAttributes.kind; return { isEntityLink: !!finalId && finalKind !== "custom", attributes // Return the computed attributes object }; }; ;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/menu-inspector-controls.js const actionLabel = ( /* translators: %s: The name of a menu. */ (0,external_wp_i18n_namespaceObject.__)("Switch to '%s'") ); const BLOCKS_WITH_LINK_UI_SUPPORT = [ "core/navigation-link", "core/navigation-submenu" ]; const { PrivateListView } = unlock(external_wp_blockEditor_namespaceObject.privateApis); function AdditionalBlockContent({ block, insertedBlock, setInsertedBlock }) { const { updateBlockAttributes, removeBlock } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store); const supportsLinkControls = BLOCKS_WITH_LINK_UI_SUPPORT?.includes( insertedBlock?.name ); const blockWasJustInserted = insertedBlock?.clientId === block.clientId; const showLinkControls = supportsLinkControls && blockWasJustInserted; const { createBinding, clearBinding } = useEntityBinding({ clientId: insertedBlock?.clientId, attributes: insertedBlock?.attributes || {} }); if (!showLinkControls) { return null; } const cleanupInsertedBlock = () => { const shouldAutoSelectBlock = false; if (!insertedBlock?.attributes?.url && insertedBlock?.clientId) { removeBlock(insertedBlock.clientId, shouldAutoSelectBlock); } setInsertedBlock(null); }; const setInsertedBlockAttributes = (_insertedBlockClientId) => (_updatedAttributes) => { if (!_insertedBlockClientId) { return; } updateBlockAttributes(_insertedBlockClientId, _updatedAttributes); }; const handleSetInsertedBlock = (newBlock) => { const shouldAutoSelectBlock = false; if (insertedBlock?.clientId && newBlock) { removeBlock(insertedBlock.clientId, shouldAutoSelectBlock); } setInsertedBlock(newBlock); }; return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( LinkUI, { clientId: insertedBlock?.clientId, link: insertedBlock?.attributes, onBlockInsert: handleSetInsertedBlock, onClose: () => { cleanupInsertedBlock(); }, onChange: (updatedValue) => { const { isEntityLink, attributes: updatedAttributes } = updateAttributes( updatedValue, setInsertedBlockAttributes(insertedBlock?.clientId), insertedBlock?.attributes ); if (isEntityLink) { createBinding(updatedAttributes); } else { clearBinding(updatedAttributes); } setInsertedBlock(null); } } ); } const MainContent = ({ clientId, currentMenuId, isLoading, isNavigationMenuMissing, onCreateNew }) => { const hasChildren = (0,external_wp_data_namespaceObject.useSelect)( (select) => { return !!select(external_wp_blockEditor_namespaceObject.store).getBlockCount(clientId); }, [clientId] ); const { navigationMenu } = useNavigationMenu(currentMenuId); if (currentMenuId && isNavigationMenuMissing) { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(deleted_navigation_warning_default, { onCreateNew, isNotice: true }); } if (isLoading) { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}); } const description = navigationMenu ? (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: The name of a menu. */ (0,external_wp_i18n_namespaceObject.__)("Structure for Navigation Menu: %s"), navigationMenu?.title || (0,external_wp_i18n_namespaceObject.__)("Untitled menu") ) : (0,external_wp_i18n_namespaceObject.__)( "You have not yet created any menus. Displaying a list of your Pages" ); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "wp-block-navigation__menu-inspector-controls", children: [ !hasChildren && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { className: "wp-block-navigation__menu-inspector-controls__empty-message", children: (0,external_wp_i18n_namespaceObject.__)("This Navigation Menu is empty.") }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( PrivateListView, { rootClientId: clientId, isExpanded: true, description, showAppender: true, blockSettingsMenu: LeafMoreMenu, additionalBlockContent: AdditionalBlockContent } ) ] }); }; const MenuInspectorControls = (props) => { const { createNavigationMenuIsSuccess, createNavigationMenuIsError, currentMenuId = null, onCreateNew, onSelectClassicMenu, onSelectNavigationMenu, isManageMenusButtonDisabled, blockEditingMode } = props; return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "list", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, { title: null, children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, { className: "wp-block-navigation-off-canvas-editor__header", children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalHeading, { className: "wp-block-navigation-off-canvas-editor__title", level: 2, children: (0,external_wp_i18n_namespaceObject.__)("Menu") } ), blockEditingMode === "default" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( navigation_menu_selector_default, { currentMenuId, onSelectClassicMenu, onSelectNavigationMenu, onCreateNew, createNavigationMenuIsSuccess, createNavigationMenuIsError, actionLabel, isManageMenusButtonDisabled } ) ] }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(MainContent, { ...props }) ] }) }); }; var menu_inspector_controls_default = MenuInspectorControls; ;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/accessible-description.js function AccessibleDescription({ id, children }) { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.VisuallyHidden, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { id, className: "wp-block-navigation__description", children }) }); } ;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/accessible-menu-description.js function AccessibleMenuDescription({ id }) { const [menuTitle] = (0,external_wp_coreData_namespaceObject.useEntityProp)("postType", "wp_navigation", "title"); const description = (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)(`Navigation Menu: "%s"`), menuTitle); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(AccessibleDescription, { id, children: description }); } ;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/index.js function NavigationAddPageButton({ clientId }) { const { insertBlock } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store); const { getBlockCount } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store); const onAddPage = (0,external_wp_element_namespaceObject.useCallback)(() => { const blockCount = getBlockCount(clientId); const newBlock = (0,external_wp_blocks_namespaceObject.createBlock)(constants_DEFAULT_BLOCK.name, { kind: constants_DEFAULT_BLOCK.attributes.kind, type: constants_DEFAULT_BLOCK.attributes.type }); insertBlock(newBlock, blockCount, clientId); }, [clientId, insertBlock, getBlockCount]); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToolbarButton, { name: "add-page", icon: page_default, onClick: onAddPage, children: (0,external_wp_i18n_namespaceObject.__)("Add page") } ) }) }); } function ColorTools({ textColor, setTextColor, backgroundColor, setBackgroundColor, overlayTextColor, setOverlayTextColor, overlayBackgroundColor, setOverlayBackgroundColor, clientId, navRef }) { const [detectedBackgroundColor, setDetectedBackgroundColor] = (0,external_wp_element_namespaceObject.useState)(); const [detectedColor, setDetectedColor] = (0,external_wp_element_namespaceObject.useState)(); const [ detectedOverlayBackgroundColor, setDetectedOverlayBackgroundColor ] = (0,external_wp_element_namespaceObject.useState)(); const [detectedOverlayColor, setDetectedOverlayColor] = (0,external_wp_element_namespaceObject.useState)(); const enableContrastChecking = external_wp_element_namespaceObject.Platform.OS === "web"; (0,external_wp_element_namespaceObject.useEffect)(() => { if (!enableContrastChecking) { return; } detectColors( navRef.current, setDetectedColor, setDetectedBackgroundColor ); const subMenuElement = navRef.current?.querySelector( '[data-type="core/navigation-submenu"] [data-type="core/navigation-link"]' ); if (!subMenuElement) { return; } if (overlayTextColor.color || overlayBackgroundColor.color) { detectColors( subMenuElement, setDetectedOverlayColor, setDetectedOverlayBackgroundColor ); } }, [ enableContrastChecking, overlayTextColor.color, overlayBackgroundColor.color, navRef ]); const colorGradientSettings = (0,external_wp_blockEditor_namespaceObject.__experimentalUseMultipleOriginColorsAndGradients)(); if (!colorGradientSettings.hasColorsOrGradients) { return null; } return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.__experimentalColorGradientSettingsDropdown, { __experimentalIsRenderedInSidebar: true, settings: [ { colorValue: textColor.color, label: (0,external_wp_i18n_namespaceObject.__)("Text"), onColorChange: setTextColor, resetAllFilter: () => setTextColor(), clearable: true, enableAlpha: true }, { colorValue: backgroundColor.color, label: (0,external_wp_i18n_namespaceObject.__)("Background"), onColorChange: setBackgroundColor, resetAllFilter: () => setBackgroundColor(), clearable: true, enableAlpha: true }, { colorValue: overlayTextColor.color, label: (0,external_wp_i18n_namespaceObject.__)("Submenu & overlay text"), onColorChange: setOverlayTextColor, resetAllFilter: () => setOverlayTextColor(), clearable: true, enableAlpha: true }, { colorValue: overlayBackgroundColor.color, label: (0,external_wp_i18n_namespaceObject.__)("Submenu & overlay background"), onColorChange: setOverlayBackgroundColor, resetAllFilter: () => setOverlayBackgroundColor(), clearable: true, enableAlpha: true } ], panelId: clientId, ...colorGradientSettings, gradients: [], disableCustomGradients: true } ), enableContrastChecking && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.ContrastChecker, { backgroundColor: detectedBackgroundColor, textColor: detectedColor } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.ContrastChecker, { backgroundColor: detectedOverlayBackgroundColor, textColor: detectedOverlayColor } ) ] }) ] }); } function Navigation({ attributes, setAttributes, clientId, isSelected, className, backgroundColor, setBackgroundColor, textColor, setTextColor, overlayBackgroundColor, setOverlayBackgroundColor, overlayTextColor, setOverlayTextColor, // These props are used by the navigation editor to override specific // navigation block settings. hasSubmenuIndicatorSetting = true, customPlaceholder: CustomPlaceholder = null, __unstableLayoutClassNames: layoutClassNames }) { const { openSubmenusOnClick, overlayMenu, showSubmenuIcon, templateLock, layout: { justifyContent, orientation = "horizontal", flexWrap = "wrap" } = {}, hasIcon, icon = "handle" } = attributes; const ref = attributes.ref; const setRef = (0,external_wp_element_namespaceObject.useCallback)( (postId) => { setAttributes({ ref: postId }); }, [setAttributes] ); const recursionId = `navigationMenu/${ref}`; const hasAlreadyRendered = (0,external_wp_blockEditor_namespaceObject.useHasRecursion)(recursionId); const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)(); const { menus: classicMenus } = useNavigationEntities(); const [showNavigationMenuStatusNotice, hideNavigationMenuStatusNotice] = use_navigation_notice_default({ name: "block-library/core/navigation/status" }); const [showClassicMenuConversionNotice, hideClassicMenuConversionNotice] = use_navigation_notice_default({ name: "block-library/core/navigation/classic-menu-conversion" }); const [ showNavigationMenuPermissionsNotice, hideNavigationMenuPermissionsNotice ] = use_navigation_notice_default({ name: "block-library/core/navigation/permissions/update" }); const { create: createNavigationMenu, status: createNavigationMenuStatus, error: createNavigationMenuError, value: createNavigationMenuPost, isPending: isCreatingNavigationMenu, isSuccess: createNavigationMenuIsSuccess, isError: createNavigationMenuIsError } = useCreateNavigationMenu(clientId); const createUntitledEmptyNavigationMenu = async () => { await createNavigationMenu(""); }; const { hasUncontrolledInnerBlocks, uncontrolledInnerBlocks, isInnerBlockSelected, innerBlocks } = useInnerBlocks(clientId); const hasSubmenus = !!innerBlocks.find( (block) => block.name === "core/navigation-submenu" ); const { replaceInnerBlocks, selectBlock, __unstableMarkNextChangeAsNotPersistent } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store); const [isResponsiveMenuOpen, setResponsiveMenuVisibility] = (0,external_wp_element_namespaceObject.useState)(false); const [overlayMenuPreview, setOverlayMenuPreview] = (0,external_wp_element_namespaceObject.useState)(false); const { hasResolvedNavigationMenus, isNavigationMenuResolved, isNavigationMenuMissing, canUserUpdateNavigationMenu, hasResolvedCanUserUpdateNavigationMenu, canUserDeleteNavigationMenu, hasResolvedCanUserDeleteNavigationMenu, canUserCreateNavigationMenus, isResolvingCanUserCreateNavigationMenus, hasResolvedCanUserCreateNavigationMenus } = useNavigationMenu(ref); const navMenuResolvedButMissing = hasResolvedNavigationMenus && isNavigationMenuMissing; const { convert: convertClassicMenu, status: classicMenuConversionStatus, error: classicMenuConversionError } = use_convert_classic_menu_to_block_menu_default(createNavigationMenu); const isConvertingClassicMenu = classicMenuConversionStatus === CLASSIC_MENU_CONVERSION_PENDING; const handleUpdateMenu = (0,external_wp_element_namespaceObject.useCallback)( (menuId, options = { focusNavigationBlock: false }) => { const { focusNavigationBlock } = options; setRef(menuId); if (focusNavigationBlock) { selectBlock(clientId); } }, [selectBlock, clientId, setRef] ); const isEntityAvailable = !isNavigationMenuMissing && isNavigationMenuResolved; const hasUnsavedBlocks = hasUncontrolledInnerBlocks && !isEntityAvailable; const { getNavigationFallbackId } = unlock((0,external_wp_data_namespaceObject.useSelect)(external_wp_coreData_namespaceObject.store)); const navigationFallbackId = !(ref || hasUnsavedBlocks) ? getNavigationFallbackId() : null; (0,external_wp_element_namespaceObject.useEffect)(() => { if (ref || hasUnsavedBlocks || !navigationFallbackId) { return; } __unstableMarkNextChangeAsNotPersistent(); setRef(navigationFallbackId); }, [ ref, setRef, hasUnsavedBlocks, navigationFallbackId, __unstableMarkNextChangeAsNotPersistent ]); const navRef = (0,external_wp_element_namespaceObject.useRef)(); const TagName = "nav"; const isPlaceholder = !ref && !isCreatingNavigationMenu && !isConvertingClassicMenu && hasResolvedNavigationMenus && classicMenus?.length === 0 && !hasUncontrolledInnerBlocks; const isLoading = !hasResolvedNavigationMenus || isCreatingNavigationMenu || isConvertingClassicMenu || !!(ref && !isEntityAvailable && !isConvertingClassicMenu); const textDecoration = attributes.style?.typography?.textDecoration; const hasBlockOverlay = (0,external_wp_data_namespaceObject.useSelect)( (select) => select(external_wp_blockEditor_namespaceObject.store).__unstableHasActiveBlockOverlayActive( clientId ), [clientId] ); const isResponsive = "never" !== overlayMenu; const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ ref: navRef, className: dist_clsx( className, { "items-justified-right": justifyContent === "right", "items-justified-space-between": justifyContent === "space-between", "items-justified-left": justifyContent === "left", "items-justified-center": justifyContent === "center", "is-vertical": orientation === "vertical", "no-wrap": flexWrap === "nowrap", "is-responsive": isResponsive, "has-text-color": !!textColor.color || !!textColor?.class, [(0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", textColor?.slug)]: !!textColor?.slug, "has-background": !!backgroundColor.color || backgroundColor.class, [(0,external_wp_blockEditor_namespaceObject.getColorClassName)( "background-color", backgroundColor?.slug )]: !!backgroundColor?.slug, [`has-text-decoration-${textDecoration}`]: textDecoration, "block-editor-block-content-overlay": hasBlockOverlay }, layoutClassNames ), style: { color: !textColor?.slug && textColor?.color, backgroundColor: !backgroundColor?.slug && backgroundColor?.color } }); const onSelectClassicMenu = async (classicMenu) => { return convertClassicMenu(classicMenu.id, classicMenu.name, "draft"); }; const onSelectNavigationMenu = (menuId) => { handleUpdateMenu(menuId); }; (0,external_wp_element_namespaceObject.useEffect)(() => { hideNavigationMenuStatusNotice(); if (isCreatingNavigationMenu) { (0,external_wp_a11y_namespaceObject.speak)((0,external_wp_i18n_namespaceObject.__)(`Creating Navigation Menu.`)); } if (createNavigationMenuIsSuccess) { handleUpdateMenu(createNavigationMenuPost?.id, { focusNavigationBlock: true }); showNavigationMenuStatusNotice( (0,external_wp_i18n_namespaceObject.__)(`Navigation Menu successfully created.`) ); } if (createNavigationMenuIsError) { showNavigationMenuStatusNotice( (0,external_wp_i18n_namespaceObject.__)("Failed to create Navigation Menu.") ); } }, [ createNavigationMenuStatus, createNavigationMenuError, createNavigationMenuPost?.id, createNavigationMenuIsError, createNavigationMenuIsSuccess, isCreatingNavigationMenu, handleUpdateMenu, hideNavigationMenuStatusNotice, showNavigationMenuStatusNotice ]); (0,external_wp_element_namespaceObject.useEffect)(() => { hideClassicMenuConversionNotice(); if (classicMenuConversionStatus === CLASSIC_MENU_CONVERSION_PENDING) { (0,external_wp_a11y_namespaceObject.speak)((0,external_wp_i18n_namespaceObject.__)("Classic menu importing.")); } if (classicMenuConversionStatus === CLASSIC_MENU_CONVERSION_SUCCESS) { showClassicMenuConversionNotice( (0,external_wp_i18n_namespaceObject.__)("Classic menu imported successfully.") ); handleUpdateMenu(createNavigationMenuPost?.id, { focusNavigationBlock: true }); } if (classicMenuConversionStatus === CLASSIC_MENU_CONVERSION_ERROR) { showClassicMenuConversionNotice( (0,external_wp_i18n_namespaceObject.__)("Classic menu import failed.") ); } }, [ classicMenuConversionStatus, classicMenuConversionError, hideClassicMenuConversionNotice, showClassicMenuConversionNotice, createNavigationMenuPost?.id, handleUpdateMenu ]); (0,external_wp_element_namespaceObject.useEffect)(() => { if (!isSelected && !isInnerBlockSelected) { hideNavigationMenuPermissionsNotice(); } if (isSelected || isInnerBlockSelected) { if (ref && !navMenuResolvedButMissing && hasResolvedCanUserUpdateNavigationMenu && !canUserUpdateNavigationMenu) { showNavigationMenuPermissionsNotice( (0,external_wp_i18n_namespaceObject.__)( "You do not have permission to edit this Menu. Any changes made will not be saved." ) ); } if (!ref && hasResolvedCanUserCreateNavigationMenus && !canUserCreateNavigationMenus) { showNavigationMenuPermissionsNotice( (0,external_wp_i18n_namespaceObject.__)( "You do not have permission to create Navigation Menus." ) ); } } }, [ isSelected, isInnerBlockSelected, canUserUpdateNavigationMenu, hasResolvedCanUserUpdateNavigationMenu, canUserCreateNavigationMenus, hasResolvedCanUserCreateNavigationMenus, ref, hideNavigationMenuPermissionsNotice, showNavigationMenuPermissionsNotice, navMenuResolvedButMissing ]); const hasManagePermissions = canUserCreateNavigationMenus || canUserUpdateNavigationMenu; const overlayMenuPreviewClasses = dist_clsx( "wp-block-navigation__overlay-menu-preview", { open: overlayMenuPreview } ); const submenuAccessibilityNotice = !showSubmenuIcon && !openSubmenusOnClick ? (0,external_wp_i18n_namespaceObject.__)( 'The current menu options offer reduced accessibility for users and are not recommended. Enabling either "Open on Click" or "Show arrow" offers enhanced accessibility by allowing keyboard users to browse submenus selectively.' ) : ""; const isFirstRender = (0,external_wp_element_namespaceObject.useRef)(true); (0,external_wp_element_namespaceObject.useEffect)(() => { if (!isFirstRender.current && submenuAccessibilityNotice) { (0,external_wp_a11y_namespaceObject.speak)(submenuAccessibilityNotice); } isFirstRender.current = false; }, [submenuAccessibilityNotice]); const overlayMenuPreviewId = (0,external_wp_compose_namespaceObject.useInstanceId)( OverlayMenuPreview, `overlay-menu-preview` ); const dropdownMenuProps = useToolsPanelDropdownMenuProps(); const stylingInspectorControls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: hasSubmenuIndicatorSetting && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)( external_wp_components_namespaceObject.__experimentalToolsPanel, { label: (0,external_wp_i18n_namespaceObject.__)("Display"), resetAll: () => { setAttributes({ showSubmenuIcon: true, openSubmenusOnClick: false, overlayMenu: "mobile", hasIcon: true, icon: "handle" }); }, dropdownMenuProps, children: [ isResponsive && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)( external_wp_components_namespaceObject.Button, { __next40pxDefaultSize: true, className: overlayMenuPreviewClasses, onClick: () => { setOverlayMenuPreview( !overlayMenuPreview ); }, "aria-label": (0,external_wp_i18n_namespaceObject.__)("Overlay menu controls"), "aria-controls": overlayMenuPreviewId, "aria-expanded": overlayMenuPreview, children: [ hasIcon && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(OverlayMenuIcon, { icon }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon_icon_default, { icon: close_default }) ] }), !hasIcon && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { children: (0,external_wp_i18n_namespaceObject.__)("Menu") }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { children: (0,external_wp_i18n_namespaceObject.__)("Close") }) ] }) ] } ), overlayMenuPreview && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalVStack, { id: overlayMenuPreviewId, spacing: 4, style: { gridColumn: "span 2" }, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( OverlayMenuPreview, { setAttributes, hasIcon, icon, hidden: !overlayMenuPreview } ) } ) ] }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { hasValue: () => overlayMenu !== "mobile", label: (0,external_wp_i18n_namespaceObject.__)("Overlay Menu"), onDeselect: () => setAttributes({ overlayMenu: "mobile" }), isShownByDefault: true, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)( external_wp_components_namespaceObject.__experimentalToggleGroupControl, { __next40pxDefaultSize: true, __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Overlay Menu"), "aria-label": (0,external_wp_i18n_namespaceObject.__)("Configure overlay menu"), value: overlayMenu, help: (0,external_wp_i18n_namespaceObject.__)( "Collapses the navigation options in a menu icon opening an overlay." ), onChange: (value) => setAttributes({ overlayMenu: value }), isBlock: true, children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { value: "never", label: (0,external_wp_i18n_namespaceObject.__)("Off") } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { value: "mobile", label: (0,external_wp_i18n_namespaceObject.__)("Mobile") } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { value: "always", label: (0,external_wp_i18n_namespaceObject.__)("Always") } ) ] } ) } ), hasSubmenus && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("h3", { className: "wp-block-navigation__submenu-header", children: (0,external_wp_i18n_namespaceObject.__)("Submenus") }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { hasValue: () => openSubmenusOnClick, label: (0,external_wp_i18n_namespaceObject.__)("Open on click"), onDeselect: () => setAttributes({ openSubmenusOnClick: false, showSubmenuIcon: true }), isShownByDefault: true, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, checked: openSubmenusOnClick, onChange: (value) => { setAttributes({ openSubmenusOnClick: value, ...value && { showSubmenuIcon: true } // Make sure arrows are shown when we toggle this on. }); }, label: (0,external_wp_i18n_namespaceObject.__)("Open on click") } ) } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { hasValue: () => !showSubmenuIcon, label: (0,external_wp_i18n_namespaceObject.__)("Show arrow"), onDeselect: () => setAttributes({ showSubmenuIcon: true }), isDisabled: attributes.openSubmenusOnClick, isShownByDefault: true, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, checked: showSubmenuIcon, onChange: (value) => { setAttributes({ showSubmenuIcon: value }); }, disabled: attributes.openSubmenusOnClick, label: (0,external_wp_i18n_namespaceObject.__)("Show arrow") } ) } ), submenuAccessibilityNotice && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.Notice, { spokenMessage: null, status: "warning", isDismissible: false, className: "wp-block-navigation__submenu-accessibility-notice", children: submenuAccessibilityNotice } ) ] }) ] } ) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "color", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( ColorTools, { textColor, setTextColor, backgroundColor, setBackgroundColor, overlayTextColor, setOverlayTextColor, overlayBackgroundColor, setOverlayBackgroundColor, clientId, navRef } ) }) ] }); const accessibleDescriptionId = `${clientId}-desc`; const isHiddenByDefault = "always" === overlayMenu; const isManageMenusButtonDisabled = !hasManagePermissions || !hasResolvedNavigationMenus; if (hasUnsavedBlocks && !isCreatingNavigationMenu) { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)( TagName, { ...blockProps, "aria-describedby": !isPlaceholder ? accessibleDescriptionId : void 0, children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(AccessibleDescription, { id: accessibleDescriptionId, children: (0,external_wp_i18n_namespaceObject.__)("Unsaved Navigation Menu.") }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( menu_inspector_controls_default, { clientId, createNavigationMenuIsSuccess, createNavigationMenuIsError, currentMenuId: ref, isNavigationMenuMissing, isManageMenusButtonDisabled, onCreateNew: createUntitledEmptyNavigationMenu, onSelectClassicMenu, onSelectNavigationMenu, isLoading, blockEditingMode } ), blockEditingMode === "default" && stylingInspectorControls, /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( ResponsiveWrapper, { id: clientId, onToggle: setResponsiveMenuVisibility, isOpen: isResponsiveMenuOpen, hasIcon, icon, isResponsive, isHiddenByDefault, overlayBackgroundColor, overlayTextColor, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( UnsavedInnerBlocks, { createNavigationMenu, blocks: uncontrolledInnerBlocks, hasSelection: isSelected || isInnerBlockSelected } ) } ) ] } ); } if (ref && isNavigationMenuMissing) { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(TagName, { ...blockProps, children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( menu_inspector_controls_default, { clientId, createNavigationMenuIsSuccess, createNavigationMenuIsError, currentMenuId: ref, isNavigationMenuMissing, isManageMenusButtonDisabled, onCreateNew: createUntitledEmptyNavigationMenu, onSelectClassicMenu, onSelectNavigationMenu, isLoading, blockEditingMode } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( deleted_navigation_warning_default, { onCreateNew: createUntitledEmptyNavigationMenu } ) ] }); } if (isEntityAvailable && hasAlreadyRendered) { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.__)("Block cannot be rendered inside itself.") }) }); } const PlaceholderComponent = CustomPlaceholder ? CustomPlaceholder : NavigationPlaceholder; if (isPlaceholder && CustomPlaceholder) { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( PlaceholderComponent, { isSelected, currentMenuId: ref, clientId, canUserCreateNavigationMenus, isResolvingCanUserCreateNavigationMenus, onSelectNavigationMenu, onSelectClassicMenu, onCreateEmpty: createUntitledEmptyNavigationMenu } ) }); } return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_coreData_namespaceObject.EntityProvider, { kind: "postType", type: "wp_navigation", id: ref, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.RecursionProvider, { uniqueId: recursionId, children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( menu_inspector_controls_default, { clientId, createNavigationMenuIsSuccess, createNavigationMenuIsError, currentMenuId: ref, isNavigationMenuMissing, isManageMenusButtonDisabled, onCreateNew: createUntitledEmptyNavigationMenu, onSelectClassicMenu, onSelectNavigationMenu, isLoading, blockEditingMode } ), blockEditingMode === "default" && stylingInspectorControls, blockEditingMode === "contentOnly" && isEntityAvailable && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigationAddPageButton, { clientId }), blockEditingMode === "default" && isEntityAvailable && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: [ hasResolvedCanUserUpdateNavigationMenu && canUserUpdateNavigationMenu && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigationMenuNameControl, {}), hasResolvedCanUserDeleteNavigationMenu && canUserDeleteNavigationMenu && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( NavigationMenuDeleteControl, { onDelete: () => { replaceInnerBlocks(clientId, []); showNavigationMenuStatusNotice( (0,external_wp_i18n_namespaceObject.__)( "Navigation Menu successfully deleted." ) ); } } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( manage_menus_button_default, { disabled: isManageMenusButtonDisabled, className: "wp-block-navigation-manage-menus-button" } ) ] }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)( TagName, { ...blockProps, "aria-describedby": !isPlaceholder && !isLoading ? accessibleDescriptionId : void 0, children: [ isLoading && !isHiddenByDefault && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-navigation__loading-indicator-container", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, { className: "wp-block-navigation__loading-indicator" }) }), (!isLoading || isHiddenByDefault) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( AccessibleMenuDescription, { id: accessibleDescriptionId } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( ResponsiveWrapper, { id: clientId, onToggle: setResponsiveMenuVisibility, hasIcon, icon, isOpen: isResponsiveMenuOpen, isResponsive, isHiddenByDefault, overlayBackgroundColor, overlayTextColor, children: isEntityAvailable && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( NavigationInnerBlocks, { clientId, hasCustomPlaceholder: !!CustomPlaceholder, templateLock, orientation } ) } ) ] }) ] } ) ] }) }); } var navigation_edit_edit_default = (0,external_wp_blockEditor_namespaceObject.withColors)( { textColor: "color" }, { backgroundColor: "color" }, { overlayBackgroundColor: "color" }, { overlayTextColor: "color" } )(Navigation); ;// ./node_modules/@wordpress/block-library/build-module/navigation/save.js function navigation_save_save({ attributes }) { if (attributes.ref) { return; } return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}); } ;// ./node_modules/@wordpress/block-library/build-module/navigation/deprecated.js const TYPOGRAPHY_PRESET_DEPRECATION_MAP = { fontStyle: "var:preset|font-style|", fontWeight: "var:preset|font-weight|", textDecoration: "var:preset|text-decoration|", textTransform: "var:preset|text-transform|" }; const migrateIdToRef = ({ navigationMenuId, ...attributes }) => { return { ...attributes, ref: navigationMenuId }; }; const deprecated_migrateWithLayout = (attributes) => { if (!!attributes.layout) { return attributes; } const { itemsJustification, orientation, ...updatedAttributes } = attributes; if (itemsJustification || orientation) { Object.assign(updatedAttributes, { layout: { type: "flex", ...itemsJustification && { justifyContent: itemsJustification }, ...orientation && { orientation } } }); } return updatedAttributes; }; const navigation_deprecated_v6 = { attributes: { navigationMenuId: { type: "number" }, textColor: { type: "string" }, customTextColor: { type: "string" }, rgbTextColor: { type: "string" }, backgroundColor: { type: "string" }, customBackgroundColor: { type: "string" }, rgbBackgroundColor: { type: "string" }, showSubmenuIcon: { type: "boolean", default: true }, openSubmenusOnClick: { type: "boolean", default: false }, overlayMenu: { type: "string", default: "mobile" }, __unstableLocation: { type: "string" }, overlayBackgroundColor: { type: "string" }, customOverlayBackgroundColor: { type: "string" }, overlayTextColor: { type: "string" }, customOverlayTextColor: { type: "string" } }, supports: { align: ["wide", "full"], anchor: true, html: false, inserter: true, typography: { fontSize: true, lineHeight: true, __experimentalFontStyle: true, __experimentalFontWeight: true, __experimentalTextTransform: true, __experimentalFontFamily: true, __experimentalTextDecoration: true, __experimentalDefaultControls: { fontSize: true } }, spacing: { blockGap: true, units: ["px", "em", "rem", "vh", "vw"], __experimentalDefaultControls: { blockGap: true } }, layout: { allowSwitching: false, allowInheriting: false, default: { type: "flex" } } }, save() { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}); }, isEligible: ({ navigationMenuId }) => !!navigationMenuId, migrate: migrateIdToRef }; const navigation_deprecated_v5 = { attributes: { navigationMenuId: { type: "number" }, orientation: { type: "string", default: "horizontal" }, textColor: { type: "string" }, customTextColor: { type: "string" }, rgbTextColor: { type: "string" }, backgroundColor: { type: "string" }, customBackgroundColor: { type: "string" }, rgbBackgroundColor: { type: "string" }, itemsJustification: { type: "string" }, showSubmenuIcon: { type: "boolean", default: true }, openSubmenusOnClick: { type: "boolean", default: false }, overlayMenu: { type: "string", default: "never" }, __unstableLocation: { type: "string" }, overlayBackgroundColor: { type: "string" }, customOverlayBackgroundColor: { type: "string" }, overlayTextColor: { type: "string" }, customOverlayTextColor: { type: "string" } }, supports: { align: ["wide", "full"], anchor: true, html: false, inserter: true, typography: { fontSize: true, lineHeight: true, __experimentalFontStyle: true, __experimentalFontWeight: true, __experimentalTextTransform: true, __experimentalFontFamily: true, __experimentalTextDecoration: true, __experimentalDefaultControls: { fontSize: true } }, spacing: { blockGap: true, units: ["px", "em", "rem", "vh", "vw"], __experimentalDefaultControls: { blockGap: true } } }, save() { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}); }, isEligible: ({ itemsJustification, orientation }) => !!itemsJustification || !!orientation, migrate: (0,external_wp_compose_namespaceObject.compose)(migrateIdToRef, deprecated_migrateWithLayout) }; const navigation_deprecated_v4 = { attributes: { orientation: { type: "string", default: "horizontal" }, textColor: { type: "string" }, customTextColor: { type: "string" }, rgbTextColor: { type: "string" }, backgroundColor: { type: "string" }, customBackgroundColor: { type: "string" }, rgbBackgroundColor: { type: "string" }, itemsJustification: { type: "string" }, showSubmenuIcon: { type: "boolean", default: true }, openSubmenusOnClick: { type: "boolean", default: false }, overlayMenu: { type: "string", default: "never" }, __unstableLocation: { type: "string" }, overlayBackgroundColor: { type: "string" }, customOverlayBackgroundColor: { type: "string" }, overlayTextColor: { type: "string" }, customOverlayTextColor: { type: "string" } }, supports: { align: ["wide", "full"], anchor: true, html: false, inserter: true, typography: { fontSize: true, lineHeight: true, __experimentalFontStyle: true, __experimentalFontWeight: true, __experimentalTextTransform: true, __experimentalFontFamily: true, __experimentalTextDecoration: true }, spacing: { blockGap: true, units: ["px", "em", "rem", "vh", "vw"], __experimentalDefaultControls: { blockGap: true } } }, save() { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}); }, migrate: (0,external_wp_compose_namespaceObject.compose)(migrateIdToRef, deprecated_migrateWithLayout, migrate_font_family_default), isEligible({ style }) { return style?.typography?.fontFamily; } }; const migrateIsResponsive = function(attributes) { delete attributes.isResponsive; return { ...attributes, overlayMenu: "mobile" }; }; const migrateTypographyPresets = function(attributes) { return { ...attributes, style: { ...attributes.style, typography: Object.fromEntries( Object.entries(attributes.style.typography ?? {}).map( ([key, value]) => { const prefix = TYPOGRAPHY_PRESET_DEPRECATION_MAP[key]; if (prefix && value.startsWith(prefix)) { const newValue = value.slice(prefix.length); if ("textDecoration" === key && "strikethrough" === newValue) { return [key, "line-through"]; } return [key, newValue]; } return [key, value]; } ) ) } }; }; const navigation_deprecated_deprecated = [ navigation_deprecated_v6, navigation_deprecated_v5, navigation_deprecated_v4, // Remove `isResponsive` attribute. { attributes: { orientation: { type: "string", default: "horizontal" }, textColor: { type: "string" }, customTextColor: { type: "string" }, rgbTextColor: { type: "string" }, backgroundColor: { type: "string" }, customBackgroundColor: { type: "string" }, rgbBackgroundColor: { type: "string" }, itemsJustification: { type: "string" }, showSubmenuIcon: { type: "boolean", default: true }, openSubmenusOnClick: { type: "boolean", default: false }, isResponsive: { type: "boolean", default: "false" }, __unstableLocation: { type: "string" }, overlayBackgroundColor: { type: "string" }, customOverlayBackgroundColor: { type: "string" }, overlayTextColor: { type: "string" }, customOverlayTextColor: { type: "string" } }, supports: { align: ["wide", "full"], anchor: true, html: false, inserter: true, typography: { fontSize: true, lineHeight: true, __experimentalFontStyle: true, __experimentalFontWeight: true, __experimentalTextTransform: true, __experimentalFontFamily: true, __experimentalTextDecoration: true } }, isEligible(attributes) { return attributes.isResponsive; }, migrate: (0,external_wp_compose_namespaceObject.compose)( migrateIdToRef, deprecated_migrateWithLayout, migrate_font_family_default, migrateIsResponsive ), save() { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}); } }, { attributes: { orientation: { type: "string" }, textColor: { type: "string" }, customTextColor: { type: "string" }, rgbTextColor: { type: "string" }, backgroundColor: { type: "string" }, customBackgroundColor: { type: "string" }, rgbBackgroundColor: { type: "string" }, itemsJustification: { type: "string" }, showSubmenuIcon: { type: "boolean", default: true } }, supports: { align: ["wide", "full"], anchor: true, html: false, inserter: true, fontSize: true, __experimentalFontStyle: true, __experimentalFontWeight: true, __experimentalTextTransform: true, color: true, __experimentalFontFamily: true, __experimentalTextDecoration: true }, save() { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}); }, isEligible(attributes) { if (!attributes.style || !attributes.style.typography) { return false; } for (const styleAttribute in TYPOGRAPHY_PRESET_DEPRECATION_MAP) { const attributeValue = attributes.style.typography[styleAttribute]; if (attributeValue && attributeValue.startsWith( TYPOGRAPHY_PRESET_DEPRECATION_MAP[styleAttribute] )) { return true; } } return false; }, migrate: (0,external_wp_compose_namespaceObject.compose)( migrateIdToRef, deprecated_migrateWithLayout, migrate_font_family_default, migrateTypographyPresets ) }, { attributes: { className: { type: "string" }, textColor: { type: "string" }, rgbTextColor: { type: "string" }, backgroundColor: { type: "string" }, rgbBackgroundColor: { type: "string" }, fontSize: { type: "string" }, customFontSize: { type: "number" }, itemsJustification: { type: "string" }, showSubmenuIcon: { type: "boolean" } }, isEligible(attribute) { return attribute.rgbTextColor || attribute.rgbBackgroundColor; }, supports: { align: ["wide", "full"], anchor: true, html: false, inserter: true }, migrate: (0,external_wp_compose_namespaceObject.compose)(migrateIdToRef, (attributes) => { const { rgbTextColor, rgbBackgroundColor, ...restAttributes } = attributes; return { ...restAttributes, customTextColor: attributes.textColor ? void 0 : attributes.rgbTextColor, customBackgroundColor: attributes.backgroundColor ? void 0 : attributes.rgbBackgroundColor }; }), save() { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}); } } ]; var navigation_deprecated_deprecated_default = navigation_deprecated_deprecated; ;// ./node_modules/@wordpress/block-library/build-module/navigation/index.js const { name: navigation_name } = navigation_block_namespaceObject; const navigation_settings = { icon: navigation_default, example: { attributes: { overlayMenu: "never" }, innerBlocks: [ { name: "core/navigation-link", attributes: { // translators: 'Home' as in a website's home page. label: (0,external_wp_i18n_namespaceObject.__)("Home"), url: "https://make.wordpress.org/" } }, { name: "core/navigation-link", attributes: { // translators: 'About' as in a website's about page. label: (0,external_wp_i18n_namespaceObject.__)("About"), url: "https://make.wordpress.org/" } }, { name: "core/navigation-link", attributes: { // translators: 'Contact' as in a website's contact page. label: (0,external_wp_i18n_namespaceObject.__)("Contact"), url: "https://make.wordpress.org/" } } ] }, edit: navigation_edit_edit_default, save: navigation_save_save, __experimentalLabel: ({ ref }) => { if (!ref) { return; } const navigation = (0,external_wp_data_namespaceObject.select)(external_wp_coreData_namespaceObject.store).getEditedEntityRecord( "postType", "wp_navigation", ref ); if (!navigation?.title) { return; } return (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(navigation.title); }, deprecated: navigation_deprecated_deprecated_default }; const navigation_init = () => initBlock({ name: navigation_name, metadata: navigation_block_namespaceObject, settings: navigation_settings }); ;// ./node_modules/@wordpress/block-library/build-module/navigation-link/block.json const navigation_link_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/navigation-link","title":"Custom Link","category":"design","parent":["core/navigation"],"allowedBlocks":["core/navigation-link","core/navigation-submenu","core/page-list"],"description":"Add a page, link, or another item to your navigation.","textdomain":"default","attributes":{"label":{"type":"string","role":"content"},"type":{"type":"string"},"description":{"type":"string"},"rel":{"type":"string"},"id":{"type":"number"},"opensInNewTab":{"type":"boolean","default":false},"url":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string"},"isTopLevelLink":{"type":"boolean"}},"usesContext":["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","maxNestingLevel","style"],"supports":{"reusable":false,"html":false,"__experimentalSlashInserter":true,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"renaming":false,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-navigation-link-editor","style":"wp-block-navigation-link"}'); ;// ./node_modules/@wordpress/block-library/build-module/navigation-link/shared/controls.js function getEntityTypeName(type, kind) { if (kind === "post-type") { switch (type) { case "post": return (0,external_wp_i18n_namespaceObject.__)("post"); case "page": return (0,external_wp_i18n_namespaceObject.__)("page"); default: return type || (0,external_wp_i18n_namespaceObject.__)("post"); } } if (kind === "taxonomy") { switch (type) { case "category": return (0,external_wp_i18n_namespaceObject.__)("category"); case "tag": return (0,external_wp_i18n_namespaceObject.__)("tag"); default: return type || (0,external_wp_i18n_namespaceObject.__)("term"); } } return type || (0,external_wp_i18n_namespaceObject.__)("item"); } function controls_Controls({ attributes, setAttributes, clientId }) { const { label, url, description, rel, opensInNewTab } = attributes; const lastURLRef = (0,external_wp_element_namespaceObject.useRef)(url); const dropdownMenuProps = useToolsPanelDropdownMenuProps(); const urlInputRef = (0,external_wp_element_namespaceObject.useRef)(); const shouldFocusURLInputRef = (0,external_wp_element_namespaceObject.useRef)(false); const inputId = (0,external_wp_compose_namespaceObject.useInstanceId)(controls_Controls, "link-input"); const helpTextId = `${inputId}__help`; const [inputValue, setInputValue] = (0,external_wp_element_namespaceObject.useState)(url); (0,external_wp_element_namespaceObject.useEffect)(() => { setInputValue(url); lastURLRef.current = url; }, [url]); const { hasUrlBinding, isBoundEntityAvailable, clearBinding } = useEntityBinding({ clientId, attributes }); const { updateBlockAttributes } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store); const unsyncBoundLink = () => { clearBinding(); updateBlockAttributes(clientId, { url: lastURLRef.current, // set the lastURLRef as the new editable value so we avoid bugs from empty link states id: void 0 }); }; (0,external_wp_element_namespaceObject.useEffect)(() => { if (!hasUrlBinding && shouldFocusURLInputRef.current) { urlInputRef.current?.select(); } shouldFocusURLInputRef.current = false; }, [hasUrlBinding]); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)( external_wp_components_namespaceObject.__experimentalToolsPanel, { label: (0,external_wp_i18n_namespaceObject.__)("Settings"), resetAll: () => { setAttributes({ label: "", url: "", description: "", rel: "", opensInNewTab: false }); }, dropdownMenuProps, children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { hasValue: () => !!label, label: (0,external_wp_i18n_namespaceObject.__)("Text"), onDeselect: () => setAttributes({ label: "" }), isShownByDefault: true, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.TextControl, { __nextHasNoMarginBottom: true, __next40pxDefaultSize: true, label: (0,external_wp_i18n_namespaceObject.__)("Text"), value: label ? (0,external_wp_dom_namespaceObject.__unstableStripHTML)(label) : "", onChange: (labelValue) => { setAttributes({ label: labelValue }); }, autoComplete: "off" } ) } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { hasValue: () => !!url, label: (0,external_wp_i18n_namespaceObject.__)("Link"), onDeselect: () => setAttributes({ url: "" }), isShownByDefault: true, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalInputControl, { ref: urlInputRef, __nextHasNoMarginBottom: true, __next40pxDefaultSize: true, id: inputId, label: (0,external_wp_i18n_namespaceObject.__)("Link"), value: (() => { if (hasUrlBinding && !isBoundEntityAvailable) { return ""; } return inputValue ? (0,external_wp_url_namespaceObject.safeDecodeURI)(inputValue) : ""; })(), autoComplete: "off", type: "url", disabled: hasUrlBinding, "aria-invalid": hasUrlBinding && !isBoundEntityAvailable ? "true" : void 0, "aria-describedby": helpTextId, className: hasUrlBinding && !isBoundEntityAvailable ? "navigation-link-control__input-with-error-suffix" : void 0, onChange: (newValue) => { if (isBoundEntityAvailable) { return; } setInputValue(newValue); }, onFocus: () => { if (isBoundEntityAvailable) { return; } lastURLRef.current = url; }, onBlur: () => { if (isBoundEntityAvailable) { return; } const finalValue = !inputValue ? lastURLRef.current : inputValue; setInputValue(finalValue); updateAttributes({ url: finalValue }, setAttributes, { ...attributes, url: lastURLRef.current }); }, help: hasUrlBinding && !isBoundEntityAvailable ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( MissingEntityHelp, { id: helpTextId, type: attributes.type, kind: attributes.kind } ) : isBoundEntityAvailable && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( BindingHelpText, { type: attributes.type, kind: attributes.kind } ), suffix: hasUrlBinding && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.Button, { icon: link_off_default, onClick: () => { unsyncBoundLink(); shouldFocusURLInputRef.current = true; }, "aria-describedby": helpTextId, showTooltip: true, label: (0,external_wp_i18n_namespaceObject.__)("Unsync and edit"), __next40pxDefaultSize: true, className: hasUrlBinding && !isBoundEntityAvailable ? "navigation-link-control__error-suffix-button" : void 0 } ) } ) } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { hasValue: () => !!opensInNewTab, label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"), onDeselect: () => setAttributes({ opensInNewTab: false }), isShownByDefault: true, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.CheckboxControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"), checked: opensInNewTab, onChange: (value) => setAttributes({ opensInNewTab: value }) } ) } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { hasValue: () => !!description, label: (0,external_wp_i18n_namespaceObject.__)("Description"), onDeselect: () => setAttributes({ description: "" }), isShownByDefault: true, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.TextareaControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Description"), value: description || "", onChange: (descriptionValue) => { setAttributes({ description: descriptionValue }); }, help: (0,external_wp_i18n_namespaceObject.__)( "The description will be displayed in the menu if the current theme supports it." ) } ) } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { hasValue: () => !!rel, label: (0,external_wp_i18n_namespaceObject.__)("Rel attribute"), onDeselect: () => setAttributes({ rel: "" }), isShownByDefault: true, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.TextControl, { __nextHasNoMarginBottom: true, __next40pxDefaultSize: true, label: (0,external_wp_i18n_namespaceObject.__)("Rel attribute"), value: rel || "", onChange: (relValue) => { setAttributes({ rel: relValue }); }, autoComplete: "off", help: (0,external_wp_i18n_namespaceObject.__)( "The relationship of the linked URL as space-separated link types." ) } ) } ) ] } ); } function BindingHelpText({ type, kind }) { const entityType = getEntityTypeName(type, kind); return (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s is the entity type (e.g., "page", "post", "category") */ (0,external_wp_i18n_namespaceObject.__)("Synced with the selected %s."), entityType ); } function MissingEntityHelpText({ type, kind }) { const entityType = getEntityTypeName(type, kind); return (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s is the entity type (e.g., "page", "post", "category") */ (0,external_wp_i18n_namespaceObject.__)("Synced %s is missing. Please update or remove this link."), entityType ); } function MissingEntityHelp({ id, type, kind }) { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { id, className: "navigation-link-control__error-text", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(MissingEntityHelpText, { type, kind }) }); } ;// ./node_modules/@wordpress/block-library/build-module/navigation-link/edit.js const navigation_link_edit_DEFAULT_BLOCK = { name: "core/navigation-link" }; const NESTING_BLOCK_NAMES = [ "core/navigation-link", "core/navigation-submenu" ]; const useIsDraggingWithin = (elementRef) => { const [isDraggingWithin, setIsDraggingWithin] = (0,external_wp_element_namespaceObject.useState)(false); (0,external_wp_element_namespaceObject.useEffect)(() => { const { ownerDocument } = elementRef.current; function handleDragStart(event) { handleDragEnter(event); } function handleDragEnd() { setIsDraggingWithin(false); } function handleDragEnter(event) { if (elementRef.current.contains(event.target)) { setIsDraggingWithin(true); } else { setIsDraggingWithin(false); } } ownerDocument.addEventListener("dragstart", handleDragStart); ownerDocument.addEventListener("dragend", handleDragEnd); ownerDocument.addEventListener("dragenter", handleDragEnter); return () => { ownerDocument.removeEventListener("dragstart", handleDragStart); ownerDocument.removeEventListener("dragend", handleDragEnd); ownerDocument.removeEventListener("dragenter", handleDragEnter); }; }, [elementRef]); return isDraggingWithin; }; const useIsInvalidLink = (kind, type, id, enabled) => { const isPostType = kind === "post-type" || type === "post" || type === "page"; const hasId = Number.isInteger(id); const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)(); const { postStatus, isDeleted } = (0,external_wp_data_namespaceObject.useSelect)( (select) => { if (!isPostType) { return { postStatus: null, isDeleted: false }; } if (blockEditingMode === "disabled" || !enabled) { return { postStatus: null, isDeleted: false }; } const { getEntityRecord, hasFinishedResolution } = select(external_wp_coreData_namespaceObject.store); const entityRecord = getEntityRecord("postType", type, id); const hasResolved = hasFinishedResolution("getEntityRecord", [ "postType", type, id ]); const deleted = hasResolved && entityRecord === void 0; return { postStatus: entityRecord?.status, isDeleted: deleted }; }, [isPostType, blockEditingMode, enabled, type, id] ); const isInvalid = isPostType && hasId && (isDeleted || postStatus && "trash" === postStatus); const isDraft = "draft" === postStatus; return [isInvalid, isDraft]; }; function getMissingText(type) { let missingText = ""; switch (type) { case "post": missingText = (0,external_wp_i18n_namespaceObject.__)("Select post"); break; case "page": missingText = (0,external_wp_i18n_namespaceObject.__)("Select page"); break; case "category": missingText = (0,external_wp_i18n_namespaceObject.__)("Select category"); break; case "tag": missingText = (0,external_wp_i18n_namespaceObject.__)("Select tag"); break; default: missingText = (0,external_wp_i18n_namespaceObject.__)("Add link"); } return missingText; } function NavigationLinkEdit({ attributes, isSelected, setAttributes, insertBlocksAfter, mergeBlocks, onReplace, context, clientId }) { const { id, label, type, url, description, kind, metadata } = attributes; const { maxNestingLevel } = context; const { replaceBlock, __unstableMarkNextChangeAsNotPersistent, selectBlock } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store); const [isLinkOpen, setIsLinkOpen] = (0,external_wp_element_namespaceObject.useState)(isSelected && !url); const [popoverAnchor, setPopoverAnchor] = (0,external_wp_element_namespaceObject.useState)(null); const listItemRef = (0,external_wp_element_namespaceObject.useRef)(null); const isDraggingWithin = useIsDraggingWithin(listItemRef); const itemLabelPlaceholder = (0,external_wp_i18n_namespaceObject.__)("Add label\u2026"); const ref = (0,external_wp_element_namespaceObject.useRef)(); const linkUIref = (0,external_wp_element_namespaceObject.useRef)(); const prevUrl = (0,external_wp_compose_namespaceObject.usePrevious)(url); const isNewLink = (0,external_wp_element_namespaceObject.useRef)(!url && !metadata?.bindings?.url); const { isAtMaxNesting, isTopLevelLink, isParentOfSelectedBlock, hasChildren, validateLinkStatus, parentBlockClientId } = (0,external_wp_data_namespaceObject.useSelect)( (select) => { const { getBlockCount, getBlockName, getBlockRootClientId, hasSelectedInnerBlock, getBlockParentsByBlockName, getSelectedBlockClientId } = select(external_wp_blockEditor_namespaceObject.store); const rootClientId = getBlockRootClientId(clientId); const parentBlockName = getBlockName(rootClientId); const isTopLevel = parentBlockName === "core/navigation"; const selectedBlockClientId = getSelectedBlockClientId(); const rootNavigationClientId = isTopLevel ? rootClientId : getBlockParentsByBlockName( clientId, "core/navigation" )[0]; const parentBlockId = parentBlockName === "core/navigation-submenu" ? rootClientId : rootNavigationClientId; const enableLinkStatusValidation = selectedBlockClientId === rootNavigationClientId || hasSelectedInnerBlock(rootNavigationClientId, true); return { isAtMaxNesting: getBlockParentsByBlockName(clientId, NESTING_BLOCK_NAMES).length >= maxNestingLevel, isTopLevelLink: isTopLevel, isParentOfSelectedBlock: hasSelectedInnerBlock( clientId, true ), hasChildren: !!getBlockCount(clientId), validateLinkStatus: enableLinkStatusValidation, parentBlockClientId: parentBlockId }; }, [clientId, maxNestingLevel] ); const { getBlocks } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store); const { clearBinding, createBinding, hasUrlBinding, isBoundEntityAvailable } = useEntityBinding({ clientId, attributes }); const [isInvalid, isDraft] = useIsInvalidLink( kind, type, id, validateLinkStatus ); const transformToSubmenu = (0,external_wp_element_namespaceObject.useCallback)(() => { let innerBlocks = getBlocks(clientId); if (innerBlocks.length === 0) { innerBlocks = [(0,external_wp_blocks_namespaceObject.createBlock)("core/navigation-link")]; selectBlock(innerBlocks[0].clientId); } const newSubmenu = (0,external_wp_blocks_namespaceObject.createBlock)( "core/navigation-submenu", attributes, innerBlocks ); replaceBlock(clientId, newSubmenu); }, [getBlocks, clientId, selectBlock, replaceBlock, attributes]); (0,external_wp_element_namespaceObject.useEffect)(() => { if (isNewLink.current && isSelected && !url) { selectBlock(parentBlockClientId); } }, []); (0,external_wp_element_namespaceObject.useEffect)(() => { if (hasChildren) { __unstableMarkNextChangeAsNotPersistent(); transformToSubmenu(); } }, [ hasChildren, __unstableMarkNextChangeAsNotPersistent, transformToSubmenu ]); (0,external_wp_element_namespaceObject.useEffect)(() => { if (!prevUrl && url && isLinkOpen && (0,external_wp_url_namespaceObject.isURL)((0,external_wp_url_namespaceObject.prependHTTP)(label)) && /^.+\.[a-z]+/.test(label)) { selectLabelText(); } }, [prevUrl, url, isLinkOpen, label]); function selectLabelText() { ref.current.focus(); const { ownerDocument } = ref.current; const { defaultView } = ownerDocument; const selection = defaultView.getSelection(); const range = ownerDocument.createRange(); range.selectNodeContents(ref.current); selection.removeAllRanges(); selection.addRange(range); } function removeLink() { setAttributes({ url: void 0, label: void 0, id: void 0, kind: void 0, type: void 0, opensInNewTab: false }); setIsLinkOpen(false); } const { textColor, customTextColor, backgroundColor, customBackgroundColor } = getColors(context, !isTopLevelLink); function onKeyDown(event) { if (external_wp_keycodes_namespaceObject.isKeyboardEvent.primary(event, "k")) { event.preventDefault(); event.stopPropagation(); setIsLinkOpen(true); } } const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(NavigationLinkEdit); const hasMissingEntity = hasUrlBinding && !isBoundEntityAvailable; const missingEntityDescriptionId = hasMissingEntity ? (0,external_wp_i18n_namespaceObject.sprintf)("navigation-link-edit-%d-desc", instanceId) : void 0; const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([setPopoverAnchor, listItemRef]), className: dist_clsx("wp-block-navigation-item", { "is-editing": isSelected || isParentOfSelectedBlock, "is-dragging-within": isDraggingWithin, "has-link": !!url, "has-child": hasChildren, "has-text-color": !!textColor || !!customTextColor, [(0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", textColor)]: !!textColor, "has-background": !!backgroundColor || customBackgroundColor, [(0,external_wp_blockEditor_namespaceObject.getColorClassName)("background-color", backgroundColor)]: !!backgroundColor }), "aria-describedby": missingEntityDescriptionId, "aria-invalid": hasMissingEntity, style: { color: !textColor && customTextColor, backgroundColor: !backgroundColor && customBackgroundColor }, onKeyDown }); const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)( { ...blockProps, className: "remove-outline" // Remove the outline from the inner blocks container. }, { defaultBlock: navigation_link_edit_DEFAULT_BLOCK, directInsert: true, renderAppender: false } ); if (!url || isInvalid || isDraft || hasUrlBinding && !isBoundEntityAvailable) { blockProps.onClick = () => { setIsLinkOpen(true); }; } const classes = dist_clsx("wp-block-navigation-item__content", { "wp-block-navigation-link__placeholder": !url || isInvalid || isDraft || hasUrlBinding && !isBoundEntityAvailable }); const missingText = getMissingText(type); const placeholderText = `(${isInvalid ? (0,external_wp_i18n_namespaceObject.__)("Invalid") : (0,external_wp_i18n_namespaceObject.__)("Draft")})`; return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.ToolbarGroup, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToolbarButton, { name: "link", icon: link_default, title: (0,external_wp_i18n_namespaceObject.__)("Link"), shortcut: external_wp_keycodes_namespaceObject.displayShortcut.primary("k"), onClick: () => { setIsLinkOpen(true); } } ), !isAtMaxNesting && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToolbarButton, { name: "submenu", icon: add_submenu_default, title: (0,external_wp_i18n_namespaceObject.__)("Add submenu"), onClick: transformToSubmenu } ) ] }) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( controls_Controls, { attributes, setAttributes, clientId } ) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [ hasMissingEntity && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.VisuallyHidden, { id: missingEntityDescriptionId, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(MissingEntityHelpText, { type, kind }) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("a", { className: classes, children: [ !url && !metadata?.bindings?.url ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-navigation-link__placeholder-text", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { children: missingText }) }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ !isInvalid && !isDraft && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.RichText, { ref, identifier: "label", className: "wp-block-navigation-item__label", value: label, onChange: (labelValue) => setAttributes({ label: labelValue }), onMerge: mergeBlocks, onReplace, __unstableOnSplitAtEnd: () => insertBlocksAfter( (0,external_wp_blocks_namespaceObject.createBlock)( "core/navigation-link" ) ), "aria-label": (0,external_wp_i18n_namespaceObject.__)( "Navigation link text" ), placeholder: itemLabelPlaceholder, withoutInteractiveFormatting: true } ), description && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { className: "wp-block-navigation-item__description", children: description }) ] }), (isInvalid || isDraft) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "div", { className: dist_clsx( "wp-block-navigation-link__placeholder-text", "wp-block-navigation-link__label", { "is-invalid": isInvalid, "is-draft": isDraft } ), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { // Some attributes are stored in an escaped form. It's a legacy issue. // Ideally they would be stored in a raw, unescaped form. // Unescape is used here to "recover" the escaped characters // so they display without encoding. // See `updateAttributes` for more details. children: `${(0,external_wp_htmlEntities_namespaceObject.decodeEntities)(label)} ${isInvalid || isDraft ? placeholderText : ""}`.trim() }) } ) ] }), isLinkOpen && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( LinkUI, { ref: linkUIref, clientId, link: attributes, onClose: () => { setIsLinkOpen(false); if (!url && !hasUrlBinding) { onReplace([]); } else if (isNewLink.current) { selectBlock(clientId); } }, anchor: popoverAnchor, onRemove: removeLink, onChange: (updatedValue) => { const { isEntityLink, attributes: updatedAttributes } = updateAttributes( updatedValue, setAttributes, attributes ); if (isEntityLink) { createBinding(updatedAttributes); } else { clearBinding(updatedAttributes); } } } ) ] }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps }) ] }) ] }); } ;// ./node_modules/@wordpress/block-library/build-module/navigation-link/save.js function navigation_link_save_save() { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}); } ;// ./node_modules/@wordpress/icons/build-module/library/tag.js var tag_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4.75 4a.75.75 0 0 0-.75.75v7.826c0 .2.08.39.22.53l6.72 6.716a2.313 2.313 0 0 0 3.276-.001l5.61-5.611-.531-.53.532.528a2.315 2.315 0 0 0 0-3.264L13.104 4.22a.75.75 0 0 0-.53-.22H4.75ZM19 12.576a.815.815 0 0 1-.236.574l-5.61 5.611a.814.814 0 0 1-1.153 0L5.5 12.264V5.5h6.763l6.5 6.502a.816.816 0 0 1 .237.574ZM8.75 9.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" }) }); ;// ./node_modules/@wordpress/icons/build-module/library/custom-post-type.js var custom_post_type_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4zm.8-4l.7.7 2-2V12h1V9.2l2 2 .7-.7-2-2H12v-1H9.2l2-2-.7-.7-2 2V4h-1v2.8l-2-2-.7.7 2 2H4v1h2.8l-2 2z" }) }); ;// ./node_modules/@wordpress/block-library/build-module/navigation-link/hooks.js function getIcon(variationName) { switch (variationName) { case "post": return post_list_default; case "page": return page_default; case "tag": return tag_default; case "category": return category_default; default: return custom_post_type_default; } } function enhanceNavigationLinkVariations(settings, name) { if (name !== "core/navigation-link") { return settings; } if (settings.variations) { const isActive = (blockAttributes, variationAttributes) => { return blockAttributes.type === variationAttributes.type; }; const variations = settings.variations.map((variation) => { return { ...variation, ...!variation.icon && { icon: getIcon(variation.name) }, ...!variation.isActive && { isActive } }; }); return { ...settings, variations }; } return settings; } ;// ./node_modules/@wordpress/block-library/build-module/navigation-link/transforms.js const navigation_link_transforms_transforms = { from: [ { type: "block", blocks: ["core/site-logo"], transform: () => { return (0,external_wp_blocks_namespaceObject.createBlock)("core/navigation-link"); } }, { type: "block", blocks: ["core/spacer"], transform: () => { return (0,external_wp_blocks_namespaceObject.createBlock)("core/navigation-link"); } }, { type: "block", blocks: ["core/home-link"], transform: () => { return (0,external_wp_blocks_namespaceObject.createBlock)("core/navigation-link"); } }, { type: "block", blocks: ["core/social-links"], transform: () => { return (0,external_wp_blocks_namespaceObject.createBlock)("core/navigation-link"); } }, { type: "block", blocks: ["core/search"], transform: () => { return (0,external_wp_blocks_namespaceObject.createBlock)("core/navigation-link"); } }, { type: "block", blocks: ["core/page-list"], transform: () => { return (0,external_wp_blocks_namespaceObject.createBlock)("core/navigation-link"); } }, { type: "block", blocks: ["core/buttons"], transform: () => { return (0,external_wp_blocks_namespaceObject.createBlock)("core/navigation-link"); } } ], to: [ { type: "block", blocks: ["core/navigation-submenu"], transform: (attributes, innerBlocks) => (0,external_wp_blocks_namespaceObject.createBlock)( "core/navigation-submenu", attributes, innerBlocks ) }, { type: "block", blocks: ["core/spacer"], transform: () => { return (0,external_wp_blocks_namespaceObject.createBlock)("core/spacer"); } }, { type: "block", blocks: ["core/site-logo"], transform: () => { return (0,external_wp_blocks_namespaceObject.createBlock)("core/site-logo"); } }, { type: "block", blocks: ["core/home-link"], transform: () => { return (0,external_wp_blocks_namespaceObject.createBlock)("core/home-link"); } }, { type: "block", blocks: ["core/social-links"], transform: () => { return (0,external_wp_blocks_namespaceObject.createBlock)("core/social-links"); } }, { type: "block", blocks: ["core/search"], transform: () => { return (0,external_wp_blocks_namespaceObject.createBlock)("core/search", { showLabel: false, buttonUseIcon: true, buttonPosition: "button-inside" }); } }, { type: "block", blocks: ["core/page-list"], transform: () => { return (0,external_wp_blocks_namespaceObject.createBlock)("core/page-list"); } }, { type: "block", blocks: ["core/buttons"], transform: ({ label, url, rel, title, opensInNewTab }) => { return (0,external_wp_blocks_namespaceObject.createBlock)("core/buttons", {}, [ (0,external_wp_blocks_namespaceObject.createBlock)("core/button", { text: label, url, rel, title, linkTarget: opensInNewTab ? "_blank" : void 0 }) ]); } } ] }; var navigation_link_transforms_transforms_default = navigation_link_transforms_transforms; ;// ./node_modules/@wordpress/block-library/build-module/navigation-link/index.js const { name: navigation_link_name } = navigation_link_block_namespaceObject; const navigation_link_settings = { icon: custom_link_default, __experimentalLabel: ({ label }) => label, merge(leftAttributes, { label: rightLabel = "" }) { return { ...leftAttributes, label: leftAttributes.label + rightLabel }; }, edit: NavigationLinkEdit, save: navigation_link_save_save, example: { attributes: { label: (0,external_wp_i18n_namespaceObject._x)("Example Link", "navigation link preview example"), url: "https://example.com" } }, deprecated: [ { isEligible(attributes) { return attributes.nofollow; }, attributes: { label: { type: "string" }, type: { type: "string" }, nofollow: { type: "boolean" }, description: { type: "string" }, id: { type: "number" }, opensInNewTab: { type: "boolean", default: false }, url: { type: "string" } }, migrate({ nofollow, ...rest }) { return { rel: nofollow ? "nofollow" : "", ...rest }; }, save() { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}); } } ], transforms: navigation_link_transforms_transforms_default }; const navigation_link_init = () => { (0,external_wp_hooks_namespaceObject.addFilter)( "blocks.registerBlockType", "core/navigation-link", enhanceNavigationLinkVariations ); return initBlock({ name: navigation_link_name, metadata: navigation_link_block_namespaceObject, settings: navigation_link_settings }); }; ;// ./node_modules/@wordpress/block-library/build-module/navigation-submenu/block.json const navigation_submenu_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/navigation-submenu","title":"Submenu","category":"design","parent":["core/navigation"],"description":"Add a submenu to your navigation.","textdomain":"default","attributes":{"label":{"type":"string","role":"content"},"type":{"type":"string"},"description":{"type":"string"},"rel":{"type":"string"},"id":{"type":"number"},"opensInNewTab":{"type":"boolean","default":false},"url":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string"},"isTopLevelItem":{"type":"boolean"}},"usesContext":["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","maxNestingLevel","openSubmenusOnClick","style"],"supports":{"reusable":false,"html":false,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-navigation-submenu-editor","style":"wp-block-navigation-submenu"}'); ;// ./node_modules/@wordpress/icons/build-module/library/remove-submenu.js var remove_submenu_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_primitives_namespaceObject.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "m13.955 20.748 8-17.5-.91-.416L19.597 6H13.5v1.5h5.411l-1.6 3.5H13.5v1.5h3.126l-1.6 3.5H13.5l.028 1.5h.812l-1.295 2.832.91.416ZM17.675 16l-.686 1.5h4.539L21.5 16h-3.825Zm2.286-5-.686 1.5H21.5V11h-1.54ZM2 12c0 3.58 2.42 5.5 6 5.5h.5V19l3-2.5-3-2.5v2H8c-2.48 0-4.5-1.52-4.5-4S5.52 7.5 8 7.5h3.5V6H8c-3.58 0-6 2.42-6 6Z" } ) }); ;// ./node_modules/@wordpress/block-library/build-module/navigation-submenu/icons.js const ItemSubmenuIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M1.50002 4L6.00002 8L10.5 4", strokeWidth: "1.5" }) } ); ;// ./node_modules/@wordpress/block-library/build-module/navigation-submenu/edit.js const ALLOWED_BLOCKS = [ "core/navigation-link", "core/navigation-submenu", "core/page-list" ]; const edit_useIsDraggingWithin = (elementRef) => { const [isDraggingWithin, setIsDraggingWithin] = (0,external_wp_element_namespaceObject.useState)(false); (0,external_wp_element_namespaceObject.useEffect)(() => { const { ownerDocument } = elementRef.current; function handleDragStart(event) { handleDragEnter(event); } function handleDragEnd() { setIsDraggingWithin(false); } function handleDragEnter(event) { if (elementRef.current.contains(event.target)) { setIsDraggingWithin(true); } else { setIsDraggingWithin(false); } } ownerDocument.addEventListener("dragstart", handleDragStart); ownerDocument.addEventListener("dragend", handleDragEnd); ownerDocument.addEventListener("dragenter", handleDragEnter); return () => { ownerDocument.removeEventListener("dragstart", handleDragStart); ownerDocument.removeEventListener("dragend", handleDragEnd); ownerDocument.removeEventListener("dragenter", handleDragEnter); }; }, []); return isDraggingWithin; }; function NavigationSubmenuEdit({ attributes, isSelected, setAttributes, mergeBlocks, onReplace, context, clientId }) { const { label, url, description } = attributes; const { showSubmenuIcon, maxNestingLevel, openSubmenusOnClick: contextOpenSubmenusOnClick } = context; const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)(); const openSubmenusOnClick = blockEditingMode !== "default" ? true : contextOpenSubmenusOnClick; const { clearBinding, createBinding } = useEntityBinding({ clientId, attributes }); const { __unstableMarkNextChangeAsNotPersistent, replaceBlock } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store); const [isLinkOpen, setIsLinkOpen] = (0,external_wp_element_namespaceObject.useState)(false); const [popoverAnchor, setPopoverAnchor] = (0,external_wp_element_namespaceObject.useState)(null); const listItemRef = (0,external_wp_element_namespaceObject.useRef)(null); const isDraggingWithin = edit_useIsDraggingWithin(listItemRef); const itemLabelPlaceholder = (0,external_wp_i18n_namespaceObject.__)("Add text\u2026"); const ref = (0,external_wp_element_namespaceObject.useRef)(); const { parentCount, isParentOfSelectedBlock, isImmediateParentOfSelectedBlock, hasChildren, selectedBlockHasChildren, onlyDescendantIsEmptyLink } = (0,external_wp_data_namespaceObject.useSelect)( (select) => { const { hasSelectedInnerBlock, getSelectedBlockClientId, getBlockParentsByBlockName, getBlock, getBlockCount, getBlockOrder } = select(external_wp_blockEditor_namespaceObject.store); let _onlyDescendantIsEmptyLink; const selectedBlockId = getSelectedBlockClientId(); const selectedBlockChildren = getBlockOrder(selectedBlockId); if (selectedBlockChildren?.length === 1) { const singleBlock = getBlock(selectedBlockChildren[0]); _onlyDescendantIsEmptyLink = singleBlock?.name === "core/navigation-link" && !singleBlock?.attributes?.label; } return { parentCount: getBlockParentsByBlockName( clientId, "core/navigation-submenu" ).length, isParentOfSelectedBlock: hasSelectedInnerBlock( clientId, true ), isImmediateParentOfSelectedBlock: hasSelectedInnerBlock( clientId, false ), hasChildren: !!getBlockCount(clientId), selectedBlockHasChildren: !!selectedBlockChildren?.length, onlyDescendantIsEmptyLink: _onlyDescendantIsEmptyLink }; }, [clientId] ); const prevHasChildren = (0,external_wp_compose_namespaceObject.usePrevious)(hasChildren); (0,external_wp_element_namespaceObject.useEffect)(() => { if (!openSubmenusOnClick && !url) { setIsLinkOpen(true); } }, []); (0,external_wp_element_namespaceObject.useEffect)(() => { if (!isSelected) { setIsLinkOpen(false); } }, [isSelected]); (0,external_wp_element_namespaceObject.useEffect)(() => { if (isLinkOpen && url) { if ((0,external_wp_url_namespaceObject.isURL)((0,external_wp_url_namespaceObject.prependHTTP)(label)) && /^.+\.[a-z]+/.test(label)) { selectLabelText(); } } }, [url]); function selectLabelText() { ref.current.focus(); const { ownerDocument } = ref.current; const { defaultView } = ownerDocument; const selection = defaultView.getSelection(); const range = ownerDocument.createRange(); range.selectNodeContents(ref.current); selection.removeAllRanges(); selection.addRange(range); } const { textColor, customTextColor, backgroundColor, customBackgroundColor } = getColors(context, parentCount > 0); function onKeyDown(event) { if (external_wp_keycodes_namespaceObject.isKeyboardEvent.primary(event, "k")) { event.preventDefault(); event.stopPropagation(); setIsLinkOpen(true); } } const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([setPopoverAnchor, listItemRef]), className: dist_clsx("wp-block-navigation-item", { "is-editing": isSelected || isParentOfSelectedBlock, "is-dragging-within": isDraggingWithin, "has-link": !!url, "has-child": hasChildren, "has-text-color": !!textColor || !!customTextColor, [(0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", textColor)]: !!textColor, "has-background": !!backgroundColor || customBackgroundColor, [(0,external_wp_blockEditor_namespaceObject.getColorClassName)("background-color", backgroundColor)]: !!backgroundColor, "open-on-click": openSubmenusOnClick }), style: { color: !textColor && customTextColor, backgroundColor: !backgroundColor && customBackgroundColor }, onKeyDown }); const innerBlocksColors = getColors(context, true); const allowedBlocks = parentCount >= maxNestingLevel ? ALLOWED_BLOCKS.filter( (blockName) => blockName !== "core/navigation-submenu" ) : ALLOWED_BLOCKS; const navigationChildBlockProps = getNavigationChildBlockProps(innerBlocksColors); const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(navigationChildBlockProps, { allowedBlocks, defaultBlock: constants_DEFAULT_BLOCK, directInsert: true, // Ensure block toolbar is not too far removed from item // being edited. // see: https://github.com/WordPress/gutenberg/pull/34615. __experimentalCaptureToolbars: true, renderAppender: isSelected || isImmediateParentOfSelectedBlock && !selectedBlockHasChildren || // Show the appender while dragging to allow inserting element between item and the appender. hasChildren ? external_wp_blockEditor_namespaceObject.InnerBlocks.ButtonBlockAppender : false }); const ParentElement = openSubmenusOnClick ? "button" : "a"; function transformToLink() { const newLinkBlock = (0,external_wp_blocks_namespaceObject.createBlock)("core/navigation-link", attributes); replaceBlock(clientId, newLinkBlock); } (0,external_wp_element_namespaceObject.useEffect)(() => { if (!hasChildren && prevHasChildren) { __unstableMarkNextChangeAsNotPersistent(); transformToLink(); } }, [hasChildren, prevHasChildren]); const canConvertToLink = !selectedBlockHasChildren || onlyDescendantIsEmptyLink; return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.ToolbarGroup, { children: [ !openSubmenusOnClick && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToolbarButton, { name: "link", icon: link_default, title: (0,external_wp_i18n_namespaceObject.__)("Link"), shortcut: external_wp_keycodes_namespaceObject.displayShortcut.primary("k"), onClick: () => { setIsLinkOpen(true); } } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToolbarButton, { name: "revert", icon: remove_submenu_default, title: (0,external_wp_i18n_namespaceObject.__)("Convert to Link"), onClick: transformToLink, className: "wp-block-navigation__submenu__revert", disabled: !canConvertToLink } ) ] }) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( controls_Controls, { attributes, setAttributes, clientId } ) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(ParentElement, { className: "wp-block-navigation-item__content", children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.RichText, { ref, identifier: "label", className: "wp-block-navigation-item__label", value: label, onChange: (labelValue) => setAttributes({ label: labelValue }), onMerge: mergeBlocks, onReplace, "aria-label": (0,external_wp_i18n_namespaceObject.__)("Navigation link text"), placeholder: itemLabelPlaceholder, withoutInteractiveFormatting: true, onClick: () => { if (!openSubmenusOnClick && !url) { setIsLinkOpen(true); } } } ), description && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { className: "wp-block-navigation-item__description", children: description }), !openSubmenusOnClick && isLinkOpen && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( LinkUI, { clientId, link: attributes, onClose: () => { setIsLinkOpen(false); }, anchor: popoverAnchor, onRemove: () => { setAttributes({ url: "" }); (0,external_wp_a11y_namespaceObject.speak)((0,external_wp_i18n_namespaceObject.__)("Link removed."), "assertive"); }, onChange: (updatedValue) => { const { isEntityLink, attributes: updatedAttributes } = updateAttributes( updatedValue, setAttributes, attributes ); if (isEntityLink) { createBinding(updatedAttributes); } else { clearBinding(updatedAttributes); } } } ) ] }), (showSubmenuIcon || openSubmenusOnClick) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { className: "wp-block-navigation__submenu-icon", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(ItemSubmenuIcon, {}) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps }) ] }) ] }); } ;// ./node_modules/@wordpress/block-library/build-module/navigation-submenu/save.js function navigation_submenu_save_save() { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}); } ;// ./node_modules/@wordpress/block-library/build-module/navigation-submenu/transforms.js const navigation_submenu_transforms_transforms = { to: [ { type: "block", blocks: ["core/navigation-link"], isMatch: (attributes, block) => block?.innerBlocks?.length === 0, transform: (attributes) => (0,external_wp_blocks_namespaceObject.createBlock)("core/navigation-link", attributes) }, { type: "block", blocks: ["core/spacer"], isMatch: (attributes, block) => block?.innerBlocks?.length === 0, transform: () => { return (0,external_wp_blocks_namespaceObject.createBlock)("core/spacer"); } }, { type: "block", blocks: ["core/site-logo"], isMatch: (attributes, block) => block?.innerBlocks?.length === 0, transform: () => { return (0,external_wp_blocks_namespaceObject.createBlock)("core/site-logo"); } }, { type: "block", blocks: ["core/home-link"], isMatch: (attributes, block) => block?.innerBlocks?.length === 0, transform: () => { return (0,external_wp_blocks_namespaceObject.createBlock)("core/home-link"); } }, { type: "block", blocks: ["core/social-links"], isMatch: (attributes, block) => block?.innerBlocks?.length === 0, transform: () => { return (0,external_wp_blocks_namespaceObject.createBlock)("core/social-links"); } }, { type: "block", blocks: ["core/search"], isMatch: (attributes, block) => block?.innerBlocks?.length === 0, transform: () => { return (0,external_wp_blocks_namespaceObject.createBlock)("core/search"); } } ] }; var navigation_submenu_transforms_transforms_default = navigation_submenu_transforms_transforms; ;// ./node_modules/@wordpress/block-library/build-module/navigation-submenu/index.js const { name: navigation_submenu_name } = navigation_submenu_block_namespaceObject; const navigation_submenu_settings = { icon: ({ context }) => { if (context === "list-view") { return page_default; } return add_submenu_default; }, __experimentalLabel(attributes, { context }) { const { label } = attributes; const customName = attributes?.metadata?.name; if (context === "list-view" && (customName || label)) { return attributes?.metadata?.name || label; } return label; }, edit: NavigationSubmenuEdit, example: { attributes: { label: (0,external_wp_i18n_namespaceObject._x)("About", "Example link text for Navigation Submenu"), type: "page" } }, save: navigation_submenu_save_save, transforms: navigation_submenu_transforms_transforms_default }; const navigation_submenu_init = () => initBlock({ name: navigation_submenu_name, metadata: navigation_submenu_block_namespaceObject, settings: navigation_submenu_settings }); ;// ./node_modules/@wordpress/icons/build-module/library/page-break.js var page_break_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M17.5 9V6a2 2 0 0 0-2-2h-7a2 2 0 0 0-2 2v3H8V6a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v3h1.5Zm0 6.5V18a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2v-2.5H8V18a.5.5 0 0 0 .5.5h7a.5.5 0 0 0 .5-.5v-2.5h1.5ZM4 13h16v-1.5H4V13Z" }) }); ;// ./node_modules/@wordpress/block-library/build-module/nextpage/edit.js function NextPageEdit() { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)(), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { children: (0,external_wp_i18n_namespaceObject.__)("Page break") }) }); } ;// ./node_modules/@wordpress/block-library/build-module/nextpage/block.json const nextpage_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/nextpage","title":"Page Break","category":"design","description":"Separate your content into a multi-page experience.","keywords":["next page","pagination"],"parent":["core/post-content"],"textdomain":"default","supports":{"customClassName":false,"className":false,"html":false,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-nextpage-editor"}'); ;// ./node_modules/@wordpress/block-library/build-module/nextpage/save.js function nextpage_save_save() { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, { children: "" }); } ;// ./node_modules/@wordpress/block-library/build-module/nextpage/transforms.js const nextpage_transforms_transforms = { from: [ { type: "raw", schema: { "wp-block": { attributes: ["data-block"] } }, isMatch: (node) => node.dataset && node.dataset.block === "core/nextpage", transform() { return (0,external_wp_blocks_namespaceObject.createBlock)("core/nextpage", {}); } } ] }; var nextpage_transforms_transforms_default = nextpage_transforms_transforms; ;// ./node_modules/@wordpress/block-library/build-module/nextpage/index.js const { name: nextpage_name } = nextpage_block_namespaceObject; const nextpage_settings = { icon: page_break_default, example: {}, transforms: nextpage_transforms_transforms_default, edit: NextPageEdit, save: nextpage_save_save }; const nextpage_init = () => initBlock({ name: nextpage_name, metadata: nextpage_block_namespaceObject, settings: nextpage_settings }); ;// ./node_modules/@wordpress/block-library/build-module/pattern/block.json const pattern_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/pattern","title":"Pattern Placeholder","category":"theme","description":"Show a block pattern.","supports":{"html":false,"inserter":false,"renaming":false,"visibility":false,"interactivity":{"clientNavigation":true}},"textdomain":"default","attributes":{"slug":{"type":"string"}}}'); ;// ./node_modules/@wordpress/block-library/build-module/pattern/recursion-detector.js const cachedParsers = /* @__PURE__ */ new WeakMap(); function useParsePatternDependencies() { const registry = (0,external_wp_data_namespaceObject.useRegistry)(); if (!cachedParsers.has(registry)) { const deps = /* @__PURE__ */ new Map(); cachedParsers.set( registry, parsePatternDependencies.bind(null, deps) ); } return cachedParsers.get(registry); } function parsePatternDependencies(deps, { name, blocks }) { const queue = [...blocks]; while (queue.length) { const block = queue.shift(); for (const innerBlock of block.innerBlocks ?? []) { queue.unshift(innerBlock); } if (block.name === "core/pattern") { registerDependency(deps, name, block.attributes.slug); } } } function registerDependency(deps, a, b) { if (!deps.has(a)) { deps.set(a, /* @__PURE__ */ new Set()); } deps.get(a).add(b); if (hasCycle(deps, a)) { throw new TypeError( `Pattern ${a} has a circular dependency and cannot be rendered.` ); } } function hasCycle(deps, slug, visitedNodes = /* @__PURE__ */ new Set(), currentPath = /* @__PURE__ */ new Set()) { visitedNodes.add(slug); currentPath.add(slug); const dependencies = deps.get(slug) ?? /* @__PURE__ */ new Set(); for (const dependency of dependencies) { if (!visitedNodes.has(dependency)) { if (hasCycle(deps, dependency, visitedNodes, currentPath)) { return true; } } else if (currentPath.has(dependency)) { return true; } } currentPath.delete(slug); return false; } ;// ./node_modules/@wordpress/block-library/build-module/pattern/edit.js const PatternEdit = ({ attributes, clientId }) => { const registry = (0,external_wp_data_namespaceObject.useRegistry)(); const selectedPattern = (0,external_wp_data_namespaceObject.useSelect)( (select) => select(external_wp_blockEditor_namespaceObject.store).__experimentalGetParsedPattern( attributes.slug ), [attributes.slug] ); const currentThemeStylesheet = (0,external_wp_data_namespaceObject.useSelect)( (select) => select(external_wp_coreData_namespaceObject.store).getCurrentTheme()?.stylesheet, [] ); const { replaceBlocks, setBlockEditingMode, __unstableMarkNextChangeAsNotPersistent } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store); const { getBlockRootClientId, getBlockEditingMode } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store); const [hasRecursionError, setHasRecursionError] = (0,external_wp_element_namespaceObject.useState)(false); const parsePatternDependencies = useParsePatternDependencies(); function injectThemeAttributeInBlockTemplateContent(block) { if (block.innerBlocks.find( (innerBlock) => innerBlock.name === "core/template-part" )) { block.innerBlocks = block.innerBlocks.map((innerBlock) => { if (innerBlock.name === "core/template-part" && innerBlock.attributes.theme === void 0) { innerBlock.attributes.theme = currentThemeStylesheet; } return innerBlock; }); } if (block.name === "core/template-part" && block.attributes.theme === void 0) { block.attributes.theme = currentThemeStylesheet; } return block; } (0,external_wp_element_namespaceObject.useEffect)(() => { if (!hasRecursionError && selectedPattern?.blocks) { try { parsePatternDependencies(selectedPattern); } catch (error) { setHasRecursionError(true); return; } window.queueMicrotask(() => { const rootClientId = getBlockRootClientId(clientId); const clonedBlocks = selectedPattern.blocks.map( (block) => (0,external_wp_blocks_namespaceObject.cloneBlock)( injectThemeAttributeInBlockTemplateContent(block) ) ); if (clonedBlocks.length === 1 && selectedPattern.categories?.length > 0) { clonedBlocks[0].attributes = { ...clonedBlocks[0].attributes, metadata: { ...clonedBlocks[0].attributes.metadata, categories: selectedPattern.categories, patternName: selectedPattern.name, name: clonedBlocks[0].attributes.metadata.name || selectedPattern.title } }; } const rootEditingMode = getBlockEditingMode(rootClientId); registry.batch(() => { __unstableMarkNextChangeAsNotPersistent(); setBlockEditingMode(rootClientId, "default"); __unstableMarkNextChangeAsNotPersistent(); replaceBlocks(clientId, clonedBlocks); __unstableMarkNextChangeAsNotPersistent(); setBlockEditingMode(rootClientId, rootEditingMode); }); }); } }, [ clientId, hasRecursionError, selectedPattern, __unstableMarkNextChangeAsNotPersistent, replaceBlocks, getBlockEditingMode, setBlockEditingMode, getBlockRootClientId ]); const props = (0,external_wp_blockEditor_namespaceObject.useBlockProps)(); if (hasRecursionError) { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...props, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.sprintf)( // translators: A warning in which %s is the name of a pattern. (0,external_wp_i18n_namespaceObject.__)('Pattern "%s" cannot be rendered inside itself.'), selectedPattern?.name ) }) }); } return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...props }); }; var pattern_edit_edit_default = PatternEdit; ;// ./node_modules/@wordpress/block-library/build-module/pattern/index.js const { name: pattern_name } = pattern_block_namespaceObject; const pattern_settings = { edit: pattern_edit_edit_default }; const pattern_init = () => initBlock({ name: pattern_name, metadata: pattern_block_namespaceObject, settings: pattern_settings }); ;// ./node_modules/@wordpress/icons/build-module/library/pages.js var pages_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M14.5 5.5h-7V7h7V5.5ZM7.5 9h7v1.5h-7V9Zm7 3.5h-7V14h7v-1.5Z" }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M16 2H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2ZM6 3.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V4a.5.5 0 0 1 .5-.5Z" }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M20 8v11c0 .69-.31 1-.999 1H6v1.5h13.001c1.52 0 2.499-.982 2.499-2.5V8H20Z" }) ] }); ;// ./node_modules/@wordpress/block-library/build-module/page-list/block.json const page_list_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/page-list","title":"Page List","category":"widgets","allowedBlocks":["core/page-list-item"],"description":"Display a list of all pages.","keywords":["menu","navigation"],"textdomain":"default","attributes":{"parentPageID":{"type":"integer","default":0},"isNested":{"type":"boolean","default":false}},"usesContext":["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","style","openSubmenusOnClick"],"supports":{"reusable":false,"html":false,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"color":{"text":true,"background":true,"link":true,"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true},"spacing":{"padding":true,"margin":true,"__experimentalDefaultControls":{"padding":false,"margin":false}},"contentRole":true},"editorStyle":"wp-block-page-list-editor","style":"wp-block-page-list"}'); ;// ./node_modules/@wordpress/block-library/build-module/page-list/use-convert-to-navigation-links.js function createNavigationLinks(pages = []) { const POST_TYPE_KIND = "post-type"; const linkMap = {}; const navigationLinks = []; pages.forEach(({ id, title, link: url, type, parent }) => { const innerBlocks = linkMap[id]?.innerBlocks ?? []; linkMap[id] = (0,external_wp_blocks_namespaceObject.createBlock)( "core/navigation-link", { id, label: title.rendered, url, type, kind: POST_TYPE_KIND, metadata: { bindings: buildNavigationLinkEntityBinding(POST_TYPE_KIND) } }, innerBlocks ); if (!parent) { navigationLinks.push(linkMap[id]); } else { if (!linkMap[parent]) { linkMap[parent] = { innerBlocks: [] }; } const parentLinkInnerBlocks = linkMap[parent].innerBlocks; parentLinkInnerBlocks.push(linkMap[id]); } }); return navigationLinks; } function findNavigationLinkById(navigationLinks, id) { for (const navigationLink of navigationLinks) { if (navigationLink.attributes.id === id) { return navigationLink; } if (navigationLink.innerBlocks && navigationLink.innerBlocks.length) { const foundNavigationLink = findNavigationLinkById( navigationLink.innerBlocks, id ); if (foundNavigationLink) { return foundNavigationLink; } } } return null; } function convertToNavigationLinks(pages = [], parentPageID = null) { let navigationLinks = createNavigationLinks(pages); if (parentPageID) { const parentPage = findNavigationLinkById( navigationLinks, parentPageID ); if (parentPage && parentPage.innerBlocks) { navigationLinks = parentPage.innerBlocks; } } const transformSubmenus = (listOfLinks) => { listOfLinks.forEach((block, index, listOfLinksArray) => { const { attributes, innerBlocks } = block; if (innerBlocks.length !== 0) { transformSubmenus(innerBlocks); const transformedBlock = (0,external_wp_blocks_namespaceObject.createBlock)( "core/navigation-submenu", attributes, innerBlocks ); listOfLinksArray[index] = transformedBlock; } }); }; transformSubmenus(navigationLinks); return navigationLinks; } function useConvertToNavigationLinks({ clientId, pages, parentClientId, parentPageID }) { const { replaceBlock, selectBlock } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store); return () => { const navigationLinks = convertToNavigationLinks(pages, parentPageID); replaceBlock(clientId, navigationLinks); selectBlock(parentClientId); }; } ;// ./node_modules/@wordpress/block-library/build-module/page-list/convert-to-links-modal.js const convertDescription = (0,external_wp_i18n_namespaceObject.__)( "This Navigation Menu displays your website's pages. Editing it will enable you to add, delete, or reorder pages. However, new pages will no longer be added automatically." ); function ConvertToLinksModal({ onClick, onClose, disabled }) { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)( external_wp_components_namespaceObject.Modal, { onRequestClose: onClose, title: (0,external_wp_i18n_namespaceObject.__)("Edit Page List"), className: "wp-block-page-list-modal", aria: { describedby: (0,external_wp_compose_namespaceObject.useInstanceId)( ConvertToLinksModal, "wp-block-page-list-modal__description" ) }, children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "p", { id: (0,external_wp_compose_namespaceObject.useInstanceId)( ConvertToLinksModal, "wp-block-page-list-modal__description" ), children: convertDescription } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "wp-block-page-list-modal-buttons", children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.Button, { __next40pxDefaultSize: true, variant: "tertiary", onClick: onClose, children: (0,external_wp_i18n_namespaceObject.__)("Cancel") } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.Button, { __next40pxDefaultSize: true, variant: "primary", accessibleWhenDisabled: true, disabled, onClick, children: (0,external_wp_i18n_namespaceObject.__)("Edit") } ) ] }) ] } ); } ;// ./node_modules/@wordpress/block-library/build-module/page-list/edit.js const MAX_PAGE_COUNT = 100; const NOOP = () => { }; function BlockContent({ blockProps, innerBlocksProps, hasResolvedPages, blockList, pages, parentPageID }) { if (!hasResolvedPages) { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-page-list__loading-indicator-container", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, { className: "wp-block-page-list__loading-indicator" }) }) }); } if (pages === null) { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Notice, { status: "warning", isDismissible: false, children: (0,external_wp_i18n_namespaceObject.__)("Page List: Cannot retrieve Pages.") }) }); } if (pages.length === 0) { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Notice, { status: "info", isDismissible: false, children: (0,external_wp_i18n_namespaceObject.__)("Page List: Cannot retrieve Pages.") }) }); } if (blockList.length === 0) { const parentPageDetails = pages.find( (page) => page.id === parentPageID ); if (parentPageDetails?.title?.rendered) { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.sprintf)( // translators: %s: Page title. (0,external_wp_i18n_namespaceObject.__)('Page List: "%s" page has no children.'), parentPageDetails.title.rendered ) }) }); } return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Notice, { status: "warning", isDismissible: false, children: (0,external_wp_i18n_namespaceObject.__)("Page List: Cannot retrieve Pages.") }) }); } if (pages.length > 0) { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", { ...innerBlocksProps }); } } function PageListEdit({ context, clientId, attributes, setAttributes }) { const { parentPageID } = attributes; const [isOpen, setOpen] = (0,external_wp_element_namespaceObject.useState)(false); const openModal = (0,external_wp_element_namespaceObject.useCallback)(() => setOpen(true), []); const closeModal = () => setOpen(false); const dropdownMenuProps = useToolsPanelDropdownMenuProps(); const { records: pages, hasResolved: hasResolvedPages } = (0,external_wp_coreData_namespaceObject.useEntityRecords)( "postType", "page", { per_page: MAX_PAGE_COUNT, _fields: ["id", "link", "menu_order", "parent", "title", "type"], // TODO: When https://core.trac.wordpress.org/ticket/39037 REST API support for multiple orderby // values is resolved, update 'orderby' to [ 'menu_order', 'post_title' ] to provide a consistent // sort. orderby: "menu_order", order: "asc" } ); const allowConvertToLinks = "showSubmenuIcon" in context && pages?.length > 0 && pages?.length <= MAX_PAGE_COUNT; const pagesByParentId = (0,external_wp_element_namespaceObject.useMemo)(() => { if (pages === null) { return /* @__PURE__ */ new Map(); } const sortedPages = pages.sort((a, b) => { if (a.menu_order === b.menu_order) { return a.title.rendered.localeCompare(b.title.rendered); } return a.menu_order - b.menu_order; }); return sortedPages.reduce((accumulator, page) => { const { parent } = page; if (accumulator.has(parent)) { accumulator.get(parent).push(page); } else { accumulator.set(parent, [page]); } return accumulator; }, /* @__PURE__ */ new Map()); }, [pages]); const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className: dist_clsx("wp-block-page-list", { "has-text-color": !!context.textColor, [(0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", context.textColor)]: !!context.textColor, "has-background": !!context.backgroundColor, [(0,external_wp_blockEditor_namespaceObject.getColorClassName)( "background-color", context.backgroundColor )]: !!context.backgroundColor }), style: { ...context.style?.color } }); const pagesTree = (0,external_wp_element_namespaceObject.useMemo)( function makePagesTree(parentId = 0, level = 0) { const childPages = pagesByParentId.get(parentId); if (!childPages?.length) { return []; } return childPages.reduce((tree, page) => { const hasChildren = pagesByParentId.has(page.id); const item = { value: page.id, label: "\u2014 ".repeat(level) + page.title.rendered, rawName: page.title.rendered }; tree.push(item); if (hasChildren) { tree.push(...makePagesTree(page.id, level + 1)); } return tree; }, []); }, [pagesByParentId] ); const blockList = (0,external_wp_element_namespaceObject.useMemo)( function getBlockList(parentId = parentPageID) { const childPages = pagesByParentId.get(parentId); if (!childPages?.length) { return []; } return childPages.reduce((template, page) => { const hasChildren = pagesByParentId.has(page.id); const pageProps = { id: page.id, label: ( // translators: displayed when a page has an empty title. page.title?.rendered?.trim() !== "" ? page.title?.rendered : (0,external_wp_i18n_namespaceObject.__)("(no title)") ), title: ( // translators: displayed when a page has an empty title. page.title?.rendered?.trim() !== "" ? page.title?.rendered : (0,external_wp_i18n_namespaceObject.__)("(no title)") ), link: page.url, hasChildren }; let item = null; const children = getBlockList(page.id); item = (0,external_wp_blocks_namespaceObject.createBlock)( "core/page-list-item", pageProps, children ); template.push(item); return template; }, []); }, [pagesByParentId, parentPageID] ); const { isNested, hasSelectedChild, parentClientId, hasDraggedChild, isChildOfNavigation } = (0,external_wp_data_namespaceObject.useSelect)( (select) => { const { getBlockParentsByBlockName, hasSelectedInnerBlock, hasDraggedInnerBlock } = select(external_wp_blockEditor_namespaceObject.store); const blockParents = getBlockParentsByBlockName( clientId, "core/navigation-submenu", true ); const navigationBlockParents = getBlockParentsByBlockName( clientId, "core/navigation", true ); return { isNested: blockParents.length > 0, isChildOfNavigation: navigationBlockParents.length > 0, hasSelectedChild: hasSelectedInnerBlock(clientId, true), hasDraggedChild: hasDraggedInnerBlock(clientId, true), parentClientId: navigationBlockParents[0] }; }, [clientId] ); const convertToNavigationLinks = useConvertToNavigationLinks({ clientId, pages, parentClientId, parentPageID }); const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, { renderAppender: false, __unstableDisableDropZone: true, templateLock: isChildOfNavigation ? false : "all", onInput: NOOP, onChange: NOOP, value: blockList }); const { selectBlock } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store); (0,external_wp_element_namespaceObject.useEffect)(() => { if (hasSelectedChild || hasDraggedChild) { openModal(); selectBlock(parentClientId); } }, [ hasSelectedChild, hasDraggedChild, parentClientId, selectBlock, openModal ]); (0,external_wp_element_namespaceObject.useEffect)(() => { setAttributes({ isNested }); }, [isNested, setAttributes]); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ (pagesTree.length > 0 || allowConvertToLinks) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)( external_wp_components_namespaceObject.__experimentalToolsPanel, { label: (0,external_wp_i18n_namespaceObject.__)("Settings"), resetAll: () => { setAttributes({ parentPageID: 0 }); }, dropdownMenuProps, children: [ pagesTree.length > 0 && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)("Parent Page"), hasValue: () => parentPageID !== 0, onDeselect: () => setAttributes({ parentPageID: 0 }), isShownByDefault: true, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ComboboxControl, { __nextHasNoMarginBottom: true, __next40pxDefaultSize: true, className: "editor-page-attributes__parent", label: (0,external_wp_i18n_namespaceObject.__)("Parent"), value: parentPageID, options: pagesTree, onChange: (value) => setAttributes({ parentPageID: value ?? 0 }), help: (0,external_wp_i18n_namespaceObject.__)( "Choose a page to show only its subpages." ) } ) } ), allowConvertToLinks && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { style: { gridColumn: "1 / -1" }, children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { children: convertDescription }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.Button, { __next40pxDefaultSize: true, variant: "primary", accessibleWhenDisabled: true, disabled: !hasResolvedPages, onClick: convertToNavigationLinks, children: (0,external_wp_i18n_namespaceObject.__)("Edit") } ) ] }) ] } ) }), allowConvertToLinks && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToolbarButton, { title: (0,external_wp_i18n_namespaceObject.__)("Edit"), onClick: openModal, children: (0,external_wp_i18n_namespaceObject.__)("Edit") } ) }), isOpen && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( ConvertToLinksModal, { onClick: convertToNavigationLinks, onClose: closeModal, disabled: !hasResolvedPages } ) ] }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( BlockContent, { blockProps, innerBlocksProps, hasResolvedPages, blockList, pages, parentPageID } ) ] }); } ;// ./node_modules/@wordpress/block-library/build-module/page-list/index.js const { name: page_list_name } = page_list_block_namespaceObject; const page_list_settings = { icon: pages_default, example: {}, edit: PageListEdit }; const page_list_init = () => initBlock({ name: page_list_name, metadata: page_list_block_namespaceObject, settings: page_list_settings }); ;// ./node_modules/@wordpress/block-library/build-module/page-list-item/block.json const page_list_item_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/page-list-item","title":"Page List Item","category":"widgets","parent":["core/page-list"],"description":"Displays a page inside a list of all pages.","keywords":["page","menu","navigation"],"textdomain":"default","attributes":{"id":{"type":"number"},"label":{"type":"string"},"title":{"type":"string"},"link":{"type":"string"},"hasChildren":{"type":"boolean"}},"usesContext":["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","style","openSubmenusOnClick"],"supports":{"reusable":false,"html":false,"lock":false,"inserter":false,"__experimentalToolbar":false,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-page-list-editor","style":"wp-block-page-list"}'); ;// ./node_modules/@wordpress/block-library/build-module/navigation-link/icons.js const icons_ItemSubmenuIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M1.50002 4L6.00002 8L10.5 4", strokeWidth: "1.5" }) } ); ;// ./node_modules/@wordpress/block-library/build-module/page-list-item/edit.js function useFrontPageId() { return (0,external_wp_data_namespaceObject.useSelect)((select) => { const canReadSettings = select(external_wp_coreData_namespaceObject.store).canUser("read", { kind: "root", name: "site" }); if (!canReadSettings) { return void 0; } const site = select(external_wp_coreData_namespaceObject.store).getEntityRecord("root", "site"); return site?.show_on_front === "page" && site?.page_on_front; }, []); } function PageListItemEdit({ context, attributes }) { const { id, label, link, hasChildren, title } = attributes; const isNavigationChild = "showSubmenuIcon" in context; const frontPageId = useFrontPageId(); const innerBlocksColors = getColors(context, true); const navigationChildBlockProps = getNavigationChildBlockProps(innerBlocksColors); const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)(navigationChildBlockProps, { className: "wp-block-pages-list__item" }); const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)( "li", { className: dist_clsx("wp-block-pages-list__item", { "has-child": hasChildren, "wp-block-navigation-item": isNavigationChild, "open-on-click": context.openSubmenusOnClick, "open-on-hover-click": !context.openSubmenusOnClick && context.showSubmenuIcon, "menu-item-home": id === frontPageId }), children: [ hasChildren && context.openSubmenusOnClick ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "button", { type: "button", className: "wp-block-navigation-item__content wp-block-navigation-submenu__toggle", "aria-expanded": "false", children: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(label) } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { className: "wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(icons_ItemSubmenuIcon, {}) }) ] }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "a", { className: dist_clsx("wp-block-pages-list__item__link", { "wp-block-navigation-item__content": isNavigationChild }), href: link, children: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title) } ), hasChildren && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ !context.openSubmenusOnClick && context.showSubmenuIcon && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "button", { className: "wp-block-navigation-item__content wp-block-navigation-submenu__toggle wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon", "aria-expanded": "false", type: "button", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(icons_ItemSubmenuIcon, {}) } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", { ...innerBlocksProps }) ] }) ] }, id ); } ;// ./node_modules/@wordpress/block-library/build-module/page-list-item/index.js const { name: page_list_item_name } = page_list_item_block_namespaceObject; const page_list_item_settings = { __experimentalLabel: ({ label }) => label, icon: page_default, example: {}, edit: PageListItemEdit }; const page_list_item_init = () => initBlock({ name: page_list_item_name, metadata: page_list_item_block_namespaceObject, settings: page_list_item_settings }); ;// ./node_modules/@wordpress/icons/build-module/library/paragraph.js var paragraph_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "m9.99609 14v-.2251l.00391.0001v6.225h1.5v-14.5h2.5v14.5h1.5v-14.5h3v-1.5h-8.50391c-2.76142 0-5 2.23858-5 5 0 2.7614 2.23858 5 5 5z" }) }); ;// ./node_modules/@wordpress/block-library/build-module/paragraph/deprecated.js const deprecated_supports = { className: false }; const paragraph_deprecated_blockAttributes = { align: { type: "string" }, content: { type: "string", source: "html", selector: "p", default: "" }, dropCap: { type: "boolean", default: false }, placeholder: { type: "string" }, textColor: { type: "string" }, backgroundColor: { type: "string" }, fontSize: { type: "string" }, direction: { type: "string", enum: ["ltr", "rtl"] }, style: { type: "object" } }; const migrateCustomColorsAndFontSizes = (attributes) => { if (!attributes.customTextColor && !attributes.customBackgroundColor && !attributes.customFontSize) { return attributes; } const style2 = {}; if (attributes.customTextColor || attributes.customBackgroundColor) { style2.color = {}; } if (attributes.customTextColor) { style2.color.text = attributes.customTextColor; } if (attributes.customBackgroundColor) { style2.color.background = attributes.customBackgroundColor; } if (attributes.customFontSize) { style2.typography = { fontSize: attributes.customFontSize }; } const { customTextColor, customBackgroundColor, customFontSize, ...restAttributes } = attributes; return { ...restAttributes, style: style2 }; }; const { style, ...restBlockAttributes } = paragraph_deprecated_blockAttributes; const paragraph_deprecated_deprecated = [ // Version without drop cap on aligned text. { supports: deprecated_supports, attributes: { ...restBlockAttributes, customTextColor: { type: "string" }, customBackgroundColor: { type: "string" }, customFontSize: { type: "number" } }, save({ attributes }) { const { align, content, dropCap, direction } = attributes; const className = dist_clsx({ "has-drop-cap": align === ((0,external_wp_i18n_namespaceObject.isRTL)() ? "left" : "right") || align === "center" ? false : dropCap, [`has-text-align-${align}`]: align }); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, dir: direction }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: content }) }); } }, { supports: deprecated_supports, attributes: { ...restBlockAttributes, customTextColor: { type: "string" }, customBackgroundColor: { type: "string" }, customFontSize: { type: "number" } }, migrate: migrateCustomColorsAndFontSizes, save({ attributes }) { const { align, content, dropCap, backgroundColor, textColor, customBackgroundColor, customTextColor, fontSize, customFontSize, direction } = attributes; const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", textColor); const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)( "background-color", backgroundColor ); const fontSizeClass = (0,external_wp_blockEditor_namespaceObject.getFontSizeClass)(fontSize); const className = dist_clsx({ "has-text-color": textColor || customTextColor, "has-background": backgroundColor || customBackgroundColor, "has-drop-cap": dropCap, [`has-text-align-${align}`]: align, [fontSizeClass]: fontSizeClass, [textClass]: textClass, [backgroundClass]: backgroundClass }); const styles = { backgroundColor: backgroundClass ? void 0 : customBackgroundColor, color: textClass ? void 0 : customTextColor, fontSize: fontSizeClass ? void 0 : customFontSize }; return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "p", style: styles, className: className ? className : void 0, value: content, dir: direction } ); } }, { supports: deprecated_supports, attributes: { ...restBlockAttributes, customTextColor: { type: "string" }, customBackgroundColor: { type: "string" }, customFontSize: { type: "number" } }, migrate: migrateCustomColorsAndFontSizes, save({ attributes }) { const { align, content, dropCap, backgroundColor, textColor, customBackgroundColor, customTextColor, fontSize, customFontSize, direction } = attributes; const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", textColor); const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)( "background-color", backgroundColor ); const fontSizeClass = (0,external_wp_blockEditor_namespaceObject.getFontSizeClass)(fontSize); const className = dist_clsx({ "has-text-color": textColor || customTextColor, "has-background": backgroundColor || customBackgroundColor, "has-drop-cap": dropCap, [fontSizeClass]: fontSizeClass, [textClass]: textClass, [backgroundClass]: backgroundClass }); const styles = { backgroundColor: backgroundClass ? void 0 : customBackgroundColor, color: textClass ? void 0 : customTextColor, fontSize: fontSizeClass ? void 0 : customFontSize, textAlign: align }; return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "p", style: styles, className: className ? className : void 0, value: content, dir: direction } ); } }, { supports: deprecated_supports, attributes: { ...restBlockAttributes, customTextColor: { type: "string" }, customBackgroundColor: { type: "string" }, customFontSize: { type: "number" }, width: { type: "string" } }, migrate: migrateCustomColorsAndFontSizes, save({ attributes }) { const { width, align, content, dropCap, backgroundColor, textColor, customBackgroundColor, customTextColor, fontSize, customFontSize } = attributes; const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", textColor); const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)( "background-color", backgroundColor ); const fontSizeClass = fontSize && `is-${fontSize}-text`; const className = dist_clsx({ [`align${width}`]: width, "has-background": backgroundColor || customBackgroundColor, "has-drop-cap": dropCap, [fontSizeClass]: fontSizeClass, [textClass]: textClass, [backgroundClass]: backgroundClass }); const styles = { backgroundColor: backgroundClass ? void 0 : customBackgroundColor, color: textClass ? void 0 : customTextColor, fontSize: fontSizeClass ? void 0 : customFontSize, textAlign: align }; return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "p", style: styles, className: className ? className : void 0, value: content } ); } }, { supports: deprecated_supports, attributes: { ...restBlockAttributes, fontSize: { type: "number" } }, save({ attributes }) { const { width, align, content, dropCap, backgroundColor, textColor, fontSize } = attributes; const className = dist_clsx({ [`align${width}`]: width, "has-background": backgroundColor, "has-drop-cap": dropCap }); const styles = { backgroundColor, color: textColor, fontSize, textAlign: align }; return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "p", { style: styles, className: className ? className : void 0, children: content } ); }, migrate(attributes) { return migrateCustomColorsAndFontSizes({ ...attributes, customFontSize: Number.isFinite(attributes.fontSize) ? attributes.fontSize : void 0, customTextColor: attributes.textColor && "#" === attributes.textColor[0] ? attributes.textColor : void 0, customBackgroundColor: attributes.backgroundColor && "#" === attributes.backgroundColor[0] ? attributes.backgroundColor : void 0 }); } }, { supports: deprecated_supports, attributes: { ...paragraph_deprecated_blockAttributes, content: { type: "string", source: "html", default: "" } }, save({ attributes }) { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, { children: attributes.content }); }, migrate(attributes) { return attributes; } } ]; var paragraph_deprecated_deprecated_default = paragraph_deprecated_deprecated; ;// ./node_modules/@wordpress/icons/build-module/library/format-ltr.js var format_ltr_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M3 9c0 2.8 2.2 5 5 5v-.2V20h1.5V5.5H12V20h1.5V5.5h3V4H8C5.2 4 3 6.2 3 9Zm15.9-1-1.1 1 2.6 3-2.6 3 1.1 1 3.4-4-3.4-4Z" }) }); ;// ./node_modules/@wordpress/block-library/build-module/paragraph/use-enter.js function useOnEnter(props) { const { batch } = (0,external_wp_data_namespaceObject.useRegistry)(); const { moveBlocksToPosition, replaceInnerBlocks, duplicateBlocks, insertBlock } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store); const { getBlockRootClientId, getBlockIndex, getBlockOrder, getBlockName, getBlock, getNextBlockClientId, canInsertBlockType } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store); const propsRef = (0,external_wp_element_namespaceObject.useRef)(props); propsRef.current = props; return (0,external_wp_compose_namespaceObject.useRefEffect)((element) => { function onKeyDown(event) { if (event.defaultPrevented) { return; } if (event.keyCode !== external_wp_keycodes_namespaceObject.ENTER) { return; } const { content, clientId } = propsRef.current; if (content.length) { return; } const wrapperClientId = getBlockRootClientId(clientId); if (!(0,external_wp_blocks_namespaceObject.hasBlockSupport)( getBlockName(wrapperClientId), "__experimentalOnEnter", false )) { return; } const order = getBlockOrder(wrapperClientId); const position = order.indexOf(clientId); if (position === order.length - 1) { let newWrapperClientId = wrapperClientId; while (!canInsertBlockType( getBlockName(clientId), getBlockRootClientId(newWrapperClientId) )) { newWrapperClientId = getBlockRootClientId(newWrapperClientId); } if (typeof newWrapperClientId === "string") { event.preventDefault(); moveBlocksToPosition( [clientId], wrapperClientId, getBlockRootClientId(newWrapperClientId), getBlockIndex(newWrapperClientId) + 1 ); } return; } const defaultBlockName = (0,external_wp_blocks_namespaceObject.getDefaultBlockName)(); if (!canInsertBlockType( defaultBlockName, getBlockRootClientId(wrapperClientId) )) { return; } event.preventDefault(); const wrapperBlock = getBlock(wrapperClientId); batch(() => { duplicateBlocks([wrapperClientId]); const blockIndex = getBlockIndex(wrapperClientId); replaceInnerBlocks( wrapperClientId, wrapperBlock.innerBlocks.slice(0, position) ); replaceInnerBlocks( getNextBlockClientId(wrapperClientId), wrapperBlock.innerBlocks.slice(position + 1) ); insertBlock( (0,external_wp_blocks_namespaceObject.createBlock)(defaultBlockName), blockIndex + 1, getBlockRootClientId(wrapperClientId), true ); }); } element.addEventListener("keydown", onKeyDown); return () => { element.removeEventListener("keydown", onKeyDown); }; }, []); } ;// ./node_modules/@wordpress/block-library/build-module/paragraph/edit.js function ParagraphRTLControl({ direction, setDirection }) { return (0,external_wp_i18n_namespaceObject.isRTL)() && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToolbarButton, { icon: format_ltr_default, title: (0,external_wp_i18n_namespaceObject._x)("Left to right", "editor button"), isActive: direction === "ltr", onClick: () => { setDirection(direction === "ltr" ? void 0 : "ltr"); } } ); } function hasDropCapDisabled(align) { return align === ((0,external_wp_i18n_namespaceObject.isRTL)() ? "left" : "right") || align === "center"; } function DropCapControl({ clientId, attributes, setAttributes, name }) { const [isDropCapFeatureEnabled] = (0,external_wp_blockEditor_namespaceObject.useSettings)("typography.dropCap"); if (!isDropCapFeatureEnabled) { return null; } const { align, dropCap } = attributes; let helpText; if (hasDropCapDisabled(align)) { helpText = (0,external_wp_i18n_namespaceObject.__)("Not available for aligned text."); } else if (dropCap) { helpText = (0,external_wp_i18n_namespaceObject.__)("Showing large initial letter."); } else { helpText = (0,external_wp_i18n_namespaceObject.__)("Show a large initial letter."); } const isDropCapControlEnabledByDefault = (0,external_wp_blocks_namespaceObject.getBlockSupport)( name, "typography.defaultControls.dropCap", false ); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "typography", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { hasValue: () => !!dropCap, label: (0,external_wp_i18n_namespaceObject.__)("Drop cap"), isShownByDefault: isDropCapControlEnabledByDefault, onDeselect: () => setAttributes({ dropCap: false }), resetAllFilter: () => ({ dropCap: false }), panelId: clientId, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Drop cap"), checked: !!dropCap, onChange: () => setAttributes({ dropCap: !dropCap }), help: helpText, disabled: hasDropCapDisabled(align) } ) } ) }); } function ParagraphBlock({ attributes, mergeBlocks, onReplace, onRemove, setAttributes, clientId, isSelected: isSingleSelected, name }) { const { align, content, direction, dropCap, placeholder } = attributes; const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ ref: useOnEnter({ clientId, content }), className: dist_clsx({ "has-drop-cap": hasDropCapDisabled(align) ? false : dropCap, [`has-text-align-${align}`]: align }), style: { direction } }); const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)(); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ blockEditingMode === "default" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.AlignmentControl, { value: align, onChange: (newAlign) => setAttributes({ align: newAlign, dropCap: hasDropCapDisabled(newAlign) ? false : dropCap }) } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( ParagraphRTLControl, { direction, setDirection: (newDirection) => setAttributes({ direction: newDirection }) } ) ] }), isSingleSelected && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( DropCapControl, { name, clientId, attributes, setAttributes } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.RichText, { identifier: "content", tagName: "p", ...blockProps, value: content, onChange: (newContent) => setAttributes({ content: newContent }), onMerge: mergeBlocks, onReplace, onRemove, "aria-label": external_wp_blockEditor_namespaceObject.RichText.isEmpty(content) ? (0,external_wp_i18n_namespaceObject.__)( "Empty block; start writing or type forward slash to choose a block" ) : (0,external_wp_i18n_namespaceObject.__)("Block: Paragraph"), "data-empty": external_wp_blockEditor_namespaceObject.RichText.isEmpty(content), placeholder: placeholder || (0,external_wp_i18n_namespaceObject.__)("Type / to choose a block"), "data-custom-placeholder": placeholder ? true : void 0, __unstableEmbedURLOnPaste: true, __unstableAllowPrefixTransformations: true } ) ] }); } var paragraph_edit_edit_default = ParagraphBlock; ;// ./node_modules/@wordpress/block-library/build-module/paragraph/block.json const paragraph_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/paragraph","title":"Paragraph","category":"text","description":"Start with the basic building block of all narrative.","keywords":["text"],"textdomain":"default","attributes":{"align":{"type":"string"},"content":{"type":"rich-text","source":"rich-text","selector":"p","role":"content"},"dropCap":{"type":"boolean","default":false},"placeholder":{"type":"string"},"direction":{"type":"string","enum":["ltr","rtl"]}},"supports":{"splitting":true,"anchor":true,"className":false,"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalTextDecoration":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalWritingMode":true,"fitText":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalSelector":"p","__unstablePasteTextInline":true,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-paragraph-editor","style":"wp-block-paragraph"}'); ;// ./node_modules/@wordpress/block-library/build-module/paragraph/save.js function paragraph_save_save({ attributes }) { const { align, content, dropCap, direction } = attributes; const className = dist_clsx({ "has-drop-cap": align === ((0,external_wp_i18n_namespaceObject.isRTL)() ? "left" : "right") || align === "center" ? false : dropCap, [`has-text-align-${align}`]: align }); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, dir: direction }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: content }) }); } ;// ./node_modules/@wordpress/block-library/build-module/paragraph/transforms.js const paragraph_transforms_transforms = { from: [ { type: "raw", // Paragraph is a fallback and should be matched last. priority: 20, selector: "p", schema: ({ phrasingContentSchema, isPaste }) => ({ p: { children: phrasingContentSchema, attributes: isPaste ? [] : ["style", "id"] } }), transform(node) { const attributes = (0,external_wp_blocks_namespaceObject.getBlockAttributes)(paragraph_block_namespaceObject.name, node.outerHTML); const { textAlign } = node.style || {}; if (textAlign === "left" || textAlign === "center" || textAlign === "right") { attributes.align = textAlign; } return (0,external_wp_blocks_namespaceObject.createBlock)(paragraph_block_namespaceObject.name, attributes); } } ] }; var paragraph_transforms_transforms_default = paragraph_transforms_transforms; ;// ./node_modules/@wordpress/block-library/build-module/paragraph/variations.js const paragraph_variations_variations = [ { name: "paragraph", title: (0,external_wp_i18n_namespaceObject.__)("Paragraph"), description: (0,external_wp_i18n_namespaceObject.__)( "Start with the basic building block of all narrative." ), isDefault: true, scope: ["block", "inserter", "transform"], attributes: { fitText: void 0 }, icon: paragraph_default }, // There is a hardcoded workaround in packages/block-editor/src/store/selectors.js // to make Stretchy variations appear as the last of their sections in the inserter. { name: "stretchy-paragraph", title: (0,external_wp_i18n_namespaceObject.__)("Stretchy Paragraph"), description: (0,external_wp_i18n_namespaceObject.__)("Paragraph that resizes to fit its container."), icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M3 9c0 2.8 2.2 5 5 5v-.2V20h1.5V5.5H12V20h1.5V5.5h3V4H8C5.2 4 3 6.2 3 9Zm16.2-.2v1.5h2.2L17.7 14l1.1 1.1 3.7-3.7v2.2H24V8.8h-4.8Z" }) }), attributes: { fitText: true }, scope: ["inserter", "transform"], isActive: (blockAttributes) => blockAttributes.fitText === true } ]; var paragraph_variations_variations_default = paragraph_variations_variations; ;// ./node_modules/@wordpress/block-library/build-module/paragraph/index.js const { name: paragraph_name } = paragraph_block_namespaceObject; const paragraph_settings = { icon: paragraph_default, example: { attributes: { content: (0,external_wp_i18n_namespaceObject.__)( "In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing." ) } }, __experimentalLabel(attributes, { context }) { const customName = attributes?.metadata?.name; if (context === "list-view" && customName) { return customName; } if (context === "accessibility") { if (customName) { return customName; } const { content } = attributes; return !content || content.length === 0 ? (0,external_wp_i18n_namespaceObject.__)("Empty") : content; } }, transforms: paragraph_transforms_transforms_default, deprecated: paragraph_deprecated_deprecated_default, merge(attributes, attributesToMerge) { return { content: (attributes.content || "") + (attributesToMerge.content || "") }; }, edit: paragraph_edit_edit_default, save: paragraph_save_save, variations: paragraph_variations_variations_default }; const paragraph_init = () => initBlock({ name: paragraph_name, metadata: paragraph_block_namespaceObject, settings: paragraph_settings }); ;// ./node_modules/@wordpress/icons/build-module/library/post-author.js var post_author_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_primitives_namespaceObject.Path, { d: "M10 4.5a1 1 0 11-2 0 1 1 0 012 0zm1.5 0a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zm2.25 7.5v-1A2.75 2.75 0 0011 8.25H7A2.75 2.75 0 004.25 11v1h1.5v-1c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v1h1.5zM4 20h9v-1.5H4V20zm16-4H4v-1.5h16V16z", fillRule: "evenodd", clipRule: "evenodd" } ) }); ;// ./node_modules/@wordpress/block-library/build-module/post-author/block.json const post_author_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-author","title":"Author","category":"theme","description":"Display post author details such as name, avatar, and bio.","textdomain":"default","attributes":{"textAlign":{"type":"string"},"avatarSize":{"type":"number","default":48},"showAvatar":{"type":"boolean","default":true},"showBio":{"type":"boolean"},"byline":{"type":"string"},"isLink":{"type":"boolean","default":false,"role":"content"},"linkTarget":{"type":"string","default":"_self","role":"content"}},"usesContext":["postType","postId","queryId"],"supports":{"html":false,"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}},"filter":{"duotone":true}},"selectors":{"filter":{"duotone":".wp-block-post-author .wp-block-post-author__avatar img"}},"editorStyle":"wp-block-post-author-editor","style":"wp-block-post-author"}'); ;// ./node_modules/@wordpress/block-library/build-module/post-author/edit.js const edit_AUTHORS_QUERY = { who: "authors", per_page: 100, _fields: "id,name", context: "view" }; function AuthorCombobox({ value, onChange }) { const [filterValue, setFilterValue] = (0,external_wp_element_namespaceObject.useState)(""); const { authors, isLoading } = (0,external_wp_data_namespaceObject.useSelect)( (select) => { const { getUsers, isResolving } = select(external_wp_coreData_namespaceObject.store); const query = { ...edit_AUTHORS_QUERY }; if (filterValue) { query.search = filterValue; query.search_columns = ["name"]; } return { authors: getUsers(query), isLoading: isResolving("getUsers", [query]) }; }, [filterValue] ); const authorOptions = (0,external_wp_element_namespaceObject.useMemo)(() => { const fetchedAuthors = (authors ?? []).map((author) => { return { value: author.id, label: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(author.name) }; }); const foundAuthor = fetchedAuthors.findIndex( (fetchedAuthor) => value?.id === fetchedAuthor.value ); let currentAuthor = []; if (foundAuthor < 0 && value) { currentAuthor = [ { value: value.id, label: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(value.name) } ]; } else if (foundAuthor < 0 && !value) { currentAuthor = [ { value: 0, label: (0,external_wp_i18n_namespaceObject.__)("(No author)") } ]; } return [...currentAuthor, ...fetchedAuthors]; }, [authors, value]); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ComboboxControl, { __next40pxDefaultSize: true, __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Author"), options: authorOptions, value: value?.id, onFilterValueChange: (0,external_wp_compose_namespaceObject.debounce)(setFilterValue, 300), onChange, allowReset: false, isLoading } ); } function PostAuthorEdit({ isSelected, context: { postType, postId, queryId }, attributes, setAttributes }) { const isDescendentOfQueryLoop = Number.isFinite(queryId); const dropdownMenuProps = useToolsPanelDropdownMenuProps(); const defaultAvatar = useDefaultAvatar(); const { authorDetails, canAssignAuthor, supportsAuthor } = (0,external_wp_data_namespaceObject.useSelect)( (select) => { const { getEditedEntityRecord, getUser, getPostType } = select(external_wp_coreData_namespaceObject.store); const currentPost = getEditedEntityRecord( "postType", postType, postId ); const authorId = currentPost?.author; return { authorDetails: authorId ? getUser(authorId, { context: "view" }) : null, supportsAuthor: getPostType(postType)?.supports?.author ?? false, canAssignAuthor: currentPost?._links?.["wp:action-assign-author"] ? true : false }; }, [postType, postId] ); const { editEntityRecord } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store); const { textAlign, showAvatar, showBio, byline, isLink, linkTarget, avatarSize } = attributes; const avatarSizes = []; const authorName = authorDetails?.name || (0,external_wp_i18n_namespaceObject.__)("Post Author"); if (authorDetails?.avatar_urls) { Object.keys(authorDetails.avatar_urls).forEach((size) => { avatarSizes.push({ value: size, label: `${size} x ${size}` }); }); } const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className: dist_clsx({ [`has-text-align-${textAlign}`]: textAlign }) }); const handleSelect = (nextAuthorId) => { editEntityRecord("postType", postType, postId, { author: nextAuthorId }); }; const showAuthorControl = !!postId && !isDescendentOfQueryLoop && canAssignAuthor; if (!supportsAuthor && postType !== void 0) { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: (0,external_wp_i18n_namespaceObject.sprintf)( // translators: %s: Name of the post type e.g: "post". (0,external_wp_i18n_namespaceObject.__)("This post type (%s) does not support the author."), postType ) }); } return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)( external_wp_components_namespaceObject.__experimentalToolsPanel, { label: (0,external_wp_i18n_namespaceObject.__)("Settings"), resetAll: () => { setAttributes({ avatarSize: 48, showAvatar: true, isLink: false, linkTarget: "_self" }); }, dropdownMenuProps, children: [ showAuthorControl && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { style: { gridColumn: "1 / -1" }, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( AuthorCombobox, { value: authorDetails, onChange: handleSelect } ) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)("Show avatar"), isShownByDefault: true, hasValue: () => !showAvatar, onDeselect: () => setAttributes({ showAvatar: true }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Show avatar"), checked: showAvatar, onChange: () => setAttributes({ showAvatar: !showAvatar }) } ) } ), showAvatar && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)("Avatar size"), isShownByDefault: true, hasValue: () => avatarSize !== 48, onDeselect: () => setAttributes({ avatarSize: 48 }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.SelectControl, { __next40pxDefaultSize: true, __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Avatar size"), value: avatarSize, options: avatarSizes, onChange: (size) => { setAttributes({ avatarSize: Number(size) }); } } ) } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)("Show bio"), isShownByDefault: true, hasValue: () => !!showBio, onDeselect: () => setAttributes({ showBio: void 0 }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Show bio"), checked: !!showBio, onChange: () => setAttributes({ showBio: !showBio }) } ) } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)("Link author name to author page"), isShownByDefault: true, hasValue: () => !!isLink, onDeselect: () => setAttributes({ isLink: false }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Link author name to author page"), checked: isLink, onChange: () => setAttributes({ isLink: !isLink }) } ) } ), isLink && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)("Link target"), isShownByDefault: true, hasValue: () => linkTarget !== "_self", onDeselect: () => setAttributes({ linkTarget: "_self" }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"), onChange: (value) => setAttributes({ linkTarget: value ? "_blank" : "_self" }), checked: linkTarget === "_blank" } ) } ) ] } ) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.AlignmentControl, { value: textAlign, onChange: (nextAlign) => { setAttributes({ textAlign: nextAlign }); } } ) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [ showAvatar && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-post-author__avatar", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "img", { width: avatarSize, src: authorDetails?.avatar_urls?.[avatarSize] || defaultAvatar, alt: authorDetails?.name || (0,external_wp_i18n_namespaceObject.__)("Default Avatar") } ) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "wp-block-post-author__content", children: [ (!external_wp_blockEditor_namespaceObject.RichText.isEmpty(byline) || isSelected) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.RichText, { identifier: "byline", className: "wp-block-post-author__byline", "aria-label": (0,external_wp_i18n_namespaceObject.__)("Post author byline text"), placeholder: (0,external_wp_i18n_namespaceObject.__)("Write byline\u2026"), value: byline, onChange: (value) => setAttributes({ byline: value }) } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { className: "wp-block-post-author__name", children: isLink ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "a", { href: "#post-author-pseudo-link", onClick: (event) => event.preventDefault(), children: authorName } ) : authorName }), showBio && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "p", { className: "wp-block-post-author__bio", dangerouslySetInnerHTML: { __html: authorDetails?.description } } ) ] }) ] }) ] }); } var post_author_edit_edit_default = PostAuthorEdit; ;// ./node_modules/@wordpress/block-library/build-module/post-author/index.js const { name: post_author_name } = post_author_block_namespaceObject; const post_author_settings = { icon: post_author_default, example: { viewportWidth: 350, attributes: { showBio: true, byline: (0,external_wp_i18n_namespaceObject.__)("Posted by") } }, edit: post_author_edit_edit_default }; const post_author_init = () => initBlock({ name: post_author_name, metadata: post_author_block_namespaceObject, settings: post_author_settings }); ;// ./node_modules/@wordpress/block-library/build-module/post-author-name/block.json const post_author_name_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-author-name","title":"Author Name","category":"theme","description":"The author name.","textdomain":"default","attributes":{"textAlign":{"type":"string"},"isLink":{"type":"boolean","default":false,"role":"content"},"linkTarget":{"type":"string","default":"_self","role":"content"}},"usesContext":["postType","postId"],"example":{"viewportWidth":350},"supports":{"html":false,"spacing":{"margin":true,"padding":true},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-post-author-name"}'); ;// ./node_modules/@wordpress/block-library/build-module/post-author-name/edit.js function PostAuthorNameEdit({ context: { postType, postId }, attributes: { textAlign, isLink, linkTarget }, setAttributes }) { const { authorName, supportsAuthor } = (0,external_wp_data_namespaceObject.useSelect)( (select) => { const { getEditedEntityRecord, getUser, getPostType } = select(external_wp_coreData_namespaceObject.store); const _authorId = getEditedEntityRecord( "postType", postType, postId )?.author; return { authorName: _authorId ? getUser(_authorId) : null, supportsAuthor: getPostType(postType)?.supports?.author ?? false }; }, [postType, postId] ); const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className: dist_clsx({ [`has-text-align-${textAlign}`]: textAlign }) }); const displayName = authorName?.name || (0,external_wp_i18n_namespaceObject.__)("Author Name"); const displayAuthor = isLink ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "a", { href: "#author-pseudo-link", onClick: (event) => event.preventDefault(), className: "wp-block-post-author-name__link", children: displayName } ) : displayName; const dropdownMenuProps = useToolsPanelDropdownMenuProps(); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.AlignmentControl, { value: textAlign, onChange: (nextAlign) => { setAttributes({ textAlign: nextAlign }); } } ) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)( external_wp_components_namespaceObject.__experimentalToolsPanel, { label: (0,external_wp_i18n_namespaceObject.__)("Settings"), resetAll: () => { setAttributes({ isLink: false, linkTarget: "_self" }); }, dropdownMenuProps, children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)("Link to author archive"), isShownByDefault: true, hasValue: () => isLink, onDeselect: () => setAttributes({ isLink: false }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Link to author archive"), onChange: () => setAttributes({ isLink: !isLink }), checked: isLink } ) } ), isLink && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"), isShownByDefault: true, hasValue: () => linkTarget !== "_self", onDeselect: () => setAttributes({ linkTarget: "_self" }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"), onChange: (value) => setAttributes({ linkTarget: value ? "_blank" : "_self" }), checked: linkTarget === "_blank" } ) } ) ] } ) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: !supportsAuthor && postType !== void 0 ? (0,external_wp_i18n_namespaceObject.sprintf)( // translators: %s: Name of the post type e.g: "post". (0,external_wp_i18n_namespaceObject.__)( "This post type (%s) does not support the author." ), postType ) : displayAuthor }) ] }); } var post_author_name_edit_edit_default = PostAuthorNameEdit; ;// ./node_modules/@wordpress/block-library/build-module/post-author-name/transforms.js const post_author_name_transforms_transforms = { from: [ { type: "block", blocks: ["core/post-author"], transform: ({ textAlign }) => (0,external_wp_blocks_namespaceObject.createBlock)("core/post-author-name", { textAlign }) } ], to: [ { type: "block", blocks: ["core/post-author"], transform: ({ textAlign }) => (0,external_wp_blocks_namespaceObject.createBlock)("core/post-author", { textAlign }) } ] }; var post_author_name_transforms_transforms_default = post_author_name_transforms_transforms; ;// ./node_modules/@wordpress/block-library/build-module/post-author-name/index.js const { name: post_author_name_name } = post_author_name_block_namespaceObject; const post_author_name_settings = { icon: post_author_default, transforms: post_author_name_transforms_transforms_default, edit: post_author_name_edit_edit_default }; const post_author_name_init = () => initBlock({ name: post_author_name_name, metadata: post_author_name_block_namespaceObject, settings: post_author_name_settings }); ;// ./node_modules/@wordpress/block-library/build-module/post-author-biography/block.json const post_author_biography_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-author-biography","title":"Author Biography","category":"theme","description":"The author biography.","textdomain":"default","attributes":{"textAlign":{"type":"string"}},"usesContext":["postType","postId"],"example":{"viewportWidth":350},"supports":{"spacing":{"margin":true,"padding":true},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-post-author-biography"}'); ;// ./node_modules/@wordpress/block-library/build-module/post-author-biography/edit.js function PostAuthorBiographyEdit({ context: { postType, postId }, attributes: { textAlign }, setAttributes }) { const { authorDetails } = (0,external_wp_data_namespaceObject.useSelect)( (select) => { const { getEditedEntityRecord, getUser } = select(external_wp_coreData_namespaceObject.store); const _authorId = getEditedEntityRecord( "postType", postType, postId )?.author; return { authorDetails: _authorId ? getUser(_authorId) : null }; }, [postType, postId] ); const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className: dist_clsx({ [`has-text-align-${textAlign}`]: textAlign }) }); const displayAuthorBiography = authorDetails?.description || (0,external_wp_i18n_namespaceObject.__)("Author Biography"); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.AlignmentControl, { value: textAlign, onChange: (nextAlign) => { setAttributes({ textAlign: nextAlign }); } } ) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "div", { ...blockProps, dangerouslySetInnerHTML: { __html: displayAuthorBiography } } ) ] }); } var post_author_biography_edit_edit_default = PostAuthorBiographyEdit; ;// ./node_modules/@wordpress/block-library/build-module/post-author-biography/index.js const { name: post_author_biography_name } = post_author_biography_block_namespaceObject; const post_author_biography_settings = { icon: post_author_default, edit: post_author_biography_edit_edit_default }; const post_author_biography_init = () => initBlock({ name: post_author_biography_name, metadata: post_author_biography_block_namespaceObject, settings: post_author_biography_settings }); ;// ./node_modules/@wordpress/block-library/build-module/post-comment/block.json const post_comment_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"__experimental":"fse","name":"core/post-comment","title":"Comment (deprecated)","category":"theme","allowedBlocks":["core/avatar","core/comment-author-name","core/comment-content","core/comment-date","core/comment-edit-link","core/comment-reply-link"],"description":"This block is deprecated. Please use the Comments block instead.","textdomain":"default","attributes":{"commentId":{"type":"number"}},"providesContext":{"commentId":"commentId"},"supports":{"html":false,"inserter":false,"interactivity":{"clientNavigation":true}}}'); ;// ./node_modules/@wordpress/icons/build-module/library/block-default.js var block_default_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.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" }) }); ;// ./node_modules/@wordpress/block-library/build-module/post-comment/edit.js const post_comment_edit_TEMPLATE = [ ["core/avatar"], ["core/comment-author-name"], ["core/comment-date"], ["core/comment-content"], ["core/comment-reply-link"], ["core/comment-edit-link"] ]; function post_comment_edit_Edit({ attributes: { commentId }, setAttributes }) { const [commentIdInput, setCommentIdInput] = (0,external_wp_element_namespaceObject.useState)(commentId); const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)(); const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, { template: post_comment_edit_TEMPLATE }); if (!commentId) { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)( external_wp_components_namespaceObject.Placeholder, { icon: block_default_default, label: (0,external_wp_i18n_namespaceObject._x)("Post Comment", "block title"), instructions: (0,external_wp_i18n_namespaceObject.__)( "To show a comment, input the comment ID." ), children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.TextControl, { __next40pxDefaultSize: true, __nextHasNoMarginBottom: true, value: commentId, onChange: (val) => setCommentIdInput(parseInt(val)) } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.Button, { __next40pxDefaultSize: true, variant: "primary", onClick: () => { setAttributes({ commentId: commentIdInput }); }, children: (0,external_wp_i18n_namespaceObject.__)("Save") } ) ] } ) }); } return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps }); } ;// ./node_modules/@wordpress/block-library/build-module/post-comment/save.js function post_comment_save_save() { const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save(); const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps }); } ;// ./node_modules/@wordpress/block-library/build-module/post-comment/index.js const { name: post_comment_name } = post_comment_block_namespaceObject; const post_comment_settings = { icon: comment_default, edit: post_comment_edit_Edit, save: post_comment_save_save }; const post_comment_init = () => initBlock({ name: post_comment_name, metadata: post_comment_block_namespaceObject, settings: post_comment_settings }); ;// ./node_modules/@wordpress/icons/build-module/library/post-comments-count.js var post_comments_count_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M13 8H4v1.5h9V8zM4 4v1.5h16V4H4zm9 8H5c-.6 0-1 .4-1 1v8.3c0 .3.2.7.6.8.1.1.2.1.3.1.2 0 .5-.1.6-.3l1.8-1.8H13c.6 0 1-.4 1-1V13c0-.6-.4-1-1-1zm-2.2 6.6H7l1.6-2.2c.3-.4.5-.7.6-.9.1-.2.2-.4.2-.5 0-.2-.1-.3-.1-.4-.1-.1-.2-.1-.4-.1s-.4 0-.6.1c-.3.1-.5.3-.7.4l-.2.2-.2-1.2.1-.1c.3-.2.5-.3.8-.4.3-.1.6-.1.9-.1.3 0 .6.1.9.2.2.1.4.3.6.5.1.2.2.5.2.7 0 .3-.1.6-.2.9-.1.3-.4.7-.7 1.1l-.5.6h1.6v1.2z" }) }); ;// ./node_modules/@wordpress/block-library/build-module/post-comments-count/block.json const post_comments_count_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-comments-count","title":"Comments Count","category":"theme","description":"Display a post\'s comments count.","textdomain":"default","attributes":{"textAlign":{"type":"string"}},"usesContext":["postId"],"example":{"viewportWidth":350},"supports":{"html":false,"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true},"interactivity":{"clientNavigation":true}},"style":"wp-block-post-comments-count"}'); ;// ./node_modules/@wordpress/block-library/build-module/post-comments-count/edit.js function PostCommentsCountEdit({ attributes, context, setAttributes }) { const { textAlign } = attributes; const { postId } = context; const [commentsCount, setCommentsCount] = (0,external_wp_element_namespaceObject.useState)(); const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className: dist_clsx({ [`has-text-align-${textAlign}`]: textAlign }) }); (0,external_wp_element_namespaceObject.useEffect)(() => { if (!postId) { return; } const currentPostId = postId; external_wp_apiFetch_default()({ path: (0,external_wp_url_namespaceObject.addQueryArgs)("/wp/v2/comments", { post: postId }), parse: false }).then((res) => { if (currentPostId === postId) { setCommentsCount(res.headers.get("X-WP-Total")); } }); }, [postId]); const hasPostAndComments = postId && commentsCount !== void 0; const blockStyles = { ...blockProps.style, textDecoration: hasPostAndComments ? blockProps.style?.textDecoration : void 0 }; return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.AlignmentControl, { value: textAlign, onChange: (nextAlign) => { setAttributes({ textAlign: nextAlign }); } } ) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, style: blockStyles, children: hasPostAndComments ? commentsCount : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.__)("Post Comments Count block: post not found.") }) }) ] }); } ;// ./node_modules/@wordpress/block-library/build-module/post-comments-count/transforms.js const post_comments_count_transforms_transforms = { to: [ { type: "block", blocks: ["core/post-comments-link"], transform: ({ textAlign }) => { return (0,external_wp_blocks_namespaceObject.createBlock)("core/post-comments-link", { textAlign }); } } ] }; var post_comments_count_transforms_transforms_default = post_comments_count_transforms_transforms; ;// ./node_modules/@wordpress/block-library/build-module/post-comments-count/index.js const { name: post_comments_count_name } = post_comments_count_block_namespaceObject; const post_comments_count_settings = { icon: post_comments_count_default, edit: PostCommentsCountEdit, transforms: post_comments_count_transforms_transforms_default }; const post_comments_count_init = () => initBlock({ name: post_comments_count_name, metadata: post_comments_count_block_namespaceObject, settings: post_comments_count_settings }); ;// ./node_modules/@wordpress/icons/build-module/library/post-comments-form.js var post_comments_form_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M13 8H4v1.5h9V8zM4 4v1.5h16V4H4zm9 8H5c-.6 0-1 .4-1 1v8.3c0 .3.2.7.6.8.1.1.2.1.3.1.2 0 .5-.1.6-.3l1.8-1.8H13c.6 0 1-.4 1-1V13c0-.6-.4-1-1-1zm-.5 6.6H6.7l-1.2 1.2v-6.3h7v5.1z" }) }); ;// ./node_modules/@wordpress/block-library/build-module/post-comments-form/block.json const post_comments_form_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-comments-form","title":"Comments Form","category":"theme","description":"Display a post\'s comments form.","textdomain":"default","attributes":{"textAlign":{"type":"string"}},"usesContext":["postId","postType"],"supports":{"html":false,"color":{"gradients":true,"heading":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"editorStyle":"wp-block-post-comments-form-editor","style":["wp-block-post-comments-form","wp-block-buttons","wp-block-button"],"example":{"attributes":{"textAlign":"center"}}}'); ;// ./node_modules/@wordpress/block-library/build-module/post-comments-form/edit.js function PostCommentsFormEdit({ attributes, context, setAttributes }) { const { textAlign } = attributes; const { postId, postType } = context; const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(PostCommentsFormEdit); const instanceIdDesc = (0,external_wp_i18n_namespaceObject.sprintf)("comments-form-edit-%d-desc", instanceId); const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className: dist_clsx({ [`has-text-align-${textAlign}`]: textAlign }), "aria-describedby": instanceIdDesc }); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.AlignmentControl, { value: textAlign, onChange: (nextAlign) => { setAttributes({ textAlign: nextAlign }); } } ) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(form_default, { postId, postType }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.VisuallyHidden, { id: instanceIdDesc, children: (0,external_wp_i18n_namespaceObject.__)("Comments form disabled in editor.") }) ] }) ] }); } ;// ./node_modules/@wordpress/block-library/build-module/post-comments-form/index.js const { name: post_comments_form_name } = post_comments_form_block_namespaceObject; const post_comments_form_settings = { icon: post_comments_form_default, edit: PostCommentsFormEdit }; const post_comments_form_init = () => initBlock({ name: post_comments_form_name, metadata: post_comments_form_block_namespaceObject, settings: post_comments_form_settings }); ;// ./node_modules/@wordpress/block-library/build-module/post-comments-link/block.json const post_comments_link_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-comments-link","title":"Comments Link","category":"theme","description":"Displays the link to the current post comments.","textdomain":"default","usesContext":["postType","postId"],"attributes":{"textAlign":{"type":"string"}},"example":{"viewportWidth":350},"supports":{"html":false,"color":{"link":true,"text":false,"__experimentalDefaultControls":{"background":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-post-comments-link"}'); ;// ./node_modules/@wordpress/block-library/build-module/post-comments-link/edit.js function PostCommentsLinkEdit({ context, attributes, setAttributes }) { const { textAlign } = attributes; const { postType, postId } = context; const [commentsCount, setCommentsCount] = (0,external_wp_element_namespaceObject.useState)(); const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className: dist_clsx({ [`has-text-align-${textAlign}`]: textAlign }) }); (0,external_wp_element_namespaceObject.useEffect)(() => { if (!postId) { return; } const currentPostId = postId; external_wp_apiFetch_default()({ path: (0,external_wp_url_namespaceObject.addQueryArgs)("/wp/v2/comments", { post: postId }), parse: false }).then((res) => { if (currentPostId === postId) { setCommentsCount(res.headers.get("X-WP-Total")); } }); }, [postId]); const post = (0,external_wp_data_namespaceObject.useSelect)( (select) => select(external_wp_coreData_namespaceObject.store).getEditedEntityRecord( "postType", postType, postId ), [postType, postId] ); if (!post) { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.__)("Post Comments Link block: post not found.") }) }); } const { link } = post; let commentsText; if (commentsCount !== void 0) { const commentsNumber = parseInt(commentsCount); if (commentsNumber === 0) { commentsText = (0,external_wp_i18n_namespaceObject.__)("No comments"); } else { commentsText = (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: Number of comments */ (0,external_wp_i18n_namespaceObject._n)("%s comment", "%s comments", commentsNumber), commentsNumber.toLocaleString() ); } } return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.AlignmentControl, { value: textAlign, onChange: (nextAlign) => { setAttributes({ textAlign: nextAlign }); } } ) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: link && commentsText !== void 0 ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "a", { href: link + "#comments", onClick: (event) => event.preventDefault(), children: commentsText } ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.__)("Post Comments Link block: post not found.") }) }) ] }); } var post_comments_link_edit_edit_default = PostCommentsLinkEdit; ;// ./node_modules/@wordpress/block-library/build-module/post-comments-link/transforms.js const post_comments_link_transforms_transforms = { to: [ { type: "block", blocks: ["core/post-comments-count"], transform: ({ textAlign }) => { return (0,external_wp_blocks_namespaceObject.createBlock)("core/post-comments-count", { textAlign }); } } ] }; var post_comments_link_transforms_transforms_default = post_comments_link_transforms_transforms; ;// ./node_modules/@wordpress/block-library/build-module/post-comments-link/index.js const { name: post_comments_link_name } = post_comments_link_block_namespaceObject; const post_comments_link_settings = { edit: post_comments_link_edit_edit_default, icon: post_comments_count_default, transforms: post_comments_link_transforms_transforms_default }; const post_comments_link_init = () => initBlock({ name: post_comments_link_name, metadata: post_comments_link_block_namespaceObject, settings: post_comments_link_settings }); ;// ./node_modules/@wordpress/icons/build-module/library/post-content.js var post_content_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4 6h12V4.5H4V6Zm16 4.5H4V9h16v1.5ZM4 15h16v-1.5H4V15Zm0 4.5h16V18H4v1.5Z" }) }); ;// ./node_modules/@wordpress/block-library/build-module/post-content/block.json const post_content_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-content","title":"Content","category":"theme","description":"Displays the contents of a post or page.","textdomain":"default","usesContext":["postId","postType","queryId"],"attributes":{"tagName":{"type":"string","default":"div"}},"example":{"viewportWidth":350},"supports":{"align":["wide","full"],"html":false,"layout":true,"background":{"backgroundImage":true,"backgroundSize":true,"__experimentalDefaultControls":{"backgroundImage":true}},"dimensions":{"minHeight":true},"spacing":{"blockGap":true,"padding":true,"margin":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"color":{"gradients":true,"heading":true,"link":true,"__experimentalDefaultControls":{"background":false,"text":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-post-content","editorStyle":"wp-block-post-content-editor"}'); ;// ./node_modules/@wordpress/block-library/build-module/post-content/edit.js const { HTMLElementControl: post_content_edit_HTMLElementControl } = unlock(external_wp_blockEditor_namespaceObject.privateApis); function ReadOnlyContent({ parentLayout, layoutClassNames, userCanEdit, postType, postId, tagName: TagName = "div" }) { const [, , content] = (0,external_wp_coreData_namespaceObject.useEntityProp)( "postType", postType, "content", postId ); const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className: layoutClassNames }); const blocks = (0,external_wp_element_namespaceObject.useMemo)(() => { return content?.raw ? (0,external_wp_blocks_namespaceObject.parse)(content.raw) : []; }, [content?.raw]); const blockPreviewProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBlockPreview)({ blocks, props: blockProps, layout: parentLayout }); if (userCanEdit) { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockPreviewProps }); } return content?.protected ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.__)("This content is password protected.") }) }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( TagName, { ...blockProps, dangerouslySetInnerHTML: { __html: content?.rendered } } ); } function EditableContent({ context = {}, tagName: TagName = "div" }) { const { postType, postId } = context; const [blocks, onInput, onChange] = (0,external_wp_coreData_namespaceObject.useEntityBlockEditor)( "postType", postType, { id: postId } ); const entityRecord = (0,external_wp_data_namespaceObject.useSelect)( (select) => { return select(external_wp_coreData_namespaceObject.store).getEntityRecord( "postType", postType, postId ); }, [postType, postId] ); const hasInnerBlocks = !!entityRecord?.content?.raw || blocks?.length; const initialInnerBlocks = [["core/paragraph"]]; const props = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)( (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className: "entry-content" }), { value: blocks, onInput, onChange, template: !hasInnerBlocks ? initialInnerBlocks : void 0 } ); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...props }); } function Content(props) { const { context: { queryId, postType, postId } = {}, layoutClassNames, tagName } = props; const userCanEdit = useCanEditEntity("postType", postType, postId); if (userCanEdit === void 0) { return null; } const isDescendentOfQueryLoop = Number.isFinite(queryId); const isEditable = userCanEdit && !isDescendentOfQueryLoop; return isEditable ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(EditableContent, { ...props }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( ReadOnlyContent, { parentLayout: props.parentLayout, layoutClassNames, userCanEdit, postType, postId, tagName } ); } function edit_Placeholder({ layoutClassNames }) { const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className: layoutClassNames }); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { children: (0,external_wp_i18n_namespaceObject.__)( "This is the Content block, it will display all the blocks in any single post or page." ) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { children: (0,external_wp_i18n_namespaceObject.__)( "That might be a simple arrangement like consecutive paragraphs in a blog post, or a more elaborate composition that includes image galleries, videos, tables, columns, and any other block types." ) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { children: (0,external_wp_i18n_namespaceObject.__)( "If there are any Custom Post Types registered at your site, the Content block can display the contents of those entries as well." ) }) ] }); } function RecursionError() { const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)(); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.__)("Block cannot be rendered inside itself.") }) }); } function PostContentEditControls({ tagName, onSelectTagName, clientId }) { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( post_content_edit_HTMLElementControl, { tagName, onChange: onSelectTagName, clientId, options: [ { label: (0,external_wp_i18n_namespaceObject.__)("Default (
)"), value: "div" }, { label: "
", value: "main" }, { label: "
", value: "section" }, { label: "
", value: "article" } ] } ) }); } function PostContentEdit({ context, attributes: { tagName = "div" }, setAttributes, clientId, __unstableLayoutClassNames: layoutClassNames, __unstableParentLayout: parentLayout }) { const { postId: contextPostId, postType: contextPostType } = context; const hasAlreadyRendered = (0,external_wp_blockEditor_namespaceObject.useHasRecursion)(contextPostId); if (contextPostId && contextPostType && hasAlreadyRendered) { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(RecursionError, {}); } const handleSelectTagName = (value) => { setAttributes({ tagName: value }); }; return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( PostContentEditControls, { tagName, onSelectTagName: handleSelectTagName, clientId } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RecursionProvider, { uniqueId: contextPostId, children: contextPostId && contextPostType ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( Content, { context, parentLayout, layoutClassNames } ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(edit_Placeholder, { layoutClassNames }) }) ] }); } ;// ./node_modules/@wordpress/block-library/build-module/post-content/index.js const { name: post_content_name } = post_content_block_namespaceObject; const post_content_settings = { icon: post_content_default, edit: PostContentEdit }; const post_content_init = () => initBlock({ name: post_content_name, metadata: post_content_block_namespaceObject, settings: post_content_settings }); ;// ./node_modules/@wordpress/block-library/build-module/post-date/block.json const post_date_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-date","title":"Date","category":"theme","description":"Display a custom date.","textdomain":"default","attributes":{"datetime":{"type":"string","role":"content"},"textAlign":{"type":"string"},"format":{"type":"string"},"isLink":{"type":"boolean","default":false,"role":"content"}},"usesContext":["postId","postType","queryId"],"example":{"viewportWidth":350},"supports":{"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}}}'); ;// ./node_modules/@wordpress/block-library/build-module/post-date/edit.js function PostDateEdit({ attributes, context: { postType: postTypeSlug, queryId }, setAttributes, name }) { const { datetime, textAlign, format, isLink } = attributes; const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className: dist_clsx({ [`has-text-align-${textAlign}`]: textAlign }) }); const dropdownMenuProps = useToolsPanelDropdownMenuProps(); const [popoverAnchor, setPopoverAnchor] = (0,external_wp_element_namespaceObject.useState)(null); const popoverProps = (0,external_wp_element_namespaceObject.useMemo)( () => ({ anchor: popoverAnchor }), [popoverAnchor] ); const { __unstableMarkNextChangeAsNotPersistent } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store); (0,external_wp_element_namespaceObject.useEffect)(() => { if (datetime === void 0) { __unstableMarkNextChangeAsNotPersistent(); setAttributes({ datetime: /* @__PURE__ */ new Date() }); } }, [datetime]); const isDescendentOfQueryLoop = Number.isFinite(queryId); const dateSettings = (0,external_wp_date_namespaceObject.getSettings)(); const { postType, siteFormat = dateSettings.formats.date, siteTimeFormat = dateSettings.formats.time } = (0,external_wp_data_namespaceObject.useSelect)( (select) => { const { getPostType, getEntityRecord } = select(external_wp_coreData_namespaceObject.store); const siteSettings = getEntityRecord("root", "site"); return { siteFormat: siteSettings?.date_format, siteTimeFormat: siteSettings?.time_format, postType: postTypeSlug ? getPostType(postTypeSlug) : null }; }, [postTypeSlug] ); const activeBlockVariationName = (0,external_wp_data_namespaceObject.useSelect)( (select) => select(external_wp_blocks_namespaceObject.store).getActiveBlockVariation(name, attributes)?.name, [name, attributes] ); const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)(); let postDate = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("time", { dateTime: (0,external_wp_date_namespaceObject.dateI18n)("c", datetime), ref: setPopoverAnchor, children: format === "human-diff" ? (0,external_wp_date_namespaceObject.humanTimeDiff)(datetime) : (0,external_wp_date_namespaceObject.dateI18n)(format || siteFormat, datetime) }); if (isLink && datetime) { postDate = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "a", { href: "#post-date-pseudo-link", onClick: (event) => event.preventDefault(), children: postDate } ); } return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ (blockEditingMode === "default" || !isDescendentOfQueryLoop) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.AlignmentControl, { value: textAlign, onChange: (nextAlign) => { setAttributes({ textAlign: nextAlign }); } } ), activeBlockVariationName !== "post-date-modified" && (!isDescendentOfQueryLoop || !activeBlockVariationName) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.Dropdown, { popoverProps, renderContent: ({ onClose }) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.__experimentalPublishDateTimePicker, { title: activeBlockVariationName === "post-date" ? (0,external_wp_i18n_namespaceObject.__)("Publish Date") : (0,external_wp_i18n_namespaceObject.__)("Date"), currentDate: datetime, onChange: (newDatetime) => setAttributes({ datetime: newDatetime }), is12Hour: is12HourFormat( siteTimeFormat ), onClose, dateOrder: ( /* translators: Order of day, month, and year. Available formats are 'dmy', 'mdy', and 'ymd'. */ (0,external_wp_i18n_namespaceObject._x)("dmy", "date order") ) } ), renderToggle: ({ isOpen, onToggle }) => { const openOnArrowDown = (event) => { if (!isOpen && event.keyCode === external_wp_keycodes_namespaceObject.DOWN) { event.preventDefault(); onToggle(); } }; return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToolbarButton, { "aria-expanded": isOpen, icon: pencil_default, title: (0,external_wp_i18n_namespaceObject.__)("Change Date"), onClick: onToggle, onKeyDown: openOnArrowDown } ); } } ) }) ] }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)( external_wp_components_namespaceObject.__experimentalToolsPanel, { label: (0,external_wp_i18n_namespaceObject.__)("Settings"), resetAll: () => { setAttributes({ datetime: void 0, format: void 0, isLink: false }); }, dropdownMenuProps, children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { hasValue: () => !!format, label: (0,external_wp_i18n_namespaceObject.__)("Date Format"), onDeselect: () => setAttributes({ format: void 0 }), isShownByDefault: true, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.__experimentalDateFormatPicker, { format, defaultFormat: siteFormat, onChange: (nextFormat) => setAttributes({ format: nextFormat }) } ) } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { hasValue: () => isLink !== false, label: postType?.labels.singular_name ? (0,external_wp_i18n_namespaceObject.sprintf)( // translators: %s: Name of the post type e.g: "post". (0,external_wp_i18n_namespaceObject.__)("Link to %s"), postType.labels.singular_name.toLowerCase() ) : (0,external_wp_i18n_namespaceObject.__)("Link to post"), onDeselect: () => setAttributes({ isLink: false }), isShownByDefault: true, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: postType?.labels.singular_name ? (0,external_wp_i18n_namespaceObject.sprintf)( // translators: %s: Name of the post type e.g: "post". (0,external_wp_i18n_namespaceObject.__)("Link to %s"), postType.labels.singular_name.toLowerCase() ) : (0,external_wp_i18n_namespaceObject.__)("Link to post"), onChange: () => setAttributes({ isLink: !isLink }), checked: isLink } ) } ) ] } ) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: postDate }) ] }); } function is12HourFormat(format) { return /(?:^|[^\\])[aAgh]/.test(format); } ;// ./node_modules/@wordpress/block-library/build-module/post-date/deprecated.js const post_date_deprecated_v3 = { attributes: { datetime: { type: "string", role: "content" }, textAlign: { type: "string" }, format: { type: "string" }, isLink: { type: "boolean", default: false, role: "content" } }, supports: { html: false, color: { gradients: true, link: true, __experimentalDefaultControls: { background: true, text: true, link: true } }, spacing: { margin: true, padding: true }, typography: { fontSize: true, lineHeight: true, __experimentalFontFamily: true, __experimentalFontWeight: true, __experimentalFontStyle: true, __experimentalTextTransform: true, __experimentalTextDecoration: true, __experimentalLetterSpacing: true, __experimentalDefaultControls: { fontSize: true } }, interactivity: { clientNavigation: true }, __experimentalBorder: { radius: true, color: true, width: true, style: true, __experimentalDefaultControls: { radius: true, color: true, width: true, style: true } } }, save() { return null; }, migrate({ metadata: { bindings: { datetime: { source, args: { key, ...otherArgs } }, ...otherBindings }, ...otherMetadata }, ...otherAttributes }) { return { metadata: { bindings: { datetime: { source, args: { field: key, ...otherArgs } }, ...otherBindings }, ...otherMetadata }, ...otherAttributes }; }, isEligible(attributes) { return attributes?.metadata?.bindings?.datetime?.source === "core/post-data" && !!attributes?.metadata?.bindings?.datetime?.args?.key; } }; const post_date_deprecated_v2 = { attributes: { textAlign: { type: "string" }, format: { type: "string" }, isLink: { type: "boolean", default: false, role: "content" }, displayType: { type: "string", default: "date" } }, supports: { html: false, color: { gradients: true, link: true, __experimentalDefaultControls: { background: true, text: true, link: true } }, spacing: { margin: true, padding: true }, typography: { fontSize: true, lineHeight: true, __experimentalFontFamily: true, __experimentalFontWeight: true, __experimentalFontStyle: true, __experimentalTextTransform: true, __experimentalTextDecoration: true, __experimentalLetterSpacing: true, __experimentalDefaultControls: { fontSize: true } }, interactivity: { clientNavigation: true }, __experimentalBorder: { radius: true, color: true, width: true, style: true, __experimentalDefaultControls: { radius: true, color: true, width: true, style: true } } }, save() { return null; }, migrate({ className, displayType, metadata, ...otherAttributes }) { if (displayType === "date" || displayType === "modified") { if (displayType === "modified") { className = dist_clsx( className, "wp-block-post-date__modified-date" ); } return { ...otherAttributes, className, metadata: { ...metadata, bindings: { datetime: { source: "core/post-data", args: { field: displayType } } } } }; } }, isEligible(attributes) { return !attributes.datetime && !attributes?.metadata?.bindings?.datetime; } }; const post_date_deprecated_v1 = { attributes: { textAlign: { type: "string" }, format: { type: "string" }, isLink: { type: "boolean", default: false } }, supports: { html: false, color: { gradients: true, link: true }, typography: { fontSize: true, lineHeight: true, __experimentalFontFamily: true, __experimentalFontWeight: true, __experimentalFontStyle: true, __experimentalTextTransform: true, __experimentalLetterSpacing: true } }, save() { return null; }, migrate: migrate_font_family_default, isEligible({ style }) { return style?.typography?.fontFamily; } }; var post_date_deprecated_deprecated_default = [post_date_deprecated_v3, post_date_deprecated_v2, post_date_deprecated_v1]; ;// ./node_modules/@wordpress/block-library/build-module/post-date/variations.js const post_date_variations_variations = [ { name: "post-date", title: (0,external_wp_i18n_namespaceObject.__)("Post Date"), description: (0,external_wp_i18n_namespaceObject.__)("Display a post's publish date."), attributes: { metadata: { bindings: { datetime: { source: "core/post-data", args: { field: "date" } } } } }, scope: ["inserter", "transform"], isActive: (blockAttributes) => blockAttributes?.metadata?.bindings?.datetime?.source === "core/post-data" && blockAttributes?.metadata?.bindings?.datetime?.args?.field === "date" }, { name: "post-date-modified", title: (0,external_wp_i18n_namespaceObject.__)("Modified Date"), description: (0,external_wp_i18n_namespaceObject.__)("Display a post's last updated date."), attributes: { metadata: { bindings: { datetime: { source: "core/post-data", args: { field: "modified" } } } }, className: "wp-block-post-date__modified-date" }, scope: ["inserter", "transform"], isActive: (blockAttributes) => blockAttributes?.metadata?.bindings?.datetime?.source === "core/post-data" && blockAttributes?.metadata?.bindings?.datetime?.args?.field === "modified" } ]; var post_date_variations_variations_default = post_date_variations_variations; ;// ./node_modules/@wordpress/block-library/build-module/post-date/index.js const { name: post_date_name } = post_date_block_namespaceObject; const post_date_settings = { icon: post_date_default, edit: PostDateEdit, deprecated: post_date_deprecated_deprecated_default, variations: post_date_variations_variations_default }; const post_date_init = () => initBlock({ name: post_date_name, metadata: post_date_block_namespaceObject, settings: post_date_settings }); ;// ./node_modules/@wordpress/icons/build-module/library/post-excerpt.js var post_excerpt_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M8.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H4v-3h4.001ZM4 20h9v-1.5H4V20Zm16-4H4v-1.5h16V16ZM13.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H9v-3h4.001Z" }) }); ;// ./node_modules/@wordpress/block-library/build-module/post-excerpt/block.json const post_excerpt_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-excerpt","title":"Excerpt","category":"theme","description":"Display the excerpt.","textdomain":"default","attributes":{"textAlign":{"type":"string"},"moreText":{"type":"string","role":"content"},"showMoreOnNewLine":{"type":"boolean","default":true},"excerptLength":{"type":"number","default":55}},"usesContext":["postId","postType","queryId"],"example":{"viewportWidth":350},"supports":{"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"editorStyle":"wp-block-post-excerpt-editor","style":"wp-block-post-excerpt"}'); ;// ./node_modules/@wordpress/block-library/build-module/post-excerpt/edit.js const ELLIPSIS = "\u2026"; function PostExcerptEditor({ attributes: { textAlign, moreText, showMoreOnNewLine, excerptLength }, setAttributes, isSelected, context: { postId, postType, queryId } }) { const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)(); const showControls = blockEditingMode === "default"; const isDescendentOfQueryLoop = Number.isFinite(queryId); const userCanEdit = useCanEditEntity("postType", postType, postId); const [ rawExcerpt, setExcerpt, { rendered: renderedExcerpt, protected: isProtected } = {} ] = (0,external_wp_coreData_namespaceObject.useEntityProp)("postType", postType, "excerpt", postId); const dropdownMenuProps = useToolsPanelDropdownMenuProps(); const postTypeSupportsExcerpts = (0,external_wp_data_namespaceObject.useSelect)( (select) => { if (postType === "page") { return true; } return !!select(external_wp_coreData_namespaceObject.store).getPostType(postType)?.supports?.excerpt; }, [postType] ); const isEditable = userCanEdit && !isDescendentOfQueryLoop && postTypeSupportsExcerpts; const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className: dist_clsx({ [`has-text-align-${textAlign}`]: textAlign }) }); const wordCountType = (0,external_wp_i18n_namespaceObject._x)("words", "Word count type. Do not translate!"); const strippedRenderedExcerpt = (0,external_wp_element_namespaceObject.useMemo)(() => { if (!renderedExcerpt) { return ""; } const document = new window.DOMParser().parseFromString( renderedExcerpt, "text/html" ); return document.body.textContent || document.body.innerText || ""; }, [renderedExcerpt]); if (!postType || !postId) { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.AlignmentToolbar, { value: textAlign, onChange: (newAlign) => setAttributes({ textAlign: newAlign }) } ) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { children: (0,external_wp_i18n_namespaceObject.__)("This block will display the excerpt.") }) }) ] }); } if (isProtected && !userCanEdit) { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.__)( "The content is currently protected and does not have the available excerpt." ) }) }); } const readMoreLink = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.RichText, { identifier: "moreText", className: "wp-block-post-excerpt__more-link", tagName: "a", "aria-label": (0,external_wp_i18n_namespaceObject.__)("\u201CRead more\u201D link text"), placeholder: (0,external_wp_i18n_namespaceObject.__)('Add "read more" link text'), value: moreText, onChange: (newMoreText) => setAttributes({ moreText: newMoreText }), withoutInteractiveFormatting: true } ); const excerptClassName = dist_clsx("wp-block-post-excerpt__excerpt", { "is-inline": !showMoreOnNewLine }); const rawOrRenderedExcerpt = (rawExcerpt || strippedRenderedExcerpt).trim(); let trimmedExcerpt = ""; if (wordCountType === "words") { trimmedExcerpt = rawOrRenderedExcerpt.split(" ", excerptLength).join(" "); } else if (wordCountType === "characters_excluding_spaces") { const excerptWithSpaces = rawOrRenderedExcerpt.split("", excerptLength).join(""); const numberOfSpaces = excerptWithSpaces.length - excerptWithSpaces.replaceAll(" ", "").length; trimmedExcerpt = rawOrRenderedExcerpt.split("", excerptLength + numberOfSpaces).join(""); } else if (wordCountType === "characters_including_spaces") { trimmedExcerpt = rawOrRenderedExcerpt.split("", excerptLength).join(""); } const isTrimmed = trimmedExcerpt !== rawOrRenderedExcerpt; const excerptContent = isEditable ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.RichText, { className: excerptClassName, "aria-label": (0,external_wp_i18n_namespaceObject.__)("Excerpt text"), value: isSelected ? rawOrRenderedExcerpt : (!isTrimmed ? rawOrRenderedExcerpt : trimmedExcerpt + ELLIPSIS) || (0,external_wp_i18n_namespaceObject.__)("No excerpt found"), onChange: setExcerpt, tagName: "p" } ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { className: excerptClassName, children: !isTrimmed ? rawOrRenderedExcerpt || (0,external_wp_i18n_namespaceObject.__)("No excerpt found") : trimmedExcerpt + ELLIPSIS }); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ showControls && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.AlignmentToolbar, { value: textAlign, onChange: (newAlign) => setAttributes({ textAlign: newAlign }) } ) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)( external_wp_components_namespaceObject.__experimentalToolsPanel, { label: (0,external_wp_i18n_namespaceObject.__)("Settings"), resetAll: () => { setAttributes({ showMoreOnNewLine: true, excerptLength: 55 }); }, dropdownMenuProps, children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { hasValue: () => showMoreOnNewLine !== true, label: (0,external_wp_i18n_namespaceObject.__)("Show link on new line"), onDeselect: () => setAttributes({ showMoreOnNewLine: true }), isShownByDefault: true, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Show link on new line"), checked: showMoreOnNewLine, onChange: (newShowMoreOnNewLine) => setAttributes({ showMoreOnNewLine: newShowMoreOnNewLine }) } ) } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { hasValue: () => excerptLength !== 55, label: (0,external_wp_i18n_namespaceObject.__)("Max number of words"), onDeselect: () => setAttributes({ excerptLength: 55 }), isShownByDefault: true, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.RangeControl, { __next40pxDefaultSize: true, __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Max number of words"), value: excerptLength, onChange: (value) => { setAttributes({ excerptLength: value }); }, min: "10", max: "100" } ) } ) ] } ) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [ excerptContent, !showMoreOnNewLine && " ", showMoreOnNewLine ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { className: "wp-block-post-excerpt__more-text", children: readMoreLink }) : readMoreLink ] }) ] }); } ;// ./node_modules/@wordpress/block-library/build-module/post-excerpt/transforms.js const post_excerpt_transforms_transforms = { from: [ { type: "block", blocks: ["core/post-content"], transform: () => (0,external_wp_blocks_namespaceObject.createBlock)("core/post-excerpt") } ], to: [ { type: "block", blocks: ["core/post-content"], transform: () => (0,external_wp_blocks_namespaceObject.createBlock)("core/post-content") } ] }; var post_excerpt_transforms_transforms_default = post_excerpt_transforms_transforms; ;// ./node_modules/@wordpress/block-library/build-module/post-excerpt/index.js const { name: post_excerpt_name } = post_excerpt_block_namespaceObject; const post_excerpt_settings = { icon: post_excerpt_default, transforms: post_excerpt_transforms_transforms_default, edit: PostExcerptEditor }; const post_excerpt_init = () => initBlock({ name: post_excerpt_name, metadata: post_excerpt_block_namespaceObject, settings: post_excerpt_settings }); ;// ./node_modules/@wordpress/icons/build-module/library/post-featured-image.js var post_featured_image_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M19 3H5c-.6 0-1 .4-1 1v7c0 .5.4 1 1 1h14c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1zM5.5 10.5v-.4l1.8-1.3 1.3.8c.3.2.7.2.9-.1L11 8.1l2.4 2.4H5.5zm13 0h-2.9l-4-4c-.3-.3-.8-.3-1.1 0L8.9 8l-1.2-.8c-.3-.2-.6-.2-.9 0l-1.3 1V4.5h13v6zM4 20h9v-1.5H4V20zm0-4h16v-1.5H4V16z" }) }); ;// ./node_modules/@wordpress/block-library/build-module/post-featured-image/block.json const post_featured_image_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-featured-image","title":"Featured Image","category":"theme","description":"Display a post\'s featured image.","textdomain":"default","attributes":{"isLink":{"type":"boolean","default":false,"role":"content"},"aspectRatio":{"type":"string"},"width":{"type":"string"},"height":{"type":"string"},"scale":{"type":"string","default":"cover"},"sizeSlug":{"type":"string"},"rel":{"type":"string","attribute":"rel","default":"","role":"content"},"linkTarget":{"type":"string","default":"_self","role":"content"},"overlayColor":{"type":"string"},"customOverlayColor":{"type":"string"},"dimRatio":{"type":"number","default":0},"gradient":{"type":"string"},"customGradient":{"type":"string"},"useFirstImageFromPost":{"type":"boolean","default":false}},"usesContext":["postId","postType","queryId"],"example":{"viewportWidth":350},"supports":{"align":["left","right","center","wide","full"],"color":{"text":false,"background":false},"__experimentalBorder":{"color":true,"radius":true,"width":true,"__experimentalSkipSerialization":true,"__experimentalDefaultControls":{"color":true,"radius":true,"width":true}},"filter":{"duotone":true},"shadow":{"__experimentalSkipSerialization":true},"html":false,"spacing":{"margin":true,"padding":true},"interactivity":{"clientNavigation":true}},"selectors":{"border":".wp-block-post-featured-image img, .wp-block-post-featured-image .block-editor-media-placeholder, .wp-block-post-featured-image .wp-block-post-featured-image__overlay","shadow":".wp-block-post-featured-image img, .wp-block-post-featured-image .components-placeholder","filter":{"duotone":".wp-block-post-featured-image img, .wp-block-post-featured-image .wp-block-post-featured-image__placeholder, .wp-block-post-featured-image .components-placeholder__illustration, .wp-block-post-featured-image .components-placeholder::before"}},"editorStyle":"wp-block-post-featured-image-editor","style":"wp-block-post-featured-image"}'); ;// ./node_modules/@wordpress/block-library/build-module/post-featured-image/dimension-controls.js const SCALE_OPTIONS = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { value: "cover", label: (0,external_wp_i18n_namespaceObject._x)("Cover", "Scale option for Image dimension control") } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { value: "contain", label: (0,external_wp_i18n_namespaceObject._x)( "Contain", "Scale option for Image dimension control" ) } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { value: "fill", label: (0,external_wp_i18n_namespaceObject._x)("Fill", "Scale option for Image dimension control") } ) ] }); const DEFAULT_SCALE = "cover"; const scaleHelp = { cover: (0,external_wp_i18n_namespaceObject.__)( "Image is scaled and cropped to fill the entire space without being distorted." ), contain: (0,external_wp_i18n_namespaceObject.__)( "Image is scaled to fill the space without clipping nor distorting." ), fill: (0,external_wp_i18n_namespaceObject.__)( "Image will be stretched and distorted to completely fill the space." ) }; const DimensionControls = ({ clientId, attributes: { aspectRatio, width, height, scale }, setAttributes }) => { const [availableUnits, defaultRatios, themeRatios, showDefaultRatios] = (0,external_wp_blockEditor_namespaceObject.useSettings)( "spacing.units", "dimensions.aspectRatios.default", "dimensions.aspectRatios.theme", "dimensions.defaultAspectRatios" ); const units = (0,external_wp_components_namespaceObject.__experimentalUseCustomUnits)({ availableUnits: availableUnits || ["px", "%", "vw", "em", "rem"] }); const onDimensionChange = (dimension, nextValue) => { const parsedValue = parseFloat(nextValue); if (isNaN(parsedValue) && nextValue) { return; } setAttributes({ [dimension]: parsedValue < 0 ? "0" : nextValue }); }; const scaleLabel = (0,external_wp_i18n_namespaceObject._x)("Scale", "Image scaling options"); const showScaleControl = height || aspectRatio && aspectRatio !== "auto"; const themeOptions = themeRatios?.map(({ name, ratio }) => ({ label: name, value: ratio })); const defaultOptions = defaultRatios?.map(({ name, ratio }) => ({ label: name, value: ratio })); const aspectRatioOptions = [ { label: (0,external_wp_i18n_namespaceObject._x)( "Original", "Aspect ratio option for dimensions control" ), value: "auto" }, ...showDefaultRatios ? defaultOptions : [], ...themeOptions ? themeOptions : [] ]; return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { hasValue: () => !!aspectRatio, label: (0,external_wp_i18n_namespaceObject.__)("Aspect ratio"), onDeselect: () => setAttributes({ aspectRatio: void 0 }), resetAllFilter: () => ({ aspectRatio: void 0 }), isShownByDefault: true, panelId: clientId, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.SelectControl, { __next40pxDefaultSize: true, __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Aspect ratio"), value: aspectRatio, options: aspectRatioOptions, onChange: (nextAspectRatio) => setAttributes({ aspectRatio: nextAspectRatio }) } ) } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { className: "single-column", hasValue: () => !!height, label: (0,external_wp_i18n_namespaceObject.__)("Height"), onDeselect: () => setAttributes({ height: void 0 }), resetAllFilter: () => ({ height: void 0 }), isShownByDefault: true, panelId: clientId, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalUnitControl, { __next40pxDefaultSize: true, label: (0,external_wp_i18n_namespaceObject.__)("Height"), labelPosition: "top", value: height || "", min: 0, onChange: (nextHeight) => onDimensionChange("height", nextHeight), units } ) } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { className: "single-column", hasValue: () => !!width, label: (0,external_wp_i18n_namespaceObject.__)("Width"), onDeselect: () => setAttributes({ width: void 0 }), resetAllFilter: () => ({ width: void 0 }), isShownByDefault: true, panelId: clientId, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalUnitControl, { __next40pxDefaultSize: true, label: (0,external_wp_i18n_namespaceObject.__)("Width"), labelPosition: "top", value: width || "", min: 0, onChange: (nextWidth) => onDimensionChange("width", nextWidth), units } ) } ), showScaleControl && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { hasValue: () => !!scale && scale !== DEFAULT_SCALE, label: scaleLabel, onDeselect: () => setAttributes({ scale: DEFAULT_SCALE }), resetAllFilter: () => ({ scale: DEFAULT_SCALE }), isShownByDefault: true, panelId: clientId, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToggleGroupControl, { __next40pxDefaultSize: true, __nextHasNoMarginBottom: true, label: scaleLabel, value: scale, help: scaleHelp[scale], onChange: (value) => setAttributes({ scale: value }), isBlock: true, children: SCALE_OPTIONS } ) } ) ] }); }; var dimension_controls_default = DimensionControls; ;// ./node_modules/@wordpress/block-library/build-module/post-featured-image/overlay-controls.js const Overlay = ({ clientId, attributes, setAttributes, overlayColor, setOverlayColor }) => { const { dimRatio } = attributes; const { gradientValue, setGradient } = (0,external_wp_blockEditor_namespaceObject.__experimentalUseGradient)(); const colorGradientSettings = (0,external_wp_blockEditor_namespaceObject.__experimentalUseMultipleOriginColorsAndGradients)(); if (!colorGradientSettings.hasColorsOrGradients) { return null; } return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.__experimentalColorGradientSettingsDropdown, { __experimentalIsRenderedInSidebar: true, settings: [ { colorValue: overlayColor.color, gradientValue, label: (0,external_wp_i18n_namespaceObject.__)("Overlay"), onColorChange: setOverlayColor, onGradientChange: setGradient, isShownByDefault: true, resetAllFilter: () => ({ overlayColor: void 0, customOverlayColor: void 0, gradient: void 0, customGradient: void 0 }), clearable: true } ], panelId: clientId, ...colorGradientSettings } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { hasValue: () => dimRatio !== void 0, label: (0,external_wp_i18n_namespaceObject.__)("Overlay opacity"), onDeselect: () => setAttributes({ dimRatio: 0 }), resetAllFilter: () => ({ dimRatio: 0 }), isShownByDefault: true, panelId: clientId, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.RangeControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Overlay opacity"), value: dimRatio, onChange: (newDimRatio) => setAttributes({ dimRatio: newDimRatio }), min: 0, max: 100, step: 10, required: true, __next40pxDefaultSize: true } ) } ) ] }); }; var overlay_controls_default = (0,external_wp_compose_namespaceObject.compose)([ (0,external_wp_blockEditor_namespaceObject.withColors)({ overlayColor: "background-color" }) ])(Overlay); ;// ./node_modules/@wordpress/block-library/build-module/post-featured-image/utils.js function utils_dimRatioToClass(ratio) { return ratio === void 0 ? null : "has-background-dim-" + 10 * Math.round(ratio / 10); } ;// ./node_modules/@wordpress/block-library/build-module/post-featured-image/overlay.js const overlay_Overlay = ({ attributes, overlayColor }) => { const { dimRatio } = attributes; const { gradientClass, gradientValue } = (0,external_wp_blockEditor_namespaceObject.__experimentalUseGradient)(); const colorGradientSettings = (0,external_wp_blockEditor_namespaceObject.__experimentalUseMultipleOriginColorsAndGradients)(); const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBorderProps)(attributes); const overlayStyles = { backgroundColor: overlayColor.color, backgroundImage: gradientValue, ...borderProps.style }; if (!colorGradientSettings.hasColorsOrGradients || !dimRatio) { return null; } return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "span", { "aria-hidden": "true", className: dist_clsx( "wp-block-post-featured-image__overlay", utils_dimRatioToClass(dimRatio), { [overlayColor.class]: overlayColor.class, "has-background-dim": dimRatio !== void 0, "has-background-gradient": gradientValue, [gradientClass]: gradientClass }, borderProps.className ), style: overlayStyles } ); }; var overlay_default = (0,external_wp_compose_namespaceObject.compose)([ (0,external_wp_blockEditor_namespaceObject.withColors)({ overlayColor: "background-color" }) ])(overlay_Overlay); ;// ./node_modules/@wordpress/block-library/build-module/post-featured-image/edit.js const post_featured_image_edit_ALLOWED_MEDIA_TYPES = ["image"]; const { ResolutionTool: post_featured_image_edit_ResolutionTool } = unlock(external_wp_blockEditor_namespaceObject.privateApis); const edit_DEFAULT_MEDIA_SIZE_SLUG = "full"; function FeaturedImageResolutionTool({ image, value, onChange }) { const { imageSizes } = (0,external_wp_data_namespaceObject.useSelect)((select) => { const { getSettings } = select(external_wp_blockEditor_namespaceObject.store); return { imageSizes: getSettings().imageSizes }; }, []); if (!imageSizes?.length) { return null; } const imageSizeOptions = imageSizes.filter( ({ slug }) => image?.media_details?.sizes?.[slug]?.source_url ).map(({ name, slug }) => ({ value: slug, label: name })); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( post_featured_image_edit_ResolutionTool, { value, defaultValue: edit_DEFAULT_MEDIA_SIZE_SLUG, options: imageSizeOptions, onChange } ); } function PostFeaturedImageEdit({ clientId, attributes, setAttributes, context: { postId, postType: postTypeSlug, queryId } }) { const isDescendentOfQueryLoop = Number.isFinite(queryId); const { isLink, aspectRatio, height, width, scale, sizeSlug, rel, linkTarget, useFirstImageFromPost } = attributes; const [temporaryURL, setTemporaryURL] = (0,external_wp_element_namespaceObject.useState)(); const [storedFeaturedImage, setFeaturedImage] = (0,external_wp_coreData_namespaceObject.useEntityProp)( "postType", postTypeSlug, "featured_media", postId ); const [postContent] = (0,external_wp_coreData_namespaceObject.useEntityProp)( "postType", postTypeSlug, "content", postId ); const featuredImage = (0,external_wp_element_namespaceObject.useMemo)(() => { if (storedFeaturedImage) { return storedFeaturedImage; } if (!useFirstImageFromPost) { return; } const imageOpener = /).)*)?}\s+)?-->/.exec( postContent ); const imageId = imageOpener?.groups?.attrs && JSON.parse(imageOpener.groups.attrs)?.id; return imageId; }, [storedFeaturedImage, useFirstImageFromPost, postContent]); const { media, postType, postPermalink } = (0,external_wp_data_namespaceObject.useSelect)( (select) => { const { getEntityRecord, getPostType, getEditedEntityRecord } = select(external_wp_coreData_namespaceObject.store); return { media: featuredImage && getEntityRecord("postType", "attachment", featuredImage, { context: "view" }), postType: postTypeSlug && getPostType(postTypeSlug), postPermalink: getEditedEntityRecord( "postType", postTypeSlug, postId )?.link }; }, [featuredImage, postTypeSlug, postId] ); const mediaUrl = media?.media_details?.sizes?.[sizeSlug]?.source_url || media?.source_url; const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ style: { width, height, aspectRatio }, className: dist_clsx({ "is-transient": temporaryURL }) }); const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBorderProps)(attributes); const shadowProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetShadowClassesAndStyles)(attributes); const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)(); const placeholder = (content) => { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.Placeholder, { className: dist_clsx( "block-editor-media-placeholder", borderProps.className ), withIllustration: true, style: { height: !!aspectRatio && "100%", width: !!aspectRatio && "100%", ...borderProps.style, ...shadowProps.style }, children: content } ); }; const onSelectImage = (value) => { if (value?.id) { setFeaturedImage(value.id); } if (value?.url && (0,external_wp_blob_namespaceObject.isBlobURL)(value.url)) { setTemporaryURL(value.url); } }; const onResetImage = () => { setAttributes({ isLink: false, linkTarget: "_self", rel: "", sizeSlug: void 0 }); setFeaturedImage(0); }; (0,external_wp_element_namespaceObject.useEffect)(() => { if (mediaUrl && temporaryURL) { setTemporaryURL(); } }, [mediaUrl, temporaryURL]); const { createErrorNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store); const onUploadError = (message) => { createErrorNotice(message, { type: "snackbar" }); setTemporaryURL(); }; const dropdownMenuProps = useToolsPanelDropdownMenuProps(); const controls = blockEditingMode === "default" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "color", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( overlay_controls_default, { attributes, setAttributes, clientId } ) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "dimensions", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( dimension_controls_default, { clientId, attributes, setAttributes, media } ) }), (featuredImage || isDescendentOfQueryLoop || !postId) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)( external_wp_components_namespaceObject.__experimentalToolsPanel, { label: (0,external_wp_i18n_namespaceObject.__)("Settings"), resetAll: () => { setAttributes({ isLink: false, linkTarget: "_self", rel: "", sizeSlug: edit_DEFAULT_MEDIA_SIZE_SLUG }); }, dropdownMenuProps, children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: postType?.labels.singular_name ? (0,external_wp_i18n_namespaceObject.sprintf)( // translators: %s: Name of the post type e.g: "post". (0,external_wp_i18n_namespaceObject.__)("Link to %s"), postType.labels.singular_name ) : (0,external_wp_i18n_namespaceObject.__)("Link to post"), isShownByDefault: true, hasValue: () => !!isLink, onDeselect: () => setAttributes({ isLink: false }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: postType?.labels.singular_name ? (0,external_wp_i18n_namespaceObject.sprintf)( // translators: %s: Name of the post type e.g: "post". (0,external_wp_i18n_namespaceObject.__)("Link to %s"), postType.labels.singular_name ) : (0,external_wp_i18n_namespaceObject.__)("Link to post"), onChange: () => setAttributes({ isLink: !isLink }), checked: isLink } ) } ), isLink && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"), isShownByDefault: true, hasValue: () => "_self" !== linkTarget, onDeselect: () => setAttributes({ linkTarget: "_self" }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"), onChange: (value) => setAttributes({ linkTarget: value ? "_blank" : "_self" }), checked: linkTarget === "_blank" } ) } ), isLink && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)("Link relation"), isShownByDefault: true, hasValue: () => !!rel, onDeselect: () => setAttributes({ rel: "" }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.TextControl, { __next40pxDefaultSize: true, __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Link relation"), help: (0,external_wp_element_namespaceObject.createInterpolateElement)( (0,external_wp_i18n_namespaceObject.__)( "The Link Relation attribute defines the relationship between a linked resource and the current document." ), { a: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, { href: "https://developer.mozilla.org/docs/Web/HTML/Attributes/rel" }) } ), value: rel, onChange: (newRel) => setAttributes({ rel: newRel }) } ) } ), !!media && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( FeaturedImageResolutionTool, { image: media, value: sizeSlug, onChange: (nextSizeSlug) => setAttributes({ sizeSlug: nextSizeSlug }) } ) ] } ) }) ] }); let image; if (!featuredImage && (isDescendentOfQueryLoop || !postId)) { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ controls, /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [ !!isLink ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href: postPermalink, target: linkTarget, children: placeholder() }) : placeholder(), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( overlay_default, { attributes, setAttributes, clientId } ) ] }) ] }); } const label = (0,external_wp_i18n_namespaceObject.__)("Add a featured image"); const imageStyles = { ...borderProps.style, ...shadowProps.style, height: aspectRatio ? "100%" : height, width: !!aspectRatio && "100%", objectFit: !!(height || aspectRatio) && scale }; if (!featuredImage && !temporaryURL) { image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.MediaPlaceholder, { onSelect: onSelectImage, accept: "image/*", allowedTypes: post_featured_image_edit_ALLOWED_MEDIA_TYPES, onError: onUploadError, placeholder, mediaLibraryButton: ({ open }) => { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.Button, { __next40pxDefaultSize: true, icon: upload_default, variant: "primary", label, showTooltip: true, tooltipPosition: "top center", onClick: () => { open(); } } ); } } ); } else { image = !media && !temporaryURL ? placeholder() : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "img", { className: borderProps.className, src: temporaryURL || mediaUrl, alt: media && media?.alt_text ? (0,external_wp_i18n_namespaceObject.sprintf)( // translators: %s: The image's alt text. (0,external_wp_i18n_namespaceObject.__)("Featured image: %s"), media.alt_text ) : (0,external_wp_i18n_namespaceObject.__)("Featured image"), style: imageStyles } ), temporaryURL && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}) ] }); } return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ !temporaryURL && controls, !!media && !isDescendentOfQueryLoop && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.MediaReplaceFlow, { mediaId: featuredImage, mediaURL: mediaUrl, allowedTypes: post_featured_image_edit_ALLOWED_MEDIA_TYPES, accept: "image/*", onSelect: onSelectImage, onError: onUploadError, onReset: onResetImage } ) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { ...blockProps, children: [ !!isLink ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href: postPermalink, target: linkTarget, children: image }) : image, /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( overlay_default, { attributes, setAttributes, clientId } ) ] }) ] }); } ;// ./node_modules/@wordpress/block-library/build-module/post-featured-image/index.js const { name: post_featured_image_name } = post_featured_image_block_namespaceObject; const post_featured_image_settings = { icon: post_featured_image_default, edit: PostFeaturedImageEdit }; const post_featured_image_init = () => initBlock({ name: post_featured_image_name, metadata: post_featured_image_block_namespaceObject, settings: post_featured_image_settings }); ;// ./node_modules/@wordpress/block-library/build-module/post-navigation-link/block.json const post_navigation_link_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-navigation-link","title":"Post Navigation Link","category":"theme","description":"Displays the next or previous post link that is adjacent to the current post.","textdomain":"default","attributes":{"textAlign":{"type":"string"},"type":{"type":"string","default":"next"},"label":{"type":"string","role":"content"},"showTitle":{"type":"boolean","default":false},"linkLabel":{"type":"boolean","default":false},"arrow":{"type":"string","default":"none"},"taxonomy":{"type":"string","default":""}},"usesContext":["postType"],"supports":{"reusable":false,"html":false,"color":{"link":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalWritingMode":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"style":"wp-block-post-navigation-link"}'); ;// ./node_modules/@wordpress/block-library/build-module/post-navigation-link/edit.js function PostNavigationLinkEdit({ context: { postType }, attributes: { type, label, showTitle, textAlign, linkLabel, arrow, taxonomy }, setAttributes }) { const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)(); const showControls = blockEditingMode === "default"; const isNext = type === "next"; let placeholder = isNext ? (0,external_wp_i18n_namespaceObject.__)("Next") : (0,external_wp_i18n_namespaceObject.__)("Previous"); const arrowMap = { none: "", arrow: isNext ? "\u2192" : "\u2190", chevron: isNext ? "\xBB" : "\xAB" }; const displayArrow = arrowMap[arrow]; if (showTitle) { placeholder = isNext ? ( /* translators: Label before for next and previous post. There is a space after the colon. */ (0,external_wp_i18n_namespaceObject.__)("Next: ") ) : ( /* translators: Label before for next and previous post. There is a space after the colon. */ (0,external_wp_i18n_namespaceObject.__)("Previous: ") ); } const ariaLabel = isNext ? (0,external_wp_i18n_namespaceObject.__)("Next post") : (0,external_wp_i18n_namespaceObject.__)("Previous post"); const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className: dist_clsx({ [`has-text-align-${textAlign}`]: textAlign }) }); const taxonomies = (0,external_wp_data_namespaceObject.useSelect)( (select) => { const { getTaxonomies } = select(external_wp_coreData_namespaceObject.store); const filteredTaxonomies = getTaxonomies({ type: postType, per_page: -1 }); return filteredTaxonomies; }, [postType] ); const getTaxonomyOptions = () => { const selectOption = { label: (0,external_wp_i18n_namespaceObject.__)("Unfiltered"), value: "" }; const taxonomyOptions = (taxonomies ?? []).filter(({ visibility }) => !!visibility?.publicly_queryable).map((item) => { return { value: item.slug, label: item.name }; }); return [selectOption, ...taxonomyOptions]; }; const dropdownMenuProps = useToolsPanelDropdownMenuProps(); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)( external_wp_components_namespaceObject.__experimentalToolsPanel, { label: (0,external_wp_i18n_namespaceObject.__)("Settings"), resetAll: () => { setAttributes({ showTitle: false, linkLabel: false, arrow: "none" }); }, dropdownMenuProps, children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)("Display the title as a link"), isShownByDefault: true, hasValue: () => showTitle, onDeselect: () => setAttributes({ showTitle: false }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Display the title as a link"), help: (0,external_wp_i18n_namespaceObject.__)( "If you have entered a custom label, it will be prepended before the title." ), checked: !!showTitle, onChange: () => setAttributes({ showTitle: !showTitle }) } ) } ), showTitle && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)( "Include the label as part of the link" ), isShownByDefault: true, hasValue: () => !!linkLabel, onDeselect: () => setAttributes({ linkLabel: false }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)( "Include the label as part of the link" ), checked: !!linkLabel, onChange: () => setAttributes({ linkLabel: !linkLabel }) } ) } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)("Arrow"), isShownByDefault: true, hasValue: () => arrow !== "none", onDeselect: () => setAttributes({ arrow: "none" }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)( external_wp_components_namespaceObject.__experimentalToggleGroupControl, { __next40pxDefaultSize: true, __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Arrow"), value: arrow, onChange: (value) => { setAttributes({ arrow: value }); }, help: (0,external_wp_i18n_namespaceObject.__)( "A decorative arrow for the next and previous link." ), isBlock: true, children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { value: "none", label: (0,external_wp_i18n_namespaceObject._x)( "None", "Arrow option for Next/Previous link" ) } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { value: "arrow", label: (0,external_wp_i18n_namespaceObject._x)( "Arrow", "Arrow option for Next/Previous link" ) } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { value: "chevron", label: (0,external_wp_i18n_namespaceObject._x)( "Chevron", "Arrow option for Next/Previous link" ) } ) ] } ) } ) ] } ) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.SelectControl, { __next40pxDefaultSize: true, __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Filter by taxonomy"), value: taxonomy, options: getTaxonomyOptions(), onChange: (value) => setAttributes({ taxonomy: value }), help: (0,external_wp_i18n_namespaceObject.__)( "Only link to posts that have the same taxonomy terms as the current post. For example the same tags or categories." ) } ) }), showControls && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.AlignmentToolbar, { value: textAlign, onChange: (nextAlign) => { setAttributes({ textAlign: nextAlign }); } } ) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [ !isNext && displayArrow && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "span", { className: `wp-block-post-navigation-link__arrow-previous is-arrow-${arrow}`, children: displayArrow } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.RichText, { tagName: "a", identifier: "label", "aria-label": ariaLabel, placeholder, value: label, withoutInteractiveFormatting: true, onChange: (newLabel) => setAttributes({ label: newLabel }) } ), showTitle && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "a", { href: "#post-navigation-pseudo-link", onClick: (event) => event.preventDefault(), children: (0,external_wp_i18n_namespaceObject.__)("An example title") } ), isNext && displayArrow && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "span", { className: `wp-block-post-navigation-link__arrow-next is-arrow-${arrow}`, "aria-hidden": true, children: displayArrow } ) ] }) ] }); } ;// ./node_modules/@wordpress/icons/build-module/library/previous.js var previous_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z" }) }); ;// ./node_modules/@wordpress/icons/build-module/library/next.js var next_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z" }) }); ;// ./node_modules/@wordpress/block-library/build-module/post-navigation-link/variations.js const post_navigation_link_variations_variations = [ { name: "post-previous", title: (0,external_wp_i18n_namespaceObject.__)("Previous Post"), description: (0,external_wp_i18n_namespaceObject.__)( "Displays the post link that precedes the current post." ), icon: previous_default, attributes: { type: "previous" }, scope: ["inserter", "transform"], example: { attributes: { label: (0,external_wp_i18n_namespaceObject.__)("Previous post"), arrow: "arrow" } } }, { isDefault: true, name: "post-next", title: (0,external_wp_i18n_namespaceObject.__)("Next Post"), description: (0,external_wp_i18n_namespaceObject.__)( "Displays the post link that follows the current post." ), icon: next_default, attributes: { type: "next" }, scope: ["inserter", "transform"], example: { attributes: { label: (0,external_wp_i18n_namespaceObject.__)("Next post"), arrow: "arrow" } } } ]; post_navigation_link_variations_variations.forEach((variation) => { if (variation.isActive) { return; } variation.isActive = (blockAttributes, variationAttributes) => blockAttributes.type === variationAttributes.type; }); var post_navigation_link_variations_variations_default = post_navigation_link_variations_variations; ;// ./node_modules/@wordpress/block-library/build-module/post-navigation-link/index.js const { name: post_navigation_link_name } = post_navigation_link_block_namespaceObject; const post_navigation_link_settings = { edit: PostNavigationLinkEdit, variations: post_navigation_link_variations_variations_default, example: { attributes: { label: (0,external_wp_i18n_namespaceObject.__)("Next post"), arrow: "arrow" } } }; const post_navigation_link_init = () => initBlock({ name: post_navigation_link_name, metadata: post_navigation_link_block_namespaceObject, settings: post_navigation_link_settings }); ;// ./node_modules/@wordpress/block-library/build-module/post-template/block.json const post_template_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-template","title":"Post Template","category":"theme","ancestor":["core/query"],"description":"Contains the block elements used to render a post, like the title, date, featured image, content or excerpt, and more.","textdomain":"default","usesContext":["queryId","query","displayLayout","templateSlug","previewPostType","enhancedPagination","postType"],"supports":{"reusable":false,"html":false,"align":["wide","full"],"layout":true,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"spacing":{"margin":true,"padding":true,"blockGap":{"__experimentalDefault":"1.25em"},"__experimentalDefaultControls":{"blockGap":true,"padding":false,"margin":false}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true}},"style":"wp-block-post-template","editorStyle":"wp-block-post-template-editor"}'); ;// ./node_modules/@wordpress/block-library/build-module/post-template/edit.js const post_template_edit_TEMPLATE = [ ["core/post-title"], [ "core/post-date", { metadata: { bindings: { datetime: { source: "core/post-data", args: { field: "date" } } } } } ], ["core/post-excerpt"] ]; function PostTemplateInnerBlocks({ classList }) { const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)( { className: dist_clsx("wp-block-post", classList) }, { template: post_template_edit_TEMPLATE, __unstableDisableLayoutClassNames: true } ); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("li", { ...innerBlocksProps }); } function PostTemplateBlockPreview({ blocks, blockContextId, classList, isHidden, setActiveBlockContextId }) { const blockPreviewProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBlockPreview)({ blocks, props: { className: dist_clsx("wp-block-post", classList) } }); const handleOnClick = () => { setActiveBlockContextId(blockContextId); }; const style = { display: isHidden ? "none" : void 0 }; return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "li", { ...blockPreviewProps, tabIndex: 0, role: "button", onClick: handleOnClick, onKeyPress: handleOnClick, style } ); } const MemoizedPostTemplateBlockPreview = (0,external_wp_element_namespaceObject.memo)(PostTemplateBlockPreview); function PostTemplateEdit({ setAttributes, clientId, context: { query: { perPage, offset = 0, postType, order, orderBy, author, search, exclude, sticky, inherit, taxQuery, parents, pages, format, // We gather extra query args to pass to the REST API call. // This way extenders of Query Loop can add their own query args, // and have accurate previews in the editor. // Noting though that these args should either be supported by the // REST API or be handled by custom REST filters like `rest_{$this->post_type}_query`. ...restQueryArgs } = {}, templateSlug, previewPostType }, attributes: { layout }, __unstableLayoutClassNames }) { const { type: layoutType, columnCount = 3 } = layout || {}; const [activeBlockContextId, setActiveBlockContextId] = (0,external_wp_element_namespaceObject.useState)(); const { posts, blocks } = (0,external_wp_data_namespaceObject.useSelect)( (select) => { const { getEntityRecords, getTaxonomies } = select(external_wp_coreData_namespaceObject.store); const { getBlocks } = select(external_wp_blockEditor_namespaceObject.store); const templateCategory = inherit && templateSlug?.startsWith("category-") && getEntityRecords("taxonomy", "category", { context: "view", per_page: 1, _fields: ["id"], slug: templateSlug.replace("category-", "") }); const templateTag = inherit && templateSlug?.startsWith("tag-") && getEntityRecords("taxonomy", "post_tag", { context: "view", per_page: 1, _fields: ["id"], slug: templateSlug.replace("tag-", "") }); const query = { offset: offset || 0, order, orderby: orderBy }; if (taxQuery && !inherit) { const taxonomies = getTaxonomies({ type: postType, per_page: -1, context: "view" }); const builtTaxQuery = Object.entries(taxQuery).reduce( (accumulator, [taxonomySlug, terms]) => { const taxonomy = taxonomies?.find( ({ slug }) => slug === taxonomySlug ); if (taxonomy?.rest_base) { accumulator[taxonomy?.rest_base] = terms; } return accumulator; }, {} ); if (!!Object.keys(builtTaxQuery).length) { Object.assign(query, builtTaxQuery); } } if (perPage) { query.per_page = perPage; } if (author) { query.author = author; } if (search) { query.search = search; } if (exclude?.length) { query.exclude = exclude; } if (parents?.length) { query.parent = parents; } if (format?.length) { query.format = format; } if (["exclude", "only"].includes(sticky)) { query.sticky = sticky === "only"; } if (["", "ignore"].includes(sticky)) { delete query.sticky; query.ignore_sticky = sticky === "ignore"; } let currentPostType = postType; if (inherit) { if (templateSlug?.startsWith("archive-")) { query.postType = templateSlug.replace("archive-", ""); currentPostType = query.postType; } else if (templateCategory) { query.categories = templateCategory[0]?.id; } else if (templateTag) { query.tags = templateTag[0]?.id; } else if (templateSlug?.startsWith("taxonomy-post_format")) { query.format = templateSlug.replace( "taxonomy-post_format-post-format-", "" ); } } const usedPostType = previewPostType || currentPostType; return { posts: getEntityRecords("postType", usedPostType, { ...query, ...restQueryArgs }), blocks: getBlocks(clientId) }; }, [ perPage, offset, order, orderBy, clientId, author, search, postType, exclude, sticky, inherit, templateSlug, taxQuery, parents, format, restQueryArgs, previewPostType ] ); const blockContexts = (0,external_wp_element_namespaceObject.useMemo)( () => posts?.map((post) => ({ postType: post.type, postId: post.id, classList: post.class_list ?? "" })), [posts] ); const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className: dist_clsx(__unstableLayoutClassNames, { [`columns-${columnCount}`]: layoutType === "grid" && columnCount // Ensure column count is flagged via classname for backwards compatibility. }) }); if (!posts) { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}) }); } if (!posts.length) { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("p", { ...blockProps, children: [ " ", (0,external_wp_i18n_namespaceObject.__)("No results found.") ] }); } const setDisplayLayout = (newDisplayLayout) => setAttributes({ layout: { ...layout, ...newDisplayLayout } }); const displayLayoutControls = [ { icon: list_default, title: (0,external_wp_i18n_namespaceObject._x)("List view", "Post template block display setting"), onClick: () => setDisplayLayout({ type: "default" }), isActive: layoutType === "default" || layoutType === "constrained" }, { icon: grid_default, title: (0,external_wp_i18n_namespaceObject._x)("Grid view", "Post template block display setting"), onClick: () => setDisplayLayout({ type: "grid", columnCount }), isActive: layoutType === "grid" } ]; return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, { controls: displayLayoutControls }) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", { ...blockProps, children: blockContexts && blockContexts.map((blockContext) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)( external_wp_blockEditor_namespaceObject.BlockContextProvider, { value: blockContext, children: [ blockContext.postId === (activeBlockContextId || blockContexts[0]?.postId) ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( PostTemplateInnerBlocks, { classList: blockContext.classList } ) : null, /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( MemoizedPostTemplateBlockPreview, { blocks, blockContextId: blockContext.postId, classList: blockContext.classList, setActiveBlockContextId, isHidden: blockContext.postId === (activeBlockContextId || blockContexts[0]?.postId) } ) ] }, blockContext.postId )) }) ] }); } ;// ./node_modules/@wordpress/block-library/build-module/post-template/save.js function PostTemplateSave() { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}); } ;// ./node_modules/@wordpress/block-library/build-module/post-template/index.js const { name: post_template_name } = post_template_block_namespaceObject; const post_template_settings = { icon: layout_default, edit: PostTemplateEdit, save: PostTemplateSave }; const post_template_init = () => initBlock({ name: post_template_name, metadata: post_template_block_namespaceObject, settings: post_template_settings }); ;// ./node_modules/@wordpress/icons/build-module/library/post-categories.js var post_categories_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_primitives_namespaceObject.Path, { d: "M20 4H4v1.5h16V4zm-2 9h-3c-1.1 0-2 .9-2 2v3c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2zm.5 5c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5v-3c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3zM4 9.5h9V8H4v1.5zM9 13H6c-1.1 0-2 .9-2 2v3c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2zm.5 5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-3c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3z", fillRule: "evenodd", clipRule: "evenodd" } ) }); ;// ./node_modules/@wordpress/block-library/build-module/post-terms/block.json const post_terms_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-terms","title":"Post Terms","category":"theme","description":"Post terms.","textdomain":"default","attributes":{"term":{"type":"string"},"textAlign":{"type":"string"},"separator":{"type":"string","default":", "},"prefix":{"type":"string","default":"","role":"content"},"suffix":{"type":"string","default":"","role":"content"}},"usesContext":["postId","postType"],"example":{"viewportWidth":350},"supports":{"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-post-terms"}'); ;// ./node_modules/@wordpress/block-library/build-module/post-terms/use-post-terms.js const use_post_terms_EMPTY_ARRAY = []; function usePostTerms({ postId, term }) { const { slug } = term; return (0,external_wp_data_namespaceObject.useSelect)( (select) => { const visible = term?.visibility?.publicly_queryable; if (!visible) { return { postTerms: use_post_terms_EMPTY_ARRAY, isLoading: false, hasPostTerms: false }; } const { getEntityRecords, isResolving } = select(external_wp_coreData_namespaceObject.store); const taxonomyArgs = [ "taxonomy", slug, { post: postId, per_page: -1, context: "view" } ]; const terms = getEntityRecords(...taxonomyArgs); return { postTerms: terms, isLoading: isResolving("getEntityRecords", taxonomyArgs), hasPostTerms: !!terms?.length }; }, [postId, term?.visibility?.publicly_queryable, slug] ); } ;// ./node_modules/@wordpress/block-library/build-module/post-terms/edit.js const ALLOWED_FORMATS = [ "core/bold", "core/image", "core/italic", "core/link", "core/strikethrough", "core/text-color" ]; function PostTermsEdit({ attributes, clientId, context, isSelected, setAttributes, insertBlocksAfter }) { const { term, textAlign, separator, prefix, suffix } = attributes; const { postId, postType } = context; const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)(); const showControls = blockEditingMode === "default"; const selectedTerm = (0,external_wp_data_namespaceObject.useSelect)( (select) => { if (!term) { return {}; } const { getTaxonomy } = select(external_wp_coreData_namespaceObject.store); const taxonomy = getTaxonomy(term); return taxonomy?.visibility?.publicly_queryable ? taxonomy : {}; }, [term] ); const { postTerms, hasPostTerms, isLoading } = usePostTerms({ postId, term: selectedTerm }); const hasPost = postId && postType; const blockInformation = (0,external_wp_blockEditor_namespaceObject.useBlockDisplayInformation)(clientId); const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className: dist_clsx({ [`has-text-align-${textAlign}`]: textAlign, [`taxonomy-${term}`]: term }) }); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ showControls && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.AlignmentToolbar, { value: textAlign, onChange: (nextAlign) => { setAttributes({ textAlign: nextAlign }); } } ) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.TextControl, { __next40pxDefaultSize: true, __nextHasNoMarginBottom: true, autoComplete: "off", label: (0,external_wp_i18n_namespaceObject.__)("Separator"), value: separator || "", onChange: (nextValue) => { setAttributes({ separator: nextValue }); }, help: (0,external_wp_i18n_namespaceObject.__)("Enter character(s) used to separate terms.") } ) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [ isLoading && hasPost && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}), !isLoading && (isSelected || prefix) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.RichText, { identifier: "prefix", allowedFormats: ALLOWED_FORMATS, className: "wp-block-post-terms__prefix", "aria-label": (0,external_wp_i18n_namespaceObject.__)("Prefix"), placeholder: (0,external_wp_i18n_namespaceObject.__)("Prefix") + " ", value: prefix, onChange: (value) => setAttributes({ prefix: value }), tagName: "span" } ), (!hasPost || !term) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { children: blockInformation.title }), hasPost && !isLoading && hasPostTerms && postTerms.map((postTerm) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "a", { href: postTerm.link, onClick: (event) => event.preventDefault(), rel: "tag", children: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(postTerm.name) }, postTerm.id )).reduce((prev, curr) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ prev, /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { className: "wp-block-post-terms__separator", children: separator || " " }), curr ] })), hasPost && !isLoading && !hasPostTerms && (selectedTerm?.labels?.no_terms || (0,external_wp_i18n_namespaceObject.__)("Term items not found.")), !isLoading && (isSelected || suffix) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.RichText, { identifier: "suffix", allowedFormats: ALLOWED_FORMATS, className: "wp-block-post-terms__suffix", "aria-label": (0,external_wp_i18n_namespaceObject.__)("Suffix"), placeholder: " " + (0,external_wp_i18n_namespaceObject.__)("Suffix"), value: suffix, onChange: (value) => setAttributes({ suffix: value }), tagName: "span", __unstableOnSplitAtEnd: () => insertBlocksAfter( (0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)()) ) } ) ] }) ] }); } ;// ./node_modules/@wordpress/icons/build-module/library/post-terms.js var post_terms_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M8.1 12.3c.1.1.3.3.5.3.2.1.4.1.6.1.2 0 .4 0 .6-.1.2-.1.4-.2.5-.3l3-3c.3-.3.5-.7.5-1.1 0-.4-.2-.8-.5-1.1L9.7 3.5c-.1-.2-.3-.3-.5-.3H5c-.4 0-.8.4-.8.8v4.2c0 .2.1.4.2.5l3.7 3.6zM5.8 4.8h3.1l3.4 3.4v.1l-3 3 .5.5-.7-.5-3.3-3.4V4.8zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z" }) }); ;// ./node_modules/@wordpress/block-library/build-module/post-terms/hooks.js const variationIconMap = { category: post_categories_default, post_tag: post_terms_default }; function enhanceVariations(settings, name) { if (name !== "core/post-terms") { return settings; } const variations = settings.variations.map((variation) => ({ ...variation, ...{ icon: variationIconMap[variation.name] ?? post_categories_default } })); return { ...settings, variations }; } ;// ./node_modules/@wordpress/block-library/build-module/post-terms/index.js const { name: post_terms_name } = post_terms_block_namespaceObject; const post_terms_settings = { icon: post_categories_default, edit: PostTermsEdit }; const post_terms_init = () => { (0,external_wp_hooks_namespaceObject.addFilter)( "blocks.registerBlockType", "core/template-part", enhanceVariations ); return initBlock({ name: post_terms_name, metadata: post_terms_block_namespaceObject, settings: post_terms_settings }); }; ;// ./node_modules/@wordpress/icons/build-module/library/time-to-read.js var time_to_read_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12 3c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16.5c-4.1 0-7.5-3.4-7.5-7.5S7.9 4.5 12 4.5s7.5 3.4 7.5 7.5-3.4 7.5-7.5 7.5zM12 7l-1 5c0 .3.2.6.4.8l4.2 2.8-2.7-4.1L12 7z" }) }); ;// ./node_modules/@wordpress/block-library/build-module/post-time-to-read/block.json const post_time_to_read_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-time-to-read","title":"Time to Read","category":"theme","description":"Show minutes required to finish reading the post. Can also show a word count.","textdomain":"default","usesContext":["postId","postType"],"attributes":{"textAlign":{"type":"string"},"displayAsRange":{"type":"boolean","default":true},"displayMode":{"type":"string","default":"time"},"averageReadingSpeed":{"type":"number","default":189}},"supports":{"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"html":false,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true}}}'); ;// external ["wp","wordcount"] const external_wp_wordcount_namespaceObject = window["wp"]["wordcount"]; ;// ./node_modules/@wordpress/block-library/build-module/post-time-to-read/edit.js function PostTimeToReadEdit({ attributes, setAttributes, context }) { const { textAlign, displayAsRange, displayMode, averageReadingSpeed } = attributes; const { postId, postType } = context; const dropdownMenuProps = useToolsPanelDropdownMenuProps(); const [contentStructure] = (0,external_wp_coreData_namespaceObject.useEntityProp)( "postType", postType, "content", postId ); const [blocks] = (0,external_wp_coreData_namespaceObject.useEntityBlockEditor)("postType", postType, { id: postId }); const displayString = (0,external_wp_element_namespaceObject.useMemo)(() => { let content; if (contentStructure instanceof Function) { content = contentStructure({ blocks }); } else if (blocks) { content = (0,external_wp_blocks_namespaceObject.__unstableSerializeAndClean)(blocks); } else { content = contentStructure; } const wordCountType = (0,external_wp_i18n_namespaceObject._x)( "words", "Word count type. Do not translate!" ); const totalWords = (0,external_wp_wordcount_namespaceObject.count)(content || "", wordCountType); if (displayMode === "time") { if (displayAsRange) { let maxMinutes = Math.max( 1, Math.round(totalWords / averageReadingSpeed * 1.2) ); const minMinutes = Math.max( 1, Math.round(totalWords / averageReadingSpeed * 0.8) ); if (minMinutes === maxMinutes) { maxMinutes = maxMinutes + 1; } const rangeLabel = (0,external_wp_i18n_namespaceObject._x)( "%1$s\u2013%2$s minutes", "Range of minutes to read" ); return (0,external_wp_i18n_namespaceObject.sprintf)(rangeLabel, minMinutes, maxMinutes); } const minutesToRead = Math.max( 1, Math.round(totalWords / averageReadingSpeed) ); return (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: the number of minutes to read the post. */ (0,external_wp_i18n_namespaceObject._n)("%s minute", "%s minutes", minutesToRead), minutesToRead ); } if (displayMode === "words") { return wordCountType === "words" ? (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: the number of words in the post. */ (0,external_wp_i18n_namespaceObject._n)("%s word", "%s words", totalWords), totalWords.toLocaleString() ) : (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: the number of characters in the post. */ (0,external_wp_i18n_namespaceObject._n)("%s character", "%s characters", totalWords), totalWords.toLocaleString() ); } }, [ contentStructure, blocks, displayAsRange, displayMode, averageReadingSpeed ]); const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className: dist_clsx({ [`has-text-align-${textAlign}`]: textAlign }) }); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.AlignmentControl, { value: textAlign, onChange: (nextAlign) => { setAttributes({ textAlign: nextAlign }); } } ) }), displayMode === "time" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanel, { label: (0,external_wp_i18n_namespaceObject.__)("Settings"), resetAll: () => { setAttributes({ displayAsRange: true }); }, dropdownMenuProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { isShownByDefault: true, label: (0,external_wp_i18n_namespaceObject._x)( "Display as range", "Turns reading time range display on or off" ), hasValue: () => !displayAsRange, onDeselect: () => { setAttributes({ displayAsRange: true }); }, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Display as range"), checked: !!displayAsRange, onChange: () => setAttributes({ displayAsRange: !displayAsRange }) } ) } ) } ) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: displayString }) ] }); } var post_time_to_read_edit_edit_default = PostTimeToReadEdit; ;// ./node_modules/@wordpress/icons/build-module/library/word-count.js var word_count_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M19 5c1.1 0 2 .9 2 2v10c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2V7c0-1.1.9-2 2-2zM5 6.5c-.3 0-.5.2-.5.5v10c0 .3.2.5.5.5h14c.3 0 .5-.2.5-.5V7c0-.3-.2-.5-.5-.5zM14.734 9q.714 0 1.15.253.437.247.639.84.2.591.2 1.61v1.15q0 .402.036.667.04.258.172.39.138.127.437.127h.104l-.162.828h-.08q-.5 0-.776-.097a.9.9 0 0 1-.414-.283 2 2 0 0 1-.259-.448q-.316.367-.748.598-.43.23-.977.23-.524 0-.914-.213a1.56 1.56 0 0 1-.61-.58 1.65 1.65 0 0 1-.213-.84q0-.477.207-.817.213-.345.564-.568.357-.23.794-.363.437-.139.902-.196.471-.062.902-.068 0-.805-.315-1.053-.316-.247-.915-.247-.316 0-.678.098-.356.097-.805.408l-.15-.84a2.8 2.8 0 0 1 .846-.419A3.4 3.4 0 0 1 14.734 9m-5.877 1.669H9.86l.59-1.531h.689l-.585 1.53h.898l-.249.727h-.922l-.337.866h1.019l-.354.773h-.962l-.681 1.804h-.701l.69-1.804h-.999l-.693 1.804h-.69l.685-1.804H6.3l.34-.773h.915l.333-.866h-.994l.244-.726H8.16l.594-1.531h.693zm6.832 1.264q-.823.029-1.335.16-.506.133-.74.397-.236.265-.236.685 0 .454.241.66.248.202.632.202.414 0 .8-.207.39-.207.637-.552zm-7.441.328h1l.34-.866h-1z" }) }); ;// ./node_modules/@wordpress/block-library/build-module/post-time-to-read/variations.js const post_time_to_read_variations_variations = [ { name: "time-to-read", title: (0,external_wp_i18n_namespaceObject.__)("Time to Read"), description: (0,external_wp_i18n_namespaceObject.__)("Show minutes required to finish reading the post."), attributes: { displayMode: "time" }, scope: ["inserter", "transform"], isActive: (blockAttributes) => blockAttributes?.displayMode === "time", icon: time_to_read_default, isDefault: true }, { name: "word-count", title: (0,external_wp_i18n_namespaceObject.__)("Word Count"), description: (0,external_wp_i18n_namespaceObject.__)("Show the number of words in the post."), attributes: { displayMode: "words" }, scope: ["inserter", "transform"], isActive: (blockAttributes) => blockAttributes?.displayMode === "words", icon: word_count_default } ]; var post_time_to_read_variations_variations_default = post_time_to_read_variations_variations; ;// ./node_modules/@wordpress/block-library/build-module/post-time-to-read/index.js const { name: post_time_to_read_name } = post_time_to_read_block_namespaceObject; const post_time_to_read_settings = { icon: time_to_read_default, edit: post_time_to_read_edit_edit_default, variations: post_time_to_read_variations_variations_default, example: {} }; const post_time_to_read_init = () => initBlock({ name: post_time_to_read_name, metadata: post_time_to_read_block_namespaceObject, settings: post_time_to_read_settings }); ;// ./node_modules/@wordpress/block-library/build-module/post-title/block.json const post_title_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-title","title":"Title","category":"theme","description":"Displays the title of a post, page, or any other content-type.","textdomain":"default","usesContext":["postId","postType","queryId"],"attributes":{"textAlign":{"type":"string"},"level":{"type":"number","default":2},"levelOptions":{"type":"array"},"isLink":{"type":"boolean","default":false,"role":"content"},"rel":{"type":"string","attribute":"rel","default":"","role":"content"},"linkTarget":{"type":"string","default":"_self","role":"content"}},"example":{"viewportWidth":350},"supports":{"align":["wide","full"],"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-post-title"}'); ;// ./node_modules/@wordpress/block-library/build-module/post-title/edit.js function PostTitleEdit({ attributes: { level, levelOptions, textAlign, isLink, rel, linkTarget }, setAttributes, context: { postType, postId, queryId }, insertBlocksAfter }) { const TagName = level === 0 ? "p" : `h${level}`; const isDescendentOfQueryLoop = Number.isFinite(queryId); const userCanEdit = (0,external_wp_data_namespaceObject.useSelect)( (select) => { if (isDescendentOfQueryLoop) { return false; } return select(external_wp_coreData_namespaceObject.store).canUser("update", { kind: "postType", name: postType, id: postId }); }, [isDescendentOfQueryLoop, postType, postId] ); const [rawTitle = "", setTitle, fullTitle] = (0,external_wp_coreData_namespaceObject.useEntityProp)( "postType", postType, "title", postId ); const [link] = (0,external_wp_coreData_namespaceObject.useEntityProp)("postType", postType, "link", postId); const onSplitAtEnd = () => { insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)())); }; const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className: dist_clsx({ [`has-text-align-${textAlign}`]: textAlign }) }); const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)(); const dropdownMenuProps = useToolsPanelDropdownMenuProps(); let titleElement = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: (0,external_wp_i18n_namespaceObject.__)("Title") }); if (postType && postId) { titleElement = userCanEdit ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.PlainText, { tagName: TagName, placeholder: (0,external_wp_i18n_namespaceObject.__)("No title"), value: rawTitle, onChange: setTitle, __experimentalVersion: 2, __unstableOnSplitAtEnd: onSplitAtEnd, ...blockProps } ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( TagName, { ...blockProps, dangerouslySetInnerHTML: { __html: fullTitle?.rendered } } ); } if (isLink && postType && postId) { titleElement = userCanEdit ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.PlainText, { tagName: "a", href: link, target: linkTarget, rel, placeholder: !rawTitle.length ? (0,external_wp_i18n_namespaceObject.__)("No title") : null, value: rawTitle, onChange: setTitle, __experimentalVersion: 2, __unstableOnSplitAtEnd: onSplitAtEnd } ) }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "a", { href: link, target: linkTarget, rel, onClick: (event) => event.preventDefault(), dangerouslySetInnerHTML: { __html: fullTitle?.rendered } } ) }); } return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ blockEditingMode === "default" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.HeadingLevelDropdown, { value: level, options: levelOptions, onChange: (newLevel) => setAttributes({ level: newLevel }) } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.AlignmentControl, { value: textAlign, onChange: (nextAlign) => { setAttributes({ textAlign: nextAlign }); } } ) ] }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)( external_wp_components_namespaceObject.__experimentalToolsPanel, { label: (0,external_wp_i18n_namespaceObject.__)("Settings"), resetAll: () => { setAttributes({ rel: "", linkTarget: "_self", isLink: false }); }, dropdownMenuProps, children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)("Make title a link"), isShownByDefault: true, hasValue: () => isLink, onDeselect: () => setAttributes({ isLink: false }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Make title a link"), onChange: () => setAttributes({ isLink: !isLink }), checked: isLink } ) } ), isLink && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"), isShownByDefault: true, hasValue: () => linkTarget === "_blank", onDeselect: () => setAttributes({ linkTarget: "_self" }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"), onChange: (value) => setAttributes({ linkTarget: value ? "_blank" : "_self" }), checked: linkTarget === "_blank" } ) } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)("Link relation"), isShownByDefault: true, hasValue: () => !!rel, onDeselect: () => setAttributes({ rel: "" }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.TextControl, { __next40pxDefaultSize: true, __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Link relation"), help: (0,external_wp_element_namespaceObject.createInterpolateElement)( (0,external_wp_i18n_namespaceObject.__)( "The Link Relation attribute defines the relationship between a linked resource and the current document." ), { a: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, { href: "https://developer.mozilla.org/docs/Web/HTML/Attributes/rel" }) } ), value: rel, onChange: (newRel) => setAttributes({ rel: newRel }) } ) } ) ] }) ] } ) }) ] }), titleElement ] }); } ;// ./node_modules/@wordpress/block-library/build-module/post-title/deprecated.js const post_title_deprecated_v1 = { attributes: { textAlign: { type: "string" }, level: { type: "number", default: 2 }, isLink: { type: "boolean", default: false }, rel: { type: "string", attribute: "rel", default: "" }, linkTarget: { type: "string", default: "_self" } }, supports: { align: ["wide", "full"], html: false, color: { gradients: true, link: true }, spacing: { margin: true }, typography: { fontSize: true, lineHeight: true, __experimentalFontFamily: true, __experimentalFontWeight: true, __experimentalFontStyle: true, __experimentalTextTransform: true } }, save() { return null; }, migrate: migrate_font_family_default, isEligible({ style }) { return style?.typography?.fontFamily; } }; var post_title_deprecated_deprecated_default = [post_title_deprecated_v1]; ;// ./node_modules/@wordpress/block-library/build-module/post-title/index.js const { name: post_title_name } = post_title_block_namespaceObject; const post_title_settings = { icon: title_default, edit: PostTitleEdit, deprecated: post_title_deprecated_deprecated_default }; const post_title_init = () => initBlock({ name: post_title_name, metadata: post_title_block_namespaceObject, settings: post_title_settings }); ;// ./node_modules/@wordpress/icons/build-module/library/preformatted.js var preformatted_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12zM7 16.5h6V15H7v1.5zm4-4h6V11h-6v1.5zM9 11H7v1.5h2V11zm6 5.5h2V15h-2v1.5z" }) }); ;// ./node_modules/@wordpress/block-library/build-module/preformatted/edit.js function PreformattedEdit({ attributes, mergeBlocks, setAttributes, onRemove, insertBlocksAfter, style }) { const { content } = attributes; const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ style }); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.RichText, { tagName: "pre", identifier: "content", preserveWhiteSpace: true, value: content, onChange: (nextContent) => { setAttributes({ content: nextContent }); }, onRemove, "aria-label": (0,external_wp_i18n_namespaceObject.__)("Preformatted text"), placeholder: (0,external_wp_i18n_namespaceObject.__)("Write preformatted text\u2026"), onMerge: mergeBlocks, ...blockProps, __unstablePastePlainText: true, __unstableOnSplitAtDoubleLineEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)())) } ); } ;// ./node_modules/@wordpress/block-library/build-module/preformatted/block.json const preformatted_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/preformatted","title":"Preformatted","category":"text","description":"Add text that respects your spacing and tabs, and also allows styling.","textdomain":"default","attributes":{"content":{"type":"rich-text","source":"rich-text","selector":"pre","__unstablePreserveWhiteSpace":true,"role":"content"}},"supports":{"anchor":true,"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"padding":true,"margin":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-preformatted"}'); ;// ./node_modules/@wordpress/block-library/build-module/preformatted/save.js function preformatted_save_save({ attributes }) { const { content } = attributes; return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("pre", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: content }) }); } ;// ./node_modules/@wordpress/block-library/build-module/preformatted/transforms.js const preformatted_transforms_transforms = { from: [ { type: "block", blocks: ["core/code", "core/paragraph", "core/verse"], transform: ({ content, anchor }) => (0,external_wp_blocks_namespaceObject.createBlock)("core/preformatted", { content, anchor }) }, { type: "raw", isMatch: (node) => node.nodeName === "PRE" && !(node.children.length === 1 && node.firstChild.nodeName === "CODE"), schema: ({ phrasingContentSchema }) => ({ pre: { children: phrasingContentSchema } }) } ], to: [ { type: "block", blocks: ["core/paragraph"], transform: (attributes) => (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", attributes) }, { type: "block", blocks: ["core/code"], transform: (attributes) => (0,external_wp_blocks_namespaceObject.createBlock)("core/code", attributes) }, { type: "block", blocks: ["core/verse"], transform: (attributes) => (0,external_wp_blocks_namespaceObject.createBlock)("core/verse", attributes) } ] }; var preformatted_transforms_transforms_default = preformatted_transforms_transforms; ;// ./node_modules/@wordpress/block-library/build-module/preformatted/index.js const { name: preformatted_name } = preformatted_block_namespaceObject; const preformatted_settings = { icon: preformatted_default, example: { attributes: { /* eslint-disable @wordpress/i18n-no-collapsible-whitespace */ // translators: Sample content for the Preformatted block. Can be replaced with a more locale-adequate work. content: (0,external_wp_i18n_namespaceObject.__)( "EXT. XANADU - FAINT DAWN - 1940 (MINIATURE)\nWindow, very small in the distance, illuminated.\nAll around this is an almost totally black screen. Now, as the camera moves slowly towards the window which is almost a postage stamp in the frame, other forms appear;" ) /* eslint-enable @wordpress/i18n-no-collapsible-whitespace */ } }, transforms: preformatted_transforms_transforms_default, edit: PreformattedEdit, save: preformatted_save_save, merge(attributes, attributesToMerge) { return { content: attributes.content + "\n\n" + attributesToMerge.content }; } }; const preformatted_init = () => initBlock({ name: preformatted_name, metadata: preformatted_block_namespaceObject, settings: preformatted_settings }); ;// ./node_modules/@wordpress/icons/build-module/library/pullquote.js var pullquote_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M18 8H6c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zm.5 6c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-4c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v4zM4 4v1.5h16V4H4zm0 16h16v-1.5H4V20z" }) }); ;// ./node_modules/@wordpress/block-library/build-module/pullquote/shared.js const SOLID_COLOR_CLASS = `is-style-solid-color`; ;// ./node_modules/@wordpress/block-library/build-module/pullquote/deprecated.js const pullquote_deprecated_blockAttributes = { value: { type: "string", source: "html", selector: "blockquote", multiline: "p" }, citation: { type: "string", source: "html", selector: "cite", default: "" }, mainColor: { type: "string" }, customMainColor: { type: "string" }, textColor: { type: "string" }, customTextColor: { type: "string" } }; function parseBorderColor(styleString) { if (!styleString) { return; } const matches = styleString.match(/border-color:([^;]+)[;]?/); if (matches && matches[1]) { return matches[1]; } } function multilineToInline(value) { value = value || `

`; const padded = `

${value}

`; const values = padded.split(`

`); values.shift(); values.pop(); return values.join("
"); } const pullquote_deprecated_v5 = { attributes: { value: { type: "string", source: "html", selector: "blockquote", multiline: "p", role: "content" }, citation: { type: "string", source: "html", selector: "cite", default: "", role: "content" }, textAlign: { type: "string" } }, save({ attributes }) { const { textAlign, citation, value } = attributes; const shouldShowCitation = !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: dist_clsx({ [`has-text-align-${textAlign}`]: textAlign }) }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("blockquote", { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value, multiline: true }), shouldShowCitation && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "cite", value: citation }) ] }) } ); }, migrate({ value, ...attributes }) { return { value: multilineToInline(value), ...attributes }; } }; const pullquote_deprecated_v4 = { attributes: { ...pullquote_deprecated_blockAttributes }, save({ attributes }) { const { mainColor, customMainColor, customTextColor, textColor, value, citation, className } = attributes; const isSolidColorStyle = className?.includes(SOLID_COLOR_CLASS); let figureClasses, figureStyles; if (isSolidColorStyle) { const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)( "background-color", mainColor ); figureClasses = dist_clsx({ "has-background": backgroundClass || customMainColor, [backgroundClass]: backgroundClass }); figureStyles = { backgroundColor: backgroundClass ? void 0 : customMainColor }; } else if (customMainColor) { figureStyles = { borderColor: customMainColor }; } const blockquoteTextColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)( "color", textColor ); const blockquoteClasses = dist_clsx({ "has-text-color": textColor || customTextColor, [blockquoteTextColorClass]: blockquoteTextColorClass }); const blockquoteStyles = blockquoteTextColorClass ? void 0 : { color: customTextColor }; return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: figureClasses, style: figureStyles }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)( "blockquote", { className: blockquoteClasses, style: blockquoteStyles, children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value, multiline: true }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "cite", value: citation }) ] } ) } ); }, migrate({ value, className, mainColor, customMainColor, customTextColor, ...attributes }) { const isSolidColorStyle = className?.includes(SOLID_COLOR_CLASS); let style; if (customMainColor) { if (!isSolidColorStyle) { style = { border: { color: customMainColor } }; } else { style = { color: { background: customMainColor } }; } } if (customTextColor && style) { style.color = { ...style.color, text: customTextColor }; } return { value: multilineToInline(value), className, backgroundColor: isSolidColorStyle ? mainColor : void 0, borderColor: isSolidColorStyle ? void 0 : mainColor, textAlign: isSolidColorStyle ? "left" : void 0, style, ...attributes }; } }; const pullquote_deprecated_v3 = { attributes: { ...pullquote_deprecated_blockAttributes, // figureStyle is an attribute that never existed. // We are using it as a way to access the styles previously applied to the figure. figureStyle: { source: "attribute", selector: "figure", attribute: "style" } }, save({ attributes }) { const { mainColor, customMainColor, textColor, customTextColor, value, citation, className, figureStyle } = attributes; const isSolidColorStyle = className?.includes(SOLID_COLOR_CLASS); let figureClasses, figureStyles; if (isSolidColorStyle) { const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)( "background-color", mainColor ); figureClasses = dist_clsx({ "has-background": backgroundClass || customMainColor, [backgroundClass]: backgroundClass }); figureStyles = { backgroundColor: backgroundClass ? void 0 : customMainColor }; } else if (customMainColor) { figureStyles = { borderColor: customMainColor }; } else if (mainColor) { const borderColor = parseBorderColor(figureStyle); figureStyles = { borderColor }; } const blockquoteTextColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)( "color", textColor ); const blockquoteClasses = (textColor || customTextColor) && dist_clsx("has-text-color", { [blockquoteTextColorClass]: blockquoteTextColorClass }); const blockquoteStyles = blockquoteTextColorClass ? void 0 : { color: customTextColor }; return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", { className: figureClasses, style: figureStyles, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)( "blockquote", { className: blockquoteClasses, style: blockquoteStyles, children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value, multiline: true }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "cite", value: citation }) ] } ) }); }, migrate({ value, className, figureStyle, mainColor, customMainColor, customTextColor, ...attributes }) { const isSolidColorStyle = className?.includes(SOLID_COLOR_CLASS); let style; if (customMainColor) { if (!isSolidColorStyle) { style = { border: { color: customMainColor } }; } else { style = { color: { background: customMainColor } }; } } if (customTextColor && style) { style.color = { ...style.color, text: customTextColor }; } if (!isSolidColorStyle && mainColor && figureStyle) { const borderColor = parseBorderColor(figureStyle); if (borderColor) { return { value: multilineToInline(value), ...attributes, className, // Block supports: Set style.border.color if a deprecated block has `mainColor`, inline border CSS and is not a solid color style. style: { border: { color: borderColor } } }; } } return { value: multilineToInline(value), className, backgroundColor: isSolidColorStyle ? mainColor : void 0, borderColor: isSolidColorStyle ? void 0 : mainColor, textAlign: isSolidColorStyle ? "left" : void 0, style, ...attributes }; } }; const pullquote_deprecated_v2 = { attributes: pullquote_deprecated_blockAttributes, save({ attributes }) { const { mainColor, customMainColor, textColor, customTextColor, value, citation, className } = attributes; const isSolidColorStyle = className?.includes(SOLID_COLOR_CLASS); let figureClass, figureStyles; if (isSolidColorStyle) { figureClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("background-color", mainColor); if (!figureClass) { figureStyles = { backgroundColor: customMainColor }; } } else if (customMainColor) { figureStyles = { borderColor: customMainColor }; } else if (mainColor) { const colors = (0,external_wp_data_namespaceObject.select)(external_wp_blockEditor_namespaceObject.store).getSettings().colors ?? []; const colorObject = (0,external_wp_blockEditor_namespaceObject.getColorObjectByAttributeValues)( colors, mainColor ); figureStyles = { borderColor: colorObject.color }; } const blockquoteTextColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)( "color", textColor ); const blockquoteClasses = textColor || customTextColor ? dist_clsx("has-text-color", { [blockquoteTextColorClass]: blockquoteTextColorClass }) : void 0; const blockquoteStyle = blockquoteTextColorClass ? void 0 : { color: customTextColor }; return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", { className: figureClass, style: figureStyles, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)( "blockquote", { className: blockquoteClasses, style: blockquoteStyle, children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value, multiline: true }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "cite", value: citation }) ] } ) }); }, migrate({ value, className, mainColor, customMainColor, customTextColor, ...attributes }) { const isSolidColorStyle = className?.includes(SOLID_COLOR_CLASS); let style = {}; if (customMainColor) { if (!isSolidColorStyle) { style = { border: { color: customMainColor } }; } else { style = { color: { background: customMainColor } }; } } if (customTextColor && style) { style.color = { ...style.color, text: customTextColor }; } return { value: multilineToInline(value), className, backgroundColor: isSolidColorStyle ? mainColor : void 0, borderColor: isSolidColorStyle ? void 0 : mainColor, textAlign: isSolidColorStyle ? "left" : void 0, style, ...attributes }; } }; const pullquote_deprecated_v1 = { attributes: { ...pullquote_deprecated_blockAttributes }, save({ attributes }) { const { value, citation } = attributes; return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("blockquote", { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value, multiline: true }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "cite", value: citation }) ] }); }, migrate({ value, ...attributes }) { return { value: multilineToInline(value), ...attributes }; } }; const deprecated_v0 = { attributes: { ...pullquote_deprecated_blockAttributes, citation: { type: "string", source: "html", selector: "footer" }, align: { type: "string", default: "none" } }, save({ attributes }) { const { value, citation, align } = attributes; return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("blockquote", { className: `align${align}`, children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value, multiline: true }), !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "footer", value: citation }) ] }); }, migrate({ value, ...attributes }) { return { value: multilineToInline(value), ...attributes }; } }; var pullquote_deprecated_deprecated_default = [pullquote_deprecated_v5, pullquote_deprecated_v4, pullquote_deprecated_v3, pullquote_deprecated_v2, pullquote_deprecated_v1, deprecated_v0]; ;// ./node_modules/@wordpress/block-library/build-module/pullquote/figure.js const Figure = "figure"; ;// ./node_modules/@wordpress/block-library/build-module/pullquote/blockquote.js const BlockQuote = "blockquote"; ;// ./node_modules/@wordpress/block-library/build-module/pullquote/edit.js const isWebPlatform = external_wp_element_namespaceObject.Platform.OS === "web"; function PullQuoteEdit({ attributes, setAttributes, isSelected, insertBlocksAfter }) { const { textAlign, citation, value } = attributes; const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className: dist_clsx({ [`has-text-align-${textAlign}`]: textAlign }) }); const shouldShowCitation = !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) || isSelected; return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.AlignmentControl, { value: textAlign, onChange: (nextAlign) => { setAttributes({ textAlign: nextAlign }); } } ) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Figure, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(BlockQuote, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.RichText, { identifier: "value", tagName: "p", value, onChange: (nextValue) => setAttributes({ value: nextValue }), "aria-label": (0,external_wp_i18n_namespaceObject.__)("Pullquote text"), placeholder: ( // translators: placeholder text used for the quote (0,external_wp_i18n_namespaceObject.__)("Add quote") ), textAlign: "center" } ), shouldShowCitation && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.RichText, { identifier: "citation", tagName: isWebPlatform ? "cite" : void 0, style: { display: "block" }, value: citation, "aria-label": (0,external_wp_i18n_namespaceObject.__)("Pullquote citation text"), placeholder: ( // translators: placeholder text used for the citation (0,external_wp_i18n_namespaceObject.__)("Add citation") ), onChange: (nextCitation) => setAttributes({ citation: nextCitation }), className: "wp-block-pullquote__citation", __unstableMobileNoFocusOnMount: true, textAlign: "center", __unstableOnSplitAtEnd: () => insertBlocksAfter( (0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)()) ) } ) ] }) }) ] }); } var pullquote_edit_edit_default = PullQuoteEdit; ;// ./node_modules/@wordpress/block-library/build-module/pullquote/block.json const pullquote_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/pullquote","title":"Pullquote","category":"text","description":"Give special visual emphasis to a quote from your text.","textdomain":"default","attributes":{"value":{"type":"rich-text","source":"rich-text","selector":"p","role":"content"},"citation":{"type":"rich-text","source":"rich-text","selector":"cite","role":"content"},"textAlign":{"type":"string"}},"supports":{"anchor":true,"align":["left","right","wide","full"],"background":{"backgroundImage":true,"backgroundSize":true,"__experimentalDefaultControls":{"backgroundImage":true}},"color":{"gradients":true,"background":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"dimensions":{"minHeight":true,"__experimentalDefaultControls":{"minHeight":false}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"__experimentalStyle":{"typography":{"fontSize":"1.5em","lineHeight":"1.6"}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-pullquote-editor","style":"wp-block-pullquote"}'); ;// ./node_modules/@wordpress/block-library/build-module/pullquote/save.js function pullquote_save_save({ attributes }) { const { textAlign, citation, value } = attributes; const shouldShowCitation = !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( "figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: dist_clsx({ [`has-text-align-${textAlign}`]: textAlign }) }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("blockquote", { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "p", value }), shouldShowCitation && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "cite", value: citation }) ] }) } ); } ;// ./node_modules/@wordpress/block-library/build-module/pullquote/transforms.js const pullquote_transforms_transforms = { from: [ { type: "block", isMultiBlock: true, blocks: ["core/paragraph"], transform: (attributes) => { return (0,external_wp_blocks_namespaceObject.createBlock)("core/pullquote", { value: (0,external_wp_richText_namespaceObject.toHTMLString)({ value: (0,external_wp_richText_namespaceObject.join)( attributes.map( ({ content }) => (0,external_wp_richText_namespaceObject.create)({ html: content }) ), "\n" ) }), anchor: attributes.anchor }); } }, { type: "block", blocks: ["core/heading"], transform: ({ content, anchor }) => { return (0,external_wp_blocks_namespaceObject.createBlock)("core/pullquote", { value: content, anchor }); } } ], to: [ { type: "block", blocks: ["core/paragraph"], transform: ({ value, citation }) => { const paragraphs = []; if (value) { paragraphs.push( (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", { content: value }) ); } if (citation) { paragraphs.push( (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", { content: citation }) ); } if (paragraphs.length === 0) { return (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", { content: "" }); } return paragraphs; } }, { type: "block", blocks: ["core/heading"], transform: ({ value, citation }) => { if (!value) { return (0,external_wp_blocks_namespaceObject.createBlock)("core/heading", { content: citation }); } const headingBlock = (0,external_wp_blocks_namespaceObject.createBlock)("core/heading", { content: value }); if (!citation) { return headingBlock; } return [ headingBlock, (0,external_wp_blocks_namespaceObject.createBlock)("core/heading", { content: citation }) ]; } } ] }; var pullquote_transforms_transforms_default = pullquote_transforms_transforms; ;// ./node_modules/@wordpress/block-library/build-module/pullquote/index.js const { name: pullquote_name } = pullquote_block_namespaceObject; const pullquote_settings = { icon: pullquote_default, example: { attributes: { value: ( // translators: Quote serving as example for the Pullquote block. Attributed to Matt Mullenweg. (0,external_wp_i18n_namespaceObject.__)( "One of the hardest things to do in technology is disrupt yourself." ) ), citation: (0,external_wp_i18n_namespaceObject.__)("Matt Mullenweg") } }, transforms: pullquote_transforms_transforms_default, edit: pullquote_edit_edit_default, save: pullquote_save_save, deprecated: pullquote_deprecated_deprecated_default }; const pullquote_init = () => initBlock({ name: pullquote_name, metadata: pullquote_block_namespaceObject, settings: pullquote_settings }); ;// ./node_modules/@wordpress/icons/build-module/library/loop.js var loop_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M18.1823 11.6392C18.1823 13.0804 17.0139 14.2487 15.5727 14.2487C14.3579 14.2487 13.335 13.4179 13.0453 12.2922L13.0377 12.2625L13.0278 12.2335L12.3985 10.377L12.3942 10.3785C11.8571 8.64997 10.246 7.39405 8.33961 7.39405C5.99509 7.39405 4.09448 9.29465 4.09448 11.6392C4.09448 13.9837 5.99509 15.8843 8.33961 15.8843C8.88499 15.8843 9.40822 15.781 9.88943 15.5923L9.29212 14.0697C8.99812 14.185 8.67729 14.2487 8.33961 14.2487C6.89838 14.2487 5.73003 13.0804 5.73003 11.6392C5.73003 10.1979 6.89838 9.02959 8.33961 9.02959C9.55444 9.02959 10.5773 9.86046 10.867 10.9862L10.8772 10.9836L11.4695 12.7311C11.9515 14.546 13.6048 15.8843 15.5727 15.8843C17.9172 15.8843 19.8178 13.9837 19.8178 11.6392C19.8178 9.29465 17.9172 7.39404 15.5727 7.39404C15.0287 7.39404 14.5066 7.4968 14.0264 7.6847L14.6223 9.20781C14.9158 9.093 15.2358 9.02959 15.5727 9.02959C17.0139 9.02959 18.1823 10.1979 18.1823 11.6392Z" }) }); ;// ./node_modules/@wordpress/block-library/build-module/query/block.json const query_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/query","title":"Query Loop","category":"theme","description":"An advanced block that allows displaying post types based on different query parameters and visual configurations.","keywords":["posts","list","blog","blogs","custom post types"],"textdomain":"default","attributes":{"queryId":{"type":"number"},"query":{"type":"object","default":{"perPage":null,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true,"taxQuery":null,"parents":[],"format":[]}},"tagName":{"type":"string","default":"div"},"namespace":{"type":"string"},"enhancedPagination":{"type":"boolean","default":false}},"usesContext":["templateSlug"],"providesContext":{"queryId":"queryId","query":"query","displayLayout":"displayLayout","enhancedPagination":"enhancedPagination"},"supports":{"align":["wide","full"],"html":false,"layout":true,"interactivity":true,"contentRole":true},"editorStyle":"wp-block-query-editor"}'); ;// ./node_modules/@wordpress/block-library/build-module/query/utils.js const getEntitiesInfo = (entities) => { const mapping = entities?.reduce( (accumulator, entity) => { const { mapById, mapByName, names } = accumulator; mapById[entity.id] = entity; mapByName[entity.name] = entity; names.push(entity.name); return accumulator; }, { mapById: {}, mapByName: {}, names: [] } ); return { entities, ...mapping }; }; const getValueFromObjectPath = (object, path) => { const normalizedPath = path.split("."); let value = object; normalizedPath.forEach((fieldName) => { value = value?.[fieldName]; }); return value; }; const mapToIHasNameAndId = (entities, path) => { return (entities || []).map((entity) => ({ ...entity, name: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(getValueFromObjectPath(entity, path)) })); }; const usePostTypes = () => { const postTypes = (0,external_wp_data_namespaceObject.useSelect)((select) => { const { getPostTypes } = select(external_wp_coreData_namespaceObject.store); const excludedPostTypes = ["attachment"]; const filteredPostTypes = getPostTypes({ per_page: -1 })?.filter( ({ viewable, slug }) => viewable && !excludedPostTypes.includes(slug) ); return filteredPostTypes; }, []); const postTypesTaxonomiesMap = (0,external_wp_element_namespaceObject.useMemo)(() => { if (!postTypes?.length) { return; } return postTypes.reduce((accumulator, type) => { accumulator[type.slug] = type.taxonomies; return accumulator; }, {}); }, [postTypes]); const postTypesSelectOptions = (0,external_wp_element_namespaceObject.useMemo)( () => (postTypes || []).map(({ labels, slug }) => ({ label: labels.singular_name, value: slug })), [postTypes] ); const postTypeFormatSupportMap = (0,external_wp_element_namespaceObject.useMemo)(() => { if (!postTypes?.length) { return {}; } return postTypes.reduce((accumulator, type) => { accumulator[type.slug] = type.supports?.["post-formats"] || false; return accumulator; }, {}); }, [postTypes]); return { postTypesTaxonomiesMap, postTypesSelectOptions, postTypeFormatSupportMap }; }; const useTaxonomies = (postType) => { const taxonomies = (0,external_wp_data_namespaceObject.useSelect)( (select) => { const { getTaxonomies, getPostType } = select(external_wp_coreData_namespaceObject.store); if (getPostType(postType)?.taxonomies?.length > 0) { return getTaxonomies({ type: postType, per_page: -1 }); } return []; }, [postType] ); return (0,external_wp_element_namespaceObject.useMemo)(() => { return taxonomies?.filter( ({ visibility }) => !!visibility?.publicly_queryable ); }, [taxonomies]); }; function useIsPostTypeHierarchical(postType) { return (0,external_wp_data_namespaceObject.useSelect)( (select) => { const type = select(external_wp_coreData_namespaceObject.store).getPostType(postType); return type?.viewable && type?.hierarchical; }, [postType] ); } function useOrderByOptions(postType) { const supportsCustomOrder = (0,external_wp_data_namespaceObject.useSelect)( (select) => { const type = select(external_wp_coreData_namespaceObject.store).getPostType(postType); return !!type?.supports?.["page-attributes"]; }, [postType] ); return (0,external_wp_element_namespaceObject.useMemo)(() => { const orderByOptions = [ { label: (0,external_wp_i18n_namespaceObject.__)("Newest to oldest"), value: "date/desc" }, { label: (0,external_wp_i18n_namespaceObject.__)("Oldest to newest"), value: "date/asc" }, { /* translators: Label for ordering posts by title in ascending order. */ label: (0,external_wp_i18n_namespaceObject.__)("A \u2192 Z"), value: "title/asc" }, { /* translators: Label for ordering posts by title in descending order. */ label: (0,external_wp_i18n_namespaceObject.__)("Z \u2192 A"), value: "title/desc" } ]; if (supportsCustomOrder) { orderByOptions.push( { /* translators: Label for ordering posts by ascending menu order. */ label: (0,external_wp_i18n_namespaceObject.__)("Ascending by order"), value: "menu_order/asc" }, { /* translators: Label for ordering posts by descending menu order. */ label: (0,external_wp_i18n_namespaceObject.__)("Descending by order"), value: "menu_order/desc" } ); } return orderByOptions; }, [supportsCustomOrder]); } function useAllowedControls(attributes) { return (0,external_wp_data_namespaceObject.useSelect)( (select) => select(external_wp_blocks_namespaceObject.store).getActiveBlockVariation( "core/query", attributes )?.allowedControls, [attributes] ); } function isControlAllowed(allowedControls, key) { if (!allowedControls) { return true; } return allowedControls.includes(key); } const getTransformedBlocksFromPattern = (blocks, queryBlockAttributes) => { const { query: { postType, inherit }, namespace } = queryBlockAttributes; const clonedBlocks = blocks.map((block) => (0,external_wp_blocks_namespaceObject.cloneBlock)(block)); const queryClientIds = []; const blocksQueue = [...clonedBlocks]; while (blocksQueue.length > 0) { const block = blocksQueue.shift(); if (block.name === "core/query") { block.attributes.query = { ...block.attributes.query, postType, inherit }; if (namespace) { block.attributes.namespace = namespace; } queryClientIds.push(block.clientId); } block.innerBlocks?.forEach((innerBlock) => { blocksQueue.push(innerBlock); }); } return { newBlocks: clonedBlocks, queryClientIds }; }; function useBlockNameForPatterns(clientId, attributes) { return (0,external_wp_data_namespaceObject.useSelect)( (select) => { const activeVariationName = select( external_wp_blocks_namespaceObject.store ).getActiveBlockVariation("core/query", attributes)?.name; if (!activeVariationName) { return "core/query"; } const { getBlockRootClientId, getPatternsByBlockTypes } = select(external_wp_blockEditor_namespaceObject.store); const rootClientId = getBlockRootClientId(clientId); const activePatterns = getPatternsByBlockTypes( `core/query/${activeVariationName}`, rootClientId ); return activePatterns.length > 0 ? `core/query/${activeVariationName}` : "core/query"; }, [clientId, attributes] ); } function useScopedBlockVariations(attributes) { const { activeVariationName, blockVariations } = (0,external_wp_data_namespaceObject.useSelect)( (select) => { const { getActiveBlockVariation, getBlockVariations } = select(external_wp_blocks_namespaceObject.store); return { activeVariationName: getActiveBlockVariation( "core/query", attributes )?.name, blockVariations: getBlockVariations("core/query", "block") }; }, [attributes] ); const variations = (0,external_wp_element_namespaceObject.useMemo)(() => { const isNotConnected = (variation) => !variation.attributes?.namespace; if (!activeVariationName) { return blockVariations.filter(isNotConnected); } const connectedVariations = blockVariations.filter( (variation) => variation.attributes?.namespace?.includes(activeVariationName) ); if (!!connectedVariations.length) { return connectedVariations; } return blockVariations.filter(isNotConnected); }, [activeVariationName, blockVariations]); return variations; } const usePatterns = (clientId, name) => { return (0,external_wp_data_namespaceObject.useSelect)( (select) => { const { getBlockRootClientId, getPatternsByBlockTypes } = select(external_wp_blockEditor_namespaceObject.store); const rootClientId = getBlockRootClientId(clientId); return getPatternsByBlockTypes(name, rootClientId); }, [name, clientId] ); }; const useUnsupportedBlocks = (clientId) => { return (0,external_wp_data_namespaceObject.useSelect)( (select) => { const { getClientIdsOfDescendants, getBlockName } = select(external_wp_blockEditor_namespaceObject.store); return getClientIdsOfDescendants(clientId).some( (descendantClientId) => { const blockName = getBlockName(descendantClientId); const blockSupportsInteractivity = Object.is( (0,external_wp_blocks_namespaceObject.getBlockSupport)(blockName, "interactivity"), true ); const blockSupportsInteractivityClientNavigation = (0,external_wp_blocks_namespaceObject.getBlockSupport)( blockName, "interactivity.clientNavigation" ); return !blockSupportsInteractivity && !blockSupportsInteractivityClientNavigation; } ); }, [clientId] ); }; function getQueryContextFromTemplate(templateSlug) { if (!templateSlug) { return { isSingular: true }; } let isSingular = false; let templateType = templateSlug === "wp" ? "custom" : templateSlug; const singularTemplates = ["404", "blank", "single", "page", "custom"]; const templateTypeFromSlug = templateSlug.includes("-") ? templateSlug.split("-", 1)[0] : templateSlug; const queryFromTemplateSlug = templateSlug.includes("-") ? templateSlug.split("-").slice(1).join("-") : ""; if (queryFromTemplateSlug) { templateType = templateTypeFromSlug; } isSingular = singularTemplates.includes(templateType); return { isSingular, templateType }; } ;// ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/enhanced-pagination-control.js function EnhancedPaginationControl({ enhancedPagination, setAttributes, clientId }) { const hasUnsupportedBlocks = useUnsupportedBlocks(clientId); let help = (0,external_wp_i18n_namespaceObject.__)( "Reload the full page\u2014instead of just the posts list\u2014when visitors navigate between pages." ); if (hasUnsupportedBlocks) { help = (0,external_wp_i18n_namespaceObject.__)( "Enhancement disabled because there are non-compatible blocks inside the Query block." ); } return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToggleControl, { __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Reload full page"), help, checked: !enhancedPagination, disabled: hasUnsupportedBlocks, onChange: (value) => { setAttributes({ enhancedPagination: !value }); } } ) }); } ;// ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/order-control.js const defaultOrderByOptions = [ { label: (0,external_wp_i18n_namespaceObject.__)("Newest to oldest"), value: "date/desc" }, { label: (0,external_wp_i18n_namespaceObject.__)("Oldest to newest"), value: "date/asc" }, { /* translators: Label for ordering posts by title in ascending order. */ label: (0,external_wp_i18n_namespaceObject.__)("A \u2192 Z"), value: "title/asc" }, { /* translators: Label for ordering posts by title in descending order. */ label: (0,external_wp_i18n_namespaceObject.__)("Z \u2192 A"), value: "title/desc" } ]; function OrderControl({ order, orderBy, orderByOptions = defaultOrderByOptions, onChange }) { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.SelectControl, { __nextHasNoMarginBottom: true, __next40pxDefaultSize: true, label: (0,external_wp_i18n_namespaceObject.__)("Order by"), value: `${orderBy}/${order}`, options: orderByOptions, onChange: (value) => { const [newOrderBy, newOrder] = value.split("/"); onChange({ order: newOrder, orderBy: newOrderBy }); } } ); } var order_control_default = OrderControl; ;// ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/author-control.js const author_control_AUTHORS_QUERY = { who: "authors", per_page: -1, _fields: "id,name", context: "view" }; function AuthorControl({ value, onChange }) { const authorsList = (0,external_wp_data_namespaceObject.useSelect)((select) => { const { getUsers } = select(external_wp_coreData_namespaceObject.store); return getUsers(author_control_AUTHORS_QUERY); }, []); if (!authorsList) { return null; } const authorsInfo = getEntitiesInfo(authorsList); const normalizedValue = !value ? [] : value.toString().split(","); const sanitizedValue = normalizedValue.reduce( (accumulator, authorId) => { const author = authorsInfo.mapById[authorId]; if (author) { accumulator.push({ id: authorId, value: author.name }); } return accumulator; }, [] ); const getIdByValue = (entitiesMappedByName, authorValue) => { const id = authorValue?.id || entitiesMappedByName[authorValue]?.id; if (id) { return id; } }; const onAuthorChange = (newValue) => { const ids = Array.from( newValue.reduce((accumulator, author) => { const id = getIdByValue(authorsInfo.mapByName, author); if (id) { accumulator.add(id); } return accumulator; }, /* @__PURE__ */ new Set()) ); onChange({ author: ids.join(",") }); }; return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.FormTokenField, { label: (0,external_wp_i18n_namespaceObject.__)("Authors"), value: sanitizedValue, suggestions: authorsInfo.names, onChange: onAuthorChange, __experimentalShowHowTo: false, __nextHasNoMarginBottom: true, __next40pxDefaultSize: true } ); } var author_control_default = AuthorControl; ;// ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/parent-control.js const parent_control_EMPTY_ARRAY = []; const BASE_QUERY = { order: "asc", _fields: "id,title", context: "view" }; function ParentControl({ parents, postType, onChange }) { const [search, setSearch] = (0,external_wp_element_namespaceObject.useState)(""); const [value, setValue] = (0,external_wp_element_namespaceObject.useState)(parent_control_EMPTY_ARRAY); const [suggestions, setSuggestions] = (0,external_wp_element_namespaceObject.useState)(parent_control_EMPTY_ARRAY); const debouncedSearch = (0,external_wp_compose_namespaceObject.useDebounce)(setSearch, 250); const { searchResults, searchHasResolved } = (0,external_wp_data_namespaceObject.useSelect)( (select) => { if (!search) { return { searchResults: parent_control_EMPTY_ARRAY, searchHasResolved: true }; } const { getEntityRecords, hasFinishedResolution } = select(external_wp_coreData_namespaceObject.store); const selectorArgs = [ "postType", postType, { ...BASE_QUERY, search, orderby: "relevance", exclude: parents, per_page: 20 } ]; return { searchResults: getEntityRecords(...selectorArgs), searchHasResolved: hasFinishedResolution( "getEntityRecords", selectorArgs ) }; }, [search, postType, parents] ); const currentParents = (0,external_wp_data_namespaceObject.useSelect)( (select) => { if (!parents?.length) { return parent_control_EMPTY_ARRAY; } const { getEntityRecords } = select(external_wp_coreData_namespaceObject.store); return getEntityRecords("postType", postType, { ...BASE_QUERY, include: parents, per_page: parents.length }); }, [parents, postType] ); (0,external_wp_element_namespaceObject.useEffect)(() => { if (!parents?.length) { setValue(parent_control_EMPTY_ARRAY); } if (!currentParents?.length) { return; } const currentParentsInfo = getEntitiesInfo( mapToIHasNameAndId(currentParents, "title.rendered") ); const sanitizedValue = parents.reduce((accumulator, id) => { const entity = currentParentsInfo.mapById[id]; if (entity) { accumulator.push({ id, value: entity.name }); } return accumulator; }, []); setValue(sanitizedValue); }, [parents, currentParents]); const entitiesInfo = (0,external_wp_element_namespaceObject.useMemo)(() => { if (!searchResults?.length) { return parent_control_EMPTY_ARRAY; } return getEntitiesInfo( mapToIHasNameAndId(searchResults, "title.rendered") ); }, [searchResults]); (0,external_wp_element_namespaceObject.useEffect)(() => { if (!searchHasResolved) { return; } setSuggestions(entitiesInfo.names); }, [entitiesInfo.names, searchHasResolved]); const getIdByValue = (entitiesMappedByName, entity) => { const id = entity?.id || entitiesMappedByName?.[entity]?.id; if (id) { return id; } }; const onParentChange = (newValue) => { const ids = Array.from( newValue.reduce((accumulator, entity) => { const id = getIdByValue(entitiesInfo.mapByName, entity); if (id) { accumulator.add(id); } return accumulator; }, /* @__PURE__ */ new Set()) ); setSuggestions(parent_control_EMPTY_ARRAY); onChange({ parents: ids }); }; return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.FormTokenField, { __next40pxDefaultSize: true, label: (0,external_wp_i18n_namespaceObject.__)("Parents"), value, onInputChange: debouncedSearch, suggestions, onChange: onParentChange, __experimentalShowHowTo: false, __nextHasNoMarginBottom: true } ); } var parent_control_default = ParentControl; ;// ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/taxonomy-controls.js const taxonomy_controls_EMPTY_ARRAY = []; const taxonomy_controls_BASE_QUERY = { order: "asc", _fields: "id,name", context: "view" }; const getTermIdByTermValue = (terms, termValue) => { const termId = termValue?.id || terms?.find((term) => term.name === termValue)?.id; if (termId) { return termId; } const termValueLower = termValue.toLocaleLowerCase(); return terms?.find( (term) => term.name.toLocaleLowerCase() === termValueLower )?.id; }; function TaxonomyControls({ onChange, query }) { const { postType, taxQuery } = query; const taxonomies = useTaxonomies(postType); if (!taxonomies || taxonomies.length === 0) { return null; } return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalVStack, { spacing: 4, children: taxonomies.map((taxonomy) => { const termIds = taxQuery?.[taxonomy.slug] || []; const handleChange = (newTermIds) => onChange({ taxQuery: { ...taxQuery, [taxonomy.slug]: newTermIds } }); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( TaxonomyItem, { taxonomy, termIds, onChange: handleChange }, taxonomy.slug ); }) }); } function TaxonomyItem({ taxonomy, termIds, onChange }) { const [search, setSearch] = (0,external_wp_element_namespaceObject.useState)(""); const [value, setValue] = (0,external_wp_element_namespaceObject.useState)(taxonomy_controls_EMPTY_ARRAY); const [suggestions, setSuggestions] = (0,external_wp_element_namespaceObject.useState)(taxonomy_controls_EMPTY_ARRAY); const debouncedSearch = (0,external_wp_compose_namespaceObject.useDebounce)(setSearch, 250); const { searchResults, searchHasResolved } = (0,external_wp_data_namespaceObject.useSelect)( (select) => { if (!search) { return { searchResults: taxonomy_controls_EMPTY_ARRAY, searchHasResolved: true }; } const { getEntityRecords, hasFinishedResolution } = select(external_wp_coreData_namespaceObject.store); const selectorArgs = [ "taxonomy", taxonomy.slug, { ...taxonomy_controls_BASE_QUERY, search, orderby: "name", exclude: termIds, per_page: 20 } ]; return { searchResults: getEntityRecords(...selectorArgs), searchHasResolved: hasFinishedResolution( "getEntityRecords", selectorArgs ) }; }, [search, taxonomy.slug, termIds] ); const existingTerms = (0,external_wp_data_namespaceObject.useSelect)( (select) => { if (!termIds?.length) { return taxonomy_controls_EMPTY_ARRAY; } const { getEntityRecords } = select(external_wp_coreData_namespaceObject.store); return getEntityRecords("taxonomy", taxonomy.slug, { ...taxonomy_controls_BASE_QUERY, include: termIds, per_page: termIds.length }); }, [taxonomy.slug, termIds] ); (0,external_wp_element_namespaceObject.useEffect)(() => { if (!termIds?.length) { setValue(taxonomy_controls_EMPTY_ARRAY); } if (!existingTerms?.length) { return; } const sanitizedValue = termIds.reduce((accumulator, id) => { const entity = existingTerms.find((term) => term.id === id); if (entity) { accumulator.push({ id, value: entity.name }); } return accumulator; }, []); setValue(sanitizedValue); }, [termIds, existingTerms]); (0,external_wp_element_namespaceObject.useEffect)(() => { if (!searchHasResolved) { return; } setSuggestions(searchResults.map((result) => result.name)); }, [searchResults, searchHasResolved]); const onTermsChange = (newTermValues) => { const newTermIds = /* @__PURE__ */ new Set(); for (const termValue of newTermValues) { const termId = getTermIdByTermValue(searchResults, termValue); if (termId) { newTermIds.add(termId); } } setSuggestions(taxonomy_controls_EMPTY_ARRAY); onChange(Array.from(newTermIds)); }; return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "block-library-query-inspector__taxonomy-control", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.FormTokenField, { label: taxonomy.name, value, onInputChange: debouncedSearch, suggestions, displayTransform: external_wp_htmlEntities_namespaceObject.decodeEntities, onChange: onTermsChange, __experimentalShowHowTo: false, __nextHasNoMarginBottom: true, __next40pxDefaultSize: true } ) }); } ;// ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/format-controls.js const POST_FORMATS = [ { value: "aside", label: (0,external_wp_i18n_namespaceObject.__)("Aside") }, { value: "audio", label: (0,external_wp_i18n_namespaceObject.__)("Audio") }, { value: "chat", label: (0,external_wp_i18n_namespaceObject.__)("Chat") }, { value: "gallery", label: (0,external_wp_i18n_namespaceObject.__)("Gallery") }, { value: "image", label: (0,external_wp_i18n_namespaceObject.__)("Image") }, { value: "link", label: (0,external_wp_i18n_namespaceObject.__)("Link") }, { value: "quote", label: (0,external_wp_i18n_namespaceObject.__)("Quote") }, { value: "standard", label: (0,external_wp_i18n_namespaceObject.__)("Standard") }, { value: "status", label: (0,external_wp_i18n_namespaceObject.__)("Status") }, { value: "video", label: (0,external_wp_i18n_namespaceObject.__)("Video") } ].sort((a, b) => { const normalizedA = a.label.toUpperCase(); const normalizedB = b.label.toUpperCase(); if (normalizedA < normalizedB) { return -1; } if (normalizedA > normalizedB) { return 1; } return 0; }); function formatNamesToValues(names, formats) { return names.map((name) => { return formats.find( (item) => item.label.toLocaleLowerCase() === name.toLocaleLowerCase() )?.value; }).filter(Boolean); } function FormatControls({ onChange, query: { format } }) { const normalizedFormats = Array.isArray(format) ? format : [format]; const { supportedFormats } = (0,external_wp_data_namespaceObject.useSelect)((select) => { const themeSupports = select(external_wp_coreData_namespaceObject.store).getThemeSupports(); return { supportedFormats: themeSupports.formats }; }, []); const formats = POST_FORMATS.filter( (item) => supportedFormats.includes(item.value) ); const values = normalizedFormats.map( (name) => formats.find((item) => item.value === name)?.label ).filter(Boolean); const suggestions = formats.filter((item) => !normalizedFormats.includes(item.value)).map((item) => item.label); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.FormTokenField, { label: (0,external_wp_i18n_namespaceObject.__)("Formats"), value: values, suggestions, onChange: (newValues) => { onChange({ format: formatNamesToValues(newValues, formats) }); }, __experimentalShowHowTo: false, __experimentalExpandOnFocus: true, __nextHasNoMarginBottom: true, __next40pxDefaultSize: true } ); } ;// ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/sticky-control.js const stickyOptions = [ { label: (0,external_wp_i18n_namespaceObject.__)("Include"), value: "" }, { label: (0,external_wp_i18n_namespaceObject.__)("Ignore"), value: "ignore" }, { label: (0,external_wp_i18n_namespaceObject.__)("Exclude"), value: "exclude" }, { label: (0,external_wp_i18n_namespaceObject.__)("Only"), value: "only" } ]; function StickyControl({ value, onChange }) { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.SelectControl, { __nextHasNoMarginBottom: true, __next40pxDefaultSize: true, label: (0,external_wp_i18n_namespaceObject.__)("Sticky posts"), options: stickyOptions, value, onChange, help: (0,external_wp_i18n_namespaceObject.__)( "Sticky posts always appear first, regardless of their publish date." ) } ); } ;// ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/per-page-control.js const MIN_POSTS_PER_PAGE = 1; const MAX_POSTS_PER_PAGE = 100; const PerPageControl = ({ perPage, offset = 0, onChange }) => { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.RangeControl, { __next40pxDefaultSize: true, __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Items per page"), min: MIN_POSTS_PER_PAGE, max: MAX_POSTS_PER_PAGE, onChange: (newPerPage) => { if (isNaN(newPerPage) || newPerPage < MIN_POSTS_PER_PAGE || newPerPage > MAX_POSTS_PER_PAGE) { return; } onChange({ perPage: newPerPage, offset }); }, value: parseInt(perPage, 10) } ); }; var per_page_control_default = PerPageControl; ;// ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/offset-controls.js const MIN_OFFSET = 0; const MAX_OFFSET = 100; const OffsetControl = ({ offset = 0, onChange }) => { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalNumberControl, { __next40pxDefaultSize: true, label: (0,external_wp_i18n_namespaceObject.__)("Offset"), value: offset, min: MIN_OFFSET, onChange: (newOffset) => { if (isNaN(newOffset) || newOffset < MIN_OFFSET || newOffset > MAX_OFFSET) { return; } onChange({ offset: newOffset }); } } ); }; var offset_controls_default = OffsetControl; ;// ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/pages-control.js const PagesControl = ({ pages, onChange }) => { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalNumberControl, { __next40pxDefaultSize: true, label: (0,external_wp_i18n_namespaceObject.__)("Max pages to show"), value: pages, min: 0, onChange: (newPages) => { if (isNaN(newPages) || newPages < 0) { return; } onChange({ pages: newPages }); }, help: (0,external_wp_i18n_namespaceObject.__)( "Limit the pages you want to show, even if the query has more results. To show all pages use 0 (zero)." ) } ); }; var pages_control_default = PagesControl; ;// ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/index.js function QueryInspectorControls(props) { const { attributes, setQuery, isSingular } = props; const { query } = attributes; const { order, orderBy, author: authorIds, pages, postType, perPage, offset, sticky, inherit, taxQuery, parents, format } = query; const allowedControls = useAllowedControls(attributes); const showSticky = postType === "post"; const { postTypesTaxonomiesMap, postTypesSelectOptions, postTypeFormatSupportMap } = usePostTypes(); const taxonomies = useTaxonomies(postType); const isPostTypeHierarchical = useIsPostTypeHierarchical(postType); const onPostTypeChange = (newValue) => { const updateQuery = { postType: newValue }; const supportedTaxonomies = postTypesTaxonomiesMap[newValue]; const updatedTaxQuery = Object.entries(taxQuery || {}).reduce( (accumulator, [taxonomySlug, terms]) => { if (supportedTaxonomies.includes(taxonomySlug)) { accumulator[taxonomySlug] = terms; } return accumulator; }, {} ); updateQuery.taxQuery = !!Object.keys(updatedTaxQuery).length ? updatedTaxQuery : void 0; if (newValue !== "post") { updateQuery.sticky = ""; } updateQuery.parents = []; const hasFormatSupport = postTypeFormatSupportMap[newValue]; if (!hasFormatSupport) { updateQuery.format = []; } setQuery(updateQuery); }; const [querySearch, setQuerySearch] = (0,external_wp_element_namespaceObject.useState)(query.search); const debouncedQuerySearch = (0,external_wp_element_namespaceObject.useMemo)(() => { return (0,external_wp_compose_namespaceObject.debounce)((newQuerySearch) => { setQuery({ search: newQuerySearch }); }, 250); }, [setQuery]); const orderByOptions = useOrderByOptions(postType); const showInheritControl = isControlAllowed(allowedControls, "inherit"); const showPostTypeControl = !inherit && isControlAllowed(allowedControls, "postType"); const postTypeControlLabel = (0,external_wp_i18n_namespaceObject.__)("Post type"); const postTypeControlHelp = (0,external_wp_i18n_namespaceObject.__)( "Select the type of content to display: posts, pages, or custom post types." ); const showOrderControl = !inherit && isControlAllowed(allowedControls, "order"); const showStickyControl = !inherit && showSticky && isControlAllowed(allowedControls, "sticky"); const showSettingsPanel = showInheritControl || showPostTypeControl || showOrderControl || showStickyControl; const showTaxControl = !!taxonomies?.length && isControlAllowed(allowedControls, "taxQuery"); const showAuthorControl = isControlAllowed(allowedControls, "author"); const showSearchControl = isControlAllowed(allowedControls, "search"); const showParentControl = isControlAllowed(allowedControls, "parents") && isPostTypeHierarchical; const postTypeHasFormatSupport = postTypeFormatSupportMap[postType]; const showFormatControl = (0,external_wp_data_namespaceObject.useSelect)( (select) => { if (!postTypeHasFormatSupport || !isControlAllowed(allowedControls, "format")) { return false; } const themeSupports = select(external_wp_coreData_namespaceObject.store).getThemeSupports(); return themeSupports.formats && themeSupports.formats.length > 0 && themeSupports.formats.some((type) => type !== "standard"); }, [allowedControls, postTypeHasFormatSupport] ); const showFiltersPanel = showTaxControl || showAuthorControl || showSearchControl || showParentControl || showFormatControl; const dropdownMenuProps = useToolsPanelDropdownMenuProps(); const showPostCountControl = isControlAllowed( allowedControls, "postCount" ); const showOffSetControl = isControlAllowed(allowedControls, "offset"); const showPagesControl = isControlAllowed(allowedControls, "pages"); const showDisplayPanel = showPostCountControl || showOffSetControl || showPagesControl; const hasInheritanceWarning = isSingular && inherit; return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ showSettingsPanel && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)( external_wp_components_namespaceObject.__experimentalToolsPanel, { label: (0,external_wp_i18n_namespaceObject.__)("Settings"), resetAll: () => { setQuery({ postType: "post", order: "desc", orderBy: "date", sticky: "", inherit: true }); }, dropdownMenuProps, children: [ showInheritControl && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { hasValue: () => !inherit, label: (0,external_wp_i18n_namespaceObject.__)("Query type"), onDeselect: () => setQuery({ inherit: true }), isShownByDefault: true, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, { spacing: 4, children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)( external_wp_components_namespaceObject.__experimentalToggleGroupControl, { __next40pxDefaultSize: true, __nextHasNoMarginBottom: true, label: (0,external_wp_i18n_namespaceObject.__)("Query type"), isBlock: true, onChange: (value) => { setQuery({ inherit: value === "default" }); }, help: inherit ? (0,external_wp_i18n_namespaceObject.__)( "Display a list of posts or custom post types based on the current template." ) : (0,external_wp_i18n_namespaceObject.__)( "Display a list of posts or custom post types based on specific criteria." ), value: !!inherit ? "default" : "custom", children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { value: "default", label: (0,external_wp_i18n_namespaceObject.__)("Default") } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { value: "custom", label: (0,external_wp_i18n_namespaceObject.__)("Custom") } ) ] } ), hasInheritanceWarning && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.Notice, { status: "warning", isDismissible: false, children: (0,external_wp_i18n_namespaceObject.__)( "Cannot inherit the current template query when placed inside the singular content (e.g., post, page, 404, blank)." ) } ) ] }) } ), showPostTypeControl && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { hasValue: () => postType !== "post", label: postTypeControlLabel, onDeselect: () => onPostTypeChange("post"), isShownByDefault: true, children: postTypesSelectOptions.length > 2 ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.SelectControl, { __nextHasNoMarginBottom: true, __next40pxDefaultSize: true, options: postTypesSelectOptions, value: postType, label: postTypeControlLabel, onChange: onPostTypeChange, help: postTypeControlHelp } ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToggleGroupControl, { __nextHasNoMarginBottom: true, __next40pxDefaultSize: true, isBlock: true, value: postType, label: postTypeControlLabel, onChange: onPostTypeChange, help: postTypeControlHelp, children: postTypesSelectOptions.map( (option) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { value: option.value, label: option.label }, option.value ) ) } ) } ), showOrderControl && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { hasValue: () => order !== "desc" || orderBy !== "date", label: (0,external_wp_i18n_namespaceObject.__)("Order by"), onDeselect: () => setQuery({ order: "desc", orderBy: "date" }), isShownByDefault: true, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( order_control_default, { ...{ order, orderBy, orderByOptions }, onChange: setQuery } ) } ), showStickyControl && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { hasValue: () => !!sticky, label: (0,external_wp_i18n_namespaceObject.__)("Sticky posts"), onDeselect: () => setQuery({ sticky: "" }), isShownByDefault: true, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( StickyControl, { value: sticky, onChange: (value) => setQuery({ sticky: value }) } ) } ) ] } ), !inherit && showDisplayPanel && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)( external_wp_components_namespaceObject.__experimentalToolsPanel, { className: "block-library-query-toolspanel__display", label: (0,external_wp_i18n_namespaceObject.__)("Display"), resetAll: () => { setQuery({ offset: 0, pages: 0 }); }, dropdownMenuProps, children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)("Items per page"), hasValue: () => perPage > 0, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( per_page_control_default, { perPage, offset, onChange: setQuery } ) } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)("Offset"), hasValue: () => offset > 0, onDeselect: () => setQuery({ offset: 0 }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( offset_controls_default, { offset, onChange: setQuery } ) } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)("Max pages to show"), hasValue: () => pages > 0, onDeselect: () => setQuery({ pages: 0 }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(pages_control_default, { pages, onChange: setQuery }) } ) ] } ), !inherit && showFiltersPanel && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)( external_wp_components_namespaceObject.__experimentalToolsPanel, { className: "block-library-query-toolspanel__filters", label: (0,external_wp_i18n_namespaceObject.__)("Filters"), resetAll: () => { setQuery({ author: "", parents: [], search: "", taxQuery: null, format: [] }); setQuerySearch(""); }, dropdownMenuProps, children: [ showTaxControl && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { label: (0,external_wp_i18n_namespaceObject.__)("Taxonomies"), hasValue: () => Object.values(taxQuery || {}).some( (terms) => !!terms.length ), onDeselect: () => setQuery({ taxQuery: null }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( TaxonomyControls, { onChange: setQuery, query } ) } ), showAuthorControl && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { hasValue: () => !!authorIds, label: (0,external_wp_i18n_namespaceObject.__)("Authors"), onDeselect: () => setQuery({ author: "" }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( author_control_default, { value: authorIds, onChange: setQuery } ) } ), showSearchControl && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { hasValue: () => !!querySearch, label: (0,external_wp_i18n_namespaceObject.__)("Keyword"), onDeselect: () => { setQuery({ search: "" }); setQuerySearch(""); }, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.TextControl, { __nextHasNoMarginBottom: true, __next40pxDefaultSize: true, label: (0,external_wp_i18n_namespaceObject.__)("Keyword"), value: querySearch, onChange: (newQuerySearch) => { debouncedQuerySearch(newQuerySearch); setQuerySearch(newQuerySearch); } } ) } ), showParentControl && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { hasValue: () => !!parents?.length, label: (0,external_wp_i18n_namespaceObject.__)("Parents"), onDeselect: () => setQuery({ parents: [] }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( parent_control_default, { parents, postType, onChange: setQuery } ) } ), showFormatControl && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.__experimentalToolsPanelItem, { hasValue: () => !!format?.length, label: (0,external_wp_i18n_namespaceObject.__)("Formats"), onDeselect: () => setQuery({ format: [] }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( FormatControls, { onChange: setQuery, query } ) } ) ] } ) ] }); } ;// ./node_modules/@wordpress/block-library/build-module/query/edit/enhanced-pagination-modal.js const modalDescriptionId = "wp-block-query-enhanced-pagination-modal__description"; function EnhancedPaginationModal({ clientId, attributes: { enhancedPagination }, setAttributes }) { const [isOpen, setOpen] = (0,external_wp_element_namespaceObject.useState)(false); const hasUnsupportedBlocks = useUnsupportedBlocks(clientId); (0,external_wp_element_namespaceObject.useEffect)(() => { if (enhancedPagination && hasUnsupportedBlocks) { setAttributes({ enhancedPagination: false }); setOpen(true); } }, [enhancedPagination, hasUnsupportedBlocks, setAttributes]); const closeModal = () => { setOpen(false); }; const notice = (0,external_wp_i18n_namespaceObject.__)( "Currently, avoiding full page reloads is not possible when non-interactive or non-client Navigation compatible blocks from plugins are present inside the Query block." ) + " " + (0,external_wp_i18n_namespaceObject.__)( 'If you still want to prevent full page reloads, remove that block, then disable "Reload full page" again in the Query Block settings.' ); return isOpen && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.Modal, { title: (0,external_wp_i18n_namespaceObject.__)("Query block: Reload full page enabled"), className: "wp-block-query__enhanced-pagination-modal", aria: { describedby: modalDescriptionId }, role: "alertdialog", focusOnMount: "firstElement", isDismissible: false, onRequestClose: closeModal, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, { alignment: "right", spacing: 5, children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { id: modalDescriptionId, children: notice }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.Button, { __next40pxDefaultSize: true, variant: "primary", onClick: closeModal, children: (0,external_wp_i18n_namespaceObject.__)("OK") } ) ] }) } ); } ;// ./node_modules/@wordpress/block-library/build-module/utils/search-patterns.js function normalizeSearchInput(input = "") { input = remove_accents_default()(input); input = input.trim().toLowerCase(); return input; } function getPatternSearchRank(pattern, searchValue) { const normalizedSearchValue = normalizeSearchInput(searchValue); const normalizedTitle = normalizeSearchInput(pattern.title); let rank = 0; if (normalizedSearchValue === normalizedTitle) { rank += 30; } else if (normalizedTitle.startsWith(normalizedSearchValue)) { rank += 20; } else { const searchTerms = normalizedSearchValue.split(" "); const hasMatchedTerms = searchTerms.every( (searchTerm) => normalizedTitle.includes(searchTerm) ); if (hasMatchedTerms) { rank += 10; } } return rank; } function searchPatterns(patterns = [], searchValue = "") { if (!searchValue) { return patterns; } const rankedPatterns = patterns.map((pattern) => { return [pattern, getPatternSearchRank(pattern, searchValue)]; }).filter(([, rank]) => rank > 0); rankedPatterns.sort(([, rank1], [, rank2]) => rank2 - rank1); return rankedPatterns.map(([pattern]) => pattern); } ;// ./node_modules/@wordpress/block-library/build-module/query/edit/pattern-selection.js function PatternSelectionModal({ clientId, attributes, setIsPatternSelectionModalOpen }) { return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.Modal, { overlayClassName: "block-library-query-pattern__selection-modal", title: (0,external_wp_i18n_namespaceObject.__)("Choose a pattern"), onRequestClose: () => setIsPatternSelectionModalOpen(false), isFullScreen: true, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(PatternSelection, { clientId, attributes }) } ); } function useBlockPatterns(clientId, attributes) { const blockNameForPatterns = useBlockNameForPatterns( clientId, attributes ); const allPatterns = usePatterns(clientId, blockNameForPatterns); const rootBlockPatterns = (0,external_wp_element_namespaceObject.useMemo)(() => { return allPatterns.filter((pattern) => { return pattern.blocks?.[0]?.name === blockNameForPatterns; }); }, [allPatterns, blockNameForPatterns]); return rootBlockPatterns; } function PatternSelection({ clientId, attributes, showTitlesAsTooltip = false, showSearch = true }) { const [searchValue, setSearchValue] = (0,external_wp_element_namespaceObject.useState)(""); const { replaceBlock, selectBlock } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store); const blockPatterns = useBlockPatterns(clientId, attributes); const blockPreviewContext = (0,external_wp_element_namespaceObject.useMemo)( () => ({ previewPostType: attributes.query.postType }), [attributes.query.postType] ); const filteredBlockPatterns = (0,external_wp_element_namespaceObject.useMemo)(() => { return searchPatterns(blockPatterns, searchValue); }, [blockPatterns, searchValue]); const onBlockPatternSelect = (pattern, blocks) => { const { newBlocks, queryClientIds } = getTransformedBlocksFromPattern( blocks, attributes ); replaceBlock(clientId, newBlocks); if (queryClientIds[0]) { selectBlock(queryClientIds[0]); } }; return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "block-library-query-pattern__selection-content", children: [ showSearch && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "block-library-query-pattern__selection-search", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.SearchControl, { __nextHasNoMarginBottom: true, onChange: setSearchValue, value: searchValue, label: (0,external_wp_i18n_namespaceObject.__)("Search"), placeholder: (0,external_wp_i18n_namespaceObject.__)("Search") } ) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockContextProvider, { value: blockPreviewContext, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_blockEditor_namespaceObject.__experimentalBlockPatternsList, { blockPatterns: filteredBlockPatterns, onClickPattern: onBlockPatternSelect, showTitlesAsTooltip } ) }) ] }); } ;// ./node_modules/@wordpress/block-library/build-module/query/edit/query-toolbar.js function QueryToolbar({ clientId, attributes, hasInnerBlocks }) { const hasPatterns = useBlockPatterns(clientId, attributes).length; if (!hasPatterns) { return null; } const buttonLabel = hasInnerBlocks ? (0,external_wp_i18n_namespaceObject.__)("Change design") : (0,external_wp_i18n_namespaceObject.__)("Choose pattern"); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, { className: "wp-block-template-part__block-control-group", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalDropdownContentWrapper, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.Dropdown, { contentClassName: "block-editor-block-settings-menu__popover", focusOnMount: "firstElement", expandOnMobile: true, renderToggle: ({ isOpen, onToggle }) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( external_wp_components_namespaceObject.ToolbarButton, { "aria-haspopup": "true", "aria-expanded": isOpen, onClick: onToggle, children: buttonLabel } ), renderContent: () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( PatternSelection, { clientId, attributes, showSearch: false, showTitlesAsTooltip: true } ) } ) }) }); } ;// ./node_modules/@wordpress/block-library/build-module/query/edit/query-content.js const { HTMLElementControl: query_content_HTMLElementControl } = unlock(external_wp_blockEditor_namespaceObject.privateApis); const DEFAULTS_POSTS_PER_PAGE = 3; const query_content_TEMPLATE = [["core/post-template"]]; function QueryContent({ attributes, setAttributes, clientId, context, name }) { const { queryId, query, enhancedPagination, tagName: TagName = "div", query: { inherit } = {} } = attributes; const { templateSlug } = context; const { isSingular } = getQueryContextFromTemplate(templateSlug); const { __unstableMarkNextChangeAsNotPersistent } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store); const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(QueryContent); const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)(); const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, { template: query_content_TEMPLATE }); const { postsPerPage } = (0,external_wp_data_namespaceObject.useSelect)((select) => { const { getSettings } = select(external_wp_blockEditor_namespaceObject.store); const { getEntityRecord, getEntityRecordEdits, canUser } = select(external_wp_coreData_namespaceObject.store); const settingPerPage = canUser("read", { kind: "root", name: "site" }) ? +getEntityRecord("root", "site")?.posts_per_page : +getSettings().postsPerPage; const editedSettingPerPage = +getEntityRecordEdits("root", "site")?.posts_per_page; return { postsPerPage: editedSettingPerPage || settingPerPage || DEFAULTS_POSTS_PER_PAGE }; }, []); const updateQuery = (0,external_wp_element_namespaceObject.useCallback)( (newQuery) => setAttributes((prevAttributes) => ({ query: { ...prevAttributes.query, ...newQuery } })), [setAttributes] ); (0,external_wp_element_namespaceObject.useEffect)(() => { const newQuery = {}; if (inherit && query.perPage !== postsPerPage) { newQuery.perPage = postsPerPage; } else if (!query.perPage && postsPerPage) { newQuery.perPage = postsPerPage; } if (!!Object.keys(newQuery).length) { __unstableMarkNextChangeAsNotPersistent(); updateQuery(newQuery); } }, [ query.perPage, inherit, postsPerPage, __unstableMarkNextChangeAsNotPersistent, updateQuery ]); (0,external_wp_element_namespaceObject.useEffect)(() => { if (!Number.isFinite(queryId)) { __unstableMarkNextChangeAsNotPersistent(); setAttributes({ queryId: instanceId }); } }, [ queryId, instanceId, __unstableMarkNextChangeAsNotPersistent, setAttributes ]); return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( QueryToolbar, { clientId, attributes, hasInnerBlocks: true } ) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( EnhancedPaginationModal, { attributes, setAttributes, clientId } ), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( QueryInspectorControls, { name, attributes, setQuery: updateQuery, setAttributes, clientId, isSingular } ) }), /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: [ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( query_content_HTMLElementControl, { tagName: TagName, onChange: (value) => setAttributes({ tagName: value }), clientId, options: [ { label: (0,external_wp_i18n_namespaceObject.__)("Default (

)"), value: "div" }, { label: "
", value: "main" }, { label: "
", value: "section" }, { label: "