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

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
@@ -4,24 +4,6 @@ import { createContext, useContext, useRef, useMemo, useState, useEffect, useCal
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
7
  var fails$h = function (exec) {
26
8
  try {
27
9
  return !!exec();
@@ -32,15 +14,7 @@ var fails$h = function (exec) {
32
14
 
33
15
  var fails$g = fails$h;
34
16
 
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;
42
-
43
- var functionBindNative = !fails$f(function () {
17
+ var functionBindNative = !fails$g(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,46 +23,13 @@ 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
- var call$7 = FunctionPrototype$1.call;
87
- var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype$1.bind.bind(call$7, call$7);
27
+ var call$8 = FunctionPrototype$1.call;
28
+ var uncurryThisWithBind = NATIVE_BIND$1 && FunctionPrototype$1.bind.bind(call$8, call$8);
88
29
 
89
- var functionUncurryThis = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
30
+ var functionUncurryThis = NATIVE_BIND$1 ? uncurryThisWithBind : function (fn) {
90
31
  return function () {
91
- return call$7.apply(fn, arguments);
32
+ return call$8.apply(fn, arguments);
92
33
  };
93
34
  };
94
35
 
@@ -102,14 +43,14 @@ var classofRaw$2 = function (it) {
102
43
  };
103
44
 
104
45
  var uncurryThis$e = functionUncurryThis;
105
- var fails$e = fails$h;
46
+ var fails$f = fails$h;
106
47
  var classof$3 = classofRaw$2;
107
48
 
108
49
  var $Object$4 = Object;
109
50
  var split = uncurryThis$e(''.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$f(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,38 +83,88 @@ 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;
147
-
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';
86
+ var check = function (it) {
87
+ return it && it.Math === Math && it;
155
88
  };
156
89
 
157
- var isCallable$d = isCallable$e;
90
+ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
91
+ var global$e =
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')();
158
101
 
159
- var isObject$9 = function (it) {
160
- return typeof it == 'object' ? it !== null : isCallable$d(it);
161
- };
102
+ var sharedStore = {exports: {}};
162
103
 
163
104
  var global$d = global$e;
164
- var isCallable$c = isCallable$e;
165
105
 
166
- var aFunction = function (argument) {
167
- return isCallable$c(argument) ? argument : undefined;
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$d, key, { value: value, configurable: true, writable: true });
112
+ } catch (error) {
113
+ global$d[key] = value;
114
+ } return value;
168
115
  };
169
116
 
170
- var getBuiltIn$3 = function (namespace, method) {
171
- return arguments.length < 2 ? aFunction(global$d[namespace]) : global$d[namespace] && global$d[namespace][method];
117
+ var globalThis$1 = global$e;
118
+ var defineGlobalProperty$2 = defineGlobalProperty$3;
119
+
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$4 = function (key, value) {
134
+ return store$2[key] || (store$2[key] = value || {});
135
+ };
136
+
137
+ var requireObjectCoercible$2 = requireObjectCoercible$4;
138
+
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));
172
145
  };
173
146
 
174
147
  var uncurryThis$d = functionUncurryThis;
148
+ var toObject$3 = toObject$4;
149
+
150
+ var hasOwnProperty = uncurryThis$d({}.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);
157
+ };
158
+
159
+ var uncurryThis$c = functionUncurryThis;
160
+
161
+ var id = 0;
162
+ var postfix = Math.random();
163
+ var toString$4 = uncurryThis$c(1.0.toString);
175
164
 
176
- var objectIsPrototypeOf = uncurryThis$d({}.isPrototypeOf);
165
+ var uid$2 = function (key) {
166
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$4(++id + postfix, 36);
167
+ };
177
168
 
178
169
  var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
179
170
 
@@ -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;
201
+ var fails$e = fails$h;
211
202
  var global$b = global$e;
212
203
 
213
204
  var $String$5 = global$b.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$e(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$a = global$e;
226
+ var shared$3 = shared$4;
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$a.Symbol;
233
+ var WellKnownSymbolsStore = shared$3('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$d = fails$h;
276
+
277
+ // Detect IE8's incomplete defineProperty implementation
278
+ var descriptors = !fails$d(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$c = fails$h;
285
+
286
+ // V8 ~ Chrome 36-
287
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3334
288
+ var v8PrototypeDefineBug = DESCRIPTORS$9 && fails$c(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$9 = global$e;
299
+ var isObject$7 = isObject$9;
300
+
301
+ var document$1 = global$9.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$b = fails$h;
311
+ var createElement = documentCreateElement$2;
312
+
313
+ // Thanks to IE8 for its funny defineProperty
314
+ var ie8DomDefine = !DESCRIPTORS$8 && !fails$b(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$7 = Function.prototype.call;
324
+
325
+ var functionCall = NATIVE_BIND ? call$7.bind(call$7) : function () {
326
+ return call$7.apply(call$7, arguments);
327
+ };
328
+
329
+ var global$8 = global$e;
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$8[namespace]) : global$8[namespace] && global$8[namespace][method];
338
+ };
339
+
340
+ var uncurryThis$b = functionUncurryThis;
341
+
342
+ var objectIsPrototypeOf = uncurryThis$b({}.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;
@@ -278,127 +388,41 @@ var getMethod$1 = function (V, P) {
278
388
 
279
389
  var call$6 = 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");
293
- };
294
-
295
- var sharedStore = {exports: {}};
296
-
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];
399
+ if (pref === 'string' && isCallable$9(fn = input.toString) && !isObject$6(val = call$6(fn, input))) return val;
400
+ if (isCallable$9(fn = input.valueOf) && !isObject$6(val = call$6(fn, input))) return val;
401
+ if (pref !== 'string' && isCallable$9(fn = input.toString) && !isObject$6(val = call$6(fn, input))) return val;
402
+ throw new $TypeError$5("Can't convert object to primitive value");
379
403
  };
380
404
 
381
405
  var call$5 = functionCall;
382
- var isObject$7 = isObject$9;
406
+ var isObject$5 = isObject$9;
383
407
  var isSymbol$1 = isSymbol$2;
384
408
  var getMethod = getMethod$1;
385
409
  var ordinaryToPrimitive = ordinaryToPrimitive$1;
386
410
  var wellKnownSymbol$9 = wellKnownSymbol$a;
387
411
 
388
- var $TypeError$5 = TypeError;
412
+ var $TypeError$4 = TypeError;
389
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
423
  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");
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,78 +482,313 @@ 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: {}};
545
-
546
- var DESCRIPTORS$4 = descriptors;
547
- var hasOwn$7 = hasOwnProperty_1;
548
-
549
- var FunctionPrototype = Function.prototype;
550
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
551
- var getDescriptor = DESCRIPTORS$4 && Object.getOwnPropertyDescriptor;
552
-
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));
496
+ var trunc = mathTrunc;
557
497
 
558
- var functionName = {
559
- EXISTS: EXISTS,
560
- PROPER: PROPER,
561
- CONFIGURABLE: CONFIGURABLE
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);
562
504
  };
563
505
 
564
- var uncurryThis$a = functionUncurryThis;
565
- var isCallable$8 = isCallable$e;
566
- var store$1 = sharedStore.exports;
506
+ var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
567
507
 
568
- var functionToString = uncurryThis$a(Function.toString);
508
+ var max = Math.max;
509
+ var min$2 = Math.min;
569
510
 
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
- }
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);
517
+ };
576
518
 
