publ-echo-test 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/README.md +29 -0
  2. package/css/gle-styles.css +169 -0
  3. package/css/resizable-styles.css +76 -0
  4. package/dist/external-lib/classnames/index.d.ts +5 -0
  5. package/dist/external-lib/classnames/index.js +60 -0
  6. package/dist/external-lib/lodash.isEqual/index.d.ts +30 -0
  7. package/dist/external-lib/lodash.isEqual/index.js +1661 -0
  8. package/dist/lib/Draggable/Draggable.d.ts +17 -0
  9. package/dist/lib/Draggable/Draggable.js +192 -0
  10. package/dist/lib/Draggable/DraggableCore.d.ts +5 -0
  11. package/dist/lib/Draggable/DraggableCore.js +266 -0
  12. package/dist/lib/Draggable/constants.d.ts +12 -0
  13. package/dist/lib/Draggable/constants.js +12 -0
  14. package/dist/lib/Draggable/index.d.ts +2 -0
  15. package/dist/lib/Draggable/index.js +2 -0
  16. package/dist/lib/Draggable/types.d.ts +55 -0
  17. package/dist/lib/Draggable/types.js +1 -0
  18. package/dist/lib/Draggable/utils/domHelpers.d.ts +22 -0
  19. package/dist/lib/Draggable/utils/domHelpers.js +222 -0
  20. package/dist/lib/Draggable/utils/getPrefix.d.ts +5 -0
  21. package/dist/lib/Draggable/utils/getPrefix.js +41 -0
  22. package/dist/lib/Draggable/utils/positionHelpers.d.ts +7 -0
  23. package/dist/lib/Draggable/utils/positionHelpers.js +32 -0
  24. package/dist/lib/Draggable/utils/types.d.ts +30 -0
  25. package/dist/lib/Draggable/utils/types.js +1 -0
  26. package/dist/lib/Draggable/utils/validationHelpers.d.ts +4 -0
  27. package/dist/lib/Draggable/utils/validationHelpers.js +16 -0
  28. package/dist/lib/GridItem/GridItem.d.ts +5 -0
  29. package/dist/lib/GridItem/GridItem.js +350 -0
  30. package/dist/lib/GridItem/index.d.ts +1 -0
  31. package/dist/lib/GridItem/index.js +1 -0
  32. package/dist/lib/GridItem/types.d.ts +107 -0
  33. package/dist/lib/GridItem/types.js +1 -0
  34. package/dist/lib/GridItem/utils/calculateUtils.d.ts +30 -0
  35. package/dist/lib/GridItem/utils/calculateUtils.js +108 -0
  36. package/dist/lib/GridLayoutEditor/ReactGridLayout.d.ts +6 -0
  37. package/dist/lib/GridLayoutEditor/ReactGridLayout.js +456 -0
  38. package/dist/lib/GridLayoutEditor/ResponsiveGridLayout.d.ts +4 -0
  39. package/dist/lib/GridLayoutEditor/ResponsiveGridLayout.js +117 -0
  40. package/dist/lib/GridLayoutEditor/index.d.ts +3 -0
  41. package/dist/lib/GridLayoutEditor/index.js +2 -0
  42. package/dist/lib/GridLayoutEditor/types.d.ts +133 -0
  43. package/dist/lib/GridLayoutEditor/types.js +1 -0
  44. package/dist/lib/GridLayoutEditor/utils/renderHelpers.d.ts +165 -0
  45. package/dist/lib/GridLayoutEditor/utils/renderHelpers.js +566 -0
  46. package/dist/lib/GridLayoutEditor/utils/responsiveUtils.d.ts +26 -0
  47. package/dist/lib/GridLayoutEditor/utils/responsiveUtils.js +77 -0
  48. package/dist/lib/Resizable/Resizable.d.ts +6 -0
  49. package/dist/lib/Resizable/Resizable.js +215 -0
  50. package/dist/lib/Resizable/ResizableBox.d.ts +7 -0
  51. package/dist/lib/Resizable/ResizableBox.js +57 -0
  52. package/dist/lib/Resizable/index.d.ts +1 -0
  53. package/dist/lib/Resizable/index.js +1 -0
  54. package/dist/lib/Resizable/types.d.ts +63 -0
  55. package/dist/lib/Resizable/types.js +1 -0
  56. package/dist/lib/Resizable/utils/cloneElement.d.ts +2 -0
  57. package/dist/lib/Resizable/utils/cloneElement.js +21 -0
  58. package/dist/lib/components/WidthProvider.d.ts +9 -0
  59. package/dist/lib/components/WidthProvider.js +65 -0
  60. package/dist/lib/components/index.d.ts +1 -0
  61. package/dist/lib/components/index.js +1 -0
  62. package/dist/lib/components/types.d.ts +13 -0
  63. package/dist/lib/components/types.js +1 -0
  64. package/dist/lib/index.d.ts +5 -0
  65. package/dist/lib/index.js +5 -0
  66. package/dist/lib/types.d.ts +4 -0
  67. package/dist/lib/types.js +1 -0
  68. package/package.json +56 -0
