: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
* Returns the next edit from the current undo offset
* for the entity records edits history, if any.
* @param state State tree.
function getRedoEdit(state) {
external_wp_deprecated_default()("select( 'core' ).getRedoEdit()", {
* Returns true if there is a previous edit from the current undo offset
* for the entity records edits history, and false otherwise.
* @param state State tree.
* @return Whether there is a previous edit or not.
function hasUndo(state) {
return state.undoManager.hasUndo();
* Returns true if there is a next edit from the current undo offset
* for the entity records edits history, and false otherwise.
* @param state State tree.
* @return Whether there is a next edit or not.
function hasRedo(state) {
return state.undoManager.hasRedo();
* Return the current theme.
* @param state Data state.
* @return The current theme.
function getCurrentTheme(state) {
if (!state.currentTheme) {
return getEntityRecord(state, 'root', 'theme', state.currentTheme);
* Return the ID of the current global styles object.
* @param state Data state.
* @return The current global styles ID.
function __experimentalGetCurrentGlobalStylesId(state) {
return state.currentGlobalStylesId;
* Return theme supports data in the index.
* @param state Data state.
function getThemeSupports(state) {
var _getCurrentTheme$them;
return (_getCurrentTheme$them = getCurrentTheme(state)?.theme_supports) !== null && _getCurrentTheme$them !== void 0 ? _getCurrentTheme$them : EMPTY_OBJECT;
* Returns the embed preview for the given URL.
* @param state Data state.
* @param url Embedded URL.
* @return Undefined if the preview has not been fetched, otherwise, the preview fetched from the embed preview API.
function getEmbedPreview(state, url) {
return state.embedPreviews[url];
* Determines if the returned preview is an oEmbed link fallback.
* WordPress can be configured to return a simple link to a URL if it is not embeddable.
* We need to be able to determine if a URL is embeddable or not, based on what we
* get back from the oEmbed preview API.
* @param state Data state.
* @param url Embedded URL.
* @return Is the preview for the URL an oEmbed link fallback.
function isPreviewEmbedFallback(state, url) {
const preview = state.embedPreviews[url];
const oEmbedLinkCheck = '<a href="' + url + '">' + url + '</a>';
return preview.html === oEmbedLinkCheck;
* Returns whether the current user can perform the given action on the given
* Calling this may trigger an OPTIONS request to the REST API via the
* https://developer.wordpress.org/rest-api/reference/
* @param state Data state.
* @param action Action to check. One of: 'create', 'read', 'update', 'delete'.
* @param resource REST resource to check, e.g. 'media' or 'posts'.
* @param id Optional ID of the rest resource to check.
* @return Whether or not the user can perform the action,
* or `undefined` if the OPTIONS request is still being made.
function canUser(state, action, resource, id) {
const key = [action, resource, id].filter(Boolean).join('/');
return state.userPermissions[key];
* Returns whether the current user can edit the given entity.
* Calling this may trigger an OPTIONS request to the REST API via the
* https://developer.wordpress.org/rest-api/reference/
* @param state Data state.
* @param kind Entity kind.
* @param name Entity name.
* @param recordId Record's id.
* @return Whether or not the user can edit,
* or `undefined` if the OPTIONS request is still being made.
function canUserEditEntityRecord(state, kind, name, recordId) {
const entityConfig = getEntityConfig(state, kind, name);
const resource = entityConfig.__unstable_rest_base;
return canUser(state, 'update', resource, recordId);
* Returns the latest autosaves for the post.
* May return multiple autosaves since the backend stores one autosave per
* @param state State tree.
* @param postType The type of the parent post.
* @param postId The id of the parent post.
* @return An array of autosaves for the post, or undefined if there is none.
function getAutosaves(state, postType, postId) {
return state.autosaves[postId];
* Returns the autosave for the post and author.
* @param state State tree.
* @param postType The type of the parent post.
* @param postId The id of the parent post.
* @param authorId The id of the author.
* @return The autosave for the post and author.
function getAutosave(state, postType, postId, authorId) {
if (authorId === undefined) {
const autosaves = state.autosaves[postId];
return autosaves?.find(autosave => autosave.author === authorId);
* Returns true if the REST request for autosaves has completed.
* @param state State tree.
* @param postType The type of the parent post.
* @param postId The id of the parent post.
* @return True if the REST request was completed. False otherwise.
const hasFetchedAutosaves = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, postType, postId) => {
return select(STORE_NAME).hasFinishedResolution('getAutosaves', [postType, postId]);
* Returns a new reference when edited values have changed. This is useful in
* inferring where an edit has been made between states by comparison of the
* return values using strict equality.
* const hasEditOccurred = (
* getReferenceByDistinctEdits( beforeState ) !==
* getReferenceByDistinctEdits( afterState )
* @param state Editor state.
* @return A value whose reference will change only when an edit occurs.
function getReferenceByDistinctEdits(state) {
return state.editsReference;
* Retrieve the frontend template used for a given link.
* @param state Editor state.
* @return The template record.
function __experimentalGetTemplateForLink(state, link) {
const records = getEntityRecords(state, 'postType', 'wp_template', {
return getEditedEntityRecord(state, 'postType', 'wp_template', records[0].id);
* Retrieve the current theme's base global styles
* @param state Editor state.
* @return The Global Styles object.
function __experimentalGetCurrentThemeBaseGlobalStyles(state) {
const currentTheme = getCurrentTheme(state);
return state.themeBaseGlobalStyles[currentTheme.stylesheet];
* Return the ID of the current global styles object.
* @param state Data state.
* @return The current global styles ID.
function __experimentalGetCurrentThemeGlobalStylesVariations(state) {
const currentTheme = getCurrentTheme(state);
return state.themeGlobalStyleVariations[currentTheme.stylesheet];
* Retrieve the list of registered block patterns.
* @param state Data state.
* @return Block pattern list.
function getBlockPatterns(state) {
return state.blockPatterns;
* Retrieve the list of registered block pattern categories.
* @param state Data state.
* @return Block pattern category list.
function getBlockPatternCategories(state) {
return state.blockPatternCategories;
* Retrieve the registered user pattern categories.
* @param state Data state.
* @return User patterns category array.
function getUserPatternCategories(state) {
return state.userPatternCategories;
* Returns the revisions of the current global styles theme.
* @deprecated since WordPress 6.5.0. Callers should use `select( 'core' ).getRevisions( 'root', 'globalStyles', ${ recordKey } )` instead, where `recordKey` is the id of the global styles parent post.
* @param state Data state.
* @return The current global styles.
function getCurrentThemeGlobalStylesRevisions(state) {
external_wp_deprecated_default()("select( 'core' ).getCurrentThemeGlobalStylesRevisions()", {
alternative: "select( 'core' ).getRevisions( 'root', 'globalStyles', ${ recordKey } )"
const currentGlobalStylesId = __experimentalGetCurrentGlobalStylesId(state);
if (!currentGlobalStylesId) {
return state.themeGlobalStyleRevisions[currentGlobalStylesId];
* Returns the default template use to render a given query.
* @param state Data state.
* @return The default template id for the given query.
function getDefaultTemplateId(state, query) {
return state.defaultTemplates[JSON.stringify(query)];
* Returns an entity's revisions.
* @param state State tree
* @param kind Entity kind.
* @param name Entity name.
* @param recordKey The key of the entity record whose revisions you want to fetch.
* @param query Optional query. If requesting specific
* fields, fields must always include the ID. For valid query parameters see revisions schema in [the REST API Handbook](https://developer.wordpress.org/rest-api/reference/). Then see the arguments available "Retrieve a [Entity kind]".
const getRevisions = (state, kind, name, recordKey, query) => {
const queriedStateRevisions = state.entities.records?.[kind]?.[name]?.revisions?.[recordKey];
if (!queriedStateRevisions) {
return getQueriedItems(queriedStateRevisions, query);
* Returns a single, specific revision of a parent entity.
* @param state State tree
* @param kind Entity kind.
* @param name Entity name.
* @param recordKey The key of the entity record whose revisions you want to fetch.
* @param revisionKey The revision's key.
* @param query Optional query. If requesting specific
* fields, fields must always include the ID. For valid query parameters see revisions schema in [the REST API Handbook](https://developer.wordpress.org/rest-api/reference/). Then see the arguments available "Retrieve a [entity kind]".
const getRevision = (0,external_wp_data_namespaceObject.createSelector)((state, kind, name, recordKey, revisionKey, query) => {
const queriedState = state.entities.records?.[kind]?.[name]?.revisions?.[recordKey];
const context = (_query$context5 = query?.context) !== null && _query$context5 !== void 0 ? _query$context5 : 'default';
if (query === undefined) {
// If expecting a complete item, validate that completeness.
if (!queriedState.itemIsComplete[context]?.[revisionKey]) {
return queriedState.items[context][revisionKey];
const item = queriedState.items[context]?.[revisionKey];
if (item && query._fields) {
var _getNormalizedCommaSe2;
const fields = (_getNormalizedCommaSe2 = get_normalized_comma_separable(query._fields)) !== null && _getNormalizedCommaSe2 !== void 0 ? _getNormalizedCommaSe2 : [];
for (let f = 0; f < fields.length; f++) {
const field = fields[f].split('.');
field.forEach(fieldName => {
value = value?.[fieldName];
setNestedValue(filteredItem, field, value);
}, (state, kind, name, recordKey, revisionKey, query) => {
const context = (_query$context6 = query?.context) !== null && _query$context6 !== void 0 ? _query$context6 : 'default';
return [state.entities.records?.[kind]?.[name]?.revisions?.[recordKey]?.items?.[context]?.[revisionKey], state.entities.records?.[kind]?.[name]?.revisions?.[recordKey]?.itemIsComplete?.[context]?.[revisionKey]];
;// CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/private-selectors.js
* Returns the previous edit from the current undo offset
* for the entity records edits history, if any.
* @param state State tree.
* @return The undo manager.
function getUndoManager(state) {
return state.undoManager;
* Retrieve the fallback Navigation.
* @param state Data state.
* @return The ID for the fallback Navigation post.
function getNavigationFallbackId(state) {
return state.navigationFallbackId;
const getBlockPatternsForPostType = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (0,external_wp_data_namespaceObject.createSelector)((state, postType) => select(STORE_NAME).getBlockPatterns().filter(({
}) => !postTypes || Array.isArray(postTypes) && postTypes.includes(postType)), () => [select(STORE_NAME).getBlockPatterns()]));
;// CONCATENATED MODULE: ./node_modules/camel-case/dist.es2015/index.js
function camelCaseTransform(input, index) {
return input.toLowerCase();
return pascalCaseTransform(input, index);
function camelCaseTransformMerge(input, index) {
return input.toLowerCase();
return pascalCaseTransformMerge(input);
function camelCase(input, options) {
if (options === void 0) { options = {}; }
return pascalCase(input, __assign({ transform: camelCaseTransform }, options));
;// CONCATENATED MODULE: external ["wp","htmlEntities"]
const external_wp_htmlEntities_namespaceObject = window["wp"]["htmlEntities"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/utils/forward-resolver.js
* Higher-order function which forward the resolution to another resolver with the same arguments.
* @param {string} resolverName forwarded resolver.
* @return {Function} Enhanced resolver.
const forwardResolver = resolverName => (...args) => async ({
await resolveSelect[resolverName](...args);
/* harmony default export */ const forward_resolver = (forwardResolver);
;// CONCATENATED MODULE: ./node_modules/@wordpress/core-data/build-module/fetch/__experimental-fetch-link-suggestions.js
* Filters the search by type
* @typedef { 'attachment' | 'post' | 'term' | 'post-format' } WPLinkSearchType
* A link with an id may be of kind post-type or taxonomy
* @typedef { 'post-type' | 'taxonomy' } WPKind