: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
function getAngle(centerX, centerY, pointX, pointY) {
const y = pointY - centerY;
const x = pointX - centerX;
const angleInRadians = Math.atan2(y, x);
const angleInDeg = Math.round(angleInRadians * (180 / Math.PI)) + 90;
/* harmony default export */ const angle_circle = (AngleCircle);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/angle-picker-control/index.js
function UnforwardedAnglePickerControl(props, ref) {
label = (0,external_wp_i18n_namespaceObject.__)('Angle'),
const handleOnNumberChange = unprocessedValue => {
if (onChange === undefined) {
const inputValue = unprocessedValue !== undefined && unprocessedValue !== '' ? parseInt(unprocessedValue, 10) : 0;
const classes = dist_clsx('components-angle-picker-control', className);
const unitText = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(UnitText, {
const [prefixedUnitText, suffixedUnitText] = (0,external_wp_i18n_namespaceObject.isRTL)() ? [unitText, null] : [null, unitText];
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(flex_component, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(flex_block_component, {
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(number_control, {
className: "components-angle-picker-control__input-field",
onChange: handleOnNumberChange,
size: "__unstable-large",
prefix: prefixedUnitText,
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(spacer_component, {
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(angle_circle, {
* `AnglePickerControl` is a React component to render a UI that allows users to
* pick an angle. Users can choose an angle in a visual UI with the mouse by
* dragging an angle indicator inside a circle or by directly inserting the
* desired angle in a text field.
* import { useState } from '@wordpress/element';
* import { AnglePickerControl } from '@wordpress/components';
* const [ angle, setAngle ] = useState( 0 );
const AnglePickerControl = (0,external_wp_element_namespaceObject.forwardRef)(UnforwardedAnglePickerControl);
/* harmony default export */ const angle_picker_control = (AnglePickerControl);
// EXTERNAL MODULE: ./node_modules/remove-accents/index.js
var remove_accents = __webpack_require__(9681);
var remove_accents_default = /*#__PURE__*/__webpack_require__.n(remove_accents);
;// CONCATENATED MODULE: external ["wp","richText"]
const external_wp_richText_namespaceObject = window["wp"]["richText"];
;// CONCATENATED MODULE: external ["wp","a11y"]
const external_wp_a11y_namespaceObject = window["wp"]["a11y"];
;// CONCATENATED MODULE: external ["wp","keycodes"]
const external_wp_keycodes_namespaceObject = window["wp"]["keycodes"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/utils/strings.js
* All unicode characters that we consider "dash-like":
* - `\u00ad`: (soft hyphen)
* - `\u2053`: ⁓ (swung dash)
* - `\u207b`: ⁻ (superscript minus)
* - `\u208b`: ₋ (subscript minus)
* - `\u2212`: − (minus sign)
* - `\\p{Pd}`: any other Unicode dash character
const ALL_UNICODE_DASH_CHARACTERS = new RegExp(/[\u007e\u00ad\u2053\u207b\u208b\u2212\p{Pd}]/gu);
const normalizeTextString = value => {
return remove_accents_default()(value).toLocaleLowerCase().replace(ALL_UNICODE_DASH_CHARACTERS, '-');
* Converts any string to kebab case.
* Backwards compatible with Lodash's `_.kebabCase()`.
* Backwards compatible with `_wp_to_kebab_case()`.
* @see https://lodash.com/docs/4.17.15#kebabCase
* @see https://developer.wordpress.org/reference/functions/_wp_to_kebab_case/
* @param str String to convert.
* @return Kebab-cased string
function kebabCase(str) {
let input = (_str$toString = str?.toString?.()) !== null && _str$toString !== void 0 ? _str$toString : '';
// See https://github.com/lodash/lodash/blob/b185fcee26b2133bd071f4aaca14b455c2ed1008/lodash.js#L4970
input = input.replace(/['\u2019]/, '');
return paramCase(input, {
splitRegexp: [/(?!(?:1ST|2ND|3RD|[4-9]TH)(?![a-z]))([a-z0-9])([A-Z])/g,
// fooBar => foo-bar, 3Bar => 3-bar
/(?!(?:1st|2nd|3rd|[4-9]th)(?![a-z]))([0-9])([a-z])/g,
// Foo3 => foo-3, foo3 => foo-3
/([A-Z])([A-Z][a-z])/g // FOOBar => foo-bar
* Escapes the RegExp special characters.
* @param string Input string.
* @return Regex-escaped string.
function escapeRegExp(string) {
return string.replace(/[\\^$.*+?()[\]{}|]/g, '\\$&');
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/autocomplete/get-default-use-items.js
function filterOptions(search, options = [], maxResults = 10) {
for (let i = 0; i < options.length; i++) {
const option = options[i];
// Merge label into keywords.
if ('string' === typeof option.label) {
keywords = [...keywords, option.label];
const isMatch = keywords.some(keyword => search.test(remove_accents_default()(keyword)));
// Abort early if max reached.
if (filtered.length === maxResults) {
function getDefaultUseItems(autocompleter) {
const [items, setItems] = (0,external_wp_element_namespaceObject.useState)([]);
* We support both synchronous and asynchronous retrieval of completer options
* but internally treat all as async so we maintain a single, consistent code path.
* Because networks can be slow, and the internet is wonderfully unpredictable,
* we don't want two promises updating the state at once. This ensures that only
* the most recent promise will act on `optionsData`. This doesn't use the state
* because `setState` is batched, and so there's no guarantee that setting
* `activePromise` in the state would result in it actually being in `this.state`
* before the promise resolves and we check to see if this is the active promise or not.
(0,external_wp_element_namespaceObject.useLayoutEffect)(() => {
const loadOptions = (0,external_wp_compose_namespaceObject.debounce)(() => {
const promise = Promise.resolve(typeof options === 'function' ? options(filterValue) : options).then(optionsData => {
const keyedOptions = optionsData.map((optionData, optionIndex) => ({
key: `${autocompleter.name}-${optionIndex}`,
label: autocompleter.getOptionLabel(optionData),
keywords: autocompleter.getOptionKeywords ? autocompleter.getOptionKeywords(optionData) : [],
isDisabled: autocompleter.isOptionDisabled ? autocompleter.isOptionDisabled(optionData) : false
// Create a regular expression to filter the options.
const search = new RegExp('(?:\\b|\\s|^)' + escapeRegExp(filterValue), 'i');
setItems(filterOptions(search, keyedOptions));
}, isDebounced ? 250 : 0);
const promise = loadOptions();
;// CONCATENATED MODULE: ./node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
* Provides data to position an inner element of the floating element so that it
* appears centered to the reference element.
* This wraps the core `arrow` middleware to allow React refs as the element.
* @see https://floating-ui.com/docs/arrow
const floating_ui_react_dom_arrow = options => {
return {}.hasOwnProperty.call(value, 'current');
} = typeof options === 'function' ? options(state) : options;
if (element && isRef(element)) {
if (element.current != null) {
return floating_ui_dom_arrow({
element: element.current,
return floating_ui_dom_arrow({
var index = typeof document !== 'undefined' ? external_React_.useLayoutEffect : external_React_.useEffect;
// Fork of `fast-deep-equal` that only does the comparisons we need and compares
function deepEqual(a, b) {
if (typeof a !== typeof b) {
if (typeof a === 'function' && a.toString() === b.toString()) {
if (a && b && typeof a === 'object') {
if (length !== b.length) return false;
for (i = length; i-- !== 0;) {
if (!deepEqual(a[i], b[i])) {
if (length !== Object.keys(b).length) {
for (i = length; i-- !== 0;) {
if (!{}.hasOwnProperty.call(b, keys[i])) {
for (i = length; i-- !== 0;) {
if (key === '_owner' && a.$$typeof) {
if (!deepEqual(a[key], b[key])) {
// biome-ignore lint/suspicious/noSelfCompare: in source
return a !== a && b !== b;
function getDPR(element) {
if (typeof window === 'undefined') {
const win = element.ownerDocument.defaultView || window;
return win.devicePixelRatio || 1;
function floating_ui_react_dom_roundByDPR(element, value) {
const dpr = getDPR(element);
return Math.round(value * dpr) / dpr;
function useLatestRef(value) {
const ref = external_React_.useRef(value);
* Provides data to position a floating element.
* @see https://floating-ui.com/docs/useFloating
function useFloating(options) {
if (options === void 0) {
reference: externalReference,
floating: externalFloating
const [data, setData] = external_React_.useState({
const [latestMiddleware, setLatestMiddleware] = external_React_.useState(middleware);
if (!deepEqual(latestMiddleware, middleware)) {
setLatestMiddleware(middleware);
const [_reference, _setReference] = external_React_.useState(null);
const [_floating, _setFloating] = external_React_.useState(null);
const setReference = external_React_.useCallback(node => {
if (node !== referenceRef.current) {
referenceRef.current = node;
const setFloating = external_React_.useCallback(node => {
if (node !== floatingRef.current) {
floatingRef.current = node;
const referenceEl = externalReference || _reference;
const floatingEl = externalFloating || _floating;
const referenceRef = external_React_.useRef(null);
const floatingRef = external_React_.useRef(null);
const dataRef = external_React_.useRef(data);
const hasWhileElementsMounted = whileElementsMounted != null;
const whileElementsMountedRef = useLatestRef(whileElementsMounted);
const platformRef = useLatestRef(platform);
const update = external_React_.useCallback(() => {
if (!referenceRef.current || !floatingRef.current) {
middleware: latestMiddleware
if (platformRef.current) {
config.platform = platformRef.current;
floating_ui_dom_computePosition(referenceRef.current, floatingRef.current, config).then(data => {
if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {
dataRef.current = fullData;
external_ReactDOM_namespaceObject.flushSync(() => {
}, [latestMiddleware, placement, strategy, platformRef]);
if (open === false && dataRef.current.isPositioned) {
dataRef.current.isPositioned = false;
const isMountedRef = external_React_.useRef(false);
isMountedRef.current = true;
isMountedRef.current = false;
// biome-ignore lint/correctness/useExhaustiveDependencies: `hasWhileElementsMounted` is intentionally included.
if (referenceEl) referenceRef.current = referenceEl;
if (floatingEl) floatingRef.current = floatingEl;
if (referenceEl && floatingEl) {
if (whileElementsMountedRef.current) {
return whileElementsMountedRef.current(referenceEl, floatingEl, update);