577
- var inspectSource$1 = store$1.inspectSource;
519
+ var toIntegerOrInfinity = toIntegerOrInfinity$2;
578
520
 
579
- var global$7 = global$e;
580
- var isCallable$7 = isCallable$e;
521
+ var min$1 = Math.min;
581
522
 
582
- var WeakMap$1 = global$7.WeakMap;
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
+ };
583
529
 
584
- var weakMapBasicDetection = isCallable$7(WeakMap$1) && /native code/.test(String(WeakMap$1));
530
+ var toLength$1 = toLength$2;
585
531
 
586
- var shared$2 = shared$4;
587
- var uid = uid$2;
532
+ // `LengthOfArrayLike` abstract operation
533
+ // https://tc39.es/ecma262/#sec-lengthofarraylike
534
+ var lengthOfArrayLike$2 = function (obj) {
535
+ return toLength$1(obj.length);
536
+ };
588
537
 
589
- var keys = shared$2('keys');
538
+ var toIndexedObject$4 = toIndexedObject$5;
539
+ var toAbsoluteIndex = toAbsoluteIndex$1;
540
+ var lengthOfArrayLike$1 = lengthOfArrayLike$2;
590
541
 
591
- var sharedKey$3 = function (key) {
592
- return keys[key] || (keys[key] = uid(key));
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
+ };
593
561
  };
594
562
 