@@ -0,0 +1,1661 @@
1
+ "use strict";
2
+ /* eslint-disable no-loop-func */
3
+ /* eslint-disable no-self-compare */
4
+ /* eslint-disable no-fallthrough */
5
+ /* eslint-disable default-case */
6
+ /* eslint-disable no-new-func */
7
+ /* eslint-disable eqeqeq */
8
+ /**
9
+ * Lodash (Custom Build) <https://lodash.com/>
10
+ * Build: `lodash modularize exports="npm" -o ./`
11
+ * Copyright JS Foundation and other contributors <https://js.foundation/>
12
+ * Released under MIT license <https://lodash.com/license>
13
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
14
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
15
+ */
16
+ /** Used as the size to enable large array optimizations. */
17
+ var LARGE_ARRAY_SIZE = 200;
18
+ /** Used to stand-in for `undefined` hash values. */
19
+ var HASH_UNDEFINED = "__lodash_hash_undefined__";
20
+ /** Used to compose bitmasks for value comparisons. */
21
+ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2;
22
+ /** Used as references for various `Number` constants. */
23
+ var MAX_SAFE_INTEGER = 9007199254740991;
24
+ /** `Object#toString` result references. */
25
+ var argsTag = "[object Arguments]", arrayTag = "[object Array]", asyncTag = "[object AsyncFunction]", boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag = "[object Map]", numberTag = "[object Number]", nullTag = "[object Null]", objectTag = "[object Object]", promiseTag = "[object Promise]", proxyTag = "[object Proxy]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]", undefinedTag = "[object Undefined]", weakMapTag = "[object WeakMap]";
26
+ var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
27
+ /**
28
+ * Used to match `RegExp`
29
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
30
+ */
31
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
32
+ /** Used to detect host constructors (Safari). */
33
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
34
+ /** Used to detect unsigned integer values. */
35
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
36
+ /** Used to identify `toStringTag` values of typed arrays. */
37
+ var typedArrayTags = {};
38
+ typedArrayTags[float32Tag] =
39
+ typedArrayTags[float64Tag] =
40
+ typedArrayTags[int8Tag] =
41
+ typedArrayTags[int16Tag] =
42
+ typedArrayTags[int32Tag] =
43
+ typedArrayTags[uint8Tag] =
44
+ typedArrayTags[uint8ClampedTag] =
45
+ typedArrayTags[uint16Tag] =
46
+ typedArrayTags[uint32Tag] =
47
+ true;
48
+ typedArrayTags[argsTag] =
49
+ typedArrayTags[arrayTag] =
50
+ typedArrayTags[arrayBufferTag] =
51
+ typedArrayTags[boolTag] =
52
+ typedArrayTags[dataViewTag] =
53
+ typedArrayTags[dateTag] =
54
+ typedArrayTags[errorTag] =
55
+ typedArrayTags[funcTag] =
56
+ typedArrayTags[mapTag] =
57
+ typedArrayTags[numberTag] =
58
+ typedArrayTags[objectTag] =
59
+ typedArrayTags[regexpTag] =
60
+ typedArrayTags[setTag] =
61
+ typedArrayTags[stringTag] =
62
+ typedArrayTags[weakMapTag] =
63
+ false;
64
+ /** Detect free variable `global` from Node.js. */
65
+ var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
66
+ /** Detect free variable `self`. */
67
+ var freeSelf =
68
+ // eslint-disable-next-line no-restricted-globals
69
+ typeof self == "object" && self && self.Object === Object && self;
70
+ /** Used as a reference to the global object. */
71
+ var root = freeGlobal || freeSelf || Function("return this")();
72
+ /** Detect free variable `exports`. */
73
+ var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
74
+ /** Detect free variable `module`. */
75
+ var freeModule = freeExports &&
76
+ typeof module == "object" &&
77
+ module &&
78
+ !module.nodeType &&
79
+ module;
80
+ /** Detect the popular CommonJS extension `module.exports`. */
81
+ var moduleExports = freeModule && freeModule.exports === freeExports;
82
+ /** Detect free variable `process` from Node.js. */
83
+ var freeProcess = moduleExports && freeGlobal.process;
84
+ /** Used to access faster Node.js helpers. */
85
+ var nodeUtil = (function () {
86
+ try {
87
+ return freeProcess && freeProcess.binding && freeProcess.binding("util");
88
+ }
89
+ catch (e) { }
90
+ })();
91
+ /* Node.js helper references. */
92
+ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
93
+ /**
94
+ * A specialized version of `_.filter` for arrays without support for
95
+ * iteratee shorthands.
96
+ *
97
+ * @private
98
+ * @param {Array} [array] The array to iterate over.
99
+ * @param {Function} predicate The function invoked per iteration.
100
+ * @returns {Array} Returns the new filtered array.
101
+ */
102
+ function arrayFilter(array, predicate) {
103
+ var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
104
+ while (++index < length) {
105
+ var value = array[index];
106
+ if (predicate(value, index, array)) {
107
+ result[resIndex++] = value;
108
+ }
109
+ }
110
+ return result;
111
+ }
112
+ /**
113
+ * Appends the elements of `values` to `array`.
114
+ *
115
+ * @private
116
+ * @param {Array} array The array to modify.
117
+ * @param {Array} values The values to append.
118
+ * @returns {Array} Returns `array`.
119
+ */
120
+ function arrayPush(array, values) {
121
+ var index = -1, length = values.length, offset = array.length;
122
+ while (++index < length) {
123
+ array[offset + index] = values[index];
124
+ }
125
+ return array;
126
+ }
127
+ /**
128
+ * A specialized version of `_.some` for arrays without support for iteratee
129
+ * shorthands.
130
+ *
131
+ * @private
132
+ * @param {Array} [array] The array to iterate over.
133
+ * @param {Function} predicate The function invoked per iteration.
134
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
135
+ * else `false`.
136
+ */
137
+ function arraySome(array, predicate) {
138
+ var index = -1, length = array == null ? 0 : array.length;
139
+ while (++index < length) {
140
+ if (predicate(array[index], index, array)) {
141
+ return true;
142
+ }
143
+ }
144
+ return false;
145
+ }
146
+ /**
147
+ * The base implementation of `_.times` without support for iteratee shorthands
148
+ * or max array length checks.
149
+ *
150
+ * @private
151
+ * @param {number} n The number of times to invoke `iteratee`.
152
+ * @param {Function} iteratee The function invoked per iteration.
153
+ * @returns {Array} Returns the array of results.
154
+ */
155
+ function baseTimes(n, iteratee) {
156
+ var index = -1, result = Array(n);
157
+ while (++index < n) {
158
+ result[index] = iteratee(index);
159
+ }
160
+ return result;
161
+ }
162
+ /**
163
+ * The base implementation of `_.unary` without support for storing metadata.
164
+ *
165
+ * @private
166
+ * @param {Function} func The function to cap arguments for.
167
+ * @returns {Function} Returns the new capped function.
168
+ */
169
+ function baseUnary(func) {
170
+ return function (value) {
171
+ return func(value);
172
+ };
173
+ }
174
+ /**
175
+ * Checks if a `cache` value for `key` exists.
176
+ *
177
+ * @private
178
+ * @param {Object} cache The cache to query.
179
+ * @param {string} key The key of the entry to check.
180
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
181
+ */
182
+ function cacheHas(cache, key) {
183
+ return cache.has(key);
184
+ }
185
+ /**
186
+ * Gets the value at `key` of `object`.
187
+ *
188
+ * @private
189
+ * @param {Object} [object] The object to query.
190
+ * @param {string} key The key of the property to get.
191
+ * @returns {*} Returns the property value.
192
+ */
193
+ function getValue(object, key) {
194
+ return object == null ? undefined : object[key];
195
+ }
196
+ /**
197
+ * Converts `map` to its key-value pairs.
198
+ *
199
+ * @private
200
+ * @param {Object} map The map to convert.
201
+ * @returns {Array} Returns the key-value pairs.
202
+ */
203
+ function mapToArray(map) {
204
+ var index = -1, result = Array(map.size);
205
+ map.forEach(function (value, key) {
206
+ result[++index] = [key, value];
207
+ });
208
+ return result;
209
+ }
210
+ /**
211
+ * Creates a unary function that invokes `func` with its argument transformed.
212
+ *
213
+ * @private
214
+ * @param {Function} func The function to wrap.
215
+ * @param {Function} transform The argument transform.
216
+ * @returns {Function} Returns the new function.
217
+ */
218
+ function overArg(func, transform) {
219
+ return function (arg) {
220
+ return func(transform(arg));
221
+ };
222
+ }
223
+ /**
224
+ * Converts `set` to an array of its values.
225
+ *
226
+ * @private
227
+ * @param {Object} set The set to convert.
228
+ * @returns {Array} Returns the values.
229
+ */
230
+ function setToArray(set) {
231
+ var index = -1, result = Array(set.size);
232
+ set.forEach(function (value) {
233
+ result[++index] = value;
234
+ });
235
+ return result;
236
+ }
237
+ /** Used for built-in method references. */
238
+ var arrayProto = Array.prototype, funcProto = Function.prototype, objectProto = Object.prototype;
239
+ /** Used to detect overreaching core-js shims. */
240
+ var coreJsData = root["__core-js_shared__"];
241
+ /** Used to resolve the decompiled source of functions. */
242
+ var funcToString = funcProto.toString;
243
+ /** Used to check objects for own properties. */
244
+ var hasOwnProperty = objectProto.hasOwnProperty;
245
+ /** Used to detect methods masquerading as native. */
246
+ var maskSrcKey = (function () {
247
+ var uid = /[^.]+$/.exec((coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO) || "");
248
+ return uid ? "Symbol(src)_1." + uid : "";
249
+ })();
250
+ /**
251
+ * Used to resolve the
252
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
253
+ * of values.
254
+ */
255
+ var nativeObjectToString = objectProto.toString;
256
+ /** Used to detect if a method is native. */
257
+ var reIsNative = RegExp("^" +
258
+ funcToString
259
+ .call(hasOwnProperty)
260
+ .replace(reRegExpChar, "\\$&")
261
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") +
262
+ "$");
263
+ /** Built-in value references. */
264
+ var Buffer = moduleExports ? root.Buffer : undefined, Symbol = root.Symbol, Uint8Array = root.Uint8Array, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice, symToStringTag = Symbol ? Symbol.toStringTag : undefined;
265
+ /* Built-in method references for those with the same name as other `lodash` methods. */
266
+ var nativeGetSymbols = Object.getOwnPropertySymbols, nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, nativeKeys = overArg(Object.keys, Object);
267
+ /* Built-in method references that are verified to be native. */
268
+ var DataView = getNative(root, "DataView"), Map = getNative(root, "Map"), Promise = getNative(root, "Promise"), Set = getNative(root, "Set"), WeakMap = getNative(root, "WeakMap"), nativeCreate = getNative(Object, "create");
269
+ /** Used to detect maps, sets, and weakmaps. */
270
+ var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap);
271
+ /** Used to convert symbols to primitives and strings. */
272
+ var symbolProto = Symbol ? Symbol.prototype : undefined, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
273
+ /**
274
+ * Creates a hash object.
275
+ *
276
+ * @private
277
+ * @constructor
278
+ * @param {Array} [entries] The key-value pairs to cache.
279
+ */
280
+ function Hash(entries) {
281
+ var index = -1, length = entries == null ? 0 : entries.length;
282
+ this.clear();
283
+ while (++index < length) {
284
+ var entry = entries[index];
285
+ this.set(entry[0], entry[1]);
286
+ }
287
+ }
288
+ /**
289
+ * Removes all key-value entries from the hash.
290
+ *
291
+ * @private
292
+ * @name clear
293
+ * @memberOf Hash
294
+ */
295
+ function hashClear() {
296
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
297
+ this.size = 0;
298
+ }
299
+ /**
300
+ * Removes `key` and its value from the hash.
301
+ *
302
+ * @private
303
+ * @name delete
304
+ * @memberOf Hash
305
+ * @param {Object} hash The hash to modify.
306
+ * @param {string} key The key of the value to remove.
307
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
308
+ */
309
+ function hashDelete(key) {
310
+ var result = this.has(key) && delete this.__data__[key];
311
+ this.size -= result ? 1 : 0;
312
+ return result;
313
+ }
314
+ /**
315
+ * Gets the hash value for `key`.
316
+ *
317
+ * @private
318
+ * @name get
319
+ * @memberOf Hash
320
+ * @param {string} key The key of the value to get.
321
+ * @returns {*} Returns the entry value.
322
+ */
323
+ function hashGet(key) {
324
+ var data = this.__data__;
325
+ if (nativeCreate) {
326
+ var result = data[key];
327
+ return result === HASH_UNDEFINED ? undefined : result;
328
+ }
329
+ return hasOwnProperty.call(data, key) ? data[key] : undefined;
330
+ }
331
+ /**
332
+ * Checks if a hash value for `key` exists.
333
+ *
334
+ * @private
335
+ * @name has
336
+ * @memberOf Hash
337
+ * @param {string} key The key of the entry to check.
338
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
339
+ */
340
+ function hashHas(key) {
341
+ var data = this.__data__;
342
+ return nativeCreate
343
+ ? data[key] !== undefined
344
+ : hasOwnProperty.call(data, key);
345
+ }
346
+ /**
347
+ * Sets the hash `key` to `value`.
348
+ *
349
+ * @private
350
+ * @name set
351
+ * @memberOf Hash
352
+ * @param {string} key The key of the value to set.
353
+ * @param {*} value The value to set.
354
+ * @returns {Object} Returns the hash instance.
355
+ */
356
+ function hashSet(key, value) {
357
+ var data = this.__data__;
358
+ this.size += this.has(key) ? 0 : 1;
359
+ data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value;
360
+ return this;
361
+ }
362
+ // Add methods to `Hash`.
363
+ Hash.prototype.clear = hashClear;
364
+ Hash.prototype["delete"] = hashDelete;
365
+ Hash.prototype.get = hashGet;
366
+ Hash.prototype.has = hashHas;
367
+ Hash.prototype.set = hashSet;
368
+ /**
369
+ * Creates an list cache object.
370
+ *
371
+ * @private
372
+ * @constructor
373
+ * @param {Array} [entries] The key-value pairs to cache.
374
+ */
375
+ function ListCache(entries) {
376
+ var index = -1, length = entries == null ? 0 : entries.length;
377
+ this.clear();
378
+ while (++index < length) {
379
+ var entry = entries[index];
380
+ this.set(entry[0], entry[1]);
381
+ }
382
+ }
383
+ /**
384
+ * Removes all key-value entries from the list cache.
385
+ *
386
+ * @private
387
+ * @name clear
388
+ * @memberOf ListCache
389
+ */
390
+ function listCacheClear() {
391
+ this.__data__ = [];
392
+ this.size = 0;
393
+ }
394
+ /**
395
+ * Removes `key` and its value from the list cache.
396
+ *
397
+ * @private
398
+ * @name delete
399
+ * @memberOf ListCache
400
+ * @param {string} key The key of the value to remove.
401
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
402
+ */
403
+ function listCacheDelete(key) {
404
+ var data = this.__data__, index = assocIndexOf(data, key);
405
+ if (index < 0) {
406
+ return false;
407
+ }
408
+ var lastIndex = data.length - 1;
409
+ if (index == lastIndex) {
410
+ data.pop();
411
+ }
412
+ else {
413
+ splice.call(data, index, 1);
414
+ }
415
+ --this.size;
416
+ return true;
417
+ }
418
+ /**
419
+ * Gets the list cache value for `key`.
420
+ *
421
+ * @private
422
+ * @name get
423
+ * @memberOf ListCache
424
+ * @param {string} key The key of the value to get.
425
+ * @returns {*} Returns the entry value.
426
+ */
427
+ function listCacheGet(key) {
428
+ var data = this.__data__, index = assocIndexOf(data, key);
429
+ return index < 0 ? undefined : data[index][1];
430
+ }
431
+ /**
432
+ * Checks if a list cache value for `key` exists.
433
+ *
434
+ * @private
435
+ * @name has
436
+ * @memberOf ListCache
437
+ * @param {string} key The key of the entry to check.
438
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
439
+ */
440
+ function listCacheHas(key) {
441
+ return assocIndexOf(this.__data__, key) > -1;
442
+ }
443
+ /**
444
+ * Sets the list cache `key` to `value`.
445
+ *
446
+ * @private
447
+ * @name set
448
+ * @memberOf ListCache
449
+ * @param {string} key The key of the value to set.
450
+ * @param {*} value The value to set.
451
+ * @returns {Object} Returns the list cache instance.
452
+ */
453
+ function listCacheSet(key, value) {
454
+ var data = this.__data__, index = assocIndexOf(data, key);
455
+ if (index < 0) {
456
+ ++this.size;
457
+ data.push([key, value]);
458
+ }
459
+ else {
460
+ data[index][1] = value;
461
+ }
462
+ return this;
463
+ }
464
+ // Add methods to `ListCache`.
465
+ ListCache.prototype.clear = listCacheClear;
466
+ ListCache.prototype["delete"] = listCacheDelete;
467
+ ListCache.prototype.get = listCacheGet;
468
+ ListCache.prototype.has = listCacheHas;
469
+ ListCache.prototype.set = listCacheSet;
470
+ /**
471
+ * Creates a map cache object to store key-value pairs.
472
+ *
473
+ * @private
474
+ * @constructor
475
+ * @param {Array} [entries] The key-value pairs to cache.
476
+ */
477
+ function MapCache(entries) {
478
+ var index = -1, length = entries == null ? 0 : entries.length;
479
+ this.clear();
480
+ while (++index < length) {
481
+ var entry = entries[index];
482
+ this.set(entry[0], entry[1]);
483
+ }
484
+ }
485
+ /**
486
+ * Removes all key-value entries from the map.
487
+ *
488
+ * @private
489
+ * @name clear
490
+ * @memberOf MapCache
491
+ */
492
+ function mapCacheClear() {
493
+ this.size = 0;
494
+ this.__data__ = {
495
+ hash: new Hash(),
496
+ map: new (Map || ListCache)(),
497
+ string: new Hash(),
498
+ };
499
+ }
500
+ /**
501
+ * Removes `key` and its value from the map.
502
+ *
503
+ * @private
504
+ * @name delete
505
+ * @memberOf MapCache
506
+ * @param {string} key The key of the value to remove.
507
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
508
+ */
509
+ function mapCacheDelete(key) {
510
+ var result = getMapData(this, key)["delete"](key);
511
+ this.size -= result ? 1 : 0;
512
+ return result;
513
+ }
514
+ /**
515
+ * Gets the map value for `key`.
516
+ *
517
+ * @private
518
+ * @name get
519
+ * @memberOf MapCache
520
+ * @param {string} key The key of the value to get.
521
+ * @returns {*} Returns the entry value.
522
+ */
523
+ function mapCacheGet(key) {
524
+ return getMapData(this, key).get(key);
525
+ }
526
+ /**
527
+ * Checks if a map value for `key` exists.
528
+ *
529
+ * @private
530
+ * @name has
531
+ * @memberOf MapCache
532
+ * @param {string} key The key of the entry to check.
533
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
534
+ */
535
+ function mapCacheHas(key) {
536
+ return getMapData(this, key).has(key);
537
+ }
538
+ /**
539
+ * Sets the map `key` to `value`.
540
+ *
541
+ * @private
542
+ * @name set
543
+ * @memberOf MapCache
544
+ * @param {string} key The key of the value to set.
545
+ * @param {*} value The value to set.
546
+ * @returns {Object} Returns the map cache instance.
547
+ */
548
+ function mapCacheSet(key, value) {
549
+ var data = getMapData(this, key), size = data.size;
550
+ data.set(key, value);
551
+ this.size += data.size == size ? 0 : 1;
552
+ return this;
553
+ }
554
+ // Add methods to `MapCache`.
555
+ MapCache.prototype.clear = mapCacheClear;
556
+ MapCache.prototype["delete"] = mapCacheDelete;
557
+ MapCache.prototype.get = mapCacheGet;
558
+ MapCache.prototype.has = mapCacheHas;
559
+ MapCache.prototype.set = mapCacheSet;
560
+ /**
561
+ *
562
+ * Creates an array cache object to store unique values.
563
+ *
564
+ * @private
565
+ * @constructor
566
+ * @param {Array} [values] The values to cache.
567
+ */
568
+ function SetCache(values) {
569
+ var index = -1, length = values == null ? 0 : values.length;
570
+ this.__data__ = new MapCache();
571
+ while (++index < length) {
572
+ this.add(values[index]);
573
+ }
574
+ }
575
+ /**
576
+ * Adds `value` to the array cache.
577
+ *
578
+ * @private
579
+ * @name add
580
+ * @memberOf SetCache
581
+ * @alias push
582
+ * @param {*} value The value to cache.
583
+ * @returns {Object} Returns the cache instance.
584
+ */
585
+ function setCacheAdd(value) {
586
+ this.__data__.set(value, HASH_UNDEFINED);
587
+ return this;
588
+ }
589
+ /**
590
+ * Checks if `value` is in the array cache.
591
+ *
592
+ * @private
593
+ * @name has
594
+ * @memberOf SetCache
595
+ * @param {*} value The value to search for.
596
+ * @returns {number} Returns `true` if `value` is found, else `false`.
597
+ */
598
+ function setCacheHas(value) {
599
+ return this.__data__.has(value);
600
+ }
601
+ // Add methods to `SetCache`.
602
+ SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
603
+ SetCache.prototype.has = setCacheHas;
604
+ /**
605
+ * Creates a stack cache object to store key-value pairs.
606
+ *
607
+ * @private
608
+ * @constructor
609
+ * @param {Array} [entries] The key-value pairs to cache.
610
+ */
611
+ function Stack(entries) {
612
+ var data = (this.__data__ = new ListCache(entries));
613
+ this.size = data.size;
614
+ }
615
+ /**
616
+ * Removes all key-value entries from the stack.
617
+ *
618
+ * @private
619
+ * @name clear
620
+ * @memberOf Stack
621
+ */
622
+ function stackClear() {
623
+ this.__data__ = new ListCache();
624
+ this.size = 0;
625
+ }
626
+ /**
627
+ * Removes `key` and its value from the stack.
628
+ *
629
+ * @private
630
+ * @name delete
631
+ * @memberOf Stack
632
+ * @param {string} key The key of the value to remove.
633
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
634
+ */
635
+ function stackDelete(key) {
636
+ var data = this.__data__, result = data["delete"](key);
637
+ this.size = data.size;
638
+ return result;
639
+ }
640
+ /**
641
+ * Gets the stack value for `key`.
642
+ *
643
+ * @private
644
+ * @name get
645
+ * @memberOf Stack
646
+ * @param {string} key The key of the value to get.
647
+ * @returns {*} Returns the entry value.
648
+ */
649
+ function stackGet(key) {
650
+ return this.__data__.get(key);
651
+ }
652
+ /**
653
+ * Checks if a stack value for `key` exists.
654
+ *
655
+ * @private
656
+ * @name has
657
+ * @memberOf Stack
658
+ * @param {string} key The key of the entry to check.
659
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
660
+ */
661
+ function stackHas(key) {
662
+ return this.__data__.has(key);
663
+ }
664
+ /**
665
+ * Sets the stack `key` to `value`.
666
+ *
667
+ * @private
668
+ * @name set
669
+ * @memberOf Stack
670
+ * @param {string} key The key of the value to set.
671
+ * @param {*} value The value to set.
672
+ * @returns {Object} Returns the stack cache instance.
673
+ */
674
+ function stackSet(key, value) {
675
+ var data = this.__data__;
676
+ if (data instanceof ListCache) {
677
+ var pairs = data.__data__;
678
+ if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) {
679
+ pairs.push([key, value]);
680
+ this.size = ++data.size;
681
+ return this;
682
+ }
683
+ data = this.__data__ = new MapCache(pairs);
684
+ }
685
+ data.set(key, value);
686
+ this.size = data.size;
687
+ return this;
688
+ }
689
+ // Add methods to `Stack`.
690
+ Stack.prototype.clear = stackClear;
691
+ Stack.prototype["delete"] = stackDelete;
692
+ Stack.prototype.get = stackGet;
693
+ Stack.prototype.has = stackHas;
694
+ Stack.prototype.set = stackSet;
695
+ /**
696
+ * Creates an array of the enumerable property names of the array-like `value`.
697
+ *
698
+ * @private
699
+ * @param {*} value The value to query.
700
+ * @param {boolean} inherited Specify returning inherited property names.
701
+ * @returns {Array} Returns the array of property names.
702
+ */
703
+ function arrayLikeKeys(value, inherited) {
704
+ var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
705
+ for (var key in value) {
706
+ if ((inherited || hasOwnProperty.call(value, key)) &&
707
+ !(skipIndexes &&
708
+ // Safari 9 has enumerable `arguments.length` in strict mode.
709
+ (key == "length" ||
710
+ // Node.js 0.10 has enumerable non-index properties on buffers.
711
+ (isBuff && (key == "offset" || key == "parent")) ||
712
+ // PhantomJS 2 has enumerable non-index properties on typed arrays.
713
+ (isType &&
714
+ (key == "buffer" || key == "byteLength" || key == "byteOffset")) ||
715
+ // Skip index properties.
716
+ isIndex(key, length)))) {
717
+ result.push(key);
718
+ }
719
+ }
720
+ return result;
721
+ }
722
+ /**
723
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
724
+ *
725
+ * @private
726
+ * @param {Array} array The array to inspect.
727
+ * @param {*} key The key to search for.
728
+ * @returns {number} Returns the index of the matched value, else `-1`.
729
+ */
730
+ function assocIndexOf(array, key) {
731
+ var length = array.length;
732
+ while (length--) {
733
+ if (eq(array[length][0], key)) {
734
+ return length;
735
+ }
736
+ }
737
+ return -1;
738
+ }
739
+ /**
740
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
741
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
742
+ * symbols of `object`.
743
+ *
744
+ * @private
745
+ * @param {Object} object The object to query.
746
+ * @param {Function} keysFunc The function to get the keys of `object`.
747
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
748
+ * @returns {Array} Returns the array of property names and symbols.
749
+ */
750
+ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
751
+ var result = keysFunc(object);
752
+ return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
753
+ }
754
+ /**
755
+ * The base implementation of `getTag` without fallbacks for buggy environments.
756
+ *
757
+ * @private
758
+ * @param {*} value The value to query.
759
+ * @returns {string} Returns the `toStringTag`.
760
+ */
761
+ function baseGetTag(value) {
762
+ if (value == null) {
763
+ return value === undefined ? undefinedTag : nullTag;
764
+ }
765
+ return symToStringTag && symToStringTag in Object(value)
766
+ ? getRawTag(value)
767
+ : objectToString(value);
768
+ }
769
+ /**
770
+ * The base implementation of `_.isArguments`.
771
+ *
772
+ * @private
773
+ * @param {*} value The value to check.
774
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
775
+ */
776
+ function baseIsArguments(value) {
777
+ return isObjectLike(value) && baseGetTag(value) == argsTag;
778
+ }
779
+ /**
780
+ * The base implementation of `_.isEqual` which supports partial comparisons
781
+ * and tracks traversed objects.
782
+ *
783
+ * @private
784
+ * @param {*} value The value to compare.
785
+ * @param {*} other The other value to compare.
786
+ * @param {boolean} bitmask The bitmask flags.
787
+ * 1 - Unordered comparison
788
+ * 2 - Partial comparison
789
+ * @param {Function} [customizer] The function to customize comparisons.
790
+ * @param {Object} [stack] Tracks traversed `value` and `other` objects.
791
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
792
+ */
793
+ function baseIsEqual(value, other, bitmask, customizer, stack) {
794
+ if (value === other) {
795
+ return true;
796
+ }
797
+ if (value == null ||
798
+ other == null ||
799
+ (!isObjectLike(value) && !isObjectLike(other))) {
800
+ return value !== value && other !== other;
801
+ }
802
+ return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
803
+ }
804
+ /**
805
+ * A specialized version of `baseIsEqual` for arrays and objects which performs
806
+ * deep comparisons and tracks traversed objects enabling objects with circular
807
+ * references to be compared.
808
+ *
809
+ * @private
810
+ * @param {Object} object The object to compare.
811
+ * @param {Object} other The other object to compare.
812
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
813
+ * @param {Function} customizer The function to customize comparisons.
814
+ * @param {Function} equalFunc The function to determine equivalents of values.
815
+ * @param {Object} [stack] Tracks traversed `object` and `other` objects.
816
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
817
+ */
818
+ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
819
+ var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other);
820
+ objTag = objTag == argsTag ? objectTag : objTag;
821
+ othTag = othTag == argsTag ? objectTag : othTag;
822
+ var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
823
+ if (isSameTag && isBuffer(object)) {
824
+ if (!isBuffer(other)) {
825
+ return false;
826
+ }
827
+ objIsArr = true;
828
+ objIsObj = false;
829
+ }
830
+ if (isSameTag && !objIsObj) {
831
+ stack || (stack = new Stack());
832
+ return objIsArr || isTypedArray(object)
833
+ ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
834
+ : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
835
+ }
836
+ if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
837
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__");
838
+ if (objIsWrapped || othIsWrapped) {
839
+ var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
840
+ stack || (stack = new Stack());
841
+ return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
842
+ }
843
+ }
844
+ if (!isSameTag) {
845
+ return false;
846
+ }
847
+ stack || (stack = new Stack());
848
+ return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
849
+ }
850
+ /**
851
+ * The base implementation of `_.isNative` without bad shim checks.
852
+ *
853
+ * @private
854
+ * @param {*} value The value to check.
855
+ * @returns {boolean} Returns `true` if `value` is a native function,
856
+ * else `false`.
857
+ */
858
+ function baseIsNative(value) {
859
+ if (!isObject(value) || isMasked(value)) {
860
+ return false;
861
+ }
862
+ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
863
+ return pattern.test(toSource(value));
864
+ }
865
+ /**
866
+ * The base implementation of `_.isTypedArray` without Node.js optimizations.
867
+ *
868
+ * @private
869
+ * @param {*} value The value to check.
870
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
871
+ */
872
+ function baseIsTypedArray(value) {
873
+ return (isObjectLike(value) &&
874
+ isLength(value.length) &&
875
+ !!typedArrayTags[baseGetTag(value)]);
876
+ }
877
+ /**
878
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
879
+ *
880
+ * @private
881
+ * @param {Object} object The object to query.
882
+ * @returns {Array} Returns the array of property names.
883
+ */
884
+ function baseKeys(object) {
885
+ if (!isPrototype(object)) {
886
+ return nativeKeys(object);
887
+ }
888
+ var result = [];
889
+ for (var key in Object(object)) {
890
+ if (hasOwnProperty.call(object, key) && key != "constructor") {
891
+ result.push(key);
892
+ }
893
+ }
894
+ return result;
895
+ }
896
+ /**
897
+ * A specialized version of `baseIsEqualDeep` for arrays with support for
898
+ * partial deep comparisons.
899
+ *
900
+ * @private
901
+ * @param {Array} array The array to compare.
902
+ * @param {Array} other The other array to compare.
903
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
904
+ * @param {Function} customizer The function to customize comparisons.
905
+ * @param {Function} equalFunc The function to determine equivalents of values.
906
+ * @param {Object} stack Tracks traversed `array` and `other` objects.
907
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
908
+ */
909
+ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
910
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length;
911
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
912
+ return false;
913
+ }
914
+ // Assume cyclic values are equal.
915
+ var stacked = stack.get(array);
916
+ if (stacked && stack.get(other)) {
917
+ return stacked == other;
918
+ }
919
+ var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined;
920
+ stack.set(array, other);
921
+ stack.set(other, array);
922
+ // Ignore non-index properties.
923
+ while (++index < arrLength) {
924
+ var arrValue = array[index], othValue = other[index];
925
+ if (customizer) {
926
+ var compared = isPartial
927
+ ? customizer(othValue, arrValue, index, other, array, stack)
928
+ : customizer(arrValue, othValue, index, array, other, stack);
929
+ }
930
+ if (compared !== undefined) {
931
+ if (compared) {
932
+ continue;
933
+ }
934
+ result = false;
935
+ break;
936
+ }
937
+ // Recursively compare arrays (susceptible to call stack limits).
938
+ if (seen) {
939
+ if (!arraySome(other, function (othValue, othIndex) {
940
+ if (!cacheHas(seen, othIndex) &&
941
+ (arrValue === othValue ||
942
+ equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
943
+ return seen.push(othIndex);
944
+ }
945
+ })) {
946
+ result = false;
947
+ break;
948
+ }
949
+ }
950
+ else if (!(arrValue === othValue ||
951
+ equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
952
+ result = false;
953
+ break;
954
+ }
955
+ }
956
+ stack["delete"](array);
957
+ stack["delete"](other);
958
+ return result;
959
+ }
960
+ /**
961
+ * A specialized version of `baseIsEqualDeep` for comparing objects of
962
+ * the same `toStringTag`.
963
+ *
964
+ * **Note:** This function only supports comparing values with tags of
965
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
966
+ *
967
+ * @private
968
+ * @param {Object} object The object to compare.
969
+ * @param {Object} other The other object to compare.
970
+ * @param {string} tag The `toStringTag` of the objects to compare.
971
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
972
+ * @param {Function} customizer The function to customize comparisons.
973
+ * @param {Function} equalFunc The function to determine equivalents of values.
974
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
975
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
976
+ */
977
+ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
978
+ switch (tag) {
979
+ case dataViewTag:
980
+ if (object.byteLength != other.byteLength ||
981
+ object.byteOffset != other.byteOffset) {
982
+ return false;
983
+ }
984
+ object = object.buffer;
985
+ other = other.buffer;
986
+ case arrayBufferTag:
987
+ if (object.byteLength != other.byteLength ||
988
+ !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
989
+ return false;
990
+ }
991
+ return true;
992
+ case boolTag:
993
+ case dateTag:
994
+ case numberTag:
995
+ // Coerce booleans to `1` or `0` and dates to milliseconds.
996
+ // Invalid dates are coerced to `NaN`.
997
+ return eq(+object, +other);
998
+ case errorTag:
999
+ return object.name == other.name && object.message == other.message;
1000
+ case regexpTag:
1001
+ case stringTag:
1002
+ // Coerce regexes to strings and treat strings, primitives and objects,
1003
+ // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
1004
+ // for more details.
1005
+ return object == other + "";
1006
+ case mapTag:
1007
+ var convert = mapToArray;
1008
+ case setTag:
1009
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
1010
+ convert || (convert = setToArray);
1011
+ if (object.size != other.size && !isPartial) {
1012
+ return false;
1013
+ }
1014
+ // Assume cyclic values are equal.
1015
+ var stacked = stack.get(object);
1016
+ if (stacked) {
1017
+ return stacked == other;
1018
+ }
1019
+ bitmask |= COMPARE_UNORDERED_FLAG;
1020
+ // Recursively compare objects (susceptible to call stack limits).
1021
+ stack.set(object, other);
1022
+ var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
1023
+ stack["delete"](object);
1024
+ return result;
1025
+ case symbolTag:
1026
+ if (symbolValueOf) {
1027
+ return symbolValueOf.call(object) == symbolValueOf.call(other);
1028
+ }
1029
+ }
1030
+ return false;
1031
+ }
1032
+ /**
1033
+ * A specialized version of `baseIsEqualDeep` for objects with support for
1034
+ * partial deep comparisons.
1035
+ *
1036
+ * @private
1037
+ * @param {Object} object The object to compare.
1038
+ * @param {Object} other The other object to compare.
1039
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
1040
+ * @param {Function} customizer The function to customize comparisons.
1041
+ * @param {Function} equalFunc The function to determine equivalents of values.
1042
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
1043
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
1044
+ */
1045
+ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
1046
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length;
1047
+ if (objLength != othLength && !isPartial) {
1048
+ return false;
1049
+ }
1050
+ var index = objLength;
1051
+ while (index--) {
1052
+ var key = objProps[index];
1053
+ if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
1054
+ return false;
1055
+ }
1056
+ }
1057
+ // Assume cyclic values are equal.
1058
+ var stacked = stack.get(object);
1059
+ if (stacked && stack.get(other)) {
1060
+ return stacked == other;
1061
+ }
1062
+ var result = true;
1063
+ stack.set(object, other);
1064
+ stack.set(other, object);
1065
+ var skipCtor = isPartial;
1066
+ while (++index < objLength) {
1067
+ key = objProps[index];
1068
+ var objValue = object[key], othValue = other[key];
1069
+ if (customizer) {
1070
+ var compared = isPartial
1071
+ ? customizer(othValue, objValue, key, other, object, stack)
1072
+ : customizer(objValue, othValue, key, object, other, stack);
1073
+ }
1074
+ // Recursively compare objects (susceptible to call stack limits).
1075
+ if (!(compared === undefined
1076
+ ? objValue === othValue ||
1077
+ equalFunc(objValue, othValue, bitmask, customizer, stack)
1078
+ : compared)) {
1079
+ result = false;
1080
+ break;
1081
+ }
1082
+ skipCtor || (skipCtor = key == "constructor");
1083
+ }
1084
+ if (result && !skipCtor) {
1085
+ var objCtor = object.constructor, othCtor = other.constructor;
1086
+ // Non `Object` object instances with different constructors are not equal.
1087
+ if (objCtor != othCtor &&
1088
+ "constructor" in object &&
1089
+ "constructor" in other &&
1090
+ !(typeof objCtor == "function" &&
1091
+ objCtor instanceof objCtor &&
1092
+ typeof othCtor == "function" &&
1093
+ othCtor instanceof othCtor)) {
1094
+ result = false;
1095
+ }
1096
+ }
1097
+ stack["delete"](object);
1098
+ stack["delete"](other);
1099
+ return result;
1100
+ }
1101
+ /**
1102
+ * Creates an array of own enumerable property names and symbols of `object`.
1103
+ *
1104
+ * @private
1105
+ * @param {Object} object The object to query.
1106
+ * @returns {Array} Returns the array of property names and symbols.
1107
+ */
1108
+ function getAllKeys(object) {
1109
+ return baseGetAllKeys(object, keys, getSymbols);
1110
+ }
1111
+ /**
1112
+ * Gets the data for `map`.
1113
+ *
1114
+ * @private
1115
+ * @param {Object} map The map to query.
1116
+ * @param {string} key The reference key.
1117
+ * @returns {*} Returns the map data.
1118
+ */
1119
+ function getMapData(map, key) {
1120
+ var data = map.__data__;
1121
+ return isKeyable(key)
1122
+ ? data[typeof key == "string" ? "string" : "hash"]
1123
+ : data.map;
1124
+ }
1125
+ /**
1126
+ * Gets the native function at `key` of `object`.
1127
+ *
1128
+ * @private
1129
+ * @param {Object} object The object to query.
1130
+ * @param {string} key The key of the method to get.
1131
+ * @returns {*} Returns the function if it's native, else `undefined`.
1132
+ */
1133
+ function getNative(object, key) {
1134
+ var value = getValue(object, key);
1135
+ return baseIsNative(value) ? value : undefined;
1136
+ }
1137
+ /**
1138
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
1139
+ *
1140
+ * @private
1141
+ * @param {*} value The value to query.
1142
+ * @returns {string} Returns the raw `toStringTag`.
1143
+ */
1144
+ function getRawTag(value) {
1145
+ var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
1146
+ try {
1147
+ value[symToStringTag] = undefined;
1148
+ var unmasked = true;
1149
+ }
1150
+ catch (e) { }
1151
+ var result = nativeObjectToString.call(value);
1152
+ if (unmasked) {
1153
+ if (isOwn) {
1154
+ value[symToStringTag] = tag;
1155
+ }
1156
+ else {
1157
+ delete value[symToStringTag];
1158
+ }
1159
+ }
1160
+ return result;
1161
+ }
1162
+ /**
1163
+ * Creates an array of the own enumerable symbols of `object`.
1164
+ *
1165
+ * @private
1166
+ * @param {Object} object The object to query.
1167
+ * @returns {Array} Returns the array of symbols.
1168
+ */
1169
+ var getSymbols = !nativeGetSymbols
1170
+ ? stubArray
1171
+ : function (object) {
1172
+ if (object == null) {
1173
+ return [];
1174
+ }
1175
+ object = Object(object);
1176
+ return arrayFilter(nativeGetSymbols(object), function (symbol) {
1177
+ return propertyIsEnumerable.call(object, symbol);
1178
+ });
1179
+ };
1180
+ /**
1181
+ * Gets the `toStringTag` of `value`.
1182
+ *
1183
+ * @private
1184
+ * @param {*} value The value to query.
1185
+ * @returns {string} Returns the `toStringTag`.
1186
+ */
1187
+ var getTag = baseGetTag;
1188
+ // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
1189
+ if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
1190
+ (Map && getTag(new Map()) != mapTag) ||
1191
+ (Promise && getTag(Promise.resolve()) != promiseTag) ||
1192
+ (Set && getTag(new Set()) != setTag) ||
1193
+ (WeakMap && getTag(new WeakMap()) != weakMapTag)) {
1194
+ getTag = function (value) {
1195
+ var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : undefined, ctorString = Ctor ? toSource(Ctor) : "";
1196
+ if (ctorString) {
1197
+ switch (ctorString) {
1198
+ case dataViewCtorString:
1199
+ return dataViewTag;
1200
+ case mapCtorString:
1201
+ return mapTag;
1202
+ case promiseCtorString:
1203
+ return promiseTag;
1204
+ case setCtorString:
1205
+ return setTag;
1206
+ case weakMapCtorString:
1207
+ return weakMapTag;
1208
+ }
1209
+ }
1210
+ return result;
1211
+ };
1212
+ }
1213
+ /**
1214
+ * Checks if `value` is a valid array-like index.
1215
+ *
1216
+ * @private
1217
+ * @param {*} value The value to check.
1218
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
1219
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
1220
+ */
1221
+ function isIndex(value, length) {
1222
+ length = length == null ? MAX_SAFE_INTEGER : length;
1223
+ return (!!length &&
1224
+ (typeof value == "number" || reIsUint.test(value)) &&
1225
+ value > -1 &&
1226
+ value % 1 == 0 &&
1227
+ value < length);
1228
+ }
1229
+ /**
1230
+ * Checks if `value` is suitable for use as unique object key.
1231
+ *
1232
+ * @private
1233
+ * @param {*} value The value to check.
1234
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
1235
+ */
1236
+ function isKeyable(value) {
1237
+ var type = typeof value;
1238
+ return type == "string" ||
1239
+ type == "number" ||
1240
+ type == "symbol" ||
1241
+ type == "boolean"
1242
+ ? value !== "__proto__"
1243
+ : value === null;
1244
+ }
1245
+ /**
1246
+ * Checks if `func` has its source masked.
1247
+ *
1248
+ * @private
1249
+ * @param {Function} func The function to check.
1250
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
1251
+ */
1252
+ function isMasked(func) {
1253
+ return !!maskSrcKey && maskSrcKey in func;
1254
+ }
1255
+ /**
1256
+ * Checks if `value` is likely a prototype object.
1257
+ *
1258
+ * @private
1259
+ * @param {*} value The value to check.
1260
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
1261
+ */
1262
+ function isPrototype(value) {
1263
+ var Ctor = value && value.constructor, proto = (typeof Ctor == "function" && Ctor.prototype) || objectProto;
1264
+ return value === proto;
1265
+ }
1266
+ /**
1267
+ * Converts `value` to a string using `Object.prototype.toString`.
1268
+ *
1269
+ * @private
1270
+ * @param {*} value The value to convert.
1271
+ * @returns {string} Returns the converted string.
1272
+ */
1273
+ function objectToString(value) {
1274
+ return nativeObjectToString.call(value);
1275
+ }
1276
+ /**
1277
+ * Converts `func` to its source code.
1278
+ *
1279
+ * @private
1280
+ * @param {Function} func The function to convert.
1281
+ * @returns {string} Returns the source code.
1282
+ */
1283
+ function toSource(func) {
1284
+ if (func != null) {
1285
+ try {
1286
+ return funcToString.call(func);
1287
+ }
1288
+ catch (e) { }
1289
+ try {
1290
+ return func + "";
1291
+ }
1292
+ catch (e) { }
1293
+ }
1294
+ return "";
1295
+ }
1296
+ /**
1297
+ * Performs a
1298
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
1299
+ * comparison between two values to determine if they are equivalent.
1300
+ *
1301
+ * @static
1302
+ * @memberOf _
1303
+ * @since 4.0.0
1304
+ * @category Lang
1305
+ * @param {*} value The value to compare.
1306
+ * @param {*} other The other value to compare.
1307
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
1308
+ * @example
1309
+ *
1310
+ * var object = { 'a': 1 };
1311
+ * var other = { 'a': 1 };
1312
+ *
1313
+ * _.eq(object, object);
1314
+ * // => true
1315
+ *
1316
+ * _.eq(object, other);
1317
+ * // => false
1318
+ *
1319
+ * _.eq('a', 'a');
1320
+ * // => true
1321
+ *
1322
+ * _.eq('a', Object('a'));
1323
+ * // => false
1324
+ *
1325
+ * _.eq(NaN, NaN);
1326
+ * // => true
1327
+ */
1328
+ function eq(value, other) {
1329
+ return value === other || (value !== value && other !== other);
1330
+ }
1331
+ /**
1332
+ * Checks if `value` is likely an `arguments` object.
1333
+ *
1334
+ * @static
1335
+ * @memberOf _
1336
+ * @since 0.1.0
1337
+ * @category Lang
1338
+ * @param {*} value The value to check.
1339
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
1340
+ * else `false`.
1341
+ * @example
1342
+ *
1343
+ * _.isArguments(function() { return arguments; }());
1344
+ * // => true
1345
+ *
1346
+ * _.isArguments([1, 2, 3]);
1347
+ * // => false
1348
+ */
1349
+ var isArguments = baseIsArguments((function () {
1350
+ return arguments;
1351
+ })())
1352
+ ? baseIsArguments
1353
+ : function (value) {
1354
+ return (isObjectLike(value) &&
1355
+ hasOwnProperty.call(value, "callee") &&
1356
+ !propertyIsEnumerable.call(value, "callee"));
1357
+ };
1358
+ /**
1359
+ * Checks if `value` is classified as an `Array` object.
1360
+ *
1361
+ * @static
1362
+ * @memberOf _
1363
+ * @since 0.1.0
1364
+ * @category Lang
1365
+ * @param {*} value The value to check.
1366
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
1367
+ * @example
1368
+ *
1369
+ * _.isArray([1, 2, 3]);
1370
+ * // => true
1371
+ *
1372
+ * _.isArray(document.body.children);
1373
+ * // => false
1374
+ *
1375
+ * _.isArray('abc');
1376
+ * // => false
1377
+ *
1378
+ * _.isArray(_.noop);
1379
+ * // => false
1380
+ */
1381
+ var isArray = Array.isArray;
1382
+ /**
1383
+ * Checks if `value` is array-like. A value is considered array-like if it's
1384
+ * not a function and has a `value.length` that's an integer greater than or
1385
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
1386
+ *
1387
+ * @static
1388
+ * @memberOf _
1389
+ * @since 4.0.0
1390
+ * @category Lang
1391
+ * @param {*} value The value to check.
1392
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
1393
+ * @example
1394
+ *
1395
+ * _.isArrayLike([1, 2, 3]);
1396
+ * // => true
1397
+ *
1398
+ * _.isArrayLike(document.body.children);
1399
+ * // => true
1400
+ *
1401
+ * _.isArrayLike('abc');
1402
+ * // => true
1403
+ *
1404
+ * _.isArrayLike(_.noop);
1405
+ * // => false
1406
+ */
1407
+ function isArrayLike(value) {
1408
+ return value != null && isLength(value.length) && !isFunction(value);
1409
+ }
1410
+ /**
1411
+ * Checks if `value` is a buffer.
1412
+ *
1413
+ * @static
1414
+ * @memberOf _
1415
+ * @since 4.3.0
1416
+ * @category Lang
1417
+ * @param {*} value The value to check.
1418
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
1419
+ * @example
1420
+ *
1421
+ * _.isBuffer(new Buffer(2));
1422
+ * // => true
1423
+ *
1424
+ * _.isBuffer(new Uint8Array(2));
1425
+ * // => false
1426
+ */
1427
+ var isBuffer = nativeIsBuffer || stubFalse;
1428
+ /**
1429
+ * Performs a deep comparison between two values to determine if they are
1430
+ * equivalent.
1431
+ *
1432
+ * **Note:** This method supports comparing arrays, array buffers, booleans,
1433
+ * date objects, error objects, maps, numbers, `Object` objects, regexes,
1434
+ * sets, strings, symbols, and typed arrays. `Object` objects are compared
1435
+ * by their own, not inherited, enumerable properties. Functions and DOM
1436
+ * nodes are compared by strict equality, i.e. `===`.
1437
+ *
1438
+ * @static
1439
+ * @memberOf _
1440
+ * @since 0.1.0
1441
+ * @category Lang
1442
+ * @param {*} value The value to compare.
1443
+ * @param {*} other The other value to compare.
1444
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
1445
+ * @example
1446
+ *
1447
+ * var object = { 'a': 1 };
1448
+ * var other = { 'a': 1 };
1449
+ *
1450
+ * _.isEqual(object, other);
1451
+ * // => true
1452
+ *
1453
+ * object === other;
1454
+ * // => false
1455
+ */
1456
+ function isEqual(value, other) {
1457
+ return baseIsEqual(value, other);
1458
+ }
1459
+ /**
1460
+ * Checks if `value` is classified as a `Function` object.
1461
+ *
1462
+ * @static
1463
+ * @memberOf _
1464
+ * @since 0.1.0
1465
+ * @category Lang
1466
+ * @param {*} value The value to check.
1467
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
1468
+ * @example
1469
+ *
1470
+ * _.isFunction(_);
1471
+ * // => true
1472
+ *
1473
+ * _.isFunction(/abc/);
1474
+ * // => false
1475
+ */
1476
+ function isFunction(value) {
1477
+ if (!isObject(value)) {
1478
+ return false;
1479
+ }
1480
+ // The use of `Object#toString` avoids issues with the `typeof` operator
1481
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
1482
+ var tag = baseGetTag(value);
1483
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
1484
+ }
1485
+ /**
1486
+ * Checks if `value` is a valid array-like length.
1487
+ *
1488
+ * **Note:** This method is loosely based on
1489
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
1490
+ *
1491
+ * @static
1492
+ * @memberOf _
1493
+ * @since 4.0.0
1494
+ * @category Lang
1495
+ * @param {*} value The value to check.
1496
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
1497
+ * @example
1498
+ *
1499
+ * _.isLength(3);
1500
+ * // => true
1501
+ *
1502
+ * _.isLength(Number.MIN_VALUE);
1503
+ * // => false
1504
+ *
1505
+ * _.isLength(Infinity);
1506
+ * // => false
1507
+ *
1508
+ * _.isLength('3');
1509
+ * // => false
1510
+ */
1511
+ function isLength(value) {
1512
+ return (typeof value == "number" &&
1513
+ value > -1 &&
1514
+ value % 1 == 0 &&
1515
+ value <= MAX_SAFE_INTEGER);
1516
+ }
1517
+ /**
1518
+ * Checks if `value` is the
1519
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
1520
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
1521
+ *
1522
+ * @static
1523
+ * @memberOf _
1524
+ * @since 0.1.0
1525
+ * @category Lang
1526
+ * @param {*} value The value to check.
1527
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
1528
+ * @example
1529
+ *
1530
+ * _.isObject({});
1531
+ * // => true
1532
+ *
1533
+ * _.isObject([1, 2, 3]);
1534
+ * // => true
1535
+ *
1536
+ * _.isObject(_.noop);
1537
+ * // => true
1538
+ *
1539
+ * _.isObject(null);
1540
+ * // => false
1541
+ */
1542
+ function isObject(value) {
1543
+ var type = typeof value;
1544
+ return value != null && (type == "object" || type == "function");
1545
+ }
1546
+ /**
1547
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
1548
+ * and has a `typeof` result of "object".
1549
+ *
1550
+ * @static
1551
+ * @memberOf _
1552
+ * @since 4.0.0
1553
+ * @category Lang
1554
+ * @param {*} value The value to check.
1555
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
1556
+ * @example
1557
+ *
1558
+ * _.isObjectLike({});
1559
+ * // => true
1560
+ *
1561
+ * _.isObjectLike([1, 2, 3]);
1562
+ * // => true
1563
+ *
1564
+ * _.isObjectLike(_.noop);
1565
+ * // => false
1566
+ *
1567
+ * _.isObjectLike(null);
1568
+ * // => false
1569
+ */
1570
+ function isObjectLike(value) {
1571
+ return value != null && typeof value == "object";
1572
+ }
1573
+ /**
1574
+ * Checks if `value` is classified as a typed array.
1575
+ *
1576
+ * @static
1577
+ * @memberOf _
1578
+ * @since 3.0.0
1579
+ * @category Lang
1580
+ * @param {*} value The value to check.
1581
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
1582
+ * @example
1583
+ *
1584
+ * _.isTypedArray(new Uint8Array);
1585
+ * // => true
1586
+ *
1587
+ * _.isTypedArray([]);
1588
+ * // => false
1589
+ */
1590
+ var isTypedArray = nodeIsTypedArray
1591
+ ? baseUnary(nodeIsTypedArray)
1592
+ : baseIsTypedArray;
1593
+ /**
1594
+ * Creates an array of the own enumerable property names of `object`.
1595
+ *
1596
+ * **Note:** Non-object values are coerced to objects. See the
1597
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
1598
+ * for more details.
1599
+ *
1600
+ * @static
1601
+ * @since 0.1.0
1602
+ * @memberOf _
1603
+ * @category Object
1604
+ * @param {Object} object The object to query.
1605
+ * @returns {Array} Returns the array of property names.
1606
+ * @example
1607
+ *
1608
+ * function Foo() {
1609
+ * this.a = 1;
1610
+ * this.b = 2;
1611
+ * }
1612
+ *
1613
+ * Foo.prototype.c = 3;
1614
+ *
1615
+ * _.keys(new Foo);
1616
+ * // => ['a', 'b'] (iteration order is not guaranteed)
1617
+ *
1618
+ * _.keys('hi');
1619
+ * // => ['0', '1']
1620
+ */
1621
+ function keys(object) {
1622
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
1623
+ }
1624
+ /**
1625
+ * This method returns a new empty array.
1626
+ *
1627
+ * @static
1628
+ * @memberOf _
1629
+ * @since 4.13.0
1630
+ * @category Util
1631
+ * @returns {Array} Returns the new empty array.
1632
+ * @example
1633
+ *
1634
+ * var arrays = _.times(2, _.stubArray);
1635
+ *
1636
+ * console.log(arrays);
1637
+ * // => [[], []]
1638
+ *
1639
+ * console.log(arrays[0] === arrays[1]);
1640
+ * // => false
1641
+ */
1642
+ function stubArray() {
1643
+ return [];
1644
+ }
1645
+ /**
1646
+ * This method returns `false`.
1647
+ *
1648
+ * @static
1649
+ * @memberOf _
1650
+ * @since 4.13.0
1651
+ * @category Util
1652
+ * @returns {boolean} Returns `false`.
1653
+ * @example
1654
+ *
1655
+ * _.times(2, _.stubFalse);
1656
+ * // => [false, false]
1657
+ */
1658
+ function stubFalse() {
1659
+ return false;
1660
+ }
1661
+ module.exports = isEqual;