@sebgroup/green-react 1.0.0-beta.6 → 1.0.0-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.esm.js CHANGED
@@ -1,5 +1,5 @@
1
- import { jsx, jsxs } from 'react/jsx-runtime';
2
- import React, { useState, useEffect, useMemo, useRef } from 'react';
1
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
+ import React, { useState, useLayoutEffect, useEffect, useMemo, useRef } from 'react';
3
3
  import { randomId, validateClassName } from '@sebgroup/extract';
4
4
 
5
5
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
@@ -9,7 +9,7 @@ var check = function (it) {
9
9
  };
10
10
 
11
11
  // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
12
- var global$E =
12
+ var global$r =
13
13
  // eslint-disable-next-line es/no-global-this -- safe
14
14
  check(typeof globalThis == 'object' && globalThis) ||
15
15
  check(typeof window == 'object' && window) ||
@@ -21,7 +21,7 @@ var global$E =
21
21
 
22
22
  var objectGetOwnPropertyDescriptor = {};
23
23
 
24
- var fails$d = function (exec) {
24
+ var fails$a = function (exec) {
25
25
  try {
26
26
  return !!exec();
27
27
  } catch (error) {
@@ -29,43 +29,43 @@ var fails$d = function (exec) {
29
29
  }
30
30
  };
31
31
 
32
- var fails$c = fails$d;
32
+ var fails$9 = fails$a;
33
33
 
34
34
  // Detect IE8's incomplete defineProperty implementation
35
- var descriptors = !fails$c(function () {
35
+ var descriptors = !fails$9(function () {
36
36
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
37
37
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
38
38
  });
39
39
 
40
- var fails$b = fails$d;
40
+ var fails$8 = fails$a;
41
41
 
42
- var functionBindNative = !fails$b(function () {
42
+ var functionBindNative = !fails$8(function () {
43
43
  var test = (function () { /* empty */ }).bind();
44
44
  // eslint-disable-next-line no-prototype-builtins -- safe
45
45
  return typeof test != 'function' || test.hasOwnProperty('prototype');
46
46
  });
47
47
 
48
- var NATIVE_BIND$3 = functionBindNative;
48
+ var NATIVE_BIND$1 = functionBindNative;
49
49
 
50
- var call$b = Function.prototype.call;
50
+ var call$6 = Function.prototype.call;
51
51
 
52
- var functionCall = NATIVE_BIND$3 ? call$b.bind(call$b) : function () {
53
- return call$b.apply(call$b, arguments);
52
+ var functionCall = NATIVE_BIND$1 ? call$6.bind(call$6) : function () {
53
+ return call$6.apply(call$6, arguments);
54
54
  };
55
55
 
56
56
  var objectPropertyIsEnumerable = {};
57
57
 
58
58
  var $propertyIsEnumerable = {}.propertyIsEnumerable;
59
59
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
60
- var getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor;
60
+ var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
61
61
 
62
62
  // Nashorn ~ JDK8 bug
63
- var NASHORN_BUG = getOwnPropertyDescriptor$2 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
63
+ var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
64
64
 
65
65
  // `Object.prototype.propertyIsEnumerable` method implementation
66
66
  // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
67
67
  objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
68
- var descriptor = getOwnPropertyDescriptor$2(this, V);
68
+ var descriptor = getOwnPropertyDescriptor$1(this, V);
69
69
  return !!descriptor && descriptor.enumerable;
70
70
  } : $propertyIsEnumerable;
71
71
 
@@ -78,103 +78,103 @@ var createPropertyDescriptor$3 = function (bitmap, value) {
78
78
  };
79
79
  };
80
80
 
81
- var NATIVE_BIND$2 = functionBindNative;
81
+ var NATIVE_BIND = functionBindNative;
82
82
 
83
- var FunctionPrototype$2 = Function.prototype;
84
- var bind$5 = FunctionPrototype$2.bind;
85
- var call$a = FunctionPrototype$2.call;
86
- var uncurryThis$h = NATIVE_BIND$2 && bind$5.bind(call$a, call$a);
83
+ var FunctionPrototype$1 = Function.prototype;
84
+ var bind = FunctionPrototype$1.bind;
85
+ var call$5 = FunctionPrototype$1.call;
86
+ var uncurryThis$c = NATIVE_BIND && bind.bind(call$5, call$5);
87
87
 
88
- var functionUncurryThis = NATIVE_BIND$2 ? function (fn) {
89
- return fn && uncurryThis$h(fn);
88
+ var functionUncurryThis = NATIVE_BIND ? function (fn) {
89
+ return fn && uncurryThis$c(fn);
90
90
  } : function (fn) {
91
91
  return fn && function () {
92
- return call$a.apply(fn, arguments);
92
+ return call$5.apply(fn, arguments);
93
93
  };
94
94
  };
95
95
 
96
- var uncurryThis$g = functionUncurryThis;
96
+ var uncurryThis$b = functionUncurryThis;
97
97
 
98
- var toString$5 = uncurryThis$g({}.toString);
99
- var stringSlice$1 = uncurryThis$g(''.slice);
98
+ var toString$3 = uncurryThis$b({}.toString);
99
+ var stringSlice$1 = uncurryThis$b(''.slice);
100
100
 
101
101
  var classofRaw$1 = function (it) {
102
- return stringSlice$1(toString$5(it), 8, -1);
102
+ return stringSlice$1(toString$3(it), 8, -1);
103
103
  };
104
104
 
105
- var global$D = global$E;
106
- var uncurryThis$f = functionUncurryThis;
107
- var fails$a = fails$d;
108
- var classof$5 = classofRaw$1;
105
+ var global$q = global$r;
106
+ var uncurryThis$a = functionUncurryThis;
107
+ var fails$7 = fails$a;
108
+ var classof$2 = classofRaw$1;
109
109
 
110
- var Object$5 = global$D.Object;
111
- var split = uncurryThis$f(''.split);
110
+ var Object$5 = global$q.Object;
111
+ var split = uncurryThis$a(''.split);
112
112
 
113
113
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
114
- var indexedObject = fails$a(function () {
114
+ var indexedObject = fails$7(function () {
115
115
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
116
116
  // eslint-disable-next-line no-prototype-builtins -- safe
117
117
  return !Object$5('z').propertyIsEnumerable(0);
118
118
  }) ? function (it) {
119
- return classof$5(it) == 'String' ? split(it, '') : Object$5(it);
119
+ return classof$2(it) == 'String' ? split(it, '') : Object$5(it);
120
120
  } : Object$5;
121
121
 
122
- var global$C = global$E;
122
+ var global$p = global$r;
123
123
 
124
- var TypeError$e = global$C.TypeError;
124
+ var TypeError$8 = global$p.TypeError;
125
125
 
126
126
  // `RequireObjectCoercible` abstract operation
127
127
  // https://tc39.es/ecma262/#sec-requireobjectcoercible
128
- var requireObjectCoercible$3 = function (it) {
129
- if (it == undefined) throw TypeError$e("Can't call method on " + it);
128
+ var requireObjectCoercible$2 = function (it) {
129
+ if (it == undefined) throw TypeError$8("Can't call method on " + it);
130
130
  return it;
131
131
  };
132
132
 
133
133
  // toObject with fallback for non-array-like ES3 strings
134
134
  var IndexedObject$1 = indexedObject;
135
- var requireObjectCoercible$2 = requireObjectCoercible$3;
135
+ var requireObjectCoercible$1 = requireObjectCoercible$2;
136
136
 
137
137
  var toIndexedObject$5 = function (it) {
138
- return IndexedObject$1(requireObjectCoercible$2(it));
138
+ return IndexedObject$1(requireObjectCoercible$1(it));
139
139
  };
140
140
 
141
141
  // `IsCallable` abstract operation
142
142
  // https://tc39.es/ecma262/#sec-iscallable
143
- var isCallable$i = function (argument) {
143
+ var isCallable$f = function (argument) {
144
144
  return typeof argument == 'function';
145
145
  };
146
146
 
147
- var isCallable$h = isCallable$i;
147
+ var isCallable$e = isCallable$f;
148
148
 
149
- var isObject$7 = function (it) {
150
- return typeof it == 'object' ? it !== null : isCallable$h(it);
149
+ var isObject$5 = function (it) {
150
+ return typeof it == 'object' ? it !== null : isCallable$e(it);
151
151
  };
152
152
 
153
- var global$B = global$E;
154
- var isCallable$g = isCallable$i;
153
+ var global$o = global$r;
154
+ var isCallable$d = isCallable$f;
155
155
 
156
156
  var aFunction = function (argument) {
157
- return isCallable$g(argument) ? argument : undefined;
157
+ return isCallable$d(argument) ? argument : undefined;
158
158
  };
159
159
 
160
- var getBuiltIn$7 = function (namespace, method) {
161
- return arguments.length < 2 ? aFunction(global$B[namespace]) : global$B[namespace] && global$B[namespace][method];
160
+ var getBuiltIn$4 = function (namespace, method) {
161
+ return arguments.length < 2 ? aFunction(global$o[namespace]) : global$o[namespace] && global$o[namespace][method];
162
162
  };
163
163
 
164
- var uncurryThis$e = functionUncurryThis;
164
+ var uncurryThis$9 = functionUncurryThis;
165
165
 
166
- var objectIsPrototypeOf = uncurryThis$e({}.isPrototypeOf);
166
+ var objectIsPrototypeOf = uncurryThis$9({}.isPrototypeOf);
167
167
 
168
- var getBuiltIn$6 = getBuiltIn$7;
168
+ var getBuiltIn$3 = getBuiltIn$4;
169
169
 
170
- var engineUserAgent = getBuiltIn$6('navigator', 'userAgent') || '';
170
+ var engineUserAgent = getBuiltIn$3('navigator', 'userAgent') || '';
171
171
 
172
- var global$A = global$E;
173
- var userAgent$3 = engineUserAgent;
172
+ var global$n = global$r;
173
+ var userAgent = engineUserAgent;
174
174
 
175
- var process$3 = global$A.process;
176
- var Deno = global$A.Deno;
177
- var versions = process$3 && process$3.versions || Deno && Deno.version;
175
+ var process = global$n.process;
176
+ var Deno = global$n.Deno;
177
+ var versions = process && process.versions || Deno && Deno.version;
178
178
  var v8 = versions && versions.v8;
179
179
  var match, version;
180
180
 
@@ -187,10 +187,10 @@ if (v8) {
187
187
 
188
188
  // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
189
189
  // so check `userAgent` even if `.v8` exists, but 0
190
- if (!version && userAgent$3) {
191
- match = userAgent$3.match(/Edge\/(\d+)/);
190
+ if (!version && userAgent) {
191
+ match = userAgent.match(/Edge\/(\d+)/);
192
192
  if (!match || match[1] >= 74) {
193
- match = userAgent$3.match(/Chrome\/(\d+)/);
193
+ match = userAgent.match(/Chrome\/(\d+)/);
194
194
  if (match) version = +match[1];
195
195
  }
196
196
  }
@@ -199,17 +199,17 @@ var engineV8Version = version;
199
199
 
200
200
  /* eslint-disable es/no-symbol -- required for testing */
201
201
 
202
- var V8_VERSION$1 = engineV8Version;
203
- var fails$9 = fails$d;
202
+ var V8_VERSION = engineV8Version;
203
+ var fails$6 = fails$a;
204
204
 
205
205
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
206
- var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$9(function () {
206
+ var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$6(function () {
207
207
  var symbol = Symbol();
208
208
  // Chrome 38 Symbol has incorrect toString conversion
209
209
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
210
210
  return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
211
211
  // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
212
- !Symbol.sham && V8_VERSION$1 && V8_VERSION$1 < 41;
212
+ !Symbol.sham && V8_VERSION && V8_VERSION < 41;
213
213
  });
214
214
 
215
215
  /* eslint-disable es/no-symbol -- required for testing */
@@ -220,91 +220,91 @@ var useSymbolAsUid = NATIVE_SYMBOL$2
220
220
  && !Symbol.sham
221
221
  && typeof Symbol.iterator == 'symbol';
222
222
 
223
- var global$z = global$E;
224
- var getBuiltIn$5 = getBuiltIn$7;
225
- var isCallable$f = isCallable$i;
226
- var isPrototypeOf$3 = objectIsPrototypeOf;
223
+ var global$m = global$r;
224
+ var getBuiltIn$2 = getBuiltIn$4;
225
+ var isCallable$c = isCallable$f;
226
+ var isPrototypeOf$1 = objectIsPrototypeOf;
227
227
  var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
228
228
 
229
- var Object$4 = global$z.Object;
229
+ var Object$4 = global$m.Object;
230
230
 
231
231
  var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
232
232
  return typeof it == 'symbol';
233
233
  } : function (it) {
234
- var $Symbol = getBuiltIn$5('Symbol');
235
- return isCallable$f($Symbol) && isPrototypeOf$3($Symbol.prototype, Object$4(it));
234
+ var $Symbol = getBuiltIn$2('Symbol');
235
+ return isCallable$c($Symbol) && isPrototypeOf$1($Symbol.prototype, Object$4(it));
236
236
  };
237
237
 
238
- var global$y = global$E;
238
+ var global$l = global$r;
239
239
 
240
- var String$5 = global$y.String;
240
+ var String$4 = global$l.String;
241
241
 
242
- var tryToString$4 = function (argument) {
242
+ var tryToString$1 = function (argument) {
243
243
  try {
244
- return String$5(argument);
244
+ return String$4(argument);
245
245
  } catch (error) {
246
246
  return 'Object';
247
247
  }
248
248
  };
249
249
 
250
- var global$x = global$E;
251
- var isCallable$e = isCallable$i;
252
- var tryToString$3 = tryToString$4;
250
+ var global$k = global$r;
251
+ var isCallable$b = isCallable$f;
252
+ var tryToString = tryToString$1;
253
253
 
254
- var TypeError$d = global$x.TypeError;
254
+ var TypeError$7 = global$k.TypeError;
255
255
 
256
256
  // `Assert: IsCallable(argument) is true`
257
- var aCallable$5 = function (argument) {
258
- if (isCallable$e(argument)) return argument;
259
- throw TypeError$d(tryToString$3(argument) + ' is not a function');
257
+ var aCallable$1 = function (argument) {
258
+ if (isCallable$b(argument)) return argument;
259
+ throw TypeError$7(tryToString(argument) + ' is not a function');
260
260
  };
261
261
 
262
- var aCallable$4 = aCallable$5;
262
+ var aCallable = aCallable$1;
263
263
 
264
264
  // `GetMethod` abstract operation
265
265
  // https://tc39.es/ecma262/#sec-getmethod
266
- var getMethod$3 = function (V, P) {
266
+ var getMethod$1 = function (V, P) {
267
267
  var func = V[P];
268
- return func == null ? undefined : aCallable$4(func);
268
+ return func == null ? undefined : aCallable(func);
269
269
  };
270
270
 
271
- var global$w = global$E;
272
- var call$9 = functionCall;
273
- var isCallable$d = isCallable$i;
274
- var isObject$6 = isObject$7;
271
+ var global$j = global$r;
272
+ var call$4 = functionCall;
273
+ var isCallable$a = isCallable$f;
274
+ var isObject$4 = isObject$5;
275
275
 
276
- var TypeError$c = global$w.TypeError;
276
+ var TypeError$6 = global$j.TypeError;
277
277
 
278
278
  // `OrdinaryToPrimitive` abstract operation
279
279
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
280
280
  var ordinaryToPrimitive$1 = function (input, pref) {
281
281
  var fn, val;
282
- if (pref === 'string' && isCallable$d(fn = input.toString) && !isObject$6(val = call$9(fn, input))) return val;
283
- if (isCallable$d(fn = input.valueOf) && !isObject$6(val = call$9(fn, input))) return val;
284
- if (pref !== 'string' && isCallable$d(fn = input.toString) && !isObject$6(val = call$9(fn, input))) return val;
285
- throw TypeError$c("Can't convert object to primitive value");
282
+ if (pref === 'string' && isCallable$a(fn = input.toString) && !isObject$4(val = call$4(fn, input))) return val;
283
+ if (isCallable$a(fn = input.valueOf) && !isObject$4(val = call$4(fn, input))) return val;
284
+ if (pref !== 'string' && isCallable$a(fn = input.toString) && !isObject$4(val = call$4(fn, input))) return val;
285
+ throw TypeError$6("Can't convert object to primitive value");
286
286
  };
287
287
 
288
288
  var shared$3 = {exports: {}};
289
289
 
290
- var global$v = global$E;
290
+ var global$i = global$r;
291
291
 
292
292
  // eslint-disable-next-line es/no-object-defineproperty -- safe
293
293
  var defineProperty$4 = Object.defineProperty;
294
294
 
295
295
  var setGlobal$3 = function (key, value) {
296
296
  try {
297
- defineProperty$4(global$v, key, { value: value, configurable: true, writable: true });
297
+ defineProperty$4(global$i, key, { value: value, configurable: true, writable: true });
298
298
  } catch (error) {
299
- global$v[key] = value;
299
+ global$i[key] = value;
300
300
  } return value;
301
301
  };
302
302
 
303
- var global$u = global$E;
303
+ var global$h = global$r;
304
304
  var setGlobal$2 = setGlobal$3;
305
305
 
306
306
  var SHARED = '__core-js_shared__';
307
- var store$3 = global$u[SHARED] || setGlobal$2(SHARED, {});
307
+ var store$3 = global$h[SHARED] || setGlobal$2(SHARED, {});
308
308
 
309
309
  var sharedStore = store$3;
310
310
 
@@ -320,21 +320,21 @@ var store$2 = sharedStore;
320
320
  source: 'https://github.com/zloirock/core-js'
321
321
  });
322
322
 
323
- var global$t = global$E;
324
- var requireObjectCoercible$1 = requireObjectCoercible$3;
323
+ var global$g = global$r;
324
+ var requireObjectCoercible = requireObjectCoercible$2;
325
325
 
326
- var Object$3 = global$t.Object;
326
+ var Object$3 = global$g.Object;
327
327
 
328
328
  // `ToObject` abstract operation
329
329
  // https://tc39.es/ecma262/#sec-toobject
330
330
  var toObject$3 = function (argument) {
331
- return Object$3(requireObjectCoercible$1(argument));
331
+ return Object$3(requireObjectCoercible(argument));
332
332
  };
333
333
 
334
- var uncurryThis$d = functionUncurryThis;
334
+ var uncurryThis$8 = functionUncurryThis;
335
335
  var toObject$2 = toObject$3;
336
336
 
337
- var hasOwnProperty = uncurryThis$d({}.hasOwnProperty);
337
+ var hasOwnProperty = uncurryThis$8({}.hasOwnProperty);
338
338
 
339
339
  // `HasOwnProperty` abstract operation
340
340
  // https://tc39.es/ecma262/#sec-hasownproperty
@@ -342,33 +342,33 @@ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
342
342
  return hasOwnProperty(toObject$2(it), key);
343
343
  };
344
344
 
345
- var uncurryThis$c = functionUncurryThis;
345
+ var uncurryThis$7 = functionUncurryThis;
346
346
 
347
347
  var id = 0;
348
348
  var postfix = Math.random();
349
- var toString$4 = uncurryThis$c(1.0.toString);
349
+ var toString$2 = uncurryThis$7(1.0.toString);
350
350
 
351
351
  var uid$2 = function (key) {
352
- return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$4(++id + postfix, 36);
352
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$2(++id + postfix, 36);
353
353
  };
354
354
 
355
- var global$s = global$E;
355
+ var global$f = global$r;
356
356
  var shared$2 = shared$3.exports;
357
- var hasOwn$a = hasOwnProperty_1;
357
+ var hasOwn$9 = hasOwnProperty_1;
358
358
  var uid$1 = uid$2;
359
359
  var NATIVE_SYMBOL$1 = nativeSymbol;
360
360
  var USE_SYMBOL_AS_UID = useSymbolAsUid;
361
361
 
362
362
  var WellKnownSymbolsStore = shared$2('wks');
363
- var Symbol$2 = global$s.Symbol;
364
- var symbolFor = Symbol$2 && Symbol$2['for'];
365
- var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$2 : Symbol$2 && Symbol$2.withoutSetter || uid$1;
363
+ var Symbol$1 = global$f.Symbol;
364
+ var symbolFor = Symbol$1 && Symbol$1['for'];
365
+ var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
366
366
 
367
- var wellKnownSymbol$e = function (name) {
368
- if (!hasOwn$a(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL$1 || typeof WellKnownSymbolsStore[name] == 'string')) {
367
+ var wellKnownSymbol$8 = function (name) {
368
+ if (!hasOwn$9(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL$1 || typeof WellKnownSymbolsStore[name] == 'string')) {
369
369
  var description = 'Symbol.' + name;
370
- if (NATIVE_SYMBOL$1 && hasOwn$a(Symbol$2, name)) {
371
- WellKnownSymbolsStore[name] = Symbol$2[name];
370
+ if (NATIVE_SYMBOL$1 && hasOwn$9(Symbol$1, name)) {
371
+ WellKnownSymbolsStore[name] = Symbol$1[name];
372
372
  } else if (USE_SYMBOL_AS_UID && symbolFor) {
373
373
  WellKnownSymbolsStore[name] = symbolFor(description);
374
374
  } else {
@@ -377,28 +377,28 @@ var wellKnownSymbol$e = function (name) {
377
377
  } return WellKnownSymbolsStore[name];
378
378
  };
379
379
 
380
- var global$r = global$E;
381
- var call$8 = functionCall;
382
- var isObject$5 = isObject$7;
380
+ var global$e = global$r;
381
+ var call$3 = functionCall;
382
+ var isObject$3 = isObject$5;
383
383
  var isSymbol$1 = isSymbol$2;
384
- var getMethod$2 = getMethod$3;
384
+ var getMethod = getMethod$1;
385
385
  var ordinaryToPrimitive = ordinaryToPrimitive$1;
386
- var wellKnownSymbol$d = wellKnownSymbol$e;
386
+ var wellKnownSymbol$7 = wellKnownSymbol$8;
387
387
 
388
- var TypeError$b = global$r.TypeError;
389
- var TO_PRIMITIVE = wellKnownSymbol$d('toPrimitive');
388
+ var TypeError$5 = global$e.TypeError;
389
+ var TO_PRIMITIVE = wellKnownSymbol$7('toPrimitive');
390
390
 
391
391
  // `ToPrimitive` abstract operation
392
392
  // https://tc39.es/ecma262/#sec-toprimitive
393
393
  var toPrimitive$1 = function (input, pref) {
394
- if (!isObject$5(input) || isSymbol$1(input)) return input;
395
- var exoticToPrim = getMethod$2(input, TO_PRIMITIVE);
394
+ if (!isObject$3(input) || isSymbol$1(input)) return input;
395
+ var exoticToPrim = getMethod(input, TO_PRIMITIVE);
396
396
  var result;
397
397
  if (exoticToPrim) {
398
398
  if (pref === undefined) pref = 'default';
399
- result = call$8(exoticToPrim, input, pref);
400
- if (!isObject$5(result) || isSymbol$1(result)) return result;
401
- throw TypeError$b("Can't convert object to primitive value");
399
+ result = call$3(exoticToPrim, input, pref);
400
+ if (!isObject$3(result) || isSymbol$1(result)) return result;
401
+ throw TypeError$5("Can't convert object to primitive value");
402
402
  }
403
403
  if (pref === undefined) pref = 'number';
404
404
  return ordinaryToPrimitive(input, pref);
@@ -414,36 +414,36 @@ var toPropertyKey$2 = function (argument) {
414
414
  return isSymbol(key) ? key : key + '';
415
415
  };
416
416
 
417
- var global$q = global$E;
418
- var isObject$4 = isObject$7;
417
+ var global$d = global$r;
418
+ var isObject$2 = isObject$5;
419
419
 
420
- var document$3 = global$q.document;
420
+ var document$1 = global$d.document;
421
421
  // typeof document.createElement is 'object' in old IE
422
- var EXISTS$1 = isObject$4(document$3) && isObject$4(document$3.createElement);
422
+ var EXISTS$1 = isObject$2(document$1) && isObject$2(document$1.createElement);
423
423
 
424
424
  var documentCreateElement$2 = function (it) {
425
- return EXISTS$1 ? document$3.createElement(it) : {};
425
+ return EXISTS$1 ? document$1.createElement(it) : {};
426
426
  };
427
427
 
428
- var DESCRIPTORS$a = descriptors;
429
- var fails$8 = fails$d;
430
- var createElement$1 = documentCreateElement$2;
428
+ var DESCRIPTORS$9 = descriptors;
429
+ var fails$5 = fails$a;
430
+ var createElement = documentCreateElement$2;
431
431
 
432
432
  // Thanks to IE8 for its funny defineProperty
433
- var ie8DomDefine = !DESCRIPTORS$a && !fails$8(function () {
433
+ var ie8DomDefine = !DESCRIPTORS$9 && !fails$5(function () {
434
434
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
435
- return Object.defineProperty(createElement$1('div'), 'a', {
435
+ return Object.defineProperty(createElement('div'), 'a', {
436
436
  get: function () { return 7; }
437
437
  }).a != 7;
438
438
  });
439
439
 
440
- var DESCRIPTORS$9 = descriptors;
441
- var call$7 = functionCall;
440
+ var DESCRIPTORS$8 = descriptors;
441
+ var call$2 = functionCall;
442
442
  var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
443
443
  var createPropertyDescriptor$2 = createPropertyDescriptor$3;
444
444
  var toIndexedObject$4 = toIndexedObject$5;
445
445
  var toPropertyKey$1 = toPropertyKey$2;
446
- var hasOwn$9 = hasOwnProperty_1;
446
+ var hasOwn$8 = hasOwnProperty_1;
447
447
  var IE8_DOM_DEFINE$1 = ie8DomDefine;
448
448
 
449
449
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
@@ -451,23 +451,23 @@ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
451
451
 
452
452
  // `Object.getOwnPropertyDescriptor` method
453
453
  // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
454
- objectGetOwnPropertyDescriptor.f = DESCRIPTORS$9 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
454
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$8 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
455
455
  O = toIndexedObject$4(O);
456
456
  P = toPropertyKey$1(P);
457
457
  if (IE8_DOM_DEFINE$1) try {
458
458
  return $getOwnPropertyDescriptor$1(O, P);
459
459
  } catch (error) { /* empty */ }
460
- if (hasOwn$9(O, P)) return createPropertyDescriptor$2(!call$7(propertyIsEnumerableModule$1.f, O, P), O[P]);
460
+ if (hasOwn$8(O, P)) return createPropertyDescriptor$2(!call$2(propertyIsEnumerableModule$1.f, O, P), O[P]);
461
461
  };
462
462
 
463
463
  var objectDefineProperty = {};
464
464
 
465
- var DESCRIPTORS$8 = descriptors;
466
- var fails$7 = fails$d;
465
+ var DESCRIPTORS$7 = descriptors;
466
+ var fails$4 = fails$a;
467
467
 
468
468
  // V8 ~ Chrome 36-
469
469
  // https://bugs.chromium.org/p/v8/issues/detail?id=3334
470
- var v8PrototypeDefineBug = DESCRIPTORS$8 && fails$7(function () {
470
+ var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$4(function () {
471
471
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
472
472
  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
473
473
  value: 42,
@@ -475,26 +475,26 @@ var v8PrototypeDefineBug = DESCRIPTORS$8 && fails$7(function () {
475
475
  }).prototype != 42;
476
476
  });
477
477
 
478
- var global$p = global$E;
479
- var isObject$3 = isObject$7;
478
+ var global$c = global$r;
479
+ var isObject$1 = isObject$5;
480
480
 
481
- var String$4 = global$p.String;
482
- var TypeError$a = global$p.TypeError;
481
+ var String$3 = global$c.String;
482
+ var TypeError$4 = global$c.TypeError;
483
483
 
484
484
  // `Assert: Type(argument) is Object`
485
- var anObject$a = function (argument) {
486
- if (isObject$3(argument)) return argument;
487
- throw TypeError$a(String$4(argument) + ' is not an object');
485
+ var anObject$5 = function (argument) {
486
+ if (isObject$1(argument)) return argument;
487
+ throw TypeError$4(String$3(argument) + ' is not an object');
488
488
  };
489
489
 
490
- var global$o = global$E;
491
- var DESCRIPTORS$7 = descriptors;
490
+ var global$b = global$r;
491
+ var DESCRIPTORS$6 = descriptors;
492
492
  var IE8_DOM_DEFINE = ie8DomDefine;
493
493
  var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
494
- var anObject$9 = anObject$a;
494
+ var anObject$4 = anObject$5;
495
495
  var toPropertyKey = toPropertyKey$2;
496
496
 
497
- var TypeError$9 = global$o.TypeError;
497
+ var TypeError$3 = global$b.TypeError;
498
498
  // eslint-disable-next-line es/no-object-defineproperty -- safe
499
499
  var $defineProperty = Object.defineProperty;
500
500
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
@@ -505,10 +505,10 @@ var WRITABLE = 'writable';
505
505
 
506
506
  // `Object.defineProperty` method
507
507
  // https://tc39.es/ecma262/#sec-object.defineproperty
508
- objectDefineProperty.f = DESCRIPTORS$7 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
509
- anObject$9(O);
508
+ objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
509
+ anObject$4(O);
510
510
  P = toPropertyKey(P);
511
- anObject$9(Attributes);
511
+ anObject$4(Attributes);
512
512
  if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
513
513
  var current = $getOwnPropertyDescriptor(O, P);
514
514
  if (current && current[WRITABLE]) {
@@ -521,52 +521,52 @@ objectDefineProperty.f = DESCRIPTORS$7 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
521
521
  }
522
522
  } return $defineProperty(O, P, Attributes);
523
523
  } : $defineProperty : function defineProperty(O, P, Attributes) {
524
- anObject$9(O);
524
+ anObject$4(O);
525
525
  P = toPropertyKey(P);
526
- anObject$9(Attributes);
526
+ anObject$4(Attributes);
527
527
  if (IE8_DOM_DEFINE) try {
528
528
  return $defineProperty(O, P, Attributes);
529
529
  } catch (error) { /* empty */ }
530
- if ('get' in Attributes || 'set' in Attributes) throw TypeError$9('Accessors not supported');
530
+ if ('get' in Attributes || 'set' in Attributes) throw TypeError$3('Accessors not supported');
531
531
  if ('value' in Attributes) O[P] = Attributes.value;
532
532
  return O;
533
533
  };
534
534
 
535
- var DESCRIPTORS$6 = descriptors;
536
- var definePropertyModule$4 = objectDefineProperty;
535
+ var DESCRIPTORS$5 = descriptors;
536
+ var definePropertyModule$3 = objectDefineProperty;
537
537
  var createPropertyDescriptor$1 = createPropertyDescriptor$3;
538
538
 
539
- var createNonEnumerableProperty$5 = DESCRIPTORS$6 ? function (object, key, value) {
540
- return definePropertyModule$4.f(object, key, createPropertyDescriptor$1(1, value));
539
+ var createNonEnumerableProperty$5 = DESCRIPTORS$5 ? function (object, key, value) {
540
+ return definePropertyModule$3.f(object, key, createPropertyDescriptor$1(1, value));
541
541
  } : function (object, key, value) {
542
542
  object[key] = value;
543
543
  return object;
544
544
  };
545
545
 
546
- var redefine$5 = {exports: {}};
546
+ var redefine$3 = {exports: {}};
547
547
 
548
- var uncurryThis$b = functionUncurryThis;
549
- var isCallable$c = isCallable$i;
548
+ var uncurryThis$6 = functionUncurryThis;
549
+ var isCallable$9 = isCallable$f;
550
550
  var store$1 = sharedStore;
551
551
 
552
- var functionToString = uncurryThis$b(Function.toString);
552
+ var functionToString = uncurryThis$6(Function.toString);
553
553
 
554
554
  // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
555
- if (!isCallable$c(store$1.inspectSource)) {
555
+ if (!isCallable$9(store$1.inspectSource)) {
556
556
  store$1.inspectSource = function (it) {
557
557
  return functionToString(it);
558
558
  };
559
559
  }
560
560
 
561
- var inspectSource$4 = store$1.inspectSource;
561
+ var inspectSource$2 = store$1.inspectSource;
562
562
 
563
- var global$n = global$E;
564
- var isCallable$b = isCallable$i;
565
- var inspectSource$3 = inspectSource$4;
563
+ var global$a = global$r;
564
+ var isCallable$8 = isCallable$f;
565
+ var inspectSource$1 = inspectSource$2;
566
566
 
567
- var WeakMap$1 = global$n.WeakMap;
567
+ var WeakMap$1 = global$a.WeakMap;
568
568
 
569
- var nativeWeakMap = isCallable$b(WeakMap$1) && /native code/.test(inspectSource$3(WeakMap$1));
569
+ var nativeWeakMap = isCallable$8(WeakMap$1) && /native code/.test(inspectSource$1(WeakMap$1));
570
570
 
571
571
  var shared$1 = shared$3.exports;
572
572
  var uid = uid$2;
@@ -580,40 +580,40 @@ var sharedKey$3 = function (key) {
580
580
  var hiddenKeys$4 = {};
581
581
 
582
582
  var NATIVE_WEAK_MAP = nativeWeakMap;
583
- var global$m = global$E;
584
- var uncurryThis$a = functionUncurryThis;
585
- var isObject$2 = isObject$7;
583
+ var global$9 = global$r;
584
+ var uncurryThis$5 = functionUncurryThis;
585
+ var isObject = isObject$5;
586
586
  var createNonEnumerableProperty$4 = createNonEnumerableProperty$5;
587
- var hasOwn$8 = hasOwnProperty_1;
587
+ var hasOwn$7 = hasOwnProperty_1;
588
588
  var shared = sharedStore;
589
589
  var sharedKey$2 = sharedKey$3;
590
590
  var hiddenKeys$3 = hiddenKeys$4;
591
591
 
592
592
  var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
593
- var TypeError$8 = global$m.TypeError;
594
- var WeakMap = global$m.WeakMap;
595
- var set$1, get, has;
593
+ var TypeError$2 = global$9.TypeError;
594
+ var WeakMap = global$9.WeakMap;
595
+ var set, get, has;
596
596
 
597
597
  var enforce = function (it) {
598
- return has(it) ? get(it) : set$1(it, {});
598
+ return has(it) ? get(it) : set(it, {});
599
599
  };
600
600
 
601
601
  var getterFor = function (TYPE) {
602
602
  return function (it) {
603
603
  var state;
604
- if (!isObject$2(it) || (state = get(it)).type !== TYPE) {
605
- throw TypeError$8('Incompatible receiver, ' + TYPE + ' required');
604
+ if (!isObject(it) || (state = get(it)).type !== TYPE) {
605
+ throw TypeError$2('Incompatible receiver, ' + TYPE + ' required');
606
606
  } return state;
607
607
  };
608
608
  };
609
609
 
610
610
  if (NATIVE_WEAK_MAP || shared.state) {
611
611
  var store = shared.state || (shared.state = new WeakMap());
612
- var wmget = uncurryThis$a(store.get);
613
- var wmhas = uncurryThis$a(store.has);
614
- var wmset = uncurryThis$a(store.set);
615
- set$1 = function (it, metadata) {
616
- if (wmhas(store, it)) throw new TypeError$8(OBJECT_ALREADY_INITIALIZED);
612
+ var wmget = uncurryThis$5(store.get);
613
+ var wmhas = uncurryThis$5(store.has);
614
+ var wmset = uncurryThis$5(store.set);
615
+ set = function (it, metadata) {
616
+ if (wmhas(store, it)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
617
617
  metadata.facade = it;
618
618
  wmset(store, it, metadata);
619
619
  return metadata;
@@ -627,39 +627,39 @@ if (NATIVE_WEAK_MAP || shared.state) {
627
627
  } else {
628
628
  var STATE = sharedKey$2('state');
629
629
  hiddenKeys$3[STATE] = true;
630
- set$1 = function (it, metadata) {
631
- if (hasOwn$8(it, STATE)) throw new TypeError$8(OBJECT_ALREADY_INITIALIZED);
630
+ set = function (it, metadata) {
631
+ if (hasOwn$7(it, STATE)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
632
632
  metadata.facade = it;
633
633
  createNonEnumerableProperty$4(it, STATE, metadata);
634
634
  return metadata;
635
635
  };
636
636
  get = function (it) {
637
- return hasOwn$8(it, STATE) ? it[STATE] : {};
637
+ return hasOwn$7(it, STATE) ? it[STATE] : {};
638
638
  };
639
639
  has = function (it) {
640
- return hasOwn$8(it, STATE);
640
+ return hasOwn$7(it, STATE);
641
641
  };
642
642
  }
643
643
 
644
644
  var internalState = {
645
- set: set$1,
645
+ set: set,
646
646
  get: get,
647
647
  has: has,
648
648
  enforce: enforce,
649
649
  getterFor: getterFor
650
650
  };
651
651
 
652
- var DESCRIPTORS$5 = descriptors;
653
- var hasOwn$7 = hasOwnProperty_1;
652
+ var DESCRIPTORS$4 = descriptors;
653
+ var hasOwn$6 = hasOwnProperty_1;
654
654
 
655
- var FunctionPrototype$1 = Function.prototype;
655
+ var FunctionPrototype = Function.prototype;
656
656
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
657
- var getDescriptor = DESCRIPTORS$5 && Object.getOwnPropertyDescriptor;
657
+ var getDescriptor = DESCRIPTORS$4 && Object.getOwnPropertyDescriptor;
658
658
 
659
- var EXISTS = hasOwn$7(FunctionPrototype$1, 'name');
659
+ var EXISTS = hasOwn$6(FunctionPrototype, 'name');
660
660
  // additional protection from minified / mangled / dropped function names
661
661
  var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
662
- var CONFIGURABLE = EXISTS && (!DESCRIPTORS$5 || (DESCRIPTORS$5 && getDescriptor(FunctionPrototype$1, 'name').configurable));
662
+ var CONFIGURABLE = EXISTS && (!DESCRIPTORS$4 || (DESCRIPTORS$4 && getDescriptor(FunctionPrototype, 'name').configurable));
663
663
 
664
664
  var functionName = {
665
665
  EXISTS: EXISTS,
@@ -667,30 +667,30 @@ var functionName = {
667
667
  CONFIGURABLE: CONFIGURABLE
668
668
  };
669
669
 
670
- var global$l = global$E;
671
- var isCallable$a = isCallable$i;
672
- var hasOwn$6 = hasOwnProperty_1;
670
+ var global$8 = global$r;
671
+ var isCallable$7 = isCallable$f;
672
+ var hasOwn$5 = hasOwnProperty_1;
673
673
  var createNonEnumerableProperty$3 = createNonEnumerableProperty$5;
674
674
  var setGlobal$1 = setGlobal$3;
675
- var inspectSource$2 = inspectSource$4;
676
- var InternalStateModule$2 = internalState;
675
+ var inspectSource = inspectSource$2;
676
+ var InternalStateModule$1 = internalState;
677
677
  var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
678
678
 
679
- var getInternalState$2 = InternalStateModule$2.get;
680
- var enforceInternalState = InternalStateModule$2.enforce;
679
+ var getInternalState$1 = InternalStateModule$1.get;
680
+ var enforceInternalState = InternalStateModule$1.enforce;
681
681
  var TEMPLATE = String(String).split('String');
682
682
 
683
- (redefine$5.exports = function (O, key, value, options) {
683
+ (redefine$3.exports = function (O, key, value, options) {
684
684
  var unsafe = options ? !!options.unsafe : false;
685
685
  var simple = options ? !!options.enumerable : false;
686
686
  var noTargetGet = options ? !!options.noTargetGet : false;
687
687
  var name = options && options.name !== undefined ? options.name : key;
688
688
  var state;
689
- if (isCallable$a(value)) {
689
+ if (isCallable$7(value)) {
690
690
  if (String(name).slice(0, 7) === 'Symbol(') {
691
691
  name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
692
692
  }
693
- if (!hasOwn$6(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
693
+ if (!hasOwn$5(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
694
694
  createNonEnumerableProperty$3(value, 'name', name);
695
695
  }
696
696
  state = enforceInternalState(value);
@@ -698,7 +698,7 @@ var TEMPLATE = String(String).split('String');
698
698
  state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
699
699
  }
700
700
  }
701
- if (O === global$l) {
701
+ if (O === global$8) {
702
702
  if (simple) O[key] = value;
703
703
  else setGlobal$1(key, value);
704
704
  return;
@@ -711,7 +711,7 @@ var TEMPLATE = String(String).split('String');
711
711
  else createNonEnumerableProperty$3(O, key, value);
712
712
  // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
713
713
  })(Function.prototype, 'toString', function toString() {
714
- return isCallable$a(this) && getInternalState$2(this).source || inspectSource$2(this);
714
+ return isCallable$7(this) && getInternalState$1(this).source || inspectSource(this);
715
715
  });
716
716
 
717
717
  var objectGetOwnPropertyNames = {};
@@ -754,19 +754,19 @@ var toLength = toLength$1;
754
754
 
755
755
  // `LengthOfArrayLike` abstract operation
756
756
  // https://tc39.es/ecma262/#sec-lengthofarraylike
757
- var lengthOfArrayLike$2 = function (obj) {
757
+ var lengthOfArrayLike$1 = function (obj) {
758
758
  return toLength(obj.length);
759
759
  };
760
760
 
761
761
  var toIndexedObject$3 = toIndexedObject$5;
762
762
  var toAbsoluteIndex = toAbsoluteIndex$1;
763
- var lengthOfArrayLike$1 = lengthOfArrayLike$2;
763
+ var lengthOfArrayLike = lengthOfArrayLike$1;
764
764
 
765
765
  // `Array.prototype.{ indexOf, includes }` methods implementation
766
- var createMethod$1 = function (IS_INCLUDES) {
766
+ var createMethod = function (IS_INCLUDES) {
767
767
  return function ($this, el, fromIndex) {
768
768
  var O = toIndexedObject$3($this);
769
- var length = lengthOfArrayLike$1(O);
769
+ var length = lengthOfArrayLike(O);
770
770
  var index = toAbsoluteIndex(fromIndex, length);
771
771
  var value;
772
772
  // Array#includes uses SameValueZero equality algorithm
@@ -785,28 +785,28 @@ var createMethod$1 = function (IS_INCLUDES) {
785
785
  var arrayIncludes = {
786
786
  // `Array.prototype.includes` method
787
787
  // https://tc39.es/ecma262/#sec-array.prototype.includes
788
- includes: createMethod$1(true),
788
+ includes: createMethod(true),
789
789
  // `Array.prototype.indexOf` method
790
790
  // https://tc39.es/ecma262/#sec-array.prototype.indexof
791
- indexOf: createMethod$1(false)
791
+ indexOf: createMethod(false)
792
792
  };
793
793
 
794
- var uncurryThis$9 = functionUncurryThis;
795
- var hasOwn$5 = hasOwnProperty_1;
794
+ var uncurryThis$4 = functionUncurryThis;
795
+ var hasOwn$4 = hasOwnProperty_1;
796
796
  var toIndexedObject$2 = toIndexedObject$5;
797
797
  var indexOf = arrayIncludes.indexOf;
798
798
  var hiddenKeys$2 = hiddenKeys$4;
799
799
 
800
- var push = uncurryThis$9([].push);
800
+ var push = uncurryThis$4([].push);
801
801
 
802
802
  var objectKeysInternal = function (object, names) {
803
803
  var O = toIndexedObject$2(object);
804
804
  var i = 0;
805
805
  var result = [];
806
806
  var key;
807
- for (key in O) !hasOwn$5(hiddenKeys$2, key) && hasOwn$5(O, key) && push(result, key);
807
+ for (key in O) !hasOwn$4(hiddenKeys$2, key) && hasOwn$4(O, key) && push(result, key);
808
808
  // Don't enum bug & hidden keys
809
- while (names.length > i) if (hasOwn$5(O, key = names[i++])) {
809
+ while (names.length > i) if (hasOwn$4(O, key = names[i++])) {
810
810
  ~indexOf(result, key) || push(result, key);
811
811
  }
812
812
  return result;
@@ -840,68 +840,68 @@ var objectGetOwnPropertySymbols = {};
840
840
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
841
841
  objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
842
842
 
843
- var getBuiltIn$4 = getBuiltIn$7;
844
- var uncurryThis$8 = functionUncurryThis;
843
+ var getBuiltIn$1 = getBuiltIn$4;
844
+ var uncurryThis$3 = functionUncurryThis;
845
845
  var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
846
846
  var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
847
- var anObject$8 = anObject$a;
847
+ var anObject$3 = anObject$5;
848
848
 
849
- var concat$1 = uncurryThis$8([].concat);
849
+ var concat$1 = uncurryThis$3([].concat);
850
850
 
851
851
  // all object keys, includes non-enumerable and symbols
852
- var ownKeys$1 = getBuiltIn$4('Reflect', 'ownKeys') || function ownKeys(it) {
853
- var keys = getOwnPropertyNamesModule.f(anObject$8(it));
852
+ var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
853
+ var keys = getOwnPropertyNamesModule.f(anObject$3(it));
854
854
  var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
855
855
  return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
856
856
  };
857
857
 
858
- var hasOwn$4 = hasOwnProperty_1;
858
+ var hasOwn$3 = hasOwnProperty_1;
859
859
  var ownKeys = ownKeys$1;
860
860
  var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
861
- var definePropertyModule$3 = objectDefineProperty;
861
+ var definePropertyModule$2 = objectDefineProperty;
862
862
 
863
863
  var copyConstructorProperties$2 = function (target, source, exceptions) {
864
864
  var keys = ownKeys(source);
865
- var defineProperty = definePropertyModule$3.f;
865
+ var defineProperty = definePropertyModule$2.f;
866
866
  var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
867
867
  for (var i = 0; i < keys.length; i++) {
868
868
  var key = keys[i];
869
- if (!hasOwn$4(target, key) && !(exceptions && hasOwn$4(exceptions, key))) {
869
+ if (!hasOwn$3(target, key) && !(exceptions && hasOwn$3(exceptions, key))) {
870
870
  defineProperty(target, key, getOwnPropertyDescriptor(source, key));
871
871
  }
872
872
  }
873
873
  };
874
874
 
875
- var fails$6 = fails$d;
876
- var isCallable$9 = isCallable$i;
875
+ var fails$3 = fails$a;
876
+ var isCallable$6 = isCallable$f;
877
877
 
878
878
  var replacement = /#|\.prototype\./;
879
879
 
880
- var isForced$2 = function (feature, detection) {
880
+ var isForced$1 = function (feature, detection) {
881
881
  var value = data[normalize(feature)];
882
882
  return value == POLYFILL ? true
883
883
  : value == NATIVE ? false
884
- : isCallable$9(detection) ? fails$6(detection)
884
+ : isCallable$6(detection) ? fails$3(detection)
885
885
  : !!detection;
886
886
  };
887
887
 
888
- var normalize = isForced$2.normalize = function (string) {
888
+ var normalize = isForced$1.normalize = function (string) {
889
889
  return String(string).replace(replacement, '.').toLowerCase();
890
890
  };
891
891
 
892
- var data = isForced$2.data = {};
893
- var NATIVE = isForced$2.NATIVE = 'N';
894
- var POLYFILL = isForced$2.POLYFILL = 'P';
892
+ var data = isForced$1.data = {};
893
+ var NATIVE = isForced$1.NATIVE = 'N';
894
+ var POLYFILL = isForced$1.POLYFILL = 'P';
895
895
 
896
- var isForced_1 = isForced$2;
896
+ var isForced_1 = isForced$1;
897
897
 
898
- var global$k = global$E;
899
- var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
898
+ var global$7 = global$r;
899
+ var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
900
900
  var createNonEnumerableProperty$2 = createNonEnumerableProperty$5;
901
- var redefine$4 = redefine$5.exports;
901
+ var redefine$2 = redefine$3.exports;
902
902
  var setGlobal = setGlobal$3;
903
903
  var copyConstructorProperties$1 = copyConstructorProperties$2;
904
- var isForced$1 = isForced_1;
904
+ var isForced = isForced_1;
905
905
 
906
906
  /*
907
907
  options.target - name of the target object
@@ -924,19 +924,19 @@ var _export = function (options, source) {
924
924
  var STATIC = options.stat;
925
925
  var FORCED, target, key, targetProperty, sourceProperty, descriptor;
926
926
  if (GLOBAL) {
927
- target = global$k;
927
+ target = global$7;
928
928
  } else if (STATIC) {
929
- target = global$k[TARGET] || setGlobal(TARGET, {});
929
+ target = global$7[TARGET] || setGlobal(TARGET, {});
930
930
  } else {
931
- target = (global$k[TARGET] || {}).prototype;
931
+ target = (global$7[TARGET] || {}).prototype;
932
932
  }
933
933
  if (target) for (key in source) {
934
934
  sourceProperty = source[key];
935
935
  if (options.noTargetGet) {
936
- descriptor = getOwnPropertyDescriptor$1(target, key);
936
+ descriptor = getOwnPropertyDescriptor(target, key);
937
937
  targetProperty = descriptor && descriptor.value;
938
938
  } else targetProperty = target[key];
939
- FORCED = isForced$1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
939
+ FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
940
940
  // contained in target
941
941
  if (!FORCED && targetProperty !== undefined) {
942
942
  if (typeof sourceProperty == typeof targetProperty) continue;
@@ -947,7 +947,7 @@ var _export = function (options, source) {
947
947
  createNonEnumerableProperty$2(sourceProperty, 'sham', true);
948
948
  }
949
949
  // extend global
950
- redefine$4(target, key, sourceProperty, options);
950
+ redefine$2(target, key, sourceProperty, options);
951
951
  }
952
952
  };
953
953
 
@@ -961,10 +961,10 @@ var objectKeys$2 = Object.keys || function keys(O) {
961
961
  return internalObjectKeys(O, enumBugKeys$1);
962
962
  };
963
963
 
964
- var DESCRIPTORS$4 = descriptors;
965
- var uncurryThis$7 = functionUncurryThis;
966
- var call$6 = functionCall;
967
- var fails$5 = fails$d;
964
+ var DESCRIPTORS$3 = descriptors;
965
+ var uncurryThis$2 = functionUncurryThis;
966
+ var call$1 = functionCall;
967
+ var fails$2 = fails$a;
968
968
  var objectKeys$1 = objectKeys$2;
969
969
  var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
970
970
  var propertyIsEnumerableModule = objectPropertyIsEnumerable;
@@ -975,13 +975,13 @@ var IndexedObject = indexedObject;
975
975
  var $assign = Object.assign;
976
976
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
977
977
  var defineProperty$3 = Object.defineProperty;
978
- var concat = uncurryThis$7([].concat);
978
+ var concat = uncurryThis$2([].concat);
979
979
 
980
980
  // `Object.assign` method
981
981
  // https://tc39.es/ecma262/#sec-object.assign
982
- var objectAssign = !$assign || fails$5(function () {
982
+ var objectAssign = !$assign || fails$2(function () {
983
983
  // should have correct order of operations (Edge bug)
984
- if (DESCRIPTORS$4 && $assign({ b: 1 }, $assign(defineProperty$3({}, 'a', {
984
+ if (DESCRIPTORS$3 && $assign({ b: 1 }, $assign(defineProperty$3({}, 'a', {
985
985
  enumerable: true,
986
986
  get: function () {
987
987
  defineProperty$3(this, 'b', {
@@ -1013,18 +1013,18 @@ var objectAssign = !$assign || fails$5(function () {
1013
1013
  var key;
1014
1014
  while (length > j) {
1015
1015
  key = keys[j++];
1016
- if (!DESCRIPTORS$4 || call$6(propertyIsEnumerable, S, key)) T[key] = S[key];
1016
+ if (!DESCRIPTORS$3 || call$1(propertyIsEnumerable, S, key)) T[key] = S[key];
1017
1017
  }
1018
1018
  } return T;
1019
1019
  } : $assign;
1020
1020
 
1021
- var $$4 = _export;
1021
+ var $$2 = _export;
1022
1022
  var assign = objectAssign;
1023
1023
 
1024
1024
  // `Object.assign` method
1025
1025
  // https://tc39.es/ecma262/#sec-object.assign
1026
1026
  // eslint-disable-next-line es/no-object-assign -- required for testing
1027
- $$4({ target: 'Object', stat: true, forced: Object.assign !== assign }, {
1027
+ $$2({ target: 'Object', stat: true, forced: Object.assign !== assign }, {
1028
1028
  assign: assign
1029
1029
  });
1030
1030
 
@@ -1188,38 +1188,38 @@ const Modal = _a => {
1188
1188
 
1189
1189
  var objectDefineProperties = {};
1190
1190
 
1191
- var DESCRIPTORS$3 = descriptors;
1191
+ var DESCRIPTORS$2 = descriptors;
1192
1192
  var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
1193
- var definePropertyModule$2 = objectDefineProperty;
1194
- var anObject$7 = anObject$a;
1193
+ var definePropertyModule$1 = objectDefineProperty;
1194
+ var anObject$2 = anObject$5;
1195
1195
  var toIndexedObject$1 = toIndexedObject$5;
1196
1196
  var objectKeys = objectKeys$2;
1197
1197
 
1198
1198
  // `Object.defineProperties` method
1199
1199
  // https://tc39.es/ecma262/#sec-object.defineproperties
1200
1200
  // eslint-disable-next-line es/no-object-defineproperties -- safe
1201
- objectDefineProperties.f = DESCRIPTORS$3 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1202
- anObject$7(O);
1201
+ objectDefineProperties.f = DESCRIPTORS$2 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1202
+ anObject$2(O);
1203
1203
  var props = toIndexedObject$1(Properties);
1204
1204
  var keys = objectKeys(Properties);
1205
1205
  var length = keys.length;
1206
1206
  var index = 0;
1207
1207
  var key;
1208
- while (length > index) definePropertyModule$2.f(O, key = keys[index++], props[key]);
1208
+ while (length > index) definePropertyModule$1.f(O, key = keys[index++], props[key]);
1209
1209
  return O;
1210
1210
  };
1211
1211
 
1212
- var getBuiltIn$3 = getBuiltIn$7;
1212
+ var getBuiltIn = getBuiltIn$4;
1213
1213
 
1214
- var html$2 = getBuiltIn$3('document', 'documentElement');
1214
+ var html$1 = getBuiltIn('document', 'documentElement');
1215
1215
 
1216
1216
  /* global ActiveXObject -- old IE, WSH */
1217
1217
 
1218
- var anObject$6 = anObject$a;
1218
+ var anObject$1 = anObject$5;
1219
1219
  var definePropertiesModule = objectDefineProperties;
1220
1220
  var enumBugKeys = enumBugKeys$3;
1221
1221
  var hiddenKeys = hiddenKeys$4;
1222
- var html$1 = html$2;
1222
+ var html = html$1;
1223
1223
  var documentCreateElement$1 = documentCreateElement$2;
1224
1224
  var sharedKey$1 = sharedKey$3;
1225
1225
 
@@ -1251,7 +1251,7 @@ var NullProtoObjectViaIFrame = function () {
1251
1251
  var JS = 'java' + SCRIPT + ':';
1252
1252
  var iframeDocument;
1253
1253
  iframe.style.display = 'none';
1254
- html$1.appendChild(iframe);
1254
+ html.appendChild(iframe);
1255
1255
  // https://github.com/zloirock/core-js/issues/475
1256
1256
  iframe.src = String(JS);
1257
1257
  iframeDocument = iframe.contentWindow.document;
@@ -1288,7 +1288,7 @@ hiddenKeys[IE_PROTO$1] = true;
1288
1288
  var objectCreate = Object.create || function create(O, Properties) {
1289
1289
  var result;
1290
1290
  if (O !== null) {
1291
- EmptyConstructor[PROTOTYPE] = anObject$6(O);
1291
+ EmptyConstructor[PROTOTYPE] = anObject$1(O);
1292
1292
  result = new EmptyConstructor();
1293
1293
  EmptyConstructor[PROTOTYPE] = null;
1294
1294
  // add "__proto__" for Object.getPrototypeOf polyfill
@@ -1297,17 +1297,17 @@ var objectCreate = Object.create || function create(O, Properties) {
1297
1297
  return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
1298
1298
  };
1299
1299
 
1300
- var wellKnownSymbol$c = wellKnownSymbol$e;
1300
+ var wellKnownSymbol$6 = wellKnownSymbol$8;
1301
1301
  var create$1 = objectCreate;
1302
- var definePropertyModule$1 = objectDefineProperty;
1302
+ var definePropertyModule = objectDefineProperty;
1303
1303
 
1304
- var UNSCOPABLES = wellKnownSymbol$c('unscopables');
1305
- var ArrayPrototype$1 = Array.prototype;
1304
+ var UNSCOPABLES = wellKnownSymbol$6('unscopables');
1305
+ var ArrayPrototype = Array.prototype;
1306
1306
 
1307
1307
  // Array.prototype[@@unscopables]
1308
1308
  // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1309
- if (ArrayPrototype$1[UNSCOPABLES] == undefined) {
1310
- definePropertyModule$1.f(ArrayPrototype$1, UNSCOPABLES, {
1309
+ if (ArrayPrototype[UNSCOPABLES] == undefined) {
1310
+ definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {
1311
1311
  configurable: true,
1312
1312
  value: create$1(null)
1313
1313
  });
@@ -1315,49 +1315,49 @@ if (ArrayPrototype$1[UNSCOPABLES] == undefined) {
1315
1315
 
1316
1316
  // add a key to Array.prototype[@@unscopables]
1317
1317
  var addToUnscopables$1 = function (key) {
1318
- ArrayPrototype$1[UNSCOPABLES][key] = true;
1318
+ ArrayPrototype[UNSCOPABLES][key] = true;
1319
1319
  };
1320
1320
 
1321
1321
  var iterators = {};
1322
1322
 
1323
- var fails$4 = fails$d;
1323
+ var fails$1 = fails$a;
1324
1324
 
1325
- var correctPrototypeGetter = !fails$4(function () {
1325
+ var correctPrototypeGetter = !fails$1(function () {
1326
1326
  function F() { /* empty */ }
1327
1327
  F.prototype.constructor = null;
1328
1328
  // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
1329
1329
  return Object.getPrototypeOf(new F()) !== F.prototype;
1330
1330
  });
1331
1331
 
1332
- var global$j = global$E;
1333
- var hasOwn$3 = hasOwnProperty_1;
1334
- var isCallable$8 = isCallable$i;
1332
+ var global$6 = global$r;
1333
+ var hasOwn$2 = hasOwnProperty_1;
1334
+ var isCallable$5 = isCallable$f;
1335
1335
  var toObject = toObject$3;
1336
1336
  var sharedKey = sharedKey$3;
1337
1337
  var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
1338
1338
 
1339
1339
  var IE_PROTO = sharedKey('IE_PROTO');
1340
- var Object$2 = global$j.Object;
1340
+ var Object$2 = global$6.Object;
1341
1341
  var ObjectPrototype = Object$2.prototype;
1342
1342
 
1343
1343
  // `Object.getPrototypeOf` method
1344
1344
  // https://tc39.es/ecma262/#sec-object.getprototypeof
1345
1345
  var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? Object$2.getPrototypeOf : function (O) {
1346
1346
  var object = toObject(O);
1347
- if (hasOwn$3(object, IE_PROTO)) return object[IE_PROTO];
1347
+ if (hasOwn$2(object, IE_PROTO)) return object[IE_PROTO];
1348
1348
  var constructor = object.constructor;
1349
- if (isCallable$8(constructor) && object instanceof constructor) {
1349
+ if (isCallable$5(constructor) && object instanceof constructor) {
1350
1350
  return constructor.prototype;
1351
1351
  } return object instanceof Object$2 ? ObjectPrototype : null;
1352
1352
  };
1353
1353
 
1354
- var fails$3 = fails$d;
1355
- var isCallable$7 = isCallable$i;
1354
+ var fails = fails$a;
1355
+ var isCallable$4 = isCallable$f;
1356
1356
  var getPrototypeOf$1 = objectGetPrototypeOf;
1357
- var redefine$3 = redefine$5.exports;
1358
- var wellKnownSymbol$b = wellKnownSymbol$e;
1357
+ var redefine$1 = redefine$3.exports;
1358
+ var wellKnownSymbol$5 = wellKnownSymbol$8;
1359
1359
 
1360
- var ITERATOR$6 = wellKnownSymbol$b('iterator');
1360
+ var ITERATOR$2 = wellKnownSymbol$5('iterator');
1361
1361
  var BUGGY_SAFARI_ITERATORS$1 = false;
1362
1362
 
1363
1363
  // `%IteratorPrototype%` object
@@ -1375,18 +1375,18 @@ if ([].keys) {
1375
1375
  }
1376
1376
  }
1377
1377
 
1378
- var NEW_ITERATOR_PROTOTYPE = IteratorPrototype$2 == undefined || fails$3(function () {
1378
+ var NEW_ITERATOR_PROTOTYPE = IteratorPrototype$2 == undefined || fails(function () {
1379
1379
  var test = {};
1380
1380
  // FF44- legacy iterators case
1381
- return IteratorPrototype$2[ITERATOR$6].call(test) !== test;
1381
+ return IteratorPrototype$2[ITERATOR$2].call(test) !== test;
1382
1382
  });
1383
1383
 
1384
1384
  if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
1385
1385
 
1386
1386
  // `%IteratorPrototype%[@@iterator]()` method
1387
1387
  // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
1388
- if (!isCallable$7(IteratorPrototype$2[ITERATOR$6])) {
1389
- redefine$3(IteratorPrototype$2, ITERATOR$6, function () {
1388
+ if (!isCallable$4(IteratorPrototype$2[ITERATOR$2])) {
1389
+ redefine$1(IteratorPrototype$2, ITERATOR$2, function () {
1390
1390
  return this;
1391
1391
  });
1392
1392
  }
@@ -1397,14 +1397,14 @@ var iteratorsCore = {
1397
1397
  };
1398
1398
 
1399
1399
  var defineProperty$2 = objectDefineProperty.f;
1400
- var hasOwn$2 = hasOwnProperty_1;
1401
- var wellKnownSymbol$a = wellKnownSymbol$e;
1400
+ var hasOwn$1 = hasOwnProperty_1;
1401
+ var wellKnownSymbol$4 = wellKnownSymbol$8;
1402
1402
 
1403
- var TO_STRING_TAG$3 = wellKnownSymbol$a('toStringTag');
1403
+ var TO_STRING_TAG$3 = wellKnownSymbol$4('toStringTag');
1404
1404
 
1405
- var setToStringTag$3 = function (target, TAG, STATIC) {
1405
+ var setToStringTag$2 = function (target, TAG, STATIC) {
1406
1406
  if (target && !STATIC) target = target.prototype;
1407
- if (target && !hasOwn$2(target, TO_STRING_TAG$3)) {
1407
+ if (target && !hasOwn$1(target, TO_STRING_TAG$3)) {
1408
1408
  defineProperty$2(target, TO_STRING_TAG$3, { configurable: true, value: TAG });
1409
1409
  }
1410
1410
  };
@@ -1412,34 +1412,34 @@ var setToStringTag$3 = function (target, TAG, STATIC) {
1412
1412
  var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
1413
1413
  var create = objectCreate;
1414
1414
  var createPropertyDescriptor = createPropertyDescriptor$3;
1415
- var setToStringTag$2 = setToStringTag$3;
1416
- var Iterators$4 = iterators;
1415
+ var setToStringTag$1 = setToStringTag$2;
1416
+ var Iterators$2 = iterators;
1417
1417
 
1418
1418
  var returnThis$1 = function () { return this; };
1419
1419
 
1420
1420
  var createIteratorConstructor$1 = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
1421
1421
  var TO_STRING_TAG = NAME + ' Iterator';
1422
1422
  IteratorConstructor.prototype = create(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
1423
- setToStringTag$2(IteratorConstructor, TO_STRING_TAG, false);
1424
- Iterators$4[TO_STRING_TAG] = returnThis$1;
1423
+ setToStringTag$1(IteratorConstructor, TO_STRING_TAG, false);
1424
+ Iterators$2[TO_STRING_TAG] = returnThis$1;
1425
1425
  return IteratorConstructor;
1426
1426
  };
1427
1427
 
1428
- var global$i = global$E;
1429
- var isCallable$6 = isCallable$i;
1428
+ var global$5 = global$r;
1429
+ var isCallable$3 = isCallable$f;
1430
1430
 
1431
- var String$3 = global$i.String;
1432
- var TypeError$7 = global$i.TypeError;
1431
+ var String$2 = global$5.String;
1432
+ var TypeError$1 = global$5.TypeError;
1433
1433
 
1434
1434
  var aPossiblePrototype$1 = function (argument) {
1435
- if (typeof argument == 'object' || isCallable$6(argument)) return argument;
1436
- throw TypeError$7("Can't set " + String$3(argument) + ' as a prototype');
1435
+ if (typeof argument == 'object' || isCallable$3(argument)) return argument;
1436
+ throw TypeError$1("Can't set " + String$2(argument) + ' as a prototype');
1437
1437
  };
1438
1438
 
1439
1439
  /* eslint-disable no-proto -- safe */
1440
1440
 
1441
- var uncurryThis$6 = functionUncurryThis;
1442
- var anObject$5 = anObject$a;
1441
+ var uncurryThis$1 = functionUncurryThis;
1442
+ var anObject = anObject$5;
1443
1443
  var aPossiblePrototype = aPossiblePrototype$1;
1444
1444
 
1445
1445
  // `Object.setPrototypeOf` method
@@ -1452,12 +1452,12 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
1452
1452
  var setter;
1453
1453
  try {
1454
1454
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1455
- setter = uncurryThis$6(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
1455
+ setter = uncurryThis$1(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
1456
1456
  setter(test, []);
1457
1457
  CORRECT_SETTER = test instanceof Array;
1458
1458
  } catch (error) { /* empty */ }
1459
1459
  return function setPrototypeOf(O, proto) {
1460
- anObject$5(O);
1460
+ anObject(O);
1461
1461
  aPossiblePrototype(proto);
1462
1462
  if (CORRECT_SETTER) setter(O, proto);
1463
1463
  else O.__proto__ = proto;
@@ -1465,25 +1465,25 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
1465
1465
  };
1466
1466
  }() : undefined);
1467
1467
 
1468
- var $$3 = _export;
1469
- var call$5 = functionCall;
1468
+ var $$1 = _export;
1469
+ var call = functionCall;
1470
1470
  var FunctionName = functionName;
1471
- var isCallable$5 = isCallable$i;
1471
+ var isCallable$2 = isCallable$f;
1472
1472
  var createIteratorConstructor = createIteratorConstructor$1;
1473
1473
  var getPrototypeOf = objectGetPrototypeOf;
1474
- var setPrototypeOf$1 = objectSetPrototypeOf;
1475
- var setToStringTag$1 = setToStringTag$3;
1474
+ var setPrototypeOf = objectSetPrototypeOf;
1475
+ var setToStringTag = setToStringTag$2;
1476
1476
  var createNonEnumerableProperty$1 = createNonEnumerableProperty$5;
1477
- var redefine$2 = redefine$5.exports;
1478
- var wellKnownSymbol$9 = wellKnownSymbol$e;
1479
- var Iterators$3 = iterators;
1477
+ var redefine = redefine$3.exports;
1478
+ var wellKnownSymbol$3 = wellKnownSymbol$8;
1479
+ var Iterators$1 = iterators;
1480
1480
  var IteratorsCore = iteratorsCore;
1481
1481
 
1482
1482
  var PROPER_FUNCTION_NAME = FunctionName.PROPER;
1483
1483
  var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
1484
1484
  var IteratorPrototype = IteratorsCore.IteratorPrototype;
1485
1485
  var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
1486
- var ITERATOR$5 = wellKnownSymbol$9('iterator');
1486
+ var ITERATOR$1 = wellKnownSymbol$3('iterator');
1487
1487
  var KEYS = 'keys';
1488
1488
  var VALUES = 'values';
1489
1489
  var ENTRIES = 'entries';
@@ -1506,7 +1506,7 @@ var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFA
1506
1506
  var TO_STRING_TAG = NAME + ' Iterator';
1507
1507
  var INCORRECT_VALUES_NAME = false;
1508
1508
  var IterablePrototype = Iterable.prototype;
1509
- var nativeIterator = IterablePrototype[ITERATOR$5]
1509
+ var nativeIterator = IterablePrototype[ITERATOR$1]
1510
1510
  || IterablePrototype['@@iterator']
1511
1511
  || DEFAULT && IterablePrototype[DEFAULT];
1512
1512
  var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
@@ -1518,14 +1518,14 @@ var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFA
1518
1518
  CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
1519
1519
  if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
1520
1520
  if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
1521
- if (setPrototypeOf$1) {
1522
- setPrototypeOf$1(CurrentIteratorPrototype, IteratorPrototype);
1523
- } else if (!isCallable$5(CurrentIteratorPrototype[ITERATOR$5])) {
1524
- redefine$2(CurrentIteratorPrototype, ITERATOR$5, returnThis);
1521
+ if (setPrototypeOf) {
1522
+ setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
1523
+ } else if (!isCallable$2(CurrentIteratorPrototype[ITERATOR$1])) {
1524
+ redefine(CurrentIteratorPrototype, ITERATOR$1, returnThis);
1525
1525
  }
1526
1526
  }
1527
1527
  // Set @@toStringTag to native iterators
1528
- setToStringTag$1(CurrentIteratorPrototype, TO_STRING_TAG, true);
1528
+ setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true);
1529
1529
  }
1530
1530
  }
1531
1531
 
@@ -1535,7 +1535,7 @@ var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFA
1535
1535
  createNonEnumerableProperty$1(IterablePrototype, 'name', VALUES);
1536
1536
  } else {
1537
1537
  INCORRECT_VALUES_NAME = true;
1538
- defaultIterator = function values() { return call$5(nativeIterator, this); };
1538
+ defaultIterator = function values() { return call(nativeIterator, this); };
1539
1539
  }
1540
1540
  }
1541
1541
 
@@ -1548,31 +1548,31 @@ var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFA
1548
1548
  };
1549
1549
  if (FORCED) for (KEY in methods) {
1550
1550
  if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1551
- redefine$2(IterablePrototype, KEY, methods[KEY]);
1551
+ redefine(IterablePrototype, KEY, methods[KEY]);
1552
1552
  }
1553
- } else $$3({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1553
+ } else $$1({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1554
1554
  }
1555
1555
 
1556
1556
  // define iterator
1557
- if (IterablePrototype[ITERATOR$5] !== defaultIterator) {
1558
- redefine$2(IterablePrototype, ITERATOR$5, defaultIterator, { name: DEFAULT });
1557
+ if (IterablePrototype[ITERATOR$1] !== defaultIterator) {
1558
+ redefine(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT });
1559
1559
  }
1560
- Iterators$3[NAME] = defaultIterator;
1560
+ Iterators$1[NAME] = defaultIterator;
1561
1561
 
1562
1562
  return methods;
1563
1563
  };
1564
1564
 
1565
1565
  var toIndexedObject = toIndexedObject$5;
1566
1566
  var addToUnscopables = addToUnscopables$1;
1567
- var Iterators$2 = iterators;
1568
- var InternalStateModule$1 = internalState;
1567
+ var Iterators = iterators;
1568
+ var InternalStateModule = internalState;
1569
1569
  var defineProperty$1 = objectDefineProperty.f;
1570
1570
  var defineIterator = defineIterator$1;
1571
- var DESCRIPTORS$2 = descriptors;
1571
+ var DESCRIPTORS$1 = descriptors;
1572
1572
 
1573
1573
  var ARRAY_ITERATOR = 'Array Iterator';
1574
- var setInternalState$1 = InternalStateModule$1.set;
1575
- var getInternalState$1 = InternalStateModule$1.getterFor(ARRAY_ITERATOR);
1574
+ var setInternalState = InternalStateModule.set;
1575
+ var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
1576
1576
 
1577
1577
  // `Array.prototype.entries` method
1578
1578
  // https://tc39.es/ecma262/#sec-array.prototype.entries
@@ -1585,7 +1585,7 @@ var getInternalState$1 = InternalStateModule$1.getterFor(ARRAY_ITERATOR);
1585
1585
  // `CreateArrayIterator` internal method
1586
1586
  // https://tc39.es/ecma262/#sec-createarrayiterator
1587
1587
  var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
1588
- setInternalState$1(this, {
1588
+ setInternalState(this, {
1589
1589
  type: ARRAY_ITERATOR,
1590
1590
  target: toIndexedObject(iterated), // target
1591
1591
  index: 0, // next index
@@ -1594,7 +1594,7 @@ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind)
1594
1594
  // `%ArrayIteratorPrototype%.next` method
1595
1595
  // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
1596
1596
  }, function () {
1597
- var state = getInternalState$1(this);
1597
+ var state = getInternalState(this);
1598
1598
  var target = state.target;
1599
1599
  var kind = state.kind;
1600
1600
  var index = state.index++;
@@ -1610,7 +1610,7 @@ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind)
1610
1610
  // argumentsList[@@iterator] is %ArrayProto_values%
1611
1611
  // https://tc39.es/ecma262/#sec-createunmappedargumentsobject
1612
1612
  // https://tc39.es/ecma262/#sec-createmappedargumentsobject
1613
- var values = Iterators$2.Arguments = Iterators$2.Array;
1613
+ var values = Iterators.Arguments = Iterators.Array;
1614
1614
 
1615
1615
  // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1616
1616
  addToUnscopables('keys');
@@ -1618,7 +1618,7 @@ addToUnscopables('values');
1618
1618
  addToUnscopables('entries');
1619
1619
 
1620
1620
  // V8 ~ Chrome 45- bug
1621
- if (DESCRIPTORS$2 && values.name !== 'values') try {
1621
+ if (DESCRIPTORS$1 && values.name !== 'values') try {
1622
1622
  defineProperty$1(values, 'name', { value: 'values' });
1623
1623
  } catch (error) { /* empty */ }
1624
1624
 
@@ -1666,24 +1666,24 @@ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.co
1666
1666
 
1667
1667
  var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
1668
1668
 
1669
- var global$h = global$E;
1669
+ var global$4 = global$r;
1670
1670
  var DOMIterables = domIterables;
1671
1671
  var DOMTokenListPrototype = domTokenListPrototype;
1672
1672
  var ArrayIteratorMethods = es_array_iterator;
1673
1673
  var createNonEnumerableProperty = createNonEnumerableProperty$5;
1674
- var wellKnownSymbol$8 = wellKnownSymbol$e;
1674
+ var wellKnownSymbol$2 = wellKnownSymbol$8;
1675
1675
 
1676
- var ITERATOR$4 = wellKnownSymbol$8('iterator');
1677
- var TO_STRING_TAG$2 = wellKnownSymbol$8('toStringTag');
1676
+ var ITERATOR = wellKnownSymbol$2('iterator');
1677
+ var TO_STRING_TAG$2 = wellKnownSymbol$2('toStringTag');
1678
1678
  var ArrayValues = ArrayIteratorMethods.values;
1679
1679
 
1680
1680
  var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
1681
1681
  if (CollectionPrototype) {
1682
1682
  // some Chrome versions have non-configurable methods on DOMTokenList
1683
- if (CollectionPrototype[ITERATOR$4] !== ArrayValues) try {
1684
- createNonEnumerableProperty(CollectionPrototype, ITERATOR$4, ArrayValues);
1683
+ if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
1684
+ createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
1685
1685
  } catch (error) {
1686
- CollectionPrototype[ITERATOR$4] = ArrayValues;
1686
+ CollectionPrototype[ITERATOR] = ArrayValues;
1687
1687
  }
1688
1688
  if (!CollectionPrototype[TO_STRING_TAG$2]) {
1689
1689
  createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG$2, COLLECTION_NAME);
@@ -1700,37 +1700,46 @@ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
1700
1700
  };
1701
1701
 
1702
1702
  for (var COLLECTION_NAME in DOMIterables) {
1703
- handlePrototype(global$h[COLLECTION_NAME] && global$h[COLLECTION_NAME].prototype, COLLECTION_NAME);
1703
+ handlePrototype(global$4[COLLECTION_NAME] && global$4[COLLECTION_NAME].prototype, COLLECTION_NAME);
1704
1704
  }
1705
1705
 
1706
1706
  handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
1707
1707
 
1708
- const Flexbox = ({
1709
- alignContent,
1710
- alignItems,
1711
- alignSelf,
1712
- children,
1713
- justifyContent
1714
- }) => {
1708
+ const Flexbox = _a => {
1709
+ var {
1710
+ alignContent,
1711
+ alignItems,
1712
+ alignSelf,
1713
+ children,
1714
+ justifyContent,
1715
+ flexDirection,
1716
+ flexWrap,
1717
+ className
1718
+ } = _a,
1719
+ props = __rest(_a, ["alignContent", "alignItems", "alignSelf", "children", "justifyContent", "flexDirection", "flexWrap", "className"]);
1720
+
1715
1721
  const [classes, setClasses] = useState(['d-flex']);
1716
- const [className, setClassName] = useState('d-flex'); // update className when classes change
1722
+ const [flexClassName, setFlexClassName] = useState('d-flex'); // // update className when classes change
1717
1723
 
1718
- useEffect(() => {
1724
+ useLayoutEffect(() => {
1719
1725
  const newClassName = classes.join(' ');
1720
- if (newClassName !== className) setClassName(newClassName);
1721
- }, [classes, className]); // update classes when props change
1726
+ if (newClassName !== flexClassName) setFlexClassName(newClassName);
1727
+ }, [classes, flexClassName]); // // update classes when props change
1722
1728
 
1723
- useEffect(() => {
1729
+ useLayoutEffect(() => {
1724
1730
  const newClasses = ['d-flex'];
1725
- if (alignItems) newClasses.push(`align-items-${alignItems}`);
1726
- if (alignContent) newClasses.push(`align-content-${alignContent}`);
1727
- if (alignSelf) newClasses.push(`align-content-${alignSelf}`);
1728
- if (justifyContent) newClasses.push(`justify-content-${justifyContent}`);
1731
+ alignItems && newClasses.push(`align-items-${alignItems}`);
1732
+ alignContent && newClasses.push(`align-content-${alignContent}`);
1733
+ alignSelf && newClasses.push(`align-self-${alignSelf}`);
1734
+ justifyContent && newClasses.push(`justify-content-${justifyContent}`);
1735
+ flexDirection && newClasses.push(`flex-${flexDirection}`);
1736
+ flexWrap && newClasses.push(`flex-${flexWrap}`);
1737
+ className && newClasses.push(className);
1729
1738
  setClasses(newClasses);
1730
- }, [alignContent, alignItems, alignSelf, justifyContent]);
1739
+ }, [alignContent, alignItems, alignSelf, justifyContent, flexDirection, flexWrap, className]);
1731
1740
  return jsx("div", Object.assign({
1732
- className: className
1733
- }, {
1741
+ className: flexClassName
1742
+ }, props, {
1734
1743
  children: children
1735
1744
  }), void 0);
1736
1745
  };
@@ -1823,17 +1832,214 @@ const ButtonGroup = ({
1823
1832
  }, void 0);
1824
1833
  };
1825
1834
 
1826
- function Form({
1827
- children,
1828
- direction = 'vertical',
1829
- formSize = 'md'
1830
- }) {
1831
- return jsx("form", Object.assign({
1832
- className: [direction, `size-${formSize}`].join(' ')
1835
+ const validateInputValue = (target, rules, setError) => {
1836
+ const errorMessage = validateInputValueErrors(rules, target);
1837
+ errorMessage ? setErrorInsert(setError, target.name) : setErrorRemove(setError, target.name);
1838
+ return errorMessage;
1839
+ };
1840
+
1841
+ const validateInputValueErrors = (rules, target) => {
1842
+ const {
1843
+ value,
1844
+ type,
1845
+ checked
1846
+ } = target;
1847
+
1848
+ if ((rules === null || rules === void 0 ? void 0 : rules.custom) instanceof Function) {
1849
+ return rules === null || rules === void 0 ? void 0 : rules.custom();
1850
+ }
1851
+
1852
+ switch (type) {
1853
+ case 'text':
1854
+ case 'email':
1855
+ case 'number':
1856
+ return validateTextInputValues(value, rules);
1857
+
1858
+ case 'checkbox':
1859
+ return validateCheckBoxInput(checked);
1860
+
1861
+ default:
1862
+ return validateTextInputValues(value, rules);
1863
+ }
1864
+ };
1865
+
1866
+ const setErrorInsert = (setError, name) => {
1867
+ setError(errors => {
1868
+ return Object.assign(Object.assign({}, errors), {
1869
+ [name]: true
1870
+ });
1871
+ });
1872
+ };
1873
+
1874
+ const setErrorRemove = (setError, name) => {
1875
+ setError(errors => {
1876
+ const newError = Object.assign({}, errors);
1877
+ delete newError[name];
1878
+ return newError;
1879
+ });
1880
+ };
1881
+
1882
+ const validateTextInputValues = (value, rules) => {
1883
+ switch (rules === null || rules === void 0 ? void 0 : rules.type) {
1884
+ case 'Required':
1885
+ {
1886
+ return value === '' || value === undefined || value === null ? 'error' : null;
1887
+ }
1888
+
1889
+ default:
1890
+ {
1891
+ return;
1892
+ }
1893
+ }
1894
+ };
1895
+
1896
+ const validateCheckBoxInput = checked => {
1897
+ if (!checked) {
1898
+ return 'error';
1899
+ }
1900
+
1901
+ return null;
1902
+ };
1903
+
1904
+ const FormContext = /*#__PURE__*/React.createContext({});
1905
+ const useFormContext = () => {
1906
+ return React.useContext(FormContext);
1907
+ };
1908
+ const FormProvider = _a => {
1909
+ var {
1910
+ children,
1911
+ direction = 'vertical',
1912
+ formSize = 'md',
1913
+ onSubmit,
1914
+ onFormSubmit
1915
+ } = _a,
1916
+ props = __rest(_a, ["children", "direction", "formSize", "onSubmit", "onFormSubmit"]);
1917
+
1918
+ const [values, setValues] = React.useState();
1919
+ const [errors, setErrors] = React.useState();
1920
+ const [fields, setFields] = React.useState({});
1921
+
1922
+ const formSubmit = event => {
1923
+ let hasError = false;
1924
+ event.preventDefault();
1925
+ Object.keys(fields).forEach(key => {
1926
+ const errorMessage = validateInputValue({
1927
+ name: key,
1928
+ value: values === null || values === void 0 ? void 0 : values[key]
1929
+ }, fields[key], setErrors);
1930
+ hasError = hasError || !!errorMessage;
1931
+ });
1932
+
1933
+ if (!hasError) {
1934
+ onFormSubmit && onFormSubmit(values);
1935
+ }
1936
+ };
1937
+
1938
+ const resetForm = () => {
1939
+ setValues({});
1940
+ setErrors({});
1941
+ };
1942
+
1943
+ return jsx(FormContext.Provider, Object.assign({
1944
+ value: {
1945
+ setValues,
1946
+ setErrors,
1947
+ setFields,
1948
+ errors,
1949
+ values
1950
+ }
1833
1951
  }, {
1834
- children: children
1952
+ children: jsx("form", Object.assign({
1953
+ className: [direction, `size-${formSize}`].join(' '),
1954
+ onSubmit: formSubmit
1955
+ }, props, {
1956
+ onReset: resetForm
1957
+ }, {
1958
+ children: children
1959
+ }), void 0)
1835
1960
  }), void 0);
1836
- }
1961
+ };
1962
+
1963
+ const Form = props => {
1964
+ return jsx(FormProvider, Object.assign({}, props), void 0);
1965
+ };
1966
+
1967
+ const FormItems = ({
1968
+ children,
1969
+ validate,
1970
+ name
1971
+ }) => {
1972
+ const {
1973
+ setValues,
1974
+ setErrors,
1975
+ setFields,
1976
+ errors
1977
+ } = useFormContext();
1978
+ React.useEffect(() => {
1979
+ setFields(fields => Object.assign(Object.assign({}, fields), {
1980
+ [name]: validate === null || validate === void 0 ? void 0 : validate.rules
1981
+ }));
1982
+
1983
+ const removeValues = values => {
1984
+ const newValues = Object.assign({}, values);
1985
+ delete newValues[name];
1986
+ return newValues;
1987
+ };
1988
+
1989
+ return () => {
1990
+ setFields(fields => removeValues(fields));
1991
+ setValues(values => removeValues(values));
1992
+ setErrors(errors => removeValues(errors));
1993
+ };
1994
+ }, []);
1995
+
1996
+ const onChange = event => {
1997
+ const {
1998
+ value,
1999
+ name,
2000
+ type,
2001
+ checked
2002
+ } = event.target;
2003
+
2004
+ if (type === 'checkbox') {
2005
+ if (checked) {
2006
+ setValues(values => {
2007
+ return Object.assign(Object.assign({}, values), {
2008
+ [name]: {
2009
+ value,
2010
+ checked
2011
+ }
2012
+ });
2013
+ });
2014
+ } else {
2015
+ setValues(values => {
2016
+ return Object.assign(Object.assign({}, values), {
2017
+ [name]: null
2018
+ });
2019
+ });
2020
+ }
2021
+ } else {
2022
+ setValues(values => {
2023
+ return Object.assign(Object.assign({}, values), {
2024
+ [name]: value
2025
+ });
2026
+ });
2027
+ }
2028
+
2029
+ validateInputValue({
2030
+ value,
2031
+ name,
2032
+ type,
2033
+ checked
2034
+ }, validate === null || validate === void 0 ? void 0 : validate.rules, setErrors);
2035
+ };
2036
+
2037
+ return /*#__PURE__*/React.cloneElement(children, {
2038
+ validator: (errors === null || errors === void 0 ? void 0 : errors[name]) && validate,
2039
+ name,
2040
+ onChange
2041
+ });
2042
+ };
1837
2043
 
1838
2044
  function Group({
1839
2045
  children,
@@ -1857,134 +2063,16 @@ function Group({
1857
2063
  }), void 0);
1858
2064
  }
1859
2065
 
1860
- var wellKnownSymbol$7 = wellKnownSymbol$e;
1861
-
1862
- var TO_STRING_TAG$1 = wellKnownSymbol$7('toStringTag');
1863
- var test = {};
1864
-
1865
- test[TO_STRING_TAG$1] = 'z';
1866
-
1867
- var toStringTagSupport = String(test) === '[object z]';
1868
-
1869
- var global$g = global$E;
1870
- var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1871
- var isCallable$4 = isCallable$i;
1872
- var classofRaw = classofRaw$1;
1873
- var wellKnownSymbol$6 = wellKnownSymbol$e;
1874
-
1875
- var TO_STRING_TAG = wellKnownSymbol$6('toStringTag');
1876
- var Object$1 = global$g.Object;
1877
-
1878
- // ES3 wrong here
1879
- var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
1880
-
1881
- // fallback for IE11 Script Access Denied error
1882
- var tryGet = function (it, key) {
1883
- try {
1884
- return it[key];
1885
- } catch (error) { /* empty */ }
1886
- };
1887
-
1888
- // getting tag from ES6+ `Object.prototype.toString`
1889
- var classof$4 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
1890
- var O, tag, result;
1891
- return it === undefined ? 'Undefined' : it === null ? 'Null'
1892
- // @@toStringTag case
1893
- : typeof (tag = tryGet(O = Object$1(it), TO_STRING_TAG)) == 'string' ? tag
1894
- // builtinTag case
1895
- : CORRECT_ARGUMENTS ? classofRaw(O)
1896
- // ES3 arguments fallback
1897
- : (result = classofRaw(O)) == 'Object' && isCallable$4(O.callee) ? 'Arguments' : result;
1898
- };
1899
-
1900
- var global$f = global$E;
1901
- var classof$3 = classof$4;
1902
-
1903
- var String$2 = global$f.String;
1904
-
1905
- var toString$3 = function (argument) {
1906
- if (classof$3(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
1907
- return String$2(argument);
1908
- };
1909
-
1910
- // a string of all valid unicode whitespaces
1911
- var whitespaces$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
1912
- '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
1913
-
1914
- var uncurryThis$5 = functionUncurryThis;
1915
- var requireObjectCoercible = requireObjectCoercible$3;
1916
- var toString$2 = toString$3;
1917
- var whitespaces$1 = whitespaces$2;
1918
-
1919
- var replace$1 = uncurryThis$5(''.replace);
1920
- var whitespace = '[' + whitespaces$1 + ']';
1921
- var ltrim = RegExp('^' + whitespace + whitespace + '*');
1922
- var rtrim = RegExp(whitespace + whitespace + '*$');
1923
-
1924
- // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
1925
- var createMethod = function (TYPE) {
1926
- return function ($this) {
1927
- var string = toString$2(requireObjectCoercible($this));
1928
- if (TYPE & 1) string = replace$1(string, ltrim, '');
1929
- if (TYPE & 2) string = replace$1(string, rtrim, '');
1930
- return string;
1931
- };
1932
- };
1933
-
1934
- var stringTrim = {
1935
- // `String.prototype.{ trimLeft, trimStart }` methods
1936
- // https://tc39.es/ecma262/#sec-string.prototype.trimstart
1937
- start: createMethod(1),
1938
- // `String.prototype.{ trimRight, trimEnd }` methods
1939
- // https://tc39.es/ecma262/#sec-string.prototype.trimend
1940
- end: createMethod(2),
1941
- // `String.prototype.trim` method
1942
- // https://tc39.es/ecma262/#sec-string.prototype.trim
1943
- trim: createMethod(3)
1944
- };
1945
-
1946
- var global$e = global$E;
1947
- var fails$2 = fails$d;
1948
- var uncurryThis$4 = functionUncurryThis;
1949
- var toString$1 = toString$3;
1950
- var trim = stringTrim.trim;
1951
- var whitespaces = whitespaces$2;
1952
-
1953
- var $parseInt$1 = global$e.parseInt;
1954
- var Symbol$1 = global$e.Symbol;
1955
- var ITERATOR$3 = Symbol$1 && Symbol$1.iterator;
1956
- var hex = /^[+-]?0x/i;
1957
- var exec$1 = uncurryThis$4(hex.exec);
1958
- var FORCED$1 = $parseInt$1(whitespaces + '08') !== 8 || $parseInt$1(whitespaces + '0x16') !== 22
1959
- // MS Edge 18- broken with boxed symbols
1960
- || (ITERATOR$3 && !fails$2(function () { $parseInt$1(Object(ITERATOR$3)); }));
1961
-
1962
- // `parseInt` method
1963
- // https://tc39.es/ecma262/#sec-parseint-string-radix
1964
- var numberParseInt = FORCED$1 ? function parseInt(string, radix) {
1965
- var S = trim(toString$1(string));
1966
- return $parseInt$1(S, (radix >>> 0) || (exec$1(hex, S) ? 16 : 10));
1967
- } : $parseInt$1;
1968
-
1969
- var $$2 = _export;
1970
- var $parseInt = numberParseInt;
1971
-
1972
- // `parseInt` method
1973
- // https://tc39.es/ecma262/#sec-parseint-string-radix
1974
- $$2({ global: true, forced: parseInt != $parseInt }, {
1975
- parseInt: $parseInt
1976
- });
1977
-
1978
- const useInput = (props, evaluator, notify) => {
2066
+ const useInput = (props, onChanges, onChangeInput) => {
1979
2067
  const id = useMemo(() => props.id || randomId(), [props.id]);
1980
2068
  const ref = useRef(null);
1981
- const [value, setValue] = useState(props.value);
1982
- const [checked, setChecked] = useState(props.checked);
2069
+ const [value, setValue] = useState(props.value ? props.value : '');
2070
+ const [checked, setChecked] = useState(props.checked ? props.checked : false);
1983
2071
  useEffect(() => {
1984
2072
  if (ref.current && ref.current.form) {
1985
2073
  const resetListener = () => {
1986
- props.value && setValue(props.value);
1987
- props.checked && setChecked(props.checked);
2074
+ setValue(props.value ? props.value : '');
2075
+ setChecked(props.checked ? props.checked : false);
1988
2076
  };
1989
2077
 
1990
2078
  const form = ref.current.form;
@@ -1997,9 +2085,10 @@ const useInput = (props, evaluator, notify) => {
1997
2085
  }, [props]);
1998
2086
 
1999
2087
  const onChange = event => {
2000
- props.value && setValue(event.target.value);
2001
- props.checked && setChecked(event.target.checked);
2002
- if (notify) notify(evaluator(event.target));
2088
+ setValue(event.target.value);
2089
+ setChecked(event.currentTarget.checked);
2090
+ onChanges && onChanges(event);
2091
+ onChangeInput && onChangeInput(event.target.value);
2003
2092
  };
2004
2093
 
2005
2094
  return Object.assign(Object.assign({}, props), {
@@ -2011,8 +2100,8 @@ const useInput = (props, evaluator, notify) => {
2011
2100
  });
2012
2101
  };
2013
2102
 
2014
- const RenderInput = (type, props, evaluator, label, info, listener) => {
2015
- const _a = useInput(props, evaluator, listener),
2103
+ const RenderInput = (type, props, onChange, onChangeInput, label, info, validator) => {
2104
+ const _a = useInput(props, onChange, onChangeInput),
2016
2105
  {
2017
2106
  value
2018
2107
  } = _a,
@@ -2027,7 +2116,7 @@ const RenderInput = (type, props, evaluator, label, info, listener) => {
2027
2116
  value: value
2028
2117
  }, propsWithDescription), void 0);
2029
2118
  return jsxs("div", Object.assign({
2030
- className: "form-field"
2119
+ className: "form-group"
2031
2120
  }, {
2032
2121
  children: [label && jsx("label", Object.assign({
2033
2122
  htmlFor: inputProps.id
@@ -2035,85 +2124,100 @@ const RenderInput = (type, props, evaluator, label, info, listener) => {
2035
2124
  children: label
2036
2125
  }), void 0), info && jsx("span", Object.assign({
2037
2126
  className: "form-info",
2038
- id: "{inputProps.id}_info"
2127
+ id: `${inputProps.id}_info`
2039
2128
  }, {
2040
2129
  children: info
2041
2130
  }), void 0), jsx("input", Object.assign({
2042
2131
  type: type,
2043
2132
  value: value
2044
- }, propsWithDescription), void 0)]
2133
+ }, propsWithDescription, {
2134
+ className: validator && validateClassName(validator === null || validator === void 0 ? void 0 : validator.indicator)
2135
+ }), void 0), validator && jsx("span", Object.assign({
2136
+ className: "form-info"
2137
+ }, {
2138
+ children: validator.message
2139
+ }), void 0)]
2045
2140
  }), void 0);
2046
2141
  };
2047
-
2048
2142
  const TextInput = _a => {
2049
2143
  var {
2050
2144
  label,
2051
2145
  info,
2052
- onChangeText
2146
+ onChange,
2147
+ onChangeInput,
2148
+ validator
2053
2149
  } = _a,
2054
- props = __rest(_a, ["label", "info", "onChangeText"]);
2150
+ props = __rest(_a, ["label", "info", "onChange", "onChangeInput", "validator"]);
2055
2151
 
2056
- return RenderInput('text', props, e => e.value, label, info, onChangeText);
2152
+ return RenderInput('text', props, onChange, onChangeInput, label, info, validator);
2057
2153
  };
2058
2154
  const EmailInput = _a => {
2059
2155
  var {
2060
2156
  label,
2061
2157
  info,
2062
- onChangeText
2158
+ onChange,
2159
+ onChangeInput,
2160
+ validator
2063
2161
  } = _a,
2064
- props = __rest(_a, ["label", "info", "onChangeText"]);
2162
+ props = __rest(_a, ["label", "info", "onChange", "onChangeInput", "validator"]);
2065
2163
 
2066
- return RenderInput('email', props, e => e.value, label, info, onChangeText);
2164
+ return RenderInput('email', props, onChange, onChangeInput, label, info, validator);
2067
2165
  };
2068
2166
  const NumberInput = _a => {
2069
2167
  var {
2070
2168
  label,
2071
2169
  info,
2072
- onChangeText
2170
+ onChange,
2171
+ onChangeInput,
2172
+ validator
2073
2173
  } = _a,
2074
- props = __rest(_a, ["label", "info", "onChangeText"]);
2174
+ props = __rest(_a, ["label", "info", "onChange", "onChangeInput", "validator"]);
2075
2175
 
2076
- return RenderInput('number', props, e => e.value.length ? parseInt(e.value, 10) : undefined, label, info, onChangeText);
2176
+ return RenderInput('number', props, onChange, onChangeInput, label, info, validator);
2077
2177
  };
2078
2178
  const Checkbox = _a => {
2079
2179
  var {
2080
2180
  label,
2081
- onChecked
2181
+ onChange,
2182
+ validator
2082
2183
  } = _a,
2083
- props = __rest(_a, ["label", "onChecked"]);
2184
+ props = __rest(_a, ["label", "onChange", "validator"]);
2084
2185
 
2085
- const inputProps = useInput(props, e => e.checked, onChecked);
2086
- return jsxs("label", Object.assign({
2087
- htmlFor: inputProps.id,
2088
- className: "form-control"
2089
- }, {
2090
- children: [label, jsx("input", Object.assign({
2091
- type: "checkbox"
2092
- }, inputProps), void 0), jsx("span", {}, void 0), jsx("i", {}, void 0)]
2093
- }), void 0);
2186
+ const inputProps = useInput(props, onChange);
2187
+ const validatorClassName = validateClassName(validator === null || validator === void 0 ? void 0 : validator.indicator);
2188
+ return jsxs(Fragment, {
2189
+ children: [jsxs("label", Object.assign({
2190
+ htmlFor: inputProps.id,
2191
+ className: `form-control ${validatorClassName}`
2192
+ }, {
2193
+ children: [label, jsx("input", Object.assign({
2194
+ type: "checkbox"
2195
+ }, inputProps), void 0), jsx("span", {}, void 0), jsx("i", {}, void 0)]
2196
+ }), void 0), validator && jsx("span", Object.assign({
2197
+ className: "form-info"
2198
+ }, {
2199
+ children: validator.message
2200
+ }), void 0)]
2201
+ }, void 0);
2094
2202
  };
2095
2203
  const RadioButton = _a => {
2096
2204
  var {
2097
2205
  label,
2098
- onChangeRadioBtn,
2099
2206
  validator
2100
2207
  } = _a,
2101
- props = __rest(_a, ["label", "onChangeRadioBtn", "validator"]);
2208
+ props = __rest(_a, ["label", "validator"]);
2102
2209
 
2103
- const inputProps = useInput(props, e => {
2104
- return {
2105
- value: e.value,
2106
- checked: e.checked
2107
- };
2108
- }, onChangeRadioBtn);
2210
+ const {
2211
+ id
2212
+ } = useInput(props);
2109
2213
  return jsxs("label", Object.assign({
2110
- htmlFor: inputProps.id,
2214
+ htmlFor: id,
2111
2215
  className: "form-control"
2112
2216
  }, {
2113
2217
  children: [jsx("input", Object.assign({
2114
- type: "radio",
2115
- name: "default"
2116
- }, inputProps, {
2218
+ id: id,
2219
+ type: "radio"
2220
+ }, props, {
2117
2221
  className: validator
2118
2222
  }), void 0), jsx("span", {
2119
2223
  children: label
@@ -2129,1093 +2233,128 @@ const Text = ({
2129
2233
  children: children
2130
2234
  }), void 0);
2131
2235
 
2132
- var $$1 = _export;
2133
- var DESCRIPTORS$1 = descriptors;
2134
- var global$d = global$E;
2135
- var uncurryThis$3 = functionUncurryThis;
2136
- var hasOwn$1 = hasOwnProperty_1;
2137
- var isCallable$3 = isCallable$i;
2138
- var isPrototypeOf$2 = objectIsPrototypeOf;
2139
- var toString = toString$3;
2140
- var defineProperty = objectDefineProperty.f;
2141
- var copyConstructorProperties = copyConstructorProperties$2;
2236
+ var wellKnownSymbol$1 = wellKnownSymbol$8;
2142
2237
 
2143
- var NativeSymbol = global$d.Symbol;
2144
- var SymbolPrototype = NativeSymbol && NativeSymbol.prototype;
2238
+ var TO_STRING_TAG$1 = wellKnownSymbol$1('toStringTag');
2239
+ var test = {};
2145
2240
 
2146
- if (DESCRIPTORS$1 && isCallable$3(NativeSymbol) && (!('description' in SymbolPrototype) ||
2147
- // Safari 12 bug
2148
- NativeSymbol().description !== undefined
2149
- )) {
2150
- var EmptyStringDescriptionStore = {};
2151
- // wrap Symbol constructor for correct work with undefined description
2152
- var SymbolWrapper = function Symbol() {
2153
- var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString(arguments[0]);
2154
- var result = isPrototypeOf$2(SymbolPrototype, this)
2155
- ? new NativeSymbol(description)
2156
- // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
2157
- : description === undefined ? NativeSymbol() : NativeSymbol(description);
2158
- if (description === '') EmptyStringDescriptionStore[result] = true;
2159
- return result;
2160
- };
2241
+ test[TO_STRING_TAG$1] = 'z';
2161
2242
 
2162
- copyConstructorProperties(SymbolWrapper, NativeSymbol);
2163
- SymbolWrapper.prototype = SymbolPrototype;
2164
- SymbolPrototype.constructor = SymbolWrapper;
2165
-
2166
- var NATIVE_SYMBOL = String(NativeSymbol('test')) == 'Symbol(test)';
2167
- var symbolToString = uncurryThis$3(SymbolPrototype.toString);
2168
- var symbolValueOf = uncurryThis$3(SymbolPrototype.valueOf);
2169
- var regexp = /^Symbol\((.*)\)[^)]+$/;
2170
- var replace = uncurryThis$3(''.replace);
2171
- var stringSlice = uncurryThis$3(''.slice);
2172
-
2173
- defineProperty(SymbolPrototype, 'description', {
2174
- configurable: true,
2175
- get: function description() {
2176
- var symbol = symbolValueOf(this);
2177
- var string = symbolToString(symbol);
2178
- if (hasOwn$1(EmptyStringDescriptionStore, symbol)) return '';
2179
- var desc = NATIVE_SYMBOL ? stringSlice(string, 7, -1) : replace(string, regexp, '$1');
2180
- return desc === '' ? undefined : desc;
2181
- }
2182
- });
2183
-
2184
- $$1({ global: true, forced: true }, {
2185
- Symbol: SymbolWrapper
2186
- });
2187
- }
2188
-
2189
- var global$c = global$E;
2190
-
2191
- var nativePromiseConstructor = global$c.Promise;
2192
-
2193
- var redefine$1 = redefine$5.exports;
2194
-
2195
- var redefineAll$1 = function (target, src, options) {
2196
- for (var key in src) redefine$1(target, key, src[key], options);
2197
- return target;
2198
- };
2199
-
2200
- var getBuiltIn$2 = getBuiltIn$7;
2201
- var definePropertyModule = objectDefineProperty;
2202
- var wellKnownSymbol$5 = wellKnownSymbol$e;
2203
- var DESCRIPTORS = descriptors;
2204
-
2205
- var SPECIES$2 = wellKnownSymbol$5('species');
2206
-
2207
- var setSpecies$1 = function (CONSTRUCTOR_NAME) {
2208
- var Constructor = getBuiltIn$2(CONSTRUCTOR_NAME);
2209
- var defineProperty = definePropertyModule.f;
2210
-
2211
- if (DESCRIPTORS && Constructor && !Constructor[SPECIES$2]) {
2212
- defineProperty(Constructor, SPECIES$2, {
2213
- configurable: true,
2214
- get: function () { return this; }
2215
- });
2216
- }
2217
- };
2218
-
2219
- var global$b = global$E;
2220
- var isPrototypeOf$1 = objectIsPrototypeOf;
2221
-
2222
- var TypeError$6 = global$b.TypeError;
2223
-
2224
- var anInstance$1 = function (it, Prototype) {
2225
- if (isPrototypeOf$1(Prototype, it)) return it;
2226
- throw TypeError$6('Incorrect invocation');
2227
- };
2228
-
2229
- var uncurryThis$2 = functionUncurryThis;
2230
- var aCallable$3 = aCallable$5;
2231
- var NATIVE_BIND$1 = functionBindNative;
2232
-
2233
- var bind$4 = uncurryThis$2(uncurryThis$2.bind);
2234
-
2235
- // optional / simple context binding
2236
- var functionBindContext = function (fn, that) {
2237
- aCallable$3(fn);
2238
- return that === undefined ? fn : NATIVE_BIND$1 ? bind$4(fn, that) : function (/* ...args */) {
2239
- return fn.apply(that, arguments);
2240
- };
2241
- };
2242
-
2243
- var wellKnownSymbol$4 = wellKnownSymbol$e;
2244
- var Iterators$1 = iterators;
2245
-
2246
- var ITERATOR$2 = wellKnownSymbol$4('iterator');
2247
- var ArrayPrototype = Array.prototype;
2248
-
2249
- // check on default Array iterator
2250
- var isArrayIteratorMethod$1 = function (it) {
2251
- return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$2] === it);
2252
- };
2253
-
2254
- var classof$2 = classof$4;
2255
- var getMethod$1 = getMethod$3;
2256
- var Iterators = iterators;
2257
- var wellKnownSymbol$3 = wellKnownSymbol$e;
2258
-
2259
- var ITERATOR$1 = wellKnownSymbol$3('iterator');
2260
-
2261
- var getIteratorMethod$2 = function (it) {
2262
- if (it != undefined) return getMethod$1(it, ITERATOR$1)
2263
- || getMethod$1(it, '@@iterator')
2264
- || Iterators[classof$2(it)];
2265
- };
2266
-
2267
- var global$a = global$E;
2268
- var call$4 = functionCall;
2269
- var aCallable$2 = aCallable$5;
2270
- var anObject$4 = anObject$a;
2271
- var tryToString$2 = tryToString$4;
2272
- var getIteratorMethod$1 = getIteratorMethod$2;
2273
-
2274
- var TypeError$5 = global$a.TypeError;
2275
-
2276
- var getIterator$1 = function (argument, usingIterator) {
2277
- var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
2278
- if (aCallable$2(iteratorMethod)) return anObject$4(call$4(iteratorMethod, argument));
2279
- throw TypeError$5(tryToString$2(argument) + ' is not iterable');
2280
- };
2281
-
2282
- var call$3 = functionCall;
2283
- var anObject$3 = anObject$a;
2284
- var getMethod = getMethod$3;
2285
-
2286
- var iteratorClose$1 = function (iterator, kind, value) {
2287
- var innerResult, innerError;
2288
- anObject$3(iterator);
2289
- try {
2290
- innerResult = getMethod(iterator, 'return');
2291
- if (!innerResult) {
2292
- if (kind === 'throw') throw value;
2293
- return value;
2294
- }
2295
- innerResult = call$3(innerResult, iterator);
2296
- } catch (error) {
2297
- innerError = true;
2298
- innerResult = error;
2299
- }
2300
- if (kind === 'throw') throw value;
2301
- if (innerError) throw innerResult;
2302
- anObject$3(innerResult);
2303
- return value;
2304
- };
2305
-
2306
- var global$9 = global$E;
2307
- var bind$3 = functionBindContext;
2308
- var call$2 = functionCall;
2309
- var anObject$2 = anObject$a;
2310
- var tryToString$1 = tryToString$4;
2311
- var isArrayIteratorMethod = isArrayIteratorMethod$1;
2312
- var lengthOfArrayLike = lengthOfArrayLike$2;
2313
- var isPrototypeOf = objectIsPrototypeOf;
2314
- var getIterator = getIterator$1;
2315
- var getIteratorMethod = getIteratorMethod$2;
2316
- var iteratorClose = iteratorClose$1;
2317
-
2318
- var TypeError$4 = global$9.TypeError;
2319
-
2320
- var Result = function (stopped, result) {
2321
- this.stopped = stopped;
2322
- this.result = result;
2323
- };
2324
-
2325
- var ResultPrototype = Result.prototype;
2326
-
2327
- var iterate$1 = function (iterable, unboundFunction, options) {
2328
- var that = options && options.that;
2329
- var AS_ENTRIES = !!(options && options.AS_ENTRIES);
2330
- var IS_ITERATOR = !!(options && options.IS_ITERATOR);
2331
- var INTERRUPTED = !!(options && options.INTERRUPTED);
2332
- var fn = bind$3(unboundFunction, that);
2333
- var iterator, iterFn, index, length, result, next, step;
2334
-
2335
- var stop = function (condition) {
2336
- if (iterator) iteratorClose(iterator, 'normal', condition);
2337
- return new Result(true, condition);
2338
- };
2339
-
2340
- var callFn = function (value) {
2341
- if (AS_ENTRIES) {
2342
- anObject$2(value);
2343
- return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
2344
- } return INTERRUPTED ? fn(value, stop) : fn(value);
2345
- };
2346
-
2347
- if (IS_ITERATOR) {
2348
- iterator = iterable;
2349
- } else {
2350
- iterFn = getIteratorMethod(iterable);
2351
- if (!iterFn) throw TypeError$4(tryToString$1(iterable) + ' is not iterable');
2352
- // optimisation for array iterators
2353
- if (isArrayIteratorMethod(iterFn)) {
2354
- for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
2355
- result = callFn(iterable[index]);
2356
- if (result && isPrototypeOf(ResultPrototype, result)) return result;
2357
- } return new Result(false);
2358
- }
2359
- iterator = getIterator(iterable, iterFn);
2360
- }
2243
+ var toStringTagSupport = String(test) === '[object z]';
2361
2244
 
2362
- next = iterator.next;
2363
- while (!(step = call$2(next, iterator)).done) {
2364
- try {
2365
- result = callFn(step.value);
2366
- } catch (error) {
2367
- iteratorClose(iterator, 'throw', error);
2368
- }
2369
- if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
2370
- } return new Result(false);
2371
- };
2245
+ var global$3 = global$r;
2246
+ var TO_STRING_TAG_SUPPORT = toStringTagSupport;
2247
+ var isCallable$1 = isCallable$f;
2248
+ var classofRaw = classofRaw$1;
2249
+ var wellKnownSymbol = wellKnownSymbol$8;
2372
2250
 
2373
- var wellKnownSymbol$2 = wellKnownSymbol$e;
2251
+ var TO_STRING_TAG = wellKnownSymbol('toStringTag');
2252
+ var Object$1 = global$3.Object;
2374
2253
 
2375
- var ITERATOR = wellKnownSymbol$2('iterator');
2376
- var SAFE_CLOSING = false;
2377
-
2378
- try {
2379
- var called = 0;
2380
- var iteratorWithReturn = {
2381
- next: function () {
2382
- return { done: !!called++ };
2383
- },
2384
- 'return': function () {
2385
- SAFE_CLOSING = true;
2386
- }
2387
- };
2388
- iteratorWithReturn[ITERATOR] = function () {
2389
- return this;
2390
- };
2391
- // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
2392
- Array.from(iteratorWithReturn, function () { throw 2; });
2393
- } catch (error) { /* empty */ }
2254
+ // ES3 wrong here
2255
+ var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
2394
2256
 
2395
- var checkCorrectnessOfIteration$1 = function (exec, SKIP_CLOSING) {
2396
- if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
2397
- var ITERATION_SUPPORT = false;
2257
+ // fallback for IE11 Script Access Denied error
2258
+ var tryGet = function (it, key) {
2398
2259
  try {
2399
- var object = {};
2400
- object[ITERATOR] = function () {
2401
- return {
2402
- next: function () {
2403
- return { done: ITERATION_SUPPORT = true };
2404
- }
2405
- };
2406
- };
2407
- exec(object);
2260
+ return it[key];
2408
2261
  } catch (error) { /* empty */ }
2409
- return ITERATION_SUPPORT;
2410
2262
  };
2411
2263
 
2412
- var uncurryThis$1 = functionUncurryThis;
2413
- var fails$1 = fails$d;
2414
- var isCallable$2 = isCallable$i;
2415
- var classof$1 = classof$4;
2416
- var getBuiltIn$1 = getBuiltIn$7;
2417
- var inspectSource$1 = inspectSource$4;
2418
-
2419
- var noop = function () { /* empty */ };
2420
- var empty = [];
2421
- var construct = getBuiltIn$1('Reflect', 'construct');
2422
- var constructorRegExp = /^\s*(?:class|function)\b/;
2423
- var exec = uncurryThis$1(constructorRegExp.exec);
2424
- var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
2425
-
2426
- var isConstructorModern = function isConstructor(argument) {
2427
- if (!isCallable$2(argument)) return false;
2428
- try {
2429
- construct(noop, empty, argument);
2430
- return true;
2431
- } catch (error) {
2432
- return false;
2433
- }
2434
- };
2435
-
2436
- var isConstructorLegacy = function isConstructor(argument) {
2437
- if (!isCallable$2(argument)) return false;
2438
- switch (classof$1(argument)) {
2439
- case 'AsyncFunction':
2440
- case 'GeneratorFunction':
2441
- case 'AsyncGeneratorFunction': return false;
2442
- }
2443
- try {
2444
- // we can't check .prototype since constructors produced by .bind haven't it
2445
- // `Function#toString` throws on some built-it function in some legacy engines
2446
- // (for example, `DOMQuad` and similar in FF41-)
2447
- return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource$1(argument));
2448
- } catch (error) {
2449
- return true;
2450
- }
2451
- };
2452
-
2453
- isConstructorLegacy.sham = true;
2454
-
2455
- // `IsConstructor` abstract operation
2456
- // https://tc39.es/ecma262/#sec-isconstructor
2457
- var isConstructor$1 = !construct || fails$1(function () {
2458
- var called;
2459
- return isConstructorModern(isConstructorModern.call)
2460
- || !isConstructorModern(Object)
2461
- || !isConstructorModern(function () { called = true; })
2462
- || called;
2463
- }) ? isConstructorLegacy : isConstructorModern;
2464
-
2465
- var global$8 = global$E;
2466
- var isConstructor = isConstructor$1;
2467
- var tryToString = tryToString$4;
2468
-
2469
- var TypeError$3 = global$8.TypeError;
2470
-
2471
- // `Assert: IsConstructor(argument) is true`
2472
- var aConstructor$1 = function (argument) {
2473
- if (isConstructor(argument)) return argument;
2474
- throw TypeError$3(tryToString(argument) + ' is not a constructor');
2264
+ // getting tag from ES6+ `Object.prototype.toString`
2265
+ var classof$1 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
2266
+ var O, tag, result;
2267
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
2268
+ // @@toStringTag case
2269
+ : typeof (tag = tryGet(O = Object$1(it), TO_STRING_TAG)) == 'string' ? tag
2270
+ // builtinTag case
2271
+ : CORRECT_ARGUMENTS ? classofRaw(O)
2272
+ // ES3 arguments fallback
2273
+ : (result = classofRaw(O)) == 'Object' && isCallable$1(O.callee) ? 'Arguments' : result;
2475
2274
  };
2476
2275
 
2477
- var anObject$1 = anObject$a;
2478
- var aConstructor = aConstructor$1;
2479
- var wellKnownSymbol$1 = wellKnownSymbol$e;
2276
+ var global$2 = global$r;
2277
+ var classof = classof$1;
2480
2278
 
2481
- var SPECIES$1 = wellKnownSymbol$1('species');
2279
+ var String$1 = global$2.String;
2482
2280
 
2483
- // `SpeciesConstructor` abstract operation
2484
- // https://tc39.es/ecma262/#sec-speciesconstructor
2485
- var speciesConstructor$1 = function (O, defaultConstructor) {
2486
- var C = anObject$1(O).constructor;
2487
- var S;
2488
- return C === undefined || (S = anObject$1(C)[SPECIES$1]) == undefined ? defaultConstructor : aConstructor(S);
2281
+ var toString$1 = function (argument) {
2282
+ if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
2283
+ return String$1(argument);
2489
2284
  };
2490
2285
 
2491
- var NATIVE_BIND = functionBindNative;
2492
-
2493
- var FunctionPrototype = Function.prototype;
2494
- var apply$1 = FunctionPrototype.apply;
2495
- var call$1 = FunctionPrototype.call;
2496
-
2497
- // eslint-disable-next-line es/no-reflect -- safe
2498
- var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$1.bind(apply$1) : function () {
2499
- return call$1.apply(apply$1, arguments);
2500
- });
2501
-
2286
+ var $ = _export;
2287
+ var DESCRIPTORS = descriptors;
2288
+ var global$1 = global$r;
2502
2289
  var uncurryThis = functionUncurryThis;
2503
-
2504
- var arraySlice$1 = uncurryThis([].slice);
2505
-
2506
- var global$7 = global$E;
2507
-
2508
- var TypeError$2 = global$7.TypeError;
2509
-
2510
- var validateArgumentsLength$1 = function (passed, required) {
2511
- if (passed < required) throw TypeError$2('Not enough arguments');
2512
- return passed;
2513
- };
2514
-
2515
- var userAgent$2 = engineUserAgent;
2516
-
2517
- var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2);
2518
-
2519
- var classof = classofRaw$1;
2520
- var global$6 = global$E;
2521
-
2522
- var engineIsNode = classof(global$6.process) == 'process';
2523
-
2524
- var global$5 = global$E;
2525
- var apply = functionApply;
2526
- var bind$2 = functionBindContext;
2527
- var isCallable$1 = isCallable$i;
2528
2290
  var hasOwn = hasOwnProperty_1;
2529
- var fails = fails$d;
2530
- var html = html$2;
2531
- var arraySlice = arraySlice$1;
2532
- var createElement = documentCreateElement$2;
2533
- var validateArgumentsLength = validateArgumentsLength$1;
2534
- var IS_IOS$1 = engineIsIos;
2535
- var IS_NODE$2 = engineIsNode;
2536
-
2537
- var set = global$5.setImmediate;
2538
- var clear = global$5.clearImmediate;
2539
- var process$2 = global$5.process;
2540
- var Dispatch = global$5.Dispatch;
2541
- var Function$1 = global$5.Function;
2542
- var MessageChannel = global$5.MessageChannel;
2543
- var String$1 = global$5.String;
2544
- var counter = 0;
2545
- var queue$1 = {};
2546
- var ONREADYSTATECHANGE = 'onreadystatechange';
2547
- var location, defer, channel, port;
2548
-
2549
- try {
2550
- // Deno throws a ReferenceError on `location` access without `--location` flag
2551
- location = global$5.location;
2552
- } catch (error) { /* empty */ }
2553
-
2554
- var run = function (id) {
2555
- if (hasOwn(queue$1, id)) {
2556
- var fn = queue$1[id];
2557
- delete queue$1[id];
2558
- fn();
2559
- }
2560
- };
2561
-
2562
- var runner = function (id) {
2563
- return function () {
2564
- run(id);
2565
- };
2566
- };
2567
-
2568
- var listener = function (event) {
2569
- run(event.data);
2570
- };
2571
-
2572
- var post = function (id) {
2573
- // old engines have not location.origin
2574
- global$5.postMessage(String$1(id), location.protocol + '//' + location.host);
2575
- };
2576
-
2577
- // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
2578
- if (!set || !clear) {
2579
- set = function setImmediate(handler) {
2580
- validateArgumentsLength(arguments.length, 1);
2581
- var fn = isCallable$1(handler) ? handler : Function$1(handler);
2582
- var args = arraySlice(arguments, 1);
2583
- queue$1[++counter] = function () {
2584
- apply(fn, undefined, args);
2585
- };
2586
- defer(counter);
2587
- return counter;
2588
- };
2589
- clear = function clearImmediate(id) {
2590
- delete queue$1[id];
2591
- };
2592
- // Node.js 0.8-
2593
- if (IS_NODE$2) {
2594
- defer = function (id) {
2595
- process$2.nextTick(runner(id));
2596
- };
2597
- // Sphere (JS game engine) Dispatch API
2598
- } else if (Dispatch && Dispatch.now) {
2599
- defer = function (id) {
2600
- Dispatch.now(runner(id));
2601
- };
2602
- // Browsers with MessageChannel, includes WebWorkers
2603
- // except iOS - https://github.com/zloirock/core-js/issues/624
2604
- } else if (MessageChannel && !IS_IOS$1) {
2605
- channel = new MessageChannel();
2606
- port = channel.port2;
2607
- channel.port1.onmessage = listener;
2608
- defer = bind$2(port.postMessage, port);
2609
- // Browsers with postMessage, skip WebWorkers
2610
- // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
2611
- } else if (
2612
- global$5.addEventListener &&
2613
- isCallable$1(global$5.postMessage) &&
2614
- !global$5.importScripts &&
2615
- location && location.protocol !== 'file:' &&
2616
- !fails(post)
2617
- ) {
2618
- defer = post;
2619
- global$5.addEventListener('message', listener, false);
2620
- // IE8-
2621
- } else if (ONREADYSTATECHANGE in createElement('script')) {
2622
- defer = function (id) {
2623
- html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
2624
- html.removeChild(this);
2625
- run(id);
2626
- };
2627
- };
2628
- // Rest old browsers
2629
- } else {
2630
- defer = function (id) {
2631
- setTimeout(runner(id), 0);
2632
- };
2633
- }
2634
- }
2635
-
2636
- var task$1 = {
2637
- set: set,
2638
- clear: clear
2639
- };
2640
-
2641
- var userAgent$1 = engineUserAgent;
2642
- var global$4 = global$E;
2643
-
2644
- var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$1) && global$4.Pebble !== undefined;
2645
-
2646
- var userAgent = engineUserAgent;
2647
-
2648
- var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent);
2649
-
2650
- var global$3 = global$E;
2651
- var bind$1 = functionBindContext;
2652
- var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
2653
- var macrotask = task$1.set;
2654
- var IS_IOS = engineIsIos;
2655
- var IS_IOS_PEBBLE = engineIsIosPebble;
2656
- var IS_WEBOS_WEBKIT = engineIsWebosWebkit;
2657
- var IS_NODE$1 = engineIsNode;
2658
-
2659
- var MutationObserver = global$3.MutationObserver || global$3.WebKitMutationObserver;
2660
- var document$2 = global$3.document;
2661
- var process$1 = global$3.process;
2662
- var Promise$1 = global$3.Promise;
2663
- // Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
2664
- var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global$3, 'queueMicrotask');
2665
- var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
2666
-
2667
- var flush, head, last, notify$1, toggle, node, promise, then;
2668
-
2669
- // modern engines have queueMicrotask method
2670
- if (!queueMicrotask) {
2671
- flush = function () {
2672
- var parent, fn;
2673
- if (IS_NODE$1 && (parent = process$1.domain)) parent.exit();
2674
- while (head) {
2675
- fn = head.fn;
2676
- head = head.next;
2677
- try {
2678
- fn();
2679
- } catch (error) {
2680
- if (head) notify$1();
2681
- else last = undefined;
2682
- throw error;
2683
- }
2684
- } last = undefined;
2685
- if (parent) parent.enter();
2686
- };
2687
-
2688
- // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
2689
- // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
2690
- if (!IS_IOS && !IS_NODE$1 && !IS_WEBOS_WEBKIT && MutationObserver && document$2) {
2691
- toggle = true;
2692
- node = document$2.createTextNode('');
2693
- new MutationObserver(flush).observe(node, { characterData: true });
2694
- notify$1 = function () {
2695
- node.data = toggle = !toggle;
2696
- };
2697
- // environments with maybe non-completely correct, but existent Promise
2698
- } else if (!IS_IOS_PEBBLE && Promise$1 && Promise$1.resolve) {
2699
- // Promise.resolve without an argument throws an error in LG WebOS 2
2700
- promise = Promise$1.resolve(undefined);
2701
- // workaround of WebKit ~ iOS Safari 10.1 bug
2702
- promise.constructor = Promise$1;
2703
- then = bind$1(promise.then, promise);
2704
- notify$1 = function () {
2705
- then(flush);
2706
- };
2707
- // Node.js without promises
2708
- } else if (IS_NODE$1) {
2709
- notify$1 = function () {
2710
- process$1.nextTick(flush);
2711
- };
2712
- // for other environments - macrotask based on:
2713
- // - setImmediate
2714
- // - MessageChannel
2715
- // - window.postMessag
2716
- // - onreadystatechange
2717
- // - setTimeout
2718
- } else {
2719
- // strange IE + webpack dev server bug - use .bind(global)
2720
- macrotask = bind$1(macrotask, global$3);
2721
- notify$1 = function () {
2722
- macrotask(flush);
2723
- };
2724
- }
2725
- }
2726
-
2727
- var microtask$1 = queueMicrotask || function (fn) {
2728
- var task = { fn: fn, next: undefined };
2729
- if (last) last.next = task;
2730
- if (!head) {
2731
- head = task;
2732
- notify$1();
2733
- } last = task;
2734
- };
2735
-
2736
- var newPromiseCapability$2 = {};
2737
-
2738
- var aCallable$1 = aCallable$5;
2739
-
2740
- var PromiseCapability = function (C) {
2741
- var resolve, reject;
2742
- this.promise = new C(function ($$resolve, $$reject) {
2743
- if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
2744
- resolve = $$resolve;
2745
- reject = $$reject;
2746
- });
2747
- this.resolve = aCallable$1(resolve);
2748
- this.reject = aCallable$1(reject);
2749
- };
2750
-
2751
- // `NewPromiseCapability` abstract operation
2752
- // https://tc39.es/ecma262/#sec-newpromisecapability
2753
- newPromiseCapability$2.f = function (C) {
2754
- return new PromiseCapability(C);
2755
- };
2756
-
2757
- var anObject = anObject$a;
2758
- var isObject$1 = isObject$7;
2759
- var newPromiseCapability$1 = newPromiseCapability$2;
2760
-
2761
- var promiseResolve$1 = function (C, x) {
2762
- anObject(C);
2763
- if (isObject$1(x) && x.constructor === C) return x;
2764
- var promiseCapability = newPromiseCapability$1.f(C);
2765
- var resolve = promiseCapability.resolve;
2766
- resolve(x);
2767
- return promiseCapability.promise;
2768
- };
2769
-
2770
- var global$2 = global$E;
2771
-
2772
- var hostReportErrors$1 = function (a, b) {
2773
- var console = global$2.console;
2774
- if (console && console.error) {
2775
- arguments.length == 1 ? console.error(a) : console.error(a, b);
2776
- }
2777
- };
2778
-
2779
- var perform$1 = function (exec) {
2780
- try {
2781
- return { error: false, value: exec() };
2782
- } catch (error) {
2783
- return { error: true, value: error };
2784
- }
2785
- };
2786
-
2787
- var Queue$1 = function () {
2788
- this.head = null;
2789
- this.tail = null;
2790
- };
2791
-
2792
- Queue$1.prototype = {
2793
- add: function (item) {
2794
- var entry = { item: item, next: null };
2795
- if (this.head) this.tail.next = entry;
2796
- else this.head = entry;
2797
- this.tail = entry;
2798
- },
2799
- get: function () {
2800
- var entry = this.head;
2801
- if (entry) {
2802
- this.head = entry.next;
2803
- if (this.tail === entry) this.tail = null;
2804
- return entry.item;
2805
- }
2806
- }
2807
- };
2808
-
2809
- var queue = Queue$1;
2810
-
2811
- var engineIsBrowser = typeof window == 'object';
2812
-
2813
- var $ = _export;
2814
- var global$1 = global$E;
2815
- var getBuiltIn = getBuiltIn$7;
2816
- var call = functionCall;
2817
- var NativePromise = nativePromiseConstructor;
2818
- var redefine = redefine$5.exports;
2819
- var redefineAll = redefineAll$1;
2820
- var setPrototypeOf = objectSetPrototypeOf;
2821
- var setToStringTag = setToStringTag$3;
2822
- var setSpecies = setSpecies$1;
2823
- var aCallable = aCallable$5;
2824
- var isCallable = isCallable$i;
2825
- var isObject = isObject$7;
2826
- var anInstance = anInstance$1;
2827
- var inspectSource = inspectSource$4;
2828
- var iterate = iterate$1;
2829
- var checkCorrectnessOfIteration = checkCorrectnessOfIteration$1;
2830
- var speciesConstructor = speciesConstructor$1;
2831
- var task = task$1.set;
2832
- var microtask = microtask$1;
2833
- var promiseResolve = promiseResolve$1;
2834
- var hostReportErrors = hostReportErrors$1;
2835
- var newPromiseCapabilityModule = newPromiseCapability$2;
2836
- var perform = perform$1;
2837
- var Queue = queue;
2838
- var InternalStateModule = internalState;
2839
- var isForced = isForced_1;
2840
- var wellKnownSymbol = wellKnownSymbol$e;
2841
- var IS_BROWSER = engineIsBrowser;
2842
- var IS_NODE = engineIsNode;
2843
- var V8_VERSION = engineV8Version;
2291
+ var isCallable = isCallable$f;
2292
+ var isPrototypeOf = objectIsPrototypeOf;
2293
+ var toString = toString$1;
2294
+ var defineProperty = objectDefineProperty.f;
2295
+ var copyConstructorProperties = copyConstructorProperties$2;
2844
2296
 
2845
- var SPECIES = wellKnownSymbol('species');
2846
- var PROMISE = 'Promise';
2297
+ var NativeSymbol = global$1.Symbol;
2298
+ var SymbolPrototype = NativeSymbol && NativeSymbol.prototype;
2847
2299
 
2848
- var getInternalState = InternalStateModule.getterFor(PROMISE);
2849
- var setInternalState = InternalStateModule.set;
2850
- var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
2851
- var NativePromisePrototype = NativePromise && NativePromise.prototype;
2852
- var PromiseConstructor = NativePromise;
2853
- var PromisePrototype = NativePromisePrototype;
2854
- var TypeError$1 = global$1.TypeError;
2855
- var document$1 = global$1.document;
2856
- var process = global$1.process;
2857
- var newPromiseCapability = newPromiseCapabilityModule.f;
2858
- var newGenericPromiseCapability = newPromiseCapability;
2859
-
2860
- var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$1.dispatchEvent);
2861
- var NATIVE_REJECTION_EVENT = isCallable(global$1.PromiseRejectionEvent);
2862
- var UNHANDLED_REJECTION = 'unhandledrejection';
2863
- var REJECTION_HANDLED = 'rejectionhandled';
2864
- var PENDING = 0;
2865
- var FULFILLED = 1;
2866
- var REJECTED = 2;
2867
- var HANDLED = 1;
2868
- var UNHANDLED = 2;
2869
- var SUBCLASSING = false;
2870
-
2871
- var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
2872
-
2873
- var FORCED = isForced(PROMISE, function () {
2874
- var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(PromiseConstructor);
2875
- var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(PromiseConstructor);
2876
- // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
2877
- // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
2878
- // We can't detect it synchronously, so just check versions
2879
- if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;
2880
- // We can't use @@species feature detection in V8 since it causes
2881
- // deoptimization and performance degradation
2882
- // https://github.com/zloirock/core-js/issues/679
2883
- if (V8_VERSION >= 51 && /native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) return false;
2884
- // Detect correctness of subclassing with @@species support
2885
- var promise = new PromiseConstructor(function (resolve) { resolve(1); });
2886
- var FakePromise = function (exec) {
2887
- exec(function () { /* empty */ }, function () { /* empty */ });
2300
+ if (DESCRIPTORS && isCallable(NativeSymbol) && (!('description' in SymbolPrototype) ||
2301
+ // Safari 12 bug
2302
+ NativeSymbol().description !== undefined
2303
+ )) {
2304
+ var EmptyStringDescriptionStore = {};
2305
+ // wrap Symbol constructor for correct work with undefined description
2306
+ var SymbolWrapper = function Symbol() {
2307
+ var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString(arguments[0]);
2308
+ var result = isPrototypeOf(SymbolPrototype, this)
2309
+ ? new NativeSymbol(description)
2310
+ // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
2311
+ : description === undefined ? NativeSymbol() : NativeSymbol(description);
2312
+ if (description === '') EmptyStringDescriptionStore[result] = true;
2313
+ return result;
2888
2314
  };
2889
- var constructor = promise.constructor = {};
2890
- constructor[SPECIES] = FakePromise;
2891
- SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
2892
- if (!SUBCLASSING) return true;
2893
- // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
2894
- return !GLOBAL_CORE_JS_PROMISE && IS_BROWSER && !NATIVE_REJECTION_EVENT;
2895
- });
2896
-
2897
- var INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) {
2898
- PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });
2899
- });
2900
2315
 
2901
- // helpers
2902
- var isThenable = function (it) {
2903
- var then;
2904
- return isObject(it) && isCallable(then = it.then) ? then : false;
2905
- };
2906
-
2907
- var callReaction = function (reaction, state) {
2908
- var value = state.value;
2909
- var ok = state.state == FULFILLED;
2910
- var handler = ok ? reaction.ok : reaction.fail;
2911
- var resolve = reaction.resolve;
2912
- var reject = reaction.reject;
2913
- var domain = reaction.domain;
2914
- var result, then, exited;
2915
- try {
2916
- if (handler) {
2917
- if (!ok) {
2918
- if (state.rejection === UNHANDLED) onHandleUnhandled(state);
2919
- state.rejection = HANDLED;
2920
- }
2921
- if (handler === true) result = value;
2922
- else {
2923
- if (domain) domain.enter();
2924
- result = handler(value); // can throw
2925
- if (domain) {
2926
- domain.exit();
2927
- exited = true;
2928
- }
2929
- }
2930
- if (result === reaction.promise) {
2931
- reject(TypeError$1('Promise-chain cycle'));
2932
- } else if (then = isThenable(result)) {
2933
- call(then, result, resolve, reject);
2934
- } else resolve(result);
2935
- } else reject(value);
2936
- } catch (error) {
2937
- if (domain && !exited) domain.exit();
2938
- reject(error);
2939
- }
2940
- };
2316
+ copyConstructorProperties(SymbolWrapper, NativeSymbol);
2317
+ SymbolWrapper.prototype = SymbolPrototype;
2318
+ SymbolPrototype.constructor = SymbolWrapper;
2941
2319
 
2942
- var notify = function (state, isReject) {
2943
- if (state.notified) return;
2944
- state.notified = true;
2945
- microtask(function () {
2946
- var reactions = state.reactions;
2947
- var reaction;
2948
- while (reaction = reactions.get()) {
2949
- callReaction(reaction, state);
2950
- }
2951
- state.notified = false;
2952
- if (isReject && !state.rejection) onUnhandled(state);
2953
- });
2954
- };
2320
+ var NATIVE_SYMBOL = String(NativeSymbol('test')) == 'Symbol(test)';
2321
+ var symbolToString = uncurryThis(SymbolPrototype.toString);
2322
+ var symbolValueOf = uncurryThis(SymbolPrototype.valueOf);
2323
+ var regexp = /^Symbol\((.*)\)[^)]+$/;
2324
+ var replace = uncurryThis(''.replace);
2325
+ var stringSlice = uncurryThis(''.slice);
2955
2326
 
2956
- var dispatchEvent = function (name, promise, reason) {
2957
- var event, handler;
2958
- if (DISPATCH_EVENT) {
2959
- event = document$1.createEvent('Event');
2960
- event.promise = promise;
2961
- event.reason = reason;
2962
- event.initEvent(name, false, true);
2963
- global$1.dispatchEvent(event);
2964
- } else event = { promise: promise, reason: reason };
2965
- if (!NATIVE_REJECTION_EVENT && (handler = global$1['on' + name])) handler(event);
2966
- else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
2967
- };
2968
-
2969
- var onUnhandled = function (state) {
2970
- call(task, global$1, function () {
2971
- var promise = state.facade;
2972
- var value = state.value;
2973
- var IS_UNHANDLED = isUnhandled(state);
2974
- var result;
2975
- if (IS_UNHANDLED) {
2976
- result = perform(function () {
2977
- if (IS_NODE) {
2978
- process.emit('unhandledRejection', value, promise);
2979
- } else dispatchEvent(UNHANDLED_REJECTION, promise, value);
2980
- });
2981
- // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
2982
- state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
2983
- if (result.error) throw result.value;
2327
+ defineProperty(SymbolPrototype, 'description', {
2328
+ configurable: true,
2329
+ get: function description() {
2330
+ var symbol = symbolValueOf(this);
2331
+ var string = symbolToString(symbol);
2332
+ if (hasOwn(EmptyStringDescriptionStore, symbol)) return '';
2333
+ var desc = NATIVE_SYMBOL ? stringSlice(string, 7, -1) : replace(string, regexp, '$1');
2334
+ return desc === '' ? undefined : desc;
2984
2335
  }
2985
2336
  });
2986
- };
2987
-
2988
- var isUnhandled = function (state) {
2989
- return state.rejection !== HANDLED && !state.parent;
2990
- };
2991
-
2992
- var onHandleUnhandled = function (state) {
2993
- call(task, global$1, function () {
2994
- var promise = state.facade;
2995
- if (IS_NODE) {
2996
- process.emit('rejectionHandled', promise);
2997
- } else dispatchEvent(REJECTION_HANDLED, promise, state.value);
2998
- });
2999
- };
3000
-
3001
- var bind = function (fn, state, unwrap) {
3002
- return function (value) {
3003
- fn(state, value, unwrap);
3004
- };
3005
- };
3006
-
3007
- var internalReject = function (state, value, unwrap) {
3008
- if (state.done) return;
3009
- state.done = true;
3010
- if (unwrap) state = unwrap;
3011
- state.value = value;
3012
- state.state = REJECTED;
3013
- notify(state, true);
3014
- };
3015
-
3016
- var internalResolve = function (state, value, unwrap) {
3017
- if (state.done) return;
3018
- state.done = true;
3019
- if (unwrap) state = unwrap;
3020
- try {
3021
- if (state.facade === value) throw TypeError$1("Promise can't be resolved itself");
3022
- var then = isThenable(value);
3023
- if (then) {
3024
- microtask(function () {
3025
- var wrapper = { done: false };
3026
- try {
3027
- call(then, value,
3028
- bind(internalResolve, wrapper, state),
3029
- bind(internalReject, wrapper, state)
3030
- );
3031
- } catch (error) {
3032
- internalReject(wrapper, error, state);
3033
- }
3034
- });
3035
- } else {
3036
- state.value = value;
3037
- state.state = FULFILLED;
3038
- notify(state, false);
3039
- }
3040
- } catch (error) {
3041
- internalReject({ done: false }, error, state);
3042
- }
3043
- };
3044
2337
 
3045
- // constructor polyfill
3046
- if (FORCED) {
3047
- // 25.4.3.1 Promise(executor)
3048
- PromiseConstructor = function Promise(executor) {
3049
- anInstance(this, PromisePrototype);
3050
- aCallable(executor);
3051
- call(Internal, this);
3052
- var state = getInternalState(this);
3053
- try {
3054
- executor(bind(internalResolve, state), bind(internalReject, state));
3055
- } catch (error) {
3056
- internalReject(state, error);
3057
- }
3058
- };
3059
- PromisePrototype = PromiseConstructor.prototype;
3060
- // eslint-disable-next-line no-unused-vars -- required for `.length`
3061
- Internal = function Promise(executor) {
3062
- setInternalState(this, {
3063
- type: PROMISE,
3064
- done: false,
3065
- notified: false,
3066
- parent: false,
3067
- reactions: new Queue(),
3068
- rejection: false,
3069
- state: PENDING,
3070
- value: undefined
3071
- });
3072
- };
3073
- Internal.prototype = redefineAll(PromisePrototype, {
3074
- // `Promise.prototype.then` method
3075
- // https://tc39.es/ecma262/#sec-promise.prototype.then
3076
- // eslint-disable-next-line unicorn/no-thenable -- safe
3077
- then: function then(onFulfilled, onRejected) {
3078
- var state = getInternalPromiseState(this);
3079
- var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));
3080
- state.parent = true;
3081
- reaction.ok = isCallable(onFulfilled) ? onFulfilled : true;
3082
- reaction.fail = isCallable(onRejected) && onRejected;
3083
- reaction.domain = IS_NODE ? process.domain : undefined;
3084
- if (state.state == PENDING) state.reactions.add(reaction);
3085
- else microtask(function () {
3086
- callReaction(reaction, state);
3087
- });
3088
- return reaction.promise;
3089
- },
3090
- // `Promise.prototype.catch` method
3091
- // https://tc39.es/ecma262/#sec-promise.prototype.catch
3092
- 'catch': function (onRejected) {
3093
- return this.then(undefined, onRejected);
3094
- }
2338
+ $({ global: true, forced: true }, {
2339
+ Symbol: SymbolWrapper
3095
2340
  });
3096
- OwnPromiseCapability = function () {
3097
- var promise = new Internal();
3098
- var state = getInternalState(promise);
3099
- this.promise = promise;
3100
- this.resolve = bind(internalResolve, state);
3101
- this.reject = bind(internalReject, state);
3102
- };
3103
- newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
3104
- return C === PromiseConstructor || C === PromiseWrapper
3105
- ? new OwnPromiseCapability(C)
3106
- : newGenericPromiseCapability(C);
3107
- };
3108
-
3109
- if (isCallable(NativePromise) && NativePromisePrototype !== Object.prototype) {
3110
- nativeThen = NativePromisePrototype.then;
3111
-
3112
- if (!SUBCLASSING) {
3113
- // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
3114
- redefine(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {
3115
- var that = this;
3116
- return new PromiseConstructor(function (resolve, reject) {
3117
- call(nativeThen, that, resolve, reject);
3118
- }).then(onFulfilled, onRejected);
3119
- // https://github.com/zloirock/core-js/issues/640
3120
- }, { unsafe: true });
3121
-
3122
- // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
3123
- redefine(NativePromisePrototype, 'catch', PromisePrototype['catch'], { unsafe: true });
3124
- }
3125
-
3126
- // make `.constructor === Promise` work for native promise-based APIs
3127
- try {
3128
- delete NativePromisePrototype.constructor;
3129
- } catch (error) { /* empty */ }
3130
-
3131
- // make `instanceof Promise` work for native promise-based APIs
3132
- if (setPrototypeOf) {
3133
- setPrototypeOf(NativePromisePrototype, PromisePrototype);
3134
- }
3135
- }
3136
2341
  }
3137
2342
 
3138
- $({ global: true, wrap: true, forced: FORCED }, {
3139
- Promise: PromiseConstructor
3140
- });
3141
-
3142
- setToStringTag(PromiseConstructor, PROMISE, false);
3143
- setSpecies(PROMISE);
3144
-
3145
- PromiseWrapper = getBuiltIn(PROMISE);
3146
-
3147
- // statics
3148
- $({ target: PROMISE, stat: true, forced: FORCED }, {
3149
- // `Promise.reject` method
3150
- // https://tc39.es/ecma262/#sec-promise.reject
3151
- reject: function reject(r) {
3152
- var capability = newPromiseCapability(this);
3153
- call(capability.reject, undefined, r);
3154
- return capability.promise;
3155
- }
3156
- });
3157
-
3158
- $({ target: PROMISE, stat: true, forced: FORCED }, {
3159
- // `Promise.resolve` method
3160
- // https://tc39.es/ecma262/#sec-promise.resolve
3161
- resolve: function resolve(x) {
3162
- return promiseResolve(this, x);
3163
- }
3164
- });
3165
-
3166
- $({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
3167
- // `Promise.all` method
3168
- // https://tc39.es/ecma262/#sec-promise.all
3169
- all: function all(iterable) {
3170
- var C = this;
3171
- var capability = newPromiseCapability(C);
3172
- var resolve = capability.resolve;
3173
- var reject = capability.reject;
3174
- var result = perform(function () {
3175
- var $promiseResolve = aCallable(C.resolve);
3176
- var values = [];
3177
- var counter = 0;
3178
- var remaining = 1;
3179
- iterate(iterable, function (promise) {
3180
- var index = counter++;
3181
- var alreadyCalled = false;
3182
- remaining++;
3183
- call($promiseResolve, C, promise).then(function (value) {
3184
- if (alreadyCalled) return;
3185
- alreadyCalled = true;
3186
- values[index] = value;
3187
- --remaining || resolve(values);
3188
- }, reject);
3189
- });
3190
- --remaining || resolve(values);
3191
- });
3192
- if (result.error) reject(result.value);
3193
- return capability.promise;
3194
- },
3195
- // `Promise.race` method
3196
- // https://tc39.es/ecma262/#sec-promise.race
3197
- race: function race(iterable) {
3198
- var C = this;
3199
- var capability = newPromiseCapability(C);
3200
- var reject = capability.reject;
3201
- var result = perform(function () {
3202
- var $promiseResolve = aCallable(C.resolve);
3203
- iterate(iterable, function (promise) {
3204
- call($promiseResolve, C, promise).then(capability.resolve, reject);
3205
- });
3206
- });
3207
- if (result.error) reject(result.value);
3208
- return capability.promise;
3209
- }
3210
- });
3211
-
3212
2343
  const RadioGroup = ({
3213
2344
  description,
3214
2345
  title,
3215
2346
  validator,
2347
+ onChangeRadio,
3216
2348
  children
3217
2349
  }) => {
2350
+ const [checked, setChecked] = React.useState();
3218
2351
  const validatorClassName = validateClassName(validator === null || validator === void 0 ? void 0 : validator.indicator);
2352
+
2353
+ const onChange = event => {
2354
+ setChecked(event.target.value);
2355
+ onChangeRadio && onChangeRadio(event.target.value);
2356
+ };
2357
+
3219
2358
  return jsxs("div", Object.assign({
3220
2359
  className: "form-group"
3221
2360
  }, {
@@ -3228,10 +2367,12 @@ const RadioGroup = ({
3228
2367
  className: "form-info"
3229
2368
  }, {
3230
2369
  children: description
3231
- }), void 0), React.Children.toArray(children).map(child => {
3232
- return /*#__PURE__*/React.isValidElement(child) ? /*#__PURE__*/React.cloneElement(child, {
3233
- validator: validatorClassName
3234
- }) : child;
2370
+ }), void 0), React.Children.map(children, Child => {
2371
+ return /*#__PURE__*/React.isValidElement(Child) ? /*#__PURE__*/React.cloneElement(Child, {
2372
+ validator: validatorClassName,
2373
+ onChange,
2374
+ checked: checked === Child.props.value
2375
+ }) : Child;
3235
2376
  })]
3236
2377
  }), void 0), (validator === null || validator === void 0 ? void 0 : validator.message) && jsx("span", Object.assign({
3237
2378
  className: "form-info"
@@ -3383,4 +2524,4 @@ const Navbar = ({
3383
2524
  }), void 0);
3384
2525
  };
3385
2526
 
3386
- export { Alert, Button, ButtonGroup, Card, Checkbox, EmailInput, Flexbox, Form, Group, Link, List, Modal, Navbar, NumberInput, RadioButton, RadioGroup, Text, TextInput };
2527
+ export { Alert, Button, ButtonGroup, Card, Checkbox, EmailInput, Flexbox, Form, FormItems, Group, Link, List, Modal, Navbar, NumberInput, RadioButton, RadioGroup, RenderInput, Text, TextInput };