remix-validated-form 4.6.0 → 4.6.1-beta.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,1292 +1,195 @@
1
1
  import React, { createContext, useDebugValue, useContext, useCallback, useEffect, useMemo, useRef, useLayoutEffect, useState } from "react";
2
2
  import { useActionData, useMatches, useTransition, Form, useSubmit } from "@remix-run/react";
3
- var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
4
- function listCacheClear$1() {
5
- this.__data__ = [];
6
- this.size = 0;
7
- }
8
- var _listCacheClear = listCacheClear$1;
9
- function eq$3(value, other) {
10
- return value === other || value !== value && other !== other;
11
- }
12
- var eq_1 = eq$3;
13
- var eq$2 = eq_1;
14
- function assocIndexOf$4(array, key) {
15
- var length = array.length;
16
- while (length--) {
17
- if (eq$2(array[length][0], key)) {
18
- return length;
19
- }
20
- }
21
- return -1;
22
- }
23
- var _assocIndexOf = assocIndexOf$4;
24
- var assocIndexOf$3 = _assocIndexOf;
25
- var arrayProto = Array.prototype;
26
- var splice = arrayProto.splice;
27
- function listCacheDelete$1(key) {
28
- var data = this.__data__, index = assocIndexOf$3(data, key);
29
- if (index < 0) {
30
- return false;
31
- }
32
- var lastIndex = data.length - 1;
33
- if (index == lastIndex) {
34
- data.pop();
35
- } else {
36
- splice.call(data, index, 1);
37
- }
38
- --this.size;
39
- return true;
40
- }
41
- var _listCacheDelete = listCacheDelete$1;
42
- var assocIndexOf$2 = _assocIndexOf;
43
- function listCacheGet$1(key) {
44
- var data = this.__data__, index = assocIndexOf$2(data, key);
45
- return index < 0 ? void 0 : data[index][1];
46
- }
47
- var _listCacheGet = listCacheGet$1;
48
- var assocIndexOf$1 = _assocIndexOf;
49
- function listCacheHas$1(key) {
50
- return assocIndexOf$1(this.__data__, key) > -1;
51
- }
52
- var _listCacheHas = listCacheHas$1;
53
- var assocIndexOf = _assocIndexOf;
54
- function listCacheSet$1(key, value) {
55
- var data = this.__data__, index = assocIndexOf(data, key);
56
- if (index < 0) {
57
- ++this.size;
58
- data.push([key, value]);
59
- } else {
60
- data[index][1] = value;
61
- }
62
- return this;
63
- }
64
- var _listCacheSet = listCacheSet$1;
65
- var listCacheClear = _listCacheClear, listCacheDelete = _listCacheDelete, listCacheGet = _listCacheGet, listCacheHas = _listCacheHas, listCacheSet = _listCacheSet;
66
- function ListCache$4(entries) {
67
- var index = -1, length = entries == null ? 0 : entries.length;
68
- this.clear();
69
- while (++index < length) {
70
- var entry = entries[index];
71
- this.set(entry[0], entry[1]);
72
- }
73
- }
74
- ListCache$4.prototype.clear = listCacheClear;
75
- ListCache$4.prototype["delete"] = listCacheDelete;
76
- ListCache$4.prototype.get = listCacheGet;
77
- ListCache$4.prototype.has = listCacheHas;
78
- ListCache$4.prototype.set = listCacheSet;
79
- var _ListCache = ListCache$4;
80
- var ListCache$3 = _ListCache;
81
- function stackClear$1() {
82
- this.__data__ = new ListCache$3();
83
- this.size = 0;
84
- }
85
- var _stackClear = stackClear$1;
86
- function stackDelete$1(key) {
87
- var data = this.__data__, result = data["delete"](key);
88
- this.size = data.size;
89
- return result;
90
- }
91
- var _stackDelete = stackDelete$1;
92
- function stackGet$1(key) {
93
- return this.__data__.get(key);
94
- }
95
- var _stackGet = stackGet$1;
96
- function stackHas$1(key) {
97
- return this.__data__.has(key);
98
- }
99
- var _stackHas = stackHas$1;
100
- var freeGlobal$1 = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
101
- var _freeGlobal = freeGlobal$1;
102
- var freeGlobal = _freeGlobal;
103
- var freeSelf = typeof self == "object" && self && self.Object === Object && self;
104
- var root$8 = freeGlobal || freeSelf || Function("return this")();
105
- var _root = root$8;
106
- var root$7 = _root;
107
- var Symbol$7 = root$7.Symbol;
108
- var _Symbol = Symbol$7;
109
- var Symbol$6 = _Symbol;
110
- var objectProto$f = Object.prototype;
111
- var hasOwnProperty$c = objectProto$f.hasOwnProperty;
112
- var nativeObjectToString$1 = objectProto$f.toString;
113
- var symToStringTag$1 = Symbol$6 ? Symbol$6.toStringTag : void 0;
114
- function getRawTag$1(value) {
115
- var isOwn = hasOwnProperty$c.call(value, symToStringTag$1), tag = value[symToStringTag$1];
116
- try {
117
- value[symToStringTag$1] = void 0;
118
- var unmasked = true;
119
- } catch (e2) {
120
- }
121
- var result = nativeObjectToString$1.call(value);
122
- if (unmasked) {
123
- if (isOwn) {
124
- value[symToStringTag$1] = tag;
125
- } else {
126
- delete value[symToStringTag$1];
127
- }
128
- }
129
- return result;
130
- }
131
- var _getRawTag = getRawTag$1;
132
- var objectProto$e = Object.prototype;
133
- var nativeObjectToString = objectProto$e.toString;
134
- function objectToString$1(value) {
135
- return nativeObjectToString.call(value);
136
- }
137
- var _objectToString = objectToString$1;
138
- var Symbol$5 = _Symbol, getRawTag = _getRawTag, objectToString = _objectToString;
139
- var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
140
- var symToStringTag = Symbol$5 ? Symbol$5.toStringTag : void 0;
141
- function baseGetTag$6(value) {
142
- if (value == null) {
143
- return value === void 0 ? undefinedTag : nullTag;
144
- }
145
- return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
146
- }
147
- var _baseGetTag = baseGetTag$6;
148
- function isObject$7(value) {
149
- var type = typeof value;
150
- return value != null && (type == "object" || type == "function");
151
- }
152
- var isObject_1 = isObject$7;
153
- var baseGetTag$5 = _baseGetTag, isObject$6 = isObject_1;
154
- var asyncTag = "[object AsyncFunction]", funcTag$2 = "[object Function]", genTag$1 = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
155
- function isFunction$2(value) {
156
- if (!isObject$6(value)) {
157
- return false;
158
- }
159
- var tag = baseGetTag$5(value);
160
- return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
161
- }
162
- var isFunction_1 = isFunction$2;
163
- var root$6 = _root;
164
- var coreJsData$1 = root$6["__core-js_shared__"];
165
- var _coreJsData = coreJsData$1;
166
- var coreJsData = _coreJsData;
167
- var maskSrcKey = function() {
168
- var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
169
- return uid ? "Symbol(src)_1." + uid : "";
170
- }();
171
- function isMasked$1(func) {
172
- return !!maskSrcKey && maskSrcKey in func;
173
- }
174
- var _isMasked = isMasked$1;
175
- var funcProto$2 = Function.prototype;
176
- var funcToString$2 = funcProto$2.toString;
177
- function toSource$2(func) {
178
- if (func != null) {
179
- try {
180
- return funcToString$2.call(func);
181
- } catch (e2) {
3
+ var __spreadArray = globalThis && globalThis.__spreadArray || function(to, from2, pack) {
4
+ if (pack || arguments.length === 2)
5
+ for (var i2 = 0, l2 = from2.length, ar; i2 < l2; i2++) {
6
+ if (ar || !(i2 in from2)) {
7
+ if (!ar)
8
+ ar = Array.prototype.slice.call(from2, 0, i2);
9
+ ar[i2] = from2[i2];
10
+ }
182
11
  }
183
- try {
184
- return func + "";
185
- } catch (e2) {
12
+ return to.concat(ar || Array.prototype.slice.call(from2));
13
+ };
14
+ function purry(fn2, args, lazy) {
15
+ var diff = fn2.length - args.length;
16
+ var arrayArgs = Array.from(args);
17
+ if (diff === 0) {
18
+ return fn2.apply(void 0, arrayArgs);
19
+ }
20
+ if (diff === 1) {
21
+ var ret = function(data) {
22
+ return fn2.apply(void 0, __spreadArray([data], arrayArgs, false));
23
+ };
24
+ if (lazy || fn2.lazy) {
25
+ ret.lazy = lazy || fn2.lazy;
26
+ ret.lazyArgs = args;
186
27
  }
28
+ return ret;
187
29
  }
188
- return "";
189
- }
190
- var _toSource = toSource$2;
191
- var isFunction$1 = isFunction_1, isMasked = _isMasked, isObject$5 = isObject_1, toSource$1 = _toSource;
192
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
193
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
194
- var funcProto$1 = Function.prototype, objectProto$d = Object.prototype;
195
- var funcToString$1 = funcProto$1.toString;
196
- var hasOwnProperty$b = objectProto$d.hasOwnProperty;
197
- var reIsNative = RegExp(
198
- "^" + funcToString$1.call(hasOwnProperty$b).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
199
- );
200
- function baseIsNative$1(value) {
201
- if (!isObject$5(value) || isMasked(value)) {
202
- return false;
203
- }
204
- var pattern = isFunction$1(value) ? reIsNative : reIsHostCtor;
205
- return pattern.test(toSource$1(value));
206
- }
207
- var _baseIsNative = baseIsNative$1;
208
- function getValue$1(object, key) {
209
- return object == null ? void 0 : object[key];
210
- }
211
- var _getValue = getValue$1;
212
- var baseIsNative = _baseIsNative, getValue = _getValue;
213
- function getNative$7(object, key) {
214
- var value = getValue(object, key);
215
- return baseIsNative(value) ? value : void 0;
216
- }
217
- var _getNative = getNative$7;
218
- var getNative$6 = _getNative, root$5 = _root;
219
- var Map$4 = getNative$6(root$5, "Map");
220
- var _Map = Map$4;
221
- var getNative$5 = _getNative;
222
- var nativeCreate$4 = getNative$5(Object, "create");
223
- var _nativeCreate = nativeCreate$4;
224
- var nativeCreate$3 = _nativeCreate;
225
- function hashClear$1() {
226
- this.__data__ = nativeCreate$3 ? nativeCreate$3(null) : {};
227
- this.size = 0;
228
- }
229
- var _hashClear = hashClear$1;
230
- function hashDelete$1(key) {
231
- var result = this.has(key) && delete this.__data__[key];
232
- this.size -= result ? 1 : 0;
233
- return result;
234
- }
235
- var _hashDelete = hashDelete$1;
236
- var nativeCreate$2 = _nativeCreate;
237
- var HASH_UNDEFINED$2 = "__lodash_hash_undefined__";
238
- var objectProto$c = Object.prototype;
239
- var hasOwnProperty$a = objectProto$c.hasOwnProperty;
240
- function hashGet$1(key) {
241
- var data = this.__data__;
242
- if (nativeCreate$2) {
243
- var result = data[key];
244
- return result === HASH_UNDEFINED$2 ? void 0 : result;
245
- }
246
- return hasOwnProperty$a.call(data, key) ? data[key] : void 0;
247
- }
248
- var _hashGet = hashGet$1;
249
- var nativeCreate$1 = _nativeCreate;
250
- var objectProto$b = Object.prototype;
251
- var hasOwnProperty$9 = objectProto$b.hasOwnProperty;
252
- function hashHas$1(key) {
253
- var data = this.__data__;
254
- return nativeCreate$1 ? data[key] !== void 0 : hasOwnProperty$9.call(data, key);
255
- }
256
- var _hashHas = hashHas$1;
257
- var nativeCreate = _nativeCreate;
258
- var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
259
- function hashSet$1(key, value) {
260
- var data = this.__data__;
261
- this.size += this.has(key) ? 0 : 1;
262
- data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED$1 : value;
263
- return this;
264
- }
265
- var _hashSet = hashSet$1;
266
- var hashClear = _hashClear, hashDelete = _hashDelete, hashGet = _hashGet, hashHas = _hashHas, hashSet = _hashSet;
267
- function Hash$1(entries) {
268
- var index = -1, length = entries == null ? 0 : entries.length;
269
- this.clear();
270
- while (++index < length) {
271
- var entry = entries[index];
272
- this.set(entry[0], entry[1]);
273
- }
274
- }
275
- Hash$1.prototype.clear = hashClear;
276
- Hash$1.prototype["delete"] = hashDelete;
277
- Hash$1.prototype.get = hashGet;
278
- Hash$1.prototype.has = hashHas;
279
- Hash$1.prototype.set = hashSet;
280
- var _Hash = Hash$1;
281
- var Hash = _Hash, ListCache$2 = _ListCache, Map$3 = _Map;
282
- function mapCacheClear$1() {
283
- this.size = 0;
284
- this.__data__ = {
285
- "hash": new Hash(),
286
- "map": new (Map$3 || ListCache$2)(),
287
- "string": new Hash()
288
- };
289
- }
290
- var _mapCacheClear = mapCacheClear$1;
291
- function isKeyable$1(value) {
292
- var type = typeof value;
293
- return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
294
- }
295
- var _isKeyable = isKeyable$1;
296
- var isKeyable = _isKeyable;
297
- function getMapData$4(map, key) {
298
- var data = map.__data__;
299
- return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
300
- }
301
- var _getMapData = getMapData$4;
302
- var getMapData$3 = _getMapData;
303
- function mapCacheDelete$1(key) {
304
- var result = getMapData$3(this, key)["delete"](key);
305
- this.size -= result ? 1 : 0;
306
- return result;
307
- }
308
- var _mapCacheDelete = mapCacheDelete$1;
309
- var getMapData$2 = _getMapData;
310
- function mapCacheGet$1(key) {
311
- return getMapData$2(this, key).get(key);
312
- }
313
- var _mapCacheGet = mapCacheGet$1;
314
- var getMapData$1 = _getMapData;
315
- function mapCacheHas$1(key) {
316
- return getMapData$1(this, key).has(key);
317
- }
318
- var _mapCacheHas = mapCacheHas$1;
319
- var getMapData = _getMapData;
320
- function mapCacheSet$1(key, value) {
321
- var data = getMapData(this, key), size = data.size;
322
- data.set(key, value);
323
- this.size += data.size == size ? 0 : 1;
324
- return this;
325
- }
326
- var _mapCacheSet = mapCacheSet$1;
327
- var mapCacheClear = _mapCacheClear, mapCacheDelete = _mapCacheDelete, mapCacheGet = _mapCacheGet, mapCacheHas = _mapCacheHas, mapCacheSet = _mapCacheSet;
328
- function MapCache$3(entries) {
329
- var index = -1, length = entries == null ? 0 : entries.length;
330
- this.clear();
331
- while (++index < length) {
332
- var entry = entries[index];
333
- this.set(entry[0], entry[1]);
334
- }
30
+ throw new Error("Wrong number of arguments");
335
31
  }
336
- MapCache$3.prototype.clear = mapCacheClear;
337
- MapCache$3.prototype["delete"] = mapCacheDelete;
338
- MapCache$3.prototype.get = mapCacheGet;
339
- MapCache$3.prototype.has = mapCacheHas;
340
- MapCache$3.prototype.set = mapCacheSet;
341
- var _MapCache = MapCache$3;
342
- var ListCache$1 = _ListCache, Map$2 = _Map, MapCache$2 = _MapCache;
343
- var LARGE_ARRAY_SIZE$1 = 200;
344
- function stackSet$1(key, value) {
345
- var data = this.__data__;
346
- if (data instanceof ListCache$1) {
347
- var pairs = data.__data__;
348
- if (!Map$2 || pairs.length < LARGE_ARRAY_SIZE$1 - 1) {
349
- pairs.push([key, value]);
350
- this.size = ++data.size;
351
- return this;
32
+ function _reduceLazy(array, lazy, indexed) {
33
+ return array.reduce(function(acc, item, index) {
34
+ var result = indexed ? lazy(item, index, array) : lazy(item);
35
+ if (result.hasMany === true) {
36
+ acc.push.apply(acc, result.next);
37
+ } else if (result.hasNext === true) {
38
+ acc.push(result.next);
352
39
  }
353
- data = this.__data__ = new MapCache$2(pairs);
354
- }
355
- data.set(key, value);
356
- this.size = data.size;
357
- return this;
358
- }
359
- var _stackSet = stackSet$1;
360
- var ListCache = _ListCache, stackClear = _stackClear, stackDelete = _stackDelete, stackGet = _stackGet, stackHas = _stackHas, stackSet = _stackSet;
361
- function Stack$3(entries) {
362
- var data = this.__data__ = new ListCache(entries);
363
- this.size = data.size;
364
- }
365
- Stack$3.prototype.clear = stackClear;
366
- Stack$3.prototype["delete"] = stackDelete;
367
- Stack$3.prototype.get = stackGet;
368
- Stack$3.prototype.has = stackHas;
369
- Stack$3.prototype.set = stackSet;
370
- var _Stack = Stack$3;
371
- var HASH_UNDEFINED = "__lodash_hash_undefined__";
372
- function setCacheAdd$1(value) {
373
- this.__data__.set(value, HASH_UNDEFINED);
374
- return this;
375
- }
376
- var _setCacheAdd = setCacheAdd$1;
377
- function setCacheHas$1(value) {
378
- return this.__data__.has(value);
379
- }
380
- var _setCacheHas = setCacheHas$1;
381
- var MapCache$1 = _MapCache, setCacheAdd = _setCacheAdd, setCacheHas = _setCacheHas;
382
- function SetCache$2(values) {
383
- var index = -1, length = values == null ? 0 : values.length;
384
- this.__data__ = new MapCache$1();
385
- while (++index < length) {
386
- this.add(values[index]);
387
- }
40
+ return acc;
41
+ }, []);
388
42
  }
389
- SetCache$2.prototype.add = SetCache$2.prototype.push = setCacheAdd;
390
- SetCache$2.prototype.has = setCacheHas;
391
- var _SetCache = SetCache$2;
392
- function arraySome$1(array, predicate) {
393
- var index = -1, length = array == null ? 0 : array.length;
394
- while (++index < length) {
395
- if (predicate(array[index], index, array)) {
396
- return true;
397
- }
398
- }
399
- return false;
400
- }
401
- var _arraySome = arraySome$1;
402
- function cacheHas$2(cache, key) {
403
- return cache.has(key);
404
- }
405
- var _cacheHas = cacheHas$2;
406
- var SetCache$1 = _SetCache, arraySome = _arraySome, cacheHas$1 = _cacheHas;
407
- var COMPARE_PARTIAL_FLAG$5 = 1, COMPARE_UNORDERED_FLAG$3 = 2;
408
- function equalArrays$2(array, other, bitmask, customizer, equalFunc, stack) {
409
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG$5, arrLength = array.length, othLength = other.length;
410
- if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
411
- return false;
412
- }
413
- var arrStacked = stack.get(array);
414
- var othStacked = stack.get(other);
415
- if (arrStacked && othStacked) {
416
- return arrStacked == other && othStacked == array;
417
- }
418
- var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG$3 ? new SetCache$1() : void 0;
419
- stack.set(array, other);
420
- stack.set(other, array);
421
- while (++index < arrLength) {
422
- var arrValue = array[index], othValue = other[index];
423
- if (customizer) {
424
- var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
425
- }
426
- if (compared !== void 0) {
427
- if (compared) {
428
- continue;
429
- }
430
- result = false;
431
- break;
432
- }
433
- if (seen) {
434
- if (!arraySome(other, function(othValue2, othIndex) {
435
- if (!cacheHas$1(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) {
436
- return seen.push(othIndex);
437
- }
438
- })) {
439
- result = false;
440
- break;
441
- }
442
- } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
443
- result = false;
444
- break;
445
- }
446
- }
447
- stack["delete"](array);
448
- stack["delete"](other);
449
- return result;
450
- }
451
- var _equalArrays = equalArrays$2;
452
- var root$4 = _root;
453
- var Uint8Array$2 = root$4.Uint8Array;
454
- var _Uint8Array = Uint8Array$2;
455
- function mapToArray$1(map) {
456
- var index = -1, result = Array(map.size);
457
- map.forEach(function(value, key) {
458
- result[++index] = [key, value];
459
- });
460
- return result;
43
+ var isArray = Array.isArray;
44
+ var keyList = Object.keys;
45
+ var hasProp = Object.prototype.hasOwnProperty;
46
+ function equals() {
47
+ return purry(_equals, arguments);
461
48
  }
462
- var _mapToArray = mapToArray$1;
463
- function setToArray$3(set2) {
464
- var index = -1, result = Array(set2.size);
465
- set2.forEach(function(value) {
466
- result[++index] = value;
467
- });
468
- return result;
469
- }
470
- var _setToArray = setToArray$3;
471
- var Symbol$4 = _Symbol, Uint8Array$1 = _Uint8Array, eq$1 = eq_1, equalArrays$1 = _equalArrays, mapToArray = _mapToArray, setToArray$2 = _setToArray;
472
- var COMPARE_PARTIAL_FLAG$4 = 1, COMPARE_UNORDERED_FLAG$2 = 2;
473
- var boolTag$3 = "[object Boolean]", dateTag$3 = "[object Date]", errorTag$2 = "[object Error]", mapTag$5 = "[object Map]", numberTag$3 = "[object Number]", regexpTag$3 = "[object RegExp]", setTag$5 = "[object Set]", stringTag$3 = "[object String]", symbolTag$3 = "[object Symbol]";
474
- var arrayBufferTag$3 = "[object ArrayBuffer]", dataViewTag$4 = "[object DataView]";
475
- var symbolProto$2 = Symbol$4 ? Symbol$4.prototype : void 0, symbolValueOf$1 = symbolProto$2 ? symbolProto$2.valueOf : void 0;
476
- function equalByTag$1(object, other, tag, bitmask, customizer, equalFunc, stack) {
477
- switch (tag) {
478
- case dataViewTag$4:
479
- if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
49
+ function _equals(a2, b2) {
50
+ if (a2 === b2) {
51
+ return true;
52
+ }
53
+ if (a2 && b2 && typeof a2 === "object" && typeof b2 === "object") {
54
+ var arrA = isArray(a2);
55
+ var arrB = isArray(b2);
56
+ var i2 = void 0;
57
+ var length = void 0;
58
+ var key = void 0;
59
+ if (arrA && arrB) {
60
+ length = a2.length;
61
+ if (length !== b2.length) {
480
62
  return false;
481
63
  }
482
- object = object.buffer;
483
- other = other.buffer;
484
- case arrayBufferTag$3:
485
- if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array$1(object), new Uint8Array$1(other))) {
486
- return false;
64
+ for (i2 = length; i2-- !== 0; ) {
65
+ if (!equals(a2[i2], b2[i2])) {
66
+ return false;
67
+ }
487
68
  }
488
69
  return true;
489
- case boolTag$3:
490
- case dateTag$3:
491
- case numberTag$3:
492
- return eq$1(+object, +other);
493
- case errorTag$2:
494
- return object.name == other.name && object.message == other.message;
495
- case regexpTag$3:
496
- case stringTag$3:
497
- return object == other + "";
498
- case mapTag$5:
499
- var convert = mapToArray;
500
- case setTag$5:
501
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG$4;
502
- convert || (convert = setToArray$2);
503
- if (object.size != other.size && !isPartial) {
504
- return false;
505
- }
506
- var stacked = stack.get(object);
507
- if (stacked) {
508
- return stacked == other;
509
- }
510
- bitmask |= COMPARE_UNORDERED_FLAG$2;
511
- stack.set(object, other);
512
- var result = equalArrays$1(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
513
- stack["delete"](object);
514
- return result;
515
- case symbolTag$3:
516
- if (symbolValueOf$1) {
517
- return symbolValueOf$1.call(object) == symbolValueOf$1.call(other);
518
- }
519
- }
520
- return false;
521
- }
522
- var _equalByTag = equalByTag$1;
523
- function arrayPush$3(array, values) {
524
- var index = -1, length = values.length, offset = array.length;
525
- while (++index < length) {
526
- array[offset + index] = values[index];
527
- }
528
- return array;
529
- }
530
- var _arrayPush = arrayPush$3;
531
- var isArray$a = Array.isArray;
532
- var isArray_1 = isArray$a;
533
- var arrayPush$2 = _arrayPush, isArray$9 = isArray_1;
534
- function baseGetAllKeys$2(object, keysFunc, symbolsFunc) {
535
- var result = keysFunc(object);
536
- return isArray$9(object) ? result : arrayPush$2(result, symbolsFunc(object));
537
- }
538
- var _baseGetAllKeys = baseGetAllKeys$2;
539
- function arrayFilter$1(array, predicate) {
540
- var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
541
- while (++index < length) {
542
- var value = array[index];
543
- if (predicate(value, index, array)) {
544
- result[resIndex++] = value;
545
- }
546
- }
547
- return result;
548
- }
549
- var _arrayFilter = arrayFilter$1;
550
- function stubArray$2() {
551
- return [];
552
- }
553
- var stubArray_1 = stubArray$2;
554
- var arrayFilter = _arrayFilter, stubArray$1 = stubArray_1;
555
- var objectProto$a = Object.prototype;
556
- var propertyIsEnumerable$1 = objectProto$a.propertyIsEnumerable;
557
- var nativeGetSymbols$1 = Object.getOwnPropertySymbols;
558
- var getSymbols$3 = !nativeGetSymbols$1 ? stubArray$1 : function(object) {
559
- if (object == null) {
560
- return [];
561
- }
562
- object = Object(object);
563
- return arrayFilter(nativeGetSymbols$1(object), function(symbol) {
564
- return propertyIsEnumerable$1.call(object, symbol);
565
- });
566
- };
567
- var _getSymbols = getSymbols$3;
568
- function baseTimes$1(n2, iteratee) {
569
- var index = -1, result = Array(n2);
570
- while (++index < n2) {
571
- result[index] = iteratee(index);
572
- }
573
- return result;
574
- }
575
- var _baseTimes = baseTimes$1;
576
- function isObjectLike$8(value) {
577
- return value != null && typeof value == "object";
578
- }
579
- var isObjectLike_1 = isObjectLike$8;
580
- var baseGetTag$4 = _baseGetTag, isObjectLike$7 = isObjectLike_1;
581
- var argsTag$3 = "[object Arguments]";
582
- function baseIsArguments$1(value) {
583
- return isObjectLike$7(value) && baseGetTag$4(value) == argsTag$3;
584
- }
585
- var _baseIsArguments = baseIsArguments$1;
586
- var baseIsArguments = _baseIsArguments, isObjectLike$6 = isObjectLike_1;
587
- var objectProto$9 = Object.prototype;
588
- var hasOwnProperty$8 = objectProto$9.hasOwnProperty;
589
- var propertyIsEnumerable = objectProto$9.propertyIsEnumerable;
590
- var isArguments$3 = baseIsArguments(function() {
591
- return arguments;
592
- }()) ? baseIsArguments : function(value) {
593
- return isObjectLike$6(value) && hasOwnProperty$8.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
594
- };
595
- var isArguments_1 = isArguments$3;
596
- var isBuffer$3 = { exports: {} };
597
- function stubFalse() {
598
- return false;
599
- }
600
- var stubFalse_1 = stubFalse;
601
- (function(module, exports) {
602
- var root2 = _root, stubFalse2 = stubFalse_1;
603
- var freeExports = exports && !exports.nodeType && exports;
604
- var freeModule = freeExports && true && module && !module.nodeType && module;
605
- var moduleExports = freeModule && freeModule.exports === freeExports;
606
- var Buffer = moduleExports ? root2.Buffer : void 0;
607
- var nativeIsBuffer = Buffer ? Buffer.isBuffer : void 0;
608
- var isBuffer2 = nativeIsBuffer || stubFalse2;
609
- module.exports = isBuffer2;
610
- })(isBuffer$3, isBuffer$3.exports);
611
- var MAX_SAFE_INTEGER$1 = 9007199254740991;
612
- var reIsUint = /^(?:0|[1-9]\d*)$/;
613
- function isIndex$3(value, length) {
614
- var type = typeof value;
615
- length = length == null ? MAX_SAFE_INTEGER$1 : length;
616
- return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
617
- }
618
- var _isIndex = isIndex$3;
619
- var MAX_SAFE_INTEGER = 9007199254740991;
620
- function isLength$3(value) {
621
- return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
622
- }
623
- var isLength_1 = isLength$3;
624
- var baseGetTag$3 = _baseGetTag, isLength$2 = isLength_1, isObjectLike$5 = isObjectLike_1;
625
- var argsTag$2 = "[object Arguments]", arrayTag$2 = "[object Array]", boolTag$2 = "[object Boolean]", dateTag$2 = "[object Date]", errorTag$1 = "[object Error]", funcTag$1 = "[object Function]", mapTag$4 = "[object Map]", numberTag$2 = "[object Number]", objectTag$4 = "[object Object]", regexpTag$2 = "[object RegExp]", setTag$4 = "[object Set]", stringTag$2 = "[object String]", weakMapTag$2 = "[object WeakMap]";
626
- var arrayBufferTag$2 = "[object ArrayBuffer]", dataViewTag$3 = "[object DataView]", float32Tag$2 = "[object Float32Array]", float64Tag$2 = "[object Float64Array]", int8Tag$2 = "[object Int8Array]", int16Tag$2 = "[object Int16Array]", int32Tag$2 = "[object Int32Array]", uint8Tag$2 = "[object Uint8Array]", uint8ClampedTag$2 = "[object Uint8ClampedArray]", uint16Tag$2 = "[object Uint16Array]", uint32Tag$2 = "[object Uint32Array]";
627
- var typedArrayTags = {};
628
- typedArrayTags[float32Tag$2] = typedArrayTags[float64Tag$2] = typedArrayTags[int8Tag$2] = typedArrayTags[int16Tag$2] = typedArrayTags[int32Tag$2] = typedArrayTags[uint8Tag$2] = typedArrayTags[uint8ClampedTag$2] = typedArrayTags[uint16Tag$2] = typedArrayTags[uint32Tag$2] = true;
629
- typedArrayTags[argsTag$2] = typedArrayTags[arrayTag$2] = typedArrayTags[arrayBufferTag$2] = typedArrayTags[boolTag$2] = typedArrayTags[dataViewTag$3] = typedArrayTags[dateTag$2] = typedArrayTags[errorTag$1] = typedArrayTags[funcTag$1] = typedArrayTags[mapTag$4] = typedArrayTags[numberTag$2] = typedArrayTags[objectTag$4] = typedArrayTags[regexpTag$2] = typedArrayTags[setTag$4] = typedArrayTags[stringTag$2] = typedArrayTags[weakMapTag$2] = false;
630
- function baseIsTypedArray$1(value) {
631
- return isObjectLike$5(value) && isLength$2(value.length) && !!typedArrayTags[baseGetTag$3(value)];
632
- }
633
- var _baseIsTypedArray = baseIsTypedArray$1;
634
- function baseUnary$3(func) {
635
- return function(value) {
636
- return func(value);
637
- };
638
- }
639
- var _baseUnary = baseUnary$3;
640
- var _nodeUtil = { exports: {} };
641
- (function(module, exports) {
642
- var freeGlobal2 = _freeGlobal;
643
- var freeExports = exports && !exports.nodeType && exports;
644
- var freeModule = freeExports && true && module && !module.nodeType && module;
645
- var moduleExports = freeModule && freeModule.exports === freeExports;
646
- var freeProcess = moduleExports && freeGlobal2.process;
647
- var nodeUtil2 = function() {
648
- try {
649
- var types = freeModule && freeModule.require && freeModule.require("util").types;
650
- if (types) {
651
- return types;
652
- }
653
- return freeProcess && freeProcess.binding && freeProcess.binding("util");
654
- } catch (e2) {
655
70
  }
656
- }();
657
- module.exports = nodeUtil2;
658
- })(_nodeUtil, _nodeUtil.exports);
659
- var baseIsTypedArray = _baseIsTypedArray, baseUnary$2 = _baseUnary, nodeUtil$2 = _nodeUtil.exports;
660
- var nodeIsTypedArray = nodeUtil$2 && nodeUtil$2.isTypedArray;
661
- var isTypedArray$2 = nodeIsTypedArray ? baseUnary$2(nodeIsTypedArray) : baseIsTypedArray;
662
- var isTypedArray_1 = isTypedArray$2;
663
- var baseTimes = _baseTimes, isArguments$2 = isArguments_1, isArray$8 = isArray_1, isBuffer$2 = isBuffer$3.exports, isIndex$2 = _isIndex, isTypedArray$1 = isTypedArray_1;
664
- var objectProto$8 = Object.prototype;
665
- var hasOwnProperty$7 = objectProto$8.hasOwnProperty;
666
- function arrayLikeKeys$2(value, inherited) {
667
- var isArr = isArray$8(value), isArg = !isArr && isArguments$2(value), isBuff = !isArr && !isArg && isBuffer$2(value), isType = !isArr && !isArg && !isBuff && isTypedArray$1(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
668
- for (var key in value) {
669
- if ((inherited || hasOwnProperty$7.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || isIndex$2(key, length)))) {
670
- result.push(key);
671
- }
672
- }
673
- return result;
674
- }
675
- var _arrayLikeKeys = arrayLikeKeys$2;
676
- var objectProto$7 = Object.prototype;
677
- function isPrototype$3(value) {
678
- var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$7;
679
- return value === proto;
680
- }
681
- var _isPrototype = isPrototype$3;
682
- function overArg$2(func, transform) {
683
- return function(arg) {
684
- return func(transform(arg));
685
- };
686
- }
687
- var _overArg = overArg$2;
688
- var overArg$1 = _overArg;
689
- var nativeKeys$1 = overArg$1(Object.keys, Object);
690
- var _nativeKeys = nativeKeys$1;
691
- var isPrototype$2 = _isPrototype, nativeKeys = _nativeKeys;
692
- var objectProto$6 = Object.prototype;
693
- var hasOwnProperty$6 = objectProto$6.hasOwnProperty;
694
- function baseKeys$1(object) {
695
- if (!isPrototype$2(object)) {
696
- return nativeKeys(object);
697
- }
698
- var result = [];
699
- for (var key in Object(object)) {
700
- if (hasOwnProperty$6.call(object, key) && key != "constructor") {
701
- result.push(key);
702
- }
703
- }
704
- return result;
705
- }
706
- var _baseKeys = baseKeys$1;
707
- var isFunction = isFunction_1, isLength$1 = isLength_1;
708
- function isArrayLike$2(value) {
709
- return value != null && isLength$1(value.length) && !isFunction(value);
710
- }
711
- var isArrayLike_1 = isArrayLike$2;
712
- var arrayLikeKeys$1 = _arrayLikeKeys, baseKeys = _baseKeys, isArrayLike$1 = isArrayLike_1;
713
- function keys$4(object) {
714
- return isArrayLike$1(object) ? arrayLikeKeys$1(object) : baseKeys(object);
715
- }
716
- var keys_1 = keys$4;
717
- var baseGetAllKeys$1 = _baseGetAllKeys, getSymbols$2 = _getSymbols, keys$3 = keys_1;
718
- function getAllKeys$2(object) {
719
- return baseGetAllKeys$1(object, keys$3, getSymbols$2);
720
- }
721
- var _getAllKeys = getAllKeys$2;
722
- var getAllKeys$1 = _getAllKeys;
723
- var COMPARE_PARTIAL_FLAG$3 = 1;
724
- var objectProto$5 = Object.prototype;
725
- var hasOwnProperty$5 = objectProto$5.hasOwnProperty;
726
- function equalObjects$1(object, other, bitmask, customizer, equalFunc, stack) {
727
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3, objProps = getAllKeys$1(object), objLength = objProps.length, othProps = getAllKeys$1(other), othLength = othProps.length;
728
- if (objLength != othLength && !isPartial) {
729
- return false;
730
- }
731
- var index = objLength;
732
- while (index--) {
733
- var key = objProps[index];
734
- if (!(isPartial ? key in other : hasOwnProperty$5.call(other, key))) {
71
+ if (arrA !== arrB) {
735
72
  return false;
736
73
  }
737
- }
738
- var objStacked = stack.get(object);
739
- var othStacked = stack.get(other);
740
- if (objStacked && othStacked) {
741
- return objStacked == other && othStacked == object;
742
- }
743
- var result = true;
744
- stack.set(object, other);
745
- stack.set(other, object);
746
- var skipCtor = isPartial;
747
- while (++index < objLength) {
748
- key = objProps[index];
749
- var objValue = object[key], othValue = other[key];
750
- if (customizer) {
751
- var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
752
- }
753
- if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
754
- result = false;
755
- break;
756
- }
757
- skipCtor || (skipCtor = key == "constructor");
758
- }
759
- if (result && !skipCtor) {
760
- var objCtor = object.constructor, othCtor = other.constructor;
761
- if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
762
- result = false;
74
+ var dateA = a2 instanceof Date;
75
+ var dateB = b2 instanceof Date;
76
+ if (dateA !== dateB) {
77
+ return false;
763
78
  }
764
- }
765
- stack["delete"](object);
766
- stack["delete"](other);
767
- return result;
768
- }
769
- var _equalObjects = equalObjects$1;
770
- var getNative$4 = _getNative, root$3 = _root;
771
- var DataView$1 = getNative$4(root$3, "DataView");
772
- var _DataView = DataView$1;
773
- var getNative$3 = _getNative, root$2 = _root;
774
- var Promise$2 = getNative$3(root$2, "Promise");
775
- var _Promise = Promise$2;
776
- var getNative$2 = _getNative, root$1 = _root;
777
- var Set$3 = getNative$2(root$1, "Set");
778
- var _Set = Set$3;
779
- var getNative$1 = _getNative, root = _root;
780
- var WeakMap$1 = getNative$1(root, "WeakMap");
781
- var _WeakMap = WeakMap$1;
782
- var DataView = _DataView, Map$1 = _Map, Promise$1 = _Promise, Set$2 = _Set, WeakMap = _WeakMap, baseGetTag$2 = _baseGetTag, toSource = _toSource;
783
- var mapTag$3 = "[object Map]", objectTag$3 = "[object Object]", promiseTag = "[object Promise]", setTag$3 = "[object Set]", weakMapTag$1 = "[object WeakMap]";
784
- var dataViewTag$2 = "[object DataView]";
785
- var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map$1), promiseCtorString = toSource(Promise$1), setCtorString = toSource(Set$2), weakMapCtorString = toSource(WeakMap);
786
- var getTag$4 = baseGetTag$2;
787
- if (DataView && getTag$4(new DataView(new ArrayBuffer(1))) != dataViewTag$2 || Map$1 && getTag$4(new Map$1()) != mapTag$3 || Promise$1 && getTag$4(Promise$1.resolve()) != promiseTag || Set$2 && getTag$4(new Set$2()) != setTag$3 || WeakMap && getTag$4(new WeakMap()) != weakMapTag$1) {
788
- getTag$4 = function(value) {
789
- var result = baseGetTag$2(value), Ctor = result == objectTag$3 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
790
- if (ctorString) {
791
- switch (ctorString) {
792
- case dataViewCtorString:
793
- return dataViewTag$2;
794
- case mapCtorString:
795
- return mapTag$3;
796
- case promiseCtorString:
797
- return promiseTag;
798
- case setCtorString:
799
- return setTag$3;
800
- case weakMapCtorString:
801
- return weakMapTag$1;
802
- }
79
+ if (dateA && dateB) {
80
+ return a2.getTime() === b2.getTime();
803
81
  }
804
- return result;
805
- };
806
- }
807
- var _getTag = getTag$4;
808
- var Stack$2 = _Stack, equalArrays = _equalArrays, equalByTag = _equalByTag, equalObjects = _equalObjects, getTag$3 = _getTag, isArray$7 = isArray_1, isBuffer$1 = isBuffer$3.exports, isTypedArray = isTypedArray_1;
809
- var COMPARE_PARTIAL_FLAG$2 = 1;
810
- var argsTag$1 = "[object Arguments]", arrayTag$1 = "[object Array]", objectTag$2 = "[object Object]";
811
- var objectProto$4 = Object.prototype;
812
- var hasOwnProperty$4 = objectProto$4.hasOwnProperty;
813
- function baseIsEqualDeep$1(object, other, bitmask, customizer, equalFunc, stack) {
814
- var objIsArr = isArray$7(object), othIsArr = isArray$7(other), objTag = objIsArr ? arrayTag$1 : getTag$3(object), othTag = othIsArr ? arrayTag$1 : getTag$3(other);
815
- objTag = objTag == argsTag$1 ? objectTag$2 : objTag;
816
- othTag = othTag == argsTag$1 ? objectTag$2 : othTag;
817
- var objIsObj = objTag == objectTag$2, othIsObj = othTag == objectTag$2, isSameTag = objTag == othTag;
818
- if (isSameTag && isBuffer$1(object)) {
819
- if (!isBuffer$1(other)) {
82
+ var regexpA = a2 instanceof RegExp;
83
+ var regexpB = b2 instanceof RegExp;
84
+ if (regexpA !== regexpB) {
820
85
  return false;
821
86
  }
822
- objIsArr = true;
823
- objIsObj = false;
824
- }
825
- if (isSameTag && !objIsObj) {
826
- stack || (stack = new Stack$2());
827
- return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
828
- }
829
- if (!(bitmask & COMPARE_PARTIAL_FLAG$2)) {
830
- var objIsWrapped = objIsObj && hasOwnProperty$4.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty$4.call(other, "__wrapped__");
831
- if (objIsWrapped || othIsWrapped) {
832
- var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
833
- stack || (stack = new Stack$2());
834
- return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
87
+ if (regexpA && regexpB) {
88
+ return a2.toString() === b2.toString();
835
89
  }
836
- }
837
- if (!isSameTag) {
838
- return false;
839
- }
840
- stack || (stack = new Stack$2());
841
- return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
842
- }
843
- var _baseIsEqualDeep = baseIsEqualDeep$1;
844
- var baseIsEqualDeep = _baseIsEqualDeep, isObjectLike$4 = isObjectLike_1;
845
- function baseIsEqual$3(value, other, bitmask, customizer, stack) {
846
- if (value === other) {
847
- return true;
848
- }
849
- if (value == null || other == null || !isObjectLike$4(value) && !isObjectLike$4(other)) {
850
- return value !== value && other !== other;
851
- }
852
- return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual$3, stack);
853
- }
854
- var _baseIsEqual = baseIsEqual$3;
855
- var Stack$1 = _Stack, baseIsEqual$2 = _baseIsEqual;
856
- var COMPARE_PARTIAL_FLAG$1 = 1, COMPARE_UNORDERED_FLAG$1 = 2;
857
- function baseIsMatch$1(object, source, matchData, customizer) {
858
- var index = matchData.length, length = index, noCustomizer = !customizer;
859
- if (object == null) {
860
- return !length;
861
- }
862
- object = Object(object);
863
- while (index--) {
864
- var data = matchData[index];
865
- if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
90
+ var keys = keyList(a2);
91
+ length = keys.length;
92
+ if (length !== keyList(b2).length) {
866
93
  return false;
867
94
  }
868
- }
869
- while (++index < length) {
870
- data = matchData[index];
871
- var key = data[0], objValue = object[key], srcValue = data[1];
872
- if (noCustomizer && data[2]) {
873
- if (objValue === void 0 && !(key in object)) {
95
+ for (i2 = length; i2-- !== 0; ) {
96
+ if (!hasProp.call(b2, keys[i2])) {
874
97
  return false;
875
98
  }
876
- } else {
877
- var stack = new Stack$1();
878
- if (customizer) {
879
- var result = customizer(objValue, srcValue, key, object, source, stack);
880
- }
881
- if (!(result === void 0 ? baseIsEqual$2(srcValue, objValue, COMPARE_PARTIAL_FLAG$1 | COMPARE_UNORDERED_FLAG$1, customizer, stack) : result)) {
99
+ }
100
+ for (i2 = length; i2-- !== 0; ) {
101
+ key = keys[i2];
102
+ if (!equals(a2[key], b2[key])) {
882
103
  return false;
883
104
  }
884
105
  }
106
+ return true;
885
107
  }
886
- return true;
887
- }
888
- var _baseIsMatch = baseIsMatch$1;
889
- var isObject$4 = isObject_1;
890
- function isStrictComparable$2(value) {
891
- return value === value && !isObject$4(value);
892
- }
893
- var _isStrictComparable = isStrictComparable$2;
894
- var isStrictComparable$1 = _isStrictComparable, keys$2 = keys_1;
895
- function getMatchData$1(object) {
896
- var result = keys$2(object), length = result.length;
897
- while (length--) {
898
- var key = result[length], value = object[key];
899
- result[length] = [key, value, isStrictComparable$1(value)];
900
- }
901
- return result;
108
+ return a2 !== a2 && b2 !== b2;
902
109
  }
903
- var _getMatchData = getMatchData$1;
904
- function matchesStrictComparable$2(key, srcValue) {
905
- return function(object) {
906
- if (object == null) {
907
- return false;
908
- }
909
- return object[key] === srcValue && (srcValue !== void 0 || key in Object(object));
910
- };
110
+ function omit() {
111
+ return purry(_omit, arguments);
911
112
  }
912
- var _matchesStrictComparable = matchesStrictComparable$2;
913
- var baseIsMatch = _baseIsMatch, getMatchData = _getMatchData, matchesStrictComparable$1 = _matchesStrictComparable;
914
- function baseMatches$1(source) {
915
- var matchData = getMatchData(source);
916
- if (matchData.length == 1 && matchData[0][2]) {
917
- return matchesStrictComparable$1(matchData[0][0], matchData[0][1]);
918
- }
919
- return function(object) {
920
- return object === source || baseIsMatch(object, source, matchData);
921
- };
922
- }
923
- var _baseMatches = baseMatches$1;
924
- var baseGetTag$1 = _baseGetTag, isObjectLike$3 = isObjectLike_1;
925
- var symbolTag$2 = "[object Symbol]";
926
- function isSymbol$3(value) {
927
- return typeof value == "symbol" || isObjectLike$3(value) && baseGetTag$1(value) == symbolTag$2;
928
- }
929
- var isSymbol_1 = isSymbol$3;
930
- var isArray$6 = isArray_1, isSymbol$2 = isSymbol_1;
931
- var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/;
932
- function isKey$3(value, object) {
933
- if (isArray$6(value)) {
934
- return false;
935
- }
936
- var type = typeof value;
937
- if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol$2(value)) {
938
- return true;
939
- }
940
- return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
941
- }
942
- var _isKey = isKey$3;
943
- var MapCache = _MapCache;
944
- var FUNC_ERROR_TEXT$1 = "Expected a function";
945
- function memoize$1(func, resolver) {
946
- if (typeof func != "function" || resolver != null && typeof resolver != "function") {
947
- throw new TypeError(FUNC_ERROR_TEXT$1);
948
- }
949
- var memoized = function() {
950
- var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
951
- if (cache.has(key)) {
952
- return cache.get(key);
953
- }
954
- var result = func.apply(this, args);
955
- memoized.cache = cache.set(key, result) || cache;
956
- return result;
957
- };
958
- memoized.cache = new (memoize$1.Cache || MapCache)();
959
- return memoized;
960
- }
961
- memoize$1.Cache = MapCache;
962
- var memoize_1 = memoize$1;
963
- var memoize = memoize_1;
964
- var MAX_MEMOIZE_SIZE = 500;
965
- function memoizeCapped$1(func) {
966
- var result = memoize(func, function(key) {
967
- if (cache.size === MAX_MEMOIZE_SIZE) {
968
- cache.clear();
969
- }
970
- return key;
971
- });
972
- var cache = result.cache;
973
- return result;
974
- }
975
- var _memoizeCapped = memoizeCapped$1;
976
- var memoizeCapped = _memoizeCapped;
977
- var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
978
- var reEscapeChar = /\\(\\)?/g;
979
- var stringToPath$1 = memoizeCapped(function(string) {
980
- var result = [];
981
- if (string.charCodeAt(0) === 46) {
982
- result.push("");
983
- }
984
- string.replace(rePropName, function(match, number, quote, subString) {
985
- result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
986
- });
987
- return result;
988
- });
989
- var _stringToPath = stringToPath$1;
990
- function arrayMap$3(array, iteratee) {
991
- var index = -1, length = array == null ? 0 : array.length, result = Array(length);
992
- while (++index < length) {
993
- result[index] = iteratee(array[index], index, array);
994
- }
995
- return result;
996
- }
997
- var _arrayMap = arrayMap$3;
998
- var Symbol$3 = _Symbol, arrayMap$2 = _arrayMap, isArray$5 = isArray_1, isSymbol$1 = isSymbol_1;
999
- var INFINITY$2 = 1 / 0;
1000
- var symbolProto$1 = Symbol$3 ? Symbol$3.prototype : void 0, symbolToString = symbolProto$1 ? symbolProto$1.toString : void 0;
1001
- function baseToString$1(value) {
1002
- if (typeof value == "string") {
1003
- return value;
1004
- }
1005
- if (isArray$5(value)) {
1006
- return arrayMap$2(value, baseToString$1) + "";
1007
- }
1008
- if (isSymbol$1(value)) {
1009
- return symbolToString ? symbolToString.call(value) : "";
1010
- }
1011
- var result = value + "";
1012
- return result == "0" && 1 / value == -INFINITY$2 ? "-0" : result;
1013
- }
1014
- var _baseToString = baseToString$1;
1015
- var baseToString = _baseToString;
1016
- function toString$1(value) {
1017
- return value == null ? "" : baseToString(value);
1018
- }
1019
- var toString_1 = toString$1;
1020
- var isArray$4 = isArray_1, isKey$2 = _isKey, stringToPath = _stringToPath, toString = toString_1;
1021
- function castPath$6(value, object) {
1022
- if (isArray$4(value)) {
1023
- return value;
1024
- }
1025
- return isKey$2(value, object) ? [value] : stringToPath(toString(value));
1026
- }
1027
- var _castPath = castPath$6;
1028
- var isSymbol = isSymbol_1;
1029
- var INFINITY$1 = 1 / 0;
1030
- function toKey$6(value) {
1031
- if (typeof value == "string" || isSymbol(value)) {
1032
- return value;
1033
- }
1034
- var result = value + "";
1035
- return result == "0" && 1 / value == -INFINITY$1 ? "-0" : result;
1036
- }
1037
- var _toKey = toKey$6;
1038
- var castPath$5 = _castPath, toKey$5 = _toKey;
1039
- function baseGet$4(object, path) {
1040
- path = castPath$5(path, object);
1041
- var index = 0, length = path.length;
1042
- while (object != null && index < length) {
1043
- object = object[toKey$5(path[index++])];
1044
- }
1045
- return index && index == length ? object : void 0;
1046
- }
1047
- var _baseGet = baseGet$4;
1048
- var baseGet$3 = _baseGet;
1049
- function get$1(object, path, defaultValue) {
1050
- var result = object == null ? void 0 : baseGet$3(object, path);
1051
- return result === void 0 ? defaultValue : result;
1052
- }
1053
- var get_1 = get$1;
1054
- function baseHasIn$1(object, key) {
1055
- return object != null && key in Object(object);
1056
- }
1057
- var _baseHasIn = baseHasIn$1;
1058
- var castPath$4 = _castPath, isArguments$1 = isArguments_1, isArray$3 = isArray_1, isIndex$1 = _isIndex, isLength = isLength_1, toKey$4 = _toKey;
1059
- function hasPath$1(object, path, hasFunc) {
1060
- path = castPath$4(path, object);
1061
- var index = -1, length = path.length, result = false;
1062
- while (++index < length) {
1063
- var key = toKey$4(path[index]);
1064
- if (!(result = object != null && hasFunc(object, key))) {
1065
- break;
113
+ function _omit(object, names) {
114
+ var set2 = new Set(names);
115
+ return Object.entries(object).reduce(function(acc, _a) {
116
+ var name = _a[0], value = _a[1];
117
+ if (!set2.has(name)) {
118
+ acc[name] = value;
1066
119
  }
1067
- object = object[key];
1068
- }
1069
- if (result || ++index != length) {
1070
- return result;
1071
- }
1072
- length = object == null ? 0 : object.length;
1073
- return !!length && isLength(length) && isIndex$1(key, length) && (isArray$3(object) || isArguments$1(object));
1074
- }
1075
- var _hasPath = hasPath$1;
1076
- var baseHasIn = _baseHasIn, hasPath = _hasPath;
1077
- function hasIn$1(object, path) {
1078
- return object != null && hasPath(object, path, baseHasIn);
1079
- }
1080
- var hasIn_1 = hasIn$1;
1081
- var baseIsEqual$1 = _baseIsEqual, get = get_1, hasIn = hasIn_1, isKey$1 = _isKey, isStrictComparable = _isStrictComparable, matchesStrictComparable = _matchesStrictComparable, toKey$3 = _toKey;
1082
- var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2;
1083
- function baseMatchesProperty$1(path, srcValue) {
1084
- if (isKey$1(path) && isStrictComparable(srcValue)) {
1085
- return matchesStrictComparable(toKey$3(path), srcValue);
1086
- }
1087
- return function(object) {
1088
- var objValue = get(object, path);
1089
- return objValue === void 0 && objValue === srcValue ? hasIn(object, path) : baseIsEqual$1(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
1090
- };
1091
- }
1092
- var _baseMatchesProperty = baseMatchesProperty$1;
1093
- function identity$2(value) {
1094
- return value;
120
+ return acc;
121
+ }, {});
1095
122
  }
1096
- var identity_1 = identity$2;
1097
- function baseProperty$1(key) {
1098
- return function(object) {
1099
- return object == null ? void 0 : object[key];
1100
- };
123
+ function omitBy() {
124
+ return purry(_omitBy, arguments);
1101
125
  }
1102
- var _baseProperty = baseProperty$1;
1103
- var baseGet$2 = _baseGet;
1104
- function basePropertyDeep$1(path) {
1105
- return function(object) {
1106
- return baseGet$2(object, path);
1107
- };
126
+ function _omitBy(object, fn2) {
127
+ return Object.keys(object).reduce(function(acc, key) {
128
+ if (!fn2(object[key], key)) {
129
+ acc[key] = object[key];
130
+ }
131
+ return acc;
132
+ }, {});
1108
133
  }
1109
- var _basePropertyDeep = basePropertyDeep$1;
1110
- var baseProperty = _baseProperty, basePropertyDeep = _basePropertyDeep, isKey = _isKey, toKey$2 = _toKey;
1111
- function property$1(path) {
1112
- return isKey(path) ? baseProperty(toKey$2(path)) : basePropertyDeep(path);
134
+ function pathOr() {
135
+ return purry(_pathOr, arguments);
1113
136
  }
1114
- var property_1 = property$1;
1115
- var baseMatches = _baseMatches, baseMatchesProperty = _baseMatchesProperty, identity$1 = identity_1, isArray$2 = isArray_1, property = property_1;
1116
- function baseIteratee$2(value) {
1117
- if (typeof value == "function") {
1118
- return value;
1119
- }
1120
- if (value == null) {
1121
- return identity$1;
1122
- }
1123
- if (typeof value == "object") {
1124
- return isArray$2(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);
137
+ function _pathOr(object, path, defaultValue) {
138
+ var current = object;
139
+ for (var _i = 0, path_1 = path; _i < path_1.length; _i++) {
140
+ var prop = path_1[_i];
141
+ if (current == null || current[prop] == null) {
142
+ return defaultValue;
143
+ }
144
+ current = current[prop];
1125
145
  }
1126
- return property(value);
146
+ return current;
1127
147
  }
1128
- var _baseIteratee = baseIteratee$2;
1129
- var FUNC_ERROR_TEXT = "Expected a function";
1130
- function negate$1(predicate) {
1131
- if (typeof predicate != "function") {
1132
- throw new TypeError(FUNC_ERROR_TEXT);
1133
- }
1134
- return function() {
1135
- var args = arguments;
1136
- switch (args.length) {
1137
- case 0:
1138
- return !predicate.call(this);
1139
- case 1:
1140
- return !predicate.call(this, args[0]);
1141
- case 2:
1142
- return !predicate.call(this, args[0], args[1]);
1143
- case 3:
1144
- return !predicate.call(this, args[0], args[1], args[2]);
148
+ var __assign = globalThis && globalThis.__assign || function() {
149
+ __assign = Object.assign || function(t2) {
150
+ for (var s2, i2 = 1, n2 = arguments.length; i2 < n2; i2++) {
151
+ s2 = arguments[i2];
152
+ for (var p2 in s2)
153
+ if (Object.prototype.hasOwnProperty.call(s2, p2))
154
+ t2[p2] = s2[p2];
1145
155
  }
1146
- return !predicate.apply(this, args);
156
+ return t2;
1147
157
  };
158
+ return __assign.apply(this, arguments);
159
+ };
160
+ function set() {
161
+ return purry(_set, arguments);
1148
162
  }
1149
- var negate_1 = negate$1;
1150
- var getNative = _getNative;
1151
- var defineProperty$2 = function() {
1152
- try {
1153
- var func = getNative(Object, "defineProperty");
1154
- func({}, "", {});
1155
- return func;
1156
- } catch (e2) {
1157
- }
1158
- }();
1159
- var _defineProperty = defineProperty$2;
1160
- var defineProperty$1 = _defineProperty;
1161
- function baseAssignValue$2(object, key, value) {
1162
- if (key == "__proto__" && defineProperty$1) {
1163
- defineProperty$1(object, key, {
1164
- "configurable": true,
1165
- "enumerable": true,
1166
- "value": value,
1167
- "writable": true
1168
- });
1169
- } else {
1170
- object[key] = value;
1171
- }
163
+ function _set(obj, prop, value) {
164
+ var _a;
165
+ return __assign(__assign({}, obj), (_a = {}, _a[prop] = value, _a));
1172
166
  }
1173
- var _baseAssignValue = baseAssignValue$2;
1174
- var baseAssignValue$1 = _baseAssignValue, eq = eq_1;
1175
- var objectProto$3 = Object.prototype;
1176
- var hasOwnProperty$3 = objectProto$3.hasOwnProperty;
1177
- function assignValue$3(object, key, value) {
1178
- var objValue = object[key];
1179
- if (!(hasOwnProperty$3.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) {
1180
- baseAssignValue$1(object, key, value);
1181
- }
167
+ function uniq() {
168
+ return purry(_uniq, arguments, uniq.lazy);
1182
169
  }
1183
- var _assignValue = assignValue$3;
1184
- var assignValue$2 = _assignValue, castPath$3 = _castPath, isIndex = _isIndex, isObject$3 = isObject_1, toKey$1 = _toKey;
1185
- function baseSet$2(object, path, value, customizer) {
1186
- if (!isObject$3(object)) {
1187
- return object;
1188
- }
1189
- path = castPath$3(path, object);
1190
- var index = -1, length = path.length, lastIndex = length - 1, nested = object;
1191
- while (nested != null && ++index < length) {
1192
- var key = toKey$1(path[index]), newValue = value;
1193
- if (key === "__proto__" || key === "constructor" || key === "prototype") {
1194
- return object;
1195
- }
1196
- if (index != lastIndex) {
1197
- var objValue = nested[key];
1198
- newValue = customizer ? customizer(objValue, key, nested) : void 0;
1199
- if (newValue === void 0) {
1200
- newValue = isObject$3(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};
1201
- }
1202
- }
1203
- assignValue$2(nested, key, newValue);
1204
- nested = nested[key];
1205
- }
1206
- return object;
170
+ function _uniq(array) {
171
+ return _reduceLazy(array, uniq.lazy());
1207
172
  }
1208
- var _baseSet = baseSet$2;
1209
- var baseGet$1 = _baseGet, baseSet$1 = _baseSet, castPath$2 = _castPath;
1210
- function basePickBy$1(object, paths, predicate) {
1211
- var index = -1, length = paths.length, result = {};
1212
- while (++index < length) {
1213
- var path = paths[index], value = baseGet$1(object, path);
1214
- if (predicate(value, path)) {
1215
- baseSet$1(result, castPath$2(path, object), value);
1216
- }
1217
- }
1218
- return result;
1219
- }
1220
- var _basePickBy = basePickBy$1;
1221
- var overArg = _overArg;
1222
- var getPrototype$3 = overArg(Object.getPrototypeOf, Object);
1223
- var _getPrototype = getPrototype$3;
1224
- var arrayPush$1 = _arrayPush, getPrototype$2 = _getPrototype, getSymbols$1 = _getSymbols, stubArray = stubArray_1;
1225
- var nativeGetSymbols = Object.getOwnPropertySymbols;
1226
- var getSymbolsIn$2 = !nativeGetSymbols ? stubArray : function(object) {
1227
- var result = [];
1228
- while (object) {
1229
- arrayPush$1(result, getSymbols$1(object));
1230
- object = getPrototype$2(object);
1231
- }
1232
- return result;
1233
- };
1234
- var _getSymbolsIn = getSymbolsIn$2;
1235
- function nativeKeysIn$1(object) {
1236
- var result = [];
1237
- if (object != null) {
1238
- for (var key in Object(object)) {
1239
- result.push(key);
1240
- }
1241
- }
1242
- return result;
1243
- }
1244
- var _nativeKeysIn = nativeKeysIn$1;
1245
- var isObject$2 = isObject_1, isPrototype$1 = _isPrototype, nativeKeysIn = _nativeKeysIn;
1246
- var objectProto$2 = Object.prototype;
1247
- var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
1248
- function baseKeysIn$1(object) {
1249
- if (!isObject$2(object)) {
1250
- return nativeKeysIn(object);
1251
- }
1252
- var isProto = isPrototype$1(object), result = [];
1253
- for (var key in object) {
1254
- if (!(key == "constructor" && (isProto || !hasOwnProperty$2.call(object, key)))) {
1255
- result.push(key);
1256
- }
1257
- }
1258
- return result;
1259
- }
1260
- var _baseKeysIn = baseKeysIn$1;
1261
- var arrayLikeKeys = _arrayLikeKeys, baseKeysIn = _baseKeysIn, isArrayLike = isArrayLike_1;
1262
- function keysIn$3(object) {
1263
- return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
1264
- }
1265
- var keysIn_1 = keysIn$3;
1266
- var baseGetAllKeys = _baseGetAllKeys, getSymbolsIn$1 = _getSymbolsIn, keysIn$2 = keysIn_1;
1267
- function getAllKeysIn$3(object) {
1268
- return baseGetAllKeys(object, keysIn$2, getSymbolsIn$1);
1269
- }
1270
- var _getAllKeysIn = getAllKeysIn$3;
1271
- var arrayMap$1 = _arrayMap, baseIteratee$1 = _baseIteratee, basePickBy = _basePickBy, getAllKeysIn$2 = _getAllKeysIn;
1272
- function pickBy$1(object, predicate) {
1273
- if (object == null) {
1274
- return {};
173
+ (function(uniq2) {
174
+ function lazy() {
175
+ var set2 = /* @__PURE__ */ new Set();
176
+ return function(value) {
177
+ if (set2.has(value)) {
178
+ return {
179
+ done: false,
180
+ hasNext: false
181
+ };
182
+ }
183
+ set2.add(value);
184
+ return {
185
+ done: false,
186
+ hasNext: true,
187
+ next: value
188
+ };
189
+ };
1275
190
  }
1276
- var props = arrayMap$1(getAllKeysIn$2(object), function(prop) {
1277
- return [prop];
1278
- });
1279
- predicate = baseIteratee$1(predicate);
1280
- return basePickBy(object, props, function(value, path) {
1281
- return predicate(value, path[0]);
1282
- });
1283
- }
1284
- var pickBy_1 = pickBy$1;
1285
- var baseIteratee = _baseIteratee, negate = negate_1, pickBy = pickBy_1;
1286
- function omitBy(object, predicate) {
1287
- return pickBy(object, negate(baseIteratee(predicate)));
1288
- }
1289
- var omitBy_1 = omitBy;
191
+ uniq2.lazy = lazy;
192
+ })(uniq || (uniq = {}));
1290
193
  const getCheckboxChecked = (checkboxValue = "on", newValue) => {
1291
194
  if (Array.isArray(newValue))
1292
195
  return newValue.some((val) => val === true || val === checkboxValue);
@@ -1348,9 +251,39 @@ const createGetInputProps = ({
1348
251
  } else if (props.value === void 0) {
1349
252
  inputProps.defaultValue = defaultValue;
1350
253
  }
1351
- return omitBy_1(inputProps, (value) => value === void 0);
254
+ return omitBy(inputProps, (value) => value === void 0);
1352
255
  };
1353
256
  };
257
+ const stringToPathArray = (path) => {
258
+ if (path.length === 0)
259
+ return [];
260
+ const match = path.match(/^\[(.+?)\](.*)$/) || path.match(/^\.?([^\.\[\]]+)(.*)$/);
261
+ if (match) {
262
+ const [_2, key, rest] = match;
263
+ return [/^\d+$/.test(key) ? Number(key) : key, ...stringToPathArray(rest)];
264
+ }
265
+ return [path];
266
+ };
267
+ function setPath(object, path, defaultValue) {
268
+ return _setPathNormalized(object, stringToPathArray(path), defaultValue);
269
+ }
270
+ function _setPathNormalized(object, path, value) {
271
+ var _a;
272
+ const leadingSegments = path.slice(0, -1);
273
+ const lastSegment = path[path.length - 1];
274
+ let obj = object;
275
+ for (let i2 = 0; i2 < leadingSegments.length; i2++) {
276
+ const segment = leadingSegments[i2];
277
+ if (obj[segment] === void 0) {
278
+ const nextSegment = (_a = leadingSegments[i2 + 1]) != null ? _a : lastSegment;
279
+ obj[segment] = typeof nextSegment === "number" ? [] : {};
280
+ }
281
+ obj = obj[segment];
282
+ }
283
+ obj[lastSegment] = value;
284
+ return object;
285
+ }
286
+ const getPath = (object, path) => pathOr(object, stringToPathArray(path), void 0);
1354
287
  var isProduction = true;
1355
288
  var prefix = "Invariant failed";
1356
289
  function invariant(condition, message) {
@@ -1382,11 +315,6 @@ const hydratable = {
1382
315
  hydratedData,
1383
316
  from
1384
317
  };
1385
- var baseSet = _baseSet;
1386
- function set(object, path, value) {
1387
- return object == null ? object : baseSet(object, path, value);
1388
- }
1389
- var set_1 = set;
1390
318
  const createStoreImpl = (createState) => {
1391
319
  let state;
1392
320
  const listeners = /* @__PURE__ */ new Set();
@@ -1878,12 +806,12 @@ an.setUseProxies.bind(an);
1878
806
  an.applyPatches.bind(an);
1879
807
  an.createDraft.bind(an);
1880
808
  an.finishDraft.bind(an);
1881
- const immerImpl = (initializer) => (set2, get2, store) => {
809
+ const immerImpl = (initializer) => (set2, get, store) => {
1882
810
  store.setState = (updater, replace2, ...a2) => {
1883
811
  const nextState = typeof updater === "function" ? fn(updater) : updater;
1884
812
  return set2(nextState, replace2, ...a2);
1885
813
  };
1886
- return initializer(store.setState, get2, store);
814
+ return initializer(store.setState, get, store);
1887
815
  };
1888
816
  const immer = immerImpl;
1889
817
  const requestSubmit = (element, submitter) => {
@@ -1926,10 +854,10 @@ function raise(errorConstructor, message, name) {
1926
854
  );
1927
855
  }
1928
856
  const getArray = (values, field) => {
1929
- const value = get_1(values, field);
857
+ const value = getPath(values, field);
1930
858
  if (value === void 0 || value === null) {
1931
859
  const newValue = [];
1932
- set_1(values, field, newValue);
860
+ setPath(values, field, newValue);
1933
861
  return newValue;
1934
862
  }
1935
863
  invariant(
@@ -1981,8 +909,8 @@ const mutateAsArray = (field, obj, mutate) => {
1981
909
  for (const [key, value] of Object.entries(obj)) {
1982
910
  if (key.startsWith(field) && key !== field) {
1983
911
  beforeKeys.add(key);
912
+ setPath(arr, key.substring(field.length), value);
1984
913
  }
1985
- set_1(arr, key.substring(field.length), value);
1986
914
  }
1987
915
  mutate(arr);
1988
916
  for (const key of beforeKeys) {
@@ -1990,7 +918,7 @@ const mutateAsArray = (field, obj, mutate) => {
1990
918
  }
1991
919
  const newKeys = getDeepArrayPaths(arr);
1992
920
  for (const key of newKeys) {
1993
- const val = get_1(arr, key);
921
+ const val = getPath(arr, key);
1994
922
  obj[`${field}${key}`] = val;
1995
923
  }
1996
924
  };
@@ -2061,7 +989,7 @@ const defaultFormState = {
2061
989
  }
2062
990
  }
2063
991
  };
2064
- const createFormState = (set2, get2) => ({
992
+ const createFormState = (set2, get) => ({
2065
993
  isHydrated: false,
2066
994
  isSubmitting: false,
2067
995
  hasBeenSubmitted: false,
@@ -2069,7 +997,7 @@ const createFormState = (set2, get2) => ({
2069
997
  fieldErrors: {},
2070
998
  formElement: null,
2071
999
  currentDefaultValues: {},
2072
- isValid: () => Object.keys(get2().fieldErrors).length === 0,
1000
+ isValid: () => Object.keys(get().fieldErrors).length === 0,
2073
1001
  startSubmit: () => set2((state) => {
2074
1002
  state.isSubmitting = true;
2075
1003
  state.hasBeenSubmitted = true;
@@ -2107,7 +1035,7 @@ const createFormState = (set2, get2) => ({
2107
1035
  state.isHydrated = true;
2108
1036
  }),
2109
1037
  setFormElement: (formElement) => {
2110
- if (get2().formElement === formElement)
1038
+ if (get().formElement === formElement)
2111
1039
  return;
2112
1040
  set2((state) => {
2113
1041
  state.formElement = formElement;
@@ -2115,48 +1043,48 @@ const createFormState = (set2, get2) => ({
2115
1043
  },
2116
1044
  validateField: async (field) => {
2117
1045
  var _a, _b, _c;
2118
- const formElement = get2().formElement;
1046
+ const formElement = get().formElement;
2119
1047
  invariant(
2120
1048
  formElement,
2121
1049
  "Cannot find reference to form. This is probably a bug in remix-validated-form."
2122
1050
  );
2123
- const validator = (_a = get2().formProps) == null ? void 0 : _a.validator;
1051
+ const validator = (_a = get().formProps) == null ? void 0 : _a.validator;
2124
1052
  invariant(
2125
1053
  validator,
2126
1054
  "Cannot validator. This is probably a bug in remix-validated-form."
2127
1055
  );
2128
- await ((_c = (_b = get2().controlledFields).awaitValueUpdate) == null ? void 0 : _c.call(_b, field));
1056
+ await ((_c = (_b = get().controlledFields).awaitValueUpdate) == null ? void 0 : _c.call(_b, field));
2129
1057
  const { error } = await validator.validateField(
2130
1058
  new FormData(formElement),
2131
1059
  field
2132
1060
  );
2133
1061
  if (error) {
2134
- get2().setFieldError(field, error);
1062
+ get().setFieldError(field, error);
2135
1063
  return error;
2136
1064
  } else {
2137
- get2().clearFieldError(field);
1065
+ get().clearFieldError(field);
2138
1066
  return null;
2139
1067
  }
2140
1068
  },
2141
1069
  validate: async () => {
2142
1070
  var _a;
2143
- const formElement = get2().formElement;
1071
+ const formElement = get().formElement;
2144
1072
  invariant(
2145
1073
  formElement,
2146
1074
  "Cannot find reference to form. This is probably a bug in remix-validated-form."
2147
1075
  );
2148
- const validator = (_a = get2().formProps) == null ? void 0 : _a.validator;
1076
+ const validator = (_a = get().formProps) == null ? void 0 : _a.validator;
2149
1077
  invariant(
2150
1078
  validator,
2151
1079
  "Cannot validator. This is probably a bug in remix-validated-form."
2152
1080
  );
2153
1081
  const result = await validator.validate(new FormData(formElement));
2154
1082
  if (result.error)
2155
- get2().setFieldErrors(result.error.fieldErrors);
1083
+ get().setFieldErrors(result.error.fieldErrors);
2156
1084
  return result;
2157
1085
  },
2158
1086
  submit: () => {
2159
- const formElement = get2().formElement;
1087
+ const formElement = get().formElement;
2160
1088
  invariant(
2161
1089
  formElement,
2162
1090
  "Cannot find reference to form. This is probably a bug in remix-validated-form."
@@ -2165,11 +1093,11 @@ const createFormState = (set2, get2) => ({
2165
1093
  },
2166
1094
  getValues: () => {
2167
1095
  var _a;
2168
- return new FormData((_a = get2().formElement) != null ? _a : void 0);
1096
+ return new FormData((_a = get().formElement) != null ? _a : void 0);
2169
1097
  },
2170
1098
  resetFormElement: () => {
2171
1099
  var _a;
2172
- return (_a = get2().formElement) == null ? void 0 : _a.reset();
1100
+ return (_a = get().formElement) == null ? void 0 : _a.reset();
2173
1101
  },
2174
1102
  controlledFields: {
2175
1103
  values: {},
@@ -2184,7 +1112,7 @@ const createFormState = (set2, get2) => ({
2184
1112
  });
2185
1113
  },
2186
1114
  unregister: (fieldName) => {
2187
- if (get2() === null || get2() === void 0)
1115
+ if (get() === null || get() === void 0)
2188
1116
  return;
2189
1117
  set2((state) => {
2190
1118
  var _a, _b, _c;
@@ -2197,26 +1125,26 @@ const createFormState = (set2, get2) => ({
2197
1125
  (key) => fieldName.startsWith(key) && key !== fieldName
2198
1126
  );
2199
1127
  if (!isNested) {
2200
- set_1(
1128
+ setPath(
2201
1129
  state.controlledFields.values,
2202
1130
  fieldName,
2203
- get_1((_b = state.formProps) == null ? void 0 : _b.defaultValues, fieldName)
1131
+ getPath((_b = state.formProps) == null ? void 0 : _b.defaultValues, fieldName)
2204
1132
  );
2205
- set_1(
1133
+ setPath(
2206
1134
  state.currentDefaultValues,
2207
1135
  fieldName,
2208
- get_1((_c = state.formProps) == null ? void 0 : _c.defaultValues, fieldName)
1136
+ getPath((_c = state.formProps) == null ? void 0 : _c.defaultValues, fieldName)
2209
1137
  );
2210
1138
  }
2211
1139
  delete state.controlledFields.refCounts[fieldName];
2212
1140
  });
2213
1141
  },
2214
- getValue: (fieldName) => get_1(get2().controlledFields.values, fieldName),
1142
+ getValue: (fieldName) => getPath(get().controlledFields.values, fieldName),
2215
1143
  setValue: (fieldName, value) => {
2216
1144
  set2((state) => {
2217
- set_1(state.controlledFields.values, fieldName, value);
1145
+ setPath(state.controlledFields.values, fieldName, value);
2218
1146
  });
2219
- get2().controlledFields.kickoffValueUpdate(fieldName);
1147
+ get().controlledFields.kickoffValueUpdate(fieldName);
2220
1148
  },
2221
1149
  kickoffValueUpdate: (fieldName) => {
2222
1150
  const clear = () => set2((state) => {
@@ -2231,7 +1159,7 @@ const createFormState = (set2, get2) => ({
2231
1159
  });
2232
1160
  },
2233
1161
  awaitValueUpdate: async (fieldName) => {
2234
- await get2().controlledFields.valueUpdatePromises[fieldName];
1162
+ await get().controlledFields.valueUpdatePromises[fieldName];
2235
1163
  },
2236
1164
  array: {
2237
1165
  push: (fieldName, item) => {
@@ -2239,7 +1167,7 @@ const createFormState = (set2, get2) => ({
2239
1167
  getArray(state.controlledFields.values, fieldName).push(item);
2240
1168
  getArray(state.currentDefaultValues, fieldName).push(item);
2241
1169
  });
2242
- get2().controlledFields.kickoffValueUpdate(fieldName);
1170
+ get().controlledFields.kickoffValueUpdate(fieldName);
2243
1171
  },
2244
1172
  swap: (fieldName, indexA, indexB) => {
2245
1173
  set2((state) => {
@@ -2264,7 +1192,7 @@ const createFormState = (set2, get2) => ({
2264
1192
  (array) => swap(array, indexA, indexB)
2265
1193
  );
2266
1194
  });
2267
- get2().controlledFields.kickoffValueUpdate(fieldName);
1195
+ get().controlledFields.kickoffValueUpdate(fieldName);
2268
1196
  },
2269
1197
  move: (fieldName, from2, to) => {
2270
1198
  set2((state) => {
@@ -2289,7 +1217,7 @@ const createFormState = (set2, get2) => ({
2289
1217
  (array) => move(array, from2, to)
2290
1218
  );
2291
1219
  });
2292
- get2().controlledFields.kickoffValueUpdate(fieldName);
1220
+ get().controlledFields.kickoffValueUpdate(fieldName);
2293
1221
  },
2294
1222
  insert: (fieldName, index, item) => {
2295
1223
  set2((state) => {
@@ -2314,7 +1242,7 @@ const createFormState = (set2, get2) => ({
2314
1242
  (array) => insert(array, index, void 0)
2315
1243
  );
2316
1244
  });
2317
- get2().controlledFields.kickoffValueUpdate(fieldName);
1245
+ get().controlledFields.kickoffValueUpdate(fieldName);
2318
1246
  },
2319
1247
  remove: (fieldName, index) => {
2320
1248
  set2((state) => {
@@ -2337,7 +1265,7 @@ const createFormState = (set2, get2) => ({
2337
1265
  (array) => remove(array, index)
2338
1266
  );
2339
1267
  });
2340
- get2().controlledFields.kickoffValueUpdate(fieldName);
1268
+ get().controlledFields.kickoffValueUpdate(fieldName);
2341
1269
  },
2342
1270
  pop: (fieldName) => {
2343
1271
  set2((state) => {
@@ -2354,7 +1282,7 @@ const createFormState = (set2, get2) => ({
2354
1282
  (array) => array.pop()
2355
1283
  );
2356
1284
  });
2357
- get2().controlledFields.kickoffValueUpdate(fieldName);
1285
+ get().controlledFields.kickoffValueUpdate(fieldName);
2358
1286
  },
2359
1287
  unshift: (fieldName, value) => {
2360
1288
  set2((state) => {
@@ -2395,17 +1323,17 @@ const createFormState = (set2, get2) => ({
2395
1323
  (array) => replace(array, index, item)
2396
1324
  );
2397
1325
  });
2398
- get2().controlledFields.kickoffValueUpdate(fieldName);
1326
+ get().controlledFields.kickoffValueUpdate(fieldName);
2399
1327
  }
2400
1328
  }
2401
1329
  }
2402
1330
  });
2403
1331
  const useRootFormStore = create$1()(
2404
- immer((set2, get2) => ({
1332
+ immer((set2, get) => ({
2405
1333
  forms: {},
2406
1334
  form: (formId) => {
2407
1335
  var _a;
2408
- return (_a = get2().forms[formId]) != null ? _a : defaultFormState;
1336
+ return (_a = get().forms[formId]) != null ? _a : defaultFormState;
2409
1337
  },
2410
1338
  cleanupForm: (formId) => {
2411
1339
  set2((state) => {
@@ -2413,12 +1341,12 @@ const useRootFormStore = create$1()(
2413
1341
  });
2414
1342
  },
2415
1343
  registerForm: (formId) => {
2416
- if (get2().forms[formId])
1344
+ if (get().forms[formId])
2417
1345
  return;
2418
1346
  set2((state) => {
2419
1347
  state.forms[formId] = createFormState(
2420
1348
  (setter) => set2((state2) => setter(state2.forms[formId])),
2421
- () => get2().forms[formId]
1349
+ () => get().forms[formId]
2422
1350
  );
2423
1351
  });
2424
1352
  }
@@ -2519,11 +1447,11 @@ const useClearError = (context) => {
2519
1447
  const { formId } = context;
2520
1448
  return useFormStore(formId, (state) => state.clearFieldError);
2521
1449
  };
2522
- const useCurrentDefaultValueForField = (formId, field) => useFormStore(formId, (state) => get_1(state.currentDefaultValues, field));
1450
+ const useCurrentDefaultValueForField = (formId, field) => useFormStore(formId, (state) => getPath(state.currentDefaultValues, field));
2523
1451
  const useFieldDefaultValue = (name, context) => {
2524
1452
  const defaultValues = useDefaultValuesForForm(context);
2525
1453
  const state = useCurrentDefaultValueForField(context.formId, name);
2526
- return defaultValues.map((val) => get_1(val, name)).hydrateTo(state);
1454
+ return defaultValues.map((val) => getPath(val, name)).hydrateTo(state);
2527
1455
  };
2528
1456
  const useInternalIsSubmitting = (formId) => useFormStore(formId, (state) => state.isSubmitting);
2529
1457
  const useInternalIsValid = (formId) => useFormStore(formId, (state) => state.isValid());
@@ -2720,108 +1648,6 @@ function validationError(error, repopulateFields, init) {
2720
1648
  const setFormDefaults = (formId, defaultValues) => ({
2721
1649
  [formDefaultValuesKey(formId)]: defaultValues
2722
1650
  });
2723
- function baseFindIndex$1(array, predicate, fromIndex, fromRight) {
2724
- var length = array.length, index = fromIndex + (fromRight ? 1 : -1);
2725
- while (fromRight ? index-- : ++index < length) {
2726
- if (predicate(array[index], index, array)) {
2727
- return index;
2728
- }
2729
- }
2730
- return -1;
2731
- }
2732
- var _baseFindIndex = baseFindIndex$1;
2733
- function baseIsNaN$1(value) {
2734
- return value !== value;
2735
- }
2736
- var _baseIsNaN = baseIsNaN$1;
2737
- function strictIndexOf$1(array, value, fromIndex) {
2738
- var index = fromIndex - 1, length = array.length;
2739
- while (++index < length) {
2740
- if (array[index] === value) {
2741
- return index;
2742
- }
2743
- }
2744
- return -1;
2745
- }
2746
- var _strictIndexOf = strictIndexOf$1;
2747
- var baseFindIndex = _baseFindIndex, baseIsNaN = _baseIsNaN, strictIndexOf = _strictIndexOf;
2748
- function baseIndexOf$1(array, value, fromIndex) {
2749
- return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex);
2750
- }
2751
- var _baseIndexOf = baseIndexOf$1;
2752
- var baseIndexOf = _baseIndexOf;
2753
- function arrayIncludes$1(array, value) {
2754
- var length = array == null ? 0 : array.length;
2755
- return !!length && baseIndexOf(array, value, 0) > -1;
2756
- }
2757
- var _arrayIncludes = arrayIncludes$1;
2758
- function arrayIncludesWith$1(array, value, comparator) {
2759
- var index = -1, length = array == null ? 0 : array.length;
2760
- while (++index < length) {
2761
- if (comparator(value, array[index])) {
2762
- return true;
2763
- }
2764
- }
2765
- return false;
2766
- }
2767
- var _arrayIncludesWith = arrayIncludesWith$1;
2768
- function noop$1() {
2769
- }
2770
- var noop_1 = noop$1;
2771
- var Set$1 = _Set, noop = noop_1, setToArray$1 = _setToArray;
2772
- var INFINITY = 1 / 0;
2773
- var createSet$1 = !(Set$1 && 1 / setToArray$1(new Set$1([, -0]))[1] == INFINITY) ? noop : function(values) {
2774
- return new Set$1(values);
2775
- };
2776
- var _createSet = createSet$1;
2777
- var SetCache = _SetCache, arrayIncludes = _arrayIncludes, arrayIncludesWith = _arrayIncludesWith, cacheHas = _cacheHas, createSet = _createSet, setToArray = _setToArray;
2778
- var LARGE_ARRAY_SIZE = 200;
2779
- function baseUniq$1(array, iteratee, comparator) {
2780
- var index = -1, includes = arrayIncludes, length = array.length, isCommon = true, result = [], seen = result;
2781
- if (comparator) {
2782
- isCommon = false;
2783
- includes = arrayIncludesWith;
2784
- } else if (length >= LARGE_ARRAY_SIZE) {
2785
- var set2 = iteratee ? null : createSet(array);
2786
- if (set2) {
2787
- return setToArray(set2);
2788
- }
2789
- isCommon = false;
2790
- includes = cacheHas;
2791
- seen = new SetCache();
2792
- } else {
2793
- seen = iteratee ? [] : result;
2794
- }
2795
- outer:
2796
- while (++index < length) {
2797
- var value = array[index], computed = iteratee ? iteratee(value) : value;
2798
- value = comparator || value !== 0 ? value : 0;
2799
- if (isCommon && computed === computed) {
2800
- var seenIndex = seen.length;
2801
- while (seenIndex--) {
2802
- if (seen[seenIndex] === computed) {
2803
- continue outer;
2804
- }
2805
- }
2806
- if (iteratee) {
2807
- seen.push(computed);
2808
- }
2809
- result.push(value);
2810
- } else if (!includes(seen, computed, comparator)) {
2811
- if (seen !== result) {
2812
- seen.push(computed);
2813
- }
2814
- result.push(value);
2815
- }
2816
- }
2817
- return result;
2818
- }
2819
- var _baseUniq = baseUniq$1;
2820
- var baseUniq = _baseUniq;
2821
- function uniq(array) {
2822
- return array && array.length ? baseUniq(array) : [];
2823
- }
2824
- var uniq_1 = uniq;
2825
1651
  class MultiValueMap {
2826
1652
  constructor() {
2827
1653
  this.dict = /* @__PURE__ */ new Map();
@@ -2875,11 +1701,6 @@ function useSubmitComplete(isSubmitting, callback) {
2875
1701
  }
2876
1702
  });
2877
1703
  }
2878
- var baseIsEqual = _baseIsEqual;
2879
- function isEqual(value, other) {
2880
- return baseIsEqual(value, other);
2881
- }
2882
- var isEqual_1 = isEqual;
2883
1704
  const mergeRefs = (refs) => {
2884
1705
  return (value) => {
2885
1706
  refs.filter(Boolean).forEach((ref) => {
@@ -2894,7 +1715,7 @@ const mergeRefs = (refs) => {
2894
1715
  const useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect;
2895
1716
  const useDeepEqualsMemo = (item) => {
2896
1717
  const ref = useRef(item);
2897
- const areEqual = ref.current === item || isEqual_1(ref.current, item);
1718
+ const areEqual = ref.current === item || equals(ref.current, item);
2898
1719
  useEffect(() => {
2899
1720
  if (!areEqual) {
2900
1721
  ref.current = item;
@@ -2914,7 +1735,7 @@ const focusFirstInvalidInput = (fieldErrors, customFocusHandlers, formElement) =
2914
1735
  return input.name;
2915
1736
  return null;
2916
1737
  }).filter(nonNull).filter((name) => name in fieldErrors);
2917
- const uniqueNamesInOrder = uniq_1(namesInOrder);
1738
+ const uniqueNamesInOrder = uniq(namesInOrder);
2918
1739
  for (const fieldName of uniqueNamesInOrder) {
2919
1740
  if (customFocusHandlers.has(fieldName)) {
2920
1741
  customFocusHandlers.getAll(fieldName).forEach((handler) => {
@@ -3138,468 +1959,11 @@ function ValidatedForm({
3138
1959
  name: FORM_ID_FIELD
3139
1960
  }), children)));
3140
1961
  }
3141
- function arrayEach$1(array, iteratee) {
3142
- var index = -1, length = array == null ? 0 : array.length;
3143
- while (++index < length) {
3144
- if (iteratee(array[index], index, array) === false) {
3145
- break;
3146
- }
3147
- }
3148
- return array;
3149
- }
3150
- var _arrayEach = arrayEach$1;
3151
- var assignValue$1 = _assignValue, baseAssignValue = _baseAssignValue;
3152
- function copyObject$5(source, props, object, customizer) {
3153
- var isNew = !object;
3154
- object || (object = {});
3155
- var index = -1, length = props.length;
3156
- while (++index < length) {
3157
- var key = props[index];
3158
- var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0;
3159
- if (newValue === void 0) {
3160
- newValue = source[key];
3161
- }
3162
- if (isNew) {
3163
- baseAssignValue(object, key, newValue);
3164
- } else {
3165
- assignValue$1(object, key, newValue);
3166
- }
3167
- }
3168
- return object;
3169
- }
3170
- var _copyObject = copyObject$5;
3171
- var copyObject$4 = _copyObject, keys$1 = keys_1;
3172
- function baseAssign$1(object, source) {
3173
- return object && copyObject$4(source, keys$1(source), object);
3174
- }
3175
- var _baseAssign = baseAssign$1;
3176
- var copyObject$3 = _copyObject, keysIn$1 = keysIn_1;
3177
- function baseAssignIn$1(object, source) {
3178
- return object && copyObject$3(source, keysIn$1(source), object);
3179
- }
3180
- var _baseAssignIn = baseAssignIn$1;
3181
- var _cloneBuffer = { exports: {} };
3182
- (function(module, exports) {
3183
- var root2 = _root;
3184
- var freeExports = exports && !exports.nodeType && exports;
3185
- var freeModule = freeExports && true && module && !module.nodeType && module;
3186
- var moduleExports = freeModule && freeModule.exports === freeExports;
3187
- var Buffer = moduleExports ? root2.Buffer : void 0, allocUnsafe = Buffer ? Buffer.allocUnsafe : void 0;
3188
- function cloneBuffer2(buffer, isDeep) {
3189
- if (isDeep) {
3190
- return buffer.slice();
3191
- }
3192
- var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
3193
- buffer.copy(result);
3194
- return result;
3195
- }
3196
- module.exports = cloneBuffer2;
3197
- })(_cloneBuffer, _cloneBuffer.exports);
3198
- function copyArray$1(source, array) {
3199
- var index = -1, length = source.length;
3200
- array || (array = Array(length));
3201
- while (++index < length) {
3202
- array[index] = source[index];
3203
- }
3204
- return array;
3205
- }
3206
- var _copyArray = copyArray$1;
3207
- var copyObject$2 = _copyObject, getSymbols = _getSymbols;
3208
- function copySymbols$1(source, object) {
3209
- return copyObject$2(source, getSymbols(source), object);
3210
- }
3211
- var _copySymbols = copySymbols$1;
3212
- var copyObject$1 = _copyObject, getSymbolsIn = _getSymbolsIn;
3213
- function copySymbolsIn$1(source, object) {
3214
- return copyObject$1(source, getSymbolsIn(source), object);
3215
- }
3216
- var _copySymbolsIn = copySymbolsIn$1;
3217
- var objectProto$1 = Object.prototype;
3218
- var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
3219
- function initCloneArray$1(array) {
3220
- var length = array.length, result = new array.constructor(length);
3221
- if (length && typeof array[0] == "string" && hasOwnProperty$1.call(array, "index")) {
3222
- result.index = array.index;
3223
- result.input = array.input;
3224
- }
3225
- return result;
3226
- }
3227
- var _initCloneArray = initCloneArray$1;
3228
- var Uint8Array = _Uint8Array;
3229
- function cloneArrayBuffer$3(arrayBuffer) {
3230
- var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
3231
- new Uint8Array(result).set(new Uint8Array(arrayBuffer));
3232
- return result;
3233
- }
3234
- var _cloneArrayBuffer = cloneArrayBuffer$3;
3235
- var cloneArrayBuffer$2 = _cloneArrayBuffer;
3236
- function cloneDataView$1(dataView, isDeep) {
3237
- var buffer = isDeep ? cloneArrayBuffer$2(dataView.buffer) : dataView.buffer;
3238
- return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
3239
- }
3240
- var _cloneDataView = cloneDataView$1;
3241
- var reFlags = /\w*$/;
3242
- function cloneRegExp$1(regexp) {
3243
- var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
3244
- result.lastIndex = regexp.lastIndex;
3245
- return result;
3246
- }
3247
- var _cloneRegExp = cloneRegExp$1;
3248
- var Symbol$2 = _Symbol;
3249
- var symbolProto = Symbol$2 ? Symbol$2.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
3250
- function cloneSymbol$1(symbol) {
3251
- return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
3252
- }
3253
- var _cloneSymbol = cloneSymbol$1;
3254
- var cloneArrayBuffer$1 = _cloneArrayBuffer;
3255
- function cloneTypedArray$1(typedArray, isDeep) {
3256
- var buffer = isDeep ? cloneArrayBuffer$1(typedArray.buffer) : typedArray.buffer;
3257
- return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
3258
- }
3259
- var _cloneTypedArray = cloneTypedArray$1;
3260
- var cloneArrayBuffer = _cloneArrayBuffer, cloneDataView = _cloneDataView, cloneRegExp = _cloneRegExp, cloneSymbol = _cloneSymbol, cloneTypedArray = _cloneTypedArray;
3261
- var boolTag$1 = "[object Boolean]", dateTag$1 = "[object Date]", mapTag$2 = "[object Map]", numberTag$1 = "[object Number]", regexpTag$1 = "[object RegExp]", setTag$2 = "[object Set]", stringTag$1 = "[object String]", symbolTag$1 = "[object Symbol]";
3262
- var arrayBufferTag$1 = "[object ArrayBuffer]", dataViewTag$1 = "[object DataView]", float32Tag$1 = "[object Float32Array]", float64Tag$1 = "[object Float64Array]", int8Tag$1 = "[object Int8Array]", int16Tag$1 = "[object Int16Array]", int32Tag$1 = "[object Int32Array]", uint8Tag$1 = "[object Uint8Array]", uint8ClampedTag$1 = "[object Uint8ClampedArray]", uint16Tag$1 = "[object Uint16Array]", uint32Tag$1 = "[object Uint32Array]";
3263
- function initCloneByTag$1(object, tag, isDeep) {
3264
- var Ctor = object.constructor;
3265
- switch (tag) {
3266
- case arrayBufferTag$1:
3267
- return cloneArrayBuffer(object);
3268
- case boolTag$1:
3269
- case dateTag$1:
3270
- return new Ctor(+object);
3271
- case dataViewTag$1:
3272
- return cloneDataView(object, isDeep);
3273
- case float32Tag$1:
3274
- case float64Tag$1:
3275
- case int8Tag$1:
3276
- case int16Tag$1:
3277
- case int32Tag$1:
3278
- case uint8Tag$1:
3279
- case uint8ClampedTag$1:
3280
- case uint16Tag$1:
3281
- case uint32Tag$1:
3282
- return cloneTypedArray(object, isDeep);
3283
- case mapTag$2:
3284
- return new Ctor();
3285
- case numberTag$1:
3286
- case stringTag$1:
3287
- return new Ctor(object);
3288
- case regexpTag$1:
3289
- return cloneRegExp(object);
3290
- case setTag$2:
3291
- return new Ctor();
3292
- case symbolTag$1:
3293
- return cloneSymbol(object);
3294
- }
3295
- }
3296
- var _initCloneByTag = initCloneByTag$1;
3297
- var isObject$1 = isObject_1;
3298
- var objectCreate = Object.create;
3299
- var baseCreate$1 = function() {
3300
- function object() {
3301
- }
3302
- return function(proto) {
3303
- if (!isObject$1(proto)) {
3304
- return {};
3305
- }
3306
- if (objectCreate) {
3307
- return objectCreate(proto);
3308
- }
3309
- object.prototype = proto;
3310
- var result = new object();
3311
- object.prototype = void 0;
3312
- return result;
3313
- };
3314
- }();
3315
- var _baseCreate = baseCreate$1;
3316
- var baseCreate = _baseCreate, getPrototype$1 = _getPrototype, isPrototype = _isPrototype;
3317
- function initCloneObject$1(object) {
3318
- return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype$1(object)) : {};
3319
- }
3320
- var _initCloneObject = initCloneObject$1;
3321
- var getTag$2 = _getTag, isObjectLike$2 = isObjectLike_1;
3322
- var mapTag$1 = "[object Map]";
3323
- function baseIsMap$1(value) {
3324
- return isObjectLike$2(value) && getTag$2(value) == mapTag$1;
3325
- }
3326
- var _baseIsMap = baseIsMap$1;
3327
- var baseIsMap = _baseIsMap, baseUnary$1 = _baseUnary, nodeUtil$1 = _nodeUtil.exports;
3328
- var nodeIsMap = nodeUtil$1 && nodeUtil$1.isMap;
3329
- var isMap$1 = nodeIsMap ? baseUnary$1(nodeIsMap) : baseIsMap;
3330
- var isMap_1 = isMap$1;
3331
- var getTag$1 = _getTag, isObjectLike$1 = isObjectLike_1;
3332
- var setTag$1 = "[object Set]";
3333
- function baseIsSet$1(value) {
3334
- return isObjectLike$1(value) && getTag$1(value) == setTag$1;
3335
- }
3336
- var _baseIsSet = baseIsSet$1;
3337
- var baseIsSet = _baseIsSet, baseUnary = _baseUnary, nodeUtil = _nodeUtil.exports;
3338
- var nodeIsSet = nodeUtil && nodeUtil.isSet;
3339
- var isSet$1 = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
3340
- var isSet_1 = isSet$1;
3341
- var Stack = _Stack, arrayEach = _arrayEach, assignValue = _assignValue, baseAssign = _baseAssign, baseAssignIn = _baseAssignIn, cloneBuffer = _cloneBuffer.exports, copyArray = _copyArray, copySymbols = _copySymbols, copySymbolsIn = _copySymbolsIn, getAllKeys = _getAllKeys, getAllKeysIn$1 = _getAllKeysIn, getTag = _getTag, initCloneArray = _initCloneArray, initCloneByTag = _initCloneByTag, initCloneObject = _initCloneObject, isArray$1 = isArray_1, isBuffer = isBuffer$3.exports, isMap = isMap_1, isObject = isObject_1, isSet = isSet_1, keys = keys_1, keysIn = keysIn_1;
3342
- var CLONE_DEEP_FLAG$1 = 1, CLONE_FLAT_FLAG$1 = 2, CLONE_SYMBOLS_FLAG$1 = 4;
3343
- var argsTag = "[object Arguments]", arrayTag = "[object Array]", boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag = "[object Map]", numberTag = "[object Number]", objectTag$1 = "[object Object]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]", weakMapTag = "[object WeakMap]";
3344
- 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]";
3345
- var cloneableTags = {};
3346
- cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag$1] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
3347
- cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
3348
- function baseClone$1(value, bitmask, customizer, key, object, stack) {
3349
- var result, isDeep = bitmask & CLONE_DEEP_FLAG$1, isFlat = bitmask & CLONE_FLAT_FLAG$1, isFull = bitmask & CLONE_SYMBOLS_FLAG$1;
3350
- if (customizer) {
3351
- result = object ? customizer(value, key, object, stack) : customizer(value);
3352
- }
3353
- if (result !== void 0) {
3354
- return result;
3355
- }
3356
- if (!isObject(value)) {
3357
- return value;
3358
- }
3359
- var isArr = isArray$1(value);
3360
- if (isArr) {
3361
- result = initCloneArray(value);
3362
- if (!isDeep) {
3363
- return copyArray(value, result);
3364
- }
3365
- } else {
3366
- var tag = getTag(value), isFunc = tag == funcTag || tag == genTag;
3367
- if (isBuffer(value)) {
3368
- return cloneBuffer(value, isDeep);
3369
- }
3370
- if (tag == objectTag$1 || tag == argsTag || isFunc && !object) {
3371
- result = isFlat || isFunc ? {} : initCloneObject(value);
3372
- if (!isDeep) {
3373
- return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value));
3374
- }
3375
- } else {
3376
- if (!cloneableTags[tag]) {
3377
- return object ? value : {};
3378
- }
3379
- result = initCloneByTag(value, tag, isDeep);
3380
- }
3381
- }
3382
- stack || (stack = new Stack());
3383
- var stacked = stack.get(value);
3384
- if (stacked) {
3385
- return stacked;
3386
- }
3387
- stack.set(value, result);
3388
- if (isSet(value)) {
3389
- value.forEach(function(subValue) {
3390
- result.add(baseClone$1(subValue, bitmask, customizer, subValue, value, stack));
3391
- });
3392
- } else if (isMap(value)) {
3393
- value.forEach(function(subValue, key2) {
3394
- result.set(key2, baseClone$1(subValue, bitmask, customizer, key2, value, stack));
3395
- });
3396
- }
3397
- var keysFunc = isFull ? isFlat ? getAllKeysIn$1 : getAllKeys : isFlat ? keysIn : keys;
3398
- var props = isArr ? void 0 : keysFunc(value);
3399
- arrayEach(props || value, function(subValue, key2) {
3400
- if (props) {
3401
- key2 = subValue;
3402
- subValue = value[key2];
3403
- }
3404
- assignValue(result, key2, baseClone$1(subValue, bitmask, customizer, key2, value, stack));
3405
- });
3406
- return result;
3407
- }
3408
- var _baseClone = baseClone$1;
3409
- function last$1(array) {
3410
- var length = array == null ? 0 : array.length;
3411
- return length ? array[length - 1] : void 0;
3412
- }
3413
- var last_1 = last$1;
3414
- function baseSlice$1(array, start, end) {
3415
- var index = -1, length = array.length;
3416
- if (start < 0) {
3417
- start = -start > length ? 0 : length + start;
3418
- }
3419
- end = end > length ? length : end;
3420
- if (end < 0) {
3421
- end += length;
3422
- }
3423
- length = start > end ? 0 : end - start >>> 0;
3424
- start >>>= 0;
3425
- var result = Array(length);
3426
- while (++index < length) {
3427
- result[index] = array[index + start];
3428
- }
3429
- return result;
3430
- }
3431
- var _baseSlice = baseSlice$1;
3432
- var baseGet = _baseGet, baseSlice = _baseSlice;
3433
- function parent$1(object, path) {
3434
- return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
3435
- }
3436
- var _parent = parent$1;
3437
- var castPath$1 = _castPath, last = last_1, parent = _parent, toKey = _toKey;
3438
- function baseUnset$1(object, path) {
3439
- path = castPath$1(path, object);
3440
- object = parent(object, path);
3441
- return object == null || delete object[toKey(last(path))];
3442
- }
3443
- var _baseUnset = baseUnset$1;
3444
- var baseGetTag = _baseGetTag, getPrototype = _getPrototype, isObjectLike = isObjectLike_1;
3445
- var objectTag = "[object Object]";
3446
- var funcProto = Function.prototype, objectProto = Object.prototype;
3447
- var funcToString = funcProto.toString;
3448
- var hasOwnProperty = objectProto.hasOwnProperty;
3449
- var objectCtorString = funcToString.call(Object);
3450
- function isPlainObject$1(value) {
3451
- if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
3452
- return false;
3453
- }
3454
- var proto = getPrototype(value);
3455
- if (proto === null) {
3456
- return true;
3457
- }
3458
- var Ctor = hasOwnProperty.call(proto, "constructor") && proto.constructor;
3459
- return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
3460
- }
3461
- var isPlainObject_1 = isPlainObject$1;
3462
- var isPlainObject = isPlainObject_1;
3463
- function customOmitClone$1(value) {
3464
- return isPlainObject(value) ? void 0 : value;
3465
- }
3466
- var _customOmitClone = customOmitClone$1;
3467
- var Symbol$1 = _Symbol, isArguments = isArguments_1, isArray = isArray_1;
3468
- var spreadableSymbol = Symbol$1 ? Symbol$1.isConcatSpreadable : void 0;
3469
- function isFlattenable$1(value) {
3470
- return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
3471
- }
3472
- var _isFlattenable = isFlattenable$1;
3473
- var arrayPush = _arrayPush, isFlattenable = _isFlattenable;
3474
- function baseFlatten$1(array, depth, predicate, isStrict, result) {
3475
- var index = -1, length = array.length;
3476
- predicate || (predicate = isFlattenable);
3477
- result || (result = []);
3478
- while (++index < length) {
3479
- var value = array[index];
3480
- if (depth > 0 && predicate(value)) {
3481
- if (depth > 1) {
3482
- baseFlatten$1(value, depth - 1, predicate, isStrict, result);
3483
- } else {
3484
- arrayPush(result, value);
3485
- }
3486
- } else if (!isStrict) {
3487
- result[result.length] = value;
3488
- }
3489
- }
3490
- return result;
3491
- }
3492
- var _baseFlatten = baseFlatten$1;
3493
- var baseFlatten = _baseFlatten;
3494
- function flatten$1(array) {
3495
- var length = array == null ? 0 : array.length;
3496
- return length ? baseFlatten(array, 1) : [];
3497
- }
3498
- var flatten_1 = flatten$1;
3499
- function apply$1(func, thisArg, args) {
3500
- switch (args.length) {
3501
- case 0:
3502
- return func.call(thisArg);
3503
- case 1:
3504
- return func.call(thisArg, args[0]);
3505
- case 2:
3506
- return func.call(thisArg, args[0], args[1]);
3507
- case 3:
3508
- return func.call(thisArg, args[0], args[1], args[2]);
3509
- }
3510
- return func.apply(thisArg, args);
3511
- }
3512
- var _apply = apply$1;
3513
- var apply = _apply;
3514
- var nativeMax = Math.max;
3515
- function overRest$1(func, start, transform) {
3516
- start = nativeMax(start === void 0 ? func.length - 1 : start, 0);
3517
- return function() {
3518
- var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length);
3519
- while (++index < length) {
3520
- array[index] = args[start + index];
3521
- }
3522
- index = -1;
3523
- var otherArgs = Array(start + 1);
3524
- while (++index < start) {
3525
- otherArgs[index] = args[index];
3526
- }
3527
- otherArgs[start] = transform(array);
3528
- return apply(func, this, otherArgs);
3529
- };
3530
- }
3531
- var _overRest = overRest$1;
3532
- function constant$1(value) {
3533
- return function() {
3534
- return value;
3535
- };
3536
- }
3537
- var constant_1 = constant$1;
3538
- var constant = constant_1, defineProperty = _defineProperty, identity = identity_1;
3539
- var baseSetToString$1 = !defineProperty ? identity : function(func, string) {
3540
- return defineProperty(func, "toString", {
3541
- "configurable": true,
3542
- "enumerable": false,
3543
- "value": constant(string),
3544
- "writable": true
3545
- });
3546
- };
3547
- var _baseSetToString = baseSetToString$1;
3548
- var HOT_COUNT = 800, HOT_SPAN = 16;
3549
- var nativeNow = Date.now;
3550
- function shortOut$1(func) {
3551
- var count = 0, lastCalled = 0;
3552
- return function() {
3553
- var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
3554
- lastCalled = stamp;
3555
- if (remaining > 0) {
3556
- if (++count >= HOT_COUNT) {
3557
- return arguments[0];
3558
- }
3559
- } else {
3560
- count = 0;
3561
- }
3562
- return func.apply(void 0, arguments);
3563
- };
3564
- }
3565
- var _shortOut = shortOut$1;
3566
- var baseSetToString = _baseSetToString, shortOut = _shortOut;
3567
- var setToString$1 = shortOut(baseSetToString);
3568
- var _setToString = setToString$1;
3569
- var flatten = flatten_1, overRest = _overRest, setToString = _setToString;
3570
- function flatRest$1(func) {
3571
- return setToString(overRest(func, void 0, flatten), func + "");
3572
- }
3573
- var _flatRest = flatRest$1;
3574
- var arrayMap = _arrayMap, baseClone = _baseClone, baseUnset = _baseUnset, castPath = _castPath, copyObject = _copyObject, customOmitClone = _customOmitClone, flatRest = _flatRest, getAllKeysIn = _getAllKeysIn;
3575
- var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4;
3576
- var omit = flatRest(function(object, paths) {
3577
- var result = {};
3578
- if (object == null) {
3579
- return result;
3580
- }
3581
- var isDeep = false;
3582
- paths = arrayMap(paths, function(path) {
3583
- path = castPath(path, object);
3584
- isDeep || (isDeep = path.length > 1);
3585
- return path;
3586
- });
3587
- copyObject(object, getAllKeysIn(object), result);
3588
- if (isDeep) {
3589
- result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
3590
- }
3591
- var length = paths.length;
3592
- while (length--) {
3593
- baseUnset(result, paths[length]);
3594
- }
3595
- return result;
3596
- });
3597
- var omit_1 = omit;
3598
1962
  const objectFromPathEntries = (entries) => {
3599
1963
  const map = new MultiValueMap();
3600
1964
  entries.forEach(([key, value]) => map.add(key, value));
3601
1965
  return [...map.entries()].reduce(
3602
- (acc, [key, value]) => set_1(acc, key, value.length === 1 ? value[0] : value),
1966
+ (acc, [key, value]) => set(acc, key, value.length === 1 ? value[0] : value),
3603
1967
  {}
3604
1968
  );
3605
1969
  };
@@ -3608,7 +1972,7 @@ const preprocessFormData = (data) => {
3608
1972
  return objectFromPathEntries([...data.entries()]);
3609
1973
  return objectFromPathEntries(Object.entries(data));
3610
1974
  };
3611
- const omitInternalFields = (data) => omit_1(data, FORM_ID_FIELD);
1975
+ const omitInternalFields = (data) => omit(data, [FORM_ID_FIELD]);
3612
1976
  function createValidator(validator) {
3613
1977
  return {
3614
1978
  validate: async (value) => {