595
- var hiddenKeys$4 = {};
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)
570
+ };
571
+
572
+ var hiddenKeys$4 = {};
573
+
574
+ var uncurryThis$a = functionUncurryThis;
575
+ var hasOwn$8 = hasOwnProperty_1;
576
+ var toIndexedObject$3 = toIndexedObject$5;
577
+ var indexOf$1 = arrayIncludes.indexOf;
578
+ var hiddenKeys$3 = hiddenKeys$4;
579
+
580
+ var push$1 = uncurryThis$a([].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$1(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$2 = shared$4;
642
+ var uid = uid$2;
643
+
644
+ var keys = shared$2('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$2 = 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$2(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$7 = global$e;
758
+ var isCallable$8 = isCallable$e;
759
+
760
+ var WeakMap$1 = global$7.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
+ };
596
783
 
597
784
  var NATIVE_WEAK_MAP = weakMapBasicDetection;
598
785
  var global$6 = global$e;
599
786
  var isObject$4 = isObject$9;
600
787
  var createNonEnumerableProperty$3 = createNonEnumerableProperty$4;
601
- var hasOwn$6 = hasOwnProperty_1;
788
+ var hasOwn$7 = hasOwnProperty_1;
602
789
  var shared$1 = sharedStore.exports;
603
- var sharedKey$2 = sharedKey$3;
604
- var hiddenKeys$3 = hiddenKeys$4;
790
+ var sharedKey$1 = sharedKey$3;
791
+ var hiddenKeys$1 = hiddenKeys$4;
605
792
 
606
793
  var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
607
794
  var TypeError$1 = global$6.TypeError;
@@ -622,38 +809,38 @@ var getterFor = function (TYPE) {
622
809
  };
623
810
 
624
811
  if (NATIVE_WEAK_MAP || shared$1.state) {
625
- var store = shared$1.state || (shared$1.state = new WeakMap());
812
+ var store$1 = shared$1.state || (shared$1.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,63 +852,139 @@ 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;
676
-
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);
855
+ var objectGetOwnPropertyDescriptor = {};
685
856
 
686
- var CONFIGURABLE_LENGTH = DESCRIPTORS$3 && !fails$a(function () {
687
- return defineProperty$4(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
688
- });
857
+ var objectPropertyIsEnumerable = {};
689
858
 
690
- var TEMPLATE = String(String).split('String');
859
+ var $propertyIsEnumerable = {}.propertyIsEnumerable;
860
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
861
+ var getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor;
691
862
 
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;
710
- } 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;
715
- };
863
+ // Nashorn ~ JDK8 bug
864
+ var NASHORN_BUG = getOwnPropertyDescriptor$2 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
716
865
 
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');
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;
722
872
 
723
- var isCallable$5 = isCallable$e;
724
- var definePropertyModule$2 = objectDefineProperty;
873
+ var DESCRIPTORS$4 = descriptors;
874
+ var call$4 = 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);
892
+ } catch (error) { /* empty */ }
893
+ if (hasOwn$6(O, P)) return createPropertyDescriptor$1(!call$4(propertyIsEnumerableModule$1.f, O, P), O[P]);
894
+ };
895
+
896
+ var makeBuiltIn$2 = {exports: {}};
897
+
898
+ var DESCRIPTORS$3 = descriptors;
899
+ var hasOwn$5 = hasOwnProperty_1;
900
+
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$9 = functionUncurryThis;
917
+ var isCallable$7 = isCallable$e;
918
+ var store = sharedStore.exports;
919
+
920
+ var functionToString = uncurryThis$9(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$8 = functionUncurryThis;
932
+ var fails$a = fails$h;
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$2 = 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$2 = uncurryThis$8(''.slice);
946
+ var replace$1 = uncurryThis$8(''.replace);
947
+ var join = uncurryThis$8([].join);
948
+
949
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$2 && !fails$a(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$2($String$2(name), 0, 7) === 'Symbol(') {
957
+ name = '[' + replace$1($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$2(this).source || inspectSource(this);
984
+ }, 'toString');
985
+
986
+ var isCallable$5 = isCallable$e;
987
+ var definePropertyModule$1 = objectDefineProperty;
725
988
  var makeBuiltIn = makeBuiltIn$2.exports;
726
989
  var defineGlobalProperty$1 = defineGlobalProperty$3;
727
990
 
@@ -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;
1033
+ var getBuiltIn = getBuiltIn$3;
890
1034
  var uncurryThis$7 = 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
1039
  var concat$1 = uncurryThis$7([].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];
@@ -924,292 +1068,81 @@ var isCallable$4 = isCallable$e;
924
1068
  var replacement = /#|\.prototype\./;
925
1069
 
926
1070
  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
- };
1132
-
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
- };
1149
-
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();
1168
- };
1169
-
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);
1071
+ var value = data[normalize(feature)];
1072
+ return value === POLYFILL ? true
1073
+ : value === NATIVE ? false
1074
+ : isCallable$4(detection) ? fails$9(detection)
1075
+ : !!detection;
1185
1076
  };
1186
1077
 
1187
- var wellKnownSymbol$8 = wellKnownSymbol$a;
1188
- var create$2 = objectCreate;
1189
- var defineProperty$2 = objectDefineProperty.f;
1078
+ var normalize = isForced$1.normalize = function (string) {
1079
+ return String(string).replace(replacement, '.').toLowerCase();
1080
+ };
1190
1081
 
1191
- var UNSCOPABLES = wellKnownSymbol$8('unscopables');
1192
- var ArrayPrototype = Array.prototype;
1082
+ var data = isForced$1.data = {};
1083
+ var NATIVE = isForced$1.NATIVE = 'N';
1084
+ var POLYFILL = isForced$1.POLYFILL = 'P';
1193
1085
 
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
- }
1086
+ var isForced_1 = isForced$1;
1202
1087
 
1203
- // add a key to Array.prototype[@@unscopables]
1204
- var addToUnscopables$1 = function (key) {
1205
- ArrayPrototype[UNSCOPABLES][key] = true;
1206
- };
1088
+ var global$5 = global$e;
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;
1207
1095
 
1208
- var iterators = {};
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$5;
1118
+ } else if (STATIC) {
1119
+ target = global$5[TARGET] || defineGlobalProperty(TARGET, {});
1120
+ } else {
1121
+ target = global$5[TARGET] && global$5[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
+ }
1141
+ };
1209
1142
 
1210
- var fails$7 = fails$h;
1143
+ var fails$8 = fails$h;
1211
1144
 
1212
- var correctPrototypeGetter = !fails$7(function () {
1145
+ var correctPrototypeGetter = !fails$8(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$7 = fails$h;
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$7(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,7 +1226,7 @@ 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
 
@@ -1313,13 +1246,13 @@ var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUME
1313
1246
  return IteratorConstructor;
1314
1247
  };
1315
1248
 
1316
- var uncurryThis$5 = functionUncurryThis;
1249
+ var uncurryThis$6 = functionUncurryThis;
1317
1250
  var aCallable$1 = aCallable$3;
1318
1251
 
1319
1252
  var functionUncurryThisAccessor = function (object, key, method) {
1320
1253
  try {
1321
1254
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1322
- return uncurryThis$5(aCallable$1(Object.getOwnPropertyDescriptor(object, key)[method]));
1255
+ return uncurryThis$6(aCallable$1(Object.getOwnPropertyDescriptor(object, key)[method]));
1323
1256
  } catch (error) { /* empty */ }
1324
1257
  };
1325
1258
 
@@ -1368,8 +1301,8 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
1368
1301
  };
1369
1302
  }() : undefined);
1370
1303
 
1371
- var $$3 = _export;
1372
- var call$2 = functionCall;
1304
+ var $$4 = _export;
1305
+ var call$3 = functionCall;
1373
1306
  var FunctionName = functionName;
