--- a/wp/wp-includes/js/dist/is-shallow-equal.js Tue Dec 15 15:52:01 2020 +0100
+++ b/wp/wp-includes/js/dist/is-shallow-equal.js Wed Sep 21 18:19:35 2022 +0200
@@ -82,24 +82,99 @@
/******/
/******/
/******/ // Load entry module and return exports
-/******/ return __webpack_require__(__webpack_require__.s = 423);
+/******/ return __webpack_require__(__webpack_require__.s = "waYt");
/******/ })
/************************************************************************/
/******/ ({
-/***/ 423:
-/***/ (function(module, exports, __webpack_require__) {
+/***/ "waYt":
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
+// ESM COMPAT FLAG
+__webpack_require__.r(__webpack_exports__);
+
+// EXPORTS
+__webpack_require__.d(__webpack_exports__, "isShallowEqualObjects", function() { return /* reexport */ isShallowEqualObjects; });
+__webpack_require__.d(__webpack_exports__, "isShallowEqualArrays", function() { return /* reexport */ isShallowEqualArrays; });
+__webpack_require__.d(__webpack_exports__, "default", function() { return /* binding */ isShallowEqual; });
+
+// CONCATENATED MODULE: ./node_modules/@wordpress/is-shallow-equal/build-module/objects.js
+/**
+ * Returns true if the two objects are shallow equal, or false otherwise.
+ *
+ * @param {import('.').ComparableObject} a First object to compare.
+ * @param {import('.').ComparableObject} b Second object to compare.
+ *
+ * @return {boolean} Whether the two objects are shallow equal.
+ */
+function isShallowEqualObjects(a, b) {
+ if (a === b) {
+ return true;
+ }
+
+ const aKeys = Object.keys(a);
+ const bKeys = Object.keys(b);
+
+ if (aKeys.length !== bKeys.length) {
+ return false;
+ }
+
+ let i = 0;
+
+ while (i < aKeys.length) {
+ const key = aKeys[i];
+ const aValue = a[key];
+
+ if ( // In iterating only the keys of the first object after verifying
+ // equal lengths, account for the case that an explicit `undefined`
+ // value in the first is implicitly undefined in the second.
+ //
+ // Example: isShallowEqualObjects( { a: undefined }, { b: 5 } )
+ aValue === undefined && !b.hasOwnProperty(key) || aValue !== b[key]) {
+ return false;
+ }
+
+ i++;
+ }
+
+ return true;
+}
+
+// CONCATENATED MODULE: ./node_modules/@wordpress/is-shallow-equal/build-module/arrays.js
+/**
+ * Returns true if the two arrays are shallow equal, or false otherwise.
+ *
+ * @param {any[]} a First array to compare.
+ * @param {any[]} b Second array to compare.
+ *
+ * @return {boolean} Whether the two arrays are shallow equal.
+ */
+function isShallowEqualArrays(a, b) {
+ if (a === b) {
+ return true;
+ }
+
+ if (a.length !== b.length) {
+ return false;
+ }
+
+ for (let i = 0, len = a.length; i < len; i++) {
+ if (a[i] !== b[i]) {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+// CONCATENATED MODULE: ./node_modules/@wordpress/is-shallow-equal/build-module/index.js
+/**
+ * Internal dependencies
+ */
-/**
- * Internal dependencies;
- */
-var isShallowEqualObjects = __webpack_require__( 424 );
-var isShallowEqualArrays = __webpack_require__( 425 );
-var isArray = Array.isArray;
/**
* @typedef {Record<string, any>} ComparableObject
@@ -114,120 +189,19 @@
*
* @return {boolean} Whether the two values are shallow equal.
*/
-function isShallowEqual( a, b ) {
- if ( a && b ) {
- if ( a.constructor === Object && b.constructor === Object ) {
- return isShallowEqualObjects( a, b );
- } else if ( isArray( a ) && isArray( b ) ) {
- return isShallowEqualArrays( a, b );
- }
- }
-
- return a === b;
-}
-
-module.exports = isShallowEqual;
-module.exports.isShallowEqualObjects = isShallowEqualObjects;
-module.exports.isShallowEqualArrays = isShallowEqualArrays;
-
-
-/***/ }),
-
-/***/ 424:
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var keys = Object.keys;
-
-/**
- * Returns true if the two objects are shallow equal, or false otherwise.
- *
- * @param {import('.').ComparableObject} a First object to compare.
- * @param {import('.').ComparableObject} b Second object to compare.
- *
- * @return {boolean} Whether the two objects are shallow equal.
- */
-function isShallowEqualObjects( a, b ) {
- var aKeys, bKeys, i, key, aValue;
-
- if ( a === b ) {
- return true;
- }
-
- aKeys = keys( a );
- bKeys = keys( b );
-
- if ( aKeys.length !== bKeys.length ) {
- return false;
- }
-
- i = 0;
-
- while ( i < aKeys.length ) {
- key = aKeys[ i ];
- aValue = a[ key ];
- if (
- // In iterating only the keys of the first object after verifying
- // equal lengths, account for the case that an explicit `undefined`
- // value in the first is implicitly undefined in the second.
- //
- // Example: isShallowEqualObjects( { a: undefined }, { b: 5 } )
- ( aValue === undefined && ! b.hasOwnProperty( key ) ) ||
- aValue !== b[ key ]
- ) {
- return false;
- }
-
- i++;
- }
-
- return true;
-}
-
-module.exports = isShallowEqualObjects;
-
-
-/***/ }),
-
-/***/ 425:
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
+function isShallowEqual(a, b) {
+ if (a && b) {
+ if (a.constructor === Object && b.constructor === Object) {
+ return isShallowEqualObjects(a, b);
+ } else if (Array.isArray(a) && Array.isArray(b)) {
+ return isShallowEqualArrays(a, b);
+ }
+ }
-/**
- * Returns true if the two arrays are shallow equal, or false otherwise.
- *
- * @param {any[]} a First array to compare.
- * @param {any[]} b Second array to compare.
- *
- * @return {boolean} Whether the two arrays are shallow equal.
- */
-function isShallowEqualArrays( a, b ) {
- var i;
-
- if ( a === b ) {
- return true;
- }
-
- if ( a.length !== b.length ) {
- return false;
- }
-
- for ( i = 0; i < a.length; i++ ) {
- if ( a[ i ] !== b[ i ] ) {
- return false;
- }
- }
-
- return true;
+ return a === b;
}
-module.exports = isShallowEqualArrays;
-
/***/ })