: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
* @return {JSX.Element} Icon component
return (0,external_wp_element_namespaceObject.cloneElement)(icon, {
/* harmony default export */ const build_module_icon = ((0,external_wp_element_namespaceObject.forwardRef)(Icon));
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/position-center.js
const positionCenter = /*#__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: "M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM7 9h10v6H7V9Z"
/* harmony default export */ const position_center = (positionCenter);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/stretch-wide.js
const stretchWide = /*#__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: "M16 5.5H8V4h8v1.5ZM16 20H8v-1.5h8V20ZM5 9h14v6H5V9Z"
/* harmony default export */ const stretch_wide = (stretchWide);
;// CONCATENATED MODULE: external ["wp","styleEngine"]
const external_wp_styleEngine_namespaceObject = window["wp"]["styleEngine"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/layouts/constrained.js
/* harmony default export */ const constrained = ({
label: (0,external_wp_i18n_namespaceObject.__)('Constrained'),
inspectorControls: function DefaultLayoutInspectorControls({
justifyContent = 'center'
allowJustification = true,
allowCustomContentAndWideSize = true
const onJustificationChange = value => {
const justificationOptions = [{
label: (0,external_wp_i18n_namespaceObject.__)('Justify items left')
label: (0,external_wp_i18n_namespaceObject.__)('Justify items center')
label: (0,external_wp_i18n_namespaceObject.__)('Justify items right')
const [availableUnits] = use_settings_useSettings('spacing.units');
const units = (0,external_wp_components_namespaceObject.__experimentalUseCustomUnits)({
availableUnits: availableUnits || ['%', 'px', 'em', 'rem', 'vw']
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [allowCustomContentAndWideSize && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
className: "block-editor-hooks__layout-controls",
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
className: "block-editor-hooks__layout-controls-unit",
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalUnitControl, {
className: "block-editor-hooks__layout-controls-unit-input",
label: (0,external_wp_i18n_namespaceObject.__)('Content'),
__unstableInputWidth: "80px",
value: contentSize || wideSize || '',
nextWidth = 0 > parseFloat(nextWidth) ? '0' : nextWidth;
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon, {
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
className: "block-editor-hooks__layout-controls-unit",
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalUnitControl, {
className: "block-editor-hooks__layout-controls-unit-input",
label: (0,external_wp_i18n_namespaceObject.__)('Wide'),
__unstableInputWidth: "80px",
value: wideSize || contentSize || '',
nextWidth = 0 > parseFloat(nextWidth) ? '0' : nextWidth;
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon, {
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
className: "block-editor-hooks__layout-controls-helptext",
children: (0,external_wp_i18n_namespaceObject.__)('Customize the width for all elements that are assigned to the center or wide columns.')
}), allowJustification && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToggleGroupControl, {
__nextHasNoMarginBottom: true,
label: (0,external_wp_i18n_namespaceObject.__)('Justification'),
onChange: onJustificationChange,
children: justificationOptions.map(({
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOptionIcon, {
toolBarControls: function DefaultLayoutToolbarControls() {
getLayoutStyle: function getLayoutStyle({
layoutDefinitions = LAYOUT_DEFINITIONS
const blockGapStyleValue = getGapCSSValue(style?.spacing?.blockGap);
// If a block's block.json skips serialization for spacing or
// spacing.blockGap, don't apply the user-defined value to the styles.
if (!shouldSkipSerialization(blockName, 'spacing', 'blockGap')) {
// If an object is provided only use the 'top' value for this kind of gap.
if (blockGapStyleValue?.top) {
blockGapValue = getGapCSSValue(blockGapStyleValue?.top);
} else if (typeof blockGapStyleValue === 'string') {
blockGapValue = getGapCSSValue(blockGapStyleValue);
const marginLeft = justifyContent === 'left' ? '0 !important' : 'auto !important';
const marginRight = justifyContent === 'right' ? '0 !important' : 'auto !important';
let output = !!contentSize || !!wideSize ? `
${appendSelectors(selector, '> :where(:not(.alignleft):not(.alignright):not(.alignfull))')} {
max-width: ${contentSize !== null && contentSize !== void 0 ? contentSize : wideSize};
margin-left: ${marginLeft};
margin-right: ${marginRight};
${appendSelectors(selector, '> .alignwide')} {
max-width: ${wideSize !== null && wideSize !== void 0 ? wideSize : contentSize};
${appendSelectors(selector, '> .alignfull')} {
if (justifyContent === 'left') {
output += `${appendSelectors(selector, '> :where(:not(.alignleft):not(.alignright):not(.alignfull))')}
{ margin-left: ${marginLeft}; }`;
} else if (justifyContent === 'right') {
output += `${appendSelectors(selector, '> :where(:not(.alignleft):not(.alignright):not(.alignfull))')}
{ margin-right: ${marginRight}; }`;
// If there is custom padding, add negative margins for alignfull blocks.
if (style?.spacing?.padding) {
// The style object might be storing a preset so we need to make sure we get a usable value.
const paddingValues = (0,external_wp_styleEngine_namespaceObject.getCSSRules)(style);
paddingValues.forEach(rule => {
if (rule.key === 'paddingRight') {
// Add unit if 0, to avoid calc(0 * -1) which is invalid.
const paddingRightValue = rule.value === '0' ? '0px' : rule.value;
${appendSelectors(selector, '> .alignfull')} {
margin-right: calc(${paddingRightValue} * -1);
} else if (rule.key === 'paddingLeft') {
// Add unit if 0, to avoid calc(0 * -1) which is invalid.
const paddingLeftValue = rule.value === '0' ? '0px' : rule.value;
${appendSelectors(selector, '> .alignfull')} {
margin-left: calc(${paddingLeftValue} * -1);
// Output blockGap styles based on rules contained in layout definitions in theme.json.
if (hasBlockGapSupport && blockGapValue) {
output += getBlockGapCSS(selector, layoutDefinitions, 'constrained', blockGapValue);
const alignmentInfo = getAlignmentsInfo(layout);
if (layout.alignments !== undefined) {
if (!layout.alignments.includes('none')) {
layout.alignments.unshift('none');
return layout.alignments.map(alignment => ({
info: alignmentInfo[alignment]
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/provider/block-refs-provider.js
const BlockRefs = (0,external_wp_element_namespaceObject.createContext)({
refsMap: (0,external_wp_compose_namespaceObject.observableMap)()
function BlockRefsProvider({
const value = (0,external_wp_element_namespaceObject.useMemo)(() => ({
refsMap: (0,external_wp_compose_namespaceObject.observableMap)()
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockRefs.Provider, {
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-list/use-block-props/use-block-refs.js
/** @typedef {import('@wordpress/element').RefCallback} RefCallback */
/** @typedef {import('@wordpress/element').RefObject} RefObject */
* Provides a ref to the BlockRefs context.
* @param {string} clientId The client ID of the element ref.
* @return {RefCallback} Ref callback.
function useBlockRefProvider(clientId) {
} = (0,external_wp_element_namespaceObject.useContext)(BlockRefs);
return (0,external_wp_compose_namespaceObject.useRefEffect)(element => {
refsMap.set(clientId, element);
return () => refsMap.delete(clientId);
* Gets a ref pointing to the current block element. Continues to return the same
* stable ref object even if the `clientId` argument changes. This hook is not
* reactive, i.e., it won't trigger a rerender of the calling component if the
* ref value changes. For reactive use cases there is the `useBlockElement` hook.
* @param {string} clientId The client ID to get a ref for.
* @return {RefObject} A ref containing the element.
function useBlockRef(clientId) {
} = (0,external_wp_element_namespaceObject.useContext)(BlockRefs);
const latestClientId = (0,external_wp_element_namespaceObject.useRef)();
latestClientId.current = clientId;
// Always return an object, even if no ref exists for a given client ID, so
// that `current` works at a later point.
return (0,external_wp_element_namespaceObject.useMemo)(() => ({
return (_refsMap$get = refsMap.get(latestClientId.current)) !== null && _refsMap$get !== void 0 ? _refsMap$get : null;
* Return the element for a given client ID. Updates whenever the element
* changes, becomes available, or disappears.
* @param {string} clientId The client ID to an element for.
* @return {Element|null} The block's wrapper element.
function useBlockElement(clientId) {
} = (0,external_wp_element_namespaceObject.useContext)(BlockRefs);
const [blockElement, setBlockElement] = (0,external_wp_element_namespaceObject.useState)(null);
// Delay setting the resulting `blockElement` until an effect. If the block element
// changes (i.e., the block is unmounted and re-mounted), this allows enough time
// for the ref callbacks to clean up the old element and set the new one.
(0,external_wp_element_namespaceObject.useLayoutEffect)(() => {
setBlockElement(refsMap.get(clientId));
return refsMap.subscribe(clientId, () => setBlockElement(refsMap.get(clientId)));
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-popover/use-popover-scroll.js
* Allow scrolling "through" popovers over the canvas. This is only called for
* as long as the pointer is over a popover. Do not use React events because it
* will bubble through portals.
* @param {Object} scrollableRef
function usePopoverScroll(scrollableRef) {
return (0,external_wp_compose_namespaceObject.useRefEffect)(node => {
function onWheel(event) {
scrollableRef.current.scrollBy(deltaX, deltaY);
// Tell the browser that we do not call event.preventDefault
// See https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#improving_scrolling_performance_with_passive_listeners
node.addEventListener('wheel', onWheel, options);
node.removeEventListener('wheel', onWheel, options);
/* harmony default export */ const use_popover_scroll = (usePopoverScroll);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/block-popover/index.js
const MAX_POPOVER_RECOMPUTE_COUNTER = Number.MAX_SAFE_INTEGER;
const selectedElement = useBlockElement(clientId);
const lastSelectedElement = useBlockElement(bottomClientId !== null && bottomClientId !== void 0 ? bottomClientId : clientId);
const mergedRefs = (0,external_wp_compose_namespaceObject.useMergeRefs)([ref, use_popover_scroll(__unstableContentRef)]);
const [popoverDimensionsRecomputeCounter, forceRecomputePopoverDimensions] = (0,external_wp_element_namespaceObject.useReducer)(
// Module is there to make sure that the counter doesn't overflow.
s => (s + 1) % MAX_POPOVER_RECOMPUTE_COUNTER, 0);
// When blocks are moved up/down, they are animated to their new position by
// updating the `transform` property manually (i.e. without using CSS
// transitions or animations). The animation, which can also scroll the block
// editor, can sometimes cause the position of the Popover to get out of sync.
// A MutationObserver is therefore used to make sure that changes to the
// selectedElement's attribute (i.e. `transform`) can be tracked and used to
// trigger the Popover to rerender.
(0,external_wp_element_namespaceObject.useLayoutEffect)(() => {
const observer = new window.MutationObserver(forceRecomputePopoverDimensions);
observer.observe(selectedElement, {