1374
1307
  var isCallable$1 = isCallable$e;
1375
1308
  var createIteratorConstructor = iteratorCreateConstructor;
@@ -1441,7 +1374,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1441
1374
  createNonEnumerableProperty$1(IterablePrototype, 'name', VALUES);
1442
1375
  } else {
1443
1376
  INCORRECT_VALUES_NAME = true;
1444
- defaultIterator = function values() { return call$2(nativeIterator, this); };
1377
+ defaultIterator = function values() { return call$3(nativeIterator, this); };
1445
1378
  }
1446
1379
  }
1447
1380
 
@@ -1456,7 +1389,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1456
1389
  if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1457
1390
  defineBuiltIn$1(IterablePrototype, KEY, methods[KEY]);
1458
1391
  }
1459
- } else $$3({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1392
+ } else $$4({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1460
1393
  }
1461
1394
 
1462
1395
  // define iterator
@@ -1478,10 +1411,10 @@ 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;
@@ -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$4 = global$e;
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$4[COLLECTION_NAME] && global$4[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
@@ -1591,9 +1605,9 @@ var toString$3 = function (argument) {
1591
1605
  return $String(argument);
1592
1606
  };
1593
1607
 
1594
- var uncurryThis$4 = functionUncurryThis;
1608
+ var uncurryThis$5 = functionUncurryThis;
1595
1609
 
1596
- var arraySlice$1 = uncurryThis$4([].slice);
1610
+ var arraySlice$1 = uncurryThis$5([].slice);
1597
1611
 
1598
1612
  var arraySlice = arraySlice$1;
1599
1613
 
@@ -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$6 = fails$h;
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$6(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
  });
@@ -1663,14 +1677,14 @@ var webkit = userAgent.match(/AppleWebKit\/(\d+)\./);
1663
1677
 
1664
1678
  var engineWebkitVersion = !!webkit && +webkit[1];
1665
1679
 
1666
- var $$2 = _export;
1667
- var uncurryThis$3 = functionUncurryThis;
1680
+ var $$3 = _export;
1681
+ var uncurryThis$4 = 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
1686
  var toString$2 = toString$3;
1673
- var fails$4 = fails$h;
1687
+ var fails$5 = fails$h;
1674
1688
  var internalSort = arraySort;
1675
1689
  var arrayMethodIsStrict = arrayMethodIsStrict$1;
1676
1690
  var FF = engineFfVersion;
@@ -1679,21 +1693,21 @@ var V8 = engineV8Version;
1679
1693
  var WEBKIT = engineWebkitVersion;
1680
1694
 
1681
1695
  var test = [];
1682
- var nativeSort = uncurryThis$3(test.sort);
1683
- var push = uncurryThis$3(test.push);
1696
+ var nativeSort = uncurryThis$4(test.sort);
1697
+ var push = uncurryThis$4(test.push);
1684
1698
 
1685
1699
  // IE8-
1686
- var FAILS_ON_UNDEFINED = fails$4(function () {
1700
+ var FAILS_ON_UNDEFINED = fails$5(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$5(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$5(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;
@@ -1741,11 +1755,11 @@ var getSortCompare = function (comparefn) {
1741
1755
 
1742
1756
  // `Array.prototype.sort` method
1743
1757
  // https://tc39.es/ecma262/#sec-array.prototype.sort
1744
- $$2({ target: 'Array', proto: true, forced: FORCED }, {
1758
+ $$3({ 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
 
@@ -1769,6 +1783,73 @@ $$2({ target: 'Array', proto: true, forced: FORCED }, {
1769
1783
  }
1770
1784
  });
1771
1785
 
1786
+ var DESCRIPTORS = descriptors;
1787
+ var uncurryThis$3 = functionUncurryThis;
1788
+ var call$2 = functionCall;
1789
+ var fails$4 = fails$h;
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$3([].concat);
1801
+
1802
+ // `Object.assign` method
1803
+ // https://tc39.es/ecma262/#sec-object.assign
1804
+ var objectAssign = !$assign || fails$4(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$2(propertyIsEnumerable, S, key)) T[key] = S[key];
1839
+ }
1840
+ } return T;
1841
+ } : $assign;
1842
+
1843
+ var $$2 = _export;
1844
+ var assign = objectAssign;
1845
+
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
+ $$2({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1850
+ assign: assign
1851
+ });
1852
+
1772
1853
  var anObject$1 = anObject$6;
1773
1854
 
1774
1855
  // `RegExp.prototype.flags` getter implementation
@@ -1838,9 +1919,9 @@ var functionUncurryThisClause = function (fn) {
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 = /./;
@@ -1906,86 +1987,185 @@ $$1({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_RE
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
1990
+ var fails$2 = fails$h;
1991
+ var global$3 = global$e;
1992
+
1993
+ // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
1994
+ var $RegExp$2 = global$3.RegExp;
1995
+
1996
+ var UNSUPPORTED_Y$1 = fails$2(function () {
1997
+ var re = $RegExp$2('a', 'y');
1998
+ re.lastIndex = 2;
1999
+ return re.exec('abcd') !== null;
2000
+ });
2001
+
2002
+ // UC Browser bug
2003
+ // https://github.com/zloirock/core-js/issues/1008
2004
+ var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$2(function () {
2005
+ return !$RegExp$2('a', 'y').sticky;
2006
+ });
2007
+
2008
+ var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$2(function () {
2009
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
2010
+ var re = $RegExp$2('^r', 'gy');
2011
+ re.lastIndex = 2;
2012
+ return re.exec('str') !== null;
2013
+ });
2014
+
2015
+ var regexpStickyHelpers = {
2016
+ BROKEN_CARET: BROKEN_CARET,
2017
+ MISSED_STICKY: MISSED_STICKY,
2018
+ UNSUPPORTED_Y: UNSUPPORTED_Y$1
1943
2019
  };
1944
2020
 
1945
- // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
1946
- var documentCreateElement = documentCreateElement$2;
2021
+ var fails$1 = fails$h;
2022
+ var global$2 = global$e;
1947
2023
 
1948
- var classList = documentCreateElement('span').classList;
1949
- var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
2024
+ // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
2025
+ var $RegExp$1 = global$2.RegExp;
1950
2026
 
1951
- var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
2027
+ var regexpUnsupportedDotAll = fails$1(function () {
2028
+ var re = $RegExp$1('.', 's');
2029
+ return !(re.dotAll && re.test('\n') && re.flags === 's');
2030
+ });
1952
2031
 
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;
2032
+ var fails = fails$h;
2033
+ var global$1 = global$e;
1960
2034
 
1961
- var ITERATOR = wellKnownSymbol('iterator');
1962
- var ArrayValues = ArrayIteratorMethods.values;
2035
+ // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
2036
+ var $RegExp = global$1.RegExp;
1963
2037
 
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;
2038
+ var regexpUnsupportedNcg = fails(function () {
2039
+ var re = $RegExp('(?<a>b)', 'g');
2040
+ return re.exec('b').groups.a !== 'b' ||
2041
+ 'b'.replace(re, '$<a>c') !== 'bc';
2042
+ });
2043
+
2044
+ /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
2045
+ /* eslint-disable regexp/no-useless-quantifier -- testing */
2046
+ var call = functionCall;
2047
+ var uncurryThis = functionUncurryThis;
2048
+ var toString = toString$3;
2049
+ var regexpFlags = regexpFlags$1;
2050
+ var stickyHelpers = regexpStickyHelpers;
2051
+ var shared = shared$4;
2052
+ var create = objectCreate;
2053
+ var getInternalState = internalState.get;
2054
+ var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
2055
+ var UNSUPPORTED_NCG = regexpUnsupportedNcg;
2056
+
2057
+ var nativeReplace = shared('native-string-replace', String.prototype.replace);
2058
+ var nativeExec = RegExp.prototype.exec;
2059
+ var patchedExec = nativeExec;
2060
+ var charAt = uncurryThis(''.charAt);
2061
+ var indexOf = uncurryThis(''.indexOf);
2062
+ var replace = uncurryThis(''.replace);
2063
+ var stringSlice = uncurryThis(''.slice);
2064
+
2065
+ var UPDATES_LAST_INDEX_WRONG = (function () {
2066
+ var re1 = /a/;
2067
+ var re2 = /b*/g;
2068
+ call(nativeExec, re1, 'a');
2069
+ call(nativeExec, re2, 'a');
2070
+ return re1.lastIndex !== 0 || re2.lastIndex !== 0;
2071
+ })();
2072
+
2073
+ var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;
2074
+
2075
+ // nonparticipating capturing group, copied from es5-shim's String#split patch.
2076
+ var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
2077
+
2078
+ var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
2079
+
2080
+ if (PATCH) {
2081
+ patchedExec = function exec(string) {
2082
+ var re = this;
2083
+ var state = getInternalState(re);
2084
+ var str = toString(string);
2085
+ var raw = state.raw;
2086
+ var result, reCopy, lastIndex, match, i, object, group;
2087
+
2088
+ if (raw) {
2089
+ raw.lastIndex = re.lastIndex;
2090
+ result = call(patchedExec, raw, str);
2091
+ re.lastIndex = raw.lastIndex;
2092
+ return result;
1971
2093
  }
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];
2094
+
2095
+ var groups = state.groups;
2096
+ var sticky = UNSUPPORTED_Y && re.sticky;
2097
+ var flags = call(regexpFlags, re);
2098
+ var source = re.source;
2099
+ var charsAdded = 0;
2100
+ var strCopy = str;
2101
+
2102
+ if (sticky) {
2103
+ flags = replace(flags, 'y', '');
2104
+ if (indexOf(flags, 'g') === -1) {
2105
+ flags += 'g';
2106
+ }
2107
+
2108
+ strCopy = stringSlice(str, re.lastIndex);
2109
+ // Support anchored sticky behavior.
2110
+ if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt(str, re.lastIndex - 1) !== '\n')) {
2111
+ source = '(?: ' + source + ')';
2112
+ strCopy = ' ' + strCopy;
2113
+ charsAdded++;
1979
2114
  }
2115
+ // ^(? + rx + ) is needed, in combination with some str slicing, to
2116
+ // simulate the 'y' flag.
2117
+ reCopy = new RegExp('^(?:' + source + ')', flags);
1980
2118
  }
1981
- }
1982
- };
1983
2119
 
1984
- for (var COLLECTION_NAME in DOMIterables) {
1985
- handlePrototype(global$4[COLLECTION_NAME] && global$4[COLLECTION_NAME].prototype, COLLECTION_NAME);
2120
+ if (NPCG_INCLUDED) {
2121
+ reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
2122
+ }
2123
+ if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
2124
+
2125
+ match = call(nativeExec, sticky ? reCopy : re, strCopy);
2126
+
2127
+ if (sticky) {
2128
+ if (match) {
2129
+ match.input = stringSlice(match.input, charsAdded);
2130
+ match[0] = stringSlice(match[0], charsAdded);
2131
+ match.index = re.lastIndex;
2132
+ re.lastIndex += match[0].length;
2133
+ } else re.lastIndex = 0;
2134
+ } else if (UPDATES_LAST_INDEX_WRONG && match) {
2135
+ re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
2136
+ }
2137
+ if (NPCG_INCLUDED && match && match.length > 1) {
2138
+ // Fix browsers whose `exec` methods don't consistently return `undefined`
2139
+ // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
2140
+ call(nativeReplace, match[0], reCopy, function () {
2141
+ for (i = 1; i < arguments.length - 2; i++) {
2142
+ if (arguments[i] === undefined) match[i] = undefined;
2143
+ }
2144
+ });
2145
+ }
2146
+
2147
+ if (match && groups) {
2148
+ match.groups = object = create(null);
2149
+ for (i = 0; i < groups.length; i++) {
2150
+ group = groups[i];
2151
+ object[group[0]] = match[group[1]];
2152
+ }
2153
+ }
2154
+
2155
+ return match;
2156
+ };
1986
2157
  }
1987
2158
 
1988
- handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
2159
+ var regexpExec = patchedExec;
2160
+
2161
+ var $ = _export;
2162
+ var exec = regexpExec;
2163
+
2164
+ // `RegExp.prototype.exec` method
2165
+ // https://tc39.es/ecma262/#sec-regexp.prototype.exec
2166
+ $({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
2167
+ exec: exec
2168
+ });
1989
2169
 
1990
2170
  const FormGroupContext = /*#__PURE__*/createContext({});
1991
2171
  /**
@@ -2104,11 +2284,12 @@ const useFormGroupContext = props => {
2104
2284
  const FieldWrapperComponentRender = ({
2105
2285
  props,
2106
2286
  fieldInstance,
2107
- children
2287
+ children,
2288
+ mapper
2108
2289
  }) => {
2109
2290
  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;
2291
+ 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);
2292
+ 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
2293
  if (Component) return jsx(Component, Object.assign({}, props, {
2113
2294
  children: children && children
2114
2295
  }));
@@ -2133,7 +2314,10 @@ const FieldWrapper = ({
2133
2314
  formIndex,
2134
2315
  children,
2135
2316
  props,
2136
- context
2317
+ context,
2318
+ mounted,
2319
+ mapper,
2320
+ visibility
2137
2321
  }) => {
2138
2322
  var _a, _b, _c;
2139
2323
  const localContext = useFormGroupContext({});
@@ -2144,20 +2328,45 @@ const FieldWrapper = ({
2144
2328
  formGroupInstance,
2145
2329
  debugMode
2146
2330
  } = 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) || {});
2331
+ const fieldInstance = useMemo(() => {
2332
+ var _a;
2333
+ return (_a = formGroupInstance.getForm({
2334
+ key: formIndex
2335
+ })) === null || _a === void 0 ? void 0 : _a.getField({
2336
+ key: name
2337
+ });
2338
+ }, [mounted]);
2339
+ const filteredProps = useMemo(() => {
2340
+ let returnProps = {};
2341
+ if (props) {
2342
+ returnProps = Object.assign({}, props);
2343
+ Object.keys(returnProps).forEach(propKey => {
2344
+ if (typeof (returnProps === null || returnProps === void 0 ? void 0 : returnProps[propKey]) === 'string' &&
2345
+ /**
2346
+ * need to check linting on build, this needs to be casted in order to build..
2347
+ */
2348
+ /\$/.test(returnProps === null || returnProps === void 0 ? void 0 : returnProps[propKey])) {
2349
+ delete returnProps[propKey];
2350
+ }
2351
+ });
2352
+ if (mounted) {
2353
+ fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.propsSubject$.next(Object.assign(Object.assign({}, fieldInstance.props), returnProps));
2354
+ }
2355
+ }
2356
+ return returnProps;
2357
+ }, [props]);
2358
+ const [valueState, setValueState] = useState((fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.stateValue) || {
2359
+ [((_a = mapper === null || mapper === void 0 ? void 0 : mapper.events) === null || _a === void 0 ? void 0 : _a.setValue) || 'value']: ''
2360
+ });
2153
2361
  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
2362
+ visibility: visibility,
2363
+ props: (fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.props) || filteredProps
2156
2364
  });
