: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
isFirstMultiSelectedBlock,
getMultiSelectedBlockClientIds,
__unstableIsFullySelected,
__unstableSelectionHasUnmergeableBlock,
__unstableHasActiveBlockOverlayActive,
getSelectedBlocksInitialCaretPosition
} = unlock(select(store));
const blockWithoutAttributes = getBlockWithoutAttributes(clientId);
// This is a temporary fix.
// This function should never be called when a block is not
// present in the state. It happens now because the order in
// withSelect rendering is not correct.
if (!blockWithoutAttributes) {
hasBlockSupport: _hasBlockSupport,
} = select(external_wp_blocks_namespaceObject.store);
const attributes = getBlockAttributes(clientId);
} = blockWithoutAttributes;
const blockType = (0,external_wp_blocks_namespaceObject.getBlockType)(blockName);
__unstableIsPreviewMode: isPreviewMode
const hasLightBlockWrapper = blockType?.apiVersion > 1;
themeSupportsLayout: supportsLayout,
index: getBlockIndex(clientId),
isReusable: (0,external_wp_blocks_namespaceObject.isReusableBlock)(blockType),
className: hasLightBlockWrapper ? attributes.className : undefined,
defaultClassName: hasLightBlockWrapper ? (0,external_wp_blocks_namespaceObject.getBlockDefaultClassName)(blockName) : undefined,
blockTitle: blockType?.title
// When in preview mode, we can avoid a lot of selection and
// editing related selectors.
const _isSelected = isBlockSelected(clientId);
const canRemove = canRemoveBlock(clientId);
const canMove = canMoveBlock(clientId);
const match = getActiveBlockVariation(blockName, attributes);
const isMultiSelected = isBlockMultiSelected(clientId);
const isAncestorOfSelectedBlock = hasSelectedInnerBlock(clientId, checkDeep);
const movingClientId = hasBlockMovingClientId();
const blockEditingMode = getBlockEditingMode(clientId);
const multiple = (0,external_wp_blocks_namespaceObject.hasBlockSupport)(blockName, 'multiple', true);
// For block types with `multiple` support, there is no "original
// block" to be found in the content, as the block itself is valid.
const blocksWithSameName = multiple ? [] : getBlocksByName(blockName);
const isInvalid = blocksWithSameName.length && blocksWithSameName[0] !== clientId;
mode: getBlockMode(clientId),
isSelectionEnabled: isSelectionEnabled(),
isLocked: !!getTemplateLock(rootClientId),
templateLock: getTemplateLock(clientId),
isTemporarilyEditingAsBlocks: getTemporarilyEditingAsBlocks() === clientId,
mayDisplayControls: _isSelected || isFirstMultiSelectedBlock(clientId) && getMultiSelectedBlockClientIds().every(id => getBlockName(id) === blockName),
mayDisplayParentControls: _hasBlockSupport(getBlockName(clientId), '__experimentalExposeControlsToChildren', false) && hasSelectedInnerBlock(clientId),
blockApiVersion: blockType?.apiVersion || 1,
blockTitle: match?.title || blockType?.title,
isSubtreeDisabled: blockEditingMode === 'disabled' && isBlockSubtreeDisabled(clientId),
hasOverlay: __unstableHasActiveBlockOverlayActive(clientId) && !isDragging(),
initialPosition: _isSelected && (__unstableGetEditorMode() === 'edit' || __unstableGetEditorMode() === 'zoom-out') // Don't recalculate the initialPosition when toggling in/out of zoom-out mode
? getSelectedBlocksInitialCaretPosition() : undefined,
isHighlighted: isBlockHighlighted(clientId),
isPartiallySelected: isMultiSelected && !__unstableIsFullySelected() && !__unstableSelectionHasUnmergeableBlock(),
isDragging: isBlockBeingDragged(clientId),
hasChildSelected: isAncestorOfSelectedBlock,
isBlockMovingMode: !!movingClientId,
canInsertMovingBlock: movingClientId && canInsertBlockType(getBlockName(movingClientId), rootClientId),
isEditingDisabled: blockEditingMode === 'disabled',
hasEditableOutline: blockEditingMode !== 'disabled' && getBlockEditingMode(rootClientId) === 'disabled',
originalBlockClientId: isInvalid ? blocksWithSameName[0] : false
}, [clientId, rootClientId]);
// Fill values that end up as a public API and may not be defined in
isSelectionEnabled = false,
isTemporarilyEditingAsBlocks,
mayDisplayParentControls,
// Users of the editor.BlockListBlock filter used to be able to
// access the block prop.
// Ideally these blocks would rely on the clientId prop only.
// This is kept for backward compatibility reasons.
const block = (0,external_wp_element_namespaceObject.useMemo)(() => ({
...blockWithoutAttributes,
}), [blockWithoutAttributes, attributes]);
// Block is sometimes not mounted at the right time, causing it be
// undefined see issue for more info
// https://github.com/WordPress/gutenberg/issues/17013
isTemporarilyEditingAsBlocks,
mayDisplayParentControls,
// Here we separate between the props passed to BlockListBlock and any other
// information we selected for internal use. BlockListBlock is a filtered
// component and thus ALL the props are PUBLIC API.
// Note that the context value doesn't have to be memoized in this case
// because when it changes, this component will be re-rendered anyway, and
// none of the consumers (BlockListBlock and useBlockProps) are memoized or
// "pure". This is different from the public BlockEditContext, where
// consumers might be memoized or "pure".
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PrivateBlockContext.Provider, {
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockListBlock, {
// Users of the editor.BlockListBlock filter used to be able
// to access the block prop. Ideally these blocks would rely
// on the clientId prop only. This is kept for backward
// compatibility reasons.
/* harmony default export */ const block_list_block = ((0,external_wp_element_namespaceObject.memo)(BlockListBlockProvider));
;// CONCATENATED MODULE: external ["wp","htmlEntities"]
const external_wp_htmlEntities_namespaceObject = window["wp"]["htmlEntities"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/inserter/tips.js
const globalTips = [(0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.__)('While writing, you can press <kbd>/</kbd> to quickly insert new blocks.'), {
kbd: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("kbd", {})
}), (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.__)('Indent a list by pressing <kbd>space</kbd> at the beginning of a line.'), {
kbd: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("kbd", {})
}), (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.__)('Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line.'), {
kbd: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("kbd", {})
}), (0,external_wp_i18n_namespaceObject.__)('Drag files into the editor to automatically insert media blocks.'), (0,external_wp_i18n_namespaceObject.__)("Change a block's type by pressing the block icon on the toolbar.")];
const [randomIndex] = (0,external_wp_element_namespaceObject.useState)(
// Disable Reason: I'm not generating an HTML id.
// eslint-disable-next-line no-restricted-syntax
Math.floor(Math.random() * globalTips.length));
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Tip, {
children: globalTips[randomIndex]
/* harmony default export */ const tips = (Tips);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-right.js
const chevronRight = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
d: "M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"
/* harmony default export */ const chevron_right = (chevronRight);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-left.js
const chevronLeft = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
d: "M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"
/* harmony default export */ const chevron_left = (chevronLeft);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-card/index.js
external_wp_deprecated_default()('`blockType` property in `BlockCard component`', {
alternative: '`title, icon and description` properties'
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
getSelectedBlockClientId,
getBlockParentsByBlockName
const _selectedBlockClientId = getSelectedBlockClientId();
parentNavBlockClientId: getBlockParentsByBlockName(_selectedBlockClientId, 'core/navigation', true)[0]
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
className: dist_clsx('block-editor-block-card', className),
children: [parentNavBlockClientId &&
// This is only used by the Navigation block for now. It's not ideal having Navigation block specific code here.
(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
onClick: () => selectBlock(parentNavBlockClientId),
label: (0,external_wp_i18n_namespaceObject.__)('Go to parent Navigation block'),
// TODO: This style override is also used in ToolsPanelHeader.
// It should be supported out-of-the-box by Button.
icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? chevron_right : chevron_left,
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(block_icon, {
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h2", {
className: "block-editor-block-card__title",
}), description && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, {
className: "block-editor-block-card__description",
/* harmony default export */ const block_card = (BlockCard);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/provider/with-registry-provider.js
function getSubRegistry(subRegistries, registry, useSubRegistry) {
let subRegistry = subRegistries.get(registry);
subRegistry = (0,external_wp_data_namespaceObject.createRegistry)({}, registry);
subRegistry.registerStore(STORE_NAME, storeConfig);
subRegistries.set(registry, subRegistry);
const withRegistryProvider = (0,external_wp_compose_namespaceObject.createHigherOrderComponent)(WrappedComponent => ({
const registry = (0,external_wp_data_namespaceObject.useRegistry)();
const [subRegistries] = (0,external_wp_element_namespaceObject.useState)(() => new WeakMap());
const subRegistry = getSubRegistry(subRegistries, registry, useSubRegistry);
if (subRegistry === registry) {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WrappedComponent, {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_data_namespaceObject.RegistryProvider, {
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WrappedComponent, {
}, 'withRegistryProvider');
/* harmony default export */ const with_registry_provider = (withRegistryProvider);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/provider/use-block-sync.js
const use_block_sync_noop = () => {};
* A function to call when the block value has been updated in the block-editor
* @callback onBlockUpdate
* @param {Object[]} blocks The updated blocks.
* @param {Object} options The updated block options, such as selectionStart
* useBlockSync is a side effect which handles bidirectional sync between the
* block-editor store and a controlling data source which provides blocks. This
* is most commonly used by the BlockEditorProvider to synchronize the contents
* of the block-editor store with the root entity, like a post.
* Another example would be the template part block, which provides blocks from
* a separate entity data source than a root entity. This hook syncs edits to
* the template part in the block editor back to the entity and vice-versa.
* Here are some of its basic functions:
* - Initalizes the block-editor store for the given clientID to the blocks
* - Adds incoming changes (like undo) to the block-editor store.
* - Adds outgoing changes (like editing content) to the controlling entity,
* determining if a change should be considered persistent or not.
* - Handles edge cases and race conditions which occur in those operations.
* - Ignores changes which happen to other entities (like nested inner block
* - Passes selection state from the block-editor store to the controlling entity.
* @param {Object} props Props for the block sync hook
* @param {string} props.clientId The client ID of the inner block controller.
* If none is passed, then it is assumed to be a
* root controller rather than an inner block
* @param {Object[]} props.value The control value for the blocks. This value
* is used to initalize the block-editor store
* and for resetting the blocks to incoming
* @param {Object} props.selection The selection state responsible to restore the selection on undo/redo.
* @param {onBlockUpdate} props.onChange Function to call when a persistent
* change has been made in the block-editor blocks
* for the given clientId. For example, after
* this function is called, an entity is marked
* dirty because it has changes to save.
* @param {onBlockUpdate} props.onInput Function to call when a non-persistent
* change has been made in the block-editor blocks
* for the given clientId. When this is called,
* controlling sources do not become dirty.
selection: controlledSelection,
onChange = use_block_sync_noop,
onInput = use_block_sync_noop
const registry = (0,external_wp_data_namespaceObject.useRegistry)();