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
var getTheme = function getTheme(outerTheme, theme) {
[13000] Fix | Delete
if (typeof theme === 'function') {
[13001] Fix | Delete
var mergedTheme = theme(outerTheme);
[13002] Fix | Delete
[13003] Fix | Delete
if (false) {}
[13004] Fix | Delete
[13005] Fix | Delete
return mergedTheme;
[13006] Fix | Delete
}
[13007] Fix | Delete
[13008] Fix | Delete
if (false) {}
[13009] Fix | Delete
[13010] Fix | Delete
return _extends({}, outerTheme, theme);
[13011] Fix | Delete
};
[13012] Fix | Delete
[13013] Fix | Delete
var createCacheWithTheme = /* #__PURE__ */(/* unused pure expression or super */ null && (weakMemoize(function (outerTheme) {
[13014] Fix | Delete
return weakMemoize(function (theme) {
[13015] Fix | Delete
return getTheme(outerTheme, theme);
[13016] Fix | Delete
});
[13017] Fix | Delete
})));
[13018] Fix | Delete
var ThemeProvider = function ThemeProvider(props) {
[13019] Fix | Delete
var theme = useContext(emotion_element_6a883da9_browser_esm_ThemeContext);
[13020] Fix | Delete
[13021] Fix | Delete
if (props.theme !== theme) {
[13022] Fix | Delete
theme = createCacheWithTheme(theme)(props.theme);
[13023] Fix | Delete
}
[13024] Fix | Delete
[13025] Fix | Delete
return /*#__PURE__*/createElement(emotion_element_6a883da9_browser_esm_ThemeContext.Provider, {
[13026] Fix | Delete
value: theme
[13027] Fix | Delete
}, props.children);
[13028] Fix | Delete
};
[13029] Fix | Delete
function withTheme(Component) {
[13030] Fix | Delete
var componentName = Component.displayName || Component.name || 'Component';
[13031] Fix | Delete
[13032] Fix | Delete
var render = function render(props, ref) {
[13033] Fix | Delete
var theme = useContext(emotion_element_6a883da9_browser_esm_ThemeContext);
[13034] Fix | Delete
return /*#__PURE__*/createElement(Component, _extends({
[13035] Fix | Delete
theme: theme,
[13036] Fix | Delete
ref: ref
[13037] Fix | Delete
}, props));
[13038] Fix | Delete
}; // $FlowFixMe
[13039] Fix | Delete
[13040] Fix | Delete
[13041] Fix | Delete
var WithTheme = /*#__PURE__*/forwardRef(render);
[13042] Fix | Delete
WithTheme.displayName = "WithTheme(" + componentName + ")";
[13043] Fix | Delete
return hoistNonReactStatics(WithTheme, Component);
[13044] Fix | Delete
}
[13045] Fix | Delete
[13046] Fix | Delete
var getLastPart = function getLastPart(functionName) {
[13047] Fix | Delete
// The match may be something like 'Object.createEmotionProps' or
[13048] Fix | Delete
// 'Loader.prototype.render'
[13049] Fix | Delete
var parts = functionName.split('.');
[13050] Fix | Delete
return parts[parts.length - 1];
[13051] Fix | Delete
};
[13052] Fix | Delete
[13053] Fix | Delete
var getFunctionNameFromStackTraceLine = function getFunctionNameFromStackTraceLine(line) {
[13054] Fix | Delete
// V8
[13055] Fix | Delete
var match = /^\s+at\s+([A-Za-z0-9$.]+)\s/.exec(line);
[13056] Fix | Delete
if (match) return getLastPart(match[1]); // Safari / Firefox
[13057] Fix | Delete
[13058] Fix | Delete
match = /^([A-Za-z0-9$.]+)@/.exec(line);
[13059] Fix | Delete
if (match) return getLastPart(match[1]);
[13060] Fix | Delete
return undefined;
[13061] Fix | Delete
};
[13062] Fix | Delete
[13063] Fix | Delete
var internalReactFunctionNames = /* #__PURE__ */new Set(['renderWithHooks', 'processChild', 'finishClassComponent', 'renderToString']); // These identifiers come from error stacks, so they have to be valid JS
[13064] Fix | Delete
// identifiers, thus we only need to replace what is a valid character for JS,
[13065] Fix | Delete
// but not for CSS.
[13066] Fix | Delete
[13067] Fix | Delete
var sanitizeIdentifier = function sanitizeIdentifier(identifier) {
[13068] Fix | Delete
return identifier.replace(/\$/g, '-');
[13069] Fix | Delete
};
[13070] Fix | Delete
[13071] Fix | Delete
var getLabelFromStackTrace = function getLabelFromStackTrace(stackTrace) {
[13072] Fix | Delete
if (!stackTrace) return undefined;
[13073] Fix | Delete
var lines = stackTrace.split('\n');
[13074] Fix | Delete
[13075] Fix | Delete
for (var i = 0; i < lines.length; i++) {
[13076] Fix | Delete
var functionName = getFunctionNameFromStackTraceLine(lines[i]); // The first line of V8 stack traces is just "Error"
[13077] Fix | Delete
[13078] Fix | Delete
if (!functionName) continue; // If we reach one of these, we have gone too far and should quit
[13079] Fix | Delete
[13080] Fix | Delete
if (internalReactFunctionNames.has(functionName)) break; // The component name is the first function in the stack that starts with an
[13081] Fix | Delete
// uppercase letter
[13082] Fix | Delete
[13083] Fix | Delete
if (/^[A-Z]/.test(functionName)) return sanitizeIdentifier(functionName);
[13084] Fix | Delete
}
[13085] Fix | Delete
[13086] Fix | Delete
return undefined;
[13087] Fix | Delete
};
[13088] Fix | Delete
[13089] Fix | Delete
var typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';
[13090] Fix | Delete
var labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';
[13091] Fix | Delete
var emotion_element_6a883da9_browser_esm_createEmotionProps = function createEmotionProps(type, props) {
[13092] Fix | Delete
if (false) {}
[13093] Fix | Delete
[13094] Fix | Delete
var newProps = {};
[13095] Fix | Delete
[13096] Fix | Delete
for (var key in props) {
[13097] Fix | Delete
if (emotion_element_6a883da9_browser_esm_hasOwnProperty.call(props, key)) {
[13098] Fix | Delete
newProps[key] = props[key];
[13099] Fix | Delete
}
[13100] Fix | Delete
}
[13101] Fix | Delete
[13102] Fix | Delete
newProps[typePropName] = type; // For performance, only call getLabelFromStackTrace in development and when
[13103] Fix | Delete
// the label hasn't already been computed
[13104] Fix | Delete
[13105] Fix | Delete
if (false) { var label; }
[13106] Fix | Delete
[13107] Fix | Delete
return newProps;
[13108] Fix | Delete
};
[13109] Fix | Delete
[13110] Fix | Delete
var Insertion = function Insertion(_ref) {
[13111] Fix | Delete
var cache = _ref.cache,
[13112] Fix | Delete
serialized = _ref.serialized,
[13113] Fix | Delete
isStringTag = _ref.isStringTag;
[13114] Fix | Delete
registerStyles(cache, serialized, isStringTag);
[13115] Fix | Delete
var rules = useInsertionEffectAlwaysWithSyncFallback(function () {
[13116] Fix | Delete
return insertStyles(cache, serialized, isStringTag);
[13117] Fix | Delete
});
[13118] Fix | Delete
[13119] Fix | Delete
return null;
[13120] Fix | Delete
};
[13121] Fix | Delete
[13122] Fix | Delete
var emotion_element_6a883da9_browser_esm_Emotion = /* #__PURE__ */(/* unused pure expression or super */ null && (emotion_element_6a883da9_browser_esm_withEmotionCache(function (props, cache, ref) {
[13123] Fix | Delete
var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works
[13124] Fix | Delete
// not passing the registered cache to serializeStyles because it would
[13125] Fix | Delete
// make certain babel optimisations not possible
[13126] Fix | Delete
[13127] Fix | Delete
if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {
[13128] Fix | Delete
cssProp = cache.registered[cssProp];
[13129] Fix | Delete
}
[13130] Fix | Delete
[13131] Fix | Delete
var WrappedComponent = props[typePropName];
[13132] Fix | Delete
var registeredStyles = [cssProp];
[13133] Fix | Delete
var className = '';
[13134] Fix | Delete
[13135] Fix | Delete
if (typeof props.className === 'string') {
[13136] Fix | Delete
className = getRegisteredStyles(cache.registered, registeredStyles, props.className);
[13137] Fix | Delete
} else if (props.className != null) {
[13138] Fix | Delete
className = props.className + " ";
[13139] Fix | Delete
}
[13140] Fix | Delete
[13141] Fix | Delete
var serialized = serializeStyles(registeredStyles, undefined, useContext(emotion_element_6a883da9_browser_esm_ThemeContext));
[13142] Fix | Delete
[13143] Fix | Delete
if (false) { var labelFromStack; }
[13144] Fix | Delete
[13145] Fix | Delete
className += cache.key + "-" + serialized.name;
[13146] Fix | Delete
var newProps = {};
[13147] Fix | Delete
[13148] Fix | Delete
for (var key in props) {
[13149] Fix | Delete
if (emotion_element_6a883da9_browser_esm_hasOwnProperty.call(props, key) && key !== 'css' && key !== typePropName && ( true || 0)) {
[13150] Fix | Delete
newProps[key] = props[key];
[13151] Fix | Delete
}
[13152] Fix | Delete
}
[13153] Fix | Delete
[13154] Fix | Delete
newProps.ref = ref;
[13155] Fix | Delete
newProps.className = className;
[13156] Fix | Delete
return /*#__PURE__*/createElement(Fragment, null, /*#__PURE__*/createElement(Insertion, {
[13157] Fix | Delete
cache: cache,
[13158] Fix | Delete
serialized: serialized,
[13159] Fix | Delete
isStringTag: typeof WrappedComponent === 'string'
[13160] Fix | Delete
}), /*#__PURE__*/createElement(WrappedComponent, newProps));
[13161] Fix | Delete
})));
[13162] Fix | Delete
[13163] Fix | Delete
if (false) {}
[13164] Fix | Delete
[13165] Fix | Delete
[13166] Fix | Delete
[13167] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js
[13168] Fix | Delete
var isBrowser = "object" !== 'undefined';
[13169] Fix | Delete
function emotion_utils_browser_esm_getRegisteredStyles(registered, registeredStyles, classNames) {
[13170] Fix | Delete
var rawClassName = '';
[13171] Fix | Delete
classNames.split(' ').forEach(function (className) {
[13172] Fix | Delete
if (registered[className] !== undefined) {
[13173] Fix | Delete
registeredStyles.push(registered[className] + ";");
[13174] Fix | Delete
} else {
[13175] Fix | Delete
rawClassName += className + " ";
[13176] Fix | Delete
}
[13177] Fix | Delete
});
[13178] Fix | Delete
return rawClassName;
[13179] Fix | Delete
}
[13180] Fix | Delete
var emotion_utils_browser_esm_registerStyles = function registerStyles(cache, serialized, isStringTag) {
[13181] Fix | Delete
var className = cache.key + "-" + serialized.name;
[13182] Fix | Delete
[13183] Fix | Delete
if ( // we only need to add the styles to the registered cache if the
[13184] Fix | Delete
// class name could be used further down
[13185] Fix | Delete
// the tree but if it's a string tag, we know it won't
[13186] Fix | Delete
// so we don't have to add it to registered cache.
[13187] Fix | Delete
// this improves memory usage since we can avoid storing the whole style string
[13188] Fix | Delete
(isStringTag === false || // we need to always store it if we're in compat mode and
[13189] Fix | Delete
// in node since emotion-server relies on whether a style is in
[13190] Fix | Delete
// the registered cache to know whether a style is global or not
[13191] Fix | Delete
// also, note that this check will be dead code eliminated in the browser
[13192] Fix | Delete
isBrowser === false ) && cache.registered[className] === undefined) {
[13193] Fix | Delete
cache.registered[className] = serialized.styles;
[13194] Fix | Delete
}
[13195] Fix | Delete
};
[13196] Fix | Delete
var emotion_utils_browser_esm_insertStyles = function insertStyles(cache, serialized, isStringTag) {
[13197] Fix | Delete
emotion_utils_browser_esm_registerStyles(cache, serialized, isStringTag);
[13198] Fix | Delete
var className = cache.key + "-" + serialized.name;
[13199] Fix | Delete
[13200] Fix | Delete
if (cache.inserted[serialized.name] === undefined) {
[13201] Fix | Delete
var current = serialized;
[13202] Fix | Delete
[13203] Fix | Delete
do {
[13204] Fix | Delete
var maybeStyles = cache.insert(serialized === current ? "." + className : '', current, cache.sheet, true);
[13205] Fix | Delete
[13206] Fix | Delete
current = current.next;
[13207] Fix | Delete
} while (current !== undefined);
[13208] Fix | Delete
}
[13209] Fix | Delete
};
[13210] Fix | Delete
[13211] Fix | Delete
[13212] Fix | Delete
[13213] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@emotion/css/create-instance/dist/emotion-css-create-instance.esm.js
[13214] Fix | Delete
[13215] Fix | Delete
[13216] Fix | Delete
[13217] Fix | Delete
[13218] Fix | Delete
function insertWithoutScoping(cache, serialized) {
[13219] Fix | Delete
if (cache.inserted[serialized.name] === undefined) {
[13220] Fix | Delete
return cache.insert('', serialized, cache.sheet, true);
[13221] Fix | Delete
}
[13222] Fix | Delete
}
[13223] Fix | Delete
[13224] Fix | Delete
function merge(registered, css, className) {
[13225] Fix | Delete
var registeredStyles = [];
[13226] Fix | Delete
var rawClassName = emotion_utils_browser_esm_getRegisteredStyles(registered, registeredStyles, className);
[13227] Fix | Delete
[13228] Fix | Delete
if (registeredStyles.length < 2) {
[13229] Fix | Delete
return className;
[13230] Fix | Delete
}
[13231] Fix | Delete
[13232] Fix | Delete
return rawClassName + css(registeredStyles);
[13233] Fix | Delete
}
[13234] Fix | Delete
[13235] Fix | Delete
var createEmotion = function createEmotion(options) {
[13236] Fix | Delete
var cache = emotion_cache_browser_esm(options); // $FlowFixMe
[13237] Fix | Delete
[13238] Fix | Delete
cache.sheet.speedy = function (value) {
[13239] Fix | Delete
if (false) {}
[13240] Fix | Delete
[13241] Fix | Delete
this.isSpeedy = value;
[13242] Fix | Delete
};
[13243] Fix | Delete
[13244] Fix | Delete
cache.compat = true;
[13245] Fix | Delete
[13246] Fix | Delete
var css = function css() {
[13247] Fix | Delete
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
[13248] Fix | Delete
args[_key] = arguments[_key];
[13249] Fix | Delete
}
[13250] Fix | Delete
[13251] Fix | Delete
var serialized = emotion_serialize_browser_esm_serializeStyles(args, cache.registered, undefined);
[13252] Fix | Delete
emotion_utils_browser_esm_insertStyles(cache, serialized, false);
[13253] Fix | Delete
return cache.key + "-" + serialized.name;
[13254] Fix | Delete
};
[13255] Fix | Delete
[13256] Fix | Delete
var keyframes = function keyframes() {
[13257] Fix | Delete
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
[13258] Fix | Delete
args[_key2] = arguments[_key2];
[13259] Fix | Delete
}
[13260] Fix | Delete
[13261] Fix | Delete
var serialized = emotion_serialize_browser_esm_serializeStyles(args, cache.registered);
[13262] Fix | Delete
var animation = "animation-" + serialized.name;
[13263] Fix | Delete
insertWithoutScoping(cache, {
[13264] Fix | Delete
name: serialized.name,
[13265] Fix | Delete
styles: "@keyframes " + animation + "{" + serialized.styles + "}"
[13266] Fix | Delete
});
[13267] Fix | Delete
return animation;
[13268] Fix | Delete
};
[13269] Fix | Delete
[13270] Fix | Delete
var injectGlobal = function injectGlobal() {
[13271] Fix | Delete
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
[13272] Fix | Delete
args[_key3] = arguments[_key3];
[13273] Fix | Delete
}
[13274] Fix | Delete
[13275] Fix | Delete
var serialized = emotion_serialize_browser_esm_serializeStyles(args, cache.registered);
[13276] Fix | Delete
insertWithoutScoping(cache, serialized);
[13277] Fix | Delete
};
[13278] Fix | Delete
[13279] Fix | Delete
var cx = function cx() {
[13280] Fix | Delete
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
[13281] Fix | Delete
args[_key4] = arguments[_key4];
[13282] Fix | Delete
}
[13283] Fix | Delete
[13284] Fix | Delete
return merge(cache.registered, css, classnames(args));
[13285] Fix | Delete
};
[13286] Fix | Delete
[13287] Fix | Delete
return {
[13288] Fix | Delete
css: css,
[13289] Fix | Delete
cx: cx,
[13290] Fix | Delete
injectGlobal: injectGlobal,
[13291] Fix | Delete
keyframes: keyframes,
[13292] Fix | Delete
hydrate: function hydrate(ids) {
[13293] Fix | Delete
ids.forEach(function (key) {
[13294] Fix | Delete
cache.inserted[key] = true;
[13295] Fix | Delete
});
[13296] Fix | Delete
},
[13297] Fix | Delete
flush: function flush() {
[13298] Fix | Delete
cache.registered = {};
[13299] Fix | Delete
cache.inserted = {};
[13300] Fix | Delete
cache.sheet.flush();
[13301] Fix | Delete
},
[13302] Fix | Delete
// $FlowFixMe
[13303] Fix | Delete
sheet: cache.sheet,
[13304] Fix | Delete
cache: cache,
[13305] Fix | Delete
getRegisteredStyles: emotion_utils_browser_esm_getRegisteredStyles.bind(null, cache.registered),
[13306] Fix | Delete
merge: merge.bind(null, cache.registered, css)
[13307] Fix | Delete
};
[13308] Fix | Delete
};
[13309] Fix | Delete
[13310] Fix | Delete
var classnames = function classnames(args) {
[13311] Fix | Delete
var cls = '';
[13312] Fix | Delete
[13313] Fix | Delete
for (var i = 0; i < args.length; i++) {
[13314] Fix | Delete
var arg = args[i];
[13315] Fix | Delete
if (arg == null) continue;
[13316] Fix | Delete
var toAdd = void 0;
[13317] Fix | Delete
[13318] Fix | Delete
switch (typeof arg) {
[13319] Fix | Delete
case 'boolean':
[13320] Fix | Delete
break;
[13321] Fix | Delete
[13322] Fix | Delete
case 'object':
[13323] Fix | Delete
{
[13324] Fix | Delete
if (Array.isArray(arg)) {
[13325] Fix | Delete
toAdd = classnames(arg);
[13326] Fix | Delete
} else {
[13327] Fix | Delete
toAdd = '';
[13328] Fix | Delete
[13329] Fix | Delete
for (var k in arg) {
[13330] Fix | Delete
if (arg[k] && k) {
[13331] Fix | Delete
toAdd && (toAdd += ' ');
[13332] Fix | Delete
toAdd += k;
[13333] Fix | Delete
}
[13334] Fix | Delete
}
[13335] Fix | Delete
}
[13336] Fix | Delete
[13337] Fix | Delete
break;
[13338] Fix | Delete
}
[13339] Fix | Delete
[13340] Fix | Delete
default:
[13341] Fix | Delete
{
[13342] Fix | Delete
toAdd = arg;
[13343] Fix | Delete
}
[13344] Fix | Delete
}
[13345] Fix | Delete
[13346] Fix | Delete
if (toAdd) {
[13347] Fix | Delete
cls && (cls += ' ');
[13348] Fix | Delete
cls += toAdd;
[13349] Fix | Delete
}
[13350] Fix | Delete
}
[13351] Fix | Delete
[13352] Fix | Delete
return cls;
[13353] Fix | Delete
};
[13354] Fix | Delete
[13355] Fix | Delete
/* harmony default export */ const emotion_css_create_instance_esm = (createEmotion);
[13356] Fix | Delete
[13357] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@emotion/css/dist/emotion-css.esm.js
[13358] Fix | Delete
[13359] Fix | Delete
[13360] Fix | Delete
[13361] Fix | Delete
[13362] Fix | Delete
[13363] Fix | Delete
var _createEmotion = emotion_css_create_instance_esm({
[13364] Fix | Delete
key: 'css'
[13365] Fix | Delete
}),
[13366] Fix | Delete
flush = _createEmotion.flush,
[13367] Fix | Delete
hydrate = _createEmotion.hydrate,
[13368] Fix | Delete
emotion_css_esm_cx = _createEmotion.cx,
[13369] Fix | Delete
emotion_css_esm_merge = _createEmotion.merge,
[13370] Fix | Delete
emotion_css_esm_getRegisteredStyles = _createEmotion.getRegisteredStyles,
[13371] Fix | Delete
injectGlobal = _createEmotion.injectGlobal,
[13372] Fix | Delete
keyframes = _createEmotion.keyframes,
[13373] Fix | Delete
css = _createEmotion.css,
[13374] Fix | Delete
sheet = _createEmotion.sheet,
[13375] Fix | Delete
cache = _createEmotion.cache;
[13376] Fix | Delete
[13377] Fix | Delete
[13378] Fix | Delete
[13379] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/utils/hooks/use-cx.js
[13380] Fix | Delete
/**
[13381] Fix | Delete
* External dependencies
[13382] Fix | Delete
*/
[13383] Fix | Delete
[13384] Fix | Delete
[13385] Fix | Delete
// eslint-disable-next-line no-restricted-imports
[13386] Fix | Delete
[13387] Fix | Delete
// eslint-disable-next-line no-restricted-imports
[13388] Fix | Delete
[13389] Fix | Delete
[13390] Fix | Delete
/**
[13391] Fix | Delete
* WordPress dependencies
[13392] Fix | Delete
*/
[13393] Fix | Delete
[13394] Fix | Delete
const isSerializedStyles = o => typeof o !== 'undefined' && o !== null && ['name', 'styles'].every(p => typeof o[p] !== 'undefined');
[13395] Fix | Delete
[13396] Fix | Delete
/**
[13397] Fix | Delete
* Retrieve a `cx` function that knows how to handle `SerializedStyles`
[13398] Fix | Delete
* returned by the `@emotion/react` `css` function in addition to what
[13399] Fix | Delete
* `cx` normally knows how to handle. It also hooks into the Emotion
[13400] Fix | Delete
* Cache, allowing `css` calls to work inside iframes.
[13401] Fix | Delete
*
[13402] Fix | Delete
* ```jsx
[13403] Fix | Delete
* import { css } from '@emotion/react';
[13404] Fix | Delete
*
[13405] Fix | Delete
* const styles = css`
[13406] Fix | Delete
* color: red
[13407] Fix | Delete
* `;
[13408] Fix | Delete
*
[13409] Fix | Delete
* function RedText( { className, ...props } ) {
[13410] Fix | Delete
* const cx = useCx();
[13411] Fix | Delete
*
[13412] Fix | Delete
* const classes = cx(styles, className);
[13413] Fix | Delete
*
[13414] Fix | Delete
* return <span className={classes} {...props} />;
[13415] Fix | Delete
* }
[13416] Fix | Delete
* ```
[13417] Fix | Delete
*/
[13418] Fix | Delete
const useCx = () => {
[13419] Fix | Delete
const cache = __unsafe_useEmotionCache();
[13420] Fix | Delete
const cx = (0,external_wp_element_namespaceObject.useCallback)((...classNames) => {
[13421] Fix | Delete
if (cache === null) {
[13422] Fix | Delete
throw new Error('The `useCx` hook should be only used within a valid Emotion Cache Context');
[13423] Fix | Delete
}
[13424] Fix | Delete
return emotion_css_esm_cx(...classNames.map(arg => {
[13425] Fix | Delete
if (isSerializedStyles(arg)) {
[13426] Fix | Delete
emotion_utils_browser_esm_insertStyles(cache, arg, false);
[13427] Fix | Delete
return `${cache.key}-${arg.name}`;
[13428] Fix | Delete
}
[13429] Fix | Delete
return arg;
[13430] Fix | Delete
}));
[13431] Fix | Delete
}, [cache]);
[13432] Fix | Delete
return cx;
[13433] Fix | Delete
};
[13434] Fix | Delete
[13435] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/context/use-context-system.js
[13436] Fix | Delete
/**
[13437] Fix | Delete
* WordPress dependencies
[13438] Fix | Delete
*/
[13439] Fix | Delete
[13440] Fix | Delete
[13441] Fix | Delete
/**
[13442] Fix | Delete
* Internal dependencies
[13443] Fix | Delete
*/
[13444] Fix | Delete
[13445] Fix | Delete
[13446] Fix | Delete
[13447] Fix | Delete
[13448] Fix | Delete
[13449] Fix | Delete
/**
[13450] Fix | Delete
* @template TProps
[13451] Fix | Delete
* @typedef {TProps & { className: string }} ConnectedProps
[13452] Fix | Delete
*/
[13453] Fix | Delete
[13454] Fix | Delete
/**
[13455] Fix | Delete
* Custom hook that derives registered props from the Context system.
[13456] Fix | Delete
* These derived props are then consolidated with incoming component props.
[13457] Fix | Delete
*
[13458] Fix | Delete
* @template {{ className?: string }} P
[13459] Fix | Delete
* @param {P} props Incoming props from the component.
[13460] Fix | Delete
* @param {string} namespace The namespace to register and to derive context props from.
[13461] Fix | Delete
* @return {ConnectedProps<P>} The connected props.
[13462] Fix | Delete
*/
[13463] Fix | Delete
function useContextSystem(props, namespace) {
[13464] Fix | Delete
const contextSystemProps = useComponentsContext();
[13465] Fix | Delete
if (typeof namespace === 'undefined') {
[13466] Fix | Delete
true ? external_wp_warning_default()('useContextSystem: Please provide a namespace') : 0;
[13467] Fix | Delete
}
[13468] Fix | Delete
const contextProps = contextSystemProps?.[namespace] || {};
[13469] Fix | Delete
[13470] Fix | Delete
/* eslint-disable jsdoc/no-undefined-types */
[13471] Fix | Delete
/** @type {ConnectedProps<P>} */
[13472] Fix | Delete
// @ts-ignore We fill in the missing properties below
[13473] Fix | Delete
const finalComponentProps = {
[13474] Fix | Delete
...getConnectedNamespace(),
[13475] Fix | Delete
...getNamespace(namespace)
[13476] Fix | Delete
};
[13477] Fix | Delete
/* eslint-enable jsdoc/no-undefined-types */
[13478] Fix | Delete
[13479] Fix | Delete
const {
[13480] Fix | Delete
_overrides: overrideProps,
[13481] Fix | Delete
...otherContextProps
[13482] Fix | Delete
} = contextProps;
[13483] Fix | Delete
const initialMergedProps = Object.entries(otherContextProps).length ? Object.assign({}, otherContextProps, props) : props;
[13484] Fix | Delete
const cx = useCx();
[13485] Fix | Delete
const classes = cx(getStyledClassNameFromKey(namespace), props.className);
[13486] Fix | Delete
[13487] Fix | Delete
// Provides the ability to customize the render of the component.
[13488] Fix | Delete
const rendered = typeof initialMergedProps.renderChildren === 'function' ? initialMergedProps.renderChildren(initialMergedProps) : initialMergedProps.children;
[13489] Fix | Delete
for (const key in initialMergedProps) {
[13490] Fix | Delete
// @ts-ignore filling in missing props
[13491] Fix | Delete
finalComponentProps[key] = initialMergedProps[key];
[13492] Fix | Delete
}
[13493] Fix | Delete
for (const key in overrideProps) {
[13494] Fix | Delete
// @ts-ignore filling in missing props
[13495] Fix | Delete
finalComponentProps[key] = overrideProps[key];
[13496] Fix | Delete
}
[13497] Fix | Delete
[13498] Fix | Delete
// Setting an `undefined` explicitly can cause unintended overwrites
[13499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function