2157
2365
  /**
2158
2366
  * handles the mounting and unmounting logic onto the field instance
2159
2367
  */
2160
2368
  useEffect(() => {
2369
+ if (!mounted) return;
2161
2370
  fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.mountField({
2162
2371
  valueSubscription: value => {
2163
2372
  setValueState(value);
@@ -2175,33 +2384,34 @@ const FieldWrapper = ({
2175
2384
  }
2176
2385
  });
2177
2386
  return () => {
2178
- fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.destroyField();
2387
+ mounted && (fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.destroyField());
2179
2388
  };
2180
- }, []);
2389
+ }, [mounted]);
2181
2390
  /**
2182
2391
  * handles the value change onto the field instance
2183
2392
  */
2184
2393
  const handleChange = useCallback(event => {
2394
+ if (!mounted) return;
2185
2395
  fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.emitValue({
2186
2396
  value: event,
2187
2397
  event: 'ON_FIELD_CHANGE'
2188
2398
  });
2189
- }, []);
2399
+ }, [mounted]);
2190
2400
  /**
2191
2401
  * handles the event emission onto the field instance
2192
2402
  */
2193
2403
  const handleEvent = useCallback(event => {
2404
+ if (!mounted) return;
2194
2405
  fieldInstance === null || fieldInstance === void 0 ? void 0 : fieldInstance.emitEvents({
2195
2406
  event
2196
2407
  });
2197
- }, []);
2408
+ }, [mounted]);
2198
2409
  /**
2199
2410
  * handles the mappers configuration to bind the event submission callback
2200
2411
  * to the corresponding prop defined on the mappers
2201
2412
  */
