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
/home/sportsfe.../httpdocs/clone/wp-inclu.../js/dist
File: private-apis.js
/******/ (() => { // webpackBootstrap
[0] Fix | Delete
/******/ "use strict";
[1] Fix | Delete
/******/ // The require scope
[2] Fix | Delete
/******/ var __webpack_require__ = {};
[3] Fix | Delete
/******/
[4] Fix | Delete
/************************************************************************/
[5] Fix | Delete
/******/ /* webpack/runtime/define property getters */
[6] Fix | Delete
/******/ (() => {
[7] Fix | Delete
/******/ // define getter functions for harmony exports
[8] Fix | Delete
/******/ __webpack_require__.d = (exports, definition) => {
[9] Fix | Delete
/******/ for(var key in definition) {
[10] Fix | Delete
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
[11] Fix | Delete
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
[12] Fix | Delete
/******/ }
[13] Fix | Delete
/******/ }
[14] Fix | Delete
/******/ };
[15] Fix | Delete
/******/ })();
[16] Fix | Delete
/******/
[17] Fix | Delete
/******/ /* webpack/runtime/hasOwnProperty shorthand */
[18] Fix | Delete
/******/ (() => {
[19] Fix | Delete
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
[20] Fix | Delete
/******/ })();
[21] Fix | Delete
/******/
[22] Fix | Delete
/******/ /* webpack/runtime/make namespace object */
[23] Fix | Delete
/******/ (() => {
[24] Fix | Delete
/******/ // define __esModule on exports
[25] Fix | Delete
/******/ __webpack_require__.r = (exports) => {
[26] Fix | Delete
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
[27] Fix | Delete
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
[28] Fix | Delete
/******/ }
[29] Fix | Delete
/******/ Object.defineProperty(exports, '__esModule', { value: true });
[30] Fix | Delete
/******/ };
[31] Fix | Delete
/******/ })();
[32] Fix | Delete
/******/
[33] Fix | Delete
/************************************************************************/
[34] Fix | Delete
var __webpack_exports__ = {};
[35] Fix | Delete
// ESM COMPAT FLAG
[36] Fix | Delete
__webpack_require__.r(__webpack_exports__);
[37] Fix | Delete
[38] Fix | Delete
// EXPORTS
[39] Fix | Delete
__webpack_require__.d(__webpack_exports__, {
[40] Fix | Delete
__dangerousOptInToUnstableAPIsOnlyForCoreModules: () => (/* reexport */ __dangerousOptInToUnstableAPIsOnlyForCoreModules)
[41] Fix | Delete
});
[42] Fix | Delete
[43] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/private-apis/build-module/implementation.js
[44] Fix | Delete
/**
[45] Fix | Delete
* wordpress/private-apis – the utilities to enable private cross-package
[46] Fix | Delete
* exports of private APIs.
[47] Fix | Delete
*
[48] Fix | Delete
* This "implementation.js" file is needed for the sake of the unit tests. It
[49] Fix | Delete
* exports more than the public API of the package to aid in testing.
[50] Fix | Delete
*/
[51] Fix | Delete
[52] Fix | Delete
/**
[53] Fix | Delete
* The list of core modules allowed to opt-in to the private APIs.
[54] Fix | Delete
*/
[55] Fix | Delete
const CORE_MODULES_USING_PRIVATE_APIS = ['@wordpress/block-directory', '@wordpress/block-editor', '@wordpress/block-library', '@wordpress/blocks', '@wordpress/commands', '@wordpress/components', '@wordpress/core-commands', '@wordpress/core-data', '@wordpress/customize-widgets', '@wordpress/data', '@wordpress/edit-post', '@wordpress/edit-site', '@wordpress/edit-widgets', '@wordpress/editor', '@wordpress/format-library', '@wordpress/interface', '@wordpress/patterns', '@wordpress/preferences', '@wordpress/reusable-blocks', '@wordpress/router', '@wordpress/dataviews'];
[56] Fix | Delete
[57] Fix | Delete
/**
[58] Fix | Delete
* A list of core modules that already opted-in to
[59] Fix | Delete
* the privateApis package.
[60] Fix | Delete
*
[61] Fix | Delete
* @type {string[]}
[62] Fix | Delete
*/
[63] Fix | Delete
const registeredPrivateApis = [];
[64] Fix | Delete
[65] Fix | Delete
/*
[66] Fix | Delete
* Warning for theme and plugin developers.
[67] Fix | Delete
*
[68] Fix | Delete
* The use of private developer APIs is intended for use by WordPress Core
[69] Fix | Delete
* and the Gutenberg plugin exclusively.
[70] Fix | Delete
*
[71] Fix | Delete
* Dangerously opting in to using these APIs is NOT RECOMMENDED. Furthermore,
[72] Fix | Delete
* the WordPress Core philosophy to strive to maintain backward compatibility
[73] Fix | Delete
* for third-party developers DOES NOT APPLY to private APIs.
[74] Fix | Delete
*
[75] Fix | Delete
* THE CONSENT STRING FOR OPTING IN TO THESE APIS MAY CHANGE AT ANY TIME AND
[76] Fix | Delete
* WITHOUT NOTICE. THIS CHANGE WILL BREAK EXISTING THIRD-PARTY CODE. SUCH A
[77] Fix | Delete
* CHANGE MAY OCCUR IN EITHER A MAJOR OR MINOR RELEASE.
[78] Fix | Delete
*/
[79] Fix | Delete
const requiredConsent = 'I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.';
[80] Fix | Delete
[81] Fix | Delete
/** @type {boolean} */
[82] Fix | Delete
let allowReRegistration;
[83] Fix | Delete
// The safety measure is meant for WordPress core where IS_WORDPRESS_CORE
[84] Fix | Delete
// is set to true.
[85] Fix | Delete
// For the general use-case, the re-registration should be allowed by default
[86] Fix | Delete
// Let's default to true, then. Try/catch will fall back to "true" even if the
[87] Fix | Delete
// environment variable is not explicitly defined.
[88] Fix | Delete
try {
[89] Fix | Delete
allowReRegistration = true ? false : 0;
[90] Fix | Delete
} catch (error) {
[91] Fix | Delete
allowReRegistration = true;
[92] Fix | Delete
}
[93] Fix | Delete
[94] Fix | Delete
/**
[95] Fix | Delete
* Called by a @wordpress package wishing to opt-in to accessing or exposing
[96] Fix | Delete
* private private APIs.
[97] Fix | Delete
*
[98] Fix | Delete
* @param {string} consent The consent string.
[99] Fix | Delete
* @param {string} moduleName The name of the module that is opting in.
[100] Fix | Delete
* @return {{lock: typeof lock, unlock: typeof unlock}} An object containing the lock and unlock functions.
[101] Fix | Delete
*/
[102] Fix | Delete
const __dangerousOptInToUnstableAPIsOnlyForCoreModules = (consent, moduleName) => {
[103] Fix | Delete
if (!CORE_MODULES_USING_PRIVATE_APIS.includes(moduleName)) {
[104] Fix | Delete
throw new Error(`You tried to opt-in to unstable APIs as module "${moduleName}". ` + 'This feature is only for JavaScript modules shipped with WordPress core. ' + 'Please do not use it in plugins and themes as the unstable APIs will be removed ' + 'without a warning. If you ignore this error and depend on unstable features, ' + 'your product will inevitably break on one of the next WordPress releases.');
[105] Fix | Delete
}
[106] Fix | Delete
if (!allowReRegistration && registeredPrivateApis.includes(moduleName)) {
[107] Fix | Delete
// This check doesn't play well with Story Books / Hot Module Reloading
[108] Fix | Delete
// and isn't included in the Gutenberg plugin. It only matters in the
[109] Fix | Delete
// WordPress core release.
[110] Fix | Delete
throw new Error(`You tried to opt-in to unstable APIs as module "${moduleName}" which is already registered. ` + 'This feature is only for JavaScript modules shipped with WordPress core. ' + 'Please do not use it in plugins and themes as the unstable APIs will be removed ' + 'without a warning. If you ignore this error and depend on unstable features, ' + 'your product will inevitably break on one of the next WordPress releases.');
[111] Fix | Delete
}
[112] Fix | Delete
if (consent !== requiredConsent) {
[113] Fix | Delete
throw new Error(`You tried to opt-in to unstable APIs without confirming you know the consequences. ` + 'This feature is only for JavaScript modules shipped with WordPress core. ' + 'Please do not use it in plugins and themes as the unstable APIs will removed ' + 'without a warning. If you ignore this error and depend on unstable features, ' + 'your product will inevitably break on the next WordPress release.');
[114] Fix | Delete
}
[115] Fix | Delete
registeredPrivateApis.push(moduleName);
[116] Fix | Delete
return {
[117] Fix | Delete
lock,
[118] Fix | Delete
unlock
[119] Fix | Delete
};
[120] Fix | Delete
};
[121] Fix | Delete
[122] Fix | Delete
/**
[123] Fix | Delete
* Binds private data to an object.
[124] Fix | Delete
* It does not alter the passed object in any way, only
[125] Fix | Delete
* registers it in an internal map of private data.
[126] Fix | Delete
*
[127] Fix | Delete
* The private data can't be accessed by any other means
[128] Fix | Delete
* than the `unlock` function.
[129] Fix | Delete
*
[130] Fix | Delete
* @example
[131] Fix | Delete
* ```js
[132] Fix | Delete
* const object = {};
[133] Fix | Delete
* const privateData = { a: 1 };
[134] Fix | Delete
* lock( object, privateData );
[135] Fix | Delete
*
[136] Fix | Delete
* object
[137] Fix | Delete
* // {}
[138] Fix | Delete
*
[139] Fix | Delete
* unlock( object );
[140] Fix | Delete
* // { a: 1 }
[141] Fix | Delete
* ```
[142] Fix | Delete
*
[143] Fix | Delete
* @param {any} object The object to bind the private data to.
[144] Fix | Delete
* @param {any} privateData The private data to bind to the object.
[145] Fix | Delete
*/
[146] Fix | Delete
function lock(object, privateData) {
[147] Fix | Delete
if (!object) {
[148] Fix | Delete
throw new Error('Cannot lock an undefined object.');
[149] Fix | Delete
}
[150] Fix | Delete
if (!(__private in object)) {
[151] Fix | Delete
object[__private] = {};
[152] Fix | Delete
}
[153] Fix | Delete
lockedData.set(object[__private], privateData);
[154] Fix | Delete
}
[155] Fix | Delete
[156] Fix | Delete
/**
[157] Fix | Delete
* Unlocks the private data bound to an object.
[158] Fix | Delete
*
[159] Fix | Delete
* It does not alter the passed object in any way, only
[160] Fix | Delete
* returns the private data paired with it using the `lock()`
[161] Fix | Delete
* function.
[162] Fix | Delete
*
[163] Fix | Delete
* @example
[164] Fix | Delete
* ```js
[165] Fix | Delete
* const object = {};
[166] Fix | Delete
* const privateData = { a: 1 };
[167] Fix | Delete
* lock( object, privateData );
[168] Fix | Delete
*
[169] Fix | Delete
* object
[170] Fix | Delete
* // {}
[171] Fix | Delete
*
[172] Fix | Delete
* unlock( object );
[173] Fix | Delete
* // { a: 1 }
[174] Fix | Delete
* ```
[175] Fix | Delete
*
[176] Fix | Delete
* @param {any} object The object to unlock the private data from.
[177] Fix | Delete
* @return {any} The private data bound to the object.
[178] Fix | Delete
*/
[179] Fix | Delete
function unlock(object) {
[180] Fix | Delete
if (!object) {
[181] Fix | Delete
throw new Error('Cannot unlock an undefined object.');
[182] Fix | Delete
}
[183] Fix | Delete
if (!(__private in object)) {
[184] Fix | Delete
throw new Error('Cannot unlock an object that was not locked before. ');
[185] Fix | Delete
}
[186] Fix | Delete
return lockedData.get(object[__private]);
[187] Fix | Delete
}
[188] Fix | Delete
const lockedData = new WeakMap();
[189] Fix | Delete
[190] Fix | Delete
/**
[191] Fix | Delete
* Used by lock() and unlock() to uniquely identify the private data
[192] Fix | Delete
* related to a containing object.
[193] Fix | Delete
*/
[194] Fix | Delete
const __private = Symbol('Private API ID');
[195] Fix | Delete
[196] Fix | Delete
// Unit tests utilities:
[197] Fix | Delete
[198] Fix | Delete
/**
[199] Fix | Delete
* Private function to allow the unit tests to allow
[200] Fix | Delete
* a mock module to access the private APIs.
[201] Fix | Delete
*
[202] Fix | Delete
* @param {string} name The name of the module.
[203] Fix | Delete
*/
[204] Fix | Delete
function allowCoreModule(name) {
[205] Fix | Delete
CORE_MODULES_USING_PRIVATE_APIS.push(name);
[206] Fix | Delete
}
[207] Fix | Delete
[208] Fix | Delete
/**
[209] Fix | Delete
* Private function to allow the unit tests to set
[210] Fix | Delete
* a custom list of allowed modules.
[211] Fix | Delete
*/
[212] Fix | Delete
function resetAllowedCoreModules() {
[213] Fix | Delete
while (CORE_MODULES_USING_PRIVATE_APIS.length) {
[214] Fix | Delete
CORE_MODULES_USING_PRIVATE_APIS.pop();
[215] Fix | Delete
}
[216] Fix | Delete
}
[217] Fix | Delete
/**
[218] Fix | Delete
* Private function to allow the unit tests to reset
[219] Fix | Delete
* the list of registered private apis.
[220] Fix | Delete
*/
[221] Fix | Delete
function resetRegisteredPrivateApis() {
[222] Fix | Delete
while (registeredPrivateApis.length) {
[223] Fix | Delete
registeredPrivateApis.pop();
[224] Fix | Delete
}
[225] Fix | Delete
}
[226] Fix | Delete
[227] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/private-apis/build-module/index.js
[228] Fix | Delete
[229] Fix | Delete
[230] Fix | Delete
(window.wp = window.wp || {}).privateApis = __webpack_exports__;
[231] Fix | Delete
/******/ })()
[232] Fix | Delete
;
[233] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function