: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
function normalizeComplementaryAreaName(scope, name) {
if (scope === 'core' && name === 'edit-site/template') {
external_wp_deprecated_default()(`edit-site/template sidebar`, {
alternative: 'edit-post/document',
return 'edit-post/document';
if (scope === 'core' && name === 'edit-site/block-inspector') {
external_wp_deprecated_default()(`edit-site/block-inspector sidebar`, {
alternative: 'edit-post/block',
return 'edit-post/block';
;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/actions.js
* Set a default complementary area.
* @param {string} scope Complementary area scope.
* @param {string} area Area identifier.
* @return {Object} Action object.
const setDefaultComplementaryArea = (scope, area) => {
scope = normalizeComplementaryAreaScope(scope);
area = normalizeComplementaryAreaName(scope, area);
type: 'SET_DEFAULT_COMPLEMENTARY_AREA',
* Enable the complementary area.
* @param {string} scope Complementary area scope.
* @param {string} area Area identifier.
const enableComplementaryArea = (scope, area) => ({
// Return early if there's no area.
scope = normalizeComplementaryAreaScope(scope);
area = normalizeComplementaryAreaName(scope, area);
const isComplementaryAreaVisible = registry.select(external_wp_preferences_namespaceObject.store).get(scope, 'isComplementaryAreaVisible');
if (!isComplementaryAreaVisible) {
registry.dispatch(external_wp_preferences_namespaceObject.store).set(scope, 'isComplementaryAreaVisible', true);
type: 'ENABLE_COMPLEMENTARY_AREA',
* Disable the complementary area.
* @param {string} scope Complementary area scope.
const disableComplementaryArea = scope => ({
scope = normalizeComplementaryAreaScope(scope);
const isComplementaryAreaVisible = registry.select(external_wp_preferences_namespaceObject.store).get(scope, 'isComplementaryAreaVisible');
if (isComplementaryAreaVisible) {
registry.dispatch(external_wp_preferences_namespaceObject.store).set(scope, 'isComplementaryAreaVisible', false);
* @param {string} scope Item scope.
* @param {string} item Item identifier.
* @return {Object} Action object.
const pinItem = (scope, item) => ({
// Return early if there's no item.
scope = normalizeComplementaryAreaScope(scope);
item = normalizeComplementaryAreaName(scope, item);
const pinnedItems = registry.select(external_wp_preferences_namespaceObject.store).get(scope, 'pinnedItems');
// The item is already pinned, there's nothing to do.
if (pinnedItems?.[item] === true) {
registry.dispatch(external_wp_preferences_namespaceObject.store).set(scope, 'pinnedItems', {
* @param {string} scope Item scope.
* @param {string} item Item identifier.
const unpinItem = (scope, item) => ({
// Return early if there's no item.
scope = normalizeComplementaryAreaScope(scope);
item = normalizeComplementaryAreaName(scope, item);
const pinnedItems = registry.select(external_wp_preferences_namespaceObject.store).get(scope, 'pinnedItems');
registry.dispatch(external_wp_preferences_namespaceObject.store).set(scope, 'pinnedItems', {
* Returns an action object used in signalling that a feature should be toggled.
* @param {string} scope The feature scope (e.g. core/edit-post).
* @param {string} featureName The feature name.
function toggleFeature(scope, featureName) {
external_wp_deprecated_default()(`dispatch( 'core/interface' ).toggleFeature`, {
alternative: `dispatch( 'core/preferences' ).toggle`
registry.dispatch(external_wp_preferences_namespaceObject.store).toggle(scope, featureName);
* Returns an action object used in signalling that a feature should be set to
* @param {string} scope The feature scope (e.g. core/edit-post).
* @param {string} featureName The feature name.
* @param {boolean} value The value to set.
* @return {Object} Action object.
function setFeatureValue(scope, featureName, value) {
external_wp_deprecated_default()(`dispatch( 'core/interface' ).setFeatureValue`, {
alternative: `dispatch( 'core/preferences' ).set`
registry.dispatch(external_wp_preferences_namespaceObject.store).set(scope, featureName, !!value);
* Returns an action object used in signalling that defaults should be set for features.
* @param {string} scope The feature scope (e.g. core/edit-post).
* @param {Object<string, boolean>} defaults A key/value map of feature names to values.
* @return {Object} Action object.
function setFeatureDefaults(scope, defaults) {
external_wp_deprecated_default()(`dispatch( 'core/interface' ).setFeatureDefaults`, {
alternative: `dispatch( 'core/preferences' ).setDefaults`
registry.dispatch(external_wp_preferences_namespaceObject.store).setDefaults(scope, defaults);
* Returns an action object used in signalling that the user opened a modal.
* @param {string} name A string that uniquely identifies the modal.
* @return {Object} Action object.
function openModal(name) {
* Returns an action object signalling that the user closed a modal.
* @return {Object} Action object.
;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/selectors.js
* Returns the complementary area that is active in a given scope.
* @param {Object} state Global application state.
* @param {string} scope Item scope.
* @return {string | null | undefined} The complementary area that is active in the given scope.
const getActiveComplementaryArea = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, scope) => {
scope = normalizeComplementaryAreaScope(scope);
const isComplementaryAreaVisible = select(external_wp_preferences_namespaceObject.store).get(scope, 'isComplementaryAreaVisible');
// Return `undefined` to indicate that the user has never toggled
// visibility, this is the vanilla default. Other code relies on this
// nuance in the return value.
if (isComplementaryAreaVisible === undefined) {
// Return `null` to indicate the user hid the complementary area.
if (isComplementaryAreaVisible === false) {
return state?.complementaryAreas?.[scope];
const isComplementaryAreaLoading = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, scope) => {
scope = normalizeComplementaryAreaScope(scope);
const isVisible = select(external_wp_preferences_namespaceObject.store).get(scope, 'isComplementaryAreaVisible');
const identifier = state?.complementaryAreas?.[scope];
return isVisible && identifier === undefined;
* Returns a boolean indicating if an item is pinned or not.
* @param {Object} state Global application state.
* @param {string} scope Scope.
* @param {string} item Item to check.
* @return {boolean} True if the item is pinned and false otherwise.
const isItemPinned = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, scope, item) => {
scope = normalizeComplementaryAreaScope(scope);
item = normalizeComplementaryAreaName(scope, item);
const pinnedItems = select(external_wp_preferences_namespaceObject.store).get(scope, 'pinnedItems');
return (_pinnedItems$item = pinnedItems?.[item]) !== null && _pinnedItems$item !== void 0 ? _pinnedItems$item : true;
* Returns a boolean indicating whether a feature is active for a particular
* @param {Object} state The store state.
* @param {string} scope The scope of the feature (e.g. core/edit-post).
* @param {string} featureName The name of the feature.
* @return {boolean} Is the feature enabled?
const isFeatureActive = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, scope, featureName) => {
external_wp_deprecated_default()(`select( 'core/interface' ).isFeatureActive( scope, featureName )`, {
alternative: `select( 'core/preferences' ).get( scope, featureName )`
return !!select(external_wp_preferences_namespaceObject.store).get(scope, featureName);
* Returns true if a modal is active, or false otherwise.
* @param {Object} state Global application state.
* @param {string} modalName A string that uniquely identifies the modal.
* @return {boolean} Whether the modal is active.
function isModalActive(state, modalName) {
return state.activeModal === modalName;
;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/reducer.js
function complementaryAreas(state = {}, action) {
case 'SET_DEFAULT_COMPLEMENTARY_AREA':
// If there's already an area, don't overwrite it.
case 'ENABLE_COMPLEMENTARY_AREA':
* Reducer for storing the name of the open modal, or null if no modal is open.
* @param {Object} state Previous state.
* @param {Object} action Action object containing the `name` of the modal
* @return {Object} Updated state
function activeModal(state = null, action) {
/* harmony default export */ const store_reducer = ((0,external_wp_data_namespaceObject.combineReducers)({
;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/constants.js
* The identifier for the data store.
const constants_STORE_NAME = 'core/interface';
;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/index.js
* Store definition for the interface namespace.
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
const store = (0,external_wp_data_namespaceObject.createReduxStore)(constants_STORE_NAME, {
actions: store_actions_namespaceObject,
selectors: store_selectors_namespaceObject
// Once we build a more generic persistence plugin that works across types of stores
// we'd be able to replace this with a register call.
(0,external_wp_data_namespaceObject.register)(store);
;// CONCATENATED MODULE: external ["wp","plugins"]
const external_wp_plugins_namespaceObject = window["wp"]["plugins"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-context/index.js
/* harmony default export */ const complementary_area_context = ((0,external_wp_plugins_namespaceObject.withPluginContext)((context, ownProps) => {
icon: ownProps.icon || context.icon,
identifier: ownProps.identifier || `${context.name}/${ownProps.name}`
;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-toggle/index.js
function ComplementaryAreaToggle({
as = external_wp_components_namespaceObject.Button,
const ComponentToUse = as;
const isSelected = (0,external_wp_data_namespaceObject.useSelect)(select => select(store).getActiveComplementaryArea(scope) === identifier, [identifier, scope]);
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ComponentToUse, {
icon: selectedIcon && isSelected ? selectedIcon : icon,
"aria-controls": identifier.replace('/', ':'),
disableComplementaryArea(scope);
enableComplementaryArea(scope, identifier);
/* harmony default export */ const complementary_area_toggle = (complementary_area_context(ComplementaryAreaToggle));
;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-header/index.js
const ComplementaryAreaHeader = ({
const toggleButton = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(complementary_area_toggle, {