@bolttech/form-engine 3.1.0-beta.4 → 3.1.0-beta.6

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.
package/index.esm.js CHANGED
@@ -1,28 +1,10 @@
1
1
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
- import { FormGroup, FormCore } from '@bolttech/form-engine-core';
3
- import { createContext, useContext, useRef, useMemo, useState, useEffect, useCallback, Suspense, Children } from 'react';
2
+ import { createContext, useContext, useRef, useMemo, useState, useEffect, useCallback, Suspense } from 'react';
3
+ import { FormGroup, FormField, FormCore } from '@bolttech/form-engine-core';
4
4
 
5
5
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
6
6
 
7
- var check = function (it) {
8
- return it && it.Math === Math && it;
9
- };
10
-
11
- // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
12
- var global$e =
13
- // eslint-disable-next-line es/no-global-this -- safe
14
- check(typeof globalThis == 'object' && globalThis) ||
15
- check(typeof window == 'object' && window) ||
16
- // eslint-disable-next-line no-restricted-globals -- safe
17
- check(typeof self == 'object' && self) ||
18
- check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
19
- check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
20
- // eslint-disable-next-line no-new-func -- fallback
21
- (function () { return this; })() || Function('return this')();
22
-
23
- var objectGetOwnPropertyDescriptor = {};
24
-
25
- var fails$h = function (exec) {
7
+ var fails$e = function (exec) {
26
8
  try {
27
9
  return !!exec();
28
10
  } catch (error) {
@@ -30,17 +12,9 @@ var fails$h = function (exec) {
30
12
  }
31
13
  };
32
14
 
33
- var fails$g = fails$h;
34
-
35
- // Detect IE8's incomplete defineProperty implementation
36
- var descriptors = !fails$g(function () {
37
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
38
- return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
39
- });
40
-
41
- var fails$f = fails$h;
15
+ var fails$d = fails$e;
42
16
 
43
- var functionBindNative = !fails$f(function () {
17
+ var functionBindNative = !fails$d(function () {
44
18
  // eslint-disable-next-line es/no-function-prototype-bind -- safe
45
19
  var test = (function () { /* empty */ }).bind();
46
20
  // eslint-disable-next-line no-prototype-builtins -- safe
@@ -49,67 +23,34 @@ var functionBindNative = !fails$f(function () {
49
23
 
50
24
  var NATIVE_BIND$1 = functionBindNative;
51
25
 
52
- var call$8 = Function.prototype.call;
53
-
54
- var functionCall = NATIVE_BIND$1 ? call$8.bind(call$8) : function () {
55
- return call$8.apply(call$8, arguments);
56
- };
57
-
58
- var objectPropertyIsEnumerable = {};
59
-
60
- var $propertyIsEnumerable = {}.propertyIsEnumerable;
61
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
62
- var getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor;
63
-
64
- // Nashorn ~ JDK8 bug
65
- var NASHORN_BUG = getOwnPropertyDescriptor$2 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
66
-
67
- // `Object.prototype.propertyIsEnumerable` method implementation
68
- // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
69
- objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
70
- var descriptor = getOwnPropertyDescriptor$2(this, V);
71
- return !!descriptor && descriptor.enumerable;
72
- } : $propertyIsEnumerable;
73
-
74
- var createPropertyDescriptor$3 = function (bitmap, value) {
75
- return {
76
- enumerable: !(bitmap & 1),
77
- configurable: !(bitmap & 2),
78
- writable: !(bitmap & 4),
79
- value: value
80
- };
81
- };
82
-
83
- var NATIVE_BIND = functionBindNative;
84
-
85
26
  var FunctionPrototype$1 = Function.prototype;
86
27
  var call$7 = FunctionPrototype$1.call;
87
- var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype$1.bind.bind(call$7, call$7);
28
+ var uncurryThisWithBind = NATIVE_BIND$1 && FunctionPrototype$1.bind.bind(call$7, call$7);
88
29
 
89
- var functionUncurryThis = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
30
+ var functionUncurryThis = NATIVE_BIND$1 ? uncurryThisWithBind : function (fn) {
90
31
  return function () {
91
32
  return call$7.apply(fn, arguments);
92
33
  };
93
34
  };
94
35
 
95
- var uncurryThis$f = functionUncurryThis;
36
+ var uncurryThis$e = functionUncurryThis;
96
37
 
97
- var toString$5 = uncurryThis$f({}.toString);
98
- var stringSlice$3 = uncurryThis$f(''.slice);
38
+ var toString$4 = uncurryThis$e({}.toString);
39
+ var stringSlice$2 = uncurryThis$e(''.slice);
99
40
 
100
41
  var classofRaw$2 = function (it) {
101
- return stringSlice$3(toString$5(it), 8, -1);
42
+ return stringSlice$2(toString$4(it), 8, -1);
102
43
  };
103
44
 
104
- var uncurryThis$e = functionUncurryThis;
105
- var fails$e = fails$h;
45
+ var uncurryThis$d = functionUncurryThis;
46
+ var fails$c = fails$e;
106
47
  var classof$3 = classofRaw$2;
107
48
 
108
49
  var $Object$4 = Object;
109
- var split = uncurryThis$e(''.split);
50
+ var split = uncurryThis$d(''.split);
110
51
 
111
52
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
112
- var indexedObject = fails$e(function () {
53
+ var indexedObject = fails$c(function () {
113
54
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
114
55
  // eslint-disable-next-line no-prototype-builtins -- safe
115
56
  return !$Object$4('z').propertyIsEnumerable(0);
@@ -142,46 +83,96 @@ var toIndexedObject$5 = function (it) {
142
83
  return IndexedObject$1(requireObjectCoercible$3(it));
143
84
  };
144
85
 
145
- // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
146
- var documentAll = typeof document == 'object' && document.all;
86
+ var check = function (it) {
87
+ return it && it.Math === Math && it;
88
+ };
147
89
 
148
- // `IsCallable` abstract operation
149
- // https://tc39.es/ecma262/#sec-iscallable
150
- // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
151
- var isCallable$e = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
152
- return typeof argument == 'function' || argument === documentAll;
153
- } : function (argument) {
154
- return typeof argument == 'function';
90
+ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
91
+ var global$b =
92
+ // eslint-disable-next-line es/no-global-this -- safe
93
+ check(typeof globalThis == 'object' && globalThis) ||
94
+ check(typeof window == 'object' && window) ||
95
+ // eslint-disable-next-line no-restricted-globals -- safe
96
+ check(typeof self == 'object' && self) ||
97
+ check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
98
+ check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
99
+ // eslint-disable-next-line no-new-func -- fallback
100
+ (function () { return this; })() || Function('return this')();
101
+
102
+ var sharedStore = {exports: {}};
103
+
104
+ var global$a = global$b;
105
+
106
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
107
+ var defineProperty$5 = Object.defineProperty;
108
+
109
+ var defineGlobalProperty$3 = function (key, value) {
110
+ try {
111
+ defineProperty$5(global$a, key, { value: value, configurable: true, writable: true });
112
+ } catch (error) {
113
+ global$a[key] = value;
114
+ } return value;
155
115
  };
156
116
 
157
- var isCallable$d = isCallable$e;
117
+ var globalThis$1 = global$b;
118
+ var defineGlobalProperty$2 = defineGlobalProperty$3;
158
119
 
159
- var isObject$9 = function (it) {
160
- return typeof it == 'object' ? it !== null : isCallable$d(it);
120
+ var SHARED = '__core-js_shared__';
121
+ var store$3 = sharedStore.exports = globalThis$1[SHARED] || defineGlobalProperty$2(SHARED, {});
122
+
123
+ (store$3.versions || (store$3.versions = [])).push({
124
+ version: '3.37.1',
125
+ mode: 'global',
126
+ copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
127
+ license: 'https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE',
128
+ source: 'https://github.com/zloirock/core-js'
129
+ });
130
+
131
+ var store$2 = sharedStore.exports;
132
+
133
+ var shared$3 = function (key, value) {
134
+ return store$2[key] || (store$2[key] = value || {});
161
135
  };
162
136
 
163
- var global$d = global$e;
164
- var isCallable$c = isCallable$e;
137
+ var requireObjectCoercible$2 = requireObjectCoercible$4;
165
138
 
166
- var aFunction = function (argument) {
167
- return isCallable$c(argument) ? argument : undefined;
139
+ var $Object$3 = Object;
140
+
141
+ // `ToObject` abstract operation
142
+ // https://tc39.es/ecma262/#sec-toobject
143
+ var toObject$4 = function (argument) {
144
+ return $Object$3(requireObjectCoercible$2(argument));
168
145
  };
169
146
 
170
- var getBuiltIn$3 = function (namespace, method) {
171
- return arguments.length < 2 ? aFunction(global$d[namespace]) : global$d[namespace] && global$d[namespace][method];
147
+ var uncurryThis$c = functionUncurryThis;
148
+ var toObject$3 = toObject$4;
149
+
150
+ var hasOwnProperty = uncurryThis$c({}.hasOwnProperty);
151
+
152
+ // `HasOwnProperty` abstract operation
153
+ // https://tc39.es/ecma262/#sec-hasownproperty
154
+ // eslint-disable-next-line es/no-object-hasown -- safe
155
+ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
156
+ return hasOwnProperty(toObject$3(it), key);
172
157
  };
173
158
 
174
- var uncurryThis$d = functionUncurryThis;
159
+ var uncurryThis$b = functionUncurryThis;
160
+
161
+ var id = 0;
162
+ var postfix = Math.random();
163
+ var toString$3 = uncurryThis$b(1.0.toString);
175
164
 
176
- var objectIsPrototypeOf = uncurryThis$d({}.isPrototypeOf);
165
+ var uid$2 = function (key) {
166
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$3(++id + postfix, 36);
167
+ };
177
168
 
178
169
  var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
179
170
 
180
- var global$c = global$e;
171
+ var global$9 = global$b;
181
172
  var userAgent$2 = engineUserAgent;
182
173
 
183
- var process = global$c.process;
184
- var Deno = global$c.Deno;
174
+ var process = global$9.process;
175
+ var Deno = global$9.Deno;
185
176
  var versions = process && process.versions || Deno && Deno.version;
186
177
  var v8 = versions && versions.v8;
187
178
  var match, version;
@@ -207,13 +198,13 @@ var engineV8Version = version;
207
198
 
208
199
  /* eslint-disable es/no-symbol -- required for testing */
209
200
  var V8_VERSION = engineV8Version;
210
- var fails$d = fails$h;
211
- var global$b = global$e;
201
+ var fails$b = fails$e;
202
+ var global$8 = global$b;
212
203
 
213
- var $String$5 = global$b.String;
204
+ var $String$5 = global$8.String;
214
205
 
215
206
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
216
- var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$d(function () {
207
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$b(function () {
217
208
  var symbol = Symbol('symbol detection');
218
209
  // Chrome 38 Symbol has incorrect toString conversion
219
210
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
@@ -231,25 +222,144 @@ var useSymbolAsUid = NATIVE_SYMBOL$1
231
222
  && !Symbol.sham
232
223
  && typeof Symbol.iterator == 'symbol';
233
224
 
225
+ var global$7 = global$b;
226
+ var shared$2 = shared$3;
227
+ var hasOwn$9 = hasOwnProperty_1;
228
+ var uid$1 = uid$2;
229
+ var NATIVE_SYMBOL = symbolConstructorDetection;
230
+ var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
231
+
232
+ var Symbol$1 = global$7.Symbol;
233
+ var WellKnownSymbolsStore = shared$2('wks');
234
+ var createWellKnownSymbol = USE_SYMBOL_AS_UID$1 ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
235
+
236
+ var wellKnownSymbol$a = function (name) {
237
+ if (!hasOwn$9(WellKnownSymbolsStore, name)) {
238
+ WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$9(Symbol$1, name)
239
+ ? Symbol$1[name]
240
+ : createWellKnownSymbol('Symbol.' + name);
241
+ } return WellKnownSymbolsStore[name];
242
+ };
243
+
244
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
245
+ var documentAll = typeof document == 'object' && document.all;
246
+
247
+ // `IsCallable` abstract operation
248
+ // https://tc39.es/ecma262/#sec-iscallable
249
+ // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
250
+ var isCallable$e = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
251
+ return typeof argument == 'function' || argument === documentAll;
252
+ } : function (argument) {
253
+ return typeof argument == 'function';
254
+ };
255
+
256
+ var isCallable$d = isCallable$e;
257
+
258
+ var isObject$9 = function (it) {
259
+ return typeof it == 'object' ? it !== null : isCallable$d(it);
260
+ };
261
+
262
+ var isObject$8 = isObject$9;
263
+
264
+ var $String$4 = String;
265
+ var $TypeError$7 = TypeError;
266
+
267
+ // `Assert: Type(argument) is Object`
268
+ var anObject$6 = function (argument) {
269
+ if (isObject$8(argument)) return argument;
270
+ throw new $TypeError$7($String$4(argument) + ' is not an object');
271
+ };
272
+
273
+ var objectDefineProperties = {};
274
+
275
+ var fails$a = fails$e;
276
+
277
+ // Detect IE8's incomplete defineProperty implementation
278
+ var descriptors = !fails$a(function () {
279
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
280
+ return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
281
+ });
282
+
283
+ var DESCRIPTORS$9 = descriptors;
284
+ var fails$9 = fails$e;
285
+
286
+ // V8 ~ Chrome 36-
287
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3334
288
+ var v8PrototypeDefineBug = DESCRIPTORS$9 && fails$9(function () {
289
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
290
+ return Object.defineProperty(function () { /* empty */ }, 'prototype', {
291
+ value: 42,
292
+ writable: false
293
+ }).prototype !== 42;
294
+ });
295
+
296
+ var objectDefineProperty = {};
297
+
298
+ var global$6 = global$b;
299
+ var isObject$7 = isObject$9;
300
+
301
+ var document$1 = global$6.document;
302
+ // typeof document.createElement is 'object' in old IE
303
+ var EXISTS$1 = isObject$7(document$1) && isObject$7(document$1.createElement);
304
+
305
+ var documentCreateElement$2 = function (it) {
306
+ return EXISTS$1 ? document$1.createElement(it) : {};
307
+ };
308
+
309
+ var DESCRIPTORS$8 = descriptors;
310
+ var fails$8 = fails$e;
311
+ var createElement = documentCreateElement$2;
312
+
313
+ // Thanks to IE8 for its funny defineProperty
314
+ var ie8DomDefine = !DESCRIPTORS$8 && !fails$8(function () {
315
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
316
+ return Object.defineProperty(createElement('div'), 'a', {
317
+ get: function () { return 7; }
318
+ }).a !== 7;
319
+ });
320
+
321
+ var NATIVE_BIND = functionBindNative;
322
+
323
+ var call$6 = Function.prototype.call;
324
+
325
+ var functionCall = NATIVE_BIND ? call$6.bind(call$6) : function () {
326
+ return call$6.apply(call$6, arguments);
327
+ };
328
+
329
+ var global$5 = global$b;
330
+ var isCallable$c = isCallable$e;
331
+
332
+ var aFunction = function (argument) {
333
+ return isCallable$c(argument) ? argument : undefined;
334
+ };
335
+
336
+ var getBuiltIn$3 = function (namespace, method) {
337
+ return arguments.length < 2 ? aFunction(global$5[namespace]) : global$5[namespace] && global$5[namespace][method];
338
+ };
339
+
340
+ var uncurryThis$a = functionUncurryThis;
341
+
342
+ var objectIsPrototypeOf = uncurryThis$a({}.isPrototypeOf);
343
+
234
344
  var getBuiltIn$2 = getBuiltIn$3;
235
345
  var isCallable$b = isCallable$e;
236
346
  var isPrototypeOf$1 = objectIsPrototypeOf;
237
- var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
347
+ var USE_SYMBOL_AS_UID = useSymbolAsUid;
238
348
 
239
- var $Object$3 = Object;
349
+ var $Object$2 = Object;
240
350
 
241
- var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
351
+ var isSymbol$2 = USE_SYMBOL_AS_UID ? function (it) {
242
352
  return typeof it == 'symbol';
243
353
  } : function (it) {
244
354
  var $Symbol = getBuiltIn$2('Symbol');
245
- return isCallable$b($Symbol) && isPrototypeOf$1($Symbol.prototype, $Object$3(it));
355
+ return isCallable$b($Symbol) && isPrototypeOf$1($Symbol.prototype, $Object$2(it));
246
356
  };
247
357
 
248
- var $String$4 = String;
358
+ var $String$3 = String;
249
359
 
250
360
  var tryToString$2 = function (argument) {
251
361
  try {
252
- return $String$4(argument);
362
+ return $String$3(argument);
253
363
  } catch (error) {
254
364
  return 'Object';
255
365
  }
@@ -258,12 +368,12 @@ var tryToString$2 = function (argument) {
258
368
  var isCallable$a = isCallable$e;
259
369
  var tryToString$1 = tryToString$2;
260
370
 
261
- var $TypeError$7 = TypeError;
371
+ var $TypeError$6 = TypeError;
262
372
 
263
373
  // `Assert: IsCallable(argument) is true`
264
374
  var aCallable$3 = function (argument) {
265
375
  if (isCallable$a(argument)) return argument;
266
- throw new $TypeError$7(tryToString$1(argument) + ' is not a function');
376
+ throw new $TypeError$6(tryToString$1(argument) + ' is not a function');
267
377
  };
268
378
 
269
379
  var aCallable$2 = aCallable$3;
@@ -276,129 +386,43 @@ var getMethod$1 = function (V, P) {
276
386
  return isNullOrUndefined(func) ? undefined : aCallable$2(func);
277
387
  };
278
388
 
279
- var call$6 = functionCall;
389
+ var call$5 = functionCall;
280
390
  var isCallable$9 = isCallable$e;
281
- var isObject$8 = isObject$9;
391
+ var isObject$6 = isObject$9;
282
392
 
283
- var $TypeError$6 = TypeError;
393
+ var $TypeError$5 = TypeError;
284
394
 
285
395
  // `OrdinaryToPrimitive` abstract operation
286
396
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
287
397
  var ordinaryToPrimitive$1 = function (input, pref) {
288
398
  var fn, val;
289
- if (pref === 'string' && isCallable$9(fn = input.toString) && !isObject$8(val = call$6(fn, input))) return val;
290
- if (isCallable$9(fn = input.valueOf) && !isObject$8(val = call$6(fn, input))) return val;
291
- if (pref !== 'string' && isCallable$9(fn = input.toString) && !isObject$8(val = call$6(fn, input))) return val;
292
- throw new $TypeError$6("Can't convert object to primitive value");
399
+ if (pref === 'string' && isCallable$9(fn = input.toString) && !isObject$6(val = call$5(fn, input))) return val;
400
+ if (isCallable$9(fn = input.valueOf) && !isObject$6(val = call$5(fn, input))) return val;
401
+ if (pref !== 'string' && isCallable$9(fn = input.toString) && !isObject$6(val = call$5(fn, input))) return val;
402
+ throw new $TypeError$5("Can't convert object to primitive value");
293
403
  };
294
404
 
295
- var sharedStore = {exports: {}};
405
+ var call$4 = functionCall;
406
+ var isObject$5 = isObject$9;
407
+ var isSymbol$1 = isSymbol$2;
408
+ var getMethod = getMethod$1;
409
+ var ordinaryToPrimitive = ordinaryToPrimitive$1;
410
+ var wellKnownSymbol$9 = wellKnownSymbol$a;
296
411
 
297
- var global$a = global$e;
298
-
299
- // eslint-disable-next-line es/no-object-defineproperty -- safe
300
- var defineProperty$5 = Object.defineProperty;
301
-
302
- var defineGlobalProperty$3 = function (key, value) {
303
- try {
304
- defineProperty$5(global$a, key, { value: value, configurable: true, writable: true });
305
- } catch (error) {
306
- global$a[key] = value;
307
- } return value;
308
- };
309
-
310
- var globalThis$1 = global$e;
311
- var defineGlobalProperty$2 = defineGlobalProperty$3;
312
-
313
- var SHARED = '__core-js_shared__';
314
- var store$3 = sharedStore.exports = globalThis$1[SHARED] || defineGlobalProperty$2(SHARED, {});
315
-
316
- (store$3.versions || (store$3.versions = [])).push({
317
- version: '3.37.1',
318
- mode: 'global',
319
- copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
320
- license: 'https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE',
321
- source: 'https://github.com/zloirock/core-js'
322
- });
323
-
324
- var store$2 = sharedStore.exports;
325
-
326
- var shared$4 = function (key, value) {
327
- return store$2[key] || (store$2[key] = value || {});
328
- };
329
-
330
- var requireObjectCoercible$2 = requireObjectCoercible$4;
331
-
332
- var $Object$2 = Object;
333
-
334
- // `ToObject` abstract operation
335
- // https://tc39.es/ecma262/#sec-toobject
336
- var toObject$4 = function (argument) {
337
- return $Object$2(requireObjectCoercible$2(argument));
338
- };
339
-
340
- var uncurryThis$c = functionUncurryThis;
341
- var toObject$3 = toObject$4;
342
-
343
- var hasOwnProperty = uncurryThis$c({}.hasOwnProperty);
344
-
345
- // `HasOwnProperty` abstract operation
346
- // https://tc39.es/ecma262/#sec-hasownproperty
347
- // eslint-disable-next-line es/no-object-hasown -- safe
348
- var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
349
- return hasOwnProperty(toObject$3(it), key);
350
- };
351
-
352
- var uncurryThis$b = functionUncurryThis;
353
-
354
- var id = 0;
355
- var postfix = Math.random();
356
- var toString$4 = uncurryThis$b(1.0.toString);
357
-
358
- var uid$2 = function (key) {
359
- return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$4(++id + postfix, 36);
360
- };
361
-
362
- var global$9 = global$e;
363
- var shared$3 = shared$4;
364
- var hasOwn$9 = hasOwnProperty_1;
365
- var uid$1 = uid$2;
366
- var NATIVE_SYMBOL = symbolConstructorDetection;
367
- var USE_SYMBOL_AS_UID = useSymbolAsUid;
368
-
369
- var Symbol$1 = global$9.Symbol;
370
- var WellKnownSymbolsStore = shared$3('wks');
371
- var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
372
-
373
- var wellKnownSymbol$a = function (name) {
374
- if (!hasOwn$9(WellKnownSymbolsStore, name)) {
375
- WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$9(Symbol$1, name)
376
- ? Symbol$1[name]
377
- : createWellKnownSymbol('Symbol.' + name);
378
- } return WellKnownSymbolsStore[name];
379
- };
380
-
381
- var call$5 = functionCall;
382
- var isObject$7 = isObject$9;
383
- var isSymbol$1 = isSymbol$2;
384
- var getMethod = getMethod$1;
385
- var ordinaryToPrimitive = ordinaryToPrimitive$1;
386
- var wellKnownSymbol$9 = wellKnownSymbol$a;
387
-
388
- var $TypeError$5 = TypeError;
389
- var TO_PRIMITIVE = wellKnownSymbol$9('toPrimitive');
412
+ var $TypeError$4 = TypeError;
413
+ var TO_PRIMITIVE = wellKnownSymbol$9('toPrimitive');
390
414
 
391
415
  // `ToPrimitive` abstract operation
392
416
  // https://tc39.es/ecma262/#sec-toprimitive
393
417
  var toPrimitive$1 = function (input, pref) {
394
- if (!isObject$7(input) || isSymbol$1(input)) return input;
418
+ if (!isObject$5(input) || isSymbol$1(input)) return input;
395
419
  var exoticToPrim = getMethod(input, TO_PRIMITIVE);
396
420
  var result;
397
421
  if (exoticToPrim) {
398
422
  if (pref === undefined) pref = 'default';
399
- result = call$5(exoticToPrim, input, pref);
400
- if (!isObject$7(result) || isSymbol$1(result)) return result;
401
- throw new $TypeError$5("Can't convert object to primitive value");
423
+ result = call$4(exoticToPrim, input, pref);
424
+ if (!isObject$5(result) || isSymbol$1(result)) return result;
425
+ throw new $TypeError$4("Can't convert object to primitive value");
402
426
  }
403
427
  if (pref === undefined) pref = 'number';
404
428
  return ordinaryToPrimitive(input, pref);
@@ -414,101 +438,29 @@ var toPropertyKey$2 = function (argument) {
414
438
  return isSymbol(key) ? key : key + '';
415
439
  };
416
440
 
417
- var global$8 = global$e;
418
- var isObject$6 = isObject$9;
419
-
420
- var document$1 = global$8.document;
421
- // typeof document.createElement is 'object' in old IE
422
- var EXISTS$1 = isObject$6(document$1) && isObject$6(document$1.createElement);
423
-
424
- var documentCreateElement$2 = function (it) {
425
- return EXISTS$1 ? document$1.createElement(it) : {};
426
- };
427
-
428
- var DESCRIPTORS$9 = descriptors;
429
- var fails$c = fails$h;
430
- var createElement = documentCreateElement$2;
431
-
432
- // Thanks to IE8 for its funny defineProperty
433
- var ie8DomDefine = !DESCRIPTORS$9 && !fails$c(function () {
434
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
435
- return Object.defineProperty(createElement('div'), 'a', {
436
- get: function () { return 7; }
437
- }).a !== 7;
438
- });
439
-
440
- var DESCRIPTORS$8 = descriptors;
441
- var call$4 = functionCall;
442
- var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
443
- var createPropertyDescriptor$2 = createPropertyDescriptor$3;
444
- var toIndexedObject$4 = toIndexedObject$5;
445
- var toPropertyKey$1 = toPropertyKey$2;
446
- var hasOwn$8 = hasOwnProperty_1;
447
- var IE8_DOM_DEFINE$1 = ie8DomDefine;
448
-
449
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
450
- var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
451
-
452
- // `Object.getOwnPropertyDescriptor` method
453
- // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
454
- objectGetOwnPropertyDescriptor.f = DESCRIPTORS$8 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
455
- O = toIndexedObject$4(O);
456
- P = toPropertyKey$1(P);
457
- if (IE8_DOM_DEFINE$1) try {
458
- return $getOwnPropertyDescriptor$1(O, P);
459
- } catch (error) { /* empty */ }
460
- if (hasOwn$8(O, P)) return createPropertyDescriptor$2(!call$4(propertyIsEnumerableModule$1.f, O, P), O[P]);
461
- };
462
-
463
- var objectDefineProperty = {};
464
-
465
441
  var DESCRIPTORS$7 = descriptors;
466
- var fails$b = fails$h;
467
-
468
- // V8 ~ Chrome 36-
469
- // https://bugs.chromium.org/p/v8/issues/detail?id=3334
470
- var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$b(function () {
471
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
472
- return Object.defineProperty(function () { /* empty */ }, 'prototype', {
473
- value: 42,
474
- writable: false
475
- }).prototype !== 42;
476
- });
477
-
478
- var isObject$5 = isObject$9;
479
-
480
- var $String$3 = String;
481
- var $TypeError$4 = TypeError;
482
-
483
- // `Assert: Type(argument) is Object`
484
- var anObject$6 = function (argument) {
485
- if (isObject$5(argument)) return argument;
486
- throw new $TypeError$4($String$3(argument) + ' is not an object');
487
- };
488
-
489
- var DESCRIPTORS$6 = descriptors;
490
- var IE8_DOM_DEFINE = ie8DomDefine;
442
+ var IE8_DOM_DEFINE$1 = ie8DomDefine;
491
443
  var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
492
444
  var anObject$5 = anObject$6;
493
- var toPropertyKey = toPropertyKey$2;
445
+ var toPropertyKey$1 = toPropertyKey$2;
494
446
 
495
447
  var $TypeError$3 = TypeError;
496
448
  // eslint-disable-next-line es/no-object-defineproperty -- safe
497
449
  var $defineProperty = Object.defineProperty;
498
450
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
499
- var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
451
+ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
500
452
  var ENUMERABLE = 'enumerable';
501
453
  var CONFIGURABLE$1 = 'configurable';
502
454
  var WRITABLE = 'writable';
503
455
 
504
456
  // `Object.defineProperty` method
505
457
  // https://tc39.es/ecma262/#sec-object.defineproperty
506
- objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
458
+ objectDefineProperty.f = DESCRIPTORS$7 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
507
459
  anObject$5(O);
508
- P = toPropertyKey(P);
460
+ P = toPropertyKey$1(P);
509
461
  anObject$5(Attributes);
510
462
  if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
511
- var current = $getOwnPropertyDescriptor(O, P);
463
+ var current = $getOwnPropertyDescriptor$1(O, P);
512
464
  if (current && current[WRITABLE]) {
513
465
  O[P] = Attributes.value;
514
466
  Attributes = {
@@ -520,9 +472,9 @@ objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
520
472
  } return $defineProperty(O, P, Attributes);
521
473
  } : $defineProperty : function defineProperty(O, P, Attributes) {
522
474
  anObject$5(O);
523
- P = toPropertyKey(P);
475
+ P = toPropertyKey$1(P);
524
476
  anObject$5(Attributes);
525
- if (IE8_DOM_DEFINE) try {
477
+ if (IE8_DOM_DEFINE$1) try {
526
478
  return $defineProperty(O, P, Attributes);
527
479
  } catch (error) { /* empty */ }
528
480
  if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$3('Accessors not supported');
@@ -530,82 +482,317 @@ objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
530
482
  return O;
531
483
  };
532
484
 
533
- var DESCRIPTORS$5 = descriptors;
534
- var definePropertyModule$3 = objectDefineProperty;
535
- var createPropertyDescriptor$1 = createPropertyDescriptor$3;
485
+ var ceil = Math.ceil;
486
+ var floor$1 = Math.floor;
536
487
 
537
- var createNonEnumerableProperty$4 = DESCRIPTORS$5 ? function (object, key, value) {
538
- return definePropertyModule$3.f(object, key, createPropertyDescriptor$1(1, value));
539
- } : function (object, key, value) {
540
- object[key] = value;
541
- return object;
488
+ // `Math.trunc` method
489
+ // https://tc39.es/ecma262/#sec-math.trunc
490
+ // eslint-disable-next-line es/no-math-trunc -- safe
491
+ var mathTrunc = Math.trunc || function trunc(x) {
492
+ var n = +x;
493
+ return (n > 0 ? floor$1 : ceil)(n);
542
494
  };
543
495
 
544
- var makeBuiltIn$2 = {exports: {}};
496
+ var trunc = mathTrunc;
545
497
 
546
- var DESCRIPTORS$4 = descriptors;
547
- var hasOwn$7 = hasOwnProperty_1;
498
+ // `ToIntegerOrInfinity` abstract operation
499
+ // https://tc39.es/ecma262/#sec-tointegerorinfinity
500
+ var toIntegerOrInfinity$2 = function (argument) {
501
+ var number = +argument;
502
+ // eslint-disable-next-line no-self-compare -- NaN check
503
+ return number !== number || number === 0 ? 0 : trunc(number);
504
+ };
548
505
 
549
- var FunctionPrototype = Function.prototype;
550
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
551
- var getDescriptor = DESCRIPTORS$4 && Object.getOwnPropertyDescriptor;
506
+ var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
552
507
 
553
- var EXISTS = hasOwn$7(FunctionPrototype, 'name');
554
- // additional protection from minified / mangled / dropped function names
555
- var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
556
- var CONFIGURABLE = EXISTS && (!DESCRIPTORS$4 || (DESCRIPTORS$4 && getDescriptor(FunctionPrototype, 'name').configurable));
508
+ var max = Math.max;
509
+ var min$2 = Math.min;
557
510
 
558
- var functionName = {
559
- EXISTS: EXISTS,
560
- PROPER: PROPER,
561
- CONFIGURABLE: CONFIGURABLE
511
+ // Helper for a popular repeating case of the spec:
512
+ // Let integer be ? ToInteger(index).
513
+ // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
514
+ var toAbsoluteIndex$1 = function (index, length) {
515
+ var integer = toIntegerOrInfinity$1(index);
516
+ return integer < 0 ? max(integer + length, 0) : min$2(integer, length);
562
517
  };
563
518
 
564
- var uncurryThis$a = functionUncurryThis;
565
- var isCallable$8 = isCallable$e;
566
- var store$1 = sharedStore.exports;
567
-
568
- var functionToString = uncurryThis$a(Function.toString);
569
-
570
- // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
571
- if (!isCallable$8(store$1.inspectSource)) {
572
- store$1.inspectSource = function (it) {
573
- return functionToString(it);
574
- };
575
- }
519
+ var toIntegerOrInfinity = toIntegerOrInfinity$2;
576
520
 
577
- var inspectSource$1 = store$1.inspectSource;
521
+ var min$1 = Math.min;
578
522
 
579
- var global$7 = global$e;
580
- var isCallable$7 = isCallable$e;
523
+ // `ToLength` abstract operation
524
+ // https://tc39.es/ecma262/#sec-tolength
525
+ var toLength$2 = function (argument) {
526
+ var len = toIntegerOrInfinity(argument);
527
+ return len > 0 ? min$1(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
528
+ };
581
529
 
582
- var WeakMap$1 = global$7.WeakMap;
530
+ var toLength$1 = toLength$2;
583
531
 
584
- var weakMapBasicDetection = isCallable$7(WeakMap$1) && /native code/.test(String(WeakMap$1));
532
+ // `LengthOfArrayLike` abstract operation
533
+ // https://tc39.es/ecma262/#sec-lengthofarraylike
534
+ var lengthOfArrayLike$2 = function (obj) {
535
+ return toLength$1(obj.length);
536
+ };
585
537
 
586
- var shared$2 = shared$4;
587
- var uid = uid$2;
538
+ var toIndexedObject$4 = toIndexedObject$5;
539
+ var toAbsoluteIndex = toAbsoluteIndex$1;
540
+ var lengthOfArrayLike$1 = lengthOfArrayLike$2;
588
541
 
589
- var keys = shared$2('keys');
542
+ // `Array.prototype.{ indexOf, includes }` methods implementation
543
+ var createMethod = function (IS_INCLUDES) {
544
+ return function ($this, el, fromIndex) {
545
+ var O = toIndexedObject$4($this);
546
+ var length = lengthOfArrayLike$1(O);
547
+ if (length === 0) return !IS_INCLUDES && -1;
548
+ var index = toAbsoluteIndex(fromIndex, length);
549
+ var value;
550
+ // Array#includes uses SameValueZero equality algorithm
551
+ // eslint-disable-next-line no-self-compare -- NaN check
552
+ if (IS_INCLUDES && el !== el) while (length > index) {
553
+ value = O[index++];
554
+ // eslint-disable-next-line no-self-compare -- NaN check
555
+ if (value !== value) return true;
556
+ // Array#indexOf ignores holes, Array#includes - not
557
+ } else for (;length > index; index++) {
558
+ if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
559
+ } return !IS_INCLUDES && -1;
560
+ };
561
+ };
590
562
 
591
- var sharedKey$3 = function (key) {
592
- return keys[key] || (keys[key] = uid(key));
563
+ var arrayIncludes = {
564
+ // `Array.prototype.includes` method
565
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
566
+ includes: createMethod(true),
567
+ // `Array.prototype.indexOf` method
568
+ // https://tc39.es/ecma262/#sec-array.prototype.indexof
569
+ indexOf: createMethod(false)
593
570
  };
594
571
 
595
572
  var hiddenKeys$4 = {};
596
573
 
597
- var NATIVE_WEAK_MAP = weakMapBasicDetection;
598
- var global$6 = global$e;
599
- var isObject$4 = isObject$9;
600
- var createNonEnumerableProperty$3 = createNonEnumerableProperty$4;
601
- var hasOwn$6 = hasOwnProperty_1;
602
- var shared$1 = sharedStore.exports;
603
- var sharedKey$2 = sharedKey$3;
604
- var hiddenKeys$3 = hiddenKeys$4;
574
+ var uncurryThis$9 = functionUncurryThis;
575
+ var hasOwn$8 = hasOwnProperty_1;
576
+ var toIndexedObject$3 = toIndexedObject$5;
577
+ var indexOf = arrayIncludes.indexOf;
578
+ var hiddenKeys$3 = hiddenKeys$4;
579
+
580
+ var push$1 = uncurryThis$9([].push);
581
+
582
+ var objectKeysInternal = function (object, names) {
583
+ var O = toIndexedObject$3(object);
584
+ var i = 0;
585
+ var result = [];
586
+ var key;
587
+ for (key in O) !hasOwn$8(hiddenKeys$3, key) && hasOwn$8(O, key) && push$1(result, key);
588
+ // Don't enum bug & hidden keys
589
+ while (names.length > i) if (hasOwn$8(O, key = names[i++])) {
590
+ ~indexOf(result, key) || push$1(result, key);
591
+ }
592
+ return result;
593
+ };
594
+
595
+ // IE8- don't enum bug keys
596
+ var enumBugKeys$3 = [
597
+ 'constructor',
598
+ 'hasOwnProperty',
599
+ 'isPrototypeOf',
600
+ 'propertyIsEnumerable',
601
+ 'toLocaleString',
602
+ 'toString',
603
+ 'valueOf'
604
+ ];
605
+
606
+ var internalObjectKeys$1 = objectKeysInternal;
607
+ var enumBugKeys$2 = enumBugKeys$3;
608
+
609
+ // `Object.keys` method
610
+ // https://tc39.es/ecma262/#sec-object.keys
611
+ // eslint-disable-next-line es/no-object-keys -- safe
612
+ var objectKeys$2 = Object.keys || function keys(O) {
613
+ return internalObjectKeys$1(O, enumBugKeys$2);
614
+ };
615
+
616
+ var DESCRIPTORS$6 = descriptors;
617
+ var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
618
+ var definePropertyModule$3 = objectDefineProperty;
619
+ var anObject$4 = anObject$6;
620
+ var toIndexedObject$2 = toIndexedObject$5;
621
+ var objectKeys$1 = objectKeys$2;
622
+
623
+ // `Object.defineProperties` method
624
+ // https://tc39.es/ecma262/#sec-object.defineproperties
625
+ // eslint-disable-next-line es/no-object-defineproperties -- safe
626
+ objectDefineProperties.f = DESCRIPTORS$6 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
627
+ anObject$4(O);
628
+ var props = toIndexedObject$2(Properties);
629
+ var keys = objectKeys$1(Properties);
630
+ var length = keys.length;
631
+ var index = 0;
632
+ var key;
633
+ while (length > index) definePropertyModule$3.f(O, key = keys[index++], props[key]);
634
+ return O;
635
+ };
636
+
637
+ var getBuiltIn$1 = getBuiltIn$3;
638
+
639
+ var html$1 = getBuiltIn$1('document', 'documentElement');
640
+
641
+ var shared$1 = shared$3;
642
+ var uid = uid$2;
643
+
644
+ var keys = shared$1('keys');
645
+
646
+ var sharedKey$3 = function (key) {
647
+ return keys[key] || (keys[key] = uid(key));
648
+ };
649
+
650
+ /* global ActiveXObject -- old IE, WSH */
651
+ var anObject$3 = anObject$6;
652
+ var definePropertiesModule = objectDefineProperties;
653
+ var enumBugKeys$1 = enumBugKeys$3;
654
+ var hiddenKeys$2 = hiddenKeys$4;
655
+ var html = html$1;
656
+ var documentCreateElement$1 = documentCreateElement$2;
657
+ var sharedKey$2 = sharedKey$3;
658
+
659
+ var GT = '>';
660
+ var LT = '<';
661
+ var PROTOTYPE = 'prototype';
662
+ var SCRIPT = 'script';
663
+ var IE_PROTO$1 = sharedKey$2('IE_PROTO');
664
+
665
+ var EmptyConstructor = function () { /* empty */ };
666
+
667
+ var scriptTag = function (content) {
668
+ return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
669
+ };
670
+
671
+ // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
672
+ var NullProtoObjectViaActiveX = function (activeXDocument) {
673
+ activeXDocument.write(scriptTag(''));
674
+ activeXDocument.close();
675
+ var temp = activeXDocument.parentWindow.Object;
676
+ activeXDocument = null; // avoid memory leak
677
+ return temp;
678
+ };
679
+
680
+ // Create object with fake `null` prototype: use iframe Object with cleared prototype
681
+ var NullProtoObjectViaIFrame = function () {
682
+ // Thrash, waste and sodomy: IE GC bug
683
+ var iframe = documentCreateElement$1('iframe');
684
+ var JS = 'java' + SCRIPT + ':';
685
+ var iframeDocument;
686
+ iframe.style.display = 'none';
687
+ html.appendChild(iframe);
688
+ // https://github.com/zloirock/core-js/issues/475
689
+ iframe.src = String(JS);
690
+ iframeDocument = iframe.contentWindow.document;
691
+ iframeDocument.open();
692
+ iframeDocument.write(scriptTag('document.F=Object'));
693
+ iframeDocument.close();
694
+ return iframeDocument.F;
695
+ };
696
+
697
+ // Check for document.domain and active x support
698
+ // No need to use active x approach when document.domain is not set
699
+ // see https://github.com/es-shims/es5-shim/issues/150
700
+ // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
701
+ // avoid IE GC bug
702
+ var activeXDocument;
703
+ var NullProtoObject = function () {
704
+ try {
705
+ activeXDocument = new ActiveXObject('htmlfile');
706
+ } catch (error) { /* ignore */ }
707
+ NullProtoObject = typeof document != 'undefined'
708
+ ? document.domain && activeXDocument
709
+ ? NullProtoObjectViaActiveX(activeXDocument) // old IE
710
+ : NullProtoObjectViaIFrame()
711
+ : NullProtoObjectViaActiveX(activeXDocument); // WSH
712
+ var length = enumBugKeys$1.length;
713
+ while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys$1[length]];
714
+ return NullProtoObject();
715
+ };
716
+
717
+ hiddenKeys$2[IE_PROTO$1] = true;
718
+
719
+ // `Object.create` method
720
+ // https://tc39.es/ecma262/#sec-object.create
721
+ // eslint-disable-next-line es/no-object-create -- safe
722
+ var objectCreate = Object.create || function create(O, Properties) {
723
+ var result;
724
+ if (O !== null) {
725
+ EmptyConstructor[PROTOTYPE] = anObject$3(O);
726
+ result = new EmptyConstructor();
727
+ EmptyConstructor[PROTOTYPE] = null;
728
+ // add "__proto__" for Object.getPrototypeOf polyfill
729
+ result[IE_PROTO$1] = O;
730
+ } else result = NullProtoObject();
731
+ return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
732
+ };
733
+
734
+ var wellKnownSymbol$8 = wellKnownSymbol$a;
735
+ var create$1 = objectCreate;
736
+ var defineProperty$4 = objectDefineProperty.f;
737
+
738
+ var UNSCOPABLES = wellKnownSymbol$8('unscopables');
739
+ var ArrayPrototype = Array.prototype;
740
+
741
+ // Array.prototype[@@unscopables]
742
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
743
+ if (ArrayPrototype[UNSCOPABLES] === undefined) {
744
+ defineProperty$4(ArrayPrototype, UNSCOPABLES, {
745
+ configurable: true,
746
+ value: create$1(null)
747
+ });
748
+ }
749
+
750
+ // add a key to Array.prototype[@@unscopables]
751
+ var addToUnscopables$1 = function (key) {
752
+ ArrayPrototype[UNSCOPABLES][key] = true;
753
+ };
754
+
755
+ var iterators = {};
756
+
757
+ var global$4 = global$b;
758
+ var isCallable$8 = isCallable$e;
759
+
760
+ var WeakMap$1 = global$4.WeakMap;
761
+
762
+ var weakMapBasicDetection = isCallable$8(WeakMap$1) && /native code/.test(String(WeakMap$1));
763
+
764
+ var createPropertyDescriptor$3 = function (bitmap, value) {
765
+ return {
766
+ enumerable: !(bitmap & 1),
767
+ configurable: !(bitmap & 2),
768
+ writable: !(bitmap & 4),
769
+ value: value
770
+ };
771
+ };
772
+
773
+ var DESCRIPTORS$5 = descriptors;
774
+ var definePropertyModule$2 = objectDefineProperty;
775
+ var createPropertyDescriptor$2 = createPropertyDescriptor$3;
776
+
777
+ var createNonEnumerableProperty$4 = DESCRIPTORS$5 ? function (object, key, value) {
778
+ return definePropertyModule$2.f(object, key, createPropertyDescriptor$2(1, value));
779
+ } : function (object, key, value) {
780
+ object[key] = value;
781
+ return object;
782
+ };
783
+
784
+ var NATIVE_WEAK_MAP = weakMapBasicDetection;
785
+ var global$3 = global$b;
786
+ var isObject$4 = isObject$9;
787
+ var createNonEnumerableProperty$3 = createNonEnumerableProperty$4;
788
+ var hasOwn$7 = hasOwnProperty_1;
789
+ var shared = sharedStore.exports;
790
+ var sharedKey$1 = sharedKey$3;
791
+ var hiddenKeys$1 = hiddenKeys$4;
605
792
 
606
793
  var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
607
- var TypeError$1 = global$6.TypeError;
608
- var WeakMap = global$6.WeakMap;
794
+ var TypeError$1 = global$3.TypeError;
795
+ var WeakMap = global$3.WeakMap;
609
796
  var set, get, has;
610
797
 
611
798
  var enforce = function (it) {
@@ -621,39 +808,39 @@ var getterFor = function (TYPE) {
621
808
  };
622
809
  };
623
810
 
624
- if (NATIVE_WEAK_MAP || shared$1.state) {
625
- var store = shared$1.state || (shared$1.state = new WeakMap());
811
+ if (NATIVE_WEAK_MAP || shared.state) {
812
+ var store$1 = shared.state || (shared.state = new WeakMap());
626
813
  /* eslint-disable no-self-assign -- prototype methods protection */
627
- store.get = store.get;
628
- store.has = store.has;
629
- store.set = store.set;
814
+ store$1.get = store$1.get;
815
+ store$1.has = store$1.has;
816
+ store$1.set = store$1.set;
630
817
  /* eslint-enable no-self-assign -- prototype methods protection */
631
818
  set = function (it, metadata) {
632
- if (store.has(it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
819
+ if (store$1.has(it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
633
820
  metadata.facade = it;
634
- store.set(it, metadata);
821
+ store$1.set(it, metadata);
635
822
  return metadata;
636
823
  };
637
824
  get = function (it) {
638
- return store.get(it) || {};
825
+ return store$1.get(it) || {};
639
826
  };
640
827
  has = function (it) {
641
- return store.has(it);
828
+ return store$1.has(it);
642
829
  };
643
830
  } else {
644
- var STATE = sharedKey$2('state');
645
- hiddenKeys$3[STATE] = true;
831
+ var STATE = sharedKey$1('state');
832
+ hiddenKeys$1[STATE] = true;
646
833
  set = function (it, metadata) {
647
- if (hasOwn$6(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
834
+ if (hasOwn$7(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
648
835
  metadata.facade = it;
649
836
  createNonEnumerableProperty$3(it, STATE, metadata);
650
837
  return metadata;
651
838
  };
652
839
  get = function (it) {
653
- return hasOwn$6(it, STATE) ? it[STATE] : {};
840
+ return hasOwn$7(it, STATE) ? it[STATE] : {};
654
841
  };
655
842
  has = function (it) {
656
- return hasOwn$6(it, STATE);
843
+ return hasOwn$7(it, STATE);
657
844
  };
658
845
  }
659
846
 
@@ -665,68 +852,144 @@ var internalState = {
665
852
  getterFor: getterFor
666
853
  };
667
854
 
668
- var uncurryThis$9 = functionUncurryThis;
669
- var fails$a = fails$h;
670
- var isCallable$6 = isCallable$e;
671
- var hasOwn$5 = hasOwnProperty_1;
672
- var DESCRIPTORS$3 = descriptors;
673
- var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
674
- var inspectSource = inspectSource$1;
675
- var InternalStateModule$1 = internalState;
855
+ var objectGetOwnPropertyDescriptor = {};
676
856
 
677
- var enforceInternalState = InternalStateModule$1.enforce;
678
- var getInternalState$2 = InternalStateModule$1.get;
679
- var $String$2 = String;
680
- // eslint-disable-next-line es/no-object-defineproperty -- safe
681
- var defineProperty$4 = Object.defineProperty;
682
- var stringSlice$2 = uncurryThis$9(''.slice);
683
- var replace$1 = uncurryThis$9(''.replace);
684
- var join = uncurryThis$9([].join);
857
+ var objectPropertyIsEnumerable = {};
685
858
 
686
- var CONFIGURABLE_LENGTH = DESCRIPTORS$3 && !fails$a(function () {
687
- return defineProperty$4(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
688
- });
859
+ var $propertyIsEnumerable = {}.propertyIsEnumerable;
860
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
861
+ var getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor;
689
862
 
690
- var TEMPLATE = String(String).split('String');
863
+ // Nashorn ~ JDK8 bug
864
+ var NASHORN_BUG = getOwnPropertyDescriptor$2 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
691
865
 
692
- var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
693
- if (stringSlice$2($String$2(name), 0, 7) === 'Symbol(') {
694
- name = '[' + replace$1($String$2(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
695
- }
696
- if (options && options.getter) name = 'get ' + name;
697
- if (options && options.setter) name = 'set ' + name;
698
- if (!hasOwn$5(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
699
- if (DESCRIPTORS$3) defineProperty$4(value, 'name', { value: name, configurable: true });
700
- else value.name = name;
701
- }
702
- if (CONFIGURABLE_LENGTH && options && hasOwn$5(options, 'arity') && value.length !== options.arity) {
703
- defineProperty$4(value, 'length', { value: options.arity });
704
- }
705
- try {
706
- if (options && hasOwn$5(options, 'constructor') && options.constructor) {
707
- if (DESCRIPTORS$3) defineProperty$4(value, 'prototype', { writable: false });
708
- // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
709
- } else if (value.prototype) value.prototype = undefined;
866
+ // `Object.prototype.propertyIsEnumerable` method implementation
867
+ // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
868
+ objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
869
+ var descriptor = getOwnPropertyDescriptor$2(this, V);
870
+ return !!descriptor && descriptor.enumerable;
871
+ } : $propertyIsEnumerable;
872
+
873
+ var DESCRIPTORS$4 = descriptors;
874
+ var call$3 = functionCall;
875
+ var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
876
+ var createPropertyDescriptor$1 = createPropertyDescriptor$3;
877
+ var toIndexedObject$1 = toIndexedObject$5;
878
+ var toPropertyKey = toPropertyKey$2;
879
+ var hasOwn$6 = hasOwnProperty_1;
880
+ var IE8_DOM_DEFINE = ie8DomDefine;
881
+
882
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
883
+ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
884
+
885
+ // `Object.getOwnPropertyDescriptor` method
886
+ // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
887
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$4 ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
888
+ O = toIndexedObject$1(O);
889
+ P = toPropertyKey(P);
890
+ if (IE8_DOM_DEFINE) try {
891
+ return $getOwnPropertyDescriptor(O, P);
710
892
  } catch (error) { /* empty */ }
711
- var state = enforceInternalState(value);
712
- if (!hasOwn$5(state, 'source')) {
713
- state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
714
- } return value;
893
+ if (hasOwn$6(O, P)) return createPropertyDescriptor$1(!call$3(propertyIsEnumerableModule$1.f, O, P), O[P]);
715
894
  };
716
895
 
717
- // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
718
- // eslint-disable-next-line no-extend-native -- required
719
- Function.prototype.toString = makeBuiltIn$1(function toString() {
720
- return isCallable$6(this) && getInternalState$2(this).source || inspectSource(this);
721
- }, 'toString');
896
+ var makeBuiltIn$2 = {exports: {}};
722
897
 
723
- var isCallable$5 = isCallable$e;
724
- var definePropertyModule$2 = objectDefineProperty;
725
- var makeBuiltIn = makeBuiltIn$2.exports;
726
- var defineGlobalProperty$1 = defineGlobalProperty$3;
898
+ var DESCRIPTORS$3 = descriptors;
899
+ var hasOwn$5 = hasOwnProperty_1;
727
900
 
728
- var defineBuiltIn$4 = function (O, key, value, options) {
729
- if (!options) options = {};
901
+ var FunctionPrototype = Function.prototype;
902
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
903
+ var getDescriptor = DESCRIPTORS$3 && Object.getOwnPropertyDescriptor;
904
+
905
+ var EXISTS = hasOwn$5(FunctionPrototype, 'name');
906
+ // additional protection from minified / mangled / dropped function names
907
+ var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
908
+ var CONFIGURABLE = EXISTS && (!DESCRIPTORS$3 || (DESCRIPTORS$3 && getDescriptor(FunctionPrototype, 'name').configurable));
909
+
910
+ var functionName = {
911
+ EXISTS: EXISTS,
912
+ PROPER: PROPER,
913
+ CONFIGURABLE: CONFIGURABLE
914
+ };
915
+
916
+ var uncurryThis$8 = functionUncurryThis;
917
+ var isCallable$7 = isCallable$e;
918
+ var store = sharedStore.exports;
919
+
920
+ var functionToString = uncurryThis$8(Function.toString);
921
+
922
+ // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
923
+ if (!isCallable$7(store.inspectSource)) {
924
+ store.inspectSource = function (it) {
925
+ return functionToString(it);
926
+ };
927
+ }
928
+
929
+ var inspectSource$1 = store.inspectSource;
930
+
931
+ var uncurryThis$7 = functionUncurryThis;
932
+ var fails$7 = fails$e;
933
+ var isCallable$6 = isCallable$e;
934
+ var hasOwn$4 = hasOwnProperty_1;
935
+ var DESCRIPTORS$2 = descriptors;
936
+ var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
937
+ var inspectSource = inspectSource$1;
938
+ var InternalStateModule$1 = internalState;
939
+
940
+ var enforceInternalState = InternalStateModule$1.enforce;
941
+ var getInternalState$1 = InternalStateModule$1.get;
942
+ var $String$2 = String;
943
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
944
+ var defineProperty$3 = Object.defineProperty;
945
+ var stringSlice$1 = uncurryThis$7(''.slice);
946
+ var replace = uncurryThis$7(''.replace);
947
+ var join = uncurryThis$7([].join);
948
+
949
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$2 && !fails$7(function () {
950
+ return defineProperty$3(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
951
+ });
952
+
953
+ var TEMPLATE = String(String).split('String');
954
+
955
+ var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
956
+ if (stringSlice$1($String$2(name), 0, 7) === 'Symbol(') {
957
+ name = '[' + replace($String$2(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
958
+ }
959
+ if (options && options.getter) name = 'get ' + name;
960
+ if (options && options.setter) name = 'set ' + name;
961
+ if (!hasOwn$4(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
962
+ if (DESCRIPTORS$2) defineProperty$3(value, 'name', { value: name, configurable: true });
963
+ else value.name = name;
964
+ }
965
+ if (CONFIGURABLE_LENGTH && options && hasOwn$4(options, 'arity') && value.length !== options.arity) {
966
+ defineProperty$3(value, 'length', { value: options.arity });
967
+ }
968
+ try {
969
+ if (options && hasOwn$4(options, 'constructor') && options.constructor) {
970
+ if (DESCRIPTORS$2) defineProperty$3(value, 'prototype', { writable: false });
971
+ // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
972
+ } else if (value.prototype) value.prototype = undefined;
973
+ } catch (error) { /* empty */ }
974
+ var state = enforceInternalState(value);
975
+ if (!hasOwn$4(state, 'source')) {
976
+ state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
977
+ } return value;
978
+ };
979
+
980
+ // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
981
+ // eslint-disable-next-line no-extend-native -- required
982
+ Function.prototype.toString = makeBuiltIn$1(function toString() {
983
+ return isCallable$6(this) && getInternalState$1(this).source || inspectSource(this);
984
+ }, 'toString');
985
+
986
+ var isCallable$5 = isCallable$e;
987
+ var definePropertyModule$1 = objectDefineProperty;
988
+ var makeBuiltIn = makeBuiltIn$2.exports;
989
+ var defineGlobalProperty$1 = defineGlobalProperty$3;
990
+
991
+ var defineBuiltIn$4 = function (O, key, value, options) {
992
+ if (!options) options = {};
730
993
  var simple = options.enumerable;
731
994
  var name = options.name !== undefined ? options.name : key;
732
995
  if (isCallable$5(value)) makeBuiltIn(value, name, options);
@@ -739,7 +1002,7 @@ var defineBuiltIn$4 = function (O, key, value, options) {
739
1002
  else if (O[key]) simple = true;
740
1003
  } catch (error) { /* empty */ }
741
1004
  if (simple) O[key] = value;
742
- else definePropertyModule$2.f(O, key, {
1005
+ else definePropertyModule$1.f(O, key, {
743
1006
  value: value,
744
1007
  enumerable: false,
745
1008
  configurable: !options.nonConfigurable,
@@ -750,135 +1013,16 @@ var defineBuiltIn$4 = function (O, key, value, options) {
750
1013
 
751
1014
  var objectGetOwnPropertyNames = {};
752
1015
 
753
- var ceil = Math.ceil;
754
- var floor$1 = Math.floor;
755
-
756
- // `Math.trunc` method
757
- // https://tc39.es/ecma262/#sec-math.trunc
758
- // eslint-disable-next-line es/no-math-trunc -- safe
759
- var mathTrunc = Math.trunc || function trunc(x) {
760
- var n = +x;
761
- return (n > 0 ? floor$1 : ceil)(n);
762
- };
763
-
764
- var trunc = mathTrunc;
765
-
766
- // `ToIntegerOrInfinity` abstract operation
767
- // https://tc39.es/ecma262/#sec-tointegerorinfinity
768
- var toIntegerOrInfinity$2 = function (argument) {
769
- var number = +argument;
770
- // eslint-disable-next-line no-self-compare -- NaN check
771
- return number !== number || number === 0 ? 0 : trunc(number);
772
- };
773
-
774
- var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
775
-
776
- var max = Math.max;
777
- var min$2 = Math.min;
778
-
779
- // Helper for a popular repeating case of the spec:
780
- // Let integer be ? ToInteger(index).
781
- // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
782
- var toAbsoluteIndex$1 = function (index, length) {
783
- var integer = toIntegerOrInfinity$1(index);
784
- return integer < 0 ? max(integer + length, 0) : min$2(integer, length);
785
- };
786
-
787
- var toIntegerOrInfinity = toIntegerOrInfinity$2;
788
-
789
- var min$1 = Math.min;
790
-
791
- // `ToLength` abstract operation
792
- // https://tc39.es/ecma262/#sec-tolength
793
- var toLength$2 = function (argument) {
794
- var len = toIntegerOrInfinity(argument);
795
- return len > 0 ? min$1(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
796
- };
797
-
798
- var toLength$1 = toLength$2;
799
-
800
- // `LengthOfArrayLike` abstract operation
801
- // https://tc39.es/ecma262/#sec-lengthofarraylike
802
- var lengthOfArrayLike$2 = function (obj) {
803
- return toLength$1(obj.length);
804
- };
805
-
806
- var toIndexedObject$3 = toIndexedObject$5;
807
- var toAbsoluteIndex = toAbsoluteIndex$1;
808
- var lengthOfArrayLike$1 = lengthOfArrayLike$2;
809
-
810
- // `Array.prototype.{ indexOf, includes }` methods implementation
811
- var createMethod = function (IS_INCLUDES) {
812
- return function ($this, el, fromIndex) {
813
- var O = toIndexedObject$3($this);
814
- var length = lengthOfArrayLike$1(O);
815
- if (length === 0) return !IS_INCLUDES && -1;
816
- var index = toAbsoluteIndex(fromIndex, length);
817
- var value;
818
- // Array#includes uses SameValueZero equality algorithm
819
- // eslint-disable-next-line no-self-compare -- NaN check
820
- if (IS_INCLUDES && el !== el) while (length > index) {
821
- value = O[index++];
822
- // eslint-disable-next-line no-self-compare -- NaN check
823
- if (value !== value) return true;
824
- // Array#indexOf ignores holes, Array#includes - not
825
- } else for (;length > index; index++) {
826
- if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
827
- } return !IS_INCLUDES && -1;
828
- };
829
- };
830
-
831
- var arrayIncludes = {
832
- // `Array.prototype.includes` method
833
- // https://tc39.es/ecma262/#sec-array.prototype.includes
834
- includes: createMethod(true),
835
- // `Array.prototype.indexOf` method
836
- // https://tc39.es/ecma262/#sec-array.prototype.indexof
837
- indexOf: createMethod(false)
838
- };
839
-
840
- var uncurryThis$8 = functionUncurryThis;
841
- var hasOwn$4 = hasOwnProperty_1;
842
- var toIndexedObject$2 = toIndexedObject$5;
843
- var indexOf$1 = arrayIncludes.indexOf;
844
- var hiddenKeys$2 = hiddenKeys$4;
845
-
846
- var push$1 = uncurryThis$8([].push);
847
-
848
- var objectKeysInternal = function (object, names) {
849
- var O = toIndexedObject$2(object);
850
- var i = 0;
851
- var result = [];
852
- var key;
853
- for (key in O) !hasOwn$4(hiddenKeys$2, key) && hasOwn$4(O, key) && push$1(result, key);
854
- // Don't enum bug & hidden keys
855
- while (names.length > i) if (hasOwn$4(O, key = names[i++])) {
856
- ~indexOf$1(result, key) || push$1(result, key);
857
- }
858
- return result;
859
- };
860
-
861
- // IE8- don't enum bug keys
862
- var enumBugKeys$3 = [
863
- 'constructor',
864
- 'hasOwnProperty',
865
- 'isPrototypeOf',
866
- 'propertyIsEnumerable',
867
- 'toLocaleString',
868
- 'toString',
869
- 'valueOf'
870
- ];
871
-
872
- var internalObjectKeys$1 = objectKeysInternal;
873
- var enumBugKeys$2 = enumBugKeys$3;
1016
+ var internalObjectKeys = objectKeysInternal;
1017
+ var enumBugKeys = enumBugKeys$3;
874
1018
 
875
- var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
1019
+ var hiddenKeys = enumBugKeys.concat('length', 'prototype');
876
1020
 
877
1021
  // `Object.getOwnPropertyNames` method
878
1022
  // https://tc39.es/ecma262/#sec-object.getownpropertynames
879
1023
  // eslint-disable-next-line es/no-object-getownpropertynames -- safe
880
1024
  objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
881
- return internalObjectKeys$1(O, hiddenKeys$1);
1025
+ return internalObjectKeys(O, hiddenKeys);
882
1026
  };
883
1027
 
884
1028
  var objectGetOwnPropertySymbols = {};
@@ -886,17 +1030,17 @@ var objectGetOwnPropertySymbols = {};
886
1030
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
887
1031
  objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
888
1032
 
889
- var getBuiltIn$1 = getBuiltIn$3;
890
- var uncurryThis$7 = functionUncurryThis;
1033
+ var getBuiltIn = getBuiltIn$3;
1034
+ var uncurryThis$6 = functionUncurryThis;
891
1035
  var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
892
1036
  var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
893
- var anObject$4 = anObject$6;
1037
+ var anObject$2 = anObject$6;
894
1038
 
895
- var concat$1 = uncurryThis$7([].concat);
1039
+ var concat$1 = uncurryThis$6([].concat);
896
1040
 
897
1041
  // all object keys, includes non-enumerable and symbols
898
- var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
899
- var keys = getOwnPropertyNamesModule.f(anObject$4(it));
1042
+ var ownKeys$1 = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
1043
+ var keys = getOwnPropertyNamesModule.f(anObject$2(it));
900
1044
  var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
901
1045
  return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
902
1046
  };
@@ -904,11 +1048,11 @@ var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
904
1048
  var hasOwn$3 = hasOwnProperty_1;
905
1049
  var ownKeys = ownKeys$1;
906
1050
  var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
907
- var definePropertyModule$1 = objectDefineProperty;
1051
+ var definePropertyModule = objectDefineProperty;
908
1052
 
909
1053
  var copyConstructorProperties$1 = function (target, source, exceptions) {
910
1054
  var keys = ownKeys(source);
911
- var defineProperty = definePropertyModule$1.f;
1055
+ var defineProperty = definePropertyModule.f;
912
1056
  var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
913
1057
  for (var i = 0; i < keys.length; i++) {
914
1058
  var key = keys[i];
@@ -918,298 +1062,87 @@ var copyConstructorProperties$1 = function (target, source, exceptions) {
918
1062
  }
919
1063
  };
920
1064
 
921
- var fails$9 = fails$h;
922
- var isCallable$4 = isCallable$e;
923
-
924
- var replacement = /#|\.prototype\./;
925
-
926
- var isForced$1 = function (feature, detection) {
927
- var value = data[normalize(feature)];
928
- return value === POLYFILL ? true
929
- : value === NATIVE ? false
930
- : isCallable$4(detection) ? fails$9(detection)
931
- : !!detection;
932
- };
933
-
934
- var normalize = isForced$1.normalize = function (string) {
935
- return String(string).replace(replacement, '.').toLowerCase();
936
- };
937
-
938
- var data = isForced$1.data = {};
939
- var NATIVE = isForced$1.NATIVE = 'N';
940
- var POLYFILL = isForced$1.POLYFILL = 'P';
941
-
942
- var isForced_1 = isForced$1;
943
-
944
- var global$5 = global$e;
945
- var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
946
- var createNonEnumerableProperty$2 = createNonEnumerableProperty$4;
947
- var defineBuiltIn$3 = defineBuiltIn$4;
948
- var defineGlobalProperty = defineGlobalProperty$3;
949
- var copyConstructorProperties = copyConstructorProperties$1;
950
- var isForced = isForced_1;
951
-
952
- /*
953
- options.target - name of the target object
954
- options.global - target is the global object
955
- options.stat - export as static methods of target
956
- options.proto - export as prototype methods of target
957
- options.real - real prototype method for the `pure` version
958
- options.forced - export even if the native feature is available
959
- options.bind - bind methods to the target, required for the `pure` version
960
- options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
961
- options.unsafe - use the simple assignment of property instead of delete + defineProperty
962
- options.sham - add a flag to not completely full polyfills
963
- options.enumerable - export as enumerable property
964
- options.dontCallGetSet - prevent calling a getter on target
965
- options.name - the .name of the function if it does not match the key
966
- */
967
- var _export = function (options, source) {
968
- var TARGET = options.target;
969
- var GLOBAL = options.global;
970
- var STATIC = options.stat;
971
- var FORCED, target, key, targetProperty, sourceProperty, descriptor;
972
- if (GLOBAL) {
973
- target = global$5;
974
- } else if (STATIC) {
975
- target = global$5[TARGET] || defineGlobalProperty(TARGET, {});
976
- } else {
977
- target = global$5[TARGET] && global$5[TARGET].prototype;
978
- }
979
- if (target) for (key in source) {
980
- sourceProperty = source[key];
981
- if (options.dontCallGetSet) {
982
- descriptor = getOwnPropertyDescriptor$1(target, key);
983
- targetProperty = descriptor && descriptor.value;
984
- } else targetProperty = target[key];
985
- FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
986
- // contained in target
987
- if (!FORCED && targetProperty !== undefined) {
988
- if (typeof sourceProperty == typeof targetProperty) continue;
989
- copyConstructorProperties(sourceProperty, targetProperty);
990
- }
991
- // add a flag to not completely full polyfills
992
- if (options.sham || (targetProperty && targetProperty.sham)) {
993
- createNonEnumerableProperty$2(sourceProperty, 'sham', true);
994
- }
995
- defineBuiltIn$3(target, key, sourceProperty, options);
996
- }
997
- };
998
-
999
- var internalObjectKeys = objectKeysInternal;
1000
- var enumBugKeys$1 = enumBugKeys$3;
1001
-
1002
- // `Object.keys` method
1003
- // https://tc39.es/ecma262/#sec-object.keys
1004
- // eslint-disable-next-line es/no-object-keys -- safe
1005
- var objectKeys$2 = Object.keys || function keys(O) {
1006
- return internalObjectKeys(O, enumBugKeys$1);
1007
- };
1008
-
1009
- var DESCRIPTORS$2 = descriptors;
1010
- var uncurryThis$6 = functionUncurryThis;
1011
- var call$3 = functionCall;
1012
- var fails$8 = fails$h;
1013
- var objectKeys$1 = objectKeys$2;
1014
- var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1015
- var propertyIsEnumerableModule = objectPropertyIsEnumerable;
1016
- var toObject$2 = toObject$4;
1017
- var IndexedObject = indexedObject;
1018
-
1019
- // eslint-disable-next-line es/no-object-assign -- safe
1020
- var $assign = Object.assign;
1021
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1022
- var defineProperty$3 = Object.defineProperty;
1023
- var concat = uncurryThis$6([].concat);
1024
-
1025
- // `Object.assign` method
1026
- // https://tc39.es/ecma262/#sec-object.assign
1027
- var objectAssign = !$assign || fails$8(function () {
1028
- // should have correct order of operations (Edge bug)
1029
- if (DESCRIPTORS$2 && $assign({ b: 1 }, $assign(defineProperty$3({}, 'a', {
1030
- enumerable: true,
1031
- get: function () {
1032
- defineProperty$3(this, 'b', {
1033
- value: 3,
1034
- enumerable: false
1035
- });
1036
- }
1037
- }), { b: 2 })).b !== 1) return true;
1038
- // should work with symbols and should have deterministic property order (V8 bug)
1039
- var A = {};
1040
- var B = {};
1041
- // eslint-disable-next-line es/no-symbol -- safe
1042
- var symbol = Symbol('assign detection');
1043
- var alphabet = 'abcdefghijklmnopqrst';
1044
- A[symbol] = 7;
1045
- alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1046
- return $assign({}, A)[symbol] !== 7 || objectKeys$1($assign({}, B)).join('') !== alphabet;
1047
- }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
1048
- var T = toObject$2(target);
1049
- var argumentsLength = arguments.length;
1050
- var index = 1;
1051
- var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1052
- var propertyIsEnumerable = propertyIsEnumerableModule.f;
1053
- while (argumentsLength > index) {
1054
- var S = IndexedObject(arguments[index++]);
1055
- var keys = getOwnPropertySymbols ? concat(objectKeys$1(S), getOwnPropertySymbols(S)) : objectKeys$1(S);
1056
- var length = keys.length;
1057
- var j = 0;
1058
- var key;
1059
- while (length > j) {
1060
- key = keys[j++];
1061
- if (!DESCRIPTORS$2 || call$3(propertyIsEnumerable, S, key)) T[key] = S[key];
1062
- }
1063
- } return T;
1064
- } : $assign;
1065
-
1066
- var $$4 = _export;
1067
- var assign = objectAssign;
1068
-
1069
- // `Object.assign` method
1070
- // https://tc39.es/ecma262/#sec-object.assign
1071
- // eslint-disable-next-line es/no-object-assign -- required for testing
1072
- $$4({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1073
- assign: assign
1074
- });
1075
-
1076
- var objectDefineProperties = {};
1077
-
1078
- var DESCRIPTORS$1 = descriptors;
1079
- var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
1080
- var definePropertyModule = objectDefineProperty;
1081
- var anObject$3 = anObject$6;
1082
- var toIndexedObject$1 = toIndexedObject$5;
1083
- var objectKeys = objectKeys$2;
1084
-
1085
- // `Object.defineProperties` method
1086
- // https://tc39.es/ecma262/#sec-object.defineproperties
1087
- // eslint-disable-next-line es/no-object-defineproperties -- safe
1088
- objectDefineProperties.f = DESCRIPTORS$1 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1089
- anObject$3(O);
1090
- var props = toIndexedObject$1(Properties);
1091
- var keys = objectKeys(Properties);
1092
- var length = keys.length;
1093
- var index = 0;
1094
- var key;
1095
- while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
1096
- return O;
1097
- };
1098
-
1099
- var getBuiltIn = getBuiltIn$3;
1100
-
1101
- var html$1 = getBuiltIn('document', 'documentElement');
1102
-
1103
- /* global ActiveXObject -- old IE, WSH */
1104
- var anObject$2 = anObject$6;
1105
- var definePropertiesModule = objectDefineProperties;
1106
- var enumBugKeys = enumBugKeys$3;
1107
- var hiddenKeys = hiddenKeys$4;
1108
- var html = html$1;
1109
- var documentCreateElement$1 = documentCreateElement$2;
1110
- var sharedKey$1 = sharedKey$3;
1111
-
1112
- var GT = '>';
1113
- var LT = '<';
1114
- var PROTOTYPE = 'prototype';
1115
- var SCRIPT = 'script';
1116
- var IE_PROTO$1 = sharedKey$1('IE_PROTO');
1117
-
1118
- var EmptyConstructor = function () { /* empty */ };
1119
-
1120
- var scriptTag = function (content) {
1121
- return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
1122
- };
1123
-
1124
- // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
1125
- var NullProtoObjectViaActiveX = function (activeXDocument) {
1126
- activeXDocument.write(scriptTag(''));
1127
- activeXDocument.close();
1128
- var temp = activeXDocument.parentWindow.Object;
1129
- activeXDocument = null; // avoid memory leak
1130
- return temp;
1131
- };
1065
+ var fails$6 = fails$e;
1066
+ var isCallable$4 = isCallable$e;
1132
1067
 
1133
- // Create object with fake `null` prototype: use iframe Object with cleared prototype
1134
- var NullProtoObjectViaIFrame = function () {
1135
- // Thrash, waste and sodomy: IE GC bug
1136
- var iframe = documentCreateElement$1('iframe');
1137
- var JS = 'java' + SCRIPT + ':';
1138
- var iframeDocument;
1139
- iframe.style.display = 'none';
1140
- html.appendChild(iframe);
1141
- // https://github.com/zloirock/core-js/issues/475
1142
- iframe.src = String(JS);
1143
- iframeDocument = iframe.contentWindow.document;
1144
- iframeDocument.open();
1145
- iframeDocument.write(scriptTag('document.F=Object'));
1146
- iframeDocument.close();
1147
- return iframeDocument.F;
1148
- };
1068
+ var replacement = /#|\.prototype\./;
1149
1069
 
1150
- // Check for document.domain and active x support
1151
- // No need to use active x approach when document.domain is not set
1152
- // see https://github.com/es-shims/es5-shim/issues/150
1153
- // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
1154
- // avoid IE GC bug
1155
- var activeXDocument;
1156
- var NullProtoObject = function () {
1157
- try {
1158
- activeXDocument = new ActiveXObject('htmlfile');
1159
- } catch (error) { /* ignore */ }
1160
- NullProtoObject = typeof document != 'undefined'
1161
- ? document.domain && activeXDocument
1162
- ? NullProtoObjectViaActiveX(activeXDocument) // old IE
1163
- : NullProtoObjectViaIFrame()
1164
- : NullProtoObjectViaActiveX(activeXDocument); // WSH
1165
- var length = enumBugKeys.length;
1166
- while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
1167
- return NullProtoObject();
1070
+ var isForced$1 = function (feature, detection) {
1071
+ var value = data[normalize(feature)];
1072
+ return value === POLYFILL ? true
1073
+ : value === NATIVE ? false
1074
+ : isCallable$4(detection) ? fails$6(detection)
1075
+ : !!detection;
1168
1076
  };
1169
1077
 
1170
- hiddenKeys[IE_PROTO$1] = true;
1171
-
1172
- // `Object.create` method
1173
- // https://tc39.es/ecma262/#sec-object.create
1174
- // eslint-disable-next-line es/no-object-create -- safe
1175
- var objectCreate = Object.create || function create(O, Properties) {
1176
- var result;
1177
- if (O !== null) {
1178
- EmptyConstructor[PROTOTYPE] = anObject$2(O);
1179
- result = new EmptyConstructor();
1180
- EmptyConstructor[PROTOTYPE] = null;
1181
- // add "__proto__" for Object.getPrototypeOf polyfill
1182
- result[IE_PROTO$1] = O;
1183
- } else result = NullProtoObject();
1184
- return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
1078
+ var normalize = isForced$1.normalize = function (string) {
1079
+ return String(string).replace(replacement, '.').toLowerCase();
1185
1080
  };
1186
1081
 
1187
- var wellKnownSymbol$8 = wellKnownSymbol$a;
1188
- var create$2 = objectCreate;
1189
- var defineProperty$2 = objectDefineProperty.f;
1082
+ var data = isForced$1.data = {};
1083
+ var NATIVE = isForced$1.NATIVE = 'N';
1084
+ var POLYFILL = isForced$1.POLYFILL = 'P';
1190
1085
 
1191
- var UNSCOPABLES = wellKnownSymbol$8('unscopables');
1192
- var ArrayPrototype = Array.prototype;
1086
+ var isForced_1 = isForced$1;
1193
1087
 
1194
- // Array.prototype[@@unscopables]
1195
- // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1196
- if (ArrayPrototype[UNSCOPABLES] === undefined) {
1197
- defineProperty$2(ArrayPrototype, UNSCOPABLES, {
1198
- configurable: true,
1199
- value: create$2(null)
1200
- });
1201
- }
1088
+ var global$2 = global$b;
1089
+ var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
1090
+ var createNonEnumerableProperty$2 = createNonEnumerableProperty$4;
1091
+ var defineBuiltIn$3 = defineBuiltIn$4;
1092
+ var defineGlobalProperty = defineGlobalProperty$3;
1093
+ var copyConstructorProperties = copyConstructorProperties$1;
1094
+ var isForced = isForced_1;
1202
1095
 
1203
- // add a key to Array.prototype[@@unscopables]
1204
- var addToUnscopables$1 = function (key) {
1205
- ArrayPrototype[UNSCOPABLES][key] = true;
1096
+ /*
1097
+ options.target - name of the target object
1098
+ options.global - target is the global object
1099
+ options.stat - export as static methods of target
1100
+ options.proto - export as prototype methods of target
1101
+ options.real - real prototype method for the `pure` version
1102
+ options.forced - export even if the native feature is available
1103
+ options.bind - bind methods to the target, required for the `pure` version
1104
+ options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
1105
+ options.unsafe - use the simple assignment of property instead of delete + defineProperty
1106
+ options.sham - add a flag to not completely full polyfills
1107
+ options.enumerable - export as enumerable property
1108
+ options.dontCallGetSet - prevent calling a getter on target
1109
+ options.name - the .name of the function if it does not match the key
1110
+ */
1111
+ var _export = function (options, source) {
1112
+ var TARGET = options.target;
1113
+ var GLOBAL = options.global;
1114
+ var STATIC = options.stat;
1115
+ var FORCED, target, key, targetProperty, sourceProperty, descriptor;
1116
+ if (GLOBAL) {
1117
+ target = global$2;
1118
+ } else if (STATIC) {
1119
+ target = global$2[TARGET] || defineGlobalProperty(TARGET, {});
1120
+ } else {
1121
+ target = global$2[TARGET] && global$2[TARGET].prototype;
1122
+ }
1123
+ if (target) for (key in source) {
1124
+ sourceProperty = source[key];
1125
+ if (options.dontCallGetSet) {
1126
+ descriptor = getOwnPropertyDescriptor$1(target, key);
1127
+ targetProperty = descriptor && descriptor.value;
1128
+ } else targetProperty = target[key];
1129
+ FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
1130
+ // contained in target
1131
+ if (!FORCED && targetProperty !== undefined) {
1132
+ if (typeof sourceProperty == typeof targetProperty) continue;
1133
+ copyConstructorProperties(sourceProperty, targetProperty);
1134
+ }
1135
+ // add a flag to not completely full polyfills
1136
+ if (options.sham || (targetProperty && targetProperty.sham)) {
1137
+ createNonEnumerableProperty$2(sourceProperty, 'sham', true);
1138
+ }
1139
+ defineBuiltIn$3(target, key, sourceProperty, options);
1140
+ }
1206
1141
  };
1207
1142
 
1208
- var iterators = {};
1209
-
1210
- var fails$7 = fails$h;
1143
+ var fails$5 = fails$e;
1211
1144
 
1212
- var correctPrototypeGetter = !fails$7(function () {
1145
+ var correctPrototypeGetter = !fails$5(function () {
1213
1146
  function F() { /* empty */ }
1214
1147
  F.prototype.constructor = null;
1215
1148
  // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
@@ -1218,7 +1151,7 @@ var correctPrototypeGetter = !fails$7(function () {
1218
1151
 
1219
1152
  var hasOwn$2 = hasOwnProperty_1;
1220
1153
  var isCallable$3 = isCallable$e;
1221
- var toObject$1 = toObject$4;
1154
+ var toObject$2 = toObject$4;
1222
1155
  var sharedKey = sharedKey$3;
1223
1156
  var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
1224
1157
 
@@ -1230,7 +1163,7 @@ var ObjectPrototype = $Object$1.prototype;
1230
1163
  // https://tc39.es/ecma262/#sec-object.getprototypeof
1231
1164
  // eslint-disable-next-line es/no-object-getprototypeof -- safe
1232
1165
  var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf : function (O) {
1233
- var object = toObject$1(O);
1166
+ var object = toObject$2(O);
1234
1167
  if (hasOwn$2(object, IE_PROTO)) return object[IE_PROTO];
1235
1168
  var constructor = object.constructor;
1236
1169
  if (isCallable$3(constructor) && object instanceof constructor) {
@@ -1238,7 +1171,7 @@ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf :
1238
1171
  } return object instanceof $Object$1 ? ObjectPrototype : null;
1239
1172
  };
1240
1173
 
1241
- var fails$6 = fails$h;
1174
+ var fails$4 = fails$e;
1242
1175
  var isCallable$2 = isCallable$e;
1243
1176
  var isObject$3 = isObject$9;
1244
1177
  var getPrototypeOf$1 = objectGetPrototypeOf;
@@ -1263,7 +1196,7 @@ if ([].keys) {
1263
1196
  }
1264
1197
  }
1265
1198
 
1266
- var NEW_ITERATOR_PROTOTYPE = !isObject$3(IteratorPrototype$2) || fails$6(function () {
1199
+ var NEW_ITERATOR_PROTOTYPE = !isObject$3(IteratorPrototype$2) || fails$4(function () {
1267
1200
  var test = {};
1268
1201
  // FF44- legacy iterators case
1269
1202
  return IteratorPrototype$2[ITERATOR$2].call(test) !== test;
@@ -1284,7 +1217,7 @@ var iteratorsCore = {
1284
1217
  BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
1285
1218
  };
1286
1219
 
1287
- var defineProperty$1 = objectDefineProperty.f;
1220
+ var defineProperty$2 = objectDefineProperty.f;
1288
1221
  var hasOwn$1 = hasOwnProperty_1;
1289
1222
  var wellKnownSymbol$6 = wellKnownSymbol$a;
1290
1223
 
@@ -1293,12 +1226,12 @@ var TO_STRING_TAG$2 = wellKnownSymbol$6('toStringTag');
1293
1226
  var setToStringTag$3 = function (target, TAG, STATIC) {
1294
1227
  if (target && !STATIC) target = target.prototype;
1295
1228
  if (target && !hasOwn$1(target, TO_STRING_TAG$2)) {
1296
- defineProperty$1(target, TO_STRING_TAG$2, { configurable: true, value: TAG });
1229
+ defineProperty$2(target, TO_STRING_TAG$2, { configurable: true, value: TAG });
1297
1230
  }
1298
1231
  };
1299
1232
 
1300
1233
  var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
1301
- var create$1 = objectCreate;
1234
+ var create = objectCreate;
1302
1235
  var createPropertyDescriptor = createPropertyDescriptor$3;
1303
1236
  var setToStringTag$2 = setToStringTag$3;
1304
1237
  var Iterators$2 = iterators;
@@ -1307,7 +1240,7 @@ var returnThis$1 = function () { return this; };
1307
1240
 
1308
1241
  var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
1309
1242
  var TO_STRING_TAG = NAME + ' Iterator';
1310
- IteratorConstructor.prototype = create$1(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
1243
+ IteratorConstructor.prototype = create(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
1311
1244
  setToStringTag$2(IteratorConstructor, TO_STRING_TAG, false);
1312
1245
  Iterators$2[TO_STRING_TAG] = returnThis$1;
1313
1246
  return IteratorConstructor;
@@ -1478,14 +1411,14 @@ var toIndexedObject = toIndexedObject$5;
1478
1411
  var addToUnscopables = addToUnscopables$1;
1479
1412
  var Iterators = iterators;
1480
1413
  var InternalStateModule = internalState;
1481
- var defineProperty = objectDefineProperty.f;
1414
+ var defineProperty$1 = objectDefineProperty.f;
1482
1415
  var defineIterator = iteratorDefine;
1483
1416
  var createIterResultObject = createIterResultObject$1;
1484
- var DESCRIPTORS = descriptors;
1417
+ var DESCRIPTORS$1 = descriptors;
1485
1418
 
1486
1419
  var ARRAY_ITERATOR = 'Array Iterator';
1487
1420
  var setInternalState = InternalStateModule.set;
1488
- var getInternalState$1 = InternalStateModule.getterFor(ARRAY_ITERATOR);
1421
+ var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
1489
1422
 
1490
1423
  // `Array.prototype.entries` method
1491
1424
  // https://tc39.es/ecma262/#sec-array.prototype.entries
@@ -1507,7 +1440,7 @@ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind)
1507
1440
  // `%ArrayIteratorPrototype%.next` method
1508
1441
  // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
1509
1442
  }, function () {
1510
- var state = getInternalState$1(this);
1443
+ var state = getInternalState(this);
1511
1444
  var target = state.target;
1512
1445
  var index = state.index++;
1513
1446
  if (!target || index >= target.length) {
@@ -1531,10 +1464,91 @@ addToUnscopables('values');
1531
1464
  addToUnscopables('entries');
1532
1465
 
1533
1466
  // V8 ~ Chrome 45- bug
1534
- if (DESCRIPTORS && values.name !== 'values') try {
1535
- defineProperty(values, 'name', { value: 'values' });
1467
+ if (DESCRIPTORS$1 && values.name !== 'values') try {
1468
+ defineProperty$1(values, 'name', { value: 'values' });
1536
1469
  } catch (error) { /* empty */ }
1537
1470
 
1471
+ // iterable DOM collections
1472
+ // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
1473
+ var domIterables = {
1474
+ CSSRuleList: 0,
1475
+ CSSStyleDeclaration: 0,
1476
+ CSSValueList: 0,
1477
+ ClientRectList: 0,
1478
+ DOMRectList: 0,
1479
+ DOMStringList: 0,
1480
+ DOMTokenList: 1,
1481
+ DataTransferItemList: 0,
1482
+ FileList: 0,
1483
+ HTMLAllCollection: 0,
1484
+ HTMLCollection: 0,
1485
+ HTMLFormElement: 0,
1486
+ HTMLSelectElement: 0,
1487
+ MediaList: 0,
1488
+ MimeTypeArray: 0,
1489
+ NamedNodeMap: 0,
1490
+ NodeList: 1,
1491
+ PaintRequestList: 0,
1492
+ Plugin: 0,
1493
+ PluginArray: 0,
1494
+ SVGLengthList: 0,
1495
+ SVGNumberList: 0,
1496
+ SVGPathSegList: 0,
1497
+ SVGPointList: 0,
1498
+ SVGStringList: 0,
1499
+ SVGTransformList: 0,
1500
+ SourceBufferList: 0,
1501
+ StyleSheetList: 0,
1502
+ TextTrackCueList: 0,
1503
+ TextTrackList: 0,
1504
+ TouchList: 0
1505
+ };
1506
+
1507
+ // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
1508
+ var documentCreateElement = documentCreateElement$2;
1509
+
1510
+ var classList = documentCreateElement('span').classList;
1511
+ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
1512
+
1513
+ var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
1514
+
1515
+ var global$1 = global$b;
1516
+ var DOMIterables = domIterables;
1517
+ var DOMTokenListPrototype = domTokenListPrototype;
1518
+ var ArrayIteratorMethods = es_array_iterator;
1519
+ var createNonEnumerableProperty = createNonEnumerableProperty$4;
1520
+ var setToStringTag = setToStringTag$3;
1521
+ var wellKnownSymbol$4 = wellKnownSymbol$a;
1522
+
1523
+ var ITERATOR = wellKnownSymbol$4('iterator');
1524
+ var ArrayValues = ArrayIteratorMethods.values;
1525
+
1526
+ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
1527
+ if (CollectionPrototype) {
1528
+ // some Chrome versions have non-configurable methods on DOMTokenList
1529
+ if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
1530
+ createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
1531
+ } catch (error) {
1532
+ CollectionPrototype[ITERATOR] = ArrayValues;
1533
+ }
1534
+ setToStringTag(CollectionPrototype, COLLECTION_NAME, true);
1535
+ if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
1536
+ // some Chrome versions have non-configurable methods on DOMTokenList
1537
+ if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
1538
+ createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
1539
+ } catch (error) {
1540
+ CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
1541
+ }
1542
+ }
1543
+ }
1544
+ };
1545
+
1546
+ for (var COLLECTION_NAME in DOMIterables) {
1547
+ handlePrototype(global$1[COLLECTION_NAME] && global$1[COLLECTION_NAME].prototype, COLLECTION_NAME);
1548
+ }
1549
+
1550
+ handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
1551
+
1538
1552
  var tryToString = tryToString$2;
1539
1553
 
1540
1554
  var $TypeError$1 = TypeError;
@@ -1543,9 +1557,9 @@ var deletePropertyOrThrow$1 = function (O, P) {
1543
1557
  if (!delete O[P]) throw new $TypeError$1('Cannot delete property ' + tryToString(P) + ' of ' + tryToString(O));
1544
1558
  };
1545
1559
 
1546
- var wellKnownSymbol$4 = wellKnownSymbol$a;
1560
+ var wellKnownSymbol$3 = wellKnownSymbol$a;
1547
1561
 
1548
- var TO_STRING_TAG$1 = wellKnownSymbol$4('toStringTag');
1562
+ var TO_STRING_TAG$1 = wellKnownSymbol$3('toStringTag');
1549
1563
  var test$1 = {};
1550
1564
 
1551
1565
  test$1[TO_STRING_TAG$1] = 'z';
@@ -1555,9 +1569,9 @@ var toStringTagSupport = String(test$1) === '[object z]';
1555
1569
  var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1556
1570
  var isCallable = isCallable$e;
1557
1571
  var classofRaw$1 = classofRaw$2;
1558
- var wellKnownSymbol$3 = wellKnownSymbol$a;
1572
+ var wellKnownSymbol$2 = wellKnownSymbol$a;
1559
1573
 
1560
- var TO_STRING_TAG = wellKnownSymbol$3('toStringTag');
1574
+ var TO_STRING_TAG = wellKnownSymbol$2('toStringTag');
1561
1575
  var $Object = Object;
1562
1576
 
1563
1577
  // ES3 wrong here
@@ -1586,7 +1600,7 @@ var classof$1 = classof$2;
1586
1600
 
1587
1601
  var $String = String;
1588
1602
 
1589
- var toString$3 = function (argument) {
1603
+ var toString$2 = function (argument) {
1590
1604
  if (classof$1(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
1591
1605
  return $String(argument);
1592
1606
  };
@@ -1637,11 +1651,11 @@ var sort = function (array, comparefn) {
1637
1651
 
1638
1652
  var arraySort = sort;
1639
1653
 
1640
- var fails$5 = fails$h;
1654
+ var fails$3 = fails$e;
1641
1655
 
1642
1656
  var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) {
1643
1657
  var method = [][METHOD_NAME];
1644
- return !!method && fails$5(function () {
1658
+ return !!method && fails$3(function () {
1645
1659
  // eslint-disable-next-line no-useless-call -- required for testing
1646
1660
  method.call(null, argument || function () { return 1; }, 1);
1647
1661
  });
@@ -1666,11 +1680,11 @@ var engineWebkitVersion = !!webkit && +webkit[1];
1666
1680
  var $$2 = _export;
1667
1681
  var uncurryThis$3 = functionUncurryThis;
1668
1682
  var aCallable = aCallable$3;
1669
- var toObject = toObject$4;
1683
+ var toObject$1 = toObject$4;
1670
1684
  var lengthOfArrayLike = lengthOfArrayLike$2;
1671
1685
  var deletePropertyOrThrow = deletePropertyOrThrow$1;
1672
- var toString$2 = toString$3;
1673
- var fails$4 = fails$h;
1686
+ var toString$1 = toString$2;
1687
+ var fails$2 = fails$e;
1674
1688
  var internalSort = arraySort;
1675
1689
  var arrayMethodIsStrict = arrayMethodIsStrict$1;
1676
1690
  var FF = engineFfVersion;
@@ -1683,17 +1697,17 @@ var nativeSort = uncurryThis$3(test.sort);
1683
1697
  var push = uncurryThis$3(test.push);
1684
1698
 
1685
1699
  // IE8-
1686
- var FAILS_ON_UNDEFINED = fails$4(function () {
1700
+ var FAILS_ON_UNDEFINED = fails$2(function () {
1687
1701
  test.sort(undefined);
1688
1702
  });
1689
1703
  // V8 bug
1690
- var FAILS_ON_NULL = fails$4(function () {
1704
+ var FAILS_ON_NULL = fails$2(function () {
1691
1705
  test.sort(null);
1692
1706
  });
1693
1707
  // Old WebKit
1694
1708
  var STRICT_METHOD = arrayMethodIsStrict('sort');
1695
1709
 
1696
- var STABLE_SORT = !fails$4(function () {
1710
+ var STABLE_SORT = !fails$2(function () {
1697
1711
  // feature detection can be too slow, so check engines versions
1698
1712
  if (V8) return V8 < 70;
1699
1713
  if (FF && FF > 3) return;
@@ -1735,7 +1749,7 @@ var getSortCompare = function (comparefn) {
1735
1749
  if (y === undefined) return -1;
1736
1750
  if (x === undefined) return 1;
1737
1751
  if (comparefn !== undefined) return +comparefn(x, y) || 0;
1738
- return toString$2(x) > toString$2(y) ? 1 : -1;
1752
+ return toString$1(x) > toString$1(y) ? 1 : -1;
1739
1753
  };
1740
1754
  };
1741
1755
 
@@ -1745,7 +1759,7 @@ $$2({ target: 'Array', proto: true, forced: FORCED }, {
1745
1759
  sort: function sort(comparefn) {
1746
1760
  if (comparefn !== undefined) aCallable(comparefn);
1747
1761
 
1748
- var array = toObject(this);
1762
+ var array = toObject$1(this);
1749
1763
 
1750
1764
  if (STABLE_SORT) return comparefn === undefined ? nativeSort(array) : nativeSort(array, comparefn);
1751
1765
 
@@ -1757,23 +1771,90 @@ $$2({ target: 'Array', proto: true, forced: FORCED }, {
1757
1771
  if (index in array) push(items, array[index]);
1758
1772
  }
1759
1773
 
1760
- internalSort(items, getSortCompare(comparefn));
1761
-
1762
- itemsLength = lengthOfArrayLike(items);
1763
- index = 0;
1764
-
1765
- while (index < itemsLength) array[index] = items[index++];
1766
- while (index < arrayLength) deletePropertyOrThrow(array, index++);
1774
+ internalSort(items, getSortCompare(comparefn));
1775
+
1776
+ itemsLength = lengthOfArrayLike(items);
1777
+ index = 0;
1778
+
1779
+ while (index < itemsLength) array[index] = items[index++];
1780
+ while (index < arrayLength) deletePropertyOrThrow(array, index++);
1781
+
1782
+ return array;
1783
+ }
1784
+ });
1785
+
1786
+ var DESCRIPTORS = descriptors;
1787
+ var uncurryThis$2 = functionUncurryThis;
1788
+ var call$1 = functionCall;
1789
+ var fails$1 = fails$e;
1790
+ var objectKeys = objectKeys$2;
1791
+ var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1792
+ var propertyIsEnumerableModule = objectPropertyIsEnumerable;
1793
+ var toObject = toObject$4;
1794
+ var IndexedObject = indexedObject;
1795
+
1796
+ // eslint-disable-next-line es/no-object-assign -- safe
1797
+ var $assign = Object.assign;
1798
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1799
+ var defineProperty = Object.defineProperty;
1800
+ var concat = uncurryThis$2([].concat);
1801
+
1802
+ // `Object.assign` method
1803
+ // https://tc39.es/ecma262/#sec-object.assign
1804
+ var objectAssign = !$assign || fails$1(function () {
1805
+ // should have correct order of operations (Edge bug)
1806
+ if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
1807
+ enumerable: true,
1808
+ get: function () {
1809
+ defineProperty(this, 'b', {
1810
+ value: 3,
1811
+ enumerable: false
1812
+ });
1813
+ }
1814
+ }), { b: 2 })).b !== 1) return true;
1815
+ // should work with symbols and should have deterministic property order (V8 bug)
1816
+ var A = {};
1817
+ var B = {};
1818
+ // eslint-disable-next-line es/no-symbol -- safe
1819
+ var symbol = Symbol('assign detection');
1820
+ var alphabet = 'abcdefghijklmnopqrst';
1821
+ A[symbol] = 7;
1822
+ alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1823
+ return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;
1824
+ }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
1825
+ var T = toObject(target);
1826
+ var argumentsLength = arguments.length;
1827
+ var index = 1;
1828
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1829
+ var propertyIsEnumerable = propertyIsEnumerableModule.f;
1830
+ while (argumentsLength > index) {
1831
+ var S = IndexedObject(arguments[index++]);
1832
+ var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
1833
+ var length = keys.length;
1834
+ var j = 0;
1835
+ var key;
1836
+ while (length > j) {
1837
+ key = keys[j++];
1838
+ if (!DESCRIPTORS || call$1(propertyIsEnumerable, S, key)) T[key] = S[key];
1839
+ }
1840
+ } return T;
1841
+ } : $assign;
1842
+
1843
+ var $$1 = _export;
1844
+ var assign = objectAssign;
1767
1845
 
1768
- return array;
1769
- }
1846
+ // `Object.assign` method
1847
+ // https://tc39.es/ecma262/#sec-object.assign
1848
+ // eslint-disable-next-line es/no-object-assign -- required for testing
1849
+ $$1({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1850
+ assign: assign
1770
1851
  });
1771
1852
 
1772
1853
  var anObject$1 = anObject$6;
1773
1854
 
1774
1855
  // `RegExp.prototype.flags` getter implementation
1775
1856
  // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
1776
- var regexpFlags$1 = function () {
1857
+ var regexpFlags = function () {
1777
1858
  var that = anObject$1(this);
1778
1859
  var result = '';
1779
1860
  if (that.hasIndices) result += 'd';
@@ -1787,31 +1868,31 @@ var regexpFlags$1 = function () {
1787
1868
  return result;
1788
1869
  };
1789
1870
 
1790
- var call$1 = functionCall;
1871
+ var call = functionCall;
1791
1872
  var hasOwn = hasOwnProperty_1;
1792
1873
  var isPrototypeOf = objectIsPrototypeOf;
1793
- var regExpFlags = regexpFlags$1;
1874
+ var regExpFlags = regexpFlags;
1794
1875
 
1795
1876
  var RegExpPrototype$1 = RegExp.prototype;
1796
1877
 
1797
1878
  var regexpGetFlags = function (R) {
1798
1879
  var flags = R.flags;
1799
1880
  return flags === undefined && !('flags' in RegExpPrototype$1) && !hasOwn(R, 'flags') && isPrototypeOf(RegExpPrototype$1, R)
1800
- ? call$1(regExpFlags, R) : flags;
1881
+ ? call(regExpFlags, R) : flags;
1801
1882
  };
1802
1883
 
1803
1884
  var PROPER_FUNCTION_NAME = functionName.PROPER;
1804
1885
  var defineBuiltIn = defineBuiltIn$4;
1805
1886
  var anObject = anObject$6;
1806
- var $toString = toString$3;
1807
- var fails$3 = fails$h;
1887
+ var $toString = toString$2;
1888
+ var fails = fails$e;
1808
1889
  var getRegExpFlags = regexpGetFlags;
1809
1890
 
1810
1891
  var TO_STRING = 'toString';
1811
1892
  var RegExpPrototype = RegExp.prototype;
1812
1893
  var nativeToString = RegExpPrototype[TO_STRING];
1813
1894
 
1814
- var NOT_GENERIC = fails$3(function () { return nativeToString.call({ source: 'a', flags: 'b' }) !== '/a/b'; });
1895
+ var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) !== '/a/b'; });
1815
1896
  // FF44- RegExp#toString has a wrong name
1816
1897
  var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name !== TO_STRING;
1817
1898
 
@@ -1827,20 +1908,20 @@ if (NOT_GENERIC || INCORRECT_NAME) {
1827
1908
  }
1828
1909
 
1829
1910
  var classofRaw = classofRaw$2;
1830
- var uncurryThis$2 = functionUncurryThis;
1911
+ var uncurryThis$1 = functionUncurryThis;
1831
1912
 
1832
1913
  var functionUncurryThisClause = function (fn) {
1833
1914
  // Nashorn bug:
1834
1915
  // https://github.com/zloirock/core-js/issues/1128
1835
1916
  // https://github.com/zloirock/core-js/issues/1130
1836
- if (classofRaw(fn) === 'Function') return uncurryThis$2(fn);
1917
+ if (classofRaw(fn) === 'Function') return uncurryThis$1(fn);
1837
1918
  };
1838
1919
 
1839
1920
  var isObject = isObject$9;
1840
1921
  var classof = classofRaw$2;
1841
- var wellKnownSymbol$2 = wellKnownSymbol$a;
1922
+ var wellKnownSymbol$1 = wellKnownSymbol$a;
1842
1923
 
1843
- var MATCH$1 = wellKnownSymbol$2('match');
1924
+ var MATCH$1 = wellKnownSymbol$1('match');
1844
1925
 
1845
1926
  // `IsRegExp` abstract operation
1846
1927
  // https://tc39.es/ecma262/#sec-isregexp
@@ -1859,9 +1940,9 @@ var notARegexp = function (it) {
1859
1940
  } return it;
1860
1941
  };
1861
1942
 
1862
- var wellKnownSymbol$1 = wellKnownSymbol$a;
1943
+ var wellKnownSymbol = wellKnownSymbol$a;
1863
1944
 
1864
- var MATCH = wellKnownSymbol$1('match');
1945
+ var MATCH = wellKnownSymbol('match');
1865
1946
 
1866
1947
  var correctIsRegexpLogic = function (METHOD_NAME) {
1867
1948
  var regexp = /./;
@@ -1875,16 +1956,16 @@ var correctIsRegexpLogic = function (METHOD_NAME) {
1875
1956
  } return false;
1876
1957
  };
1877
1958
 
1878
- var $$1 = _export;
1879
- var uncurryThis$1 = functionUncurryThisClause;
1959
+ var $ = _export;
1960
+ var uncurryThis = functionUncurryThisClause;
1880
1961
  var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
1881
1962
  var toLength = toLength$2;
1882
- var toString$1 = toString$3;
1963
+ var toString = toString$2;
1883
1964
  var notARegExp = notARegexp;
1884
1965
  var requireObjectCoercible = requireObjectCoercible$4;
1885
1966
  var correctIsRegExpLogic = correctIsRegexpLogic;
1886
1967
 
1887
- var stringSlice$1 = uncurryThis$1(''.slice);
1968
+ var stringSlice = uncurryThis(''.slice);
1888
1969
  var min = Math.min;
1889
1970
 
1890
1971
  var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');
@@ -1896,97 +1977,16 @@ var MDN_POLYFILL_BUG = !CORRECT_IS_REGEXP_LOGIC && !!function () {
1896
1977
 
1897
1978
  // `String.prototype.startsWith` method
1898
1979
  // https://tc39.es/ecma262/#sec-string.prototype.startswith
1899
- $$1({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
1980
+ $({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
1900
1981
  startsWith: function startsWith(searchString /* , position = 0 */) {
1901
- var that = toString$1(requireObjectCoercible(this));
1982
+ var that = toString(requireObjectCoercible(this));
1902
1983
  notARegExp(searchString);
1903
1984
  var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length));
1904
- var search = toString$1(searchString);
1905
- return stringSlice$1(that, index, index + search.length) === search;
1985
+ var search = toString(searchString);
1986
+ return stringSlice(that, index, index + search.length) === search;
1906
1987
  }
1907
1988
  });
1908
1989
 
1909
- // iterable DOM collections
1910
- // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
1911
- var domIterables = {
1912
- CSSRuleList: 0,
1913
- CSSStyleDeclaration: 0,
1914
- CSSValueList: 0,
1915
- ClientRectList: 0,
1916
- DOMRectList: 0,
1917
- DOMStringList: 0,
1918
- DOMTokenList: 1,
1919
- DataTransferItemList: 0,
1920
- FileList: 0,
1921
- HTMLAllCollection: 0,
1922
- HTMLCollection: 0,
1923
- HTMLFormElement: 0,
1924
- HTMLSelectElement: 0,
1925
- MediaList: 0,
1926
- MimeTypeArray: 0,
1927
- NamedNodeMap: 0,
1928
- NodeList: 1,
1929
- PaintRequestList: 0,
1930
- Plugin: 0,
1931
- PluginArray: 0,
1932
- SVGLengthList: 0,
1933
- SVGNumberList: 0,
1934
- SVGPathSegList: 0,
1935
- SVGPointList: 0,
1936
- SVGStringList: 0,
1937
- SVGTransformList: 0,
1938
- SourceBufferList: 0,
1939
- StyleSheetList: 0,
1940
- TextTrackCueList: 0,
1941
- TextTrackList: 0,
1942
- TouchList: 0
1943
- };
1944
-
1945
- // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
1946
- var documentCreateElement = documentCreateElement$2;
1947
-
1948
- var classList = documentCreateElement('span').classList;
1949
- var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
1950
-
1951
- var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
1952
-
1953
- var global$4 = global$e;
1954
- var DOMIterables = domIterables;
1955
- var DOMTokenListPrototype = domTokenListPrototype;
1956
- var ArrayIteratorMethods = es_array_iterator;
1957
- var createNonEnumerableProperty = createNonEnumerableProperty$4;
1958
- var setToStringTag = setToStringTag$3;
1959
- var wellKnownSymbol = wellKnownSymbol$a;
1960
-
1961
- var ITERATOR = wellKnownSymbol('iterator');
1962
- var ArrayValues = ArrayIteratorMethods.values;
1963
-
1964
- var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
1965
- if (CollectionPrototype) {
1966
- // some Chrome versions have non-configurable methods on DOMTokenList
1967
- if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
1968
- createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
1969
- } catch (error) {
1970
- CollectionPrototype[ITERATOR] = ArrayValues;
1971
- }
1972
- setToStringTag(CollectionPrototype, COLLECTION_NAME, true);
1973
- if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
1974
- // some Chrome versions have non-configurable methods on DOMTokenList
1975
- if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
1976
- createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
1977
- } catch (error) {
1978
- CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
1979
- }
1980
- }
1981
- }
1982
- };
1983
-
1984
- for (var COLLECTION_NAME in DOMIterables) {
1985
- handlePrototype(global$4[COLLECTION_NAME] && global$4[COLLECTION_NAME].prototype, COLLECTION_NAME);
1986
- }
1987
-
1988
- handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
1989
-
1990
1990
  const FormGroupContext = /*#__PURE__*/createContext({});
1991
1991
  /**
1992
1992
  * context interface to be used isolated or with the context provider
@@ -2035,6 +2035,11 @@ const IsolatedContext = ({
2035
2035
  function submitMultipleFormsByIndex(indexes) {
2036
2036
  return formGroupInstance.current.submitMultipleFormsByIndex(indexes);
2037
2037
  }
2038
+ // useEffect(() => {
2039
+ // return () => {
2040
+ // formGroupInstance.current.destroy();
2041
+ // };
2042
+ // }, []);
2038
2043
  return {
2039
2044
  addFormWithIndex,
2040
2045
  addForm,
@@ -2104,11 +2109,12 @@ const useFormGroupContext = props => {
2104
2109
  const FieldWrapperComponentRender = ({
2105
2110
  props,
2106
2111
  fieldInstance,
2107
- children
2112
+ children,
2113
+ mapper
2108
2114
  }) => {
2109
2115
  var _a, _b, _c;
2110
- const Component = (_a = fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.mapper) === null || _a === void 0 ? void 0 : _a.component;
2111
- const Asynccomponent = (_b = fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.mapper) === null || _b === void 0 ? void 0 : _b.asynccomponent;
2116
+ const Component = (mapper === null || mapper === void 0 ? void 0 : mapper.component) || ((_a = fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.mapper) === null || _a === void 0 ? void 0 : _a.component);
2117
+ const Asynccomponent = (mapper === null || mapper === void 0 ? void 0 : mapper.asynccomponent) || ((_b = fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.mapper) === null || _b === void 0 ? void 0 : _b.asynccomponent);
2112
2118
  if (Component) return jsx(Component, Object.assign({}, props, {
2113
2119
  children: children && children
2114
2120
  }));
@@ -2133,7 +2139,10 @@ const FieldWrapper = ({
2133
2139
  formIndex,
2134
2140
  children,
2135
2141
  props,
2136
- context
2142
+ context,
2143
+ mounted,
2144
+ mapper,
2145
+ visibility
2137
2146
  }) => {
2138
2147
  var _a, _b, _c;
2139
2148
  const localContext = useFormGroupContext({});
@@ -2144,20 +2153,34 @@ const FieldWrapper = ({
2144
2153
  formGroupInstance,
2145
2154
  debugMode
2146
2155
  } = useMemo(() => context ? context : localContext, [context, localContext]);
2147
- const fieldInstance = useRef((_a = formGroupInstance.getForm({
2148
- key: formIndex
2149
- })) === null || _a === void 0 ? void 0 : _a.getField({
2150
- key: name
2151
- })).current;
2152
- const [valueState, setValueState] = useState((fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.stateValue) || {});
2156
+ const fieldInstance = useMemo(() => {
2157
+ var _a;
2158
+ return (_a = formGroupInstance.getForm({
2159
+ key: formIndex
2160
+ })) === null || _a === void 0 ? void 0 : _a.getField({
2161
+ key: name
2162
+ });
2163
+ }, [mounted]);
2164
+ const filteredProps = useMemo(() => {
2165
+ let returnProps = {};
2166
+ if (props) {
2167
+ returnProps = FormField.filterProps(props);
2168
+ }
2169
+ if (fieldInstance) fieldInstance.props = returnProps;
2170
+ return returnProps;
2171
+ }, [props]);
2172
+ const [valueState, setValueState] = useState((fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.stateValue) || {
2173
+ [((_a = mapper === null || mapper === void 0 ? void 0 : mapper.events) === null || _a === void 0 ? void 0 : _a.setValue) || 'value']: ''
2174
+ });
2153
2175
  const [state, setState] = useState({
2154
- visibility: fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.visibility,
2155
- props: (fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.props) || props
2176
+ visibility: typeof visibility === 'boolean' ? visibility : true,
2177
+ props: filteredProps
2156
2178
  });
2157
2179
  /**
2158
2180
  * handles the mounting and unmounting logic onto the field instance
2159
2181
  */
2160
2182
  useEffect(() => {
2183
+ if (!mounted) return;
2161
2184
  fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.mountField({
2162
2185
  valueSubscription: value => {
2163
2186
  setValueState(value);
@@ -2175,33 +2198,34 @@ const FieldWrapper = ({
2175
2198
  }
2176
2199
  });
2177
2200
  return () => {
2178
- fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.destroyField();
2201
+ mounted && (fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.destroyField());
2179
2202
  };
2180
- }, []);
2203
+ }, [mounted]);
2181
2204
  /**
2182
2205
  * handles the value change onto the field instance
2183
2206
  */
2184
2207
  const handleChange = useCallback(event => {
2208
+ if (!mounted) return;
2185
2209
  fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.emitValue({
2186
2210
  value: event,
2187
2211
  event: 'ON_FIELD_CHANGE'
2188
2212
  });
2189
- }, []);
2213
+ }, [mounted]);
2190
2214
  /**
2191
2215
  * handles the event emission onto the field instance
2192
2216
  */
2193
2217
  const handleEvent = useCallback(event => {
2218
+ if (!mounted) return;
2194
2219
  fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.emitEvents({
2195
2220
  event
2196
2221
  });
2197
- }, []);
2222
+ }, [mounted]);
2198
2223
  /**
2199
2224
  * handles the mappers configuration to bind the event submission callback
2200
2225
  * to the corresponding prop defined on the mappers
2201
2226
  */
2202
2227
  const mapProps = useMemo(() => {
2203
- var _a;
2204
- const events = (_a = fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.mapper) === null || _a === void 0 ? void 0 : _a.events;
2228
+ const events = mapper === null || mapper === void 0 ? void 0 : mapper.events;
2205
2229
  const props = {};
2206
2230
  if (events === null || events === void 0 ? void 0 : events.onBlur) props[events.onBlur] = () => handleEvent('ON_FIELD_BLUR');
2207
2231
  if (events === null || events === void 0 ? void 0 : events.getValue) props[events.getValue] = handleChange;
@@ -2211,8 +2235,8 @@ const FieldWrapper = ({
2211
2235
  if (events === null || events === void 0 ? void 0 : events.onKeyUp) props[events.onKeyUp] = () => handleEvent('ON_FIELD_KEYUP');
2212
2236
  if (events === null || events === void 0 ? void 0 : events.onKeyDown) props[events.onKeyDown] = () => handleEvent('ON_FIELD_KEYDOWN');
2213
2237
  return props;
2214
- }, []);
2215
- return (state === null || state === void 0 ? void 0 : state.visibility) ? jsxs(Fragment, {
2238
+ }, [mounted]);
2239
+ return state.visibility ? jsxs(Fragment, {
2216
2240
  children: [debugMode && jsxs("div", {
2217
2241
  style: {
2218
2242
  width: '100%',
@@ -2241,103 +2265,34 @@ const FieldWrapper = ({
2241
2265
  }), jsx(FieldWrapperComponentRender, {
2242
2266
  props: Object.assign(Object.assign(Object.assign(Object.assign({}, mapProps), state.props), state.errors), valueState),
2243
2267
  fieldInstance: fieldInstance,
2268
+ mapper: mapper,
2244
2269
  children: children ? children : ((_c = state === null || state === void 0 ? void 0 : state.props) === null || _c === void 0 ? void 0 : _c.children) ? state === null || state === void 0 ? void 0 : state.props.children : null
2245
2270
  })]
2246
2271
  }) : jsx(Fragment, {});
2247
2272
  };
2248
2273
 
2249
- /**
2250
- * recursive function to transform form fields from a form instance into
2251
- * a react component tree
2252
- *
2253
- * @param {Map<string,IFormField>} param.fields form instance field Map
2254
- * @param {string} param.prevPath previous field path to track the tree branch creation
2255
- * @param {string} param.formIndex form index to aid field identification onto the FieldWrapper
2256
- * @returns {ReactNode}
2257
- */
2258
- const BuildTree = ({
2259
- fields,
2260
- prevPath,
2261
- formIndex
2274
+ const BuildSchemaAsFields = ({
2275
+ components,
2276
+ mappers,
2277
+ formIndex,
2278
+ mountedForm
2262
2279
  }) => {
2263
- return Array.from(fields).sort(([, field], [, field2]) => {
2264
- var _a, _b;
2265
- return (((_a = field.originalSchema) === null || _a === void 0 ? void 0 : _a.order) || 0) - (((_b = field2.originalSchema) === null || _b === void 0 ? void 0 : _b.order) || 0);
2266
- }).filter(([, value]) => {
2267
- return value.path === prevPath;
2268
- }).map(([, value]) => {
2269
- const fieldName = value.name;
2270
- const children = BuildTree({
2271
- fields,
2272
- prevPath: `${prevPath ? `${prevPath}.` : ``}${value.name}`,
2273
- formIndex
2274
- });
2275
- const lenght = Children.count(children);
2276
- return jsx(FieldWrapper, {
2277
- name: fieldName,
2280
+ return components && components.map(component => {
2281
+ const mapper = mappers === null || mappers === void 0 ? void 0 : mappers.find(el => el.componentName === component.component);
2282
+ return mapper ? jsx(AsFormFieldBuilder, Object.assign({
2278
2283
  formIndex: formIndex,
2279
- children: lenght > 0 ? children : null
2280
- }, fieldName);
2281
- });
2282
- };
2283
- /**
2284
- * function to transform AsFormField elements onto a JSON schema
2285
- *
2286
- * @param param.children ReactNode children elements
2287
- * @returns {IComponentSchema[] | null | undefined}
2288
- */
2289
- const BuildAsFormFieldTree = ({
2290
- children
2291
- }) => {
2292
- return Children.map(children, (child, index) => {
2293
- var _a, _b, _c, _d, _e;
2294
- let struct;
2295
- if (!String((_a = child === null || child === void 0 ? void 0 : child.type) === null || _a === void 0 ? void 0 : _a.name).startsWith('AsFormField')) {
2296
- if (typeof child.type === 'function' || typeof child.type === 'object') {
2297
- const props = Object.assign({}, child.props);
2298
- delete props.children;
2299
- struct = {
2300
- component: ((_b = child === null || child === void 0 ? void 0 : child.type) === null || _b === void 0 ? void 0 : _b.name) || 'customForwardRef',
2301
- name: `adapter-${Math.floor(Math.random() * Date.now()).toString(16)}`,
2302
- mapper: {
2303
- component: child.type,
2304
- componentName: typeof child.type !== 'string' ? (_c = child === null || child === void 0 ? void 0 : child.type) === null || _c === void 0 ? void 0 : _c.name : child.type
2305
- },
2306
- props
2307
- };
2308
- } else if (typeof child.type === 'string' || typeof child === 'string') {
2309
- throw new Error(`Only function components works inside a Form as React Nodes,\n
2310
- if you want something like this to work: <div>hi</div>\n
2311
- wrap it onto a function component\n
2312
- const CustomTextNode = (props:{text:string}) => <div>props</div>\n
2313
- and use it like <CustomTextNode text="hi"/>`);
2314
- } else {
2315
- throw {
2316
- message: `Unknown error occured, please check the child that was tried to render below`,
2317
- component: child
2318
- };
2319
- }
2320
- } else {
2321
- if (((_d = child === null || child === void 0 ? void 0 : child.type) === null || _d === void 0 ? void 0 : _d.name) === 'AsFormField') {
2322
- struct = Object.assign({}, child.props);
2323
- } else {
2324
- if (!child.type.defaultProps.component) throw new Error(`set defaultProps component name\n
2325
- ex: AsFormFieldInput.defaultProps = {
2326
- component = 'input'
2327
- }`);
2328
- struct = Object.assign(Object.assign({}, child.props), child.type.defaultProps);
2329
- }
2330
- }
2331
- if (struct && (struct === null || struct === void 0 ? void 0 : struct.children)) {
2332
- delete struct.children;
2333
- }
2334
- struct.order = index;
2335
- const childElements = BuildAsFormFieldTree({
2336
- children: (_e = child.props) === null || _e === void 0 ? void 0 : _e.children
2337
- });
2338
- return Object.assign(Object.assign({}, struct), childElements && {
2339
- children: childElements
2340
- });
2284
+ mapper: mapper,
2285
+ formMounted: mountedForm
2286
+ }, component, {
2287
+ children: component.children && component.children.length > 0 && jsx(BuildSchemaAsFields, {
2288
+ formIndex: formIndex,
2289
+ mappers: mappers,
2290
+ components: component.children,
2291
+ mountedForm: mountedForm
2292
+ })
2293
+ }), component.name) : jsx("div", {
2294
+ children: `component mapper not found for ${component.component} from field name ${component.name} on form ${formIndex}`
2295
+ }, component.name);
2341
2296
  });
2342
2297
  };
2343
2298
 
@@ -2516,98 +2471,70 @@ function Form({
2516
2471
  children
2517
2472
  }) {
2518
2473
  const {
2519
- addForm,
2520
- removeForm,
2521
2474
  getForm,
2522
2475
  mappers,
2523
2476
  debugMode,
2524
2477
  formGroupInstance
2525
2478
  } = useFormGroupContext({});
2526
- const schemaIndex = useMemo(() => index || (schema === null || schema === void 0 ? void 0 : schema.index) || 'defaultChange', [index, schema === null || schema === void 0 ? void 0 : schema.index]);
2527
- const render = useRef(false);
2528
- const formInstance = useRef(new FormCore({
2529
- schema: Object.assign(Object.assign({}, schema), {
2530
- index: schemaIndex
2531
- }),
2532
- initialValues: initialValues || (schema === null || schema === void 0 ? void 0 : schema.initialValues),
2533
- iVars: iVars || (schema === null || schema === void 0 ? void 0 : schema.iVars),
2534
- action: action || (schema === null || schema === void 0 ? void 0 : schema.action),
2535
- method: method || (schema === null || schema === void 0 ? void 0 : schema.method),
2536
- index: schemaIndex,
2537
- mappers,
2538
- config: config || formGroupInstance.config
2539
- }));
2540
- if (schemaIndex === 'defaultChange' || schemaIndex === 'defaultChange-ssr') {
2541
- console.warn('please, add an unique id to the form, otherwise multiple forms will break');
2542
- }
2543
- if (!formGroupInstance.forms.has(schemaIndex)) addForm({
2544
- key: schemaIndex,
2545
- formInstance: formInstance.current
2546
- });
2547
- /**
2548
- * logic to transform AsFormFields onto JSON schema
2549
- * and JSON schema onto FieldWrappers, refreshes when
2550
- * the react tree changes it's children
2551
- */
2552
- const tree = useMemo(() => {
2553
- var _a, _b;
2554
- const parsedSchema = BuildAsFormFieldTree({
2555
- children
2479
+ const schemaIndex = useRef(index || (schema === null || schema === void 0 ? void 0 : schema.index) || 'defaultChange').current;
2480
+ const [mounted, setMounted] = useState(false);
2481
+ // const formInstance = useRef(
2482
+ // new FormCore({
2483
+ // schema,
2484
+ // initialValues: initialValues || schema?.initialValues,
2485
+ // iVars: iVars || schema?.iVars,
2486
+ // action: action || schema?.action,
2487
+ // method: method || schema?.method,
2488
+ // index: schemaIndex,
2489
+ // mappers,
2490
+ // config: config || formGroupInstance.config,
2491
+ // })
2492
+ // );
2493
+ useEffect(() => {
2494
+ // if (!schema) {
2495
+ formGroupInstance.addForm({
2496
+ key: schemaIndex,
2497
+ formInstance: new FormCore({
2498
+ schema,
2499
+ initialValues: initialValues || (schema === null || schema === void 0 ? void 0 : schema.initialValues),
2500
+ iVars: iVars || (schema === null || schema === void 0 ? void 0 : schema.iVars),
2501
+ action: action || (schema === null || schema === void 0 ? void 0 : schema.action),
2502
+ method: method || (schema === null || schema === void 0 ? void 0 : schema.method),
2503
+ index: schemaIndex,
2504
+ mappers,
2505
+ config: config || formGroupInstance.config
2506
+ })
2556
2507
  });
2557
- parsedSchema && ((_a = getForm({
2558
- key: schemaIndex
2559
- })) === null || _a === void 0 ? void 0 : _a.refreshFields(parsedSchema));
2560
- const fields = (_b = getForm({
2561
- key: schemaIndex
2562
- })) === null || _b === void 0 ? void 0 : _b.fields;
2563
- if (fields) {
2564
- const buildTree = BuildTree({
2565
- fields,
2566
- formIndex: schemaIndex
2567
- });
2568
- return buildTree;
2569
- }
2570
- }, [children, getForm]);
2508
+ setMounted(true);
2509
+ // }
2510
+ }, []);
2511
+ // useEffect(() => {
2512
+ // return () => {
2513
+ // formGroupInstance.getForm({ key: schemaIndex })?.destroy();
2514
+ // };
2515
+ // }, []);
2571
2516
  /**
2572
2517
  * iVars change tracker to update iVars onto form instance
2573
2518
  */
2574
2519
  useEffect(() => {
2575
- if (iVars) getForm({
2576
- key: schemaIndex
2577
- }).iVars = iVars;
2578
- }, [iVars]);
2520
+ if (!formGroupInstance.forms.has(schemaIndex)) {
2521
+ console.log('failed to add iVars due to no form instance');
2522
+ return;
2523
+ }
2524
+ if (iVars && mounted) formGroupInstance.forms.get(schemaIndex).iVars = iVars;
2525
+ // if (iVars) formInstance.current.iVars = iVars;
2526
+ }, [iVars, mounted]);
2579
2527
  /**
2580
2528
  * initialValues setter for async initialValues
2581
2529
  */
2582
2530
  useEffect(() => {
2583
- if (initialValues) getForm({
2584
- key: schemaIndex
2585
- }).setInitialValues(initialValues);
2586
- }, [initialValues]);
2587
- /**
2588
- * logic to mount and manage form removal
2589
- */
2590
- useEffect(() => {
2591
- if (render.current) return;
2592
- render.current = true;
2593
- let subMounted;
2594
- if (onFormMount) {
2595
- subMounted = formInstance.current.subscribeOnMount(onFormMount);
2531
+ if (!formGroupInstance.forms.has(schemaIndex)) {
2532
+ console.log('failed to add initialValues due to no form instance');
2533
+ return;
2596
2534
  }
2597
- formInstance.current.mounted();
2598
- /*
2599
- @TODO check if form instance is killed each time it is unmounted
2600
- the management of multiple forms needs to be planned
2601
- */
2602
- return () => {
2603
- if (render.current) {
2604
- subMounted === null || subMounted === void 0 ? void 0 : subMounted.unsubscribe();
2605
- removeForm({
2606
- key: schemaIndex
2607
- });
2608
- }
2609
- };
2610
- }, []);
2535
+ if (initialValues && mounted) formGroupInstance.forms.get(schemaIndex).initialValues = initialValues;
2536
+ // if (initialValues) formInstance.current.initialValues = initialValues;
2537
+ }, [initialValues, mounted]);
2611
2538
  /**
2612
2539
  * hook usage to keep event bindings updated on callback functions passed as props
2613
2540
  */
@@ -2625,7 +2552,7 @@ function Form({
2625
2552
  onFormMount,
2626
2553
  onData,
2627
2554
  onValid
2628
- }, []);
2555
+ });
2629
2556
  /*
2630
2557
  @TODO move this logic inside form-core, add action and method onto form element,
2631
2558
  might need a ref of the form to collect all the form parameters when there is a
@@ -2672,7 +2599,12 @@ function Form({
2672
2599
  }), jsx("br", {}), jsx("hr", {})]
2673
2600
  }), jsx("form", {
2674
2601
  onSubmit: handleSubmit,
2675
- children: tree && tree
2602
+ children: jsx(BuildSchemaAsFields, {
2603
+ formIndex: schemaIndex,
2604
+ mappers: mappers,
2605
+ components: schema === null || schema === void 0 ? void 0 : schema.components,
2606
+ mountedForm: mounted
2607
+ })
2676
2608
  })]
2677
2609
  });
2678
2610
  }
@@ -2690,186 +2622,6 @@ const AsFormField = props => {
2690
2622
  return props.children;
2691
2623
  };
2692
2624
 
2693
- var fails$2 = fails$h;
2694
- var global$3 = global$e;
2695
-
2696
- // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
2697
- var $RegExp$2 = global$3.RegExp;
2698
-
2699
- var UNSUPPORTED_Y$1 = fails$2(function () {
2700
- var re = $RegExp$2('a', 'y');
2701
- re.lastIndex = 2;
2702
- return re.exec('abcd') !== null;
2703
- });
2704
-
2705
- // UC Browser bug
2706
- // https://github.com/zloirock/core-js/issues/1008
2707
- var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$2(function () {
2708
- return !$RegExp$2('a', 'y').sticky;
2709
- });
2710
-
2711
- var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$2(function () {
2712
- // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
2713
- var re = $RegExp$2('^r', 'gy');
2714
- re.lastIndex = 2;
2715
- return re.exec('str') !== null;
2716
- });
2717
-
2718
- var regexpStickyHelpers = {
2719
- BROKEN_CARET: BROKEN_CARET,
2720
- MISSED_STICKY: MISSED_STICKY,
2721
- UNSUPPORTED_Y: UNSUPPORTED_Y$1
2722
- };
2723
-
2724
- var fails$1 = fails$h;
2725
- var global$2 = global$e;
2726
-
2727
- // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
2728
- var $RegExp$1 = global$2.RegExp;
2729
-
2730
- var regexpUnsupportedDotAll = fails$1(function () {
2731
- var re = $RegExp$1('.', 's');
2732
- return !(re.dotAll && re.test('\n') && re.flags === 's');
2733
- });
2734
-
2735
- var fails = fails$h;
2736
- var global$1 = global$e;
2737
-
2738
- // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
2739
- var $RegExp = global$1.RegExp;
2740
-
2741
- var regexpUnsupportedNcg = fails(function () {
2742
- var re = $RegExp('(?<a>b)', 'g');
2743
- return re.exec('b').groups.a !== 'b' ||
2744
- 'b'.replace(re, '$<a>c') !== 'bc';
2745
- });
2746
-
2747
- /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
2748
- /* eslint-disable regexp/no-useless-quantifier -- testing */
2749
- var call = functionCall;
2750
- var uncurryThis = functionUncurryThis;
2751
- var toString = toString$3;
2752
- var regexpFlags = regexpFlags$1;
2753
- var stickyHelpers = regexpStickyHelpers;
2754
- var shared = shared$4;
2755
- var create = objectCreate;
2756
- var getInternalState = internalState.get;
2757
- var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
2758
- var UNSUPPORTED_NCG = regexpUnsupportedNcg;
2759
-
2760
- var nativeReplace = shared('native-string-replace', String.prototype.replace);
2761
- var nativeExec = RegExp.prototype.exec;
2762
- var patchedExec = nativeExec;
2763
- var charAt = uncurryThis(''.charAt);
2764
- var indexOf = uncurryThis(''.indexOf);
2765
- var replace = uncurryThis(''.replace);
2766
- var stringSlice = uncurryThis(''.slice);
2767
-
2768
- var UPDATES_LAST_INDEX_WRONG = (function () {
2769
- var re1 = /a/;
2770
- var re2 = /b*/g;
2771
- call(nativeExec, re1, 'a');
2772
- call(nativeExec, re2, 'a');
2773
- return re1.lastIndex !== 0 || re2.lastIndex !== 0;
2774
- })();
2775
-
2776
- var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;
2777
-
2778
- // nonparticipating capturing group, copied from es5-shim's String#split patch.
2779
- var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
2780
-
2781
- var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
2782
-
2783
- if (PATCH) {
2784
- patchedExec = function exec(string) {
2785
- var re = this;
2786
- var state = getInternalState(re);
2787
- var str = toString(string);
2788
- var raw = state.raw;
2789
- var result, reCopy, lastIndex, match, i, object, group;
2790
-
2791
- if (raw) {
2792
- raw.lastIndex = re.lastIndex;
2793
- result = call(patchedExec, raw, str);
2794
- re.lastIndex = raw.lastIndex;
2795
- return result;
2796
- }
2797
-
2798
- var groups = state.groups;
2799
- var sticky = UNSUPPORTED_Y && re.sticky;
2800
- var flags = call(regexpFlags, re);
2801
- var source = re.source;
2802
- var charsAdded = 0;
2803
- var strCopy = str;
2804
-
2805
- if (sticky) {
2806
- flags = replace(flags, 'y', '');
2807
- if (indexOf(flags, 'g') === -1) {
2808
- flags += 'g';
2809
- }
2810
-
2811
- strCopy = stringSlice(str, re.lastIndex);
2812
- // Support anchored sticky behavior.
2813
- if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt(str, re.lastIndex - 1) !== '\n')) {
2814
- source = '(?: ' + source + ')';
2815
- strCopy = ' ' + strCopy;
2816
- charsAdded++;
2817
- }
2818
- // ^(? + rx + ) is needed, in combination with some str slicing, to
2819
- // simulate the 'y' flag.
2820
- reCopy = new RegExp('^(?:' + source + ')', flags);
2821
- }
2822
-
2823
- if (NPCG_INCLUDED) {
2824
- reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
2825
- }
2826
- if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
2827
-
2828
- match = call(nativeExec, sticky ? reCopy : re, strCopy);
2829
-
2830
- if (sticky) {
2831
- if (match) {
2832
- match.input = stringSlice(match.input, charsAdded);
2833
- match[0] = stringSlice(match[0], charsAdded);
2834
- match.index = re.lastIndex;
2835
- re.lastIndex += match[0].length;
2836
- } else re.lastIndex = 0;
2837
- } else if (UPDATES_LAST_INDEX_WRONG && match) {
2838
- re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
2839
- }
2840
- if (NPCG_INCLUDED && match && match.length > 1) {
2841
- // Fix browsers whose `exec` methods don't consistently return `undefined`
2842
- // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
2843
- call(nativeReplace, match[0], reCopy, function () {
2844
- for (i = 1; i < arguments.length - 2; i++) {
2845
- if (arguments[i] === undefined) match[i] = undefined;
2846
- }
2847
- });
2848
- }
2849
-
2850
- if (match && groups) {
2851
- match.groups = object = create(null);
2852
- for (i = 0; i < groups.length; i++) {
2853
- group = groups[i];
2854
- object[group[0]] = match[group[1]];
2855
- }
2856
- }
2857
-
2858
- return match;
2859
- };
2860
- }
2861
-
2862
- var regexpExec = patchedExec;
2863
-
2864
- var $ = _export;
2865
- var exec = regexpExec;
2866
-
2867
- // `RegExp.prototype.exec` method
2868
- // https://tc39.es/ecma262/#sec-regexp.prototype.exec
2869
- $({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
2870
- exec: exec
2871
- });
2872
-
2873
2625
  /**
2874
2626
  * Component Wrapper to render form fields without the Form component, gets additional formId and mapper since
2875
2627
  * it won't rely on them and needs to be manually declared
@@ -2878,68 +2630,44 @@ $({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
2878
2630
  * @returns {ReactElement}
2879
2631
  */
2880
2632
  const AsFormFieldBuilder = props => {
2881
- var _a;
2882
2633
  const context = useFormGroupContext({});
2883
- const render = useRef(false);
2884
- const fieldName = props.name;
2885
- if (!((_a = context.formGroupInstance) === null || _a === void 0 ? void 0 : _a.forms.has(props.formIndex))) context.addFormWithIndex(props.formIndex);
2886
- const formInstance = context.formGroupInstance.forms.get(props.formIndex);
2887
- if (!(formInstance === null || formInstance === void 0 ? void 0 : formInstance.fields.has(fieldName))) {
2888
- const fieldSchema = Object.assign(Object.assign(Object.assign({}, props), {
2889
- name: fieldName
2890
- }), {
2891
- component: props.mapper.componentName,
2892
- children: undefined
2893
- });
2894
- formInstance === null || formInstance === void 0 ? void 0 : formInstance.addField({
2895
- fieldSchema,
2896
- mapperElement: props.mapper
2897
- });
2898
- const field = formInstance === null || formInstance === void 0 ? void 0 : formInstance.getField({
2899
- key: fieldName
2900
- });
2901
- if (typeof (props === null || props === void 0 ? void 0 : props.visibility) !== 'undefined' && field) {
2902
- field.visibility = props.visibility;
2903
- }
2904
- }
2634
+ /**
2635
+ * state to track the field instance creation process
2636
+ */
2637
+ const [mounted, setMounted] = useState(false);
2638
+ const mountedRef = useRef(false);
2905
2639
  /**
2906
2640
  * initializer to create or add a form instance to the formGroup by it's formId
2907
2641
  * and add the field to the form instance
2908
2642
  * Also has the logic to remove it once this element is removed
2909
2643
  */
2910
- useEffect(() => {
2911
- if (render.current) return;
2912
- render.current = true;
2913
- return () => {
2914
- if (render.current) {
2915
- formInstance === null || formInstance === void 0 ? void 0 : formInstance.removeField({
2916
- key: fieldName
2917
- });
2918
- }
2919
- };
2920
- }, []);
2921
- /**
2922
- * expensive function to allow both external props and templating work
2923
- * evaluate if templating will be done onto form-engine or not
2924
- */
2925
2644
  useEffect(() => {
2926
2645
  var _a;
2927
- const field = (_a = context.formGroupInstance.forms.get(props.formIndex)) === null || _a === void 0 ? void 0 : _a.fields.get(fieldName);
2928
- const fieldProps = field === null || field === void 0 ? void 0 : field.props;
2929
- if (props.props) {
2930
- Object.keys(props.props).forEach(propKey => {
2931
- var _a, _b;
2932
- if (typeof ((_a = props.props) === null || _a === void 0 ? void 0 : _a[propKey]) === 'string' &&
2933
- /**
2934
- * need to check linting on build, this needs to be casted in order to build..
2935
- */
2936
- /\$/.test((_b = props.props) === null || _b === void 0 ? void 0 : _b[propKey])) {
2937
- delete props.props[propKey];
2938
- }
2646
+ if (typeof props.formMounted === 'undefined' && !((_a = context.formGroupInstance) === null || _a === void 0 ? void 0 : _a.forms.has(props.formIndex))) {
2647
+ context.addFormWithIndex(props.formIndex);
2648
+ }
2649
+ if (props.formMounted || typeof props.formMounted === 'undefined') {
2650
+ const fieldSchema = Object.assign(Object.assign({}, props), {
2651
+ component: props.mapper.componentName,
2652
+ children: undefined
2939
2653
  });
2654
+ const formInstance = context.formGroupInstance.forms.get(props.formIndex);
2655
+ formInstance === null || formInstance === void 0 ? void 0 : formInstance.addField({
2656
+ fieldSchema,
2657
+ mapperElement: props.mapper
2658
+ });
2659
+ setMounted(true);
2660
+ mountedRef.current = true;
2940
2661
  }
2941
- field === null || field === void 0 ? void 0 : field.propsSubject$.next(Object.assign(Object.assign({}, fieldProps), props.props));
2942
- }, [props.props, fieldName]);
2662
+ }, [props.formMounted]);
2663
+ useEffect(() => {
2664
+ return () => {
2665
+ mountedRef.current && context.formGroupInstance.removeField({
2666
+ formIndex: props.formIndex,
2667
+ fieldIndex: props.name
2668
+ });
2669
+ };
2670
+ }, []);
2943
2671
  /**
2944
2672
  * allows to control field selected value on each event
2945
2673
  */
@@ -2958,9 +2686,12 @@ const AsFormFieldBuilder = props => {
2958
2686
  }, [props.onSelected]);
2959
2687
  return jsx(FieldWrapper, {
2960
2688
  formIndex: props.formIndex,
2961
- name: fieldName,
2689
+ name: props.name,
2962
2690
  props: props.props,
2963
2691
  context: !context.active ? context : null,
2692
+ mounted: mounted,
2693
+ mapper: props.mapper,
2694
+ visibility: props.visibility,
2964
2695
  children: props.children && props.children
2965
2696
  });
2966
2697
  };