: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
justify: 'space-between',
function getAlignmentProps(alignment, direction = 'row') {
if (!isValueDefined(alignment)) {
const isVertical = direction === 'column';
const props = isVertical ? V_ALIGNMENTS : H_ALIGNMENTS;
const alignmentProps = alignment in props ? props[alignment] : {
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/utils/get-valid-children.js
* Gets a collection of available children elements from a React component's children prop.
* @return An array of available children.
function getValidChildren(children) {
if (typeof children === 'string') {
return external_wp_element_namespaceObject.Children.toArray(children).filter(child => (0,external_wp_element_namespaceObject.isValidElement)(child));
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/h-stack/hook.js
function useHStack(props) {
} = useContextSystem(props, 'HStack');
const align = getAlignmentProps(alignment, direction);
const validChildren = getValidChildren(children);
const clonedChildren = validChildren.map((child, index) => {
const _isSpacer = hasConnectNamespace(child, ['Spacer']);
const childElement = child;
const _key = childElement.key || `hstack-${index}`;
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(flex_item_component, {
children: clonedChildren,
// Omit `isColumn` because it's not used in HStack.
} = useFlex(propsForFlex);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/h-stack/component.js
function UnconnectedHStack(props, forwardedRef) {
const hStackProps = useHStack(props);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(component, {
* `HStack` (Horizontal Stack) arranges child elements in a horizontal line.
* `HStack` can render anything inside.
* __experimentalHStack as HStack,
* __experimentalText as Text,
* } from `@wordpress/components`;
const HStack = contextConnect(UnconnectedHStack, 'HStack');
/* harmony default export */ const h_stack_component = (HStack);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/number-control/index.js
const number_control_noop = () => {};
function UnforwardedNumberControl(props, forwardedRef) {
__unstableStateReducer: stateReducerProp,
spinControls = hideHTMLArrows ? 'none' : 'native',
isShiftStepEnabled = true,
type: typeProp = 'number',
onChange = number_control_noop,
} = useDeprecated36pxDefaultSizeProp(props);
external_wp_deprecated_default()('wp.components.NumberControl hideHTMLArrows prop ', {
alternative: 'spinControls="none"',
const inputRef = (0,external_wp_element_namespaceObject.useRef)();
const mergedRef = (0,external_wp_compose_namespaceObject.useMergeRefs)([inputRef, forwardedRef]);
const isStepAny = step === 'any';
const baseStep = isStepAny ? 1 : ensureNumber(step);
const baseSpin = ensureNumber(spinFactor) * baseStep;
const baseValue = roundClamp(0, min, max, baseStep);
const constrainValue = (value, stepOverride) => {
// When step is "any" clamp the value, otherwise round and clamp it.
// Use '' + to convert to string for use in input value attribute.
return isStepAny ? '' + Math.min(max, Math.max(min, ensureNumber(value))) : '' + roundClamp(value, min, max, stepOverride !== null && stepOverride !== void 0 ? stepOverride : baseStep);
const autoComplete = typeProp === 'number' ? 'off' : undefined;
const classes = dist_clsx('components-number-control', className);
const spinButtonClasses = cx(size === 'small' && styles.smallSpinButtons);
const spinValue = (value, direction, event) => {
const shift = event?.shiftKey && isShiftStepEnabled;
const delta = shift ? ensureNumber(shiftStep) * baseSpin : baseSpin;
let nextValue = isValueEmpty(value) ? baseValue : value;
if (direction === 'up') {
nextValue = add(nextValue, delta);
} else if (direction === 'down') {
nextValue = subtract(nextValue, delta);
return constrainValue(nextValue, shift ? delta : undefined);
* "Middleware" function that intercepts updates from InputControl.
* This allows us to tap into actions to transform the (next) state for
* @return The updated state to apply to InputControl
const numberControlStateReducer = (state, action) => {
const event = payload.event;
const currentValue = nextState.value;
* Handles custom UP and DOWN Keyboard events
if (type === PRESS_UP || type === PRESS_DOWN) {
nextState.value = spinValue(currentValue, type === PRESS_UP ? 'up' : 'down', event);
* Handles drag to update events
if (type === DRAG && isDragEnabled) {
const [x, y] = payload.delta;
const enableShift = payload.shiftKey && isShiftStepEnabled;
const modifier = enableShift ? ensureNumber(shiftStep) * baseSpin : baseSpin;
directionModifier = (0,external_wp_i18n_namespaceObject.isRTL)() ? -1 : 1;
directionModifier = (0,external_wp_i18n_namespaceObject.isRTL)() ? 1 : -1;
delta = Math.ceil(Math.abs(delta)) * Math.sign(delta);
const distance = delta * modifier * directionModifier;
nextState.value = constrainValue(
// @ts-expect-error TODO: Investigate if it's ok for currentValue to be undefined
add(currentValue, distance), enableShift ? modifier : undefined);
* Handles commit (ENTER key press or blur)
if (type === PRESS_ENTER || type === COMMIT) {
const applyEmptyValue = required === false && currentValue === '';
nextState.value = applyEmptyValue ? currentValue :
// @ts-expect-error TODO: Investigate if it's ok for currentValue to be undefined
constrainValue(currentValue);
const buildSpinButtonClickHandler = direction => event => onChange(String(spinValue(valueProp, direction, event)), {
// Set event.target to the <input> so that consumers can use
// e.g. event.target.validity.
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(number_control_styles_Input, {
autoComplete: autoComplete,
dragDirection: dragDirection,
hideHTMLArrows: spinControls !== 'native',
isDragEnabled: isDragEnabled,
// @ts-expect-error TODO: Resolve discrepancy between `value` types in InputControl based components
__unstableStateReducer: (state, action) => {
const baseState = numberControlStateReducer(state, action);
return (_stateReducerProp = stateReducerProp?.(baseState, action)) !== null && _stateReducerProp !== void 0 ? _stateReducerProp : baseState;
suffix: spinControls === 'custom' ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [suffix, /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(spacer_component, {
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(h_stack_component, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SpinButton, {
className: spinButtonClasses,
label: (0,external_wp_i18n_namespaceObject.__)('Increment'),
onClick: buildSpinButtonClickHandler('up')
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SpinButton, {
className: spinButtonClasses,
label: (0,external_wp_i18n_namespaceObject.__)('Decrement'),
onClick: buildSpinButtonClickHandler('down')
const NumberControl = (0,external_wp_element_namespaceObject.forwardRef)(UnforwardedNumberControl);
/* harmony default export */ const number_control = (NumberControl);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/angle-picker-control/styles/angle-picker-control-styles.js
function angle_picker_control_styles_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
const INNER_CIRCLE_SIZE = 6;
const CircleRoot = /*#__PURE__*/emotion_styled_base_browser_esm("div", true ? {
} : 0)("border-radius:50%;border:", config_values.borderWidth, " solid ", COLORS.ui.border, ";box-sizing:border-box;cursor:grab;height:", CIRCLE_SIZE, "px;overflow:hidden;width:", CIRCLE_SIZE, "px;:active{cursor:grabbing;}" + ( true ? "" : 0));
const CircleIndicatorWrapper = /*#__PURE__*/emotion_styled_base_browser_esm("div", true ? {
styles: "box-sizing:border-box;position:relative;width:100%;height:100%;:focus-visible{outline:none;}"
const CircleIndicator = /*#__PURE__*/emotion_styled_base_browser_esm("div", true ? {
} : 0)("background:", COLORS.theme.accent, ";border-radius:50%;box-sizing:border-box;display:block;left:50%;top:4px;transform:translateX( -50% );position:absolute;width:", INNER_CIRCLE_SIZE, "px;height:", INNER_CIRCLE_SIZE, "px;" + ( true ? "" : 0));
const UnitText = /*#__PURE__*/emotion_styled_base_browser_esm(text_component, true ? {
} : 0)("color:", COLORS.theme.accent, ";margin-right:", space(3), ";" + ( true ? "" : 0));
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/angle-picker-control/angle-circle.js
const angleCircleRef = (0,external_wp_element_namespaceObject.useRef)(null);
const angleCircleCenter = (0,external_wp_element_namespaceObject.useRef)();
const previousCursorValue = (0,external_wp_element_namespaceObject.useRef)();
const setAngleCircleCenter = () => {
if (angleCircleRef.current === null) {
const rect = angleCircleRef.current.getBoundingClientRect();
angleCircleCenter.current = {
x: rect.x + rect.width / 2,
y: rect.y + rect.height / 2
const changeAngleToPosition = event => {
if (event === undefined) {
// Prevent (drag) mouse events from selecting and accidentally
// triggering actions from other elements.
// Input control needs to lose focus and by preventDefault above, it doesn't.
if (angleCircleCenter.current !== undefined && onChange !== undefined) {
} = angleCircleCenter.current;
onChange(getAngle(centerX, centerY, event.clientX, event.clientY));
} = (0,external_wp_compose_namespaceObject.__experimentalUseDragging)({
changeAngleToPosition(event);
onDragMove: changeAngleToPosition,
onDragEnd: changeAngleToPosition
(0,external_wp_element_namespaceObject.useEffect)(() => {
if (previousCursorValue.current === undefined) {
previousCursorValue.current = document.body.style.cursor;
document.body.style.cursor = 'grabbing';
document.body.style.cursor = previousCursorValue.current || '';
previousCursorValue.current = undefined;
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CircleRoot, {
className: "components-angle-picker-control__angle-circle",
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CircleIndicatorWrapper, {
transform: `rotate(${value}deg)`
className: "components-angle-picker-control__angle-circle-indicator-wrapper",
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CircleIndicator, {
className: "components-angle-picker-control__angle-circle-indicator"