author | ymh <ymh.work@gmail.com> |
Fri, 05 Sep 2025 18:40:08 +0200 | |
changeset 21 | 48c4eec2b7e6 |
parent 19 | 3d72ae0968f4 |
child 22 | 8c2e4d02f4ef |
permissions | -rw-r--r-- |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1 |
/******/ (() => { // webpackBootstrap |
19 | 2 |
/******/ "use strict"; |
3 |
/******/ // The require scope |
|
4 |
/******/ var __webpack_require__ = {}; |
|
5 |
/******/ |
|
6 |
/************************************************************************/ |
|
7 |
/******/ /* webpack/runtime/define property getters */ |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
8 |
/******/ (() => { |
19 | 9 |
/******/ // define getter functions for harmony exports |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
10 |
/******/ __webpack_require__.d = (exports, definition) => { |
19 | 11 |
/******/ for(var key in definition) { |
12 |
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { |
|
13 |
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); |
|
14 |
/******/ } |
|
15 |
/******/ } |
|
9 | 16 |
/******/ }; |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
17 |
/******/ })(); |
19 | 18 |
/******/ |
19 |
/******/ /* webpack/runtime/hasOwnProperty shorthand */ |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
20 |
/******/ (() => { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
21 |
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
22 |
/******/ })(); |
19 | 23 |
/******/ |
24 |
/******/ /* webpack/runtime/make namespace object */ |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
25 |
/******/ (() => { |
19 | 26 |
/******/ // define __esModule on exports |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
27 |
/******/ __webpack_require__.r = (exports) => { |
19 | 28 |
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { |
29 |
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); |
|
30 |
/******/ } |
|
31 |
/******/ Object.defineProperty(exports, '__esModule', { value: true }); |
|
32 |
/******/ }; |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
33 |
/******/ })(); |
19 | 34 |
/******/ |
9 | 35 |
/************************************************************************/ |
19 | 36 |
var __webpack_exports__ = {}; |
18 | 37 |
// ESM COMPAT FLAG |
38 |
__webpack_require__.r(__webpack_exports__); |
|
39 |
||
40 |
// EXPORTS |
|
19 | 41 |
__webpack_require__.d(__webpack_exports__, { |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
42 |
"default": () => (/* binding */ isShallowEqual), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
43 |
isShallowEqualArrays: () => (/* reexport */ isShallowEqualArrays), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
44 |
isShallowEqualObjects: () => (/* reexport */ isShallowEqualObjects) |
19 | 45 |
}); |
18 | 46 |
|
19 | 47 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/is-shallow-equal/build-module/objects.js |
18 | 48 |
/** |
49 |
* Returns true if the two objects are shallow equal, or false otherwise. |
|
50 |
* |
|
51 |
* @param {import('.').ComparableObject} a First object to compare. |
|
52 |
* @param {import('.').ComparableObject} b Second object to compare. |
|
53 |
* |
|
54 |
* @return {boolean} Whether the two objects are shallow equal. |
|
55 |
*/ |
|
56 |
function isShallowEqualObjects(a, b) { |
|
57 |
if (a === b) { |
|
58 |
return true; |
|
59 |
} |
|
60 |
const aKeys = Object.keys(a); |
|
61 |
const bKeys = Object.keys(b); |
|
62 |
if (aKeys.length !== bKeys.length) { |
|
63 |
return false; |
|
64 |
} |
|
65 |
let i = 0; |
|
66 |
while (i < aKeys.length) { |
|
67 |
const key = aKeys[i]; |
|
68 |
const aValue = a[key]; |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
69 |
if ( |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
70 |
// In iterating only the keys of the first object after verifying |
18 | 71 |
// equal lengths, account for the case that an explicit `undefined` |
72 |
// value in the first is implicitly undefined in the second. |
|
73 |
// |
|
74 |
// Example: isShallowEqualObjects( { a: undefined }, { b: 5 } ) |
|
75 |
aValue === undefined && !b.hasOwnProperty(key) || aValue !== b[key]) { |
|
76 |
return false; |
|
77 |
} |
|
78 |
i++; |
|
79 |
} |
|
80 |
return true; |
|
81 |
} |
|
82 |
||
19 | 83 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/is-shallow-equal/build-module/arrays.js |
18 | 84 |
/** |
85 |
* Returns true if the two arrays are shallow equal, or false otherwise. |
|
86 |
* |
|
87 |
* @param {any[]} a First array to compare. |
|
88 |
* @param {any[]} b Second array to compare. |
|
89 |
* |
|
90 |
* @return {boolean} Whether the two arrays are shallow equal. |
|
91 |
*/ |
|
92 |
function isShallowEqualArrays(a, b) { |
|
93 |
if (a === b) { |
|
94 |
return true; |
|
95 |
} |
|
96 |
if (a.length !== b.length) { |
|
97 |
return false; |
|
98 |
} |
|
99 |
for (let i = 0, len = a.length; i < len; i++) { |
|
100 |
if (a[i] !== b[i]) { |
|
101 |
return false; |
|
102 |
} |
|
103 |
} |
|
104 |
return true; |
|
105 |
} |
|
106 |
||
19 | 107 |
;// CONCATENATED MODULE: ./node_modules/@wordpress/is-shallow-equal/build-module/index.js |
18 | 108 |
/** |
109 |
* Internal dependencies |
|
110 |
*/ |
|
9 | 111 |
|
112 |
||
113 |
||
114 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
115 |
|
9 | 116 |
/** |
16 | 117 |
* @typedef {Record<string, any>} ComparableObject |
118 |
*/ |
|
119 |
||
120 |
/** |
|
9 | 121 |
* Returns true if the two arrays or objects are shallow equal, or false |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
122 |
* otherwise. Also handles primitive values, just in case. |
9 | 123 |
* |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
124 |
* @param {unknown} a First object or array to compare. |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
125 |
* @param {unknown} b Second object or array to compare. |
9 | 126 |
* |
127 |
* @return {boolean} Whether the two values are shallow equal. |
|
128 |
*/ |
|
18 | 129 |
function isShallowEqual(a, b) { |
130 |
if (a && b) { |
|
131 |
if (a.constructor === Object && b.constructor === Object) { |
|
132 |
return isShallowEqualObjects(a, b); |
|
133 |
} else if (Array.isArray(a) && Array.isArray(b)) { |
|
134 |
return isShallowEqualArrays(a, b); |
|
135 |
} |
|
136 |
} |
|
137 |
return a === b; |
|
9 | 138 |
} |
139 |
||
19 | 140 |
(window.wp = window.wp || {}).isShallowEqual = __webpack_exports__; |
141 |
/******/ })() |
|
142 |
; |