@opengeoweb/form-fields 9.11.0 → 9.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.esm.js +2698 -437
  2. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -10,6 +10,1076 @@ import { CalendarToday } from '@opengeoweb/theme';
10
10
  import { AdapterMoment } from '@mui/x-date-pickers/AdapterMoment';
11
11
  import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
12
12
 
13
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
14
+
15
+ var check = function (it) {
16
+ return it && it.Math === Math && it;
17
+ };
18
+
19
+ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
20
+ var global$i =
21
+ // eslint-disable-next-line es/no-global-this -- safe
22
+ check(typeof globalThis == 'object' && globalThis) ||
23
+ check(typeof window == 'object' && window) ||
24
+ // eslint-disable-next-line no-restricted-globals -- safe
25
+ check(typeof self == 'object' && self) ||
26
+ check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
27
+ check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
28
+ // eslint-disable-next-line no-new-func -- fallback
29
+ (function () { return this; })() || Function('return this')();
30
+
31
+ var objectGetOwnPropertyDescriptor = {};
32
+
33
+ var fails$l = function (exec) {
34
+ try {
35
+ return !!exec();
36
+ } catch (error) {
37
+ return true;
38
+ }
39
+ };
40
+
41
+ var fails$k = fails$l;
42
+
43
+ // Detect IE8's incomplete defineProperty implementation
44
+ var descriptors = !fails$k(function () {
45
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
46
+ return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
47
+ });
48
+
49
+ var fails$j = fails$l;
50
+
51
+ var functionBindNative = !fails$j(function () {
52
+ // eslint-disable-next-line es/no-function-prototype-bind -- safe
53
+ var test = (function () { /* empty */ }).bind();
54
+ // eslint-disable-next-line no-prototype-builtins -- safe
55
+ return typeof test != 'function' || test.hasOwnProperty('prototype');
56
+ });
57
+
58
+ var NATIVE_BIND$1 = functionBindNative;
59
+
60
+ var call$b = Function.prototype.call;
61
+
62
+ var functionCall = NATIVE_BIND$1 ? call$b.bind(call$b) : function () {
63
+ return call$b.apply(call$b, arguments);
64
+ };
65
+
66
+ var objectPropertyIsEnumerable = {};
67
+
68
+ var $propertyIsEnumerable = {}.propertyIsEnumerable;
69
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
70
+ var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
71
+
72
+ // Nashorn ~ JDK8 bug
73
+ var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
74
+
75
+ // `Object.prototype.propertyIsEnumerable` method implementation
76
+ // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
77
+ objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
78
+ var descriptor = getOwnPropertyDescriptor$1(this, V);
79
+ return !!descriptor && descriptor.enumerable;
80
+ } : $propertyIsEnumerable;
81
+
82
+ var createPropertyDescriptor$3 = function (bitmap, value) {
83
+ return {
84
+ enumerable: !(bitmap & 1),
85
+ configurable: !(bitmap & 2),
86
+ writable: !(bitmap & 4),
87
+ value: value
88
+ };
89
+ };
90
+
91
+ var NATIVE_BIND = functionBindNative;
92
+
93
+ var FunctionPrototype$1 = Function.prototype;
94
+ var call$a = FunctionPrototype$1.call;
95
+ var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype$1.bind.bind(call$a, call$a);
96
+
97
+ var functionUncurryThis = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
98
+ return function () {
99
+ return call$a.apply(fn, arguments);
100
+ };
101
+ };
102
+
103
+ var uncurryThis$g = functionUncurryThis;
104
+
105
+ var toString$9 = uncurryThis$g({}.toString);
106
+ var stringSlice$3 = uncurryThis$g(''.slice);
107
+
108
+ var classofRaw$1 = function (it) {
109
+ return stringSlice$3(toString$9(it), 8, -1);
110
+ };
111
+
112
+ var uncurryThis$f = functionUncurryThis;
113
+ var fails$i = fails$l;
114
+ var classof$5 = classofRaw$1;
115
+
116
+ var $Object$4 = Object;
117
+ var split = uncurryThis$f(''.split);
118
+
119
+ // fallback for non-array-like ES3 and non-enumerable old V8 strings
120
+ var indexedObject = fails$i(function () {
121
+ // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
122
+ // eslint-disable-next-line no-prototype-builtins -- safe
123
+ return !$Object$4('z').propertyIsEnumerable(0);
124
+ }) ? function (it) {
125
+ return classof$5(it) === 'String' ? split(it, '') : $Object$4(it);
126
+ } : $Object$4;
127
+
128
+ // we can't use just `it == null` since of `document.all` special case
129
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
130
+ var isNullOrUndefined$3 = function (it) {
131
+ return it === null || it === undefined;
132
+ };
133
+
134
+ var isNullOrUndefined$2 = isNullOrUndefined$3;
135
+
136
+ var $TypeError$9 = TypeError;
137
+
138
+ // `RequireObjectCoercible` abstract operation
139
+ // https://tc39.es/ecma262/#sec-requireobjectcoercible
140
+ var requireObjectCoercible$6 = function (it) {
141
+ if (isNullOrUndefined$2(it)) throw new $TypeError$9("Can't call method on " + it);
142
+ return it;
143
+ };
144
+
145
+ // toObject with fallback for non-array-like ES3 strings
146
+ var IndexedObject$2 = indexedObject;
147
+ var requireObjectCoercible$5 = requireObjectCoercible$6;
148
+
149
+ var toIndexedObject$5 = function (it) {
150
+ return IndexedObject$2(requireObjectCoercible$5(it));
151
+ };
152
+
153
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
154
+ var documentAll = typeof document == 'object' && document.all;
155
+
156
+ // `IsCallable` abstract operation
157
+ // https://tc39.es/ecma262/#sec-iscallable
158
+ // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
159
+ var isCallable$f = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
160
+ return typeof argument == 'function' || argument === documentAll;
161
+ } : function (argument) {
162
+ return typeof argument == 'function';
163
+ };
164
+
165
+ var isCallable$e = isCallable$f;
166
+
167
+ var isObject$8 = function (it) {
168
+ return typeof it == 'object' ? it !== null : isCallable$e(it);
169
+ };
170
+
171
+ var global$h = global$i;
172
+ var isCallable$d = isCallable$f;
173
+
174
+ var aFunction = function (argument) {
175
+ return isCallable$d(argument) ? argument : undefined;
176
+ };
177
+
178
+ var getBuiltIn$3 = function (namespace, method) {
179
+ return arguments.length < 2 ? aFunction(global$h[namespace]) : global$h[namespace] && global$h[namespace][method];
180
+ };
181
+
182
+ var uncurryThis$e = functionUncurryThis;
183
+
184
+ var objectIsPrototypeOf = uncurryThis$e({}.isPrototypeOf);
185
+
186
+ var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
187
+
188
+ var global$g = global$i;
189
+ var userAgent = engineUserAgent;
190
+
191
+ var process = global$g.process;
192
+ var Deno = global$g.Deno;
193
+ var versions = process && process.versions || Deno && Deno.version;
194
+ var v8 = versions && versions.v8;
195
+ var match, version;
196
+
197
+ if (v8) {
198
+ match = v8.split('.');
199
+ // in old Chrome, versions of V8 isn't V8 = Chrome / 10
200
+ // but their correct versions are not interesting for us
201
+ version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
202
+ }
203
+
204
+ // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
205
+ // so check `userAgent` even if `.v8` exists, but 0
206
+ if (!version && userAgent) {
207
+ match = userAgent.match(/Edge\/(\d+)/);
208
+ if (!match || match[1] >= 74) {
209
+ match = userAgent.match(/Chrome\/(\d+)/);
210
+ if (match) version = +match[1];
211
+ }
212
+ }
213
+
214
+ var engineV8Version = version;
215
+
216
+ /* eslint-disable es/no-symbol -- required for testing */
217
+ var V8_VERSION = engineV8Version;
218
+ var fails$h = fails$l;
219
+ var global$f = global$i;
220
+
221
+ var $String$5 = global$f.String;
222
+
223
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
224
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$h(function () {
225
+ var symbol = Symbol('symbol detection');
226
+ // Chrome 38 Symbol has incorrect toString conversion
227
+ // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
228
+ // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
229
+ // of course, fail.
230
+ return !$String$5(symbol) || !(Object(symbol) instanceof Symbol) ||
231
+ // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
232
+ !Symbol.sham && V8_VERSION && V8_VERSION < 41;
233
+ });
234
+
235
+ /* eslint-disable es/no-symbol -- required for testing */
236
+ var NATIVE_SYMBOL$1 = symbolConstructorDetection;
237
+
238
+ var useSymbolAsUid = NATIVE_SYMBOL$1
239
+ && !Symbol.sham
240
+ && typeof Symbol.iterator == 'symbol';
241
+
242
+ var getBuiltIn$2 = getBuiltIn$3;
243
+ var isCallable$c = isCallable$f;
244
+ var isPrototypeOf$1 = objectIsPrototypeOf;
245
+ var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
246
+
247
+ var $Object$3 = Object;
248
+
249
+ var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
250
+ return typeof it == 'symbol';
251
+ } : function (it) {
252
+ var $Symbol = getBuiltIn$2('Symbol');
253
+ return isCallable$c($Symbol) && isPrototypeOf$1($Symbol.prototype, $Object$3(it));
254
+ };
255
+
256
+ var $String$4 = String;
257
+
258
+ var tryToString$1 = function (argument) {
259
+ try {
260
+ return $String$4(argument);
261
+ } catch (error) {
262
+ return 'Object';
263
+ }
264
+ };
265
+
266
+ var isCallable$b = isCallable$f;
267
+ var tryToString = tryToString$1;
268
+
269
+ var $TypeError$8 = TypeError;
270
+
271
+ // `Assert: IsCallable(argument) is true`
272
+ var aCallable$3 = function (argument) {
273
+ if (isCallable$b(argument)) return argument;
274
+ throw new $TypeError$8(tryToString(argument) + ' is not a function');
275
+ };
276
+
277
+ var aCallable$2 = aCallable$3;
278
+ var isNullOrUndefined$1 = isNullOrUndefined$3;
279
+
280
+ // `GetMethod` abstract operation
281
+ // https://tc39.es/ecma262/#sec-getmethod
282
+ var getMethod$2 = function (V, P) {
283
+ var func = V[P];
284
+ return isNullOrUndefined$1(func) ? undefined : aCallable$2(func);
285
+ };
286
+
287
+ var call$9 = functionCall;
288
+ var isCallable$a = isCallable$f;
289
+ var isObject$7 = isObject$8;
290
+
291
+ var $TypeError$7 = TypeError;
292
+
293
+ // `OrdinaryToPrimitive` abstract operation
294
+ // https://tc39.es/ecma262/#sec-ordinarytoprimitive
295
+ var ordinaryToPrimitive$1 = function (input, pref) {
296
+ var fn, val;
297
+ if (pref === 'string' && isCallable$a(fn = input.toString) && !isObject$7(val = call$9(fn, input))) return val;
298
+ if (isCallable$a(fn = input.valueOf) && !isObject$7(val = call$9(fn, input))) return val;
299
+ if (pref !== 'string' && isCallable$a(fn = input.toString) && !isObject$7(val = call$9(fn, input))) return val;
300
+ throw new $TypeError$7("Can't convert object to primitive value");
301
+ };
302
+
303
+ var shared$4 = {exports: {}};
304
+
305
+ var global$e = global$i;
306
+
307
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
308
+ var defineProperty$5 = Object.defineProperty;
309
+
310
+ var defineGlobalProperty$3 = function (key, value) {
311
+ try {
312
+ defineProperty$5(global$e, key, { value: value, configurable: true, writable: true });
313
+ } catch (error) {
314
+ global$e[key] = value;
315
+ } return value;
316
+ };
317
+
318
+ var global$d = global$i;
319
+ var defineGlobalProperty$2 = defineGlobalProperty$3;
320
+
321
+ var SHARED = '__core-js_shared__';
322
+ var store$3 = global$d[SHARED] || defineGlobalProperty$2(SHARED, {});
323
+
324
+ var sharedStore = store$3;
325
+
326
+ var store$2 = sharedStore;
327
+
328
+ (shared$4.exports = function (key, value) {
329
+ return store$2[key] || (store$2[key] = value !== undefined ? value : {});
330
+ })('versions', []).push({
331
+ version: '3.35.1',
332
+ mode: 'global',
333
+ copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
334
+ license: 'https://github.com/zloirock/core-js/blob/v3.35.1/LICENSE',
335
+ source: 'https://github.com/zloirock/core-js'
336
+ });
337
+
338
+ var requireObjectCoercible$4 = requireObjectCoercible$6;
339
+
340
+ var $Object$2 = Object;
341
+
342
+ // `ToObject` abstract operation
343
+ // https://tc39.es/ecma262/#sec-toobject
344
+ var toObject$4 = function (argument) {
345
+ return $Object$2(requireObjectCoercible$4(argument));
346
+ };
347
+
348
+ var uncurryThis$d = functionUncurryThis;
349
+ var toObject$3 = toObject$4;
350
+
351
+ var hasOwnProperty = uncurryThis$d({}.hasOwnProperty);
352
+
353
+ // `HasOwnProperty` abstract operation
354
+ // https://tc39.es/ecma262/#sec-hasownproperty
355
+ // eslint-disable-next-line es/no-object-hasown -- safe
356
+ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
357
+ return hasOwnProperty(toObject$3(it), key);
358
+ };
359
+
360
+ var uncurryThis$c = functionUncurryThis;
361
+
362
+ var id = 0;
363
+ var postfix = Math.random();
364
+ var toString$8 = uncurryThis$c(1.0.toString);
365
+
366
+ var uid$2 = function (key) {
367
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$8(++id + postfix, 36);
368
+ };
369
+
370
+ var global$c = global$i;
371
+ var shared$3 = shared$4.exports;
372
+ var hasOwn$9 = hasOwnProperty_1;
373
+ var uid$1 = uid$2;
374
+ var NATIVE_SYMBOL = symbolConstructorDetection;
375
+ var USE_SYMBOL_AS_UID = useSymbolAsUid;
376
+
377
+ var Symbol$3 = global$c.Symbol;
378
+ var WellKnownSymbolsStore = shared$3('wks');
379
+ var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$3['for'] || Symbol$3 : Symbol$3 && Symbol$3.withoutSetter || uid$1;
380
+
381
+ var wellKnownSymbol$b = function (name) {
382
+ if (!hasOwn$9(WellKnownSymbolsStore, name)) {
383
+ WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$9(Symbol$3, name)
384
+ ? Symbol$3[name]
385
+ : createWellKnownSymbol('Symbol.' + name);
386
+ } return WellKnownSymbolsStore[name];
387
+ };
388
+
389
+ var call$8 = functionCall;
390
+ var isObject$6 = isObject$8;
391
+ var isSymbol$1 = isSymbol$2;
392
+ var getMethod$1 = getMethod$2;
393
+ var ordinaryToPrimitive = ordinaryToPrimitive$1;
394
+ var wellKnownSymbol$a = wellKnownSymbol$b;
395
+
396
+ var $TypeError$6 = TypeError;
397
+ var TO_PRIMITIVE = wellKnownSymbol$a('toPrimitive');
398
+
399
+ // `ToPrimitive` abstract operation
400
+ // https://tc39.es/ecma262/#sec-toprimitive
401
+ var toPrimitive$1 = function (input, pref) {
402
+ if (!isObject$6(input) || isSymbol$1(input)) return input;
403
+ var exoticToPrim = getMethod$1(input, TO_PRIMITIVE);
404
+ var result;
405
+ if (exoticToPrim) {
406
+ if (pref === undefined) pref = 'default';
407
+ result = call$8(exoticToPrim, input, pref);
408
+ if (!isObject$6(result) || isSymbol$1(result)) return result;
409
+ throw new $TypeError$6("Can't convert object to primitive value");
410
+ }
411
+ if (pref === undefined) pref = 'number';
412
+ return ordinaryToPrimitive(input, pref);
413
+ };
414
+
415
+ var toPrimitive = toPrimitive$1;
416
+ var isSymbol = isSymbol$2;
417
+
418
+ // `ToPropertyKey` abstract operation
419
+ // https://tc39.es/ecma262/#sec-topropertykey
420
+ var toPropertyKey$2 = function (argument) {
421
+ var key = toPrimitive(argument, 'string');
422
+ return isSymbol(key) ? key : key + '';
423
+ };
424
+
425
+ var global$b = global$i;
426
+ var isObject$5 = isObject$8;
427
+
428
+ var document$1 = global$b.document;
429
+ // typeof document.createElement is 'object' in old IE
430
+ var EXISTS$1 = isObject$5(document$1) && isObject$5(document$1.createElement);
431
+
432
+ var documentCreateElement$2 = function (it) {
433
+ return EXISTS$1 ? document$1.createElement(it) : {};
434
+ };
435
+
436
+ var DESCRIPTORS$9 = descriptors;
437
+ var fails$g = fails$l;
438
+ var createElement = documentCreateElement$2;
439
+
440
+ // Thanks to IE8 for its funny defineProperty
441
+ var ie8DomDefine = !DESCRIPTORS$9 && !fails$g(function () {
442
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
443
+ return Object.defineProperty(createElement('div'), 'a', {
444
+ get: function () { return 7; }
445
+ }).a !== 7;
446
+ });
447
+
448
+ var DESCRIPTORS$8 = descriptors;
449
+ var call$7 = functionCall;
450
+ var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
451
+ var createPropertyDescriptor$2 = createPropertyDescriptor$3;
452
+ var toIndexedObject$4 = toIndexedObject$5;
453
+ var toPropertyKey$1 = toPropertyKey$2;
454
+ var hasOwn$8 = hasOwnProperty_1;
455
+ var IE8_DOM_DEFINE$1 = ie8DomDefine;
456
+
457
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
458
+ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
459
+
460
+ // `Object.getOwnPropertyDescriptor` method
461
+ // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
462
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$8 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
463
+ O = toIndexedObject$4(O);
464
+ P = toPropertyKey$1(P);
465
+ if (IE8_DOM_DEFINE$1) try {
466
+ return $getOwnPropertyDescriptor$1(O, P);
467
+ } catch (error) { /* empty */ }
468
+ if (hasOwn$8(O, P)) return createPropertyDescriptor$2(!call$7(propertyIsEnumerableModule$1.f, O, P), O[P]);
469
+ };
470
+
471
+ var objectDefineProperty = {};
472
+
473
+ var DESCRIPTORS$7 = descriptors;
474
+ var fails$f = fails$l;
475
+
476
+ // V8 ~ Chrome 36-
477
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3334
478
+ var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$f(function () {
479
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
480
+ return Object.defineProperty(function () { /* empty */ }, 'prototype', {
481
+ value: 42,
482
+ writable: false
483
+ }).prototype !== 42;
484
+ });
485
+
486
+ var isObject$4 = isObject$8;
487
+
488
+ var $String$3 = String;
489
+ var $TypeError$5 = TypeError;
490
+
491
+ // `Assert: Type(argument) is Object`
492
+ var anObject$9 = function (argument) {
493
+ if (isObject$4(argument)) return argument;
494
+ throw new $TypeError$5($String$3(argument) + ' is not an object');
495
+ };
496
+
497
+ var DESCRIPTORS$6 = descriptors;
498
+ var IE8_DOM_DEFINE = ie8DomDefine;
499
+ var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
500
+ var anObject$8 = anObject$9;
501
+ var toPropertyKey = toPropertyKey$2;
502
+
503
+ var $TypeError$4 = TypeError;
504
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
505
+ var $defineProperty = Object.defineProperty;
506
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
507
+ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
508
+ var ENUMERABLE = 'enumerable';
509
+ var CONFIGURABLE$1 = 'configurable';
510
+ var WRITABLE = 'writable';
511
+
512
+ // `Object.defineProperty` method
513
+ // https://tc39.es/ecma262/#sec-object.defineproperty
514
+ objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
515
+ anObject$8(O);
516
+ P = toPropertyKey(P);
517
+ anObject$8(Attributes);
518
+ if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
519
+ var current = $getOwnPropertyDescriptor(O, P);
520
+ if (current && current[WRITABLE]) {
521
+ O[P] = Attributes.value;
522
+ Attributes = {
523
+ configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
524
+ enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
525
+ writable: false
526
+ };
527
+ }
528
+ } return $defineProperty(O, P, Attributes);
529
+ } : $defineProperty : function defineProperty(O, P, Attributes) {
530
+ anObject$8(O);
531
+ P = toPropertyKey(P);
532
+ anObject$8(Attributes);
533
+ if (IE8_DOM_DEFINE) try {
534
+ return $defineProperty(O, P, Attributes);
535
+ } catch (error) { /* empty */ }
536
+ if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$4('Accessors not supported');
537
+ if ('value' in Attributes) O[P] = Attributes.value;
538
+ return O;
539
+ };
540
+
541
+ var DESCRIPTORS$5 = descriptors;
542
+ var definePropertyModule$3 = objectDefineProperty;
543
+ var createPropertyDescriptor$1 = createPropertyDescriptor$3;
544
+
545
+ var createNonEnumerableProperty$5 = DESCRIPTORS$5 ? function (object, key, value) {
546
+ return definePropertyModule$3.f(object, key, createPropertyDescriptor$1(1, value));
547
+ } : function (object, key, value) {
548
+ object[key] = value;
549
+ return object;
550
+ };
551
+
552
+ var makeBuiltIn$2 = {exports: {}};
553
+
554
+ var DESCRIPTORS$4 = descriptors;
555
+ var hasOwn$7 = hasOwnProperty_1;
556
+
557
+ var FunctionPrototype = Function.prototype;
558
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
559
+ var getDescriptor = DESCRIPTORS$4 && Object.getOwnPropertyDescriptor;
560
+
561
+ var EXISTS = hasOwn$7(FunctionPrototype, 'name');
562
+ // additional protection from minified / mangled / dropped function names
563
+ var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
564
+ var CONFIGURABLE = EXISTS && (!DESCRIPTORS$4 || (DESCRIPTORS$4 && getDescriptor(FunctionPrototype, 'name').configurable));
565
+
566
+ var functionName = {
567
+ EXISTS: EXISTS,
568
+ PROPER: PROPER,
569
+ CONFIGURABLE: CONFIGURABLE
570
+ };
571
+
572
+ var uncurryThis$b = functionUncurryThis;
573
+ var isCallable$9 = isCallable$f;
574
+ var store$1 = sharedStore;
575
+
576
+ var functionToString = uncurryThis$b(Function.toString);
577
+
578
+ // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
579
+ if (!isCallable$9(store$1.inspectSource)) {
580
+ store$1.inspectSource = function (it) {
581
+ return functionToString(it);
582
+ };
583
+ }
584
+
585
+ var inspectSource$1 = store$1.inspectSource;
586
+
587
+ var global$a = global$i;
588
+ var isCallable$8 = isCallable$f;
589
+
590
+ var WeakMap$1 = global$a.WeakMap;
591
+
592
+ var weakMapBasicDetection = isCallable$8(WeakMap$1) && /native code/.test(String(WeakMap$1));
593
+
594
+ var shared$2 = shared$4.exports;
595
+ var uid = uid$2;
596
+
597
+ var keys = shared$2('keys');
598
+
599
+ var sharedKey$3 = function (key) {
600
+ return keys[key] || (keys[key] = uid(key));
601
+ };
602
+
603
+ var hiddenKeys$4 = {};
604
+
605
+ var NATIVE_WEAK_MAP = weakMapBasicDetection;
606
+ var global$9 = global$i;
607
+ var isObject$3 = isObject$8;
608
+ var createNonEnumerableProperty$4 = createNonEnumerableProperty$5;
609
+ var hasOwn$6 = hasOwnProperty_1;
610
+ var shared$1 = sharedStore;
611
+ var sharedKey$2 = sharedKey$3;
612
+ var hiddenKeys$3 = hiddenKeys$4;
613
+
614
+ var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
615
+ var TypeError$1 = global$9.TypeError;
616
+ var WeakMap = global$9.WeakMap;
617
+ var set, get, has;
618
+
619
+ var enforce = function (it) {
620
+ return has(it) ? get(it) : set(it, {});
621
+ };
622
+
623
+ var getterFor = function (TYPE) {
624
+ return function (it) {
625
+ var state;
626
+ if (!isObject$3(it) || (state = get(it)).type !== TYPE) {
627
+ throw new TypeError$1('Incompatible receiver, ' + TYPE + ' required');
628
+ } return state;
629
+ };
630
+ };
631
+
632
+ if (NATIVE_WEAK_MAP || shared$1.state) {
633
+ var store = shared$1.state || (shared$1.state = new WeakMap());
634
+ /* eslint-disable no-self-assign -- prototype methods protection */
635
+ store.get = store.get;
636
+ store.has = store.has;
637
+ store.set = store.set;
638
+ /* eslint-enable no-self-assign -- prototype methods protection */
639
+ set = function (it, metadata) {
640
+ if (store.has(it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
641
+ metadata.facade = it;
642
+ store.set(it, metadata);
643
+ return metadata;
644
+ };
645
+ get = function (it) {
646
+ return store.get(it) || {};
647
+ };
648
+ has = function (it) {
649
+ return store.has(it);
650
+ };
651
+ } else {
652
+ var STATE = sharedKey$2('state');
653
+ hiddenKeys$3[STATE] = true;
654
+ set = function (it, metadata) {
655
+ if (hasOwn$6(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
656
+ metadata.facade = it;
657
+ createNonEnumerableProperty$4(it, STATE, metadata);
658
+ return metadata;
659
+ };
660
+ get = function (it) {
661
+ return hasOwn$6(it, STATE) ? it[STATE] : {};
662
+ };
663
+ has = function (it) {
664
+ return hasOwn$6(it, STATE);
665
+ };
666
+ }
667
+
668
+ var internalState = {
669
+ set: set,
670
+ get: get,
671
+ has: has,
672
+ enforce: enforce,
673
+ getterFor: getterFor
674
+ };
675
+
676
+ var uncurryThis$a = functionUncurryThis;
677
+ var fails$e = fails$l;
678
+ var isCallable$7 = isCallable$f;
679
+ var hasOwn$5 = hasOwnProperty_1;
680
+ var DESCRIPTORS$3 = descriptors;
681
+ var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
682
+ var inspectSource = inspectSource$1;
683
+ var InternalStateModule$1 = internalState;
684
+
685
+ var enforceInternalState = InternalStateModule$1.enforce;
686
+ var getInternalState$2 = InternalStateModule$1.get;
687
+ var $String$2 = String;
688
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
689
+ var defineProperty$4 = Object.defineProperty;
690
+ var stringSlice$2 = uncurryThis$a(''.slice);
691
+ var replace$2 = uncurryThis$a(''.replace);
692
+ var join = uncurryThis$a([].join);
693
+
694
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$3 && !fails$e(function () {
695
+ return defineProperty$4(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
696
+ });
697
+
698
+ var TEMPLATE = String(String).split('String');
699
+
700
+ var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
701
+ if (stringSlice$2($String$2(name), 0, 7) === 'Symbol(') {
702
+ name = '[' + replace$2($String$2(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
703
+ }
704
+ if (options && options.getter) name = 'get ' + name;
705
+ if (options && options.setter) name = 'set ' + name;
706
+ if (!hasOwn$5(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
707
+ if (DESCRIPTORS$3) defineProperty$4(value, 'name', { value: name, configurable: true });
708
+ else value.name = name;
709
+ }
710
+ if (CONFIGURABLE_LENGTH && options && hasOwn$5(options, 'arity') && value.length !== options.arity) {
711
+ defineProperty$4(value, 'length', { value: options.arity });
712
+ }
713
+ try {
714
+ if (options && hasOwn$5(options, 'constructor') && options.constructor) {
715
+ if (DESCRIPTORS$3) defineProperty$4(value, 'prototype', { writable: false });
716
+ // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
717
+ } else if (value.prototype) value.prototype = undefined;
718
+ } catch (error) { /* empty */ }
719
+ var state = enforceInternalState(value);
720
+ if (!hasOwn$5(state, 'source')) {
721
+ state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
722
+ } return value;
723
+ };
724
+
725
+ // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
726
+ // eslint-disable-next-line no-extend-native -- required
727
+ Function.prototype.toString = makeBuiltIn$1(function toString() {
728
+ return isCallable$7(this) && getInternalState$2(this).source || inspectSource(this);
729
+ }, 'toString');
730
+
731
+ var isCallable$6 = isCallable$f;
732
+ var definePropertyModule$2 = objectDefineProperty;
733
+ var makeBuiltIn = makeBuiltIn$2.exports;
734
+ var defineGlobalProperty$1 = defineGlobalProperty$3;
735
+
736
+ var defineBuiltIn$5 = function (O, key, value, options) {
737
+ if (!options) options = {};
738
+ var simple = options.enumerable;
739
+ var name = options.name !== undefined ? options.name : key;
740
+ if (isCallable$6(value)) makeBuiltIn(value, name, options);
741
+ if (options.global) {
742
+ if (simple) O[key] = value;
743
+ else defineGlobalProperty$1(key, value);
744
+ } else {
745
+ try {
746
+ if (!options.unsafe) delete O[key];
747
+ else if (O[key]) simple = true;
748
+ } catch (error) { /* empty */ }
749
+ if (simple) O[key] = value;
750
+ else definePropertyModule$2.f(O, key, {
751
+ value: value,
752
+ enumerable: false,
753
+ configurable: !options.nonConfigurable,
754
+ writable: !options.nonWritable
755
+ });
756
+ } return O;
757
+ };
758
+
759
+ var objectGetOwnPropertyNames = {};
760
+
761
+ var ceil = Math.ceil;
762
+ var floor = Math.floor;
763
+
764
+ // `Math.trunc` method
765
+ // https://tc39.es/ecma262/#sec-math.trunc
766
+ // eslint-disable-next-line es/no-math-trunc -- safe
767
+ var mathTrunc = Math.trunc || function trunc(x) {
768
+ var n = +x;
769
+ return (n > 0 ? floor : ceil)(n);
770
+ };
771
+
772
+ var trunc = mathTrunc;
773
+
774
+ // `ToIntegerOrInfinity` abstract operation
775
+ // https://tc39.es/ecma262/#sec-tointegerorinfinity
776
+ var toIntegerOrInfinity$3 = function (argument) {
777
+ var number = +argument;
778
+ // eslint-disable-next-line no-self-compare -- NaN check
779
+ return number !== number || number === 0 ? 0 : trunc(number);
780
+ };
781
+
782
+ var toIntegerOrInfinity$2 = toIntegerOrInfinity$3;
783
+
784
+ var max = Math.max;
785
+ var min$1 = Math.min;
786
+
787
+ // Helper for a popular repeating case of the spec:
788
+ // Let integer be ? ToInteger(index).
789
+ // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
790
+ var toAbsoluteIndex$1 = function (index, length) {
791
+ var integer = toIntegerOrInfinity$2(index);
792
+ return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
793
+ };
794
+
795
+ var toIntegerOrInfinity$1 = toIntegerOrInfinity$3;
796
+
797
+ var min = Math.min;
798
+
799
+ // `ToLength` abstract operation
800
+ // https://tc39.es/ecma262/#sec-tolength
801
+ var toLength$2 = function (argument) {
802
+ var len = toIntegerOrInfinity$1(argument);
803
+ return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
804
+ };
805
+
806
+ var toLength$1 = toLength$2;
807
+
808
+ // `LengthOfArrayLike` abstract operation
809
+ // https://tc39.es/ecma262/#sec-lengthofarraylike
810
+ var lengthOfArrayLike$2 = function (obj) {
811
+ return toLength$1(obj.length);
812
+ };
813
+
814
+ var toIndexedObject$3 = toIndexedObject$5;
815
+ var toAbsoluteIndex = toAbsoluteIndex$1;
816
+ var lengthOfArrayLike$1 = lengthOfArrayLike$2;
817
+
818
+ // `Array.prototype.{ indexOf, includes }` methods implementation
819
+ var createMethod$3 = function (IS_INCLUDES) {
820
+ return function ($this, el, fromIndex) {
821
+ var O = toIndexedObject$3($this);
822
+ var length = lengthOfArrayLike$1(O);
823
+ var index = toAbsoluteIndex(fromIndex, length);
824
+ var value;
825
+ // Array#includes uses SameValueZero equality algorithm
826
+ // eslint-disable-next-line no-self-compare -- NaN check
827
+ if (IS_INCLUDES && el !== el) while (length > index) {
828
+ value = O[index++];
829
+ // eslint-disable-next-line no-self-compare -- NaN check
830
+ if (value !== value) return true;
831
+ // Array#indexOf ignores holes, Array#includes - not
832
+ } else for (;length > index; index++) {
833
+ if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
834
+ } return !IS_INCLUDES && -1;
835
+ };
836
+ };
837
+
838
+ var arrayIncludes = {
839
+ // `Array.prototype.includes` method
840
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
841
+ includes: createMethod$3(true),
842
+ // `Array.prototype.indexOf` method
843
+ // https://tc39.es/ecma262/#sec-array.prototype.indexof
844
+ indexOf: createMethod$3(false)
845
+ };
846
+
847
+ var uncurryThis$9 = functionUncurryThis;
848
+ var hasOwn$4 = hasOwnProperty_1;
849
+ var toIndexedObject$2 = toIndexedObject$5;
850
+ var indexOf$1 = arrayIncludes.indexOf;
851
+ var hiddenKeys$2 = hiddenKeys$4;
852
+
853
+ var push = uncurryThis$9([].push);
854
+
855
+ var objectKeysInternal = function (object, names) {
856
+ var O = toIndexedObject$2(object);
857
+ var i = 0;
858
+ var result = [];
859
+ var key;
860
+ for (key in O) !hasOwn$4(hiddenKeys$2, key) && hasOwn$4(O, key) && push(result, key);
861
+ // Don't enum bug & hidden keys
862
+ while (names.length > i) if (hasOwn$4(O, key = names[i++])) {
863
+ ~indexOf$1(result, key) || push(result, key);
864
+ }
865
+ return result;
866
+ };
867
+
868
+ // IE8- don't enum bug keys
869
+ var enumBugKeys$3 = [
870
+ 'constructor',
871
+ 'hasOwnProperty',
872
+ 'isPrototypeOf',
873
+ 'propertyIsEnumerable',
874
+ 'toLocaleString',
875
+ 'toString',
876
+ 'valueOf'
877
+ ];
878
+
879
+ var internalObjectKeys$1 = objectKeysInternal;
880
+ var enumBugKeys$2 = enumBugKeys$3;
881
+
882
+ var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
883
+
884
+ // `Object.getOwnPropertyNames` method
885
+ // https://tc39.es/ecma262/#sec-object.getownpropertynames
886
+ // eslint-disable-next-line es/no-object-getownpropertynames -- safe
887
+ objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
888
+ return internalObjectKeys$1(O, hiddenKeys$1);
889
+ };
890
+
891
+ var objectGetOwnPropertySymbols = {};
892
+
893
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
894
+ objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
895
+
896
+ var getBuiltIn$1 = getBuiltIn$3;
897
+ var uncurryThis$8 = functionUncurryThis;
898
+ var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
899
+ var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
900
+ var anObject$7 = anObject$9;
901
+
902
+ var concat$1 = uncurryThis$8([].concat);
903
+
904
+ // all object keys, includes non-enumerable and symbols
905
+ var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
906
+ var keys = getOwnPropertyNamesModule.f(anObject$7(it));
907
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
908
+ return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
909
+ };
910
+
911
+ var hasOwn$3 = hasOwnProperty_1;
912
+ var ownKeys = ownKeys$1;
913
+ var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
914
+ var definePropertyModule$1 = objectDefineProperty;
915
+
916
+ var copyConstructorProperties$1 = function (target, source, exceptions) {
917
+ var keys = ownKeys(source);
918
+ var defineProperty = definePropertyModule$1.f;
919
+ var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
920
+ for (var i = 0; i < keys.length; i++) {
921
+ var key = keys[i];
922
+ if (!hasOwn$3(target, key) && !(exceptions && hasOwn$3(exceptions, key))) {
923
+ defineProperty(target, key, getOwnPropertyDescriptor(source, key));
924
+ }
925
+ }
926
+ };
927
+
928
+ var fails$d = fails$l;
929
+ var isCallable$5 = isCallable$f;
930
+
931
+ var replacement = /#|\.prototype\./;
932
+
933
+ var isForced$1 = function (feature, detection) {
934
+ var value = data[normalize(feature)];
935
+ return value === POLYFILL ? true
936
+ : value === NATIVE ? false
937
+ : isCallable$5(detection) ? fails$d(detection)
938
+ : !!detection;
939
+ };
940
+
941
+ var normalize = isForced$1.normalize = function (string) {
942
+ return String(string).replace(replacement, '.').toLowerCase();
943
+ };
944
+
945
+ var data = isForced$1.data = {};
946
+ var NATIVE = isForced$1.NATIVE = 'N';
947
+ var POLYFILL = isForced$1.POLYFILL = 'P';
948
+
949
+ var isForced_1 = isForced$1;
950
+
951
+ var global$8 = global$i;
952
+ var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
953
+ var createNonEnumerableProperty$3 = createNonEnumerableProperty$5;
954
+ var defineBuiltIn$4 = defineBuiltIn$5;
955
+ var defineGlobalProperty = defineGlobalProperty$3;
956
+ var copyConstructorProperties = copyConstructorProperties$1;
957
+ var isForced = isForced_1;
958
+
959
+ /*
960
+ options.target - name of the target object
961
+ options.global - target is the global object
962
+ options.stat - export as static methods of target
963
+ options.proto - export as prototype methods of target
964
+ options.real - real prototype method for the `pure` version
965
+ options.forced - export even if the native feature is available
966
+ options.bind - bind methods to the target, required for the `pure` version
967
+ options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
968
+ options.unsafe - use the simple assignment of property instead of delete + defineProperty
969
+ options.sham - add a flag to not completely full polyfills
970
+ options.enumerable - export as enumerable property
971
+ options.dontCallGetSet - prevent calling a getter on target
972
+ options.name - the .name of the function if it does not match the key
973
+ */
974
+ var _export = function (options, source) {
975
+ var TARGET = options.target;
976
+ var GLOBAL = options.global;
977
+ var STATIC = options.stat;
978
+ var FORCED, target, key, targetProperty, sourceProperty, descriptor;
979
+ if (GLOBAL) {
980
+ target = global$8;
981
+ } else if (STATIC) {
982
+ target = global$8[TARGET] || defineGlobalProperty(TARGET, {});
983
+ } else {
984
+ target = global$8[TARGET] && global$8[TARGET].prototype;
985
+ }
986
+ if (target) for (key in source) {
987
+ sourceProperty = source[key];
988
+ if (options.dontCallGetSet) {
989
+ descriptor = getOwnPropertyDescriptor(target, key);
990
+ targetProperty = descriptor && descriptor.value;
991
+ } else targetProperty = target[key];
992
+ FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
993
+ // contained in target
994
+ if (!FORCED && targetProperty !== undefined) {
995
+ if (typeof sourceProperty == typeof targetProperty) continue;
996
+ copyConstructorProperties(sourceProperty, targetProperty);
997
+ }
998
+ // add a flag to not completely full polyfills
999
+ if (options.sham || (targetProperty && targetProperty.sham)) {
1000
+ createNonEnumerableProperty$3(sourceProperty, 'sham', true);
1001
+ }
1002
+ defineBuiltIn$4(target, key, sourceProperty, options);
1003
+ }
1004
+ };
1005
+
1006
+ var internalObjectKeys = objectKeysInternal;
1007
+ var enumBugKeys$1 = enumBugKeys$3;
1008
+
1009
+ // `Object.keys` method
1010
+ // https://tc39.es/ecma262/#sec-object.keys
1011
+ // eslint-disable-next-line es/no-object-keys -- safe
1012
+ var objectKeys$2 = Object.keys || function keys(O) {
1013
+ return internalObjectKeys(O, enumBugKeys$1);
1014
+ };
1015
+
1016
+ var DESCRIPTORS$2 = descriptors;
1017
+ var uncurryThis$7 = functionUncurryThis;
1018
+ var call$6 = functionCall;
1019
+ var fails$c = fails$l;
1020
+ var objectKeys$1 = objectKeys$2;
1021
+ var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1022
+ var propertyIsEnumerableModule = objectPropertyIsEnumerable;
1023
+ var toObject$2 = toObject$4;
1024
+ var IndexedObject$1 = indexedObject;
1025
+
1026
+ // eslint-disable-next-line es/no-object-assign -- safe
1027
+ var $assign = Object.assign;
1028
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1029
+ var defineProperty$3 = Object.defineProperty;
1030
+ var concat = uncurryThis$7([].concat);
1031
+
1032
+ // `Object.assign` method
1033
+ // https://tc39.es/ecma262/#sec-object.assign
1034
+ var objectAssign = !$assign || fails$c(function () {
1035
+ // should have correct order of operations (Edge bug)
1036
+ if (DESCRIPTORS$2 && $assign({ b: 1 }, $assign(defineProperty$3({}, 'a', {
1037
+ enumerable: true,
1038
+ get: function () {
1039
+ defineProperty$3(this, 'b', {
1040
+ value: 3,
1041
+ enumerable: false
1042
+ });
1043
+ }
1044
+ }), { b: 2 })).b !== 1) return true;
1045
+ // should work with symbols and should have deterministic property order (V8 bug)
1046
+ var A = {};
1047
+ var B = {};
1048
+ // eslint-disable-next-line es/no-symbol -- safe
1049
+ var symbol = Symbol('assign detection');
1050
+ var alphabet = 'abcdefghijklmnopqrst';
1051
+ A[symbol] = 7;
1052
+ alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1053
+ return $assign({}, A)[symbol] !== 7 || objectKeys$1($assign({}, B)).join('') !== alphabet;
1054
+ }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
1055
+ var T = toObject$2(target);
1056
+ var argumentsLength = arguments.length;
1057
+ var index = 1;
1058
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1059
+ var propertyIsEnumerable = propertyIsEnumerableModule.f;
1060
+ while (argumentsLength > index) {
1061
+ var S = IndexedObject$1(arguments[index++]);
1062
+ var keys = getOwnPropertySymbols ? concat(objectKeys$1(S), getOwnPropertySymbols(S)) : objectKeys$1(S);
1063
+ var length = keys.length;
1064
+ var j = 0;
1065
+ var key;
1066
+ while (length > j) {
1067
+ key = keys[j++];
1068
+ if (!DESCRIPTORS$2 || call$6(propertyIsEnumerable, S, key)) T[key] = S[key];
1069
+ }
1070
+ } return T;
1071
+ } : $assign;
1072
+
1073
+ var $$8 = _export;
1074
+ var assign = objectAssign;
1075
+
1076
+ // `Object.assign` method
1077
+ // https://tc39.es/ecma262/#sec-object.assign
1078
+ // eslint-disable-next-line es/no-object-assign -- required for testing
1079
+ $$8({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1080
+ assign: assign
1081
+ });
1082
+
13
1083
  /******************************************************************************
14
1084
  Copyright (c) Microsoft Corporation.
15
1085
 
@@ -42,26 +1112,501 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
42
1112
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
43
1113
  };
44
1114
 
45
- /* *
46
- * Licensed under the Apache License, Version 2.0 (the "License");
47
- * you may not use this file except in compliance with the License.
48
- * You may obtain a copy of the License at
49
- *
50
- * http://www.apache.org/licenses/LICENSE-2.0
51
- *
52
- * Unless required by applicable law or agreed to in writing, software
53
- * distributed under the License is distributed on an "AS IS" BASIS,
54
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
55
- * See the License for the specific language governing permissions and
56
- * limitations under the License.
57
- *
58
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
59
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
60
- * */
61
- var defaultProps = {
1115
+ var wellKnownSymbol$9 = wellKnownSymbol$b;
1116
+
1117
+ var TO_STRING_TAG$2 = wellKnownSymbol$9('toStringTag');
1118
+ var test = {};
1119
+
1120
+ test[TO_STRING_TAG$2] = 'z';
1121
+
1122
+ var toStringTagSupport = String(test) === '[object z]';
1123
+
1124
+ var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1125
+ var isCallable$4 = isCallable$f;
1126
+ var classofRaw = classofRaw$1;
1127
+ var wellKnownSymbol$8 = wellKnownSymbol$b;
1128
+
1129
+ var TO_STRING_TAG$1 = wellKnownSymbol$8('toStringTag');
1130
+ var $Object$1 = Object;
1131
+
1132
+ // ES3 wrong here
1133
+ var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) === 'Arguments';
1134
+
1135
+ // fallback for IE11 Script Access Denied error
1136
+ var tryGet = function (it, key) {
1137
+ try {
1138
+ return it[key];
1139
+ } catch (error) { /* empty */ }
1140
+ };
1141
+
1142
+ // getting tag from ES6+ `Object.prototype.toString`
1143
+ var classof$4 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
1144
+ var O, tag, result;
1145
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
1146
+ // @@toStringTag case
1147
+ : typeof (tag = tryGet(O = $Object$1(it), TO_STRING_TAG$1)) == 'string' ? tag
1148
+ // builtinTag case
1149
+ : CORRECT_ARGUMENTS ? classofRaw(O)
1150
+ // ES3 arguments fallback
1151
+ : (result = classofRaw(O)) === 'Object' && isCallable$4(O.callee) ? 'Arguments' : result;
1152
+ };
1153
+
1154
+ var classof$3 = classof$4;
1155
+
1156
+ var $String$1 = String;
1157
+
1158
+ var toString$7 = function (argument) {
1159
+ if (classof$3(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
1160
+ return $String$1(argument);
1161
+ };
1162
+
1163
+ // a string of all valid unicode whitespaces
1164
+ var whitespaces$4 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
1165
+ '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
1166
+
1167
+ var uncurryThis$6 = functionUncurryThis;
1168
+ var requireObjectCoercible$3 = requireObjectCoercible$6;
1169
+ var toString$6 = toString$7;
1170
+ var whitespaces$3 = whitespaces$4;
1171
+
1172
+ var replace$1 = uncurryThis$6(''.replace);
1173
+ var ltrim = RegExp('^[' + whitespaces$3 + ']+');
1174
+ var rtrim = RegExp('(^|[^' + whitespaces$3 + '])[' + whitespaces$3 + ']+$');
1175
+
1176
+ // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
1177
+ var createMethod$2 = function (TYPE) {
1178
+ return function ($this) {
1179
+ var string = toString$6(requireObjectCoercible$3($this));
1180
+ if (TYPE & 1) string = replace$1(string, ltrim, '');
1181
+ if (TYPE & 2) string = replace$1(string, rtrim, '$1');
1182
+ return string;
1183
+ };
1184
+ };
1185
+
1186
+ var stringTrim = {
1187
+ // `String.prototype.{ trimLeft, trimStart }` methods
1188
+ // https://tc39.es/ecma262/#sec-string.prototype.trimstart
1189
+ start: createMethod$2(1),
1190
+ // `String.prototype.{ trimRight, trimEnd }` methods
1191
+ // https://tc39.es/ecma262/#sec-string.prototype.trimend
1192
+ end: createMethod$2(2),
1193
+ // `String.prototype.trim` method
1194
+ // https://tc39.es/ecma262/#sec-string.prototype.trim
1195
+ trim: createMethod$2(3)
1196
+ };
1197
+
1198
+ var global$7 = global$i;
1199
+ var fails$b = fails$l;
1200
+ var uncurryThis$5 = functionUncurryThis;
1201
+ var toString$5 = toString$7;
1202
+ var trim$1 = stringTrim.trim;
1203
+ var whitespaces$2 = whitespaces$4;
1204
+
1205
+ var charAt$3 = uncurryThis$5(''.charAt);
1206
+ var $parseFloat$1 = global$7.parseFloat;
1207
+ var Symbol$2 = global$7.Symbol;
1208
+ var ITERATOR$4 = Symbol$2 && Symbol$2.iterator;
1209
+ var FORCED$2 = 1 / $parseFloat$1(whitespaces$2 + '-0') !== -Infinity
1210
+ // MS Edge 18- broken with boxed symbols
1211
+ || (ITERATOR$4 && !fails$b(function () { $parseFloat$1(Object(ITERATOR$4)); }));
1212
+
1213
+ // `parseFloat` method
1214
+ // https://tc39.es/ecma262/#sec-parsefloat-string
1215
+ var numberParseFloat = FORCED$2 ? function parseFloat(string) {
1216
+ var trimmedString = trim$1(toString$5(string));
1217
+ var result = $parseFloat$1(trimmedString);
1218
+ return result === 0 && charAt$3(trimmedString, 0) === '-' ? -0 : result;
1219
+ } : $parseFloat$1;
1220
+
1221
+ var $$7 = _export;
1222
+ var $parseFloat = numberParseFloat;
1223
+
1224
+ // `parseFloat` method
1225
+ // https://tc39.es/ecma262/#sec-parsefloat-string
1226
+ $$7({ global: true, forced: parseFloat !== $parseFloat }, {
1227
+ parseFloat: $parseFloat
1228
+ });
1229
+
1230
+ var anObject$6 = anObject$9;
1231
+
1232
+ // `RegExp.prototype.flags` getter implementation
1233
+ // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
1234
+ var regexpFlags$1 = function () {
1235
+ var that = anObject$6(this);
1236
+ var result = '';
1237
+ if (that.hasIndices) result += 'd';
1238
+ if (that.global) result += 'g';
1239
+ if (that.ignoreCase) result += 'i';
1240
+ if (that.multiline) result += 'm';
1241
+ if (that.dotAll) result += 's';
1242
+ if (that.unicode) result += 'u';
1243
+ if (that.unicodeSets) result += 'v';
1244
+ if (that.sticky) result += 'y';
1245
+ return result;
1246
+ };
1247
+
1248
+ var fails$a = fails$l;
1249
+ var global$6 = global$i;
1250
+
1251
+ // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
1252
+ var $RegExp$2 = global$6.RegExp;
1253
+
1254
+ var UNSUPPORTED_Y$1 = fails$a(function () {
1255
+ var re = $RegExp$2('a', 'y');
1256
+ re.lastIndex = 2;
1257
+ return re.exec('abcd') !== null;
1258
+ });
1259
+
1260
+ // UC Browser bug
1261
+ // https://github.com/zloirock/core-js/issues/1008
1262
+ var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$a(function () {
1263
+ return !$RegExp$2('a', 'y').sticky;
1264
+ });
1265
+
1266
+ var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$a(function () {
1267
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
1268
+ var re = $RegExp$2('^r', 'gy');
1269
+ re.lastIndex = 2;
1270
+ return re.exec('str') !== null;
1271
+ });
1272
+
1273
+ var regexpStickyHelpers = {
1274
+ BROKEN_CARET: BROKEN_CARET,
1275
+ MISSED_STICKY: MISSED_STICKY,
1276
+ UNSUPPORTED_Y: UNSUPPORTED_Y$1
1277
+ };
1278
+
1279
+ var objectDefineProperties = {};
1280
+
1281
+ var DESCRIPTORS$1 = descriptors;
1282
+ var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
1283
+ var definePropertyModule = objectDefineProperty;
1284
+ var anObject$5 = anObject$9;
1285
+ var toIndexedObject$1 = toIndexedObject$5;
1286
+ var objectKeys = objectKeys$2;
1287
+
1288
+ // `Object.defineProperties` method
1289
+ // https://tc39.es/ecma262/#sec-object.defineproperties
1290
+ // eslint-disable-next-line es/no-object-defineproperties -- safe
1291
+ objectDefineProperties.f = DESCRIPTORS$1 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1292
+ anObject$5(O);
1293
+ var props = toIndexedObject$1(Properties);
1294
+ var keys = objectKeys(Properties);
1295
+ var length = keys.length;
1296
+ var index = 0;
1297
+ var key;
1298
+ while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
1299
+ return O;
1300
+ };
1301
+
1302
+ var getBuiltIn = getBuiltIn$3;
1303
+
1304
+ var html$1 = getBuiltIn('document', 'documentElement');
1305
+
1306
+ /* global ActiveXObject -- old IE, WSH */
1307
+ var anObject$4 = anObject$9;
1308
+ var definePropertiesModule = objectDefineProperties;
1309
+ var enumBugKeys = enumBugKeys$3;
1310
+ var hiddenKeys = hiddenKeys$4;
1311
+ var html = html$1;
1312
+ var documentCreateElement$1 = documentCreateElement$2;
1313
+ var sharedKey$1 = sharedKey$3;
1314
+
1315
+ var GT = '>';
1316
+ var LT = '<';
1317
+ var PROTOTYPE = 'prototype';
1318
+ var SCRIPT = 'script';
1319
+ var IE_PROTO$1 = sharedKey$1('IE_PROTO');
1320
+
1321
+ var EmptyConstructor = function () { /* empty */ };
1322
+
1323
+ var scriptTag = function (content) {
1324
+ return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
1325
+ };
1326
+
1327
+ // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
1328
+ var NullProtoObjectViaActiveX = function (activeXDocument) {
1329
+ activeXDocument.write(scriptTag(''));
1330
+ activeXDocument.close();
1331
+ var temp = activeXDocument.parentWindow.Object;
1332
+ activeXDocument = null; // avoid memory leak
1333
+ return temp;
1334
+ };
1335
+
1336
+ // Create object with fake `null` prototype: use iframe Object with cleared prototype
1337
+ var NullProtoObjectViaIFrame = function () {
1338
+ // Thrash, waste and sodomy: IE GC bug
1339
+ var iframe = documentCreateElement$1('iframe');
1340
+ var JS = 'java' + SCRIPT + ':';
1341
+ var iframeDocument;
1342
+ iframe.style.display = 'none';
1343
+ html.appendChild(iframe);
1344
+ // https://github.com/zloirock/core-js/issues/475
1345
+ iframe.src = String(JS);
1346
+ iframeDocument = iframe.contentWindow.document;
1347
+ iframeDocument.open();
1348
+ iframeDocument.write(scriptTag('document.F=Object'));
1349
+ iframeDocument.close();
1350
+ return iframeDocument.F;
1351
+ };
1352
+
1353
+ // Check for document.domain and active x support
1354
+ // No need to use active x approach when document.domain is not set
1355
+ // see https://github.com/es-shims/es5-shim/issues/150
1356
+ // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
1357
+ // avoid IE GC bug
1358
+ var activeXDocument;
1359
+ var NullProtoObject = function () {
1360
+ try {
1361
+ activeXDocument = new ActiveXObject('htmlfile');
1362
+ } catch (error) { /* ignore */ }
1363
+ NullProtoObject = typeof document != 'undefined'
1364
+ ? document.domain && activeXDocument
1365
+ ? NullProtoObjectViaActiveX(activeXDocument) // old IE
1366
+ : NullProtoObjectViaIFrame()
1367
+ : NullProtoObjectViaActiveX(activeXDocument); // WSH
1368
+ var length = enumBugKeys.length;
1369
+ while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
1370
+ return NullProtoObject();
1371
+ };
1372
+
1373
+ hiddenKeys[IE_PROTO$1] = true;
1374
+
1375
+ // `Object.create` method
1376
+ // https://tc39.es/ecma262/#sec-object.create
1377
+ // eslint-disable-next-line es/no-object-create -- safe
1378
+ var objectCreate = Object.create || function create(O, Properties) {
1379
+ var result;
1380
+ if (O !== null) {
1381
+ EmptyConstructor[PROTOTYPE] = anObject$4(O);
1382
+ result = new EmptyConstructor();
1383
+ EmptyConstructor[PROTOTYPE] = null;
1384
+ // add "__proto__" for Object.getPrototypeOf polyfill
1385
+ result[IE_PROTO$1] = O;
1386
+ } else result = NullProtoObject();
1387
+ return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
1388
+ };
1389
+
1390
+ var fails$9 = fails$l;
1391
+ var global$5 = global$i;
1392
+
1393
+ // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
1394
+ var $RegExp$1 = global$5.RegExp;
1395
+
1396
+ var regexpUnsupportedDotAll = fails$9(function () {
1397
+ var re = $RegExp$1('.', 's');
1398
+ return !(re.dotAll && re.test('\n') && re.flags === 's');
1399
+ });
1400
+
1401
+ var fails$8 = fails$l;
1402
+ var global$4 = global$i;
1403
+
1404
+ // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
1405
+ var $RegExp = global$4.RegExp;
1406
+
1407
+ var regexpUnsupportedNcg = fails$8(function () {
1408
+ var re = $RegExp('(?<a>b)', 'g');
1409
+ return re.exec('b').groups.a !== 'b' ||
1410
+ 'b'.replace(re, '$<a>c') !== 'bc';
1411
+ });
1412
+
1413
+ /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
1414
+ /* eslint-disable regexp/no-useless-quantifier -- testing */
1415
+ var call$5 = functionCall;
1416
+ var uncurryThis$4 = functionUncurryThis;
1417
+ var toString$4 = toString$7;
1418
+ var regexpFlags = regexpFlags$1;
1419
+ var stickyHelpers = regexpStickyHelpers;
1420
+ var shared = shared$4.exports;
1421
+ var create$2 = objectCreate;
1422
+ var getInternalState$1 = internalState.get;
1423
+ var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
1424
+ var UNSUPPORTED_NCG = regexpUnsupportedNcg;
1425
+
1426
+ var nativeReplace = shared('native-string-replace', String.prototype.replace);
1427
+ var nativeExec = RegExp.prototype.exec;
1428
+ var patchedExec = nativeExec;
1429
+ var charAt$2 = uncurryThis$4(''.charAt);
1430
+ var indexOf = uncurryThis$4(''.indexOf);
1431
+ var replace = uncurryThis$4(''.replace);
1432
+ var stringSlice$1 = uncurryThis$4(''.slice);
1433
+
1434
+ var UPDATES_LAST_INDEX_WRONG = (function () {
1435
+ var re1 = /a/;
1436
+ var re2 = /b*/g;
1437
+ call$5(nativeExec, re1, 'a');
1438
+ call$5(nativeExec, re2, 'a');
1439
+ return re1.lastIndex !== 0 || re2.lastIndex !== 0;
1440
+ })();
1441
+
1442
+ var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;
1443
+
1444
+ // nonparticipating capturing group, copied from es5-shim's String#split patch.
1445
+ var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
1446
+
1447
+ var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
1448
+
1449
+ if (PATCH) {
1450
+ patchedExec = function exec(string) {
1451
+ var re = this;
1452
+ var state = getInternalState$1(re);
1453
+ var str = toString$4(string);
1454
+ var raw = state.raw;
1455
+ var result, reCopy, lastIndex, match, i, object, group;
1456
+
1457
+ if (raw) {
1458
+ raw.lastIndex = re.lastIndex;
1459
+ result = call$5(patchedExec, raw, str);
1460
+ re.lastIndex = raw.lastIndex;
1461
+ return result;
1462
+ }
1463
+
1464
+ var groups = state.groups;
1465
+ var sticky = UNSUPPORTED_Y && re.sticky;
1466
+ var flags = call$5(regexpFlags, re);
1467
+ var source = re.source;
1468
+ var charsAdded = 0;
1469
+ var strCopy = str;
1470
+
1471
+ if (sticky) {
1472
+ flags = replace(flags, 'y', '');
1473
+ if (indexOf(flags, 'g') === -1) {
1474
+ flags += 'g';
1475
+ }
1476
+
1477
+ strCopy = stringSlice$1(str, re.lastIndex);
1478
+ // Support anchored sticky behavior.
1479
+ if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$2(str, re.lastIndex - 1) !== '\n')) {
1480
+ source = '(?: ' + source + ')';
1481
+ strCopy = ' ' + strCopy;
1482
+ charsAdded++;
1483
+ }
1484
+ // ^(? + rx + ) is needed, in combination with some str slicing, to
1485
+ // simulate the 'y' flag.
1486
+ reCopy = new RegExp('^(?:' + source + ')', flags);
1487
+ }
1488
+
1489
+ if (NPCG_INCLUDED) {
1490
+ reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
1491
+ }
1492
+ if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
1493
+
1494
+ match = call$5(nativeExec, sticky ? reCopy : re, strCopy);
1495
+
1496
+ if (sticky) {
1497
+ if (match) {
1498
+ match.input = stringSlice$1(match.input, charsAdded);
1499
+ match[0] = stringSlice$1(match[0], charsAdded);
1500
+ match.index = re.lastIndex;
1501
+ re.lastIndex += match[0].length;
1502
+ } else re.lastIndex = 0;
1503
+ } else if (UPDATES_LAST_INDEX_WRONG && match) {
1504
+ re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
1505
+ }
1506
+ if (NPCG_INCLUDED && match && match.length > 1) {
1507
+ // Fix browsers whose `exec` methods don't consistently return `undefined`
1508
+ // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
1509
+ call$5(nativeReplace, match[0], reCopy, function () {
1510
+ for (i = 1; i < arguments.length - 2; i++) {
1511
+ if (arguments[i] === undefined) match[i] = undefined;
1512
+ }
1513
+ });
1514
+ }
1515
+
1516
+ if (match && groups) {
1517
+ match.groups = object = create$2(null);
1518
+ for (i = 0; i < groups.length; i++) {
1519
+ group = groups[i];
1520
+ object[group[0]] = match[group[1]];
1521
+ }
1522
+ }
1523
+
1524
+ return match;
1525
+ };
1526
+ }
1527
+
1528
+ var regexpExec$2 = patchedExec;
1529
+
1530
+ var $$6 = _export;
1531
+ var exec$1 = regexpExec$2;
1532
+
1533
+ // `RegExp.prototype.exec` method
1534
+ // https://tc39.es/ecma262/#sec-regexp.prototype.exec
1535
+ $$6({ target: 'RegExp', proto: true, forced: /./.exec !== exec$1 }, {
1536
+ exec: exec$1
1537
+ });
1538
+
1539
+ var call$4 = functionCall;
1540
+ var hasOwn$2 = hasOwnProperty_1;
1541
+ var isPrototypeOf = objectIsPrototypeOf;
1542
+ var regExpFlags = regexpFlags$1;
1543
+
1544
+ var RegExpPrototype$2 = RegExp.prototype;
1545
+
1546
+ var regexpGetFlags = function (R) {
1547
+ var flags = R.flags;
1548
+ return flags === undefined && !('flags' in RegExpPrototype$2) && !hasOwn$2(R, 'flags') && isPrototypeOf(RegExpPrototype$2, R)
1549
+ ? call$4(regExpFlags, R) : flags;
1550
+ };
1551
+
1552
+ var PROPER_FUNCTION_NAME$2 = functionName.PROPER;
1553
+ var defineBuiltIn$3 = defineBuiltIn$5;
1554
+ var anObject$3 = anObject$9;
1555
+ var $toString = toString$7;
1556
+ var fails$7 = fails$l;
1557
+ var getRegExpFlags = regexpGetFlags;
1558
+
1559
+ var TO_STRING = 'toString';
1560
+ var RegExpPrototype$1 = RegExp.prototype;
1561
+ var nativeToString = RegExpPrototype$1[TO_STRING];
1562
+
1563
+ var NOT_GENERIC = fails$7(function () { return nativeToString.call({ source: 'a', flags: 'b' }) !== '/a/b'; });
1564
+ // FF44- RegExp#toString has a wrong name
1565
+ var INCORRECT_NAME = PROPER_FUNCTION_NAME$2 && nativeToString.name !== TO_STRING;
1566
+
1567
+ // `RegExp.prototype.toString` method
1568
+ // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
1569
+ if (NOT_GENERIC || INCORRECT_NAME) {
1570
+ defineBuiltIn$3(RegExpPrototype$1, TO_STRING, function toString() {
1571
+ var R = anObject$3(this);
1572
+ var pattern = $toString(R.source);
1573
+ var flags = $toString(getRegExpFlags(R));
1574
+ return '/' + pattern + '/' + flags;
1575
+ }, { unsafe: true });
1576
+ }
1577
+
1578
+ var PROPER_FUNCTION_NAME$1 = functionName.PROPER;
1579
+ var fails$6 = fails$l;
1580
+ var whitespaces$1 = whitespaces$4;
1581
+
1582
+ var non = '\u200B\u0085\u180E';
1583
+
1584
+ // check that a method works with the correct list
1585
+ // of whitespaces and has a correct name
1586
+ var stringTrimForced = function (METHOD_NAME) {
1587
+ return fails$6(function () {
1588
+ return !!whitespaces$1[METHOD_NAME]()
1589
+ || non[METHOD_NAME]() !== non
1590
+ || (PROPER_FUNCTION_NAME$1 && whitespaces$1[METHOD_NAME].name !== METHOD_NAME);
1591
+ });
1592
+ };
1593
+
1594
+ var $$5 = _export;
1595
+ var $trim = stringTrim.trim;
1596
+ var forcedStringTrimMethod = stringTrimForced;
1597
+
1598
+ // `String.prototype.trim` method
1599
+ // https://tc39.es/ecma262/#sec-string.prototype.trim
1600
+ $$5({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
1601
+ trim: function trim() {
1602
+ return $trim(this);
1603
+ }
1604
+ });
1605
+
1606
+ const defaultProps = {
62
1607
  shouldUnregister: false
63
1608
  };
64
- var errorMessages = {
1609
+ const errorMessages = {
65
1610
  required: 'This field is required',
66
1611
  isValidDate: 'Not a valid date',
67
1612
  isAfter: 'Date should not be before',
@@ -77,71 +1622,63 @@ var errorMessages = {
77
1622
  isInteger: 'Invalid entry, enter a non-decimal number',
78
1623
  isNumeric: 'Invalid entry, enter a numeric value'
79
1624
  };
80
- var regexMaxTwoDecimals = /^\s*-?\d+(\.\d{1,2})?\s*$/;
1625
+ const regexMaxTwoDecimals = /^\s*-?\d+(\.\d{1,2})?\s*$/;
81
1626
  // validations
82
- var isEmpty = function isEmpty(value) {
1627
+ const isEmpty = value => {
83
1628
  if (typeof value === 'string' && !value.trim().length || value === null || value === undefined) {
84
1629
  return true;
85
1630
  }
86
1631
  return false;
87
1632
  };
88
- var isValidDate = function isValidDate(value) {
89
- return value ? moment(value).isValid() : true;
90
- };
91
- var isBefore = function isBefore(ownDate, referenceDate) {
92
- return ownDate ? moment.utc(ownDate) < moment.utc(referenceDate) : true;
93
- };
94
- var isAfter = function isAfter(ownDate, otherDate) {
95
- return ownDate ? moment.utc(ownDate).isAfter(moment.utc(otherDate)) : true;
96
- };
97
- var isBetween = function isBetween(ownDate, otherDateStart, otherDateEnd) {
1633
+ const isValidDate = value => value ? moment(value).isValid() : true;
1634
+ const isBefore = (ownDate, referenceDate) => ownDate ? moment.utc(ownDate) < moment.utc(referenceDate) : true;
1635
+ const isAfter = (ownDate, otherDate) => ownDate ? moment.utc(ownDate).isAfter(moment.utc(otherDate)) : true;
1636
+ const isBetween = (ownDate, otherDateStart, otherDateEnd) => {
98
1637
  return moment.utc(ownDate) >= moment.utc(otherDateStart) && moment.utc(ownDate) <= moment.utc(otherDateEnd);
99
1638
  };
100
- var isXHoursBefore = function isXHoursBefore(ownDate, otherDate) {
101
- var hours = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 4;
1639
+ const isXHoursBefore = (ownDate, otherDate, hours = 4) => {
102
1640
  if (isEmpty(ownDate) || isEmpty(otherDate)) {
103
1641
  return true;
104
1642
  }
105
- var duration = moment.duration(moment.utc(ownDate).diff(otherDate));
106
- var inHours = duration.asHours();
1643
+ const duration = moment.duration(moment.utc(ownDate).diff(otherDate));
1644
+ const inHours = duration.asHours();
107
1645
  return inHours >= -hours;
108
1646
  };
109
- var isXHoursAfter = function isXHoursAfter(ownDate, otherDate) {
110
- var hours = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 4;
1647
+ const isXHoursAfter = (ownDate, otherDate, hours = 4) => {
111
1648
  if (isEmpty(ownDate) || isEmpty(otherDate)) {
112
1649
  return true;
113
1650
  }
114
- var duration = moment.duration(moment.utc(ownDate).diff(otherDate));
115
- var inHours = duration.asHours();
1651
+ const duration = moment.duration(moment.utc(ownDate).diff(otherDate));
1652
+ const inHours = duration.asHours();
116
1653
  return inHours <= hours;
117
1654
  };
118
- var isLatitude = function isLatitude(lat) {
1655
+ const isLatitude = lat => {
119
1656
  if (!lat) {
120
1657
  return true;
121
1658
  }
122
1659
  return isFinite(lat) && Math.abs(lat) <= 90 && regexMaxTwoDecimals.test(lat.toString());
123
1660
  };
124
- var isLongitude = function isLongitude(lng) {
1661
+ const isLongitude = lng => {
125
1662
  if (!lng) {
126
1663
  return true;
127
1664
  }
128
1665
  return isFinite(lng) && Math.abs(lng) <= 180 && lng >= -180 && regexMaxTwoDecimals.test(lng.toString());
129
1666
  };
130
1667
  // Pass null if no maxValue
131
- var isValidMax = function isValidMax(value, maxValue) {
1668
+ const isValidMax = (value, maxValue) => {
132
1669
  if (isEmpty(value) || maxValue === null) {
133
1670
  return true;
134
1671
  }
135
1672
  return !(value > maxValue);
136
1673
  };
137
1674
  // Pass null if no minValue
138
- var isValidMin = function isValidMin(value, minValue) {
1675
+ const isValidMin = (value, minValue) => {
139
1676
  if (isEmpty(value) || minValue === null) {
140
1677
  return true;
141
1678
  }
142
1679
  return !(value < minValue);
143
1680
  };
144
- var hasValidGeometry = function hasValidGeometry(geojson) {
1681
+ const hasValidGeometry = geojson => {
145
1682
  if (!geojson || !geojson.features || !geojson.features.length || !geojson.features[0].geometry ||
146
1683
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
147
1684
  // @ts-ignore
@@ -150,16 +1687,17 @@ var hasValidGeometry = function hasValidGeometry(geojson) {
150
1687
  }
151
1688
  return true;
152
1689
  };
153
- var isValidGeoJsonCoordinates = function isValidGeoJsonCoordinates(geojson) {
154
- var hasGeometry = hasValidGeometry(geojson);
1690
+ const isValidGeoJsonCoordinates = geojson => {
1691
+ const hasGeometry = hasValidGeometry(geojson);
155
1692
  if (!hasGeometry) {
156
1693
  return false;
157
1694
  }
158
1695
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
159
1696
  // @ts-ignore
160
- var _geojson$features$0$g = geojson.features[0].geometry,
161
- coordinates = _geojson$features$0$g.coordinates,
162
- type = _geojson$features$0$g.type;
1697
+ const {
1698
+ coordinates,
1699
+ type
1700
+ } = geojson.features[0].geometry;
163
1701
  // For type POINT coordinates is an array of 2
164
1702
  if (coordinates.length === 2 && type === 'Point') {
165
1703
  return true;
@@ -170,23 +1708,24 @@ var isValidGeoJsonCoordinates = function isValidGeoJsonCoordinates(geojson) {
170
1708
  }
171
1709
  return false;
172
1710
  };
173
- var isMaximumOneDrawing = function isMaximumOneDrawing(geojson) {
174
- var hasGeometry = hasValidGeometry(geojson);
1711
+ const isMaximumOneDrawing = geojson => {
1712
+ const hasGeometry = hasValidGeometry(geojson);
175
1713
  if (!hasGeometry) {
176
1714
  return true; // no need to check further when there is no drawing yet
177
1715
  }
178
1716
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
179
1717
  // @ts-ignore
180
- var _geojson$features$0$g2 = geojson.features[0].geometry,
181
- coordinates = _geojson$features$0$g2.coordinates,
182
- type = _geojson$features$0$g2.type;
1718
+ const {
1719
+ coordinates,
1720
+ type
1721
+ } = geojson.features[0].geometry;
183
1722
  // For type POLYGON only one array of coordinates is allowed
184
1723
  if (type === 'Polygon' && coordinates.length > 1) {
185
1724
  return false;
186
1725
  }
187
1726
  return true;
188
1727
  };
189
- var hasIntersectionWithFIR = function hasIntersectionWithFIR(geojson, intersection) {
1728
+ const hasIntersectionWithFIR = (geojson, intersection) => {
190
1729
  if (!hasValidGeometry(geojson) ||
191
1730
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
192
1731
  // @ts-ignore
@@ -195,9 +1734,10 @@ var hasIntersectionWithFIR = function hasIntersectionWithFIR(geojson, intersecti
195
1734
  }
196
1735
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
197
1736
  // @ts-ignore
198
- var _intersection$feature = intersection.features[0].geometry,
199
- coordinates = _intersection$feature.coordinates,
200
- type = _intersection$feature.type;
1737
+ const {
1738
+ coordinates,
1739
+ type
1740
+ } = intersection.features[0].geometry;
201
1741
  if (type === 'Point' && coordinates.length === 0) {
202
1742
  return false;
203
1743
  }
@@ -206,38 +1746,39 @@ var hasIntersectionWithFIR = function hasIntersectionWithFIR(geojson, intersecti
206
1746
  }
207
1747
  return true;
208
1748
  };
209
- var hasMaxFeaturePoints = function hasMaxFeaturePoints(geojson) {
210
- var maxPoints = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 7;
211
- var hasGeometry = hasValidGeometry(geojson);
1749
+ const hasMaxFeaturePoints = (geojson, maxPoints = 7) => {
1750
+ const hasGeometry = hasValidGeometry(geojson);
212
1751
  if (!hasGeometry) {
213
1752
  return false;
214
1753
  }
215
1754
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
216
1755
  // @ts-ignore
217
- var _geojson$features$0$g3 = geojson.features[0].geometry,
218
- coordinates = _geojson$features$0$g3.coordinates,
219
- type = _geojson$features$0$g3.type;
1756
+ const {
1757
+ coordinates,
1758
+ type
1759
+ } = geojson.features[0].geometry;
220
1760
  if (type === 'Polygon' && coordinates[0].length > maxPoints) {
221
1761
  return true;
222
1762
  }
223
1763
  return false;
224
1764
  };
225
- var hasMulitpleIntersections = function hasMulitpleIntersections(geojson) {
226
- var hasGeometry = hasValidGeometry(geojson);
1765
+ const hasMulitpleIntersections = geojson => {
1766
+ const hasGeometry = hasValidGeometry(geojson);
227
1767
  if (!hasGeometry) {
228
1768
  return false;
229
1769
  }
230
1770
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
231
1771
  // @ts-ignore
232
- var _geojson$features$0$g4 = geojson.features[0].geometry,
233
- coordinates = _geojson$features$0$g4.coordinates,
234
- type = _geojson$features$0$g4.type;
1772
+ const {
1773
+ coordinates,
1774
+ type
1775
+ } = geojson.features[0].geometry;
235
1776
  if (type === 'MultiPolygon' || coordinates.length > 1 && type !== 'Point') {
236
1777
  return true;
237
1778
  }
238
1779
  return false;
239
1780
  };
240
- var isGeometryDirty = function isGeometryDirty(geoJSON, formGeoJSON) {
1781
+ const isGeometryDirty = (geoJSON, formGeoJSON) => {
241
1782
  if (geoJSON === (undefined) || formGeoJSON === (undefined) || !hasValidGeometry(geoJSON) || !hasValidGeometry(formGeoJSON)) {
242
1783
  return false;
243
1784
  }
@@ -249,13 +1790,13 @@ var isGeometryDirty = function isGeometryDirty(geoJSON, formGeoJSON) {
249
1790
  // @ts-ignore
250
1791
  formGeoJSON.features[0].geometry.coordinates);
251
1792
  };
252
- var isInteger = function isInteger(value) {
1793
+ const isInteger = value => {
253
1794
  if (isEmpty(value)) {
254
1795
  return true;
255
1796
  }
256
1797
  return Number.isInteger(value);
257
1798
  };
258
- var isNonOrBothCoordinates = function isNonOrBothCoordinates(coordinate, otherCoordinate) {
1799
+ const isNonOrBothCoordinates = (coordinate, otherCoordinate) => {
259
1800
  if (typeof coordinate === 'number' && typeof otherCoordinate === 'number' || coordinate === null && otherCoordinate === null || coordinate === undefined && otherCoordinate === undefined) {
260
1801
  return true;
261
1802
  }
@@ -265,7 +1806,7 @@ var isNonOrBothCoordinates = function isNonOrBothCoordinates(coordinate, otherCo
265
1806
  return false;
266
1807
  };
267
1808
 
268
- var radioCheckboxStyle = {
1809
+ const radioCheckboxStyle = {
269
1810
  // hides unchecked values
270
1811
  display: 'none',
271
1812
  '&+.MuiFormControlLabel-label': {
@@ -285,7 +1826,7 @@ var radioCheckboxStyle = {
285
1826
  color: 'geowebColors.typographyAndIcons.iconLinkActive'
286
1827
  }
287
1828
  };
288
- var getErrorMessage = function getErrorMessage(errors) {
1829
+ const getErrorMessage = errors => {
289
1830
  if (errors && errors.message && typeof errors.message === 'string') {
290
1831
  return errors.message;
291
1832
  }
@@ -294,21 +1835,20 @@ var getErrorMessage = function getErrorMessage(errors) {
294
1835
  }
295
1836
  return '';
296
1837
  };
297
- var ReactHookFormFormControl = function ReactHookFormFormControl(_a) {
298
- var children = _a.children,
299
- errors = _a.errors,
300
- isReadOnly = _a.isReadOnly,
301
- _a$sx = _a.sx,
302
- sx = _a$sx === void 0 ? {} : _a$sx,
303
- _a$className = _a.className,
304
- className = _a$className === void 0 ? '' : _a$className,
305
- _a$size = _a.size,
306
- size = _a$size === void 0 ? 'medium' : _a$size,
1838
+ const ReactHookFormFormControl = _a => {
1839
+ var {
1840
+ children,
1841
+ errors,
1842
+ isReadOnly,
1843
+ sx = {},
1844
+ className = '',
1845
+ size = 'medium'
1846
+ } = _a,
307
1847
  props = __rest(_a, ["children", "errors", "isReadOnly", "sx", "className", "size"]);
308
1848
  return /*#__PURE__*/React.createElement(FormControl, Object.assign({
309
1849
  fullWidth: true,
310
1850
  error: !!errors,
311
- className: "".concat(isReadOnly ? 'is-read-only' : '', " ").concat(className),
1851
+ className: `${isReadOnly ? 'is-read-only' : ''} ${className}`,
312
1852
  size: size,
313
1853
  sx: Object.assign(Object.assign({}, isReadOnly && {
314
1854
  // Radio input
@@ -336,47 +1876,127 @@ var ReactHookFormFormControl = function ReactHookFormFormControl(_a) {
336
1876
  }, getErrorMessage(errors))));
337
1877
  };
338
1878
 
1879
+ var aCallable$1 = aCallable$3;
1880
+ var toObject$1 = toObject$4;
1881
+ var IndexedObject = indexedObject;
1882
+ var lengthOfArrayLike = lengthOfArrayLike$2;
1883
+
1884
+ var $TypeError$3 = TypeError;
1885
+
1886
+ // `Array.prototype.{ reduce, reduceRight }` methods implementation
1887
+ var createMethod$1 = function (IS_RIGHT) {
1888
+ return function (that, callbackfn, argumentsLength, memo) {
1889
+ var O = toObject$1(that);
1890
+ var self = IndexedObject(O);
1891
+ var length = lengthOfArrayLike(O);
1892
+ aCallable$1(callbackfn);
1893
+ var index = IS_RIGHT ? length - 1 : 0;
1894
+ var i = IS_RIGHT ? -1 : 1;
1895
+ if (argumentsLength < 2) while (true) {
1896
+ if (index in self) {
1897
+ memo = self[index];
1898
+ index += i;
1899
+ break;
1900
+ }
1901
+ index += i;
1902
+ if (IS_RIGHT ? index < 0 : length <= index) {
1903
+ throw new $TypeError$3('Reduce of empty array with no initial value');
1904
+ }
1905
+ }
1906
+ for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
1907
+ memo = callbackfn(memo, self[index], index, O);
1908
+ }
1909
+ return memo;
1910
+ };
1911
+ };
1912
+
1913
+ var arrayReduce = {
1914
+ // `Array.prototype.reduce` method
1915
+ // https://tc39.es/ecma262/#sec-array.prototype.reduce
1916
+ left: createMethod$1(false),
1917
+ // `Array.prototype.reduceRight` method
1918
+ // https://tc39.es/ecma262/#sec-array.prototype.reduceright
1919
+ right: createMethod$1(true)
1920
+ };
1921
+
1922
+ var fails$5 = fails$l;
1923
+
1924
+ var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) {
1925
+ var method = [][METHOD_NAME];
1926
+ return !!method && fails$5(function () {
1927
+ // eslint-disable-next-line no-useless-call -- required for testing
1928
+ method.call(null, argument || function () { return 1; }, 1);
1929
+ });
1930
+ };
1931
+
1932
+ var global$3 = global$i;
1933
+ var classof$2 = classofRaw$1;
1934
+
1935
+ var engineIsNode = classof$2(global$3.process) === 'process';
1936
+
1937
+ var $$4 = _export;
1938
+ var $reduce = arrayReduce.left;
1939
+ var arrayMethodIsStrict = arrayMethodIsStrict$1;
1940
+ var CHROME_VERSION = engineV8Version;
1941
+ var IS_NODE = engineIsNode;
1942
+
1943
+ // Chrome 80-82 has a critical bug
1944
+ // https://bugs.chromium.org/p/chromium/issues/detail?id=1049982
1945
+ var CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;
1946
+ var FORCED$1 = CHROME_BUG || !arrayMethodIsStrict('reduce');
1947
+
1948
+ // `Array.prototype.reduce` method
1949
+ // https://tc39.es/ecma262/#sec-array.prototype.reduce
1950
+ $$4({ target: 'Array', proto: true, forced: FORCED$1 }, {
1951
+ reduce: function reduce(callbackfn /* , initialValue */) {
1952
+ var length = arguments.length;
1953
+ return $reduce(this, callbackfn, length, length > 1 ? arguments[1] : undefined);
1954
+ }
1955
+ });
1956
+
339
1957
  function getDeepProperty(p, o) {
340
- return p.reduce(function (xs, x) {
341
- return xs && xs[x] ? xs[x] : null;
342
- }, o);
1958
+ return p.reduce((xs, x) => xs && xs[x] ? xs[x] : null, o);
343
1959
  }
344
- var getErrors = function getErrors(name, errors) {
345
- var nameAsArray = name.split('.');
1960
+ const getErrors = (name, errors) => {
1961
+ const nameAsArray = name.split('.');
346
1962
  return getDeepProperty(nameAsArray, errors);
347
1963
  };
348
1964
 
349
- var ReactHookFormSelect = function ReactHookFormSelect(_a) {
350
- var name = _a.name,
351
- label = _a.label,
352
- _a$defaultValue = _a.defaultValue,
353
- defaultValue = _a$defaultValue === void 0 ? '' : _a$defaultValue,
354
- children = _a.children,
355
- rules = _a.rules,
356
- _a$onChange = _a.onChange,
357
- _onChange = _a$onChange === void 0 ? function () {} : _a$onChange,
358
- disabled = _a.disabled,
359
- className = _a.className,
360
- sx = _a.sx,
361
- isReadOnly = _a.isReadOnly,
362
- _a$size = _a.size,
363
- size = _a$size === void 0 ? 'medium' : _a$size,
1965
+ const ReactHookFormSelect = _a => {
1966
+ var {
1967
+ name,
1968
+ label,
1969
+ defaultValue = '',
1970
+ children,
1971
+ rules,
1972
+ onChange = () => {},
1973
+ disabled,
1974
+ className,
1975
+ sx,
1976
+ isReadOnly,
1977
+ size = 'medium'
1978
+ } = _a,
364
1979
  otherProps = __rest(_a, ["name", "label", "defaultValue", "children", "rules", "onChange", "disabled", "className", "sx", "isReadOnly", "size"]);
365
- var labelId = "".concat(name, "-label");
366
- var _useFormContext = useFormContext(),
367
- control = _useFormContext.control;
368
- var _useController = useController(Object.assign({
369
- name: name,
370
- control: control,
371
- rules: rules,
372
- defaultValue: defaultValue
373
- }, defaultProps)),
374
- _useController$field = _useController.field,
375
- onChangeField = _useController$field.onChange,
376
- value = _useController$field.value,
377
- ref = _useController$field.ref,
378
- formErrors = _useController.formState.errors;
379
- var errors = getErrors(name, formErrors);
1980
+ const labelId = `${name}-label`;
1981
+ const {
1982
+ control
1983
+ } = useFormContext();
1984
+ const {
1985
+ field: {
1986
+ onChange: onChangeField,
1987
+ value,
1988
+ ref
1989
+ },
1990
+ formState: {
1991
+ errors: formErrors
1992
+ }
1993
+ } = useController(Object.assign({
1994
+ name,
1995
+ control,
1996
+ rules,
1997
+ defaultValue
1998
+ }, defaultProps));
1999
+ const errors = getErrors(name, formErrors);
380
2000
  return /*#__PURE__*/React.createElement(ReactHookFormFormControl, {
381
2001
  className: className,
382
2002
  sx: sx,
@@ -392,50 +2012,54 @@ var ReactHookFormSelect = function ReactHookFormSelect(_a) {
392
2012
  label: label,
393
2013
  inputRef: ref,
394
2014
  name: name,
395
- onChange: function onChange(changeEvent) {
2015
+ onChange: changeEvent => {
396
2016
  onChangeField(changeEvent.target.value);
397
2017
  // default props
398
- _onChange(changeEvent);
2018
+ onChange(changeEvent);
399
2019
  },
400
2020
  value: value || '',
401
2021
  variant: "filled"
402
2022
  }, otherProps), children));
403
2023
  };
404
2024
 
405
- var ReactHookFormRadioGroup = function ReactHookFormRadioGroup(_a) {
406
- var name = _a.name,
407
- label = _a.label,
408
- _a$defaultValue = _a.defaultValue,
409
- defaultValue = _a$defaultValue === void 0 ? '' : _a$defaultValue,
410
- children = _a.children,
411
- rules = _a.rules,
412
- _a$disabled = _a.disabled,
413
- disabled = _a$disabled === void 0 ? false : _a$disabled,
414
- _a$onChange = _a.onChange,
415
- _onChange = _a$onChange === void 0 ? function () {} : _a$onChange,
416
- isReadOnly = _a.isReadOnly,
2025
+ const ReactHookFormRadioGroup = _a => {
2026
+ var {
2027
+ name,
2028
+ label,
2029
+ defaultValue = '',
2030
+ children,
2031
+ rules,
2032
+ disabled = false,
2033
+ onChange = () => {},
2034
+ isReadOnly
2035
+ } = _a,
417
2036
  otherProps = __rest(_a, ["name", "label", "defaultValue", "children", "rules", "disabled", "onChange", "isReadOnly"]);
418
- var labelId = "".concat(name, "-label");
419
- var _useFormContext = useFormContext(),
420
- control = _useFormContext.control;
421
- var _useController = useController(Object.assign({
422
- name: name,
423
- control: control,
424
- rules: rules,
425
- defaultValue: defaultValue
426
- }, defaultProps)),
427
- _useController$field = _useController.field,
428
- onChangeField = _useController$field.onChange,
429
- value = _useController$field.value,
430
- ref = _useController$field.ref,
431
- formErrors = _useController.formState.errors;
432
- var errors = getErrors(name, formErrors);
433
- React.useEffect(function () {
2037
+ const labelId = `${name}-label`;
2038
+ const {
2039
+ control
2040
+ } = useFormContext();
2041
+ const {
2042
+ field: {
2043
+ onChange: onChangeField,
2044
+ value,
2045
+ ref
2046
+ },
2047
+ formState: {
2048
+ errors: formErrors
2049
+ }
2050
+ } = useController(Object.assign({
2051
+ name,
2052
+ control,
2053
+ rules,
2054
+ defaultValue
2055
+ }, defaultProps));
2056
+ const errors = getErrors(name, formErrors);
2057
+ React.useEffect(() => {
434
2058
  if (errors) {
435
- var firstError = Object.keys(formErrors)[0];
2059
+ const firstError = Object.keys(formErrors)[0];
436
2060
  if (firstError === name) {
437
2061
  // if first error in form is same, focus on that input
438
- var inputNode = document.querySelector("[name=\"".concat(name, "\"]"));
2062
+ const inputNode = document.querySelector(`[name="${name}"]`);
439
2063
  if (inputNode !== null) {
440
2064
  inputNode.focus();
441
2065
  }
@@ -450,51 +2074,53 @@ var ReactHookFormRadioGroup = function ReactHookFormRadioGroup(_a) {
450
2074
  id: labelId
451
2075
  }, label), /*#__PURE__*/React.createElement(RadioGroup, Object.assign({
452
2076
  value: value,
453
- onChange: function onChange(changeEvent) {
2077
+ onChange: changeEvent => {
454
2078
  onChangeField(changeEvent.target.value);
455
- _onChange(changeEvent, changeEvent.target.value);
2079
+ onChange(changeEvent, changeEvent.target.value);
456
2080
  },
457
2081
  ref: ref,
458
2082
  name: name
459
2083
  }, otherProps), children));
460
2084
  };
461
2085
 
462
- var convertTextInputValue = function convertTextInputValue(value, inCapitals) {
2086
+ const convertTextInputValue = (value, inCapitals) => {
463
2087
  return inCapitals ? value.toUpperCase() : value;
464
2088
  };
465
- var ReactHookFormTextField = function ReactHookFormTextField(_a) {
466
- var name = _a.name,
467
- label = _a.label,
468
- _a$defaultValue = _a.defaultValue,
469
- defaultValue = _a$defaultValue === void 0 ? '' : _a$defaultValue,
470
- rules = _a.rules,
471
- _a$disabled = _a.disabled,
472
- disabled = _a$disabled === void 0 ? false : _a$disabled,
473
- _a$upperCase = _a.upperCase,
474
- upperCase = _a$upperCase === void 0 ? false : _a$upperCase,
475
- _a$helperText = _a.helperText,
476
- helperText = _a$helperText === void 0 ? '' : _a$helperText,
477
- className = _a.className,
478
- sx = _a.sx,
479
- _a$onChange = _a.onChange,
480
- _onChange = _a$onChange === void 0 ? function () {} : _a$onChange,
481
- isReadOnly = _a.isReadOnly,
482
- InputProps = _a.InputProps,
2089
+ const ReactHookFormTextField = _a => {
2090
+ var {
2091
+ name,
2092
+ label,
2093
+ defaultValue = '',
2094
+ rules,
2095
+ disabled = false,
2096
+ upperCase = false,
2097
+ helperText = '',
2098
+ className,
2099
+ sx,
2100
+ onChange = () => {},
2101
+ isReadOnly,
2102
+ InputProps
2103
+ } = _a,
483
2104
  otherProps = __rest(_a, ["name", "label", "defaultValue", "rules", "disabled", "upperCase", "helperText", "className", "sx", "onChange", "isReadOnly", "InputProps"]);
484
- var _useFormContext = useFormContext(),
485
- control = _useFormContext.control;
486
- var _useController = useController(Object.assign({
487
- name: name,
488
- control: control,
489
- rules: rules,
490
- defaultValue: defaultValue
491
- }, defaultProps)),
492
- _useController$field = _useController.field,
493
- onChangeField = _useController$field.onChange,
494
- value = _useController$field.value,
495
- ref = _useController$field.ref,
496
- formErrors = _useController.formState.errors;
497
- var errors = getErrors(name, formErrors);
2105
+ const {
2106
+ control
2107
+ } = useFormContext();
2108
+ const {
2109
+ field: {
2110
+ onChange: onChangeField,
2111
+ value,
2112
+ ref
2113
+ },
2114
+ formState: {
2115
+ errors: formErrors
2116
+ }
2117
+ } = useController(Object.assign({
2118
+ name,
2119
+ control,
2120
+ rules,
2121
+ defaultValue
2122
+ }, defaultProps));
2123
+ const errors = getErrors(name, formErrors);
498
2124
  return /*#__PURE__*/React.createElement(ReactHookFormFormControl, {
499
2125
  className: className,
500
2126
  sx: sx,
@@ -509,11 +2135,13 @@ var ReactHookFormTextField = function ReactHookFormTextField(_a) {
509
2135
  variant: "filled",
510
2136
  type: "text",
511
2137
  name: name,
512
- onChange: function onChange(evt) {
513
- var value = evt.target.value;
514
- var convertedValue = convertTextInputValue(value, upperCase);
2138
+ onChange: evt => {
2139
+ const {
2140
+ value
2141
+ } = evt.target;
2142
+ const convertedValue = convertTextInputValue(value, upperCase);
515
2143
  onChangeField(convertedValue);
516
- _onChange(null);
2144
+ onChange(null);
517
2145
  },
518
2146
  disabled: disabled,
519
2147
  inputRef: ref,
@@ -523,120 +2151,792 @@ var ReactHookFormTextField = function ReactHookFormTextField(_a) {
523
2151
  }, otherProps)));
524
2152
  };
525
2153
 
526
- function _iterableToArrayLimit(r, l) {
527
- var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
528
- if (null != t) {
529
- var e,
530
- n,
531
- i,
532
- u,
533
- a = [],
534
- f = !0,
535
- o = !1;
2154
+ var wellKnownSymbol$7 = wellKnownSymbol$b;
2155
+ var create$1 = objectCreate;
2156
+ var defineProperty$2 = objectDefineProperty.f;
2157
+
2158
+ var UNSCOPABLES = wellKnownSymbol$7('unscopables');
2159
+ var ArrayPrototype = Array.prototype;
2160
+
2161
+ // Array.prototype[@@unscopables]
2162
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
2163
+ if (ArrayPrototype[UNSCOPABLES] === undefined) {
2164
+ defineProperty$2(ArrayPrototype, UNSCOPABLES, {
2165
+ configurable: true,
2166
+ value: create$1(null)
2167
+ });
2168
+ }
2169
+
2170
+ // add a key to Array.prototype[@@unscopables]
2171
+ var addToUnscopables$2 = function (key) {
2172
+ ArrayPrototype[UNSCOPABLES][key] = true;
2173
+ };
2174
+
2175
+ var $$3 = _export;
2176
+ var $includes = arrayIncludes.includes;
2177
+ var fails$4 = fails$l;
2178
+ var addToUnscopables$1 = addToUnscopables$2;
2179
+
2180
+ // FF99+ bug
2181
+ var BROKEN_ON_SPARSE = fails$4(function () {
2182
+ // eslint-disable-next-line es/no-array-prototype-includes -- detection
2183
+ return !Array(1).includes();
2184
+ });
2185
+
2186
+ // `Array.prototype.includes` method
2187
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
2188
+ $$3({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
2189
+ includes: function includes(el /* , fromIndex = 0 */) {
2190
+ return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
2191
+ }
2192
+ });
2193
+
2194
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
2195
+ addToUnscopables$1('includes');
2196
+
2197
+ var iterators = {};
2198
+
2199
+ var fails$3 = fails$l;
2200
+
2201
+ var correctPrototypeGetter = !fails$3(function () {
2202
+ function F() { /* empty */ }
2203
+ F.prototype.constructor = null;
2204
+ // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
2205
+ return Object.getPrototypeOf(new F()) !== F.prototype;
2206
+ });
2207
+
2208
+ var hasOwn$1 = hasOwnProperty_1;
2209
+ var isCallable$3 = isCallable$f;
2210
+ var toObject = toObject$4;
2211
+ var sharedKey = sharedKey$3;
2212
+ var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
2213
+
2214
+ var IE_PROTO = sharedKey('IE_PROTO');
2215
+ var $Object = Object;
2216
+ var ObjectPrototype = $Object.prototype;
2217
+
2218
+ // `Object.getPrototypeOf` method
2219
+ // https://tc39.es/ecma262/#sec-object.getprototypeof
2220
+ // eslint-disable-next-line es/no-object-getprototypeof -- safe
2221
+ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
2222
+ var object = toObject(O);
2223
+ if (hasOwn$1(object, IE_PROTO)) return object[IE_PROTO];
2224
+ var constructor = object.constructor;
2225
+ if (isCallable$3(constructor) && object instanceof constructor) {
2226
+ return constructor.prototype;
2227
+ } return object instanceof $Object ? ObjectPrototype : null;
2228
+ };
2229
+
2230
+ var fails$2 = fails$l;
2231
+ var isCallable$2 = isCallable$f;
2232
+ var isObject$2 = isObject$8;
2233
+ var getPrototypeOf$1 = objectGetPrototypeOf;
2234
+ var defineBuiltIn$2 = defineBuiltIn$5;
2235
+ var wellKnownSymbol$6 = wellKnownSymbol$b;
2236
+
2237
+ var ITERATOR$3 = wellKnownSymbol$6('iterator');
2238
+ var BUGGY_SAFARI_ITERATORS$1 = false;
2239
+
2240
+ // `%IteratorPrototype%` object
2241
+ // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
2242
+ var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator;
2243
+
2244
+ /* eslint-disable es/no-array-prototype-keys -- safe */
2245
+ if ([].keys) {
2246
+ arrayIterator = [].keys();
2247
+ // Safari 8 has buggy iterators w/o `next`
2248
+ if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true;
2249
+ else {
2250
+ PrototypeOfArrayIteratorPrototype = getPrototypeOf$1(getPrototypeOf$1(arrayIterator));
2251
+ if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$2 = PrototypeOfArrayIteratorPrototype;
2252
+ }
2253
+ }
2254
+
2255
+ var NEW_ITERATOR_PROTOTYPE = !isObject$2(IteratorPrototype$2) || fails$2(function () {
2256
+ var test = {};
2257
+ // FF44- legacy iterators case
2258
+ return IteratorPrototype$2[ITERATOR$3].call(test) !== test;
2259
+ });
2260
+
2261
+ if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
2262
+
2263
+ // `%IteratorPrototype%[@@iterator]()` method
2264
+ // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
2265
+ if (!isCallable$2(IteratorPrototype$2[ITERATOR$3])) {
2266
+ defineBuiltIn$2(IteratorPrototype$2, ITERATOR$3, function () {
2267
+ return this;
2268
+ });
2269
+ }
2270
+
2271
+ var iteratorsCore = {
2272
+ IteratorPrototype: IteratorPrototype$2,
2273
+ BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
2274
+ };
2275
+
2276
+ var defineProperty$1 = objectDefineProperty.f;
2277
+ var hasOwn = hasOwnProperty_1;
2278
+ var wellKnownSymbol$5 = wellKnownSymbol$b;
2279
+
2280
+ var TO_STRING_TAG = wellKnownSymbol$5('toStringTag');
2281
+
2282
+ var setToStringTag$3 = function (target, TAG, STATIC) {
2283
+ if (target && !STATIC) target = target.prototype;
2284
+ if (target && !hasOwn(target, TO_STRING_TAG)) {
2285
+ defineProperty$1(target, TO_STRING_TAG, { configurable: true, value: TAG });
2286
+ }
2287
+ };
2288
+
2289
+ var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
2290
+ var create = objectCreate;
2291
+ var createPropertyDescriptor = createPropertyDescriptor$3;
2292
+ var setToStringTag$2 = setToStringTag$3;
2293
+ var Iterators$2 = iterators;
2294
+
2295
+ var returnThis$1 = function () { return this; };
2296
+
2297
+ var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
2298
+ var TO_STRING_TAG = NAME + ' Iterator';
2299
+ IteratorConstructor.prototype = create(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
2300
+ setToStringTag$2(IteratorConstructor, TO_STRING_TAG, false);
2301
+ Iterators$2[TO_STRING_TAG] = returnThis$1;
2302
+ return IteratorConstructor;
2303
+ };
2304
+
2305
+ var uncurryThis$3 = functionUncurryThis;
2306
+ var aCallable = aCallable$3;
2307
+
2308
+ var functionUncurryThisAccessor = function (object, key, method) {
2309
+ try {
2310
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
2311
+ return uncurryThis$3(aCallable(Object.getOwnPropertyDescriptor(object, key)[method]));
2312
+ } catch (error) { /* empty */ }
2313
+ };
2314
+
2315
+ var isObject$1 = isObject$8;
2316
+
2317
+ var isPossiblePrototype$1 = function (argument) {
2318
+ return isObject$1(argument) || argument === null;
2319
+ };
2320
+
2321
+ var isPossiblePrototype = isPossiblePrototype$1;
2322
+
2323
+ var $String = String;
2324
+ var $TypeError$2 = TypeError;
2325
+
2326
+ var aPossiblePrototype$1 = function (argument) {
2327
+ if (isPossiblePrototype(argument)) return argument;
2328
+ throw new $TypeError$2("Can't set " + $String(argument) + ' as a prototype');
2329
+ };
2330
+
2331
+ /* eslint-disable no-proto -- safe */
2332
+ var uncurryThisAccessor = functionUncurryThisAccessor;
2333
+ var anObject$2 = anObject$9;
2334
+ var aPossiblePrototype = aPossiblePrototype$1;
2335
+
2336
+ // `Object.setPrototypeOf` method
2337
+ // https://tc39.es/ecma262/#sec-object.setprototypeof
2338
+ // Works with __proto__ only. Old v8 can't work with null proto objects.
2339
+ // eslint-disable-next-line es/no-object-setprototypeof -- safe
2340
+ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
2341
+ var CORRECT_SETTER = false;
2342
+ var test = {};
2343
+ var setter;
2344
+ try {
2345
+ setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set');
2346
+ setter(test, []);
2347
+ CORRECT_SETTER = test instanceof Array;
2348
+ } catch (error) { /* empty */ }
2349
+ return function setPrototypeOf(O, proto) {
2350
+ anObject$2(O);
2351
+ aPossiblePrototype(proto);
2352
+ if (CORRECT_SETTER) setter(O, proto);
2353
+ else O.__proto__ = proto;
2354
+ return O;
2355
+ };
2356
+ }() : undefined);
2357
+
2358
+ var $$2 = _export;
2359
+ var call$3 = functionCall;
2360
+ var FunctionName = functionName;
2361
+ var isCallable$1 = isCallable$f;
2362
+ var createIteratorConstructor = iteratorCreateConstructor;
2363
+ var getPrototypeOf = objectGetPrototypeOf;
2364
+ var setPrototypeOf = objectSetPrototypeOf;
2365
+ var setToStringTag$1 = setToStringTag$3;
2366
+ var createNonEnumerableProperty$2 = createNonEnumerableProperty$5;
2367
+ var defineBuiltIn$1 = defineBuiltIn$5;
2368
+ var wellKnownSymbol$4 = wellKnownSymbol$b;
2369
+ var Iterators$1 = iterators;
2370
+ var IteratorsCore = iteratorsCore;
2371
+
2372
+ var PROPER_FUNCTION_NAME = FunctionName.PROPER;
2373
+ var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
2374
+ var IteratorPrototype = IteratorsCore.IteratorPrototype;
2375
+ var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
2376
+ var ITERATOR$2 = wellKnownSymbol$4('iterator');
2377
+ var KEYS = 'keys';
2378
+ var VALUES = 'values';
2379
+ var ENTRIES = 'entries';
2380
+
2381
+ var returnThis = function () { return this; };
2382
+
2383
+ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
2384
+ createIteratorConstructor(IteratorConstructor, NAME, next);
2385
+
2386
+ var getIterationMethod = function (KIND) {
2387
+ if (KIND === DEFAULT && defaultIterator) return defaultIterator;
2388
+ if (!BUGGY_SAFARI_ITERATORS && KIND && KIND in IterablePrototype) return IterablePrototype[KIND];
2389
+
2390
+ switch (KIND) {
2391
+ case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
2392
+ case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
2393
+ case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
2394
+ }
2395
+
2396
+ return function () { return new IteratorConstructor(this); };
2397
+ };
2398
+
2399
+ var TO_STRING_TAG = NAME + ' Iterator';
2400
+ var INCORRECT_VALUES_NAME = false;
2401
+ var IterablePrototype = Iterable.prototype;
2402
+ var nativeIterator = IterablePrototype[ITERATOR$2]
2403
+ || IterablePrototype['@@iterator']
2404
+ || DEFAULT && IterablePrototype[DEFAULT];
2405
+ var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
2406
+ var anyNativeIterator = NAME === 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
2407
+ var CurrentIteratorPrototype, methods, KEY;
2408
+
2409
+ // fix native
2410
+ if (anyNativeIterator) {
2411
+ CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
2412
+ if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
2413
+ if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
2414
+ if (setPrototypeOf) {
2415
+ setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
2416
+ } else if (!isCallable$1(CurrentIteratorPrototype[ITERATOR$2])) {
2417
+ defineBuiltIn$1(CurrentIteratorPrototype, ITERATOR$2, returnThis);
2418
+ }
2419
+ }
2420
+ // Set @@toStringTag to native iterators
2421
+ setToStringTag$1(CurrentIteratorPrototype, TO_STRING_TAG, true);
2422
+ }
2423
+ }
2424
+
2425
+ // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
2426
+ if (PROPER_FUNCTION_NAME && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) {
2427
+ if (CONFIGURABLE_FUNCTION_NAME) {
2428
+ createNonEnumerableProperty$2(IterablePrototype, 'name', VALUES);
2429
+ } else {
2430
+ INCORRECT_VALUES_NAME = true;
2431
+ defaultIterator = function values() { return call$3(nativeIterator, this); };
2432
+ }
2433
+ }
2434
+
2435
+ // export additional methods
2436
+ if (DEFAULT) {
2437
+ methods = {
2438
+ values: getIterationMethod(VALUES),
2439
+ keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
2440
+ entries: getIterationMethod(ENTRIES)
2441
+ };
2442
+ if (FORCED) for (KEY in methods) {
2443
+ if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
2444
+ defineBuiltIn$1(IterablePrototype, KEY, methods[KEY]);
2445
+ }
2446
+ } else $$2({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
2447
+ }
2448
+
2449
+ // define iterator
2450
+ if (IterablePrototype[ITERATOR$2] !== defaultIterator) {
2451
+ defineBuiltIn$1(IterablePrototype, ITERATOR$2, defaultIterator, { name: DEFAULT });
2452
+ }
2453
+ Iterators$1[NAME] = defaultIterator;
2454
+
2455
+ return methods;
2456
+ };
2457
+
2458
+ // `CreateIterResultObject` abstract operation
2459
+ // https://tc39.es/ecma262/#sec-createiterresultobject
2460
+ var createIterResultObject$1 = function (value, done) {
2461
+ return { value: value, done: done };
2462
+ };
2463
+
2464
+ var toIndexedObject = toIndexedObject$5;
2465
+ var addToUnscopables = addToUnscopables$2;
2466
+ var Iterators = iterators;
2467
+ var InternalStateModule = internalState;
2468
+ var defineProperty = objectDefineProperty.f;
2469
+ var defineIterator = iteratorDefine;
2470
+ var createIterResultObject = createIterResultObject$1;
2471
+ var DESCRIPTORS = descriptors;
2472
+
2473
+ var ARRAY_ITERATOR = 'Array Iterator';
2474
+ var setInternalState = InternalStateModule.set;
2475
+ var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
2476
+
2477
+ // `Array.prototype.entries` method
2478
+ // https://tc39.es/ecma262/#sec-array.prototype.entries
2479
+ // `Array.prototype.keys` method
2480
+ // https://tc39.es/ecma262/#sec-array.prototype.keys
2481
+ // `Array.prototype.values` method
2482
+ // https://tc39.es/ecma262/#sec-array.prototype.values
2483
+ // `Array.prototype[@@iterator]` method
2484
+ // https://tc39.es/ecma262/#sec-array.prototype-@@iterator
2485
+ // `CreateArrayIterator` internal method
2486
+ // https://tc39.es/ecma262/#sec-createarrayiterator
2487
+ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
2488
+ setInternalState(this, {
2489
+ type: ARRAY_ITERATOR,
2490
+ target: toIndexedObject(iterated), // target
2491
+ index: 0, // next index
2492
+ kind: kind // kind
2493
+ });
2494
+ // `%ArrayIteratorPrototype%.next` method
2495
+ // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
2496
+ }, function () {
2497
+ var state = getInternalState(this);
2498
+ var target = state.target;
2499
+ var index = state.index++;
2500
+ if (!target || index >= target.length) {
2501
+ state.target = undefined;
2502
+ return createIterResultObject(undefined, true);
2503
+ }
2504
+ switch (state.kind) {
2505
+ case 'keys': return createIterResultObject(index, false);
2506
+ case 'values': return createIterResultObject(target[index], false);
2507
+ } return createIterResultObject([index, target[index]], false);
2508
+ }, 'values');
2509
+
2510
+ // argumentsList[@@iterator] is %ArrayProto_values%
2511
+ // https://tc39.es/ecma262/#sec-createunmappedargumentsobject
2512
+ // https://tc39.es/ecma262/#sec-createmappedargumentsobject
2513
+ var values = Iterators.Arguments = Iterators.Array;
2514
+
2515
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
2516
+ addToUnscopables('keys');
2517
+ addToUnscopables('values');
2518
+ addToUnscopables('entries');
2519
+
2520
+ // V8 ~ Chrome 45- bug
2521
+ if (DESCRIPTORS && values.name !== 'values') try {
2522
+ defineProperty(values, 'name', { value: 'values' });
2523
+ } catch (error) { /* empty */ }
2524
+
2525
+ var global$2 = global$i;
2526
+ var fails$1 = fails$l;
2527
+ var uncurryThis$2 = functionUncurryThis;
2528
+ var toString$3 = toString$7;
2529
+ var trim = stringTrim.trim;
2530
+ var whitespaces = whitespaces$4;
2531
+
2532
+ var $parseInt$1 = global$2.parseInt;
2533
+ var Symbol$1 = global$2.Symbol;
2534
+ var ITERATOR$1 = Symbol$1 && Symbol$1.iterator;
2535
+ var hex = /^[+-]?0x/i;
2536
+ var exec = uncurryThis$2(hex.exec);
2537
+ var FORCED = $parseInt$1(whitespaces + '08') !== 8 || $parseInt$1(whitespaces + '0x16') !== 22
2538
+ // MS Edge 18- broken with boxed symbols
2539
+ || (ITERATOR$1 && !fails$1(function () { $parseInt$1(Object(ITERATOR$1)); }));
2540
+
2541
+ // `parseInt` method
2542
+ // https://tc39.es/ecma262/#sec-parseint-string-radix
2543
+ var numberParseInt = FORCED ? function parseInt(string, radix) {
2544
+ var S = trim(toString$3(string));
2545
+ return $parseInt$1(S, (radix >>> 0) || (exec(hex, S) ? 16 : 10));
2546
+ } : $parseInt$1;
2547
+
2548
+ var $$1 = _export;
2549
+ var $parseInt = numberParseInt;
2550
+
2551
+ // `parseInt` method
2552
+ // https://tc39.es/ecma262/#sec-parseint-string-radix
2553
+ $$1({ global: true, forced: parseInt !== $parseInt }, {
2554
+ parseInt: $parseInt
2555
+ });
2556
+
2557
+ var isObject = isObject$8;
2558
+ var classof$1 = classofRaw$1;
2559
+ var wellKnownSymbol$3 = wellKnownSymbol$b;
2560
+
2561
+ var MATCH$1 = wellKnownSymbol$3('match');
2562
+
2563
+ // `IsRegExp` abstract operation
2564
+ // https://tc39.es/ecma262/#sec-isregexp
2565
+ var isRegexp = function (it) {
2566
+ var isRegExp;
2567
+ return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$1(it) === 'RegExp');
2568
+ };
2569
+
2570
+ var isRegExp = isRegexp;
2571
+
2572
+ var $TypeError$1 = TypeError;
2573
+
2574
+ var notARegexp = function (it) {
2575
+ if (isRegExp(it)) {
2576
+ throw new $TypeError$1("The method doesn't accept regular expressions");
2577
+ } return it;
2578
+ };
2579
+
2580
+ var wellKnownSymbol$2 = wellKnownSymbol$b;
2581
+
2582
+ var MATCH = wellKnownSymbol$2('match');
2583
+
2584
+ var correctIsRegexpLogic = function (METHOD_NAME) {
2585
+ var regexp = /./;
2586
+ try {
2587
+ '/./'[METHOD_NAME](regexp);
2588
+ } catch (error1) {
536
2589
  try {
537
- if (i = (t = t.call(r)).next, 0 === l) {
538
- if (Object(t) !== t) return;
539
- f = !1;
540
- } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
541
- } catch (r) {
542
- o = !0, n = r;
543
- } finally {
544
- try {
545
- if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
546
- } finally {
547
- if (o) throw n;
2590
+ regexp[MATCH] = false;
2591
+ return '/./'[METHOD_NAME](regexp);
2592
+ } catch (error2) { /* empty */ }
2593
+ } return false;
2594
+ };
2595
+
2596
+ var $ = _export;
2597
+ var uncurryThis$1 = functionUncurryThis;
2598
+ var notARegExp = notARegexp;
2599
+ var requireObjectCoercible$2 = requireObjectCoercible$6;
2600
+ var toString$2 = toString$7;
2601
+ var correctIsRegExpLogic = correctIsRegexpLogic;
2602
+
2603
+ var stringIndexOf = uncurryThis$1(''.indexOf);
2604
+
2605
+ // `String.prototype.includes` method
2606
+ // https://tc39.es/ecma262/#sec-string.prototype.includes
2607
+ $({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
2608
+ includes: function includes(searchString /* , position = 0 */) {
2609
+ return !!~stringIndexOf(
2610
+ toString$2(requireObjectCoercible$2(this)),
2611
+ toString$2(notARegExp(searchString)),
2612
+ arguments.length > 1 ? arguments[1] : undefined
2613
+ );
2614
+ }
2615
+ });
2616
+
2617
+ // TODO: Remove from `core-js@4` since it's moved to entry points
2618
+
2619
+ var call$2 = functionCall;
2620
+ var defineBuiltIn = defineBuiltIn$5;
2621
+ var regexpExec$1 = regexpExec$2;
2622
+ var fails = fails$l;
2623
+ var wellKnownSymbol$1 = wellKnownSymbol$b;
2624
+ var createNonEnumerableProperty$1 = createNonEnumerableProperty$5;
2625
+
2626
+ var SPECIES = wellKnownSymbol$1('species');
2627
+ var RegExpPrototype = RegExp.prototype;
2628
+
2629
+ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
2630
+ var SYMBOL = wellKnownSymbol$1(KEY);
2631
+
2632
+ var DELEGATES_TO_SYMBOL = !fails(function () {
2633
+ // String methods call symbol-named RegExp methods
2634
+ var O = {};
2635
+ O[SYMBOL] = function () { return 7; };
2636
+ return ''[KEY](O) !== 7;
2637
+ });
2638
+
2639
+ var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
2640
+ // Symbol-named RegExp methods call .exec
2641
+ var execCalled = false;
2642
+ var re = /a/;
2643
+
2644
+ if (KEY === 'split') {
2645
+ // We can't use real regex here since it causes deoptimization
2646
+ // and serious performance degradation in V8
2647
+ // https://github.com/zloirock/core-js/issues/306
2648
+ re = {};
2649
+ // RegExp[@@split] doesn't call the regex's exec method, but first creates
2650
+ // a new one. We need to return the patched regex when creating the new one.
2651
+ re.constructor = {};
2652
+ re.constructor[SPECIES] = function () { return re; };
2653
+ re.flags = '';
2654
+ re[SYMBOL] = /./[SYMBOL];
2655
+ }
2656
+
2657
+ re.exec = function () {
2658
+ execCalled = true;
2659
+ return null;
2660
+ };
2661
+
2662
+ re[SYMBOL]('');
2663
+ return !execCalled;
2664
+ });
2665
+
2666
+ if (
2667
+ !DELEGATES_TO_SYMBOL ||
2668
+ !DELEGATES_TO_EXEC ||
2669
+ FORCED
2670
+ ) {
2671
+ var nativeRegExpMethod = /./[SYMBOL];
2672
+ var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
2673
+ var $exec = regexp.exec;
2674
+ if ($exec === regexpExec$1 || $exec === RegExpPrototype.exec) {
2675
+ if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
2676
+ // The native String method already delegates to @@method (this
2677
+ // polyfilled function), leasing to infinite recursion.
2678
+ // We avoid it by directly calling the native @@method method.
2679
+ return { done: true, value: call$2(nativeRegExpMethod, regexp, str, arg2) };
2680
+ }
2681
+ return { done: true, value: call$2(nativeMethod, str, regexp, arg2) };
2682
+ }
2683
+ return { done: false };
2684
+ });
2685
+
2686
+ defineBuiltIn(String.prototype, KEY, methods[0]);
2687
+ defineBuiltIn(RegExpPrototype, SYMBOL, methods[1]);
2688
+ }
2689
+
2690
+ if (SHAM) createNonEnumerableProperty$1(RegExpPrototype[SYMBOL], 'sham', true);
2691
+ };
2692
+
2693
+ var uncurryThis = functionUncurryThis;
2694
+ var toIntegerOrInfinity = toIntegerOrInfinity$3;
2695
+ var toString$1 = toString$7;
2696
+ var requireObjectCoercible$1 = requireObjectCoercible$6;
2697
+
2698
+ var charAt$1 = uncurryThis(''.charAt);
2699
+ var charCodeAt = uncurryThis(''.charCodeAt);
2700
+ var stringSlice = uncurryThis(''.slice);
2701
+
2702
+ var createMethod = function (CONVERT_TO_STRING) {
2703
+ return function ($this, pos) {
2704
+ var S = toString$1(requireObjectCoercible$1($this));
2705
+ var position = toIntegerOrInfinity(pos);
2706
+ var size = S.length;
2707
+ var first, second;
2708
+ if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
2709
+ first = charCodeAt(S, position);
2710
+ return first < 0xD800 || first > 0xDBFF || position + 1 === size
2711
+ || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
2712
+ ? CONVERT_TO_STRING
2713
+ ? charAt$1(S, position)
2714
+ : first
2715
+ : CONVERT_TO_STRING
2716
+ ? stringSlice(S, position, position + 2)
2717
+ : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
2718
+ };
2719
+ };
2720
+
2721
+ var stringMultibyte = {
2722
+ // `String.prototype.codePointAt` method
2723
+ // https://tc39.es/ecma262/#sec-string.prototype.codepointat
2724
+ codeAt: createMethod(false),
2725
+ // `String.prototype.at` method
2726
+ // https://github.com/mathiasbynens/String.prototype.at
2727
+ charAt: createMethod(true)
2728
+ };
2729
+
2730
+ var charAt = stringMultibyte.charAt;
2731
+
2732
+ // `AdvanceStringIndex` abstract operation
2733
+ // https://tc39.es/ecma262/#sec-advancestringindex
2734
+ var advanceStringIndex$1 = function (S, index, unicode) {
2735
+ return index + (unicode ? charAt(S, index).length : 1);
2736
+ };
2737
+
2738
+ var call$1 = functionCall;
2739
+ var anObject$1 = anObject$9;
2740
+ var isCallable = isCallable$f;
2741
+ var classof = classofRaw$1;
2742
+ var regexpExec = regexpExec$2;
2743
+
2744
+ var $TypeError = TypeError;
2745
+
2746
+ // `RegExpExec` abstract operation
2747
+ // https://tc39.es/ecma262/#sec-regexpexec
2748
+ var regexpExecAbstract = function (R, S) {
2749
+ var exec = R.exec;
2750
+ if (isCallable(exec)) {
2751
+ var result = call$1(exec, R, S);
2752
+ if (result !== null) anObject$1(result);
2753
+ return result;
2754
+ }
2755
+ if (classof(R) === 'RegExp') return call$1(regexpExec, R, S);
2756
+ throw new $TypeError('RegExp#exec called on incompatible receiver');
2757
+ };
2758
+
2759
+ var call = functionCall;
2760
+ var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
2761
+ var anObject = anObject$9;
2762
+ var isNullOrUndefined = isNullOrUndefined$3;
2763
+ var toLength = toLength$2;
2764
+ var toString = toString$7;
2765
+ var requireObjectCoercible = requireObjectCoercible$6;
2766
+ var getMethod = getMethod$2;
2767
+ var advanceStringIndex = advanceStringIndex$1;
2768
+ var regExpExec = regexpExecAbstract;
2769
+
2770
+ // @@match logic
2771
+ fixRegExpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNative) {
2772
+ return [
2773
+ // `String.prototype.match` method
2774
+ // https://tc39.es/ecma262/#sec-string.prototype.match
2775
+ function match(regexp) {
2776
+ var O = requireObjectCoercible(this);
2777
+ var matcher = isNullOrUndefined(regexp) ? undefined : getMethod(regexp, MATCH);
2778
+ return matcher ? call(matcher, regexp, O) : new RegExp(regexp)[MATCH](toString(O));
2779
+ },
2780
+ // `RegExp.prototype[@@match]` method
2781
+ // https://tc39.es/ecma262/#sec-regexp.prototype-@@match
2782
+ function (string) {
2783
+ var rx = anObject(this);
2784
+ var S = toString(string);
2785
+ var res = maybeCallNative(nativeMatch, rx, S);
2786
+
2787
+ if (res.done) return res.value;
2788
+
2789
+ if (!rx.global) return regExpExec(rx, S);
2790
+
2791
+ var fullUnicode = rx.unicode;
2792
+ rx.lastIndex = 0;
2793
+ var A = [];
2794
+ var n = 0;
2795
+ var result;
2796
+ while ((result = regExpExec(rx, S)) !== null) {
2797
+ var matchStr = toString(result[0]);
2798
+ A[n] = matchStr;
2799
+ if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
2800
+ n++;
2801
+ }
2802
+ return n === 0 ? null : A;
2803
+ }
2804
+ ];
2805
+ });
2806
+
2807
+ // iterable DOM collections
2808
+ // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
2809
+ var domIterables = {
2810
+ CSSRuleList: 0,
2811
+ CSSStyleDeclaration: 0,
2812
+ CSSValueList: 0,
2813
+ ClientRectList: 0,
2814
+ DOMRectList: 0,
2815
+ DOMStringList: 0,
2816
+ DOMTokenList: 1,
2817
+ DataTransferItemList: 0,
2818
+ FileList: 0,
2819
+ HTMLAllCollection: 0,
2820
+ HTMLCollection: 0,
2821
+ HTMLFormElement: 0,
2822
+ HTMLSelectElement: 0,
2823
+ MediaList: 0,
2824
+ MimeTypeArray: 0,
2825
+ NamedNodeMap: 0,
2826
+ NodeList: 1,
2827
+ PaintRequestList: 0,
2828
+ Plugin: 0,
2829
+ PluginArray: 0,
2830
+ SVGLengthList: 0,
2831
+ SVGNumberList: 0,
2832
+ SVGPathSegList: 0,
2833
+ SVGPointList: 0,
2834
+ SVGStringList: 0,
2835
+ SVGTransformList: 0,
2836
+ SourceBufferList: 0,
2837
+ StyleSheetList: 0,
2838
+ TextTrackCueList: 0,
2839
+ TextTrackList: 0,
2840
+ TouchList: 0
2841
+ };
2842
+
2843
+ // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
2844
+ var documentCreateElement = documentCreateElement$2;
2845
+
2846
+ var classList = documentCreateElement('span').classList;
2847
+ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
2848
+
2849
+ var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
2850
+
2851
+ var global$1 = global$i;
2852
+ var DOMIterables = domIterables;
2853
+ var DOMTokenListPrototype = domTokenListPrototype;
2854
+ var ArrayIteratorMethods = es_array_iterator;
2855
+ var createNonEnumerableProperty = createNonEnumerableProperty$5;
2856
+ var setToStringTag = setToStringTag$3;
2857
+ var wellKnownSymbol = wellKnownSymbol$b;
2858
+
2859
+ var ITERATOR = wellKnownSymbol('iterator');
2860
+ var ArrayValues = ArrayIteratorMethods.values;
2861
+
2862
+ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
2863
+ if (CollectionPrototype) {
2864
+ // some Chrome versions have non-configurable methods on DOMTokenList
2865
+ if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
2866
+ createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
2867
+ } catch (error) {
2868
+ CollectionPrototype[ITERATOR] = ArrayValues;
2869
+ }
2870
+ setToStringTag(CollectionPrototype, COLLECTION_NAME, true);
2871
+ if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
2872
+ // some Chrome versions have non-configurable methods on DOMTokenList
2873
+ if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
2874
+ createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
2875
+ } catch (error) {
2876
+ CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
548
2877
  }
549
2878
  }
550
- return a;
551
2879
  }
2880
+ };
2881
+
2882
+ for (var COLLECTION_NAME in DOMIterables) {
2883
+ handlePrototype(global$1[COLLECTION_NAME] && global$1[COLLECTION_NAME].prototype, COLLECTION_NAME);
552
2884
  }
553
- function _slicedToArray(arr, i) {
554
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
555
- }
556
- function _toConsumableArray(arr) {
557
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
558
- }
559
- function _arrayWithoutHoles(arr) {
560
- if (Array.isArray(arr)) return _arrayLikeToArray(arr);
561
- }
562
- function _arrayWithHoles(arr) {
563
- if (Array.isArray(arr)) return arr;
564
- }
565
- function _iterableToArray(iter) {
566
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
567
- }
568
- function _unsupportedIterableToArray(o, minLen) {
569
- if (!o) return;
570
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
571
- var n = Object.prototype.toString.call(o).slice(8, -1);
572
- if (n === "Object" && o.constructor) n = o.constructor.name;
573
- if (n === "Map" || n === "Set") return Array.from(o);
574
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
575
- }
576
- function _arrayLikeToArray(arr, len) {
577
- if (len == null || len > arr.length) len = arr.length;
578
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
579
- return arr2;
580
- }
581
- function _nonIterableSpread() {
582
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
583
- }
584
- function _nonIterableRest() {
585
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
586
- }
587
2885
 
588
- var convertNumericInputValue = function convertNumericInputValue(value, inputMode) {
2886
+ handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
2887
+
2888
+ const convertNumericInputValue = (value, inputMode) => {
589
2889
  if (value !== '' && !isNaN(parseFloat(value))) {
590
2890
  return inputMode === 'numeric' ? parseInt(value, 10) : parseFloat(value);
591
2891
  }
592
2892
  return null;
593
2893
  };
594
- var getAllowedKeys = function getAllowedKeys() {
595
- var inputMode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'numeric';
596
- var allowedKeys = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-', 'Backspace', 'ArrowRight', 'ArrowLeft', 'Tab', 'Home', 'End', 'PageDown', 'PageUp', 'Delete'].concat(_toConsumableArray(inputMode === 'decimal' ? ['.'] : []));
2894
+ const getAllowedKeys = (inputMode = 'numeric') => {
2895
+ const allowedKeys = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-', 'Backspace', 'ArrowRight', 'ArrowLeft', 'Tab', 'Home', 'End', 'PageDown', 'PageUp', 'Delete', ...(inputMode === 'decimal' ? ['.'] : [])];
597
2896
  return allowedKeys;
598
2897
  };
599
- var ReactHookFormNumberField = function ReactHookFormNumberField(_a) {
600
- var name = _a.name,
601
- label = _a.label,
602
- _a$defaultValue = _a.defaultValue,
603
- defaultValue = _a$defaultValue === void 0 ? null : _a$defaultValue,
604
- rules = _a.rules,
605
- _a$disabled = _a.disabled,
606
- disabled = _a$disabled === void 0 ? false : _a$disabled,
607
- _a$inputMode = _a.inputMode,
608
- inputMode = _a$inputMode === void 0 ? 'numeric' : _a$inputMode,
609
- _a$helperText = _a.helperText,
610
- helperText = _a$helperText === void 0 ? '' : _a$helperText,
611
- className = _a.className,
612
- _a$size = _a.size,
613
- size = _a$size === void 0 ? 'medium' : _a$size,
614
- sx = _a.sx,
615
- _a$onChange = _a.onChange,
616
- _onChange = _a$onChange === void 0 ? function () {} : _a$onChange,
617
- isReadOnly = _a.isReadOnly,
2898
+ const ReactHookFormNumberField = _a => {
2899
+ var {
2900
+ name,
2901
+ label,
2902
+ defaultValue = null,
2903
+ rules,
2904
+ disabled = false,
2905
+ inputMode = 'numeric',
2906
+ helperText = '',
2907
+ className,
2908
+ size = 'medium',
2909
+ sx,
2910
+ onChange = () => {},
2911
+ isReadOnly
2912
+ } = _a,
618
2913
  otherProps = __rest(_a, ["name", "label", "defaultValue", "rules", "disabled", "inputMode", "helperText", "className", "size", "sx", "onChange", "isReadOnly"]);
619
- var _useFormContext = useFormContext(),
620
- control = _useFormContext.control;
621
- var _useController = useController(Object.assign({
622
- name: name,
623
- control: control,
624
- rules: rules,
625
- defaultValue: defaultValue
626
- }, defaultProps)),
627
- _useController$field = _useController.field,
628
- onChangeField = _useController$field.onChange,
629
- value = _useController$field.value,
630
- ref = _useController$field.ref,
631
- formErrors = _useController.formState.errors;
632
- var errors = getErrors(name, formErrors);
633
- var allowedKeyes = getAllowedKeys(inputMode);
634
- var onPaste = function onPaste(event) {
635
- var clipboardText = event.clipboardData.getData('text/plain');
636
- var inputElement = event.target;
637
- var before = inputElement.value.slice(0, inputElement.selectionStart);
638
- var after = inputElement.value.slice(inputElement.selectionEnd);
639
- var newValue = before + clipboardText + after;
2914
+ const {
2915
+ control
2916
+ } = useFormContext();
2917
+ const {
2918
+ field: {
2919
+ onChange: onChangeField,
2920
+ value,
2921
+ ref
2922
+ },
2923
+ formState: {
2924
+ errors: formErrors
2925
+ }
2926
+ } = useController(Object.assign({
2927
+ name,
2928
+ control,
2929
+ rules,
2930
+ defaultValue
2931
+ }, defaultProps));
2932
+ const errors = getErrors(name, formErrors);
2933
+ const allowedKeyes = getAllowedKeys(inputMode);
2934
+ const onPaste = event => {
2935
+ const clipboardText = event.clipboardData.getData('text/plain');
2936
+ const inputElement = event.target;
2937
+ const before = inputElement.value.slice(0, inputElement.selectionStart);
2938
+ const after = inputElement.value.slice(inputElement.selectionEnd);
2939
+ const newValue = before + clipboardText + after;
640
2940
  if (inputMode === 'numeric' && !newValue.match(/^\-?[0-9]+$/)) {
641
2941
  event.preventDefault();
642
2942
  }
@@ -644,8 +2944,8 @@ var ReactHookFormNumberField = function ReactHookFormNumberField(_a) {
644
2944
  event.preventDefault();
645
2945
  }
646
2946
  };
647
- var onKeyDown = function onKeyDown(event) {
648
- var isMac = window.navigator.userAgent.includes(' Mac ');
2947
+ const onKeyDown = event => {
2948
+ const isMac = window.navigator.userAgent.includes(' Mac ');
649
2949
  if (isMac && event.metaKey || !isMac && event.ctrlKey) {
650
2950
  if (['c', 'v', 'x'].includes(event.key.toLowerCase())) {
651
2951
  return;
@@ -659,10 +2959,7 @@ var ReactHookFormNumberField = function ReactHookFormNumberField(_a) {
659
2959
  event.preventDefault();
660
2960
  }
661
2961
  };
662
- var _React$useState = React.useState(value === null || isNaN(value) ? '' : value),
663
- _React$useState2 = _slicedToArray(_React$useState, 2),
664
- displayValue = _React$useState2[0],
665
- setDisplayValue = _React$useState2[1];
2962
+ const [displayValue, setDisplayValue] = React.useState(value === null || isNaN(value) ? '' : value);
666
2963
  return /*#__PURE__*/React.createElement(ReactHookFormFormControl, {
667
2964
  className: className,
668
2965
  sx: sx,
@@ -678,15 +2975,17 @@ var ReactHookFormNumberField = function ReactHookFormNumberField(_a) {
678
2975
  variant: "filled",
679
2976
  type: "text",
680
2977
  inputProps: {
681
- inputMode: inputMode
2978
+ inputMode
682
2979
  },
683
2980
  name: name,
684
2981
  size: size,
685
- onChange: function onChange(evt) {
686
- var value = evt.target.value;
2982
+ onChange: evt => {
2983
+ const {
2984
+ value
2985
+ } = evt.target;
687
2986
  setDisplayValue(value);
688
2987
  onChangeField(convertNumericInputValue(value, inputMode));
689
- _onChange(null);
2988
+ onChange(null);
690
2989
  },
691
2990
  onKeyDown: onKeyDown,
692
2991
  disabled: disabled,
@@ -695,60 +2994,59 @@ var ReactHookFormNumberField = function ReactHookFormNumberField(_a) {
695
2994
  InputProps: Object.assign(Object.assign(Object.assign({}, isReadOnly && {
696
2995
  readOnly: true
697
2996
  }), otherProps.InputProps), {
698
- onPaste: onPaste
2997
+ onPaste
699
2998
  })
700
2999
  }, otherProps)));
701
3000
  };
702
3001
 
703
- var DEFAULT_DATE_FORMAT = 'DD/MM/YYYY HH:mm';
704
- var DATE_FORMAT_FNS = 'dd/MM/yyyy HH:mm';
705
- var OpenPicker = function OpenPicker() {
706
- return /*#__PURE__*/React.createElement(CalendarToday, null);
707
- };
3002
+ const DEFAULT_DATE_FORMAT = 'DD/MM/YYYY HH:mm';
3003
+ const DATE_FORMAT_FNS = 'dd/MM/yyyy HH:mm';
3004
+ const OpenPicker = () => /*#__PURE__*/React.createElement(CalendarToday, null);
708
3005
  // TODO: Place this default setting somewhere more appropriate, should only need to fire once https://gitlab.com/opengeoweb/opengeoweb/-/issues/331
709
3006
  moment$1.tz.setDefault('Etc/GMT-0');
710
- var getFormattedValue = function getFormattedValue(value) {
711
- var isMoment = moment$1(value).isValid();
3007
+ const getFormattedValue = value => {
3008
+ const isMoment = moment$1(value).isValid();
712
3009
  return isMoment ? moment$1.utc(value).format() : value;
713
3010
  };
714
- var ReactHookKeyboardDateTimePicker = function ReactHookKeyboardDateTimePicker(_a) {
715
- var name = _a.name,
716
- rules = _a.rules,
717
- disabled = _a.disabled,
718
- _a$label = _a.label,
719
- label = _a$label === void 0 ? 'Select date and time' : _a$label,
720
- _a$format = _a.format,
721
- format = _a$format === void 0 ? DEFAULT_DATE_FORMAT : _a$format,
722
- _a$openTo = _a.openTo,
723
- openTo = _a$openTo === void 0 ? 'hours' : _a$openTo,
724
- _a$defaultNullValue = _a.defaultNullValue,
725
- defaultNullValue = _a$defaultNullValue === void 0 ? null : _a$defaultNullValue,
726
- _a$helperText = _a.helperText,
727
- helperText = _a$helperText === void 0 ? '' : _a$helperText,
728
- _a$onChange = _a.onChange,
729
- _onChange = _a$onChange === void 0 ? function () {} : _a$onChange,
730
- className = _a.className,
731
- sx = _a.sx,
732
- isReadOnly = _a.isReadOnly,
733
- inputAdornment = _a.inputAdornment,
734
- shouldHideUTC = _a.shouldHideUTC,
3011
+ const ReactHookKeyboardDateTimePicker = _a => {
3012
+ var {
3013
+ name,
3014
+ rules,
3015
+ disabled,
3016
+ label = 'Select date and time',
3017
+ format = DEFAULT_DATE_FORMAT,
3018
+ openTo = 'hours',
3019
+ defaultNullValue = null,
3020
+ helperText = '',
3021
+ onChange = () => {},
3022
+ className,
3023
+ sx,
3024
+ isReadOnly,
3025
+ inputAdornment,
3026
+ shouldHideUTC
3027
+ } = _a,
735
3028
  otherProps = __rest(_a, ["name", "rules", "disabled", "label", "format", "openTo", "defaultNullValue", "helperText", "onChange", "className", "sx", "isReadOnly", "inputAdornment", "shouldHideUTC"]);
736
- var _useFormContext = useFormContext(),
737
- control = _useFormContext.control;
738
- var _useController = useController(Object.assign({
739
- name: name,
740
- control: control,
741
- rules: rules,
742
- defaultValue: defaultNullValue
743
- }, defaultProps)),
744
- _useController$field = _useController.field,
745
- onChangeField = _useController$field.onChange,
746
- value = _useController$field.value,
747
- ref = _useController$field.ref,
748
- formErrors = _useController.formState.errors;
749
- var errors = getErrors(name, formErrors);
3029
+ const {
3030
+ control
3031
+ } = useFormContext();
3032
+ const {
3033
+ field: {
3034
+ onChange: onChangeField,
3035
+ value,
3036
+ ref
3037
+ },
3038
+ formState: {
3039
+ errors: formErrors
3040
+ }
3041
+ } = useController(Object.assign({
3042
+ name,
3043
+ control,
3044
+ rules,
3045
+ defaultValue: defaultNullValue
3046
+ }, defaultProps));
3047
+ const errors = getErrors(name, formErrors);
750
3048
  // Ensure value is a Moment object
751
- var dateValue = value ? moment$1(value) : null;
3049
+ const dateValue = value ? moment$1(value) : null;
752
3050
  return /*#__PURE__*/React.createElement(ReactHookFormFormControl, {
753
3051
  disabled: disabled,
754
3052
  errors: errors,
@@ -763,17 +3061,17 @@ var ReactHookKeyboardDateTimePicker = function ReactHookKeyboardDateTimePicker(_
763
3061
  value: dateValue,
764
3062
  openTo: openTo,
765
3063
  disabled: disabled,
766
- onChange: function onChange(value) {
3064
+ onChange: value => {
767
3065
  onChangeField(getFormattedValue(value));
768
- _onChange(getFormattedValue(value));
3066
+ onChange(getFormattedValue(value));
769
3067
  },
770
3068
  inputRef: ref,
771
3069
  slotProps: {
772
3070
  textField: Object.assign({
773
3071
  variant: 'filled',
774
- helperText: helperText,
3072
+ helperText,
775
3073
  error: !!errors,
776
- name: name,
3074
+ name,
777
3075
  placeholder: disabled ? '' : format.toLowerCase(),
778
3076
  InputProps: Object.assign({}, !shouldHideUTC && {
779
3077
  endAdornment: ( /*#__PURE__*/React.createElement(InputAdornment, {
@@ -808,121 +3106,84 @@ var ReactHookKeyboardDateTimePicker = function ReactHookKeyboardDateTimePicker(_
808
3106
  }, otherProps)));
809
3107
  };
810
3108
 
811
- /* *
812
- * Licensed under the Apache License, Version 2.0 (the "License");
813
- * you may not use this file except in compliance with the License.
814
- * You may obtain a copy of the License at
815
- *
816
- * http://www.apache.org/licenses/LICENSE-2.0
817
- *
818
- * Unless required by applicable law or agreed to in writing, software
819
- * distributed under the License is distributed on an "AS IS" BASIS,
820
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
821
- * See the License for the specific language governing permissions and
822
- * limitations under the License.
823
- *
824
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
825
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
826
- * */
827
- var defaultFormOptions = {
3109
+ const defaultFormOptions = {
828
3110
  mode: 'onChange',
829
3111
  reValidateMode: 'onChange'
830
3112
  };
831
- var ReactHookFormProvider = function ReactHookFormProvider(_ref) {
832
- var children = _ref.children,
833
- _ref$options = _ref.options,
834
- options = _ref$options === void 0 ? defaultFormOptions : _ref$options;
835
- var formMethods = useForm(options);
3113
+ const ReactHookFormProvider = ({
3114
+ children,
3115
+ options: _options = defaultFormOptions
3116
+ }) => {
3117
+ const formMethods = useForm(_options);
836
3118
  // added this ignore as the build is failing otherwise on: Type instantiation is excessively deep and possibly infinite.
837
3119
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
838
3120
  // @ts-ignore
839
3121
  return /*#__PURE__*/React__default.createElement(FormProvider, Object.assign({}, formMethods), children);
840
3122
  };
841
- var ReactHookFormProviderWrapper = function ReactHookFormProviderWrapper(_ref2) {
842
- var children = _ref2.children,
843
- _ref2$options = _ref2.options,
844
- options = _ref2$options === void 0 ? defaultFormOptions : _ref2$options;
845
- return /*#__PURE__*/React__default.createElement(LocalizationProvider, {
846
- dateAdapter: AdapterMoment
847
- }, /*#__PURE__*/React__default.createElement(ReactHookFormProvider, {
848
- options: options
849
- }, children));
850
- };
851
-
852
- var ReactHookFormHiddenInput = function ReactHookFormHiddenInput(_a) {
853
- var name = _a.name,
854
- _a$defaultValue = _a.defaultValue,
855
- defaultValue = _a$defaultValue === void 0 ? null : _a$defaultValue,
856
- rules = _a.rules,
3123
+ const ReactHookFormProviderWrapper = ({
3124
+ children,
3125
+ options: _options2 = defaultFormOptions
3126
+ }) => ( /*#__PURE__*/React__default.createElement(LocalizationProvider, {
3127
+ dateAdapter: AdapterMoment
3128
+ }, /*#__PURE__*/React__default.createElement(ReactHookFormProvider, {
3129
+ options: _options2
3130
+ }, children)));
3131
+
3132
+ const ReactHookFormHiddenInput = _a => {
3133
+ var {
3134
+ name,
3135
+ defaultValue = null,
3136
+ rules
3137
+ } = _a,
857
3138
  props = __rest(_a, ["name", "defaultValue", "rules"]);
858
- var _useFormContext = useFormContext(),
859
- control = _useFormContext.control;
860
- var _useController = useController(Object.assign({
861
- name: name,
862
- control: control,
863
- rules: rules,
864
- defaultValue: defaultValue
865
- }, defaultProps)),
866
- field = _useController.field;
3139
+ const {
3140
+ control
3141
+ } = useFormContext();
3142
+ const {
3143
+ field
3144
+ } = useController(Object.assign({
3145
+ name,
3146
+ control,
3147
+ rules,
3148
+ defaultValue
3149
+ }, defaultProps));
867
3150
  return field.value !== null ? ( /*#__PURE__*/React.createElement("input", Object.assign({}, field, {
868
3151
  type: "hidden"
869
3152
  }, props))) : null;
870
3153
  };
871
3154
 
872
- /* *
873
- * Licensed under the Apache License, Version 2.0 (the "License");
874
- * you may not use this file except in compliance with the License.
875
- * You may obtain a copy of the License at
876
- *
877
- * http://www.apache.org/licenses/LICENSE-2.0
878
- *
879
- * Unless required by applicable law or agreed to in writing, software
880
- * distributed under the License is distributed on an "AS IS" BASIS,
881
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
882
- * See the License for the specific language governing permissions and
883
- * limitations under the License.
884
- *
885
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
886
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
887
- * */
888
3155
  // hidden input helpers, should not be part of send formdata
889
- var HIDDEN_INPUT_HELPER_IS_DRAFT = 'IS_DRAFT';
890
- var useDraftFormHelpers = function useDraftFormHelpers() {
891
- var isDefaultDraft = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
892
- var _useFormContext = useFormContext(),
893
- getValues = _useFormContext.getValues,
894
- setValue = _useFormContext.setValue,
895
- register = _useFormContext.register;
896
- React.useEffect(function () {
3156
+ const HIDDEN_INPUT_HELPER_IS_DRAFT = 'IS_DRAFT';
3157
+ const useDraftFormHelpers = (isDefaultDraft = false) => {
3158
+ const {
3159
+ getValues,
3160
+ setValue,
3161
+ register
3162
+ } = useFormContext();
3163
+ React.useEffect(() => {
897
3164
  setValue(HIDDEN_INPUT_HELPER_IS_DRAFT, isDefaultDraft, {
898
3165
  shouldDirty: false
899
3166
  });
900
3167
  // eslint-disable-next-line react-hooks/exhaustive-deps
901
3168
  }, []);
902
- var isDraft = function isDraft() {
903
- return getValues(HIDDEN_INPUT_HELPER_IS_DRAFT) === true;
904
- };
905
- var isRequired = function isRequired(value) {
3169
+ const isDraft = () => getValues(HIDDEN_INPUT_HELPER_IS_DRAFT) === true;
3170
+ const isRequired = value => {
906
3171
  if (!isDraft() && isEmpty(value)) {
907
3172
  return errorMessages.required;
908
3173
  }
909
3174
  return true;
910
3175
  };
911
- var toggleIsDraft = function toggleIsDraft(isDraft) {
912
- return setValue(HIDDEN_INPUT_HELPER_IS_DRAFT, isDraft, {
913
- shouldDirty: false
914
- });
915
- };
916
- var DraftFieldHelper = function DraftFieldHelper() {
917
- return /*#__PURE__*/React.createElement("input", Object.assign({}, register(HIDDEN_INPUT_HELPER_IS_DRAFT), {
918
- type: "hidden"
919
- }));
920
- };
3176
+ const toggleIsDraft = isDraft => setValue(HIDDEN_INPUT_HELPER_IS_DRAFT, isDraft, {
3177
+ shouldDirty: false
3178
+ });
3179
+ const DraftFieldHelper = () => ( /*#__PURE__*/React.createElement("input", Object.assign({}, register(HIDDEN_INPUT_HELPER_IS_DRAFT), {
3180
+ type: "hidden"
3181
+ })));
921
3182
  return {
922
- isRequired: isRequired,
923
- toggleIsDraft: toggleIsDraft,
924
- isDraft: isDraft,
925
- DraftFieldHelper: DraftFieldHelper
3183
+ isRequired,
3184
+ toggleIsDraft,
3185
+ isDraft,
3186
+ DraftFieldHelper
926
3187
  };
927
3188
  };
928
3189