@spark-ui/hooks 17.2.3-beta.1 → 17.2.4-beta.0

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