2202
2413
  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;
2414
+ const events = mapper === null || mapper === void 0 ? void 0 : mapper.events;
2205
2415
  const props = {};
2206
2416
  if (events === null || events === void 0 ? void 0 : events.onBlur) props[events.onBlur] = () => handleEvent('ON_FIELD_BLUR');
2207
2417
  if (events === null || events === void 0 ? void 0 : events.getValue) props[events.getValue] = handleChange;
@@ -2211,8 +2421,8 @@ const FieldWrapper = ({
2211
2421
  if (events === null || events === void 0 ? void 0 : events.onKeyUp) props[events.onKeyUp] = () => handleEvent('ON_FIELD_KEYUP');
2212
2422
  if (events === null || events === void 0 ? void 0 : events.onKeyDown) props[events.onKeyDown] = () => handleEvent('ON_FIELD_KEYDOWN');
2213
2423
  return props;
2214
- }, []);
2215
- return (state === null || state === void 0 ? void 0 : state.visibility) ? jsxs(Fragment, {
2424
+ }, [mounted]);
2425
+ return state.visibility ? jsxs(Fragment, {
2216
2426
  children: [debugMode && jsxs("div", {
2217
2427
  style: {
2218
2428
  width: '100%',
@@ -2241,6 +2451,7 @@ const FieldWrapper = ({
2241
2451
  }), jsx(FieldWrapperComponentRender, {
2242
2452
  props: Object.assign(Object.assign(Object.assign(Object.assign({}, mapProps), state.props), state.errors), valueState),
2243
2453
  fieldInstance: fieldInstance,
2454
+ mapper: mapper,
2244
2455
  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
2456
  })]
2246
2457
  }) : jsx(Fragment, {});
@@ -2260,7 +2471,7 @@ const BuildTree = ({
2260
2471
  prevPath,
2261
2472
  formIndex
2262
2473
  }) => {
2263
- return Array.from(fields).sort(([, field], [, field2]) => {
2474
+ const tree = Array.from(fields).sort(([, field], [, field2]) => {
2264
2475
  var _a, _b;
2265
2476
  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
2477
  }).filter(([, value]) => {
@@ -2276,9 +2487,12 @@ const BuildTree = ({
2276
2487
  return jsx(FieldWrapper, {
2277
2488
  name: fieldName,
2278
2489
  formIndex: formIndex,
2490
+ visibility: value.visibility,
2279
2491
  children: lenght > 0 ? children : null
2280
2492
  }, fieldName);
2281
2493
  });
2494
+ console.log(tree);
2495
+ return tree;
2282
2496
  };
2283
2497
  /**
2284
2498
  * function to transform AsFormField elements onto a JSON schema
@@ -2520,54 +2734,72 @@ function Form({
2520
2734
  removeForm,
2521
2735
  getForm,
2522
2736
  mappers,
2523
- debugMode,
2524
- formGroupInstance
2525
- } = 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
- });
2737
+ debugMode,
2738
+ formGroupInstance
2739
+ } = useFormGroupContext({});
2740
+ const [tree, setTree] = useState();
2741
+ const schemaIndex = useMemo(() => index || (schema === null || schema === void 0 ? void 0 : schema.index) || 'defaultChange', [index, schema]);
2742
+ /**
2743
+ * logic to initialize the form instance and it's removal
2744
+ */
2745
+ useEffect(() => {
2746
+ if (schemaIndex === 'defaultChange') {
2747
+ console.warn('please, add an unique id to the form, otherwise multiple forms will break');
2748
+ }
2749
+ const formInstance = new FormCore({
2750
+ schema,
2751
+ initialValues: initialValues || (schema === null || schema === void 0 ? void 0 : schema.initialValues),
2752
+ iVars: iVars || (schema === null || schema === void 0 ? void 0 : schema.iVars),
2753
+ action: action || (schema === null || schema === void 0 ? void 0 : schema.action),
2754
+ method: method || (schema === null || schema === void 0 ? void 0 : schema.method),
2755
+ index: schemaIndex,
2756
+ mappers,
2757
+ config: config || formGroupInstance.config
2758
+ });
2759
+ addForm({
2760
+ key: schemaIndex,
2761
+ formInstance
2762
+ });
2763
+ let subMounted;
2764
+ if (onFormMount) {
2765
+ subMounted = formInstance.subscribeOnMount(onFormMount);
2766
+ }
2767
+ formInstance === null || formInstance === void 0 ? void 0 : formInstance.mounted();
2768
+ /*
2769
+ @TODO check if form instance is killed each time it is unmounted
2770
+ the management of multiple forms needs to be planned
2771
+ */
2772
+ return () => {
2773
+ subMounted === null || subMounted === void 0 ? void 0 : subMounted.unsubscribe();
2774
+ removeForm({
2775
+ key: schemaIndex
2776
+ });
2777
+ };
2778
+ }, []);
2547
2779
  /**
2548
2780
  * logic to transform AsFormFields onto JSON schema
2549
2781
  * and JSON schema onto FieldWrappers, refreshes when
2550
2782
  * the react tree changes it's children
2551
2783
  */
2552
- const tree = useMemo(() => {
2553
- var _a, _b;
2554
- const parsedSchema = BuildAsFormFieldTree({
2784
+ useEffect(() => {
2785
+ var _a;
2786
+ const schema = BuildAsFormFieldTree({
2555
2787
  children
2556
2788
  });
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;
2789
+ schema && getForm({
2790
+ key: index
2791
+ }).refreshFields(schema);
2792
+ const fields = (_a = getForm({
2793
+ key: index
2794
+ })) === null || _a === void 0 ? void 0 : _a.fields;
2563
2795
  if (fields) {
2564
2796
  const buildTree = BuildTree({
2565
2797
  fields,
2566
- formIndex: schemaIndex
2798
+ formIndex: index
2567
2799
  });
2568
- return buildTree;
2800
+ setTree(buildTree);
2569
2801
  }
2570
- }, [children, getForm]);
2802
+ }, [children]);
2571
2803
  /**
2572
2804
  * iVars change tracker to update iVars onto form instance
2573
2805
  */
@@ -2584,30 +2816,6 @@ function Form({
2584
2816
  key: schemaIndex
2585
2817
  }).setInitialValues(initialValues);
2586
2818
  }, [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);
2596
- }
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
- }, []);
2611
2819
  /**
2612
2820
  * hook usage to keep event bindings updated on callback functions passed as props
2613
2821
  */
@@ -2625,7 +2833,7 @@ function Form({
2625
2833
  onFormMount,
2626
2834
  onData,
2627
2835
  onValid
2628
- }, []);
2836
+ });
2629
2837
  /*
2630
2838
  @TODO move this logic inside form-core, add action and method onto form element,
2631
2839
  might need a ref of the form to collect all the form parameters when there is a
@@ -2672,7 +2880,13 @@ function Form({
2672
2880
  }), jsx("br", {}), jsx("hr", {})]
2673
2881
  }), jsx("form", {
2674
2882
  onSubmit: handleSubmit,
2675
- children: tree && tree
2883
+ children: BuildTree({
2884
+ fields: FormCore.serializeStructure({
2885
+ mappers: mappers || [],
2886
+ struct: schema === null || schema === void 0 ? void 0 : schema.components
2887
+ }),
2888
+ formIndex: schemaIndex
2889
+ })
2676
2890
  })]
2677
2891
  });
2678
2892
  }
@@ -2690,186 +2904,6 @@ const AsFormField = props => {
2690
2904
  return props.children;
2691
2905
  };
2692
2906
 
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
2907
  /**
2874
2908
  * Component Wrapper to render form fields without the Form component, gets additional formId and mapper since
2875
2909
  * it won't rely on them and needs to be manually declared
@@ -2878,68 +2912,35 @@ $({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
2878
2912
  * @returns {ReactElement}
2879
2913
  */
2880
2914
  const AsFormFieldBuilder = props => {
2881
- var _a;
2882
2915
  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
- }), {
2916
+ /**
2917
+ * state to track the field instance creation process
2918
+ */
2919
+ const [mounted, setMounted] = useState(false);
2920
+ /**
2921
+ * initializer to create or add a form instance to the formGroup by it's formId
2922
+ * and add the field to the form instance
2923
+ * Also has the logic to remove it once this element is removed
2924
+ */
2925
+ useEffect(() => {
2926
+ var _a;
2927
+ if (!((_a = context.formGroupInstance) === null || _a === void 0 ? void 0 : _a.forms.has(props.formIndex))) {
2928
+ context.addFormWithIndex(props.formIndex);
2929
+ }
2930
+ const fieldSchema = Object.assign(Object.assign({}, props), {
2891
2931
  component: props.mapper.componentName,
2892
2932
  children: undefined
2893
2933
  });
2934
+ const formInstance = context.formGroupInstance.forms.get(props.formIndex);
2894
2935
  formInstance === null || formInstance === void 0 ? void 0 : formInstance.addField({
2895
2936
  fieldSchema,
2896
2937
  mapperElement: props.mapper
2897
2938
  });
2898
- const field = formInstance === null || formInstance === void 0 ? void 0 : formInstance.getField({
2899
- key: fieldName
2939
+ setMounted(true);
2940
+ return () => formInstance === null || formInstance === void 0 ? void 0 : formInstance.removeField({
2941
+ key: props.name
2900
2942
  });
2901
- if (typeof (props === null || props === void 0 ? void 0 : props.visibility) !== 'undefined' && field) {
2902
- field.visibility = props.visibility;
2903
- }
2904
- }
2905
- /**
2906
- * initializer to create or add a form instance to the formGroup by it's formId
2907
- * and add the field to the form instance
2908
- * Also has the logic to remove it once this element is removed
2909
- */
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
2943
  }, []);
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
- useEffect(() => {
2926
- 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
- }
2939
- });
2940
- }
2941
- field === null || field === void 0 ? void 0 : field.propsSubject$.next(Object.assign(Object.assign({}, fieldProps), props.props));
2942
- }, [props.props, fieldName]);
2943
2944
  /**
2944
2945
  * allows to control field selected value on each event
2945
2946
  */
@@ -2958,9 +2959,12 @@ const AsFormFieldBuilder = props => {
2958
2959
  }, [props.onSelected]);
2959
2960
  return jsx(FieldWrapper, {
2960
2961
  formIndex: props.formIndex,
2961
- name: fieldName,
2962
+ name: props.name,
2962
2963
  props: props.props,
2963
2964
  context: !context.active ? context : null,
2965
+ mounted: mounted,
2966
+ mapper: props.mapper,
2967
+ visibility: props.visibility || true,
2964
2968
  children: props.children && props.children
2965
2969
  });
2966
2970
  };