Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-inclu.../js/dist
File: components.js
})
[32500] Fix | Delete
})
[32501] Fix | Delete
});
[32502] Fix | Delete
}
[32503] Fix | Delete
function getAngle(centerX, centerY, pointX, pointY) {
[32504] Fix | Delete
const y = pointY - centerY;
[32505] Fix | Delete
const x = pointX - centerX;
[32506] Fix | Delete
const angleInRadians = Math.atan2(y, x);
[32507] Fix | Delete
const angleInDeg = Math.round(angleInRadians * (180 / Math.PI)) + 90;
[32508] Fix | Delete
if (angleInDeg < 0) {
[32509] Fix | Delete
return 360 + angleInDeg;
[32510] Fix | Delete
}
[32511] Fix | Delete
return angleInDeg;
[32512] Fix | Delete
}
[32513] Fix | Delete
/* harmony default export */ const angle_circle = (AngleCircle);
[32514] Fix | Delete
[32515] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/angle-picker-control/index.js
[32516] Fix | Delete
/**
[32517] Fix | Delete
* External dependencies
[32518] Fix | Delete
*/
[32519] Fix | Delete
[32520] Fix | Delete
[32521] Fix | Delete
[32522] Fix | Delete
/**
[32523] Fix | Delete
* WordPress dependencies
[32524] Fix | Delete
*/
[32525] Fix | Delete
[32526] Fix | Delete
[32527] Fix | Delete
[32528] Fix | Delete
/**
[32529] Fix | Delete
* Internal dependencies
[32530] Fix | Delete
*/
[32531] Fix | Delete
[32532] Fix | Delete
[32533] Fix | Delete
[32534] Fix | Delete
[32535] Fix | Delete
[32536] Fix | Delete
[32537] Fix | Delete
[32538] Fix | Delete
function UnforwardedAnglePickerControl(props, ref) {
[32539] Fix | Delete
const {
[32540] Fix | Delete
className,
[32541] Fix | Delete
label = (0,external_wp_i18n_namespaceObject.__)('Angle'),
[32542] Fix | Delete
onChange,
[32543] Fix | Delete
value,
[32544] Fix | Delete
...restProps
[32545] Fix | Delete
} = props;
[32546] Fix | Delete
const handleOnNumberChange = unprocessedValue => {
[32547] Fix | Delete
if (onChange === undefined) {
[32548] Fix | Delete
return;
[32549] Fix | Delete
}
[32550] Fix | Delete
const inputValue = unprocessedValue !== undefined && unprocessedValue !== '' ? parseInt(unprocessedValue, 10) : 0;
[32551] Fix | Delete
onChange(inputValue);
[32552] Fix | Delete
};
[32553] Fix | Delete
const classes = dist_clsx('components-angle-picker-control', className);
[32554] Fix | Delete
const unitText = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(UnitText, {
[32555] Fix | Delete
children: "\xB0"
[32556] Fix | Delete
});
[32557] Fix | Delete
const [prefixedUnitText, suffixedUnitText] = (0,external_wp_i18n_namespaceObject.isRTL)() ? [unitText, null] : [null, unitText];
[32558] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(flex_component, {
[32559] Fix | Delete
...restProps,
[32560] Fix | Delete
ref: ref,
[32561] Fix | Delete
className: classes,
[32562] Fix | Delete
gap: 2,
[32563] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(flex_block_component, {
[32564] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(number_control, {
[32565] Fix | Delete
label: label,
[32566] Fix | Delete
className: "components-angle-picker-control__input-field",
[32567] Fix | Delete
max: 360,
[32568] Fix | Delete
min: 0,
[32569] Fix | Delete
onChange: handleOnNumberChange,
[32570] Fix | Delete
size: "__unstable-large",
[32571] Fix | Delete
step: "1",
[32572] Fix | Delete
value: value,
[32573] Fix | Delete
spinControls: "none",
[32574] Fix | Delete
prefix: prefixedUnitText,
[32575] Fix | Delete
suffix: suffixedUnitText
[32576] Fix | Delete
})
[32577] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(spacer_component, {
[32578] Fix | Delete
marginBottom: "1",
[32579] Fix | Delete
marginTop: "auto",
[32580] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(angle_circle, {
[32581] Fix | Delete
"aria-hidden": "true",
[32582] Fix | Delete
value: value,
[32583] Fix | Delete
onChange: onChange
[32584] Fix | Delete
})
[32585] Fix | Delete
})]
[32586] Fix | Delete
});
[32587] Fix | Delete
}
[32588] Fix | Delete
[32589] Fix | Delete
/**
[32590] Fix | Delete
* `AnglePickerControl` is a React component to render a UI that allows users to
[32591] Fix | Delete
* pick an angle. Users can choose an angle in a visual UI with the mouse by
[32592] Fix | Delete
* dragging an angle indicator inside a circle or by directly inserting the
[32593] Fix | Delete
* desired angle in a text field.
[32594] Fix | Delete
*
[32595] Fix | Delete
* ```jsx
[32596] Fix | Delete
* import { useState } from '@wordpress/element';
[32597] Fix | Delete
* import { AnglePickerControl } from '@wordpress/components';
[32598] Fix | Delete
*
[32599] Fix | Delete
* function Example() {
[32600] Fix | Delete
* const [ angle, setAngle ] = useState( 0 );
[32601] Fix | Delete
* return (
[32602] Fix | Delete
* <AnglePickerControl
[32603] Fix | Delete
* value={ angle }
[32604] Fix | Delete
* onChange={ setAngle }
[32605] Fix | Delete
* </>
[32606] Fix | Delete
* );
[32607] Fix | Delete
* }
[32608] Fix | Delete
* ```
[32609] Fix | Delete
*/
[32610] Fix | Delete
const AnglePickerControl = (0,external_wp_element_namespaceObject.forwardRef)(UnforwardedAnglePickerControl);
[32611] Fix | Delete
/* harmony default export */ const angle_picker_control = (AnglePickerControl);
[32612] Fix | Delete
[32613] Fix | Delete
// EXTERNAL MODULE: ./node_modules/remove-accents/index.js
[32614] Fix | Delete
var remove_accents = __webpack_require__(9681);
[32615] Fix | Delete
var remove_accents_default = /*#__PURE__*/__webpack_require__.n(remove_accents);
[32616] Fix | Delete
;// CONCATENATED MODULE: external ["wp","richText"]
[32617] Fix | Delete
const external_wp_richText_namespaceObject = window["wp"]["richText"];
[32618] Fix | Delete
;// CONCATENATED MODULE: external ["wp","a11y"]
[32619] Fix | Delete
const external_wp_a11y_namespaceObject = window["wp"]["a11y"];
[32620] Fix | Delete
;// CONCATENATED MODULE: external ["wp","keycodes"]
[32621] Fix | Delete
const external_wp_keycodes_namespaceObject = window["wp"]["keycodes"];
[32622] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/utils/strings.js
[32623] Fix | Delete
/**
[32624] Fix | Delete
* External dependencies
[32625] Fix | Delete
*/
[32626] Fix | Delete
[32627] Fix | Delete
[32628] Fix | Delete
[32629] Fix | Delete
/**
[32630] Fix | Delete
* All unicode characters that we consider "dash-like":
[32631] Fix | Delete
* - `\u007e`: ~ (tilde)
[32632] Fix | Delete
* - `\u00ad`: ­ (soft hyphen)
[32633] Fix | Delete
* - `\u2053`: ⁓ (swung dash)
[32634] Fix | Delete
* - `\u207b`: ⁻ (superscript minus)
[32635] Fix | Delete
* - `\u208b`: ₋ (subscript minus)
[32636] Fix | Delete
* - `\u2212`: − (minus sign)
[32637] Fix | Delete
* - `\\p{Pd}`: any other Unicode dash character
[32638] Fix | Delete
*/
[32639] Fix | Delete
const ALL_UNICODE_DASH_CHARACTERS = new RegExp(/[\u007e\u00ad\u2053\u207b\u208b\u2212\p{Pd}]/gu);
[32640] Fix | Delete
const normalizeTextString = value => {
[32641] Fix | Delete
return remove_accents_default()(value).toLocaleLowerCase().replace(ALL_UNICODE_DASH_CHARACTERS, '-');
[32642] Fix | Delete
};
[32643] Fix | Delete
[32644] Fix | Delete
/**
[32645] Fix | Delete
* Converts any string to kebab case.
[32646] Fix | Delete
* Backwards compatible with Lodash's `_.kebabCase()`.
[32647] Fix | Delete
* Backwards compatible with `_wp_to_kebab_case()`.
[32648] Fix | Delete
*
[32649] Fix | Delete
* @see https://lodash.com/docs/4.17.15#kebabCase
[32650] Fix | Delete
* @see https://developer.wordpress.org/reference/functions/_wp_to_kebab_case/
[32651] Fix | Delete
*
[32652] Fix | Delete
* @param str String to convert.
[32653] Fix | Delete
* @return Kebab-cased string
[32654] Fix | Delete
*/
[32655] Fix | Delete
function kebabCase(str) {
[32656] Fix | Delete
var _str$toString;
[32657] Fix | Delete
let input = (_str$toString = str?.toString?.()) !== null && _str$toString !== void 0 ? _str$toString : '';
[32658] Fix | Delete
[32659] Fix | Delete
// See https://github.com/lodash/lodash/blob/b185fcee26b2133bd071f4aaca14b455c2ed1008/lodash.js#L4970
[32660] Fix | Delete
input = input.replace(/['\u2019]/, '');
[32661] Fix | Delete
return paramCase(input, {
[32662] Fix | Delete
splitRegexp: [/(?!(?:1ST|2ND|3RD|[4-9]TH)(?![a-z]))([a-z0-9])([A-Z])/g,
[32663] Fix | Delete
// fooBar => foo-bar, 3Bar => 3-bar
[32664] Fix | Delete
/(?!(?:1st|2nd|3rd|[4-9]th)(?![a-z]))([0-9])([a-z])/g,
[32665] Fix | Delete
// 3bar => 3-bar
[32666] Fix | Delete
/([A-Za-z])([0-9])/g,
[32667] Fix | Delete
// Foo3 => foo-3, foo3 => foo-3
[32668] Fix | Delete
/([A-Z])([A-Z][a-z])/g // FOOBar => foo-bar
[32669] Fix | Delete
]
[32670] Fix | Delete
});
[32671] Fix | Delete
}
[32672] Fix | Delete
[32673] Fix | Delete
/**
[32674] Fix | Delete
* Escapes the RegExp special characters.
[32675] Fix | Delete
*
[32676] Fix | Delete
* @param string Input string.
[32677] Fix | Delete
*
[32678] Fix | Delete
* @return Regex-escaped string.
[32679] Fix | Delete
*/
[32680] Fix | Delete
function escapeRegExp(string) {
[32681] Fix | Delete
return string.replace(/[\\^$.*+?()[\]{}|]/g, '\\$&');
[32682] Fix | Delete
}
[32683] Fix | Delete
[32684] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/autocomplete/get-default-use-items.js
[32685] Fix | Delete
/**
[32686] Fix | Delete
* External dependencies
[32687] Fix | Delete
*/
[32688] Fix | Delete
[32689] Fix | Delete
[32690] Fix | Delete
/**
[32691] Fix | Delete
* WordPress dependencies
[32692] Fix | Delete
*/
[32693] Fix | Delete
[32694] Fix | Delete
[32695] Fix | Delete
[32696] Fix | Delete
/**
[32697] Fix | Delete
* Internal dependencies
[32698] Fix | Delete
*/
[32699] Fix | Delete
[32700] Fix | Delete
function filterOptions(search, options = [], maxResults = 10) {
[32701] Fix | Delete
const filtered = [];
[32702] Fix | Delete
for (let i = 0; i < options.length; i++) {
[32703] Fix | Delete
const option = options[i];
[32704] Fix | Delete
[32705] Fix | Delete
// Merge label into keywords.
[32706] Fix | Delete
let {
[32707] Fix | Delete
keywords = []
[32708] Fix | Delete
} = option;
[32709] Fix | Delete
if ('string' === typeof option.label) {
[32710] Fix | Delete
keywords = [...keywords, option.label];
[32711] Fix | Delete
}
[32712] Fix | Delete
const isMatch = keywords.some(keyword => search.test(remove_accents_default()(keyword)));
[32713] Fix | Delete
if (!isMatch) {
[32714] Fix | Delete
continue;
[32715] Fix | Delete
}
[32716] Fix | Delete
filtered.push(option);
[32717] Fix | Delete
[32718] Fix | Delete
// Abort early if max reached.
[32719] Fix | Delete
if (filtered.length === maxResults) {
[32720] Fix | Delete
break;
[32721] Fix | Delete
}
[32722] Fix | Delete
}
[32723] Fix | Delete
return filtered;
[32724] Fix | Delete
}
[32725] Fix | Delete
function getDefaultUseItems(autocompleter) {
[32726] Fix | Delete
return filterValue => {
[32727] Fix | Delete
const [items, setItems] = (0,external_wp_element_namespaceObject.useState)([]);
[32728] Fix | Delete
/*
[32729] Fix | Delete
* We support both synchronous and asynchronous retrieval of completer options
[32730] Fix | Delete
* but internally treat all as async so we maintain a single, consistent code path.
[32731] Fix | Delete
*
[32732] Fix | Delete
* Because networks can be slow, and the internet is wonderfully unpredictable,
[32733] Fix | Delete
* we don't want two promises updating the state at once. This ensures that only
[32734] Fix | Delete
* the most recent promise will act on `optionsData`. This doesn't use the state
[32735] Fix | Delete
* because `setState` is batched, and so there's no guarantee that setting
[32736] Fix | Delete
* `activePromise` in the state would result in it actually being in `this.state`
[32737] Fix | Delete
* before the promise resolves and we check to see if this is the active promise or not.
[32738] Fix | Delete
*/
[32739] Fix | Delete
(0,external_wp_element_namespaceObject.useLayoutEffect)(() => {
[32740] Fix | Delete
const {
[32741] Fix | Delete
options,
[32742] Fix | Delete
isDebounced
[32743] Fix | Delete
} = autocompleter;
[32744] Fix | Delete
const loadOptions = (0,external_wp_compose_namespaceObject.debounce)(() => {
[32745] Fix | Delete
const promise = Promise.resolve(typeof options === 'function' ? options(filterValue) : options).then(optionsData => {
[32746] Fix | Delete
if (promise.canceled) {
[32747] Fix | Delete
return;
[32748] Fix | Delete
}
[32749] Fix | Delete
const keyedOptions = optionsData.map((optionData, optionIndex) => ({
[32750] Fix | Delete
key: `${autocompleter.name}-${optionIndex}`,
[32751] Fix | Delete
value: optionData,
[32752] Fix | Delete
label: autocompleter.getOptionLabel(optionData),
[32753] Fix | Delete
keywords: autocompleter.getOptionKeywords ? autocompleter.getOptionKeywords(optionData) : [],
[32754] Fix | Delete
isDisabled: autocompleter.isOptionDisabled ? autocompleter.isOptionDisabled(optionData) : false
[32755] Fix | Delete
}));
[32756] Fix | Delete
[32757] Fix | Delete
// Create a regular expression to filter the options.
[32758] Fix | Delete
const search = new RegExp('(?:\\b|\\s|^)' + escapeRegExp(filterValue), 'i');
[32759] Fix | Delete
setItems(filterOptions(search, keyedOptions));
[32760] Fix | Delete
});
[32761] Fix | Delete
return promise;
[32762] Fix | Delete
}, isDebounced ? 250 : 0);
[32763] Fix | Delete
const promise = loadOptions();
[32764] Fix | Delete
return () => {
[32765] Fix | Delete
loadOptions.cancel();
[32766] Fix | Delete
if (promise) {
[32767] Fix | Delete
promise.canceled = true;
[32768] Fix | Delete
}
[32769] Fix | Delete
};
[32770] Fix | Delete
}, [filterValue]);
[32771] Fix | Delete
return [items];
[32772] Fix | Delete
};
[32773] Fix | Delete
}
[32774] Fix | Delete
[32775] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
[32776] Fix | Delete
[32777] Fix | Delete
[32778] Fix | Delete
[32779] Fix | Delete
[32780] Fix | Delete
[32781] Fix | Delete
[32782] Fix | Delete
/**
[32783] Fix | Delete
* Provides data to position an inner element of the floating element so that it
[32784] Fix | Delete
* appears centered to the reference element.
[32785] Fix | Delete
* This wraps the core `arrow` middleware to allow React refs as the element.
[32786] Fix | Delete
* @see https://floating-ui.com/docs/arrow
[32787] Fix | Delete
*/
[32788] Fix | Delete
const floating_ui_react_dom_arrow = options => {
[32789] Fix | Delete
function isRef(value) {
[32790] Fix | Delete
return {}.hasOwnProperty.call(value, 'current');
[32791] Fix | Delete
}
[32792] Fix | Delete
return {
[32793] Fix | Delete
name: 'arrow',
[32794] Fix | Delete
options,
[32795] Fix | Delete
fn(state) {
[32796] Fix | Delete
const {
[32797] Fix | Delete
element,
[32798] Fix | Delete
padding
[32799] Fix | Delete
} = typeof options === 'function' ? options(state) : options;
[32800] Fix | Delete
if (element && isRef(element)) {
[32801] Fix | Delete
if (element.current != null) {
[32802] Fix | Delete
return floating_ui_dom_arrow({
[32803] Fix | Delete
element: element.current,
[32804] Fix | Delete
padding
[32805] Fix | Delete
}).fn(state);
[32806] Fix | Delete
}
[32807] Fix | Delete
return {};
[32808] Fix | Delete
}
[32809] Fix | Delete
if (element) {
[32810] Fix | Delete
return floating_ui_dom_arrow({
[32811] Fix | Delete
element,
[32812] Fix | Delete
padding
[32813] Fix | Delete
}).fn(state);
[32814] Fix | Delete
}
[32815] Fix | Delete
return {};
[32816] Fix | Delete
}
[32817] Fix | Delete
};
[32818] Fix | Delete
};
[32819] Fix | Delete
[32820] Fix | Delete
var index = typeof document !== 'undefined' ? external_React_.useLayoutEffect : external_React_.useEffect;
[32821] Fix | Delete
[32822] Fix | Delete
// Fork of `fast-deep-equal` that only does the comparisons we need and compares
[32823] Fix | Delete
// functions
[32824] Fix | Delete
function deepEqual(a, b) {
[32825] Fix | Delete
if (a === b) {
[32826] Fix | Delete
return true;
[32827] Fix | Delete
}
[32828] Fix | Delete
if (typeof a !== typeof b) {
[32829] Fix | Delete
return false;
[32830] Fix | Delete
}
[32831] Fix | Delete
if (typeof a === 'function' && a.toString() === b.toString()) {
[32832] Fix | Delete
return true;
[32833] Fix | Delete
}
[32834] Fix | Delete
let length;
[32835] Fix | Delete
let i;
[32836] Fix | Delete
let keys;
[32837] Fix | Delete
if (a && b && typeof a === 'object') {
[32838] Fix | Delete
if (Array.isArray(a)) {
[32839] Fix | Delete
length = a.length;
[32840] Fix | Delete
if (length !== b.length) return false;
[32841] Fix | Delete
for (i = length; i-- !== 0;) {
[32842] Fix | Delete
if (!deepEqual(a[i], b[i])) {
[32843] Fix | Delete
return false;
[32844] Fix | Delete
}
[32845] Fix | Delete
}
[32846] Fix | Delete
return true;
[32847] Fix | Delete
}
[32848] Fix | Delete
keys = Object.keys(a);
[32849] Fix | Delete
length = keys.length;
[32850] Fix | Delete
if (length !== Object.keys(b).length) {
[32851] Fix | Delete
return false;
[32852] Fix | Delete
}
[32853] Fix | Delete
for (i = length; i-- !== 0;) {
[32854] Fix | Delete
if (!{}.hasOwnProperty.call(b, keys[i])) {
[32855] Fix | Delete
return false;
[32856] Fix | Delete
}
[32857] Fix | Delete
}
[32858] Fix | Delete
for (i = length; i-- !== 0;) {
[32859] Fix | Delete
const key = keys[i];
[32860] Fix | Delete
if (key === '_owner' && a.$$typeof) {
[32861] Fix | Delete
continue;
[32862] Fix | Delete
}
[32863] Fix | Delete
if (!deepEqual(a[key], b[key])) {
[32864] Fix | Delete
return false;
[32865] Fix | Delete
}
[32866] Fix | Delete
}
[32867] Fix | Delete
return true;
[32868] Fix | Delete
}
[32869] Fix | Delete
[32870] Fix | Delete
// biome-ignore lint/suspicious/noSelfCompare: in source
[32871] Fix | Delete
return a !== a && b !== b;
[32872] Fix | Delete
}
[32873] Fix | Delete
[32874] Fix | Delete
function getDPR(element) {
[32875] Fix | Delete
if (typeof window === 'undefined') {
[32876] Fix | Delete
return 1;
[32877] Fix | Delete
}
[32878] Fix | Delete
const win = element.ownerDocument.defaultView || window;
[32879] Fix | Delete
return win.devicePixelRatio || 1;
[32880] Fix | Delete
}
[32881] Fix | Delete
[32882] Fix | Delete
function floating_ui_react_dom_roundByDPR(element, value) {
[32883] Fix | Delete
const dpr = getDPR(element);
[32884] Fix | Delete
return Math.round(value * dpr) / dpr;
[32885] Fix | Delete
}
[32886] Fix | Delete
[32887] Fix | Delete
function useLatestRef(value) {
[32888] Fix | Delete
const ref = external_React_.useRef(value);
[32889] Fix | Delete
index(() => {
[32890] Fix | Delete
ref.current = value;
[32891] Fix | Delete
});
[32892] Fix | Delete
return ref;
[32893] Fix | Delete
}
[32894] Fix | Delete
[32895] Fix | Delete
/**
[32896] Fix | Delete
* Provides data to position a floating element.
[32897] Fix | Delete
* @see https://floating-ui.com/docs/useFloating
[32898] Fix | Delete
*/
[32899] Fix | Delete
function useFloating(options) {
[32900] Fix | Delete
if (options === void 0) {
[32901] Fix | Delete
options = {};
[32902] Fix | Delete
}
[32903] Fix | Delete
const {
[32904] Fix | Delete
placement = 'bottom',
[32905] Fix | Delete
strategy = 'absolute',
[32906] Fix | Delete
middleware = [],
[32907] Fix | Delete
platform,
[32908] Fix | Delete
elements: {
[32909] Fix | Delete
reference: externalReference,
[32910] Fix | Delete
floating: externalFloating
[32911] Fix | Delete
} = {},
[32912] Fix | Delete
transform = true,
[32913] Fix | Delete
whileElementsMounted,
[32914] Fix | Delete
open
[32915] Fix | Delete
} = options;
[32916] Fix | Delete
const [data, setData] = external_React_.useState({
[32917] Fix | Delete
x: 0,
[32918] Fix | Delete
y: 0,
[32919] Fix | Delete
strategy,
[32920] Fix | Delete
placement,
[32921] Fix | Delete
middlewareData: {},
[32922] Fix | Delete
isPositioned: false
[32923] Fix | Delete
});
[32924] Fix | Delete
const [latestMiddleware, setLatestMiddleware] = external_React_.useState(middleware);
[32925] Fix | Delete
if (!deepEqual(latestMiddleware, middleware)) {
[32926] Fix | Delete
setLatestMiddleware(middleware);
[32927] Fix | Delete
}
[32928] Fix | Delete
const [_reference, _setReference] = external_React_.useState(null);
[32929] Fix | Delete
const [_floating, _setFloating] = external_React_.useState(null);
[32930] Fix | Delete
const setReference = external_React_.useCallback(node => {
[32931] Fix | Delete
if (node !== referenceRef.current) {
[32932] Fix | Delete
referenceRef.current = node;
[32933] Fix | Delete
_setReference(node);
[32934] Fix | Delete
}
[32935] Fix | Delete
}, []);
[32936] Fix | Delete
const setFloating = external_React_.useCallback(node => {
[32937] Fix | Delete
if (node !== floatingRef.current) {
[32938] Fix | Delete
floatingRef.current = node;
[32939] Fix | Delete
_setFloating(node);
[32940] Fix | Delete
}
[32941] Fix | Delete
}, []);
[32942] Fix | Delete
const referenceEl = externalReference || _reference;
[32943] Fix | Delete
const floatingEl = externalFloating || _floating;
[32944] Fix | Delete
const referenceRef = external_React_.useRef(null);
[32945] Fix | Delete
const floatingRef = external_React_.useRef(null);
[32946] Fix | Delete
const dataRef = external_React_.useRef(data);
[32947] Fix | Delete
const hasWhileElementsMounted = whileElementsMounted != null;
[32948] Fix | Delete
const whileElementsMountedRef = useLatestRef(whileElementsMounted);
[32949] Fix | Delete
const platformRef = useLatestRef(platform);
[32950] Fix | Delete
const update = external_React_.useCallback(() => {
[32951] Fix | Delete
if (!referenceRef.current || !floatingRef.current) {
[32952] Fix | Delete
return;
[32953] Fix | Delete
}
[32954] Fix | Delete
const config = {
[32955] Fix | Delete
placement,
[32956] Fix | Delete
strategy,
[32957] Fix | Delete
middleware: latestMiddleware
[32958] Fix | Delete
};
[32959] Fix | Delete
if (platformRef.current) {
[32960] Fix | Delete
config.platform = platformRef.current;
[32961] Fix | Delete
}
[32962] Fix | Delete
floating_ui_dom_computePosition(referenceRef.current, floatingRef.current, config).then(data => {
[32963] Fix | Delete
const fullData = {
[32964] Fix | Delete
...data,
[32965] Fix | Delete
isPositioned: true
[32966] Fix | Delete
};
[32967] Fix | Delete
if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {
[32968] Fix | Delete
dataRef.current = fullData;
[32969] Fix | Delete
external_ReactDOM_namespaceObject.flushSync(() => {
[32970] Fix | Delete
setData(fullData);
[32971] Fix | Delete
});
[32972] Fix | Delete
}
[32973] Fix | Delete
});
[32974] Fix | Delete
}, [latestMiddleware, placement, strategy, platformRef]);
[32975] Fix | Delete
index(() => {
[32976] Fix | Delete
if (open === false && dataRef.current.isPositioned) {
[32977] Fix | Delete
dataRef.current.isPositioned = false;
[32978] Fix | Delete
setData(data => ({
[32979] Fix | Delete
...data,
[32980] Fix | Delete
isPositioned: false
[32981] Fix | Delete
}));
[32982] Fix | Delete
}
[32983] Fix | Delete
}, [open]);
[32984] Fix | Delete
const isMountedRef = external_React_.useRef(false);
[32985] Fix | Delete
index(() => {
[32986] Fix | Delete
isMountedRef.current = true;
[32987] Fix | Delete
return () => {
[32988] Fix | Delete
isMountedRef.current = false;
[32989] Fix | Delete
};
[32990] Fix | Delete
}, []);
[32991] Fix | Delete
[32992] Fix | Delete
// biome-ignore lint/correctness/useExhaustiveDependencies: `hasWhileElementsMounted` is intentionally included.
[32993] Fix | Delete
index(() => {
[32994] Fix | Delete
if (referenceEl) referenceRef.current = referenceEl;
[32995] Fix | Delete
if (floatingEl) floatingRef.current = floatingEl;
[32996] Fix | Delete
if (referenceEl && floatingEl) {
[32997] Fix | Delete
if (whileElementsMountedRef.current) {
[32998] Fix | Delete
return whileElementsMountedRef.current(referenceEl, floatingEl, update);
[32999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function