@sebgroup/green-react 2.6.2 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.esm.js CHANGED
@@ -1,14 +1,14 @@
1
1
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
- import React, { useState, useEffect, useRef, useMemo, useLayoutEffect, forwardRef, useCallback } from 'react';
3
- import { randomId, createDatepicker, months, years, validateClassName, debounce, delay, sliderColors, getSliderTrackBackground } from '@sebgroup/extract';
2
+ import React, { useState, useEffect, useMemo, useRef, useLayoutEffect, forwardRef, useCallback, useId } from 'react';
3
+ import { randomId, validateClassName, debounce, delay, sliderColors, getSliderTrackBackground } from '@sebgroup/extract';
4
4
  import { createComponent } from '@lit/react';
5
- import { getScopedTagName, GdsDropdown, GdsOption, GdsContextMenu, GdsMenuItem } from '@sebgroup/green-core';
5
+ import { getScopedTagName, GdsDatepicker, GdsDropdown, GdsOption, GdsContextMenu, GdsMenuItem } from '@sebgroup/green-core';
6
6
  import { registerTransitionalStyles } from '@sebgroup/green-core/transitional-styles';
7
7
  import classNames from 'classnames';
8
8
 
9
9
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
10
10
 
11
- var fails$g = function (exec) {
11
+ var fails$n = function (exec) {
12
12
  try {
13
13
  return !!exec();
14
14
  } catch (error) {
@@ -16,9 +16,9 @@ var fails$g = function (exec) {
16
16
  }
17
17
  };
18
18
 
19
- var fails$f = fails$g;
19
+ var fails$m = fails$n;
20
20
 
21
- var functionBindNative = !fails$f(function () {
21
+ var functionBindNative = !fails$m(function () {
22
22
  // eslint-disable-next-line es/no-function-prototype-bind -- safe
23
23
  var test = (function () { /* empty */ }).bind();
24
24
  // eslint-disable-next-line no-prototype-builtins -- safe
@@ -28,63 +28,63 @@ var functionBindNative = !fails$f(function () {
28
28
  var NATIVE_BIND$3 = functionBindNative;
29
29
 
30
30
  var FunctionPrototype$2 = Function.prototype;
31
- var call$f = FunctionPrototype$2.call;
32
- var uncurryThisWithBind = NATIVE_BIND$3 && FunctionPrototype$2.bind.bind(call$f, call$f);
31
+ var call$i = FunctionPrototype$2.call;
32
+ var uncurryThisWithBind = NATIVE_BIND$3 && FunctionPrototype$2.bind.bind(call$i, call$i);
33
33
 
34
34
  var functionUncurryThis = NATIVE_BIND$3 ? uncurryThisWithBind : function (fn) {
35
35
  return function () {
36
- return call$f.apply(fn, arguments);
36
+ return call$i.apply(fn, arguments);
37
37
  };
38
38
  };
39
39
 
40
- var uncurryThis$i = functionUncurryThis;
40
+ var uncurryThis$m = functionUncurryThis;
41
41
 
42
- var toString$6 = uncurryThis$i({}.toString);
43
- var stringSlice$2 = uncurryThis$i(''.slice);
42
+ var toString$a = uncurryThis$m({}.toString);
43
+ var stringSlice$4 = uncurryThis$m(''.slice);
44
44
 
45
45
  var classofRaw$2 = function (it) {
46
- return stringSlice$2(toString$6(it), 8, -1);
46
+ return stringSlice$4(toString$a(it), 8, -1);
47
47
  };
48
48
 
49
- var uncurryThis$h = functionUncurryThis;
50
- var fails$e = fails$g;
51
- var classof$6 = classofRaw$2;
49
+ var uncurryThis$l = functionUncurryThis;
50
+ var fails$l = fails$n;
51
+ var classof$7 = classofRaw$2;
52
52
 
53
53
  var $Object$4 = Object;
54
- var split = uncurryThis$h(''.split);
54
+ var split = uncurryThis$l(''.split);
55
55
 
56
56
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
57
- var indexedObject = fails$e(function () {
57
+ var indexedObject = fails$l(function () {
58
58
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
59
59
  // eslint-disable-next-line no-prototype-builtins -- safe
60
60
  return !$Object$4('z').propertyIsEnumerable(0);
61
61
  }) ? function (it) {
62
- return classof$6(it) === 'String' ? split(it, '') : $Object$4(it);
62
+ return classof$7(it) === 'String' ? split(it, '') : $Object$4(it);
63
63
  } : $Object$4;
64
64
 
65
65
  // we can't use just `it == null` since of `document.all` special case
66
66
  // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
67
- var isNullOrUndefined$4 = function (it) {
67
+ var isNullOrUndefined$5 = function (it) {
68
68
  return it === null || it === undefined;
69
69
  };
70
70
 
71
- var isNullOrUndefined$3 = isNullOrUndefined$4;
71
+ var isNullOrUndefined$4 = isNullOrUndefined$5;
72
72
 
73
- var $TypeError$d = TypeError;
73
+ var $TypeError$f = TypeError;
74
74
 
75
75
  // `RequireObjectCoercible` abstract operation
76
76
  // https://tc39.es/ecma262/#sec-requireobjectcoercible
77
- var requireObjectCoercible$4 = function (it) {
78
- if (isNullOrUndefined$3(it)) throw new $TypeError$d("Can't call method on " + it);
77
+ var requireObjectCoercible$5 = function (it) {
78
+ if (isNullOrUndefined$4(it)) throw new $TypeError$f("Can't call method on " + it);
79
79
  return it;
80
80
  };
81
81
 
82
82
  // toObject with fallback for non-array-like ES3 strings
83
83
  var IndexedObject$1 = indexedObject;
84
- var requireObjectCoercible$3 = requireObjectCoercible$4;
84
+ var requireObjectCoercible$4 = requireObjectCoercible$5;
85
85
 
86
86
  var toIndexedObject$5 = function (it) {
87
- return IndexedObject$1(requireObjectCoercible$3(it));
87
+ return IndexedObject$1(requireObjectCoercible$4(it));
88
88
  };
89
89
 
90
90
  var check = function (it) {
@@ -92,7 +92,7 @@ var check = function (it) {
92
92
  };
93
93
 
94
94
  // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
95
- var global$k =
95
+ var global$o =
96
96
  // eslint-disable-next-line es/no-global-this -- safe
97
97
  check(typeof globalThis == 'object' && globalThis) ||
98
98
  check(typeof window == 'object' && window) ||
@@ -103,32 +103,32 @@ var global$k =
103
103
  // eslint-disable-next-line no-new-func -- fallback
104
104
  (function () { return this; })() || Function('return this')();
105
105
 
106
- var shared$3 = {exports: {}};
106
+ var shared$4 = {exports: {}};
107
107
 
108
- var global$j = global$k;
108
+ var global$n = global$o;
109
109
 
110
110
  // eslint-disable-next-line es/no-object-defineproperty -- safe
111
- var defineProperty$6 = Object.defineProperty;
111
+ var defineProperty$7 = Object.defineProperty;
112
112
 
113
113
  var defineGlobalProperty$3 = function (key, value) {
114
114
  try {
115
- defineProperty$6(global$j, key, { value: value, configurable: true, writable: true });
115
+ defineProperty$7(global$n, key, { value: value, configurable: true, writable: true });
116
116
  } catch (error) {
117
- global$j[key] = value;
117
+ global$n[key] = value;
118
118
  } return value;
119
119
  };
120
120
 
121
- var global$i = global$k;
121
+ var global$m = global$o;
122
122
  var defineGlobalProperty$2 = defineGlobalProperty$3;
123
123
 
124
124
  var SHARED = '__core-js_shared__';
125
- var store$3 = global$i[SHARED] || defineGlobalProperty$2(SHARED, {});
125
+ var store$3 = global$m[SHARED] || defineGlobalProperty$2(SHARED, {});
126
126
 
127
127
  var sharedStore = store$3;
128
128
 
129
129
  var store$2 = sharedStore;
130
130
 
131
- (shared$3.exports = function (key, value) {
131
+ (shared$4.exports = function (key, value) {
132
132
  return store$2[key] || (store$2[key] = value !== undefined ? value : {});
133
133
  })('versions', []).push({
134
134
  version: '3.33.3',
@@ -138,45 +138,45 @@ var store$2 = sharedStore;
138
138
  source: 'https://github.com/zloirock/core-js'
139
139
  });
140
140
 
141
- var requireObjectCoercible$2 = requireObjectCoercible$4;
141
+ var requireObjectCoercible$3 = requireObjectCoercible$5;
142
142
 
143
143
  var $Object$3 = Object;
144
144
 
145
145
  // `ToObject` abstract operation
146
146
  // https://tc39.es/ecma262/#sec-toobject
147
- var toObject$3 = function (argument) {
148
- return $Object$3(requireObjectCoercible$2(argument));
147
+ var toObject$4 = function (argument) {
148
+ return $Object$3(requireObjectCoercible$3(argument));
149
149
  };
150
150
 
151
- var uncurryThis$g = functionUncurryThis;
152
- var toObject$2 = toObject$3;
151
+ var uncurryThis$k = functionUncurryThis;
152
+ var toObject$3 = toObject$4;
153
153
 
154
- var hasOwnProperty = uncurryThis$g({}.hasOwnProperty);
154
+ var hasOwnProperty = uncurryThis$k({}.hasOwnProperty);
155
155
 
156
156
  // `HasOwnProperty` abstract operation
157
157
  // https://tc39.es/ecma262/#sec-hasownproperty
158
158
  // eslint-disable-next-line es/no-object-hasown -- safe
159
159
  var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
160
- return hasOwnProperty(toObject$2(it), key);
160
+ return hasOwnProperty(toObject$3(it), key);
161
161
  };
162
162
 
163
- var uncurryThis$f = functionUncurryThis;
163
+ var uncurryThis$j = functionUncurryThis;
164
164
 
165
165
  var id = 0;
166
166
  var postfix = Math.random();
167
- var toString$5 = uncurryThis$f(1.0.toString);
167
+ var toString$9 = uncurryThis$j(1.0.toString);
168
168
 
169
169
  var uid$2 = function (key) {
170
- return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$5(++id + postfix, 36);
170
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$9(++id + postfix, 36);
171
171
  };
172
172
 
173
173
  var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
174
174
 
175
- var global$h = global$k;
176
- var userAgent$3 = engineUserAgent;
175
+ var global$l = global$o;
176
+ var userAgent$5 = engineUserAgent;
177
177
 
178
- var process$3 = global$h.process;
179
- var Deno$1 = global$h.Deno;
178
+ var process$3 = global$l.process;
179
+ var Deno$1 = global$l.Deno;
180
180
  var versions = process$3 && process$3.versions || Deno$1 && Deno$1.version;
181
181
  var v8 = versions && versions.v8;
182
182
  var match, version;
@@ -190,10 +190,10 @@ if (v8) {
190
190
 
191
191
  // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
192
192
  // so check `userAgent` even if `.v8` exists, but 0
193
- if (!version && userAgent$3) {
194
- match = userAgent$3.match(/Edge\/(\d+)/);
193
+ if (!version && userAgent$5) {
194
+ match = userAgent$5.match(/Edge\/(\d+)/);
195
195
  if (!match || match[1] >= 74) {
196
- match = userAgent$3.match(/Chrome\/(\d+)/);
196
+ match = userAgent$5.match(/Chrome\/(\d+)/);
197
197
  if (match) version = +match[1];
198
198
  }
199
199
  }
@@ -202,13 +202,13 @@ var engineV8Version = version;
202
202
 
203
203
  /* eslint-disable es/no-symbol -- required for testing */
204
204
  var V8_VERSION$1 = engineV8Version;
205
- var fails$d = fails$g;
206
- var global$g = global$k;
205
+ var fails$k = fails$n;
206
+ var global$k = global$o;
207
207
 
208
- var $String$5 = global$g.String;
208
+ var $String$5 = global$k.String;
209
209
 
210
210
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
211
- var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$d(function () {
211
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$k(function () {
212
212
  var symbol = Symbol('symbol detection');
213
213
  // Chrome 38 Symbol has incorrect toString conversion
214
214
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
@@ -226,20 +226,20 @@ var useSymbolAsUid = NATIVE_SYMBOL$2
226
226
  && !Symbol.sham
227
227
  && typeof Symbol.iterator == 'symbol';
228
228
 
229
- var global$f = global$k;
230
- var shared$2 = shared$3.exports;
231
- var hasOwn$b = hasOwnProperty_1;
229
+ var global$j = global$o;
230
+ var shared$3 = shared$4.exports;
231
+ var hasOwn$c = hasOwnProperty_1;
232
232
  var uid$1 = uid$2;
233
233
  var NATIVE_SYMBOL$1 = symbolConstructorDetection;
234
234
  var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
235
235
 
236
- var Symbol$2 = global$f.Symbol;
237
- var WellKnownSymbolsStore = shared$2('wks');
236
+ var Symbol$2 = global$j.Symbol;
237
+ var WellKnownSymbolsStore = shared$3('wks');
238
238
  var createWellKnownSymbol = USE_SYMBOL_AS_UID$1 ? Symbol$2['for'] || Symbol$2 : Symbol$2 && Symbol$2.withoutSetter || uid$1;
239
239
 
240
- var wellKnownSymbol$g = function (name) {
241
- if (!hasOwn$b(WellKnownSymbolsStore, name)) {
242
- WellKnownSymbolsStore[name] = NATIVE_SYMBOL$1 && hasOwn$b(Symbol$2, name)
240
+ var wellKnownSymbol$i = function (name) {
241
+ if (!hasOwn$c(WellKnownSymbolsStore, name)) {
242
+ WellKnownSymbolsStore[name] = NATIVE_SYMBOL$1 && hasOwn$c(Symbol$2, name)
243
243
  ? Symbol$2[name]
244
244
  : createWellKnownSymbol('Symbol.' + name);
245
245
  } return WellKnownSymbolsStore[name];
@@ -262,50 +262,50 @@ var documentAll$1 = $documentAll$1.all;
262
262
 
263
263
  // `IsCallable` abstract operation
264
264
  // https://tc39.es/ecma262/#sec-iscallable
265
- var isCallable$l = $documentAll$1.IS_HTMLDDA ? function (argument) {
265
+ var isCallable$n = $documentAll$1.IS_HTMLDDA ? function (argument) {
266
266
  return typeof argument == 'function' || argument === documentAll$1;
267
267
  } : function (argument) {
268
268
  return typeof argument == 'function';
269
269
  };
270
270
 
271
- var isCallable$k = isCallable$l;
271
+ var isCallable$m = isCallable$n;
272
272
  var $documentAll = documentAll_1;
273
273
 
274
274
  var documentAll = $documentAll.all;
275
275
 
276
- var isObject$9 = $documentAll.IS_HTMLDDA ? function (it) {
277
- return typeof it == 'object' ? it !== null : isCallable$k(it) || it === documentAll;
276
+ var isObject$a = $documentAll.IS_HTMLDDA ? function (it) {
277
+ return typeof it == 'object' ? it !== null : isCallable$m(it) || it === documentAll;
278
278
  } : function (it) {
279
- return typeof it == 'object' ? it !== null : isCallable$k(it);
279
+ return typeof it == 'object' ? it !== null : isCallable$m(it);
280
280
  };
281
281
 
282
- var isObject$8 = isObject$9;
282
+ var isObject$9 = isObject$a;
283
283
 
284
284
  var $String$4 = String;
285
- var $TypeError$c = TypeError;
285
+ var $TypeError$e = TypeError;
286
286
 
287
287
  // `Assert: Type(argument) is Object`
288
- var anObject$c = function (argument) {
289
- if (isObject$8(argument)) return argument;
290
- throw new $TypeError$c($String$4(argument) + ' is not an object');
288
+ var anObject$e = function (argument) {
289
+ if (isObject$9(argument)) return argument;
290
+ throw new $TypeError$e($String$4(argument) + ' is not an object');
291
291
  };
292
292
 
293
293
  var objectDefineProperties = {};
294
294
 
295
- var fails$c = fails$g;
295
+ var fails$j = fails$n;
296
296
 
297
297
  // Detect IE8's incomplete defineProperty implementation
298
- var descriptors = !fails$c(function () {
298
+ var descriptors = !fails$j(function () {
299
299
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
300
300
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
301
301
  });
302
302
 
303
- var DESCRIPTORS$b = descriptors;
304
- var fails$b = fails$g;
303
+ var DESCRIPTORS$c = descriptors;
304
+ var fails$i = fails$n;
305
305
 
306
306
  // V8 ~ Chrome 36-
307
307
  // https://bugs.chromium.org/p/v8/issues/detail?id=3334
308
- var v8PrototypeDefineBug = DESCRIPTORS$b && fails$b(function () {
308
+ var v8PrototypeDefineBug = DESCRIPTORS$c && fails$i(function () {
309
309
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
310
310
  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
311
311
  value: 42,
@@ -315,23 +315,23 @@ var v8PrototypeDefineBug = DESCRIPTORS$b && fails$b(function () {
315
315
 
316
316
  var objectDefineProperty = {};
317
317
 
318
- var global$e = global$k;
319
- var isObject$7 = isObject$9;
318
+ var global$i = global$o;
319
+ var isObject$8 = isObject$a;
320
320
 
321
- var document$3 = global$e.document;
321
+ var document$3 = global$i.document;
322
322
  // typeof document.createElement is 'object' in old IE
323
- var EXISTS$1 = isObject$7(document$3) && isObject$7(document$3.createElement);
323
+ var EXISTS$1 = isObject$8(document$3) && isObject$8(document$3.createElement);
324
324
 
325
325
  var documentCreateElement$2 = function (it) {
326
326
  return EXISTS$1 ? document$3.createElement(it) : {};
327
327
  };
328
328
 
329
- var DESCRIPTORS$a = descriptors;
330
- var fails$a = fails$g;
329
+ var DESCRIPTORS$b = descriptors;
330
+ var fails$h = fails$n;
331
331
  var createElement$1 = documentCreateElement$2;
332
332
 
333
333
  // Thanks to IE8 for its funny defineProperty
334
- var ie8DomDefine = !DESCRIPTORS$a && !fails$a(function () {
334
+ var ie8DomDefine = !DESCRIPTORS$b && !fails$h(function () {
335
335
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
336
336
  return Object.defineProperty(createElement$1('div'), 'a', {
337
337
  get: function () { return 7; }
@@ -340,30 +340,30 @@ var ie8DomDefine = !DESCRIPTORS$a && !fails$a(function () {
340
340
 
341
341
  var NATIVE_BIND$2 = functionBindNative;
342
342
 
343
- var call$e = Function.prototype.call;
343
+ var call$h = Function.prototype.call;
344
344
 
345
- var functionCall = NATIVE_BIND$2 ? call$e.bind(call$e) : function () {
346
- return call$e.apply(call$e, arguments);
345
+ var functionCall = NATIVE_BIND$2 ? call$h.bind(call$h) : function () {
346
+ return call$h.apply(call$h, arguments);
347
347
  };
348
348
 
349
- var global$d = global$k;
350
- var isCallable$j = isCallable$l;
349
+ var global$h = global$o;
350
+ var isCallable$l = isCallable$n;
351
351
 
352
352
  var aFunction = function (argument) {
353
- return isCallable$j(argument) ? argument : undefined;
353
+ return isCallable$l(argument) ? argument : undefined;
354
354
  };
355
355
 
356
356
  var getBuiltIn$7 = function (namespace, method) {
357
- return arguments.length < 2 ? aFunction(global$d[namespace]) : global$d[namespace] && global$d[namespace][method];
357
+ return arguments.length < 2 ? aFunction(global$h[namespace]) : global$h[namespace] && global$h[namespace][method];
358
358
  };
359
359
 
360
- var uncurryThis$e = functionUncurryThis;
360
+ var uncurryThis$i = functionUncurryThis;
361
361
 
362
- var objectIsPrototypeOf = uncurryThis$e({}.isPrototypeOf);
362
+ var objectIsPrototypeOf = uncurryThis$i({}.isPrototypeOf);
363
363
 
364
364
  var getBuiltIn$6 = getBuiltIn$7;
365
- var isCallable$i = isCallable$l;
366
- var isPrototypeOf$4 = objectIsPrototypeOf;
365
+ var isCallable$k = isCallable$n;
366
+ var isPrototypeOf$5 = objectIsPrototypeOf;
367
367
  var USE_SYMBOL_AS_UID = useSymbolAsUid;
368
368
 
369
369
  var $Object$2 = Object;
@@ -372,12 +372,12 @@ var isSymbol$2 = USE_SYMBOL_AS_UID ? function (it) {
372
372
  return typeof it == 'symbol';
373
373
  } : function (it) {
374
374
  var $Symbol = getBuiltIn$6('Symbol');
375
- return isCallable$i($Symbol) && isPrototypeOf$4($Symbol.prototype, $Object$2(it));
375
+ return isCallable$k($Symbol) && isPrototypeOf$5($Symbol.prototype, $Object$2(it));
376
376
  };
377
377
 
378
378
  var $String$3 = String;
379
379
 
380
- var tryToString$4 = function (argument) {
380
+ var tryToString$5 = function (argument) {
381
381
  try {
382
382
  return $String$3(argument);
383
383
  } catch (error) {
@@ -385,64 +385,64 @@ var tryToString$4 = function (argument) {
385
385
  }
386
386
  };
387
387
 
388
- var isCallable$h = isCallable$l;
389
- var tryToString$3 = tryToString$4;
388
+ var isCallable$j = isCallable$n;
389
+ var tryToString$4 = tryToString$5;
390
390
 
391
- var $TypeError$b = TypeError;
391
+ var $TypeError$d = TypeError;
392
392
 
393
393
  // `Assert: IsCallable(argument) is true`
394
- var aCallable$8 = function (argument) {
395
- if (isCallable$h(argument)) return argument;
396
- throw new $TypeError$b(tryToString$3(argument) + ' is not a function');
394
+ var aCallable$9 = function (argument) {
395
+ if (isCallable$j(argument)) return argument;
396
+ throw new $TypeError$d(tryToString$4(argument) + ' is not a function');
397
397
  };
398
398
 
399
- var aCallable$7 = aCallable$8;
400
- var isNullOrUndefined$2 = isNullOrUndefined$4;
399
+ var aCallable$8 = aCallable$9;
400
+ var isNullOrUndefined$3 = isNullOrUndefined$5;
401
401
 
402
402
  // `GetMethod` abstract operation
403
403
  // https://tc39.es/ecma262/#sec-getmethod
404
- var getMethod$3 = function (V, P) {
404
+ var getMethod$4 = function (V, P) {
405
405
  var func = V[P];
406
- return isNullOrUndefined$2(func) ? undefined : aCallable$7(func);
406
+ return isNullOrUndefined$3(func) ? undefined : aCallable$8(func);
407
407
  };
408
408
 
409
- var call$d = functionCall;
410
- var isCallable$g = isCallable$l;
411
- var isObject$6 = isObject$9;
409
+ var call$g = functionCall;
410
+ var isCallable$i = isCallable$n;
411
+ var isObject$7 = isObject$a;
412
412
 
413
- var $TypeError$a = TypeError;
413
+ var $TypeError$c = TypeError;
414
414
 
415
415
  // `OrdinaryToPrimitive` abstract operation
416
416
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
417
417
  var ordinaryToPrimitive$1 = function (input, pref) {
418
418
  var fn, val;
419
- if (pref === 'string' && isCallable$g(fn = input.toString) && !isObject$6(val = call$d(fn, input))) return val;
420
- if (isCallable$g(fn = input.valueOf) && !isObject$6(val = call$d(fn, input))) return val;
421
- if (pref !== 'string' && isCallable$g(fn = input.toString) && !isObject$6(val = call$d(fn, input))) return val;
422
- throw new $TypeError$a("Can't convert object to primitive value");
419
+ if (pref === 'string' && isCallable$i(fn = input.toString) && !isObject$7(val = call$g(fn, input))) return val;
420
+ if (isCallable$i(fn = input.valueOf) && !isObject$7(val = call$g(fn, input))) return val;
421
+ if (pref !== 'string' && isCallable$i(fn = input.toString) && !isObject$7(val = call$g(fn, input))) return val;
422
+ throw new $TypeError$c("Can't convert object to primitive value");
423
423
  };
424
424
 
425
- var call$c = functionCall;
426
- var isObject$5 = isObject$9;
425
+ var call$f = functionCall;
426
+ var isObject$6 = isObject$a;
427
427
  var isSymbol$1 = isSymbol$2;
428
- var getMethod$2 = getMethod$3;
428
+ var getMethod$3 = getMethod$4;
429
429
  var ordinaryToPrimitive = ordinaryToPrimitive$1;
430
- var wellKnownSymbol$f = wellKnownSymbol$g;
430
+ var wellKnownSymbol$h = wellKnownSymbol$i;
431
431
 
432
- var $TypeError$9 = TypeError;
433
- var TO_PRIMITIVE = wellKnownSymbol$f('toPrimitive');
432
+ var $TypeError$b = TypeError;
433
+ var TO_PRIMITIVE = wellKnownSymbol$h('toPrimitive');
434
434
 
435
435
  // `ToPrimitive` abstract operation
436
436
  // https://tc39.es/ecma262/#sec-toprimitive
437
437
  var toPrimitive$1 = function (input, pref) {
438
- if (!isObject$5(input) || isSymbol$1(input)) return input;
439
- var exoticToPrim = getMethod$2(input, TO_PRIMITIVE);
438
+ if (!isObject$6(input) || isSymbol$1(input)) return input;
439
+ var exoticToPrim = getMethod$3(input, TO_PRIMITIVE);
440
440
  var result;
441
441
  if (exoticToPrim) {
442
442
  if (pref === undefined) pref = 'default';
443
- result = call$c(exoticToPrim, input, pref);
444
- if (!isObject$5(result) || isSymbol$1(result)) return result;
445
- throw new $TypeError$9("Can't convert object to primitive value");
443
+ result = call$f(exoticToPrim, input, pref);
444
+ if (!isObject$6(result) || isSymbol$1(result)) return result;
445
+ throw new $TypeError$b("Can't convert object to primitive value");
446
446
  }
447
447
  if (pref === undefined) pref = 'number';
448
448
  return ordinaryToPrimitive(input, pref);
@@ -453,18 +453,18 @@ var isSymbol = isSymbol$2;
453
453
 
454
454
  // `ToPropertyKey` abstract operation
455
455
  // https://tc39.es/ecma262/#sec-topropertykey
456
- var toPropertyKey$2 = function (argument) {
456
+ var toPropertyKey$3 = function (argument) {
457
457
  var key = toPrimitive(argument, 'string');
458
458
  return isSymbol(key) ? key : key + '';
459
459
  };
460
460
 
461
- var DESCRIPTORS$9 = descriptors;
461
+ var DESCRIPTORS$a = descriptors;
462
462
  var IE8_DOM_DEFINE$1 = ie8DomDefine;
463
463
  var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
464
- var anObject$b = anObject$c;
465
- var toPropertyKey$1 = toPropertyKey$2;
464
+ var anObject$d = anObject$e;
465
+ var toPropertyKey$2 = toPropertyKey$3;
466
466
 
467
- var $TypeError$8 = TypeError;
467
+ var $TypeError$a = TypeError;
468
468
  // eslint-disable-next-line es/no-object-defineproperty -- safe
469
469
  var $defineProperty = Object.defineProperty;
470
470
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
@@ -475,10 +475,10 @@ var WRITABLE = 'writable';
475
475
 
476
476
  // `Object.defineProperty` method
477
477
  // https://tc39.es/ecma262/#sec-object.defineproperty
478
- objectDefineProperty.f = DESCRIPTORS$9 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
479
- anObject$b(O);
480
- P = toPropertyKey$1(P);
481
- anObject$b(Attributes);
478
+ objectDefineProperty.f = DESCRIPTORS$a ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
479
+ anObject$d(O);
480
+ P = toPropertyKey$2(P);
481
+ anObject$d(Attributes);
482
482
  if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
483
483
  var current = $getOwnPropertyDescriptor$1(O, P);
484
484
  if (current && current[WRITABLE]) {
@@ -491,26 +491,26 @@ objectDefineProperty.f = DESCRIPTORS$9 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
491
491
  }
492
492
  } return $defineProperty(O, P, Attributes);
493
493
  } : $defineProperty : function defineProperty(O, P, Attributes) {
494
- anObject$b(O);
495
- P = toPropertyKey$1(P);
496
- anObject$b(Attributes);
494
+ anObject$d(O);
495
+ P = toPropertyKey$2(P);
496
+ anObject$d(Attributes);
497
497
  if (IE8_DOM_DEFINE$1) try {
498
498
  return $defineProperty(O, P, Attributes);
499
499
  } catch (error) { /* empty */ }
500
- if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$8('Accessors not supported');
500
+ if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$a('Accessors not supported');
501
501
  if ('value' in Attributes) O[P] = Attributes.value;
502
502
  return O;
503
503
  };
504
504
 
505
505
  var ceil = Math.ceil;
506
- var floor = Math.floor;
506
+ var floor$1 = Math.floor;
507
507
 
508
508
  // `Math.trunc` method
509
509
  // https://tc39.es/ecma262/#sec-math.trunc
510
510
  // eslint-disable-next-line es/no-math-trunc -- safe
511
511
  var mathTrunc = Math.trunc || function trunc(x) {
512
512
  var n = +x;
513
- return (n > 0 ? floor : ceil)(n);
513
+ return (n > 0 ? floor$1 : ceil)(n);
514
514
  };
515
515
 
516
516
  var trunc = mathTrunc;
@@ -525,15 +525,15 @@ var toIntegerOrInfinity$2 = function (argument) {
525
525
 
526
526
  var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
527
527
 
528
- var max = Math.max;
528
+ var max$1 = Math.max;
529
529
  var min$1 = Math.min;
530
530
 
531
531
  // Helper for a popular repeating case of the spec:
532
532
  // Let integer be ? ToInteger(index).
533
533
  // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
534
- var toAbsoluteIndex$1 = function (index, length) {
534
+ var toAbsoluteIndex$2 = function (index, length) {
535
535
  var integer = toIntegerOrInfinity$1(index);
536
- return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
536
+ return integer < 0 ? max$1(integer + length, 0) : min$1(integer, length);
537
537
  };
538
538
 
539
539
  var toIntegerOrInfinity = toIntegerOrInfinity$2;
@@ -550,20 +550,20 @@ var toLength = toLength$1;
550
550
 
551
551
  // `LengthOfArrayLike` abstract operation
552
552
  // https://tc39.es/ecma262/#sec-lengthofarraylike
553
- var lengthOfArrayLike$2 = function (obj) {
553
+ var lengthOfArrayLike$4 = function (obj) {
554
554
  return toLength(obj.length);
555
555
  };
556
556
 
557
557
  var toIndexedObject$4 = toIndexedObject$5;
558
- var toAbsoluteIndex = toAbsoluteIndex$1;
559
- var lengthOfArrayLike$1 = lengthOfArrayLike$2;
558
+ var toAbsoluteIndex$1 = toAbsoluteIndex$2;
559
+ var lengthOfArrayLike$3 = lengthOfArrayLike$4;
560
560
 
561
561
  // `Array.prototype.{ indexOf, includes }` methods implementation
562
562
  var createMethod$1 = function (IS_INCLUDES) {
563
563
  return function ($this, el, fromIndex) {
564
564
  var O = toIndexedObject$4($this);
565
- var length = lengthOfArrayLike$1(O);
566
- var index = toAbsoluteIndex(fromIndex, length);
565
+ var length = lengthOfArrayLike$3(O);
566
+ var index = toAbsoluteIndex$1(fromIndex, length);
567
567
  var value;
568
568
  // Array#includes uses SameValueZero equality algorithm
569
569
  // eslint-disable-next-line no-self-compare -- NaN check
@@ -589,23 +589,23 @@ var arrayIncludes = {
589
589
 
590
590
  var hiddenKeys$4 = {};
591
591
 
592
- var uncurryThis$d = functionUncurryThis;
593
- var hasOwn$a = hasOwnProperty_1;
592
+ var uncurryThis$h = functionUncurryThis;
593
+ var hasOwn$b = hasOwnProperty_1;
594
594
  var toIndexedObject$3 = toIndexedObject$5;
595
- var indexOf = arrayIncludes.indexOf;
595
+ var indexOf$1 = arrayIncludes.indexOf;
596
596
  var hiddenKeys$3 = hiddenKeys$4;
597
597
 
598
- var push = uncurryThis$d([].push);
598
+ var push$1 = uncurryThis$h([].push);
599
599
 
600
600
  var objectKeysInternal = function (object, names) {
601
601
  var O = toIndexedObject$3(object);
602
602
  var i = 0;
603
603
  var result = [];
604
604
  var key;
605
- for (key in O) !hasOwn$a(hiddenKeys$3, key) && hasOwn$a(O, key) && push(result, key);
605
+ for (key in O) !hasOwn$b(hiddenKeys$3, key) && hasOwn$b(O, key) && push$1(result, key);
606
606
  // Don't enum bug & hidden keys
607
- while (names.length > i) if (hasOwn$a(O, key = names[i++])) {
608
- ~indexOf(result, key) || push(result, key);
607
+ while (names.length > i) if (hasOwn$b(O, key = names[i++])) {
608
+ ~indexOf$1(result, key) || push$1(result, key);
609
609
  }
610
610
  return result;
611
611
  };
@@ -631,24 +631,24 @@ var objectKeys$2 = Object.keys || function keys(O) {
631
631
  return internalObjectKeys$1(O, enumBugKeys$2);
632
632
  };
633
633
 
634
- var DESCRIPTORS$8 = descriptors;
634
+ var DESCRIPTORS$9 = descriptors;
635
635
  var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
636
- var definePropertyModule$3 = objectDefineProperty;
637
- var anObject$a = anObject$c;
636
+ var definePropertyModule$4 = objectDefineProperty;
637
+ var anObject$c = anObject$e;
638
638
  var toIndexedObject$2 = toIndexedObject$5;
639
639
  var objectKeys$1 = objectKeys$2;
640
640
 
641
641
  // `Object.defineProperties` method
642
642
  // https://tc39.es/ecma262/#sec-object.defineproperties
643
643
  // eslint-disable-next-line es/no-object-defineproperties -- safe
644
- objectDefineProperties.f = DESCRIPTORS$8 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
645
- anObject$a(O);
644
+ objectDefineProperties.f = DESCRIPTORS$9 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
645
+ anObject$c(O);
646
646
  var props = toIndexedObject$2(Properties);
647
647
  var keys = objectKeys$1(Properties);
648
648
  var length = keys.length;
649
649
  var index = 0;
650
650
  var key;
651
- while (length > index) definePropertyModule$3.f(O, key = keys[index++], props[key]);
651
+ while (length > index) definePropertyModule$4.f(O, key = keys[index++], props[key]);
652
652
  return O;
653
653
  };
654
654
 
@@ -656,17 +656,17 @@ var getBuiltIn$5 = getBuiltIn$7;
656
656
 
657
657
  var html$2 = getBuiltIn$5('document', 'documentElement');
658
658
 
659
- var shared$1 = shared$3.exports;
659
+ var shared$2 = shared$4.exports;
660
660
  var uid = uid$2;
661
661
 
662
- var keys = shared$1('keys');
662
+ var keys$1 = shared$2('keys');
663
663
 
664
664
  var sharedKey$3 = function (key) {
665
- return keys[key] || (keys[key] = uid(key));
665
+ return keys$1[key] || (keys$1[key] = uid(key));
666
666
  };
667
667
 
668
668
  /* global ActiveXObject -- old IE, WSH */
669
- var anObject$9 = anObject$c;
669
+ var anObject$b = anObject$e;
670
670
  var definePropertiesModule = objectDefineProperties;
671
671
  var enumBugKeys$1 = enumBugKeys$3;
672
672
  var hiddenKeys$2 = hiddenKeys$4;
@@ -740,7 +740,7 @@ hiddenKeys$2[IE_PROTO$1] = true;
740
740
  var objectCreate = Object.create || function create(O, Properties) {
741
741
  var result;
742
742
  if (O !== null) {
743
- EmptyConstructor[PROTOTYPE] = anObject$9(O);
743
+ EmptyConstructor[PROTOTYPE] = anObject$b(O);
744
744
  result = new EmptyConstructor();
745
745
  EmptyConstructor[PROTOTYPE] = null;
746
746
  // add "__proto__" for Object.getPrototypeOf polyfill
@@ -749,19 +749,19 @@ var objectCreate = Object.create || function create(O, Properties) {
749
749
  return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
750
750
  };
751
751
 
752
- var wellKnownSymbol$e = wellKnownSymbol$g;
753
- var create$1 = objectCreate;
754
- var defineProperty$5 = objectDefineProperty.f;
752
+ var wellKnownSymbol$g = wellKnownSymbol$i;
753
+ var create$2 = objectCreate;
754
+ var defineProperty$6 = objectDefineProperty.f;
755
755
 
756
- var UNSCOPABLES = wellKnownSymbol$e('unscopables');
756
+ var UNSCOPABLES = wellKnownSymbol$g('unscopables');
757
757
  var ArrayPrototype$1 = Array.prototype;
758
758
 
759
759
  // Array.prototype[@@unscopables]
760
760
  // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
761
761
  if (ArrayPrototype$1[UNSCOPABLES] === undefined) {
762
- defineProperty$5(ArrayPrototype$1, UNSCOPABLES, {
762
+ defineProperty$6(ArrayPrototype$1, UNSCOPABLES, {
763
763
  configurable: true,
764
- value: create$1(null)
764
+ value: create$2(null)
765
765
  });
766
766
  }
767
767
 
@@ -772,14 +772,14 @@ var addToUnscopables$2 = function (key) {
772
772
 
773
773
  var iterators = {};
774
774
 
775
- var global$c = global$k;
776
- var isCallable$f = isCallable$l;
775
+ var global$g = global$o;
776
+ var isCallable$h = isCallable$n;
777
777
 
778
- var WeakMap$1 = global$c.WeakMap;
778
+ var WeakMap$1 = global$g.WeakMap;
779
779
 
780
- var weakMapBasicDetection = isCallable$f(WeakMap$1) && /native code/.test(String(WeakMap$1));
780
+ var weakMapBasicDetection = isCallable$h(WeakMap$1) && /native code/.test(String(WeakMap$1));
781
781
 
782
- var createPropertyDescriptor$3 = function (bitmap, value) {
782
+ var createPropertyDescriptor$4 = function (bitmap, value) {
783
783
  return {
784
784
  enumerable: !(bitmap & 1),
785
785
  configurable: !(bitmap & 2),
@@ -788,29 +788,29 @@ var createPropertyDescriptor$3 = function (bitmap, value) {
788
788
  };
789
789
  };
790
790
 
791
- var DESCRIPTORS$7 = descriptors;
792
- var definePropertyModule$2 = objectDefineProperty;
793
- var createPropertyDescriptor$2 = createPropertyDescriptor$3;
791
+ var DESCRIPTORS$8 = descriptors;
792
+ var definePropertyModule$3 = objectDefineProperty;
793
+ var createPropertyDescriptor$3 = createPropertyDescriptor$4;
794
794
 
795
- var createNonEnumerableProperty$4 = DESCRIPTORS$7 ? function (object, key, value) {
796
- return definePropertyModule$2.f(object, key, createPropertyDescriptor$2(1, value));
795
+ var createNonEnumerableProperty$6 = DESCRIPTORS$8 ? function (object, key, value) {
796
+ return definePropertyModule$3.f(object, key, createPropertyDescriptor$3(1, value));
797
797
  } : function (object, key, value) {
798
798
  object[key] = value;
799
799
  return object;
800
800
  };
801
801
 
802
802
  var NATIVE_WEAK_MAP = weakMapBasicDetection;
803
- var global$b = global$k;
804
- var isObject$4 = isObject$9;
805
- var createNonEnumerableProperty$3 = createNonEnumerableProperty$4;
806
- var hasOwn$9 = hasOwnProperty_1;
807
- var shared = sharedStore;
803
+ var global$f = global$o;
804
+ var isObject$5 = isObject$a;
805
+ var createNonEnumerableProperty$5 = createNonEnumerableProperty$6;
806
+ var hasOwn$a = hasOwnProperty_1;
807
+ var shared$1 = sharedStore;
808
808
  var sharedKey$1 = sharedKey$3;
809
809
  var hiddenKeys$1 = hiddenKeys$4;
810
810
 
811
811
  var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
812
- var TypeError$2 = global$b.TypeError;
813
- var WeakMap = global$b.WeakMap;
812
+ var TypeError$2 = global$f.TypeError;
813
+ var WeakMap = global$f.WeakMap;
814
814
  var set$1, get, has;
815
815
 
816
816
  var enforce = function (it) {
@@ -820,14 +820,14 @@ var enforce = function (it) {
820
820
  var getterFor = function (TYPE) {
821
821
  return function (it) {
822
822
  var state;
823
- if (!isObject$4(it) || (state = get(it)).type !== TYPE) {
823
+ if (!isObject$5(it) || (state = get(it)).type !== TYPE) {
824
824
  throw new TypeError$2('Incompatible receiver, ' + TYPE + ' required');
825
825
  } return state;
826
826
  };
827
827
  };
828
828
 
829
- if (NATIVE_WEAK_MAP || shared.state) {
830
- var store$1 = shared.state || (shared.state = new WeakMap());
829
+ if (NATIVE_WEAK_MAP || shared$1.state) {
830
+ var store$1 = shared$1.state || (shared$1.state = new WeakMap());
831
831
  /* eslint-disable no-self-assign -- prototype methods protection */
832
832
  store$1.get = store$1.get;
833
833
  store$1.has = store$1.has;
@@ -849,16 +849,16 @@ if (NATIVE_WEAK_MAP || shared.state) {
849
849
  var STATE = sharedKey$1('state');
850
850
  hiddenKeys$1[STATE] = true;
851
851
  set$1 = function (it, metadata) {
852
- if (hasOwn$9(it, STATE)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
852
+ if (hasOwn$a(it, STATE)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
853
853
  metadata.facade = it;
854
- createNonEnumerableProperty$3(it, STATE, metadata);
854
+ createNonEnumerableProperty$5(it, STATE, metadata);
855
855
  return metadata;
856
856
  };
857
857
  get = function (it) {
858
- return hasOwn$9(it, STATE) ? it[STATE] : {};
858
+ return hasOwn$a(it, STATE) ? it[STATE] : {};
859
859
  };
860
860
  has = function (it) {
861
- return hasOwn$9(it, STATE);
861
+ return hasOwn$a(it, STATE);
862
862
  };
863
863
  }
864
864
 
@@ -888,13 +888,13 @@ objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
888
888
  return !!descriptor && descriptor.enumerable;
889
889
  } : $propertyIsEnumerable;
890
890
 
891
- var DESCRIPTORS$6 = descriptors;
892
- var call$b = functionCall;
891
+ var DESCRIPTORS$7 = descriptors;
892
+ var call$e = functionCall;
893
893
  var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
894
- var createPropertyDescriptor$1 = createPropertyDescriptor$3;
894
+ var createPropertyDescriptor$2 = createPropertyDescriptor$4;
895
895
  var toIndexedObject$1 = toIndexedObject$5;
896
- var toPropertyKey = toPropertyKey$2;
897
- var hasOwn$8 = hasOwnProperty_1;
896
+ var toPropertyKey$1 = toPropertyKey$3;
897
+ var hasOwn$9 = hasOwnProperty_1;
898
898
  var IE8_DOM_DEFINE = ie8DomDefine;
899
899
 
900
900
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
@@ -902,28 +902,28 @@ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
902
902
 
903
903
  // `Object.getOwnPropertyDescriptor` method
904
904
  // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
905
- objectGetOwnPropertyDescriptor.f = DESCRIPTORS$6 ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
905
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$7 ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
906
906
  O = toIndexedObject$1(O);
907
- P = toPropertyKey(P);
907
+ P = toPropertyKey$1(P);
908
908
  if (IE8_DOM_DEFINE) try {
909
909
  return $getOwnPropertyDescriptor(O, P);
910
910
  } catch (error) { /* empty */ }
911
- if (hasOwn$8(O, P)) return createPropertyDescriptor$1(!call$b(propertyIsEnumerableModule$1.f, O, P), O[P]);
911
+ if (hasOwn$9(O, P)) return createPropertyDescriptor$2(!call$e(propertyIsEnumerableModule$1.f, O, P), O[P]);
912
912
  };
913
913
 
914
914
  var makeBuiltIn$3 = {exports: {}};
915
915
 
916
- var DESCRIPTORS$5 = descriptors;
917
- var hasOwn$7 = hasOwnProperty_1;
916
+ var DESCRIPTORS$6 = descriptors;
917
+ var hasOwn$8 = hasOwnProperty_1;
918
918
 
919
919
  var FunctionPrototype$1 = Function.prototype;
920
920
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
921
- var getDescriptor = DESCRIPTORS$5 && Object.getOwnPropertyDescriptor;
921
+ var getDescriptor = DESCRIPTORS$6 && Object.getOwnPropertyDescriptor;
922
922
 
923
- var EXISTS = hasOwn$7(FunctionPrototype$1, 'name');
923
+ var EXISTS = hasOwn$8(FunctionPrototype$1, 'name');
924
924
  // additional protection from minified / mangled / dropped function names
925
925
  var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
926
- var CONFIGURABLE = EXISTS && (!DESCRIPTORS$5 || (DESCRIPTORS$5 && getDescriptor(FunctionPrototype$1, 'name').configurable));
926
+ var CONFIGURABLE = EXISTS && (!DESCRIPTORS$6 || (DESCRIPTORS$6 && getDescriptor(FunctionPrototype$1, 'name').configurable));
927
927
 
928
928
  var functionName = {
929
929
  EXISTS: EXISTS,
@@ -931,14 +931,14 @@ var functionName = {
931
931
  CONFIGURABLE: CONFIGURABLE
932
932
  };
933
933
 
934
- var uncurryThis$c = functionUncurryThis;
935
- var isCallable$e = isCallable$l;
934
+ var uncurryThis$g = functionUncurryThis;
935
+ var isCallable$g = isCallable$n;
936
936
  var store = sharedStore;
937
937
 
938
- var functionToString = uncurryThis$c(Function.toString);
938
+ var functionToString = uncurryThis$g(Function.toString);
939
939
 
940
940
  // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
941
- if (!isCallable$e(store.inspectSource)) {
941
+ if (!isCallable$g(store.inspectSource)) {
942
942
  store.inspectSource = function (it) {
943
943
  return functionToString(it);
944
944
  };
@@ -946,51 +946,51 @@ if (!isCallable$e(store.inspectSource)) {
946
946
 
947
947
  var inspectSource$3 = store.inspectSource;
948
948
 
949
- var uncurryThis$b = functionUncurryThis;
950
- var fails$9 = fails$g;
951
- var isCallable$d = isCallable$l;
952
- var hasOwn$6 = hasOwnProperty_1;
953
- var DESCRIPTORS$4 = descriptors;
949
+ var uncurryThis$f = functionUncurryThis;
950
+ var fails$g = fails$n;
951
+ var isCallable$f = isCallable$n;
952
+ var hasOwn$7 = hasOwnProperty_1;
953
+ var DESCRIPTORS$5 = descriptors;
954
954
  var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
955
955
  var inspectSource$2 = inspectSource$3;
956
956
  var InternalStateModule$2 = internalState;
957
957
 
958
- var enforceInternalState = InternalStateModule$2.enforce;
959
- var getInternalState$1 = InternalStateModule$2.get;
958
+ var enforceInternalState$1 = InternalStateModule$2.enforce;
959
+ var getInternalState$2 = InternalStateModule$2.get;
960
960
  var $String$2 = String;
961
961
  // eslint-disable-next-line es/no-object-defineproperty -- safe
962
- var defineProperty$4 = Object.defineProperty;
963
- var stringSlice$1 = uncurryThis$b(''.slice);
964
- var replace$2 = uncurryThis$b(''.replace);
965
- var join = uncurryThis$b([].join);
962
+ var defineProperty$5 = Object.defineProperty;
963
+ var stringSlice$3 = uncurryThis$f(''.slice);
964
+ var replace$4 = uncurryThis$f(''.replace);
965
+ var join = uncurryThis$f([].join);
966
966
 
967
- var CONFIGURABLE_LENGTH = DESCRIPTORS$4 && !fails$9(function () {
968
- return defineProperty$4(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
967
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$5 && !fails$g(function () {
968
+ return defineProperty$5(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
969
969
  });
970
970
 
971
971
  var TEMPLATE = String(String).split('String');
972
972
 
973
973
  var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) {
974
- if (stringSlice$1($String$2(name), 0, 7) === 'Symbol(') {
975
- name = '[' + replace$2($String$2(name), /^Symbol\(([^)]*)\)/, '$1') + ']';
974
+ if (stringSlice$3($String$2(name), 0, 7) === 'Symbol(') {
975
+ name = '[' + replace$4($String$2(name), /^Symbol\(([^)]*)\)/, '$1') + ']';
976
976
  }
977
977
  if (options && options.getter) name = 'get ' + name;
978
978
  if (options && options.setter) name = 'set ' + name;
979
- if (!hasOwn$6(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
980
- if (DESCRIPTORS$4) defineProperty$4(value, 'name', { value: name, configurable: true });
979
+ if (!hasOwn$7(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
980
+ if (DESCRIPTORS$5) defineProperty$5(value, 'name', { value: name, configurable: true });
981
981
  else value.name = name;
982
982
  }
983
- if (CONFIGURABLE_LENGTH && options && hasOwn$6(options, 'arity') && value.length !== options.arity) {
984
- defineProperty$4(value, 'length', { value: options.arity });
983
+ if (CONFIGURABLE_LENGTH && options && hasOwn$7(options, 'arity') && value.length !== options.arity) {
984
+ defineProperty$5(value, 'length', { value: options.arity });
985
985
  }
986
986
  try {
987
- if (options && hasOwn$6(options, 'constructor') && options.constructor) {
988
- if (DESCRIPTORS$4) defineProperty$4(value, 'prototype', { writable: false });
987
+ if (options && hasOwn$7(options, 'constructor') && options.constructor) {
988
+ if (DESCRIPTORS$5) defineProperty$5(value, 'prototype', { writable: false });
989
989
  // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
990
990
  } else if (value.prototype) value.prototype = undefined;
991
991
  } catch (error) { /* empty */ }
992
- var state = enforceInternalState(value);
993
- if (!hasOwn$6(state, 'source')) {
992
+ var state = enforceInternalState$1(value);
993
+ if (!hasOwn$7(state, 'source')) {
994
994
  state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
995
995
  } return value;
996
996
  };
@@ -998,19 +998,19 @@ var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) {
998
998
  // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
999
999
  // eslint-disable-next-line no-extend-native -- required
1000
1000
  Function.prototype.toString = makeBuiltIn$2(function toString() {
1001
- return isCallable$d(this) && getInternalState$1(this).source || inspectSource$2(this);
1001
+ return isCallable$f(this) && getInternalState$2(this).source || inspectSource$2(this);
1002
1002
  }, 'toString');
1003
1003
 
1004
- var isCallable$c = isCallable$l;
1005
- var definePropertyModule$1 = objectDefineProperty;
1004
+ var isCallable$e = isCallable$n;
1005
+ var definePropertyModule$2 = objectDefineProperty;
1006
1006
  var makeBuiltIn$1 = makeBuiltIn$3.exports;
1007
1007
  var defineGlobalProperty$1 = defineGlobalProperty$3;
1008
1008
 
1009
- var defineBuiltIn$6 = function (O, key, value, options) {
1009
+ var defineBuiltIn$8 = function (O, key, value, options) {
1010
1010
  if (!options) options = {};
1011
1011
  var simple = options.enumerable;
1012
1012
  var name = options.name !== undefined ? options.name : key;
1013
- if (isCallable$c(value)) makeBuiltIn$1(value, name, options);
1013
+ if (isCallable$e(value)) makeBuiltIn$1(value, name, options);
1014
1014
  if (options.global) {
1015
1015
  if (simple) O[key] = value;
1016
1016
  else defineGlobalProperty$1(key, value);
@@ -1020,7 +1020,7 @@ var defineBuiltIn$6 = function (O, key, value, options) {
1020
1020
  else if (O[key]) simple = true;
1021
1021
  } catch (error) { /* empty */ }
1022
1022
  if (simple) O[key] = value;
1023
- else definePropertyModule$1.f(O, key, {
1023
+ else definePropertyModule$2.f(O, key, {
1024
1024
  value: value,
1025
1025
  enumerable: false,
1026
1026
  configurable: !options.nonConfigurable,
@@ -1049,67 +1049,67 @@ var objectGetOwnPropertySymbols = {};
1049
1049
  objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
1050
1050
 
1051
1051
  var getBuiltIn$4 = getBuiltIn$7;
1052
- var uncurryThis$a = functionUncurryThis;
1052
+ var uncurryThis$e = functionUncurryThis;
1053
1053
  var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
1054
1054
  var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
1055
- var anObject$8 = anObject$c;
1055
+ var anObject$a = anObject$e;
1056
1056
 
1057
- var concat$1 = uncurryThis$a([].concat);
1057
+ var concat$1 = uncurryThis$e([].concat);
1058
1058
 
1059
1059
  // all object keys, includes non-enumerable and symbols
1060
1060
  var ownKeys$1 = getBuiltIn$4('Reflect', 'ownKeys') || function ownKeys(it) {
1061
- var keys = getOwnPropertyNamesModule.f(anObject$8(it));
1061
+ var keys = getOwnPropertyNamesModule.f(anObject$a(it));
1062
1062
  var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
1063
1063
  return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
1064
1064
  };
1065
1065
 
1066
- var hasOwn$5 = hasOwnProperty_1;
1066
+ var hasOwn$6 = hasOwnProperty_1;
1067
1067
  var ownKeys = ownKeys$1;
1068
1068
  var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
1069
- var definePropertyModule = objectDefineProperty;
1069
+ var definePropertyModule$1 = objectDefineProperty;
1070
1070
 
1071
1071
  var copyConstructorProperties$2 = function (target, source, exceptions) {
1072
1072
  var keys = ownKeys(source);
1073
- var defineProperty = definePropertyModule.f;
1073
+ var defineProperty = definePropertyModule$1.f;
1074
1074
  var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
1075
1075
  for (var i = 0; i < keys.length; i++) {
1076
1076
  var key = keys[i];
1077
- if (!hasOwn$5(target, key) && !(exceptions && hasOwn$5(exceptions, key))) {
1077
+ if (!hasOwn$6(target, key) && !(exceptions && hasOwn$6(exceptions, key))) {
1078
1078
  defineProperty(target, key, getOwnPropertyDescriptor(source, key));
1079
1079
  }
1080
1080
  }
1081
1081
  };
1082
1082
 
1083
- var fails$8 = fails$g;
1084
- var isCallable$b = isCallable$l;
1083
+ var fails$f = fails$n;
1084
+ var isCallable$d = isCallable$n;
1085
1085
 
1086
1086
  var replacement = /#|\.prototype\./;
1087
1087
 
1088
- var isForced$2 = function (feature, detection) {
1088
+ var isForced$3 = function (feature, detection) {
1089
1089
  var value = data[normalize(feature)];
1090
1090
  return value === POLYFILL ? true
1091
1091
  : value === NATIVE ? false
1092
- : isCallable$b(detection) ? fails$8(detection)
1092
+ : isCallable$d(detection) ? fails$f(detection)
1093
1093
  : !!detection;
1094
1094
  };
1095
1095
 
1096
- var normalize = isForced$2.normalize = function (string) {
1096
+ var normalize = isForced$3.normalize = function (string) {
1097
1097
  return String(string).replace(replacement, '.').toLowerCase();
1098
1098
  };
1099
1099
 
1100
- var data = isForced$2.data = {};
1101
- var NATIVE = isForced$2.NATIVE = 'N';
1102
- var POLYFILL = isForced$2.POLYFILL = 'P';
1100
+ var data = isForced$3.data = {};
1101
+ var NATIVE = isForced$3.NATIVE = 'N';
1102
+ var POLYFILL = isForced$3.POLYFILL = 'P';
1103
1103
 
1104
- var isForced_1 = isForced$2;
1104
+ var isForced_1 = isForced$3;
1105
1105
 
1106
- var global$a = global$k;
1106
+ var global$e = global$o;
1107
1107
  var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
1108
- var createNonEnumerableProperty$2 = createNonEnumerableProperty$4;
1109
- var defineBuiltIn$5 = defineBuiltIn$6;
1108
+ var createNonEnumerableProperty$4 = createNonEnumerableProperty$6;
1109
+ var defineBuiltIn$7 = defineBuiltIn$8;
1110
1110
  var defineGlobalProperty = defineGlobalProperty$3;
1111
1111
  var copyConstructorProperties$1 = copyConstructorProperties$2;
1112
- var isForced$1 = isForced_1;
1112
+ var isForced$2 = isForced_1;
1113
1113
 
1114
1114
  /*
1115
1115
  options.target - name of the target object
@@ -1132,11 +1132,11 @@ var _export = function (options, source) {
1132
1132
  var STATIC = options.stat;
1133
1133
  var FORCED, target, key, targetProperty, sourceProperty, descriptor;
1134
1134
  if (GLOBAL) {
1135
- target = global$a;
1135
+ target = global$e;
1136
1136
  } else if (STATIC) {
1137
- target = global$a[TARGET] || defineGlobalProperty(TARGET, {});
1137
+ target = global$e[TARGET] || defineGlobalProperty(TARGET, {});
1138
1138
  } else {
1139
- target = (global$a[TARGET] || {}).prototype;
1139
+ target = (global$e[TARGET] || {}).prototype;
1140
1140
  }
1141
1141
  if (target) for (key in source) {
1142
1142
  sourceProperty = source[key];
@@ -1144,7 +1144,7 @@ var _export = function (options, source) {
1144
1144
  descriptor = getOwnPropertyDescriptor$1(target, key);
1145
1145
  targetProperty = descriptor && descriptor.value;
1146
1146
  } else targetProperty = target[key];
1147
- FORCED = isForced$1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
1147
+ FORCED = isForced$2(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
1148
1148
  // contained in target
1149
1149
  if (!FORCED && targetProperty !== undefined) {
1150
1150
  if (typeof sourceProperty == typeof targetProperty) continue;
@@ -1152,24 +1152,24 @@ var _export = function (options, source) {
1152
1152
  }
1153
1153
  // add a flag to not completely full polyfills
1154
1154
  if (options.sham || (targetProperty && targetProperty.sham)) {
1155
- createNonEnumerableProperty$2(sourceProperty, 'sham', true);
1155
+ createNonEnumerableProperty$4(sourceProperty, 'sham', true);
1156
1156
  }
1157
- defineBuiltIn$5(target, key, sourceProperty, options);
1157
+ defineBuiltIn$7(target, key, sourceProperty, options);
1158
1158
  }
1159
1159
  };
1160
1160
 
1161
- var fails$7 = fails$g;
1161
+ var fails$e = fails$n;
1162
1162
 
1163
- var correctPrototypeGetter = !fails$7(function () {
1163
+ var correctPrototypeGetter = !fails$e(function () {
1164
1164
  function F() { /* empty */ }
1165
1165
  F.prototype.constructor = null;
1166
1166
  // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
1167
1167
  return Object.getPrototypeOf(new F()) !== F.prototype;
1168
1168
  });
1169
1169
 
1170
- var hasOwn$4 = hasOwnProperty_1;
1171
- var isCallable$a = isCallable$l;
1172
- var toObject$1 = toObject$3;
1170
+ var hasOwn$5 = hasOwnProperty_1;
1171
+ var isCallable$c = isCallable$n;
1172
+ var toObject$2 = toObject$4;
1173
1173
  var sharedKey = sharedKey$3;
1174
1174
  var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
1175
1175
 
@@ -1181,22 +1181,22 @@ var ObjectPrototype = $Object$1.prototype;
1181
1181
  // https://tc39.es/ecma262/#sec-object.getprototypeof
1182
1182
  // eslint-disable-next-line es/no-object-getprototypeof -- safe
1183
1183
  var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf : function (O) {
1184
- var object = toObject$1(O);
1185
- if (hasOwn$4(object, IE_PROTO)) return object[IE_PROTO];
1184
+ var object = toObject$2(O);
1185
+ if (hasOwn$5(object, IE_PROTO)) return object[IE_PROTO];
1186
1186
  var constructor = object.constructor;
1187
- if (isCallable$a(constructor) && object instanceof constructor) {
1187
+ if (isCallable$c(constructor) && object instanceof constructor) {
1188
1188
  return constructor.prototype;
1189
1189
  } return object instanceof $Object$1 ? ObjectPrototype : null;
1190
1190
  };
1191
1191
 
1192
- var fails$6 = fails$g;
1193
- var isCallable$9 = isCallable$l;
1194
- var isObject$3 = isObject$9;
1192
+ var fails$d = fails$n;
1193
+ var isCallable$b = isCallable$n;
1194
+ var isObject$4 = isObject$a;
1195
1195
  var getPrototypeOf$1 = objectGetPrototypeOf;
1196
- var defineBuiltIn$4 = defineBuiltIn$6;
1197
- var wellKnownSymbol$d = wellKnownSymbol$g;
1196
+ var defineBuiltIn$6 = defineBuiltIn$8;
1197
+ var wellKnownSymbol$f = wellKnownSymbol$i;
1198
1198
 
1199
- var ITERATOR$6 = wellKnownSymbol$d('iterator');
1199
+ var ITERATOR$6 = wellKnownSymbol$f('iterator');
1200
1200
  var BUGGY_SAFARI_ITERATORS$1 = false;
1201
1201
 
1202
1202
  // `%IteratorPrototype%` object
@@ -1214,7 +1214,7 @@ if ([].keys) {
1214
1214
  }
1215
1215
  }
1216
1216
 
1217
- var NEW_ITERATOR_PROTOTYPE = !isObject$3(IteratorPrototype$2) || fails$6(function () {
1217
+ var NEW_ITERATOR_PROTOTYPE = !isObject$4(IteratorPrototype$2) || fails$d(function () {
1218
1218
  var test = {};
1219
1219
  // FF44- legacy iterators case
1220
1220
  return IteratorPrototype$2[ITERATOR$6].call(test) !== test;
@@ -1224,8 +1224,8 @@ if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
1224
1224
 
1225
1225
  // `%IteratorPrototype%[@@iterator]()` method
1226
1226
  // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
1227
- if (!isCallable$9(IteratorPrototype$2[ITERATOR$6])) {
1228
- defineBuiltIn$4(IteratorPrototype$2, ITERATOR$6, function () {
1227
+ if (!isCallable$b(IteratorPrototype$2[ITERATOR$6])) {
1228
+ defineBuiltIn$6(IteratorPrototype$2, ITERATOR$6, function () {
1229
1229
  return this;
1230
1230
  });
1231
1231
  }
@@ -1235,22 +1235,22 @@ var iteratorsCore = {
1235
1235
  BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
1236
1236
  };
1237
1237
 
1238
- var defineProperty$3 = objectDefineProperty.f;
1239
- var hasOwn$3 = hasOwnProperty_1;
1240
- var wellKnownSymbol$c = wellKnownSymbol$g;
1238
+ var defineProperty$4 = objectDefineProperty.f;
1239
+ var hasOwn$4 = hasOwnProperty_1;
1240
+ var wellKnownSymbol$e = wellKnownSymbol$i;
1241
1241
 
1242
- var TO_STRING_TAG$3 = wellKnownSymbol$c('toStringTag');
1242
+ var TO_STRING_TAG$3 = wellKnownSymbol$e('toStringTag');
1243
1243
 
1244
1244
  var setToStringTag$3 = function (target, TAG, STATIC) {
1245
1245
  if (target && !STATIC) target = target.prototype;
1246
- if (target && !hasOwn$3(target, TO_STRING_TAG$3)) {
1247
- defineProperty$3(target, TO_STRING_TAG$3, { configurable: true, value: TAG });
1246
+ if (target && !hasOwn$4(target, TO_STRING_TAG$3)) {
1247
+ defineProperty$4(target, TO_STRING_TAG$3, { configurable: true, value: TAG });
1248
1248
  }
1249
1249
  };
1250
1250
 
1251
1251
  var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
1252
- var create = objectCreate;
1253
- var createPropertyDescriptor = createPropertyDescriptor$3;
1252
+ var create$1 = objectCreate;
1253
+ var createPropertyDescriptor$1 = createPropertyDescriptor$4;
1254
1254
  var setToStringTag$2 = setToStringTag$3;
1255
1255
  var Iterators$4 = iterators;
1256
1256
 
@@ -1258,35 +1258,35 @@ var returnThis$1 = function () { return this; };
1258
1258
 
1259
1259
  var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
1260
1260
  var TO_STRING_TAG = NAME + ' Iterator';
1261
- IteratorConstructor.prototype = create(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
1261
+ IteratorConstructor.prototype = create$1(IteratorPrototype$1, { next: createPropertyDescriptor$1(+!ENUMERABLE_NEXT, next) });
1262
1262
  setToStringTag$2(IteratorConstructor, TO_STRING_TAG, false);
1263
1263
  Iterators$4[TO_STRING_TAG] = returnThis$1;
1264
1264
  return IteratorConstructor;
1265
1265
  };
1266
1266
 
1267
- var uncurryThis$9 = functionUncurryThis;
1268
- var aCallable$6 = aCallable$8;
1267
+ var uncurryThis$d = functionUncurryThis;
1268
+ var aCallable$7 = aCallable$9;
1269
1269
 
1270
1270
  var functionUncurryThisAccessor = function (object, key, method) {
1271
1271
  try {
1272
1272
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1273
- return uncurryThis$9(aCallable$6(Object.getOwnPropertyDescriptor(object, key)[method]));
1273
+ return uncurryThis$d(aCallable$7(Object.getOwnPropertyDescriptor(object, key)[method]));
1274
1274
  } catch (error) { /* empty */ }
1275
1275
  };
1276
1276
 
1277
- var isCallable$8 = isCallable$l;
1277
+ var isCallable$a = isCallable$n;
1278
1278
 
1279
1279
  var $String$1 = String;
1280
- var $TypeError$7 = TypeError;
1280
+ var $TypeError$9 = TypeError;
1281
1281
 
1282
1282
  var aPossiblePrototype$1 = function (argument) {
1283
- if (typeof argument == 'object' || isCallable$8(argument)) return argument;
1284
- throw new $TypeError$7("Can't set " + $String$1(argument) + ' as a prototype');
1283
+ if (typeof argument == 'object' || isCallable$a(argument)) return argument;
1284
+ throw new $TypeError$9("Can't set " + $String$1(argument) + ' as a prototype');
1285
1285
  };
1286
1286
 
1287
1287
  /* eslint-disable no-proto -- safe */
1288
1288
  var uncurryThisAccessor = functionUncurryThisAccessor;
1289
- var anObject$7 = anObject$c;
1289
+ var anObject$9 = anObject$e;
1290
1290
  var aPossiblePrototype = aPossiblePrototype$1;
1291
1291
 
1292
1292
  // `Object.setPrototypeOf` method
@@ -1303,7 +1303,7 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
1303
1303
  CORRECT_SETTER = test instanceof Array;
1304
1304
  } catch (error) { /* empty */ }
1305
1305
  return function setPrototypeOf(O, proto) {
1306
- anObject$7(O);
1306
+ anObject$9(O);
1307
1307
  aPossiblePrototype(proto);
1308
1308
  if (CORRECT_SETTER) setter(O, proto);
1309
1309
  else O.__proto__ = proto;
@@ -1311,17 +1311,17 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
1311
1311
  };
1312
1312
  }() : undefined);
1313
1313
 
1314
- var $$b = _export;
1315
- var call$a = functionCall;
1314
+ var $$d = _export;
1315
+ var call$d = functionCall;
1316
1316
  var FunctionName = functionName;
1317
- var isCallable$7 = isCallable$l;
1317
+ var isCallable$9 = isCallable$n;
1318
1318
  var createIteratorConstructor = iteratorCreateConstructor;
1319
1319
  var getPrototypeOf = objectGetPrototypeOf;
1320
- var setPrototypeOf$1 = objectSetPrototypeOf;
1320
+ var setPrototypeOf$2 = objectSetPrototypeOf;
1321
1321
  var setToStringTag$1 = setToStringTag$3;
1322
- var createNonEnumerableProperty$1 = createNonEnumerableProperty$4;
1323
- var defineBuiltIn$3 = defineBuiltIn$6;
1324
- var wellKnownSymbol$b = wellKnownSymbol$g;
1322
+ var createNonEnumerableProperty$3 = createNonEnumerableProperty$6;
1323
+ var defineBuiltIn$5 = defineBuiltIn$8;
1324
+ var wellKnownSymbol$d = wellKnownSymbol$i;
1325
1325
  var Iterators$3 = iterators;
1326
1326
  var IteratorsCore = iteratorsCore;
1327
1327
 
@@ -1329,7 +1329,7 @@ var PROPER_FUNCTION_NAME$1 = FunctionName.PROPER;
1329
1329
  var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
1330
1330
  var IteratorPrototype = IteratorsCore.IteratorPrototype;
1331
1331
  var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
1332
- var ITERATOR$5 = wellKnownSymbol$b('iterator');
1332
+ var ITERATOR$5 = wellKnownSymbol$d('iterator');
1333
1333
  var KEYS = 'keys';
1334
1334
  var VALUES = 'values';
1335
1335
  var ENTRIES = 'entries';
@@ -1367,10 +1367,10 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1367
1367
  CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
1368
1368
  if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
1369
1369
  if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
1370
- if (setPrototypeOf$1) {
1371
- setPrototypeOf$1(CurrentIteratorPrototype, IteratorPrototype);
1372
- } else if (!isCallable$7(CurrentIteratorPrototype[ITERATOR$5])) {
1373
- defineBuiltIn$3(CurrentIteratorPrototype, ITERATOR$5, returnThis);
1370
+ if (setPrototypeOf$2) {
1371
+ setPrototypeOf$2(CurrentIteratorPrototype, IteratorPrototype);
1372
+ } else if (!isCallable$9(CurrentIteratorPrototype[ITERATOR$5])) {
1373
+ defineBuiltIn$5(CurrentIteratorPrototype, ITERATOR$5, returnThis);
1374
1374
  }
1375
1375
  }
1376
1376
  // Set @@toStringTag to native iterators
@@ -1381,10 +1381,10 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1381
1381
  // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
1382
1382
  if (PROPER_FUNCTION_NAME$1 && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) {
1383
1383
  if (CONFIGURABLE_FUNCTION_NAME) {
1384
- createNonEnumerableProperty$1(IterablePrototype, 'name', VALUES);
1384
+ createNonEnumerableProperty$3(IterablePrototype, 'name', VALUES);
1385
1385
  } else {
1386
1386
  INCORRECT_VALUES_NAME = true;
1387
- defaultIterator = function values() { return call$a(nativeIterator, this); };
1387
+ defaultIterator = function values() { return call$d(nativeIterator, this); };
1388
1388
  }
1389
1389
  }
1390
1390
 
@@ -1397,14 +1397,14 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1397
1397
  };
1398
1398
  if (FORCED) for (KEY in methods) {
1399
1399
  if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1400
- defineBuiltIn$3(IterablePrototype, KEY, methods[KEY]);
1400
+ defineBuiltIn$5(IterablePrototype, KEY, methods[KEY]);
1401
1401
  }
1402
- } else $$b({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1402
+ } else $$d({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1403
1403
  }
1404
1404
 
1405
1405
  // define iterator
1406
1406
  if (IterablePrototype[ITERATOR$5] !== defaultIterator) {
1407
- defineBuiltIn$3(IterablePrototype, ITERATOR$5, defaultIterator, { name: DEFAULT });
1407
+ defineBuiltIn$5(IterablePrototype, ITERATOR$5, defaultIterator, { name: DEFAULT });
1408
1408
  }
1409
1409
  Iterators$3[NAME] = defaultIterator;
1410
1410
 
@@ -1421,14 +1421,14 @@ var toIndexedObject = toIndexedObject$5;
1421
1421
  var addToUnscopables$1 = addToUnscopables$2;
1422
1422
  var Iterators$2 = iterators;
1423
1423
  var InternalStateModule$1 = internalState;
1424
- var defineProperty$2 = objectDefineProperty.f;
1424
+ var defineProperty$3 = objectDefineProperty.f;
1425
1425
  var defineIterator = iteratorDefine;
1426
1426
  var createIterResultObject = createIterResultObject$1;
1427
- var DESCRIPTORS$3 = descriptors;
1427
+ var DESCRIPTORS$4 = descriptors;
1428
1428
 
1429
1429
  var ARRAY_ITERATOR = 'Array Iterator';
1430
1430
  var setInternalState$1 = InternalStateModule$1.set;
1431
- var getInternalState = InternalStateModule$1.getterFor(ARRAY_ITERATOR);
1431
+ var getInternalState$1 = InternalStateModule$1.getterFor(ARRAY_ITERATOR);
1432
1432
 
1433
1433
  // `Array.prototype.entries` method
1434
1434
  // https://tc39.es/ecma262/#sec-array.prototype.entries
@@ -1450,7 +1450,7 @@ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind)
1450
1450
  // `%ArrayIteratorPrototype%.next` method
1451
1451
  // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
1452
1452
  }, function () {
1453
- var state = getInternalState(this);
1453
+ var state = getInternalState$1(this);
1454
1454
  var target = state.target;
1455
1455
  var index = state.index++;
1456
1456
  if (!target || index >= target.length) {
@@ -1474,8 +1474,8 @@ addToUnscopables$1('values');
1474
1474
  addToUnscopables$1('entries');
1475
1475
 
1476
1476
  // V8 ~ Chrome 45- bug
1477
- if (DESCRIPTORS$3 && values.name !== 'values') try {
1478
- defineProperty$2(values, 'name', { value: 'values' });
1477
+ if (DESCRIPTORS$4 && values.name !== 'values') try {
1478
+ defineProperty$3(values, 'name', { value: 'values' });
1479
1479
  } catch (error) { /* empty */ }
1480
1480
 
1481
1481
  // iterable DOM collections
@@ -1522,32 +1522,32 @@ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.co
1522
1522
 
1523
1523
  var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
1524
1524
 
1525
- var global$9 = global$k;
1525
+ var global$d = global$o;
1526
1526
  var DOMIterables = domIterables;
1527
1527
  var DOMTokenListPrototype = domTokenListPrototype;
1528
1528
  var ArrayIteratorMethods = es_array_iterator;
1529
- var createNonEnumerableProperty = createNonEnumerableProperty$4;
1530
- var wellKnownSymbol$a = wellKnownSymbol$g;
1529
+ var createNonEnumerableProperty$2 = createNonEnumerableProperty$6;
1530
+ var wellKnownSymbol$c = wellKnownSymbol$i;
1531
1531
 
1532
- var ITERATOR$4 = wellKnownSymbol$a('iterator');
1533
- var TO_STRING_TAG$2 = wellKnownSymbol$a('toStringTag');
1532
+ var ITERATOR$4 = wellKnownSymbol$c('iterator');
1533
+ var TO_STRING_TAG$2 = wellKnownSymbol$c('toStringTag');
1534
1534
  var ArrayValues = ArrayIteratorMethods.values;
1535
1535
 
1536
1536
  var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
1537
1537
  if (CollectionPrototype) {
1538
1538
  // some Chrome versions have non-configurable methods on DOMTokenList
1539
1539
  if (CollectionPrototype[ITERATOR$4] !== ArrayValues) try {
1540
- createNonEnumerableProperty(CollectionPrototype, ITERATOR$4, ArrayValues);
1540
+ createNonEnumerableProperty$2(CollectionPrototype, ITERATOR$4, ArrayValues);
1541
1541
  } catch (error) {
1542
1542
  CollectionPrototype[ITERATOR$4] = ArrayValues;
1543
1543
  }
1544
1544
  if (!CollectionPrototype[TO_STRING_TAG$2]) {
1545
- createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG$2, COLLECTION_NAME);
1545
+ createNonEnumerableProperty$2(CollectionPrototype, TO_STRING_TAG$2, COLLECTION_NAME);
1546
1546
  }
1547
1547
  if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
1548
1548
  // some Chrome versions have non-configurable methods on DOMTokenList
1549
1549
  if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
1550
- createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
1550
+ createNonEnumerableProperty$2(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
1551
1551
  } catch (error) {
1552
1552
  CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
1553
1553
  }
@@ -1556,35 +1556,35 @@ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
1556
1556
  };
1557
1557
 
1558
1558
  for (var COLLECTION_NAME in DOMIterables) {
1559
- handlePrototype(global$9[COLLECTION_NAME] && global$9[COLLECTION_NAME].prototype, COLLECTION_NAME);
1559
+ handlePrototype(global$d[COLLECTION_NAME] && global$d[COLLECTION_NAME].prototype, COLLECTION_NAME);
1560
1560
  }
1561
1561
 
1562
1562
  handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
1563
1563
 
1564
- var DESCRIPTORS$2 = descriptors;
1565
- var uncurryThis$8 = functionUncurryThis;
1566
- var call$9 = functionCall;
1567
- var fails$5 = fails$g;
1564
+ var DESCRIPTORS$3 = descriptors;
1565
+ var uncurryThis$c = functionUncurryThis;
1566
+ var call$c = functionCall;
1567
+ var fails$c = fails$n;
1568
1568
  var objectKeys = objectKeys$2;
1569
1569
  var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1570
1570
  var propertyIsEnumerableModule = objectPropertyIsEnumerable;
1571
- var toObject = toObject$3;
1571
+ var toObject$1 = toObject$4;
1572
1572
  var IndexedObject = indexedObject;
1573
1573
 
1574
1574
  // eslint-disable-next-line es/no-object-assign -- safe
1575
1575
  var $assign = Object.assign;
1576
1576
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1577
- var defineProperty$1 = Object.defineProperty;
1578
- var concat = uncurryThis$8([].concat);
1577
+ var defineProperty$2 = Object.defineProperty;
1578
+ var concat = uncurryThis$c([].concat);
1579
1579
 
1580
1580
  // `Object.assign` method
1581
1581
  // https://tc39.es/ecma262/#sec-object.assign
1582
- var objectAssign = !$assign || fails$5(function () {
1582
+ var objectAssign = !$assign || fails$c(function () {
1583
1583
  // should have correct order of operations (Edge bug)
1584
- if (DESCRIPTORS$2 && $assign({ b: 1 }, $assign(defineProperty$1({}, 'a', {
1584
+ if (DESCRIPTORS$3 && $assign({ b: 1 }, $assign(defineProperty$2({}, 'a', {
1585
1585
  enumerable: true,
1586
1586
  get: function () {
1587
- defineProperty$1(this, 'b', {
1587
+ defineProperty$2(this, 'b', {
1588
1588
  value: 3,
1589
1589
  enumerable: false
1590
1590
  });
@@ -1600,7 +1600,7 @@ var objectAssign = !$assign || fails$5(function () {
1600
1600
  alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1601
1601
  return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;
1602
1602
  }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
1603
- var T = toObject(target);
1603
+ var T = toObject$1(target);
1604
1604
  var argumentsLength = arguments.length;
1605
1605
  var index = 1;
1606
1606
  var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
@@ -1613,18 +1613,18 @@ var objectAssign = !$assign || fails$5(function () {
1613
1613
  var key;
1614
1614
  while (length > j) {
1615
1615
  key = keys[j++];
1616
- if (!DESCRIPTORS$2 || call$9(propertyIsEnumerable, S, key)) T[key] = S[key];
1616
+ if (!DESCRIPTORS$3 || call$c(propertyIsEnumerable, S, key)) T[key] = S[key];
1617
1617
  }
1618
1618
  } return T;
1619
1619
  } : $assign;
1620
1620
 
1621
- var $$a = _export;
1621
+ var $$c = _export;
1622
1622
  var assign = objectAssign;
1623
1623
 
1624
1624
  // `Object.assign` method
1625
1625
  // https://tc39.es/ecma262/#sec-object.assign
1626
1626
  // eslint-disable-next-line es/no-object-assign -- required for testing
1627
- $$a({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1627
+ $$c({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1628
1628
  assign: assign
1629
1629
  });
1630
1630
 
@@ -2068,49 +2068,65 @@ function Card({
2068
2068
  }));
2069
2069
  }
2070
2070
 
2071
- const useDatepicker = (datepickerRef, datepickerDialogRef, dateInputRef, datepickerTriggerRef, options = {}) => {
2072
- const dataStub = {
2073
- formattedSelectedDate: '',
2074
- calendar: {
2075
- headers: [],
2076
- calendarGrid: []
2077
- }
2078
- };
2079
- const [data, setData] = useState(dataStub);
2080
- const [state, setState] = useState({
2081
- isActive: false
2082
- });
2083
- const datepickerStub = {};
2084
- const [datepicker, setDatepicker] = useState(datepickerStub);
2085
- useEffect(() => {
2086
- if (!datepicker.open && datepickerRef.current && datepickerDialogRef.current && dateInputRef.current && datepickerTriggerRef.current) {
2087
- setDatepicker(createDatepicker((data, state) => {
2088
- if (data) setData(data);
2089
- if (state) setState(state);
2090
- }, options, datepickerRef.current, datepickerDialogRef.current, dateInputRef.current, datepickerTriggerRef.current));
2071
+ registerTransitionalStyles();
2072
+ const CoreDatepicker = createComponent({
2073
+ tagName: getScopedTagName('gds-datepicker'),
2074
+ elementClass: GdsDatepicker,
2075
+ events: {
2076
+ onchange: 'change'
2077
+ },
2078
+ react: React
2079
+ });
2080
+ const Datepicker = ({
2081
+ label: _label = 'Date',
2082
+ onChange,
2083
+ minDate,
2084
+ maxDate,
2085
+ value,
2086
+ showWeeks,
2087
+ testId,
2088
+ selectedDate,
2089
+ currentDate
2090
+ }) => {
2091
+ if (currentDate && !value) value = currentDate;
2092
+ if (selectedDate && !value) value = selectedDate;
2093
+ const min = minDate ? minDate : new Date(new Date().getFullYear() - 10, 0, 1);
2094
+ const max = maxDate ? maxDate : new Date(new Date().getFullYear() + 10, 0, 1);
2095
+ const onChangeHandler = e => {
2096
+ console.log('OnChange event handler');
2097
+ if (onChange) {
2098
+ onChange(e.detail.value);
2091
2099
  }
2092
- }, [datepicker, datepickerRef, datepickerDialogRef, dateInputRef, datepickerTriggerRef, options]);
2093
- return {
2094
- datepicker,
2095
- data,
2096
- state
2097
2100
  };
2101
+ return jsx("div", Object.assign({
2102
+ className: "form-group"
2103
+ }, {
2104
+ children: jsx(CoreDatepicker, {
2105
+ "data-testid": testId,
2106
+ label: _label,
2107
+ min: min,
2108
+ max: max,
2109
+ showWeekNumbers: showWeeks,
2110
+ onchange: onChangeHandler,
2111
+ value: value
2112
+ })
2113
+ }));
2098
2114
  };
2099
2115
 
2100
- var $$9 = _export;
2116
+ var $$b = _export;
2101
2117
  var $includes = arrayIncludes.includes;
2102
- var fails$4 = fails$g;
2118
+ var fails$b = fails$n;
2103
2119
  var addToUnscopables = addToUnscopables$2;
2104
2120
 
2105
2121
  // FF99+ bug
2106
- var BROKEN_ON_SPARSE = fails$4(function () {
2122
+ var BROKEN_ON_SPARSE = fails$b(function () {
2107
2123
  // eslint-disable-next-line es/no-array-prototype-includes -- detection
2108
2124
  return !Array(1).includes();
2109
2125
  });
2110
2126
 
2111
2127
  // `Array.prototype.includes` method
2112
2128
  // https://tc39.es/ecma262/#sec-array.prototype.includes
2113
- $$9({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
2129
+ $$b({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
2114
2130
  includes: function includes(el /* , fromIndex = 0 */) {
2115
2131
  return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
2116
2132
  }
@@ -2119,44 +2135,44 @@ $$9({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
2119
2135
  // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
2120
2136
  addToUnscopables('includes');
2121
2137
 
2122
- var isObject$2 = isObject$9;
2123
- var classof$5 = classofRaw$2;
2124
- var wellKnownSymbol$9 = wellKnownSymbol$g;
2138
+ var isObject$3 = isObject$a;
2139
+ var classof$6 = classofRaw$2;
2140
+ var wellKnownSymbol$b = wellKnownSymbol$i;
2125
2141
 
2126
- var MATCH$1 = wellKnownSymbol$9('match');
2142
+ var MATCH$2 = wellKnownSymbol$b('match');
2127
2143
 
2128
2144
  // `IsRegExp` abstract operation
2129
2145
  // https://tc39.es/ecma262/#sec-isregexp
2130
2146
  var isRegexp = function (it) {
2131
2147
  var isRegExp;
2132
- return isObject$2(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$5(it) === 'RegExp');
2148
+ return isObject$3(it) && ((isRegExp = it[MATCH$2]) !== undefined ? !!isRegExp : classof$6(it) === 'RegExp');
2133
2149
  };
2134
2150
 
2135
- var isRegExp = isRegexp;
2151
+ var isRegExp$1 = isRegexp;
2136
2152
 
2137
- var $TypeError$6 = TypeError;
2153
+ var $TypeError$8 = TypeError;
2138
2154
 
2139
2155
  var notARegexp = function (it) {
2140
- if (isRegExp(it)) {
2141
- throw new $TypeError$6("The method doesn't accept regular expressions");
2156
+ if (isRegExp$1(it)) {
2157
+ throw new $TypeError$8("The method doesn't accept regular expressions");
2142
2158
  } return it;
2143
2159
  };
2144
2160
 
2145
- var wellKnownSymbol$8 = wellKnownSymbol$g;
2161
+ var wellKnownSymbol$a = wellKnownSymbol$i;
2146
2162
 
2147
- var TO_STRING_TAG$1 = wellKnownSymbol$8('toStringTag');
2148
- var test = {};
2163
+ var TO_STRING_TAG$1 = wellKnownSymbol$a('toStringTag');
2164
+ var test$1 = {};
2149
2165
 
2150
- test[TO_STRING_TAG$1] = 'z';
2166
+ test$1[TO_STRING_TAG$1] = 'z';
2151
2167
 
2152
- var toStringTagSupport = String(test) === '[object z]';
2168
+ var toStringTagSupport = String(test$1) === '[object z]';
2153
2169
 
2154
2170
  var TO_STRING_TAG_SUPPORT = toStringTagSupport;
2155
- var isCallable$6 = isCallable$l;
2171
+ var isCallable$8 = isCallable$n;
2156
2172
  var classofRaw$1 = classofRaw$2;
2157
- var wellKnownSymbol$7 = wellKnownSymbol$g;
2173
+ var wellKnownSymbol$9 = wellKnownSymbol$i;
2158
2174
 
2159
- var TO_STRING_TAG = wellKnownSymbol$7('toStringTag');
2175
+ var TO_STRING_TAG = wellKnownSymbol$9('toStringTag');
2160
2176
  var $Object = Object;
2161
2177
 
2162
2178
  // ES3 wrong here
@@ -2170,7 +2186,7 @@ var tryGet = function (it, key) {
2170
2186
  };
2171
2187
 
2172
2188
  // getting tag from ES6+ `Object.prototype.toString`
2173
- var classof$4 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
2189
+ var classof$5 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
2174
2190
  var O, tag, result;
2175
2191
  return it === undefined ? 'Undefined' : it === null ? 'Null'
2176
2192
  // @@toStringTag case
@@ -2178,21 +2194,21 @@ var classof$4 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
2178
2194
  // builtinTag case
2179
2195
  : CORRECT_ARGUMENTS ? classofRaw$1(O)
2180
2196
  // ES3 arguments fallback
2181
- : (result = classofRaw$1(O)) === 'Object' && isCallable$6(O.callee) ? 'Arguments' : result;
2197
+ : (result = classofRaw$1(O)) === 'Object' && isCallable$8(O.callee) ? 'Arguments' : result;
2182
2198
  };
2183
2199
 
2184
- var classof$3 = classof$4;
2200
+ var classof$4 = classof$5;
2185
2201
 
2186
2202
  var $String = String;
2187
2203
 
2188
- var toString$4 = function (argument) {
2189
- if (classof$3(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
2204
+ var toString$8 = function (argument) {
2205
+ if (classof$4(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
2190
2206
  return $String(argument);
2191
2207
  };
2192
2208
 
2193
- var wellKnownSymbol$6 = wellKnownSymbol$g;
2209
+ var wellKnownSymbol$8 = wellKnownSymbol$i;
2194
2210
 
2195
- var MATCH = wellKnownSymbol$6('match');
2211
+ var MATCH$1 = wellKnownSymbol$8('match');
2196
2212
 
2197
2213
  var correctIsRegexpLogic = function (METHOD_NAME) {
2198
2214
  var regexp = /./;
@@ -2200,28 +2216,28 @@ var correctIsRegexpLogic = function (METHOD_NAME) {
2200
2216
  '/./'[METHOD_NAME](regexp);
2201
2217
  } catch (error1) {
2202
2218
  try {
2203
- regexp[MATCH] = false;
2219
+ regexp[MATCH$1] = false;
2204
2220
  return '/./'[METHOD_NAME](regexp);
2205
2221
  } catch (error2) { /* empty */ }
2206
2222
  } return false;
2207
2223
  };
2208
2224
 
2209
- var $$8 = _export;
2210
- var uncurryThis$7 = functionUncurryThis;
2225
+ var $$a = _export;
2226
+ var uncurryThis$b = functionUncurryThis;
2211
2227
  var notARegExp = notARegexp;
2212
- var requireObjectCoercible$1 = requireObjectCoercible$4;
2213
- var toString$3 = toString$4;
2228
+ var requireObjectCoercible$2 = requireObjectCoercible$5;
2229
+ var toString$7 = toString$8;
2214
2230
  var correctIsRegExpLogic = correctIsRegexpLogic;
2215
2231
 
2216
- var stringIndexOf = uncurryThis$7(''.indexOf);
2232
+ var stringIndexOf$1 = uncurryThis$b(''.indexOf);
2217
2233
 
2218
2234
  // `String.prototype.includes` method
2219
2235
  // https://tc39.es/ecma262/#sec-string.prototype.includes
2220
- $$8({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
2236
+ $$a({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
2221
2237
  includes: function includes(searchString /* , position = 0 */) {
2222
- return !!~stringIndexOf(
2223
- toString$3(requireObjectCoercible$1(this)),
2224
- toString$3(notARegExp(searchString)),
2238
+ return !!~stringIndexOf$1(
2239
+ toString$7(requireObjectCoercible$2(this)),
2240
+ toString$7(notARegExp(searchString)),
2225
2241
  arguments.length > 1 ? arguments[1] : undefined
2226
2242
  );
2227
2243
  }
@@ -2255,7 +2271,8 @@ const Dropdown = ({
2255
2271
  texts,
2256
2272
  useValue: _useValue = 'value',
2257
2273
  validator,
2258
- value
2274
+ value,
2275
+ syncPopoverWidth
2259
2276
  }) => {
2260
2277
  const handleOnChange = e => {
2261
2278
  var _a;
@@ -2283,7 +2300,8 @@ const Dropdown = ({
2283
2300
  invalid: (validator === null || validator === void 0 ? void 0 : validator.indicator) === 'error',
2284
2301
  compareWith: compareWithAdapter,
2285
2302
  value: value,
2286
- searchFilter: searchFilterAdapter
2303
+ searchFilter: searchFilterAdapter,
2304
+ syncPopoverWidth: syncPopoverWidth
2287
2305
  }, {
2288
2306
  children: [informationLabel && jsx("span", Object.assign({
2289
2307
  slot: "sub-label"
@@ -2307,155 +2325,6 @@ const Dropdown = ({
2307
2325
  }));
2308
2326
  };
2309
2327
 
2310
- const Datepicker = (options = {}) => {
2311
- const [uuid] = useState(randomId());
2312
- const id = `sgr-datepicker-${uuid}`;
2313
- const datepickerRef = useRef(null);
2314
- const datepickerTriggerRef = useRef(null);
2315
- const datepickerDialogRef = useRef(null);
2316
- const dateInputRef = useRef(null);
2317
- options = Object.assign({
2318
- label: 'Date'
2319
- }, options);
2320
- const {
2321
- datepicker,
2322
- data,
2323
- state
2324
- } = useDatepicker(datepickerRef, datepickerDialogRef, dateInputRef, datepickerTriggerRef, options);
2325
- useEffect(() => {
2326
- var _a;
2327
- const selDateSub = (_a = datepicker.selectedDate$) === null || _a === void 0 ? void 0 : _a.subscribe(newDate => options.onChange && options.onChange(newDate));
2328
- return () => selDateSub === null || selDateSub === void 0 ? void 0 : selDateSub.unsubscribe();
2329
- }, [datepicker, options]);
2330
- const classNames = day => Object.entries({
2331
- disabled: !day.currentMonth,
2332
- 'sg-date-today': day.today
2333
- // 'sg-date-holiday': day.holiday,
2334
- }).map(([className, add]) => add ? className : '').join(' ');
2335
- return jsxs(Fragment, {
2336
- children: [jsxs("div", Object.assign({
2337
- className: "form-group"
2338
- }, {
2339
- children: [jsx("label", Object.assign({
2340
- htmlFor: id
2341
- }, {
2342
- children: options.label
2343
- })), jsxs("div", Object.assign({
2344
- className: "group",
2345
- ref: datepickerRef
2346
- }, {
2347
- children: [jsx("input", {
2348
- ref: dateInputRef,
2349
- id: id,
2350
- type: "text",
2351
- placeholder: "yyyy-mm-dd",
2352
- value: data.formattedSelectedDate,
2353
- onChange: e => datepicker.select(e.target.value)
2354
- }), jsx("button", Object.assign({
2355
- ref: datepickerTriggerRef,
2356
- type: "button",
2357
- className: "primary",
2358
- onClick: () => datepicker.toggle()
2359
- }, {
2360
- children: jsx("i", Object.assign({
2361
- className: "sg-icon sg-icon-calendar"
2362
- }, {
2363
- children: "Select date"
2364
- }))
2365
- }))]
2366
- })), jsx("span", Object.assign({
2367
- className: "form-info"
2368
- }, {
2369
- children: "Select a date"
2370
- }))]
2371
- })), jsx("div", Object.assign({
2372
- ref: datepickerDialogRef,
2373
- className: `popover popover-datepicker ${state.isActive ? 'active' : ''}`,
2374
- role: "dialog",
2375
- "aria-modal": "true",
2376
- "aria-label": "Choose Date"
2377
- }, {
2378
- children: state.isActive && jsxs("div", Object.assign({
2379
- className: "sg-date"
2380
- }, {
2381
- children: [jsxs("header", {
2382
- children: [jsx("button", Object.assign({
2383
- className: "link",
2384
- onClick: () => datepicker.sub(1, 'months')
2385
- }, {
2386
- children: jsx("i", Object.assign({
2387
- className: "sg-icon sg-icon-previous"
2388
- }, {
2389
- children: "Previous month"
2390
- }))
2391
- })), jsx(Dropdown, {
2392
- options: months({}),
2393
- display: "key",
2394
- texts: {
2395
- placeholder: data.monthName
2396
- },
2397
- onChange: datepicker.setMonth,
2398
- value: data.month
2399
- }), jsx(Dropdown, {
2400
- options: years({}),
2401
- display: "key",
2402
- texts: {
2403
- placeholder: data.year + ''
2404
- },
2405
- onChange: datepicker.setYear,
2406
- value: data.year
2407
- }), jsx("button", Object.assign({
2408
- className: "link",
2409
- onClick: () => datepicker.add(1, 'months')
2410
- }, {
2411
- children: jsx("i", Object.assign({
2412
- className: "sg-icon sg-icon-next"
2413
- }, {
2414
- children: "Next month"
2415
- }))
2416
- }))]
2417
- }), jsx("main", {
2418
- children: jsxs("table", Object.assign({
2419
- role: "grid"
2420
- }, {
2421
- children: [jsx("thead", {
2422
- children: jsx("tr", {
2423
- children: data.calendar.headers.map((header, ix) => jsx("th", Object.assign({
2424
- scope: "col",
2425
- abbr: header.abbr,
2426
- className: header.type === 'week' ? 'sg-week-header' : 'sg-day-header'
2427
- }, {
2428
- children: header.displayText
2429
- }), `week_${ix}`))
2430
- })
2431
- }), jsx("tbody", {
2432
- children: data.calendar.calendarGrid.map((week, ix) => jsxs("tr", {
2433
- children: [data.calendar.weekNumbers ? jsx("th", Object.assign({
2434
- className: "sg-week-number"
2435
- }, {
2436
- children: data.calendar.weekNumbers[ix]
2437
- })) : '', week.map(day => jsx("td", Object.assign({
2438
- "data-date": day.formattedDate,
2439
- className: classNames(day),
2440
- title: day.today ? 'Today' : '',
2441
- tabIndex: day.highlighted || day.selected && !(data === null || data === void 0 ? void 0 : data.highlightedDate) || day.today && !(data === null || data === void 0 ? void 0 : data.highlightedDate) && !(data === null || data === void 0 ? void 0 : data.selectedDate) ? 0 : -1,
2442
- role: day.selected ? 'gridcell' : undefined,
2443
- "aria-selected": day.selected && !(data === null || data === void 0 ? void 0 : data.highlightedDate) ? true : undefined,
2444
- onClick: () => {
2445
- day.currentMonth && datepicker.select(day.date);
2446
- }
2447
- }, {
2448
- children: day.day
2449
- }), day.day))]
2450
- }, `week_${ix}`))
2451
- })]
2452
- }))
2453
- })]
2454
- }))
2455
- }))]
2456
- });
2457
- };
2458
-
2459
2328
  function Button(_a) {
2460
2329
  var _b;
2461
2330
  var {
@@ -2801,51 +2670,51 @@ function Group({
2801
2670
  }));
2802
2671
  }
2803
2672
 
2804
- var global$8 = global$k;
2805
- var classof$2 = classofRaw$2;
2673
+ var global$c = global$o;
2674
+ var classof$3 = classofRaw$2;
2806
2675
 
2807
- var engineIsNode = classof$2(global$8.process) === 'process';
2676
+ var engineIsNode = classof$3(global$c.process) === 'process';
2808
2677
 
2809
2678
  var makeBuiltIn = makeBuiltIn$3.exports;
2810
- var defineProperty = objectDefineProperty;
2679
+ var defineProperty$1 = objectDefineProperty;
2811
2680
 
2812
2681
  var defineBuiltInAccessor$2 = function (target, name, descriptor) {
2813
2682
  if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
2814
2683
  if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
2815
- return defineProperty.f(target, name, descriptor);
2684
+ return defineProperty$1.f(target, name, descriptor);
2816
2685
  };
2817
2686
 
2818
2687
  var getBuiltIn$3 = getBuiltIn$7;
2819
2688
  var defineBuiltInAccessor$1 = defineBuiltInAccessor$2;
2820
- var wellKnownSymbol$5 = wellKnownSymbol$g;
2821
- var DESCRIPTORS$1 = descriptors;
2689
+ var wellKnownSymbol$7 = wellKnownSymbol$i;
2690
+ var DESCRIPTORS$2 = descriptors;
2822
2691
 
2823
- var SPECIES$2 = wellKnownSymbol$5('species');
2692
+ var SPECIES$3 = wellKnownSymbol$7('species');
2824
2693
 
2825
- var setSpecies$1 = function (CONSTRUCTOR_NAME) {
2694
+ var setSpecies$2 = function (CONSTRUCTOR_NAME) {
2826
2695
  var Constructor = getBuiltIn$3(CONSTRUCTOR_NAME);
2827
2696
 
2828
- if (DESCRIPTORS$1 && Constructor && !Constructor[SPECIES$2]) {
2829
- defineBuiltInAccessor$1(Constructor, SPECIES$2, {
2697
+ if (DESCRIPTORS$2 && Constructor && !Constructor[SPECIES$3]) {
2698
+ defineBuiltInAccessor$1(Constructor, SPECIES$3, {
2830
2699
  configurable: true,
2831
2700
  get: function () { return this; }
2832
2701
  });
2833
2702
  }
2834
2703
  };
2835
2704
 
2836
- var isPrototypeOf$3 = objectIsPrototypeOf;
2705
+ var isPrototypeOf$4 = objectIsPrototypeOf;
2837
2706
 
2838
- var $TypeError$5 = TypeError;
2707
+ var $TypeError$7 = TypeError;
2839
2708
 
2840
2709
  var anInstance$1 = function (it, Prototype) {
2841
- if (isPrototypeOf$3(Prototype, it)) return it;
2842
- throw new $TypeError$5('Incorrect invocation');
2710
+ if (isPrototypeOf$4(Prototype, it)) return it;
2711
+ throw new $TypeError$7('Incorrect invocation');
2843
2712
  };
2844
2713
 
2845
- var uncurryThis$6 = functionUncurryThis;
2846
- var fails$3 = fails$g;
2847
- var isCallable$5 = isCallable$l;
2848
- var classof$1 = classof$4;
2714
+ var uncurryThis$a = functionUncurryThis;
2715
+ var fails$a = fails$n;
2716
+ var isCallable$7 = isCallable$n;
2717
+ var classof$2 = classof$5;
2849
2718
  var getBuiltIn$2 = getBuiltIn$7;
2850
2719
  var inspectSource$1 = inspectSource$3;
2851
2720
 
@@ -2853,11 +2722,11 @@ var noop = function () { /* empty */ };
2853
2722
  var empty = [];
2854
2723
  var construct = getBuiltIn$2('Reflect', 'construct');
2855
2724
  var constructorRegExp = /^\s*(?:class|function)\b/;
2856
- var exec$1 = uncurryThis$6(constructorRegExp.exec);
2725
+ var exec$3 = uncurryThis$a(constructorRegExp.exec);
2857
2726
  var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
2858
2727
 
2859
2728
  var isConstructorModern = function isConstructor(argument) {
2860
- if (!isCallable$5(argument)) return false;
2729
+ if (!isCallable$7(argument)) return false;
2861
2730
  try {
2862
2731
  construct(noop, empty, argument);
2863
2732
  return true;
@@ -2867,8 +2736,8 @@ var isConstructorModern = function isConstructor(argument) {
2867
2736
  };
2868
2737
 
2869
2738
  var isConstructorLegacy = function isConstructor(argument) {
2870
- if (!isCallable$5(argument)) return false;
2871
- switch (classof$1(argument)) {
2739
+ if (!isCallable$7(argument)) return false;
2740
+ switch (classof$2(argument)) {
2872
2741
  case 'AsyncFunction':
2873
2742
  case 'GeneratorFunction':
2874
2743
  case 'AsyncGeneratorFunction': return false;
@@ -2877,7 +2746,7 @@ var isConstructorLegacy = function isConstructor(argument) {
2877
2746
  // we can't check .prototype since constructors produced by .bind haven't it
2878
2747
  // `Function#toString` throws on some built-it function in some legacy engines
2879
2748
  // (for example, `DOMQuad` and similar in FF41-)
2880
- return INCORRECT_TO_STRING || !!exec$1(constructorRegExp, inspectSource$1(argument));
2749
+ return INCORRECT_TO_STRING || !!exec$3(constructorRegExp, inspectSource$1(argument));
2881
2750
  } catch (error) {
2882
2751
  return true;
2883
2752
  }
@@ -2887,7 +2756,7 @@ isConstructorLegacy.sham = true;
2887
2756
 
2888
2757
  // `IsConstructor` abstract operation
2889
2758
  // https://tc39.es/ecma262/#sec-isconstructor
2890
- var isConstructor$1 = !construct || fails$3(function () {
2759
+ var isConstructor$1 = !construct || fails$a(function () {
2891
2760
  var called;
2892
2761
  return isConstructorModern(isConstructorModern.call)
2893
2762
  || !isConstructorModern(Object)
@@ -2896,114 +2765,114 @@ var isConstructor$1 = !construct || fails$3(function () {
2896
2765
  }) ? isConstructorLegacy : isConstructorModern;
2897
2766
 
2898
2767
  var isConstructor = isConstructor$1;
2899
- var tryToString$2 = tryToString$4;
2768
+ var tryToString$3 = tryToString$5;
2900
2769
 
2901
- var $TypeError$4 = TypeError;
2770
+ var $TypeError$6 = TypeError;
2902
2771
 
2903
2772
  // `Assert: IsConstructor(argument) is true`
2904
2773
  var aConstructor$1 = function (argument) {
2905
2774
  if (isConstructor(argument)) return argument;
2906
- throw new $TypeError$4(tryToString$2(argument) + ' is not a constructor');
2775
+ throw new $TypeError$6(tryToString$3(argument) + ' is not a constructor');
2907
2776
  };
2908
2777
 
2909
- var anObject$6 = anObject$c;
2778
+ var anObject$8 = anObject$e;
2910
2779
  var aConstructor = aConstructor$1;
2911
- var isNullOrUndefined$1 = isNullOrUndefined$4;
2912
- var wellKnownSymbol$4 = wellKnownSymbol$g;
2780
+ var isNullOrUndefined$2 = isNullOrUndefined$5;
2781
+ var wellKnownSymbol$6 = wellKnownSymbol$i;
2913
2782
 
2914
- var SPECIES$1 = wellKnownSymbol$4('species');
2783
+ var SPECIES$2 = wellKnownSymbol$6('species');
2915
2784
 
2916
2785
  // `SpeciesConstructor` abstract operation
2917
2786
  // https://tc39.es/ecma262/#sec-speciesconstructor
2918
2787
  var speciesConstructor$1 = function (O, defaultConstructor) {
2919
- var C = anObject$6(O).constructor;
2788
+ var C = anObject$8(O).constructor;
2920
2789
  var S;
2921
- return C === undefined || isNullOrUndefined$1(S = anObject$6(C)[SPECIES$1]) ? defaultConstructor : aConstructor(S);
2790
+ return C === undefined || isNullOrUndefined$2(S = anObject$8(C)[SPECIES$2]) ? defaultConstructor : aConstructor(S);
2922
2791
  };
2923
2792
 
2924
2793
  var NATIVE_BIND$1 = functionBindNative;
2925
2794
 
2926
2795
  var FunctionPrototype = Function.prototype;
2927
2796
  var apply$1 = FunctionPrototype.apply;
2928
- var call$8 = FunctionPrototype.call;
2797
+ var call$b = FunctionPrototype.call;
2929
2798
 
2930
2799
  // eslint-disable-next-line es/no-reflect -- safe
2931
- var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$8.bind(apply$1) : function () {
2932
- return call$8.apply(apply$1, arguments);
2800
+ var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$b.bind(apply$1) : function () {
2801
+ return call$b.apply(apply$1, arguments);
2933
2802
  });
2934
2803
 
2935
2804
  var classofRaw = classofRaw$2;
2936
- var uncurryThis$5 = functionUncurryThis;
2805
+ var uncurryThis$9 = functionUncurryThis;
2937
2806
 
2938
2807
  var functionUncurryThisClause = function (fn) {
2939
2808
  // Nashorn bug:
2940
2809
  // https://github.com/zloirock/core-js/issues/1128
2941
2810
  // https://github.com/zloirock/core-js/issues/1130
2942
- if (classofRaw(fn) === 'Function') return uncurryThis$5(fn);
2811
+ if (classofRaw(fn) === 'Function') return uncurryThis$9(fn);
2943
2812
  };
2944
2813
 
2945
- var uncurryThis$4 = functionUncurryThisClause;
2946
- var aCallable$5 = aCallable$8;
2814
+ var uncurryThis$8 = functionUncurryThisClause;
2815
+ var aCallable$6 = aCallable$9;
2947
2816
  var NATIVE_BIND = functionBindNative;
2948
2817
 
2949
- var bind$4 = uncurryThis$4(uncurryThis$4.bind);
2818
+ var bind$4 = uncurryThis$8(uncurryThis$8.bind);
2950
2819
 
2951
2820
  // optional / simple context binding
2952
2821
  var functionBindContext = function (fn, that) {
2953
- aCallable$5(fn);
2822
+ aCallable$6(fn);
2954
2823
  return that === undefined ? fn : NATIVE_BIND ? bind$4(fn, that) : function (/* ...args */) {
2955
2824
  return fn.apply(that, arguments);
2956
2825
  };
2957
2826
  };
2958
2827
 
2959
- var uncurryThis$3 = functionUncurryThis;
2828
+ var uncurryThis$7 = functionUncurryThis;
2960
2829
 
2961
- var arraySlice$1 = uncurryThis$3([].slice);
2830
+ var arraySlice$2 = uncurryThis$7([].slice);
2962
2831
 
2963
- var $TypeError$3 = TypeError;
2832
+ var $TypeError$5 = TypeError;
2964
2833
 
2965
2834
  var validateArgumentsLength$1 = function (passed, required) {
2966
- if (passed < required) throw new $TypeError$3('Not enough arguments');
2835
+ if (passed < required) throw new $TypeError$5('Not enough arguments');
2967
2836
  return passed;
2968
2837
  };
2969
2838
 
2970
- var userAgent$2 = engineUserAgent;
2839
+ var userAgent$4 = engineUserAgent;
2971
2840
 
2972
2841
  // eslint-disable-next-line redos/no-vulnerable -- safe
2973
- var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2);
2842
+ var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$4);
2974
2843
 
2975
- var global$7 = global$k;
2844
+ var global$b = global$o;
2976
2845
  var apply = functionApply;
2977
2846
  var bind$3 = functionBindContext;
2978
- var isCallable$4 = isCallable$l;
2979
- var hasOwn$2 = hasOwnProperty_1;
2980
- var fails$2 = fails$g;
2847
+ var isCallable$6 = isCallable$n;
2848
+ var hasOwn$3 = hasOwnProperty_1;
2849
+ var fails$9 = fails$n;
2981
2850
  var html = html$2;
2982
- var arraySlice = arraySlice$1;
2851
+ var arraySlice$1 = arraySlice$2;
2983
2852
  var createElement = documentCreateElement$2;
2984
2853
  var validateArgumentsLength = validateArgumentsLength$1;
2985
2854
  var IS_IOS$1 = engineIsIos;
2986
2855
  var IS_NODE$3 = engineIsNode;
2987
2856
 
2988
- var set = global$7.setImmediate;
2989
- var clear = global$7.clearImmediate;
2990
- var process$2 = global$7.process;
2991
- var Dispatch = global$7.Dispatch;
2992
- var Function$1 = global$7.Function;
2993
- var MessageChannel = global$7.MessageChannel;
2994
- var String$1 = global$7.String;
2857
+ var set = global$b.setImmediate;
2858
+ var clear = global$b.clearImmediate;
2859
+ var process$2 = global$b.process;
2860
+ var Dispatch = global$b.Dispatch;
2861
+ var Function$1 = global$b.Function;
2862
+ var MessageChannel = global$b.MessageChannel;
2863
+ var String$1 = global$b.String;
2995
2864
  var counter = 0;
2996
2865
  var queue$2 = {};
2997
2866
  var ONREADYSTATECHANGE = 'onreadystatechange';
2998
2867
  var $location, defer, channel, port;
2999
2868
 
3000
- fails$2(function () {
2869
+ fails$9(function () {
3001
2870
  // Deno throws a ReferenceError on `location` access without `--location` flag
3002
- $location = global$7.location;
2871
+ $location = global$b.location;
3003
2872
  });
3004
2873
 
3005
2874
  var run = function (id) {
3006
- if (hasOwn$2(queue$2, id)) {
2875
+ if (hasOwn$3(queue$2, id)) {
3007
2876
  var fn = queue$2[id];
3008
2877
  delete queue$2[id];
3009
2878
  fn();
@@ -3022,15 +2891,15 @@ var eventListener = function (event) {
3022
2891
 
3023
2892
  var globalPostMessageDefer = function (id) {
3024
2893
  // old engines have not location.origin
3025
- global$7.postMessage(String$1(id), $location.protocol + '//' + $location.host);
2894
+ global$b.postMessage(String$1(id), $location.protocol + '//' + $location.host);
3026
2895
  };
3027
2896
 
3028
2897
  // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
3029
2898
  if (!set || !clear) {
3030
2899
  set = function setImmediate(handler) {
3031
2900
  validateArgumentsLength(arguments.length, 1);
3032
- var fn = isCallable$4(handler) ? handler : Function$1(handler);
3033
- var args = arraySlice(arguments, 1);
2901
+ var fn = isCallable$6(handler) ? handler : Function$1(handler);
2902
+ var args = arraySlice$1(arguments, 1);
3034
2903
  queue$2[++counter] = function () {
3035
2904
  apply(fn, undefined, args);
3036
2905
  };
@@ -3060,14 +2929,14 @@ if (!set || !clear) {
3060
2929
  // Browsers with postMessage, skip WebWorkers
3061
2930
  // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
3062
2931
  } else if (
3063
- global$7.addEventListener &&
3064
- isCallable$4(global$7.postMessage) &&
3065
- !global$7.importScripts &&
2932
+ global$b.addEventListener &&
2933
+ isCallable$6(global$b.postMessage) &&
2934
+ !global$b.importScripts &&
3066
2935
  $location && $location.protocol !== 'file:' &&
3067
- !fails$2(globalPostMessageDefer)
2936
+ !fails$9(globalPostMessageDefer)
3068
2937
  ) {
3069
2938
  defer = globalPostMessageDefer;
3070
- global$7.addEventListener('message', eventListener, false);
2939
+ global$b.addEventListener('message', eventListener, false);
3071
2940
  // IE8-
3072
2941
  } else if (ONREADYSTATECHANGE in createElement('script')) {
3073
2942
  defer = function (id) {
@@ -3114,15 +2983,15 @@ Queue$2.prototype = {
3114
2983
 
3115
2984
  var queue$1 = Queue$2;
3116
2985
 
3117
- var userAgent$1 = engineUserAgent;
2986
+ var userAgent$3 = engineUserAgent;
3118
2987
 
3119
- var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$1) && typeof Pebble != 'undefined';
2988
+ var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$3) && typeof Pebble != 'undefined';
3120
2989
 
3121
- var userAgent = engineUserAgent;
2990
+ var userAgent$2 = engineUserAgent;
3122
2991
 
3123
- var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent);
2992
+ var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent$2);
3124
2993
 
3125
- var global$6 = global$k;
2994
+ var global$a = global$o;
3126
2995
  var bind$2 = functionBindContext;
3127
2996
  var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
3128
2997
  var macrotask = task$1.set;
@@ -3132,12 +3001,12 @@ var IS_IOS_PEBBLE = engineIsIosPebble;
3132
3001
  var IS_WEBOS_WEBKIT = engineIsWebosWebkit;
3133
3002
  var IS_NODE$2 = engineIsNode;
3134
3003
 
3135
- var MutationObserver = global$6.MutationObserver || global$6.WebKitMutationObserver;
3136
- var document$2 = global$6.document;
3137
- var process$1 = global$6.process;
3138
- var Promise$1 = global$6.Promise;
3004
+ var MutationObserver = global$a.MutationObserver || global$a.WebKitMutationObserver;
3005
+ var document$2 = global$a.document;
3006
+ var process$1 = global$a.process;
3007
+ var Promise$1 = global$a.Promise;
3139
3008
  // Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
3140
- var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global$6, 'queueMicrotask');
3009
+ var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global$a, 'queueMicrotask');
3141
3010
  var microtask$1 = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
3142
3011
  var notify$1, toggle, node, promise, then;
3143
3012
 
@@ -3189,7 +3058,7 @@ if (!microtask$1) {
3189
3058
  // - setTimeout
3190
3059
  } else {
3191
3060
  // `webpack` dev server bug on IE global methods - use bind(fn, global)
3192
- macrotask = bind$2(macrotask, global$6);
3061
+ macrotask = bind$2(macrotask, global$a);
3193
3062
  notify$1 = function () {
3194
3063
  macrotask(flush);
3195
3064
  };
@@ -3218,9 +3087,9 @@ var perform$3 = function (exec) {
3218
3087
  }
3219
3088
  };
3220
3089
 
3221
- var global$5 = global$k;
3090
+ var global$9 = global$o;
3222
3091
 
3223
- var promiseNativeConstructor = global$5.Promise;
3092
+ var promiseNativeConstructor = global$9.Promise;
3224
3093
 
3225
3094
  /* global Deno -- Deno case */
3226
3095
  var engineIsDeno = typeof Deno == 'object' && Deno && typeof Deno.version == 'object';
@@ -3232,22 +3101,22 @@ var engineIsBrowser = !IS_DENO$1 && !IS_NODE$1
3232
3101
  && typeof window == 'object'
3233
3102
  && typeof document == 'object';
3234
3103
 
3235
- var global$4 = global$k;
3104
+ var global$8 = global$o;
3236
3105
  var NativePromiseConstructor$3 = promiseNativeConstructor;
3237
- var isCallable$3 = isCallable$l;
3238
- var isForced = isForced_1;
3106
+ var isCallable$5 = isCallable$n;
3107
+ var isForced$1 = isForced_1;
3239
3108
  var inspectSource = inspectSource$3;
3240
- var wellKnownSymbol$3 = wellKnownSymbol$g;
3109
+ var wellKnownSymbol$5 = wellKnownSymbol$i;
3241
3110
  var IS_BROWSER = engineIsBrowser;
3242
3111
  var IS_DENO = engineIsDeno;
3243
3112
  var V8_VERSION = engineV8Version;
3244
3113
 
3245
3114
  NativePromiseConstructor$3 && NativePromiseConstructor$3.prototype;
3246
- var SPECIES = wellKnownSymbol$3('species');
3115
+ var SPECIES$1 = wellKnownSymbol$5('species');
3247
3116
  var SUBCLASSING = false;
3248
- var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$3(global$4.PromiseRejectionEvent);
3117
+ var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$5(global$8.PromiseRejectionEvent);
3249
3118
 
3250
- var FORCED_PROMISE_CONSTRUCTOR$5 = isForced('Promise', function () {
3119
+ var FORCED_PROMISE_CONSTRUCTOR$5 = isForced$1('Promise', function () {
3251
3120
  var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor$3);
3252
3121
  var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor$3);
3253
3122
  // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
@@ -3264,7 +3133,7 @@ var FORCED_PROMISE_CONSTRUCTOR$5 = isForced('Promise', function () {
3264
3133
  exec(function () { /* empty */ }, function () { /* empty */ });
3265
3134
  };
3266
3135
  var constructor = promise.constructor = {};
3267
- constructor[SPECIES] = FakePromise;
3136
+ constructor[SPECIES$1] = FakePromise;
3268
3137
  SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
3269
3138
  if (!SUBCLASSING) return true;
3270
3139
  // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
@@ -3279,19 +3148,19 @@ var promiseConstructorDetection = {
3279
3148
 
3280
3149
  var newPromiseCapability$2 = {};
3281
3150
 
3282
- var aCallable$4 = aCallable$8;
3151
+ var aCallable$5 = aCallable$9;
3283
3152
 
3284
- var $TypeError$2 = TypeError;
3153
+ var $TypeError$4 = TypeError;
3285
3154
 
3286
3155
  var PromiseCapability = function (C) {
3287
3156
  var resolve, reject;
3288
3157
  this.promise = new C(function ($$resolve, $$reject) {
3289
- if (resolve !== undefined || reject !== undefined) throw new $TypeError$2('Bad Promise constructor');
3158
+ if (resolve !== undefined || reject !== undefined) throw new $TypeError$4('Bad Promise constructor');
3290
3159
  resolve = $$resolve;
3291
3160
  reject = $$reject;
3292
3161
  });
3293
- this.resolve = aCallable$4(resolve);
3294
- this.reject = aCallable$4(reject);
3162
+ this.resolve = aCallable$5(resolve);
3163
+ this.reject = aCallable$5(reject);
3295
3164
  };
3296
3165
 
3297
3166
  // `NewPromiseCapability` abstract operation
@@ -3300,17 +3169,17 @@ newPromiseCapability$2.f = function (C) {
3300
3169
  return new PromiseCapability(C);
3301
3170
  };
3302
3171
 
3303
- var $$7 = _export;
3172
+ var $$9 = _export;
3304
3173
  var IS_NODE = engineIsNode;
3305
- var global$3 = global$k;
3306
- var call$7 = functionCall;
3307
- var defineBuiltIn$2 = defineBuiltIn$6;
3308
- var setPrototypeOf = objectSetPrototypeOf;
3174
+ var global$7 = global$o;
3175
+ var call$a = functionCall;
3176
+ var defineBuiltIn$4 = defineBuiltIn$8;
3177
+ var setPrototypeOf$1 = objectSetPrototypeOf;
3309
3178
  var setToStringTag = setToStringTag$3;
3310
- var setSpecies = setSpecies$1;
3311
- var aCallable$3 = aCallable$8;
3312
- var isCallable$2 = isCallable$l;
3313
- var isObject$1 = isObject$9;
3179
+ var setSpecies$1 = setSpecies$2;
3180
+ var aCallable$4 = aCallable$9;
3181
+ var isCallable$4 = isCallable$n;
3182
+ var isObject$2 = isObject$a;
3314
3183
  var anInstance = anInstance$1;
3315
3184
  var speciesConstructor = speciesConstructor$1;
3316
3185
  var task = task$1.set;
@@ -3332,13 +3201,13 @@ var setInternalState = InternalStateModule.set;
3332
3201
  var NativePromisePrototype$1 = NativePromiseConstructor$2 && NativePromiseConstructor$2.prototype;
3333
3202
  var PromiseConstructor = NativePromiseConstructor$2;
3334
3203
  var PromisePrototype = NativePromisePrototype$1;
3335
- var TypeError$1 = global$3.TypeError;
3336
- var document$1 = global$3.document;
3337
- var process = global$3.process;
3204
+ var TypeError$1 = global$7.TypeError;
3205
+ var document$1 = global$7.document;
3206
+ var process = global$7.process;
3338
3207
  var newPromiseCapability$1 = newPromiseCapabilityModule$3.f;
3339
3208
  var newGenericPromiseCapability = newPromiseCapability$1;
3340
3209
 
3341
- var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$3.dispatchEvent);
3210
+ var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$7.dispatchEvent);
3342
3211
  var UNHANDLED_REJECTION = 'unhandledrejection';
3343
3212
  var REJECTION_HANDLED = 'rejectionhandled';
3344
3213
  var PENDING = 0;
@@ -3352,7 +3221,7 @@ var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
3352
3221
  // helpers
3353
3222
  var isThenable = function (it) {
3354
3223
  var then;
3355
- return isObject$1(it) && isCallable$2(then = it.then) ? then : false;
3224
+ return isObject$2(it) && isCallable$4(then = it.then) ? then : false;
3356
3225
  };
3357
3226
 
3358
3227
  var callReaction = function (reaction, state) {
@@ -3381,7 +3250,7 @@ var callReaction = function (reaction, state) {
3381
3250
  if (result === reaction.promise) {
3382
3251
  reject(new TypeError$1('Promise-chain cycle'));
3383
3252
  } else if (then = isThenable(result)) {
3384
- call$7(then, result, resolve, reject);
3253
+ call$a(then, result, resolve, reject);
3385
3254
  } else resolve(result);
3386
3255
  } else reject(value);
3387
3256
  } catch (error) {
@@ -3411,14 +3280,14 @@ var dispatchEvent = function (name, promise, reason) {
3411
3280
  event.promise = promise;
3412
3281
  event.reason = reason;
3413
3282
  event.initEvent(name, false, true);
3414
- global$3.dispatchEvent(event);
3283
+ global$7.dispatchEvent(event);
3415
3284
  } else event = { promise: promise, reason: reason };
3416
- if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = global$3['on' + name])) handler(event);
3285
+ if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = global$7['on' + name])) handler(event);
3417
3286
  else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
3418
3287
  };
3419
3288
 
3420
3289
  var onUnhandled = function (state) {
3421
- call$7(task, global$3, function () {
3290
+ call$a(task, global$7, function () {
3422
3291
  var promise = state.facade;
3423
3292
  var value = state.value;
3424
3293
  var IS_UNHANDLED = isUnhandled(state);
@@ -3441,7 +3310,7 @@ var isUnhandled = function (state) {
3441
3310
  };
3442
3311
 
3443
3312
  var onHandleUnhandled = function (state) {
3444
- call$7(task, global$3, function () {
3313
+ call$a(task, global$7, function () {
3445
3314
  var promise = state.facade;
3446
3315
  if (IS_NODE) {
3447
3316
  process.emit('rejectionHandled', promise);
@@ -3475,7 +3344,7 @@ var internalResolve = function (state, value, unwrap) {
3475
3344
  microtask(function () {
3476
3345
  var wrapper = { done: false };
3477
3346
  try {
3478
- call$7(then, value,
3347
+ call$a(then, value,
3479
3348
  bind$1(internalResolve, wrapper, state),
3480
3349
  bind$1(internalReject, wrapper, state)
3481
3350
  );
@@ -3498,8 +3367,8 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
3498
3367
  // 25.4.3.1 Promise(executor)
3499
3368
  PromiseConstructor = function Promise(executor) {
3500
3369
  anInstance(this, PromisePrototype);
3501
- aCallable$3(executor);
3502
- call$7(Internal, this);
3370
+ aCallable$4(executor);
3371
+ call$a(Internal, this);
3503
3372
  var state = getInternalPromiseState(this);
3504
3373
  try {
3505
3374
  executor(bind$1(internalResolve, state), bind$1(internalReject, state));
@@ -3526,12 +3395,12 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
3526
3395
 
3527
3396
  // `Promise.prototype.then` method
3528
3397
  // https://tc39.es/ecma262/#sec-promise.prototype.then
3529
- Internal.prototype = defineBuiltIn$2(PromisePrototype, 'then', function then(onFulfilled, onRejected) {
3398
+ Internal.prototype = defineBuiltIn$4(PromisePrototype, 'then', function then(onFulfilled, onRejected) {
3530
3399
  var state = getInternalPromiseState(this);
3531
3400
  var reaction = newPromiseCapability$1(speciesConstructor(this, PromiseConstructor));
3532
3401
  state.parent = true;
3533
- reaction.ok = isCallable$2(onFulfilled) ? onFulfilled : true;
3534
- reaction.fail = isCallable$2(onRejected) && onRejected;
3402
+ reaction.ok = isCallable$4(onFulfilled) ? onFulfilled : true;
3403
+ reaction.fail = isCallable$4(onRejected) && onRejected;
3535
3404
  reaction.domain = IS_NODE ? process.domain : undefined;
3536
3405
  if (state.state === PENDING) state.reactions.add(reaction);
3537
3406
  else microtask(function () {
@@ -3554,15 +3423,15 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
3554
3423
  : newGenericPromiseCapability(C);
3555
3424
  };
3556
3425
 
3557
- if (isCallable$2(NativePromiseConstructor$2) && NativePromisePrototype$1 !== Object.prototype) {
3426
+ if (isCallable$4(NativePromiseConstructor$2) && NativePromisePrototype$1 !== Object.prototype) {
3558
3427
  nativeThen = NativePromisePrototype$1.then;
3559
3428
 
3560
3429
  if (!NATIVE_PROMISE_SUBCLASSING) {
3561
3430
  // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
3562
- defineBuiltIn$2(NativePromisePrototype$1, 'then', function then(onFulfilled, onRejected) {
3431
+ defineBuiltIn$4(NativePromisePrototype$1, 'then', function then(onFulfilled, onRejected) {
3563
3432
  var that = this;
3564
3433
  return new PromiseConstructor(function (resolve, reject) {
3565
- call$7(nativeThen, that, resolve, reject);
3434
+ call$a(nativeThen, that, resolve, reject);
3566
3435
  }).then(onFulfilled, onRejected);
3567
3436
  // https://github.com/zloirock/core-js/issues/640
3568
3437
  }, { unsafe: true });
@@ -3574,23 +3443,23 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
3574
3443
  } catch (error) { /* empty */ }
3575
3444
 
3576
3445
  // make `instanceof Promise` work for native promise-based APIs
3577
- if (setPrototypeOf) {
3578
- setPrototypeOf(NativePromisePrototype$1, PromisePrototype);
3446
+ if (setPrototypeOf$1) {
3447
+ setPrototypeOf$1(NativePromisePrototype$1, PromisePrototype);
3579
3448
  }
3580
3449
  }
3581
3450
  }
3582
3451
 
3583
- $$7({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR$4 }, {
3452
+ $$9({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR$4 }, {
3584
3453
  Promise: PromiseConstructor
3585
3454
  });
3586
3455
 
3587
3456
  setToStringTag(PromiseConstructor, PROMISE, false);
3588
- setSpecies(PROMISE);
3457
+ setSpecies$1(PROMISE);
3589
3458
 
3590
- var wellKnownSymbol$2 = wellKnownSymbol$g;
3459
+ var wellKnownSymbol$4 = wellKnownSymbol$i;
3591
3460
  var Iterators$1 = iterators;
3592
3461
 
3593
- var ITERATOR$3 = wellKnownSymbol$2('iterator');
3462
+ var ITERATOR$3 = wellKnownSymbol$4('iterator');
3594
3463
  var ArrayPrototype = Array.prototype;
3595
3464
 
3596
3465
  // check on default Array iterator
@@ -3598,70 +3467,70 @@ var isArrayIteratorMethod$1 = function (it) {
3598
3467
  return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$3] === it);
3599
3468
  };
3600
3469
 
3601
- var classof = classof$4;
3602
- var getMethod$1 = getMethod$3;
3603
- var isNullOrUndefined = isNullOrUndefined$4;
3470
+ var classof$1 = classof$5;
3471
+ var getMethod$2 = getMethod$4;
3472
+ var isNullOrUndefined$1 = isNullOrUndefined$5;
3604
3473
  var Iterators = iterators;
3605
- var wellKnownSymbol$1 = wellKnownSymbol$g;
3474
+ var wellKnownSymbol$3 = wellKnownSymbol$i;
3606
3475
 
3607
- var ITERATOR$2 = wellKnownSymbol$1('iterator');
3476
+ var ITERATOR$2 = wellKnownSymbol$3('iterator');
3608
3477
 
3609
3478
  var getIteratorMethod$2 = function (it) {
3610
- if (!isNullOrUndefined(it)) return getMethod$1(it, ITERATOR$2)
3611
- || getMethod$1(it, '@@iterator')
3612
- || Iterators[classof(it)];
3479
+ if (!isNullOrUndefined$1(it)) return getMethod$2(it, ITERATOR$2)
3480
+ || getMethod$2(it, '@@iterator')
3481
+ || Iterators[classof$1(it)];
3613
3482
  };
3614
3483
 
3615
- var call$6 = functionCall;
3616
- var aCallable$2 = aCallable$8;
3617
- var anObject$5 = anObject$c;
3618
- var tryToString$1 = tryToString$4;
3484
+ var call$9 = functionCall;
3485
+ var aCallable$3 = aCallable$9;
3486
+ var anObject$7 = anObject$e;
3487
+ var tryToString$2 = tryToString$5;
3619
3488
  var getIteratorMethod$1 = getIteratorMethod$2;
3620
3489
 
3621
- var $TypeError$1 = TypeError;
3490
+ var $TypeError$3 = TypeError;
3622
3491
 
3623
3492
  var getIterator$1 = function (argument, usingIterator) {
3624
3493
  var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
3625
- if (aCallable$2(iteratorMethod)) return anObject$5(call$6(iteratorMethod, argument));
3626
- throw new $TypeError$1(tryToString$1(argument) + ' is not iterable');
3494
+ if (aCallable$3(iteratorMethod)) return anObject$7(call$9(iteratorMethod, argument));
3495
+ throw new $TypeError$3(tryToString$2(argument) + ' is not iterable');
3627
3496
  };
3628
3497
 
3629
- var call$5 = functionCall;
3630
- var anObject$4 = anObject$c;
3631
- var getMethod = getMethod$3;
3498
+ var call$8 = functionCall;
3499
+ var anObject$6 = anObject$e;
3500
+ var getMethod$1 = getMethod$4;
3632
3501
 
3633
3502
  var iteratorClose$1 = function (iterator, kind, value) {
3634
3503
  var innerResult, innerError;
3635
- anObject$4(iterator);
3504
+ anObject$6(iterator);
3636
3505
  try {
3637
- innerResult = getMethod(iterator, 'return');
3506
+ innerResult = getMethod$1(iterator, 'return');
3638
3507
  if (!innerResult) {
3639
3508
  if (kind === 'throw') throw value;
3640
3509
  return value;
3641
3510
  }
3642
- innerResult = call$5(innerResult, iterator);
3511
+ innerResult = call$8(innerResult, iterator);
3643
3512
  } catch (error) {
3644
3513
  innerError = true;
3645
3514
  innerResult = error;
3646
3515
  }
3647
3516
  if (kind === 'throw') throw value;
3648
3517
  if (innerError) throw innerResult;
3649
- anObject$4(innerResult);
3518
+ anObject$6(innerResult);
3650
3519
  return value;
3651
3520
  };
3652
3521
 
3653
3522
  var bind = functionBindContext;
3654
- var call$4 = functionCall;
3655
- var anObject$3 = anObject$c;
3656
- var tryToString = tryToString$4;
3523
+ var call$7 = functionCall;
3524
+ var anObject$5 = anObject$e;
3525
+ var tryToString$1 = tryToString$5;
3657
3526
  var isArrayIteratorMethod = isArrayIteratorMethod$1;
3658
- var lengthOfArrayLike = lengthOfArrayLike$2;
3659
- var isPrototypeOf$2 = objectIsPrototypeOf;
3527
+ var lengthOfArrayLike$2 = lengthOfArrayLike$4;
3528
+ var isPrototypeOf$3 = objectIsPrototypeOf;
3660
3529
  var getIterator = getIterator$1;
3661
3530
  var getIteratorMethod = getIteratorMethod$2;
3662
3531
  var iteratorClose = iteratorClose$1;
3663
3532
 
3664
- var $TypeError = TypeError;
3533
+ var $TypeError$2 = TypeError;
3665
3534
 
3666
3535
  var Result = function (stopped, result) {
3667
3536
  this.stopped = stopped;
@@ -3686,7 +3555,7 @@ var iterate$2 = function (iterable, unboundFunction, options) {
3686
3555
 
3687
3556
  var callFn = function (value) {
3688
3557
  if (AS_ENTRIES) {
3689
- anObject$3(value);
3558
+ anObject$5(value);
3690
3559
  return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
3691
3560
  } return INTERRUPTED ? fn(value, stop) : fn(value);
3692
3561
  };
@@ -3697,31 +3566,31 @@ var iterate$2 = function (iterable, unboundFunction, options) {
3697
3566
  iterator = iterable;
3698
3567
  } else {
3699
3568
  iterFn = getIteratorMethod(iterable);
3700
- if (!iterFn) throw new $TypeError(tryToString(iterable) + ' is not iterable');
3569
+ if (!iterFn) throw new $TypeError$2(tryToString$1(iterable) + ' is not iterable');
3701
3570
  // optimisation for array iterators
3702
3571
  if (isArrayIteratorMethod(iterFn)) {
3703
- for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
3572
+ for (index = 0, length = lengthOfArrayLike$2(iterable); length > index; index++) {
3704
3573
  result = callFn(iterable[index]);
3705
- if (result && isPrototypeOf$2(ResultPrototype, result)) return result;
3574
+ if (result && isPrototypeOf$3(ResultPrototype, result)) return result;
3706
3575
  } return new Result(false);
3707
3576
  }
3708
3577
  iterator = getIterator(iterable, iterFn);
3709
3578
  }
3710
3579
 
3711
3580
  next = IS_RECORD ? iterable.next : iterator.next;
3712
- while (!(step = call$4(next, iterator)).done) {
3581
+ while (!(step = call$7(next, iterator)).done) {
3713
3582
  try {
3714
3583
  result = callFn(step.value);
3715
3584
  } catch (error) {
3716
3585
  iteratorClose(iterator, 'throw', error);
3717
3586
  }
3718
- if (typeof result == 'object' && result && isPrototypeOf$2(ResultPrototype, result)) return result;
3587
+ if (typeof result == 'object' && result && isPrototypeOf$3(ResultPrototype, result)) return result;
3719
3588
  } return new Result(false);
3720
3589
  };
3721
3590
 
3722
- var wellKnownSymbol = wellKnownSymbol$g;
3591
+ var wellKnownSymbol$2 = wellKnownSymbol$i;
3723
3592
 
3724
- var ITERATOR$1 = wellKnownSymbol('iterator');
3593
+ var ITERATOR$1 = wellKnownSymbol$2('iterator');
3725
3594
  var SAFE_CLOSING = false;
3726
3595
 
3727
3596
  try {
@@ -3768,9 +3637,9 @@ var promiseStaticsIncorrectIteration = FORCED_PROMISE_CONSTRUCTOR$3 || !checkCor
3768
3637
  NativePromiseConstructor$1.all(iterable).then(undefined, function () { /* empty */ });
3769
3638
  });
3770
3639
 
3771
- var $$6 = _export;
3772
- var call$3 = functionCall;
3773
- var aCallable$1 = aCallable$8;
3640
+ var $$8 = _export;
3641
+ var call$6 = functionCall;
3642
+ var aCallable$2 = aCallable$9;
3774
3643
  var newPromiseCapabilityModule$2 = newPromiseCapability$2;
3775
3644
  var perform$1 = perform$3;
3776
3645
  var iterate$1 = iterate$2;
@@ -3778,14 +3647,14 @@ var PROMISE_STATICS_INCORRECT_ITERATION$1 = promiseStaticsIncorrectIteration;
3778
3647
 
3779
3648
  // `Promise.all` method
3780
3649
  // https://tc39.es/ecma262/#sec-promise.all
3781
- $$6({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION$1 }, {
3650
+ $$8({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION$1 }, {
3782
3651
  all: function all(iterable) {
3783
3652
  var C = this;
3784
3653
  var capability = newPromiseCapabilityModule$2.f(C);
3785
3654
  var resolve = capability.resolve;
3786
3655
  var reject = capability.reject;
3787
3656
  var result = perform$1(function () {
3788
- var $promiseResolve = aCallable$1(C.resolve);
3657
+ var $promiseResolve = aCallable$2(C.resolve);
3789
3658
  var values = [];
3790
3659
  var counter = 0;
3791
3660
  var remaining = 1;
@@ -3793,7 +3662,7 @@ $$6({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION
3793
3662
  var index = counter++;
3794
3663
  var alreadyCalled = false;
3795
3664
  remaining++;
3796
- call$3($promiseResolve, C, promise).then(function (value) {
3665
+ call$6($promiseResolve, C, promise).then(function (value) {
3797
3666
  if (alreadyCalled) return;
3798
3667
  alreadyCalled = true;
3799
3668
  values[index] = value;
@@ -3807,34 +3676,34 @@ $$6({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION
3807
3676
  }
3808
3677
  });
3809
3678
 
3810
- var $$5 = _export;
3679
+ var $$7 = _export;
3811
3680
  var FORCED_PROMISE_CONSTRUCTOR$2 = promiseConstructorDetection.CONSTRUCTOR;
3812
3681
  var NativePromiseConstructor = promiseNativeConstructor;
3813
3682
  var getBuiltIn$1 = getBuiltIn$7;
3814
- var isCallable$1 = isCallable$l;
3815
- var defineBuiltIn$1 = defineBuiltIn$6;
3683
+ var isCallable$3 = isCallable$n;
3684
+ var defineBuiltIn$3 = defineBuiltIn$8;
3816
3685
 
3817
3686
  var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
3818
3687
 
3819
3688
  // `Promise.prototype.catch` method
3820
3689
  // https://tc39.es/ecma262/#sec-promise.prototype.catch
3821
- $$5({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$2, real: true }, {
3690
+ $$7({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$2, real: true }, {
3822
3691
  'catch': function (onRejected) {
3823
3692
  return this.then(undefined, onRejected);
3824
3693
  }
3825
3694
  });
3826
3695
 
3827
3696
  // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
3828
- if (isCallable$1(NativePromiseConstructor)) {
3697
+ if (isCallable$3(NativePromiseConstructor)) {
3829
3698
  var method = getBuiltIn$1('Promise').prototype['catch'];
3830
3699
  if (NativePromisePrototype['catch'] !== method) {
3831
- defineBuiltIn$1(NativePromisePrototype, 'catch', method, { unsafe: true });
3700
+ defineBuiltIn$3(NativePromisePrototype, 'catch', method, { unsafe: true });
3832
3701
  }
3833
3702
  }
3834
3703
 
3835
- var $$4 = _export;
3836
- var call$2 = functionCall;
3837
- var aCallable = aCallable$8;
3704
+ var $$6 = _export;
3705
+ var call$5 = functionCall;
3706
+ var aCallable$1 = aCallable$9;
3838
3707
  var newPromiseCapabilityModule$1 = newPromiseCapability$2;
3839
3708
  var perform = perform$3;
3840
3709
  var iterate = iterate$2;
@@ -3842,15 +3711,15 @@ var PROMISE_STATICS_INCORRECT_ITERATION = promiseStaticsIncorrectIteration;
3842
3711
 
3843
3712
  // `Promise.race` method
3844
3713
  // https://tc39.es/ecma262/#sec-promise.race
3845
- $$4({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
3714
+ $$6({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
3846
3715
  race: function race(iterable) {
3847
3716
  var C = this;
3848
3717
  var capability = newPromiseCapabilityModule$1.f(C);
3849
3718
  var reject = capability.reject;
3850
3719
  var result = perform(function () {
3851
- var $promiseResolve = aCallable(C.resolve);
3720
+ var $promiseResolve = aCallable$1(C.resolve);
3852
3721
  iterate(iterable, function (promise) {
3853
- call$2($promiseResolve, C, promise).then(capability.resolve, reject);
3722
+ call$5($promiseResolve, C, promise).then(capability.resolve, reject);
3854
3723
  });
3855
3724
  });
3856
3725
  if (result.error) reject(result.value);
@@ -3858,35 +3727,35 @@ $$4({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION
3858
3727
  }
3859
3728
  });
3860
3729
 
3861
- var $$3 = _export;
3862
- var call$1 = functionCall;
3730
+ var $$5 = _export;
3731
+ var call$4 = functionCall;
3863
3732
  var newPromiseCapabilityModule = newPromiseCapability$2;
3864
3733
  var FORCED_PROMISE_CONSTRUCTOR$1 = promiseConstructorDetection.CONSTRUCTOR;
3865
3734
 
3866
3735
  // `Promise.reject` method
3867
3736
  // https://tc39.es/ecma262/#sec-promise.reject
3868
- $$3({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
3737
+ $$5({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
3869
3738
  reject: function reject(r) {
3870
3739
  var capability = newPromiseCapabilityModule.f(this);
3871
- call$1(capability.reject, undefined, r);
3740
+ call$4(capability.reject, undefined, r);
3872
3741
  return capability.promise;
3873
3742
  }
3874
3743
  });
3875
3744
 
3876
- var anObject$2 = anObject$c;
3877
- var isObject = isObject$9;
3745
+ var anObject$4 = anObject$e;
3746
+ var isObject$1 = isObject$a;
3878
3747
  var newPromiseCapability = newPromiseCapability$2;
3879
3748
 
3880
3749
  var promiseResolve$1 = function (C, x) {
3881
- anObject$2(C);
3882
- if (isObject(x) && x.constructor === C) return x;
3750
+ anObject$4(C);
3751
+ if (isObject$1(x) && x.constructor === C) return x;
3883
3752
  var promiseCapability = newPromiseCapability.f(C);
3884
3753
  var resolve = promiseCapability.resolve;
3885
3754
  resolve(x);
3886
3755
  return promiseCapability.promise;
3887
3756
  };
3888
3757
 
3889
- var $$2 = _export;
3758
+ var $$4 = _export;
3890
3759
  var getBuiltIn = getBuiltIn$7;
3891
3760
  var FORCED_PROMISE_CONSTRUCTOR = promiseConstructorDetection.CONSTRUCTOR;
3892
3761
  var promiseResolve = promiseResolve$1;
@@ -3895,7 +3764,7 @@ getBuiltIn('Promise');
3895
3764
 
3896
3765
  // `Promise.resolve` method
3897
3766
  // https://tc39.es/ecma262/#sec-promise.resolve
3898
- $$2({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
3767
+ $$4({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
3899
3768
  resolve: function resolve(x) {
3900
3769
  return promiseResolve(this, x);
3901
3770
  }
@@ -4150,29 +4019,29 @@ const Text = ({
4150
4019
  children: children
4151
4020
  }));
4152
4021
 
4153
- var $$1 = _export;
4154
- var DESCRIPTORS = descriptors;
4155
- var global$2 = global$k;
4156
- var uncurryThis$2 = functionUncurryThis;
4157
- var hasOwn$1 = hasOwnProperty_1;
4158
- var isCallable = isCallable$l;
4159
- var isPrototypeOf$1 = objectIsPrototypeOf;
4160
- var toString$2 = toString$4;
4022
+ var $$3 = _export;
4023
+ var DESCRIPTORS$1 = descriptors;
4024
+ var global$6 = global$o;
4025
+ var uncurryThis$6 = functionUncurryThis;
4026
+ var hasOwn$2 = hasOwnProperty_1;
4027
+ var isCallable$2 = isCallable$n;
4028
+ var isPrototypeOf$2 = objectIsPrototypeOf;
4029
+ var toString$6 = toString$8;
4161
4030
  var defineBuiltInAccessor = defineBuiltInAccessor$2;
4162
4031
  var copyConstructorProperties = copyConstructorProperties$2;
4163
4032
 
4164
- var NativeSymbol = global$2.Symbol;
4033
+ var NativeSymbol = global$6.Symbol;
4165
4034
  var SymbolPrototype = NativeSymbol && NativeSymbol.prototype;
4166
4035
 
4167
- if (DESCRIPTORS && isCallable(NativeSymbol) && (!('description' in SymbolPrototype) ||
4036
+ if (DESCRIPTORS$1 && isCallable$2(NativeSymbol) && (!('description' in SymbolPrototype) ||
4168
4037
  // Safari 12 bug
4169
4038
  NativeSymbol().description !== undefined
4170
4039
  )) {
4171
4040
  var EmptyStringDescriptionStore = {};
4172
4041
  // wrap Symbol constructor for correct work with undefined description
4173
4042
  var SymbolWrapper = function Symbol() {
4174
- var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString$2(arguments[0]);
4175
- var result = isPrototypeOf$1(SymbolPrototype, this)
4043
+ var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString$6(arguments[0]);
4044
+ var result = isPrototypeOf$2(SymbolPrototype, this)
4176
4045
  ? new NativeSymbol(description)
4177
4046
  // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
4178
4047
  : description === undefined ? NativeSymbol() : NativeSymbol(description);
@@ -4185,24 +4054,24 @@ if (DESCRIPTORS && isCallable(NativeSymbol) && (!('description' in SymbolPrototy
4185
4054
  SymbolPrototype.constructor = SymbolWrapper;
4186
4055
 
4187
4056
  var NATIVE_SYMBOL = String(NativeSymbol('description detection')) === 'Symbol(description detection)';
4188
- var thisSymbolValue = uncurryThis$2(SymbolPrototype.valueOf);
4189
- var symbolDescriptiveString = uncurryThis$2(SymbolPrototype.toString);
4057
+ var thisSymbolValue = uncurryThis$6(SymbolPrototype.valueOf);
4058
+ var symbolDescriptiveString = uncurryThis$6(SymbolPrototype.toString);
4190
4059
  var regexp = /^Symbol\((.*)\)[^)]+$/;
4191
- var replace$1 = uncurryThis$2(''.replace);
4192
- var stringSlice = uncurryThis$2(''.slice);
4060
+ var replace$3 = uncurryThis$6(''.replace);
4061
+ var stringSlice$2 = uncurryThis$6(''.slice);
4193
4062
 
4194
4063
  defineBuiltInAccessor(SymbolPrototype, 'description', {
4195
4064
  configurable: true,
4196
4065
  get: function description() {
4197
4066
  var symbol = thisSymbolValue(this);
4198
- if (hasOwn$1(EmptyStringDescriptionStore, symbol)) return '';
4067
+ if (hasOwn$2(EmptyStringDescriptionStore, symbol)) return '';
4199
4068
  var string = symbolDescriptiveString(symbol);
4200
- var desc = NATIVE_SYMBOL ? stringSlice(string, 7, -1) : replace$1(string, regexp, '$1');
4069
+ var desc = NATIVE_SYMBOL ? stringSlice$2(string, 7, -1) : replace$3(string, regexp, '$1');
4201
4070
  return desc === '' ? undefined : desc;
4202
4071
  }
4203
4072
  });
4204
4073
 
4205
- $$1({ global: true, constructor: true, forced: true }, {
4074
+ $$3({ global: true, constructor: true, forced: true }, {
4206
4075
  Symbol: SymbolWrapper
4207
4076
  });
4208
4077
  }
@@ -4721,12 +4590,12 @@ const OptionGroup = ({
4721
4590
  }));
4722
4591
  };
4723
4592
 
4724
- var anObject$1 = anObject$c;
4593
+ var anObject$3 = anObject$e;
4725
4594
 
4726
4595
  // `RegExp.prototype.flags` getter implementation
4727
4596
  // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
4728
- var regexpFlags = function () {
4729
- var that = anObject$1(this);
4597
+ var regexpFlags$1 = function () {
4598
+ var that = anObject$3(this);
4730
4599
  var result = '';
4731
4600
  if (that.hasIndices) result += 'd';
4732
4601
  if (that.global) result += 'g';
@@ -4739,41 +4608,41 @@ var regexpFlags = function () {
4739
4608
  return result;
4740
4609
  };
4741
4610
 
4742
- var call = functionCall;
4743
- var hasOwn = hasOwnProperty_1;
4744
- var isPrototypeOf = objectIsPrototypeOf;
4745
- var regExpFlags = regexpFlags;
4611
+ var call$3 = functionCall;
4612
+ var hasOwn$1 = hasOwnProperty_1;
4613
+ var isPrototypeOf$1 = objectIsPrototypeOf;
4614
+ var regExpFlags = regexpFlags$1;
4746
4615
 
4747
- var RegExpPrototype$1 = RegExp.prototype;
4616
+ var RegExpPrototype$3 = RegExp.prototype;
4748
4617
 
4749
4618
  var regexpGetFlags = function (R) {
4750
4619
  var flags = R.flags;
4751
- return flags === undefined && !('flags' in RegExpPrototype$1) && !hasOwn(R, 'flags') && isPrototypeOf(RegExpPrototype$1, R)
4752
- ? call(regExpFlags, R) : flags;
4620
+ return flags === undefined && !('flags' in RegExpPrototype$3) && !hasOwn$1(R, 'flags') && isPrototypeOf$1(RegExpPrototype$3, R)
4621
+ ? call$3(regExpFlags, R) : flags;
4753
4622
  };
4754
4623
 
4755
4624
  var PROPER_FUNCTION_NAME = functionName.PROPER;
4756
- var defineBuiltIn = defineBuiltIn$6;
4757
- var anObject = anObject$c;
4758
- var $toString = toString$4;
4759
- var fails$1 = fails$g;
4760
- var getRegExpFlags = regexpGetFlags;
4625
+ var defineBuiltIn$2 = defineBuiltIn$8;
4626
+ var anObject$2 = anObject$e;
4627
+ var $toString = toString$8;
4628
+ var fails$8 = fails$n;
4629
+ var getRegExpFlags$1 = regexpGetFlags;
4761
4630
 
4762
4631
  var TO_STRING = 'toString';
4763
- var RegExpPrototype = RegExp.prototype;
4764
- var nativeToString = RegExpPrototype[TO_STRING];
4632
+ var RegExpPrototype$2 = RegExp.prototype;
4633
+ var nativeToString = RegExpPrototype$2[TO_STRING];
4765
4634
 
4766
- var NOT_GENERIC = fails$1(function () { return nativeToString.call({ source: 'a', flags: 'b' }) !== '/a/b'; });
4635
+ var NOT_GENERIC = fails$8(function () { return nativeToString.call({ source: 'a', flags: 'b' }) !== '/a/b'; });
4767
4636
  // FF44- RegExp#toString has a wrong name
4768
4637
  var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name !== TO_STRING;
4769
4638
 
4770
4639
  // `RegExp.prototype.toString` method
4771
4640
  // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
4772
4641
  if (NOT_GENERIC || INCORRECT_NAME) {
4773
- defineBuiltIn(RegExp.prototype, TO_STRING, function toString() {
4774
- var R = anObject(this);
4642
+ defineBuiltIn$2(RegExp.prototype, TO_STRING, function toString() {
4643
+ var R = anObject$2(this);
4775
4644
  var pattern = $toString(R.source);
4776
- var flags = $toString(getRegExpFlags(R));
4645
+ var flags = $toString(getRegExpFlags$1(R));
4777
4646
  return '/' + pattern + '/' + flags;
4778
4647
  }, { unsafe: true });
4779
4648
  }
@@ -4924,73 +4793,53 @@ function Slider({
4924
4793
  }
4925
4794
 
4926
4795
  // TODO: Should be named "Numeric input" instead of stepper?
4927
- function Stepper({
4928
- id,
4929
- label,
4930
- description,
4931
- statusMessage,
4932
- validator,
4933
- value = 0,
4934
- onChange = () => undefined,
4935
- min = Number.MIN_SAFE_INTEGER,
4936
- max = Number.MAX_SAFE_INTEGER,
4937
- step = 1
4938
- }) {
4939
- const [localValue, setLocalValue] = useState(value);
4940
- const clamp = v => Math.max(min, Math.min(v, max));
4941
- const onChangeEvent = useCallback(e => {
4942
- if (isNaN(e.target.valueAsNumber)) return;
4943
- const value = clamp(e.target.valueAsNumber);
4944
- setLocalValue(value);
4945
- onChange(value);
4946
- }, [onChange]);
4947
- useEffect(() => {
4948
- setLocalValue(value);
4949
- }, [value]);
4950
- const down = () => {
4951
- if (localValue > min) {
4952
- const newValue = clamp(localValue - step);
4953
- setLocalValue(newValue);
4954
- onChange(newValue);
4955
- }
4956
- };
4957
- const up = () => {
4958
- if (localValue < max) {
4959
- const newValue = clamp(localValue + step);
4960
- setLocalValue(newValue);
4961
- onChange(newValue);
4962
- }
4963
- };
4964
- const handleKeyDown = e => {
4965
- if (e.key === 'ArrowUp') {
4966
- e.preventDefault();
4967
- up();
4968
- } else if (e.key === 'ArrowDown') {
4796
+ function Stepper(_a) {
4797
+ var {
4798
+ id,
4799
+ label,
4800
+ description,
4801
+ statusMessage,
4802
+ validator,
4803
+ value = 0,
4804
+ onChange = () => undefined,
4805
+ onIncrease = () => undefined,
4806
+ onDecrease = () => undefined,
4807
+ testId
4808
+ } = _a,
4809
+ props = __rest(_a, ["id", "label", "description", "statusMessage", "validator", "value", "onChange", "onIncrease", "onDecrease", "testId"]);
4810
+ const handleKeyDown = e => {
4811
+ if (e.key === 'ArrowUp') {
4812
+ e.preventDefault();
4813
+ onIncrease();
4814
+ } else if (e.key === 'ArrowDown') {
4969
4815
  e.preventDefault();
4970
- down();
4816
+ onDecrease();
4971
4817
  }
4972
4818
  };
4973
4819
  const PrimitiveStepper = jsxs("div", Object.assign({
4820
+ "data-testid": testId,
4974
4821
  className: `group group-border group-stepper ${validator && validateClassName(validator === null || validator === void 0 ? void 0 : validator.indicator)}`
4975
4822
  }, {
4976
4823
  children: [jsx("button", Object.assign({
4977
4824
  type: "button",
4978
- onClick: down
4825
+ onClick: onDecrease
4979
4826
  }, {
4980
4827
  children: "-"
4981
- })), jsx("input", {
4828
+ })), jsx("input", Object.assign({
4982
4829
  id: id,
4983
- type: "number",
4984
- onChange: onChangeEvent,
4830
+ type: "text",
4831
+ inputMode: "numeric",
4832
+ pattern: "[0-9]*",
4833
+ onChange: onChange,
4985
4834
  onFocus: ({
4986
4835
  target
4987
4836
  }) => target.select(),
4988
4837
  onKeyDown: handleKeyDown,
4989
4838
  placeholder: "0",
4990
- value: localValue
4991
- }), jsx("button", Object.assign({
4839
+ value: value
4840
+ }, props)), jsx("button", Object.assign({
4992
4841
  type: "button",
4993
- onClick: up
4842
+ onClick: onIncrease
4994
4843
  }, {
4995
4844
  children: "+"
4996
4845
  }))]
@@ -5023,21 +4872,21 @@ function Stepper({
5023
4872
  var whitespaces$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
5024
4873
  '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
5025
4874
 
5026
- var uncurryThis$1 = functionUncurryThis;
5027
- var requireObjectCoercible = requireObjectCoercible$4;
5028
- var toString$1 = toString$4;
4875
+ var uncurryThis$5 = functionUncurryThis;
4876
+ var requireObjectCoercible$1 = requireObjectCoercible$5;
4877
+ var toString$5 = toString$8;
5029
4878
  var whitespaces$1 = whitespaces$2;
5030
4879
 
5031
- var replace = uncurryThis$1(''.replace);
4880
+ var replace$2 = uncurryThis$5(''.replace);
5032
4881
  var ltrim = RegExp('^[' + whitespaces$1 + ']+');
5033
4882
  var rtrim = RegExp('(^|[^' + whitespaces$1 + '])[' + whitespaces$1 + ']+$');
5034
4883
 
5035
4884
  // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
5036
4885
  var createMethod = function (TYPE) {
5037
4886
  return function ($this) {
5038
- var string = toString$1(requireObjectCoercible($this));
5039
- if (TYPE & 1) string = replace(string, ltrim, '');
5040
- if (TYPE & 2) string = replace(string, rtrim, '$1');
4887
+ var string = toString$5(requireObjectCoercible$1($this));
4888
+ if (TYPE & 1) string = replace$2(string, ltrim, '');
4889
+ if (TYPE & 2) string = replace$2(string, rtrim, '$1');
5041
4890
  return string;
5042
4891
  };
5043
4892
  };
@@ -5054,35 +4903,35 @@ var stringTrim = {
5054
4903
  trim: createMethod(3)
5055
4904
  };
5056
4905
 
5057
- var global$1 = global$k;
5058
- var fails = fails$g;
5059
- var uncurryThis = functionUncurryThis;
5060
- var toString = toString$4;
4906
+ var global$5 = global$o;
4907
+ var fails$7 = fails$n;
4908
+ var uncurryThis$4 = functionUncurryThis;
4909
+ var toString$4 = toString$8;
5061
4910
  var trim = stringTrim.trim;
5062
4911
  var whitespaces = whitespaces$2;
5063
4912
 
5064
- var $parseInt$1 = global$1.parseInt;
5065
- var Symbol$1 = global$1.Symbol;
4913
+ var $parseInt$1 = global$5.parseInt;
4914
+ var Symbol$1 = global$5.Symbol;
5066
4915
  var ITERATOR = Symbol$1 && Symbol$1.iterator;
5067
4916
  var hex = /^[+-]?0x/i;
5068
- var exec = uncurryThis(hex.exec);
5069
- var FORCED = $parseInt$1(whitespaces + '08') !== 8 || $parseInt$1(whitespaces + '0x16') !== 22
4917
+ var exec$2 = uncurryThis$4(hex.exec);
4918
+ var FORCED$1 = $parseInt$1(whitespaces + '08') !== 8 || $parseInt$1(whitespaces + '0x16') !== 22
5070
4919
  // MS Edge 18- broken with boxed symbols
5071
- || (ITERATOR && !fails(function () { $parseInt$1(Object(ITERATOR)); }));
4920
+ || (ITERATOR && !fails$7(function () { $parseInt$1(Object(ITERATOR)); }));
5072
4921
 
5073
4922
  // `parseInt` method
5074
4923
  // https://tc39.es/ecma262/#sec-parseint-string-radix
5075
- var numberParseInt = FORCED ? function parseInt(string, radix) {
5076
- var S = trim(toString(string));
5077
- return $parseInt$1(S, (radix >>> 0) || (exec(hex, S) ? 16 : 10));
4924
+ var numberParseInt = FORCED$1 ? function parseInt(string, radix) {
4925
+ var S = trim(toString$4(string));
4926
+ return $parseInt$1(S, (radix >>> 0) || (exec$2(hex, S) ? 16 : 10));
5078
4927
  } : $parseInt$1;
5079
4928
 
5080
- var $ = _export;
4929
+ var $$2 = _export;
5081
4930
  var $parseInt = numberParseInt;
5082
4931
 
5083
4932
  // `parseInt` method
5084
4933
  // https://tc39.es/ecma262/#sec-parseint-string-radix
5085
- $({ global: true, forced: parseInt !== $parseInt }, {
4934
+ $$2({ global: true, forced: parseInt !== $parseInt }, {
5086
4935
  parseInt: $parseInt
5087
4936
  });
5088
4937
 
@@ -5308,4 +5157,1224 @@ const MenuItem = createComponent({
5308
5157
  react: React
5309
5158
  });
5310
5159
 
5311
- export { Accordion, AlertRibbon as Alert, AlertRibbon, Badge, Button, ButtonGroup, Card, Checkbox, ContextMenu, CoreDropdown, CoreOption, Datepicker, Dropdown, EmailInput, Flexbox, Form, FormItem, FormItems, Group, InPageWizardStepCard, Input, Link, List$1 as List, MenuItem, Modal, Navbar, NumberInput, Option, OptionGroup, RadioButton, RadioGroup, Select, Slider, Stepper, Tab, Tabs, Text, TextArea, TextInput, valueList$1 as ValueList };
5160
+ var SortDirection;
5161
+ (function (SortDirection) {
5162
+ SortDirection["ASC"] = "ASC";
5163
+ SortDirection["DESC"] = "DESC";
5164
+ })(SortDirection || (SortDirection = {}));
5165
+
5166
+ const defaultContext = {
5167
+ tableState: {
5168
+ sortedColumn: null,
5169
+ expandedRows: []
5170
+ },
5171
+ setTableState: null,
5172
+ onRowSelect: null,
5173
+ onRowExpand: null,
5174
+ onSort: null
5175
+ };
5176
+ const TableContext = /*#__PURE__*/React.createContext(defaultContext);
5177
+ const useTableContext = () => {
5178
+ return React.useContext(TableContext);
5179
+ };
5180
+
5181
+ var tryToString = tryToString$5;
5182
+
5183
+ var $TypeError$1 = TypeError;
5184
+
5185
+ var deletePropertyOrThrow$1 = function (O, P) {
5186
+ if (!delete O[P]) throw new $TypeError$1('Cannot delete property ' + tryToString(P) + ' of ' + tryToString(O));
5187
+ };
5188
+
5189
+ var toPropertyKey = toPropertyKey$3;
5190
+ var definePropertyModule = objectDefineProperty;
5191
+ var createPropertyDescriptor = createPropertyDescriptor$4;
5192
+
5193
+ var createProperty$1 = function (object, key, value) {
5194
+ var propertyKey = toPropertyKey(key);
5195
+ if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
5196
+ else object[propertyKey] = value;
5197
+ };
5198
+
5199
+ var toAbsoluteIndex = toAbsoluteIndex$2;
5200
+ var lengthOfArrayLike$1 = lengthOfArrayLike$4;
5201
+ var createProperty = createProperty$1;
5202
+
5203
+ var $Array = Array;
5204
+ var max = Math.max;
5205
+
5206
+ var arraySliceSimple = function (O, start, end) {
5207
+ var length = lengthOfArrayLike$1(O);
5208
+ var k = toAbsoluteIndex(start, length);
5209
+ var fin = toAbsoluteIndex(end === undefined ? length : end, length);
5210
+ var result = $Array(max(fin - k, 0));
5211
+ var n = 0;
5212
+ for (; k < fin; k++, n++) createProperty(result, n, O[k]);
5213
+ result.length = n;
5214
+ return result;
5215
+ };
5216
+
5217
+ var arraySlice = arraySliceSimple;
5218
+
5219
+ var floor = Math.floor;
5220
+
5221
+ var mergeSort = function (array, comparefn) {
5222
+ var length = array.length;
5223
+ var middle = floor(length / 2);
5224
+ return length < 8 ? insertionSort(array, comparefn) : merge(
5225
+ array,
5226
+ mergeSort(arraySlice(array, 0, middle), comparefn),
5227
+ mergeSort(arraySlice(array, middle), comparefn),
5228
+ comparefn
5229
+ );
5230
+ };
5231
+
5232
+ var insertionSort = function (array, comparefn) {
5233
+ var length = array.length;
5234
+ var i = 1;
5235
+ var element, j;
5236
+
5237
+ while (i < length) {
5238
+ j = i;
5239
+ element = array[i];
5240
+ while (j && comparefn(array[j - 1], element) > 0) {
5241
+ array[j] = array[--j];
5242
+ }
5243
+ if (j !== i++) array[j] = element;
5244
+ } return array;
5245
+ };
5246
+
5247
+ var merge = function (array, left, right, comparefn) {
5248
+ var llength = left.length;
5249
+ var rlength = right.length;
5250
+ var lindex = 0;
5251
+ var rindex = 0;
5252
+
5253
+ while (lindex < llength || rindex < rlength) {
5254
+ array[lindex + rindex] = (lindex < llength && rindex < rlength)
5255
+ ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]
5256
+ : lindex < llength ? left[lindex++] : right[rindex++];
5257
+ } return array;
5258
+ };
5259
+
5260
+ var arraySort = mergeSort;
5261
+
5262
+ var fails$6 = fails$n;
5263
+
5264
+ var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) {
5265
+ var method = [][METHOD_NAME];
5266
+ return !!method && fails$6(function () {
5267
+ // eslint-disable-next-line no-useless-call -- required for testing
5268
+ method.call(null, argument || function () { return 1; }, 1);
5269
+ });
5270
+ };
5271
+
5272
+ var userAgent$1 = engineUserAgent;
5273
+
5274
+ var firefox = userAgent$1.match(/firefox\/(\d+)/i);
5275
+
5276
+ var engineFfVersion = !!firefox && +firefox[1];
5277
+
5278
+ var UA = engineUserAgent;
5279
+
5280
+ var engineIsIeOrEdge = /MSIE|Trident/.test(UA);
5281
+
5282
+ var userAgent = engineUserAgent;
5283
+
5284
+ var webkit = userAgent.match(/AppleWebKit\/(\d+)\./);
5285
+
5286
+ var engineWebkitVersion = !!webkit && +webkit[1];
5287
+
5288
+ var $$1 = _export;
5289
+ var uncurryThis$3 = functionUncurryThis;
5290
+ var aCallable = aCallable$9;
5291
+ var toObject = toObject$4;
5292
+ var lengthOfArrayLike = lengthOfArrayLike$4;
5293
+ var deletePropertyOrThrow = deletePropertyOrThrow$1;
5294
+ var toString$3 = toString$8;
5295
+ var fails$5 = fails$n;
5296
+ var internalSort = arraySort;
5297
+ var arrayMethodIsStrict = arrayMethodIsStrict$1;
5298
+ var FF = engineFfVersion;
5299
+ var IE_OR_EDGE = engineIsIeOrEdge;
5300
+ var V8 = engineV8Version;
5301
+ var WEBKIT = engineWebkitVersion;
5302
+
5303
+ var test = [];
5304
+ var nativeSort = uncurryThis$3(test.sort);
5305
+ var push = uncurryThis$3(test.push);
5306
+
5307
+ // IE8-
5308
+ var FAILS_ON_UNDEFINED = fails$5(function () {
5309
+ test.sort(undefined);
5310
+ });
5311
+ // V8 bug
5312
+ var FAILS_ON_NULL = fails$5(function () {
5313
+ test.sort(null);
5314
+ });
5315
+ // Old WebKit
5316
+ var STRICT_METHOD = arrayMethodIsStrict('sort');
5317
+
5318
+ var STABLE_SORT = !fails$5(function () {
5319
+ // feature detection can be too slow, so check engines versions
5320
+ if (V8) return V8 < 70;
5321
+ if (FF && FF > 3) return;
5322
+ if (IE_OR_EDGE) return true;
5323
+ if (WEBKIT) return WEBKIT < 603;
5324
+
5325
+ var result = '';
5326
+ var code, chr, value, index;
5327
+
5328
+ // generate an array with more 512 elements (Chakra and old V8 fails only in this case)
5329
+ for (code = 65; code < 76; code++) {
5330
+ chr = String.fromCharCode(code);
5331
+
5332
+ switch (code) {
5333
+ case 66: case 69: case 70: case 72: value = 3; break;
5334
+ case 68: case 71: value = 4; break;
5335
+ default: value = 2;
5336
+ }
5337
+
5338
+ for (index = 0; index < 47; index++) {
5339
+ test.push({ k: chr + index, v: value });
5340
+ }
5341
+ }
5342
+
5343
+ test.sort(function (a, b) { return b.v - a.v; });
5344
+
5345
+ for (index = 0; index < test.length; index++) {
5346
+ chr = test[index].k.charAt(0);
5347
+ if (result.charAt(result.length - 1) !== chr) result += chr;
5348
+ }
5349
+
5350
+ return result !== 'DGBEFHACIJK';
5351
+ });
5352
+
5353
+ var FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT;
5354
+
5355
+ var getSortCompare = function (comparefn) {
5356
+ return function (x, y) {
5357
+ if (y === undefined) return -1;
5358
+ if (x === undefined) return 1;
5359
+ if (comparefn !== undefined) return +comparefn(x, y) || 0;
5360
+ return toString$3(x) > toString$3(y) ? 1 : -1;
5361
+ };
5362
+ };
5363
+
5364
+ // `Array.prototype.sort` method
5365
+ // https://tc39.es/ecma262/#sec-array.prototype.sort
5366
+ $$1({ target: 'Array', proto: true, forced: FORCED }, {
5367
+ sort: function sort(comparefn) {
5368
+ if (comparefn !== undefined) aCallable(comparefn);
5369
+
5370
+ var array = toObject(this);
5371
+
5372
+ if (STABLE_SORT) return comparefn === undefined ? nativeSort(array) : nativeSort(array, comparefn);
5373
+
5374
+ var items = [];
5375
+ var arrayLength = lengthOfArrayLike(array);
5376
+ var itemsLength, index;
5377
+
5378
+ for (index = 0; index < arrayLength; index++) {
5379
+ if (index in array) push(items, array[index]);
5380
+ }
5381
+
5382
+ internalSort(items, getSortCompare(comparefn));
5383
+
5384
+ itemsLength = lengthOfArrayLike(items);
5385
+ index = 0;
5386
+
5387
+ while (index < itemsLength) array[index] = items[index++];
5388
+ while (index < arrayLength) deletePropertyOrThrow(array, index++);
5389
+
5390
+ return array;
5391
+ }
5392
+ });
5393
+
5394
+ var isCallable$1 = isCallable$n;
5395
+ var isObject = isObject$a;
5396
+ var setPrototypeOf = objectSetPrototypeOf;
5397
+
5398
+ // makes subclassing work correct for wrapped built-ins
5399
+ var inheritIfRequired$1 = function ($this, dummy, Wrapper) {
5400
+ var NewTarget, NewTargetPrototype;
5401
+ if (
5402
+ // it can work only with native `setPrototypeOf`
5403
+ setPrototypeOf &&
5404
+ // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
5405
+ isCallable$1(NewTarget = dummy.constructor) &&
5406
+ NewTarget !== Wrapper &&
5407
+ isObject(NewTargetPrototype = NewTarget.prototype) &&
5408
+ NewTargetPrototype !== Wrapper.prototype
5409
+ ) setPrototypeOf($this, NewTargetPrototype);
5410
+ return $this;
5411
+ };
5412
+
5413
+ var fails$4 = fails$n;
5414
+ var global$4 = global$o;
5415
+
5416
+ // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
5417
+ var $RegExp$2 = global$4.RegExp;
5418
+
5419
+ var UNSUPPORTED_Y$2 = fails$4(function () {
5420
+ var re = $RegExp$2('a', 'y');
5421
+ re.lastIndex = 2;
5422
+ return re.exec('abcd') !== null;
5423
+ });
5424
+
5425
+ // UC Browser bug
5426
+ // https://github.com/zloirock/core-js/issues/1008
5427
+ var MISSED_STICKY$1 = UNSUPPORTED_Y$2 || fails$4(function () {
5428
+ return !$RegExp$2('a', 'y').sticky;
5429
+ });
5430
+
5431
+ var BROKEN_CARET = UNSUPPORTED_Y$2 || fails$4(function () {
5432
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
5433
+ var re = $RegExp$2('^r', 'gy');
5434
+ re.lastIndex = 2;
5435
+ return re.exec('str') !== null;
5436
+ });
5437
+
5438
+ var regexpStickyHelpers = {
5439
+ BROKEN_CARET: BROKEN_CARET,
5440
+ MISSED_STICKY: MISSED_STICKY$1,
5441
+ UNSUPPORTED_Y: UNSUPPORTED_Y$2
5442
+ };
5443
+
5444
+ var defineProperty = objectDefineProperty.f;
5445
+
5446
+ var proxyAccessor$1 = function (Target, Source, key) {
5447
+ key in Target || defineProperty(Target, key, {
5448
+ configurable: true,
5449
+ get: function () { return Source[key]; },
5450
+ set: function (it) { Source[key] = it; }
5451
+ });
5452
+ };
5453
+
5454
+ var fails$3 = fails$n;
5455
+ var global$3 = global$o;
5456
+
5457
+ // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
5458
+ var $RegExp$1 = global$3.RegExp;
5459
+
5460
+ var regexpUnsupportedDotAll = fails$3(function () {
5461
+ var re = $RegExp$1('.', 's');
5462
+ return !(re.dotAll && re.test('\n') && re.flags === 's');
5463
+ });
5464
+
5465
+ var fails$2 = fails$n;
5466
+ var global$2 = global$o;
5467
+
5468
+ // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
5469
+ var $RegExp = global$2.RegExp;
5470
+
5471
+ var regexpUnsupportedNcg = fails$2(function () {
5472
+ var re = $RegExp('(?<a>b)', 'g');
5473
+ return re.exec('b').groups.a !== 'b' ||
5474
+ 'b'.replace(re, '$<a>c') !== 'bc';
5475
+ });
5476
+
5477
+ var DESCRIPTORS = descriptors;
5478
+ var global$1 = global$o;
5479
+ var uncurryThis$2 = functionUncurryThis;
5480
+ var isForced = isForced_1;
5481
+ var inheritIfRequired = inheritIfRequired$1;
5482
+ var createNonEnumerableProperty$1 = createNonEnumerableProperty$6;
5483
+ var getOwnPropertyNames = objectGetOwnPropertyNames.f;
5484
+ var isPrototypeOf = objectIsPrototypeOf;
5485
+ var isRegExp = isRegexp;
5486
+ var toString$2 = toString$8;
5487
+ var getRegExpFlags = regexpGetFlags;
5488
+ var stickyHelpers$1 = regexpStickyHelpers;
5489
+ var proxyAccessor = proxyAccessor$1;
5490
+ var defineBuiltIn$1 = defineBuiltIn$8;
5491
+ var fails$1 = fails$n;
5492
+ var hasOwn = hasOwnProperty_1;
5493
+ var enforceInternalState = internalState.enforce;
5494
+ var setSpecies = setSpecies$2;
5495
+ var wellKnownSymbol$1 = wellKnownSymbol$i;
5496
+ var UNSUPPORTED_DOT_ALL$1 = regexpUnsupportedDotAll;
5497
+ var UNSUPPORTED_NCG$1 = regexpUnsupportedNcg;
5498
+
5499
+ var MATCH = wellKnownSymbol$1('match');
5500
+ var NativeRegExp = global$1.RegExp;
5501
+ var RegExpPrototype$1 = NativeRegExp.prototype;
5502
+ var SyntaxError = global$1.SyntaxError;
5503
+ var exec$1 = uncurryThis$2(RegExpPrototype$1.exec);
5504
+ var charAt$1 = uncurryThis$2(''.charAt);
5505
+ var replace$1 = uncurryThis$2(''.replace);
5506
+ var stringIndexOf = uncurryThis$2(''.indexOf);
5507
+ var stringSlice$1 = uncurryThis$2(''.slice);
5508
+ // TODO: Use only proper RegExpIdentifierName
5509
+ var IS_NCG = /^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/;
5510
+ var re1 = /a/g;
5511
+ var re2 = /a/g;
5512
+
5513
+ // "new" should create a new object, old webkit bug
5514
+ var CORRECT_NEW = new NativeRegExp(re1) !== re1;
5515
+
5516
+ var MISSED_STICKY = stickyHelpers$1.MISSED_STICKY;
5517
+ var UNSUPPORTED_Y$1 = stickyHelpers$1.UNSUPPORTED_Y;
5518
+
5519
+ var BASE_FORCED = DESCRIPTORS &&
5520
+ (!CORRECT_NEW || MISSED_STICKY || UNSUPPORTED_DOT_ALL$1 || UNSUPPORTED_NCG$1 || fails$1(function () {
5521
+ re2[MATCH] = false;
5522
+ // RegExp constructor can alter flags and IsRegExp works correct with @@match
5523
+ return NativeRegExp(re1) !== re1 || NativeRegExp(re2) === re2 || String(NativeRegExp(re1, 'i')) !== '/a/i';
5524
+ }));
5525
+
5526
+ var handleDotAll = function (string) {
5527
+ var length = string.length;
5528
+ var index = 0;
5529
+ var result = '';
5530
+ var brackets = false;
5531
+ var chr;
5532
+ for (; index <= length; index++) {
5533
+ chr = charAt$1(string, index);
5534
+ if (chr === '\\') {
5535
+ result += chr + charAt$1(string, ++index);
5536
+ continue;
5537
+ }
5538
+ if (!brackets && chr === '.') {
5539
+ result += '[\\s\\S]';
5540
+ } else {
5541
+ if (chr === '[') {
5542
+ brackets = true;
5543
+ } else if (chr === ']') {
5544
+ brackets = false;
5545
+ } result += chr;
5546
+ }
5547
+ } return result;
5548
+ };
5549
+
5550
+ var handleNCG = function (string) {
5551
+ var length = string.length;
5552
+ var index = 0;
5553
+ var result = '';
5554
+ var named = [];
5555
+ var names = {};
5556
+ var brackets = false;
5557
+ var ncg = false;
5558
+ var groupid = 0;
5559
+ var groupname = '';
5560
+ var chr;
5561
+ for (; index <= length; index++) {
5562
+ chr = charAt$1(string, index);
5563
+ if (chr === '\\') {
5564
+ chr += charAt$1(string, ++index);
5565
+ } else if (chr === ']') {
5566
+ brackets = false;
5567
+ } else if (!brackets) switch (true) {
5568
+ case chr === '[':
5569
+ brackets = true;
5570
+ break;
5571
+ case chr === '(':
5572
+ if (exec$1(IS_NCG, stringSlice$1(string, index + 1))) {
5573
+ index += 2;
5574
+ ncg = true;
5575
+ }
5576
+ result += chr;
5577
+ groupid++;
5578
+ continue;
5579
+ case chr === '>' && ncg:
5580
+ if (groupname === '' || hasOwn(names, groupname)) {
5581
+ throw new SyntaxError('Invalid capture group name');
5582
+ }
5583
+ names[groupname] = true;
5584
+ named[named.length] = [groupname, groupid];
5585
+ ncg = false;
5586
+ groupname = '';
5587
+ continue;
5588
+ }
5589
+ if (ncg) groupname += chr;
5590
+ else result += chr;
5591
+ } return [result, named];
5592
+ };
5593
+
5594
+ // `RegExp` constructor
5595
+ // https://tc39.es/ecma262/#sec-regexp-constructor
5596
+ if (isForced('RegExp', BASE_FORCED)) {
5597
+ var RegExpWrapper = function RegExp(pattern, flags) {
5598
+ var thisIsRegExp = isPrototypeOf(RegExpPrototype$1, this);
5599
+ var patternIsRegExp = isRegExp(pattern);
5600
+ var flagsAreUndefined = flags === undefined;
5601
+ var groups = [];
5602
+ var rawPattern = pattern;
5603
+ var rawFlags, dotAll, sticky, handled, result, state;
5604
+
5605
+ if (!thisIsRegExp && patternIsRegExp && flagsAreUndefined && pattern.constructor === RegExpWrapper) {
5606
+ return pattern;
5607
+ }
5608
+
5609
+ if (patternIsRegExp || isPrototypeOf(RegExpPrototype$1, pattern)) {
5610
+ pattern = pattern.source;
5611
+ if (flagsAreUndefined) flags = getRegExpFlags(rawPattern);
5612
+ }
5613
+
5614
+ pattern = pattern === undefined ? '' : toString$2(pattern);
5615
+ flags = flags === undefined ? '' : toString$2(flags);
5616
+ rawPattern = pattern;
5617
+
5618
+ if (UNSUPPORTED_DOT_ALL$1 && 'dotAll' in re1) {
5619
+ dotAll = !!flags && stringIndexOf(flags, 's') > -1;
5620
+ if (dotAll) flags = replace$1(flags, /s/g, '');
5621
+ }
5622
+
5623
+ rawFlags = flags;
5624
+
5625
+ if (MISSED_STICKY && 'sticky' in re1) {
5626
+ sticky = !!flags && stringIndexOf(flags, 'y') > -1;
5627
+ if (sticky && UNSUPPORTED_Y$1) flags = replace$1(flags, /y/g, '');
5628
+ }
5629
+
5630
+ if (UNSUPPORTED_NCG$1) {
5631
+ handled = handleNCG(pattern);
5632
+ pattern = handled[0];
5633
+ groups = handled[1];
5634
+ }
5635
+
5636
+ result = inheritIfRequired(NativeRegExp(pattern, flags), thisIsRegExp ? this : RegExpPrototype$1, RegExpWrapper);
5637
+
5638
+ if (dotAll || sticky || groups.length) {
5639
+ state = enforceInternalState(result);
5640
+ if (dotAll) {
5641
+ state.dotAll = true;
5642
+ state.raw = RegExpWrapper(handleDotAll(pattern), rawFlags);
5643
+ }
5644
+ if (sticky) state.sticky = true;
5645
+ if (groups.length) state.groups = groups;
5646
+ }
5647
+
5648
+ if (pattern !== rawPattern) try {
5649
+ // fails in old engines, but we have no alternatives for unsupported regex syntax
5650
+ createNonEnumerableProperty$1(result, 'source', rawPattern === '' ? '(?:)' : rawPattern);
5651
+ } catch (error) { /* empty */ }
5652
+
5653
+ return result;
5654
+ };
5655
+
5656
+ for (var keys = getOwnPropertyNames(NativeRegExp), index = 0; keys.length > index;) {
5657
+ proxyAccessor(RegExpWrapper, NativeRegExp, keys[index++]);
5658
+ }
5659
+
5660
+ RegExpPrototype$1.constructor = RegExpWrapper;
5661
+ RegExpWrapper.prototype = RegExpPrototype$1;
5662
+ defineBuiltIn$1(global$1, 'RegExp', RegExpWrapper, { constructor: true });
5663
+ }
5664
+
5665
+ // https://tc39.es/ecma262/#sec-get-regexp-@@species
5666
+ setSpecies('RegExp');
5667
+
5668
+ /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
5669
+ /* eslint-disable regexp/no-useless-quantifier -- testing */
5670
+ var call$2 = functionCall;
5671
+ var uncurryThis$1 = functionUncurryThis;
5672
+ var toString$1 = toString$8;
5673
+ var regexpFlags = regexpFlags$1;
5674
+ var stickyHelpers = regexpStickyHelpers;
5675
+ var shared = shared$4.exports;
5676
+ var create = objectCreate;
5677
+ var getInternalState = internalState.get;
5678
+ var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
5679
+ var UNSUPPORTED_NCG = regexpUnsupportedNcg;
5680
+
5681
+ var nativeReplace = shared('native-string-replace', String.prototype.replace);
5682
+ var nativeExec = RegExp.prototype.exec;
5683
+ var patchedExec = nativeExec;
5684
+ var charAt = uncurryThis$1(''.charAt);
5685
+ var indexOf = uncurryThis$1(''.indexOf);
5686
+ var replace = uncurryThis$1(''.replace);
5687
+ var stringSlice = uncurryThis$1(''.slice);
5688
+
5689
+ var UPDATES_LAST_INDEX_WRONG = (function () {
5690
+ var re1 = /a/;
5691
+ var re2 = /b*/g;
5692
+ call$2(nativeExec, re1, 'a');
5693
+ call$2(nativeExec, re2, 'a');
5694
+ return re1.lastIndex !== 0 || re2.lastIndex !== 0;
5695
+ })();
5696
+
5697
+ var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;
5698
+
5699
+ // nonparticipating capturing group, copied from es5-shim's String#split patch.
5700
+ var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
5701
+
5702
+ var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
5703
+
5704
+ if (PATCH) {
5705
+ patchedExec = function exec(string) {
5706
+ var re = this;
5707
+ var state = getInternalState(re);
5708
+ var str = toString$1(string);
5709
+ var raw = state.raw;
5710
+ var result, reCopy, lastIndex, match, i, object, group;
5711
+
5712
+ if (raw) {
5713
+ raw.lastIndex = re.lastIndex;
5714
+ result = call$2(patchedExec, raw, str);
5715
+ re.lastIndex = raw.lastIndex;
5716
+ return result;
5717
+ }
5718
+
5719
+ var groups = state.groups;
5720
+ var sticky = UNSUPPORTED_Y && re.sticky;
5721
+ var flags = call$2(regexpFlags, re);
5722
+ var source = re.source;
5723
+ var charsAdded = 0;
5724
+ var strCopy = str;
5725
+
5726
+ if (sticky) {
5727
+ flags = replace(flags, 'y', '');
5728
+ if (indexOf(flags, 'g') === -1) {
5729
+ flags += 'g';
5730
+ }
5731
+
5732
+ strCopy = stringSlice(str, re.lastIndex);
5733
+ // Support anchored sticky behavior.
5734
+ if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt(str, re.lastIndex - 1) !== '\n')) {
5735
+ source = '(?: ' + source + ')';
5736
+ strCopy = ' ' + strCopy;
5737
+ charsAdded++;
5738
+ }
5739
+ // ^(? + rx + ) is needed, in combination with some str slicing, to
5740
+ // simulate the 'y' flag.
5741
+ reCopy = new RegExp('^(?:' + source + ')', flags);
5742
+ }
5743
+
5744
+ if (NPCG_INCLUDED) {
5745
+ reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
5746
+ }
5747
+ if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
5748
+
5749
+ match = call$2(nativeExec, sticky ? reCopy : re, strCopy);
5750
+
5751
+ if (sticky) {
5752
+ if (match) {
5753
+ match.input = stringSlice(match.input, charsAdded);
5754
+ match[0] = stringSlice(match[0], charsAdded);
5755
+ match.index = re.lastIndex;
5756
+ re.lastIndex += match[0].length;
5757
+ } else re.lastIndex = 0;
5758
+ } else if (UPDATES_LAST_INDEX_WRONG && match) {
5759
+ re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
5760
+ }
5761
+ if (NPCG_INCLUDED && match && match.length > 1) {
5762
+ // Fix browsers whose `exec` methods don't consistently return `undefined`
5763
+ // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
5764
+ call$2(nativeReplace, match[0], reCopy, function () {
5765
+ for (i = 1; i < arguments.length - 2; i++) {
5766
+ if (arguments[i] === undefined) match[i] = undefined;
5767
+ }
5768
+ });
5769
+ }
5770
+
5771
+ if (match && groups) {
5772
+ match.groups = object = create(null);
5773
+ for (i = 0; i < groups.length; i++) {
5774
+ group = groups[i];
5775
+ object[group[0]] = match[group[1]];
5776
+ }
5777
+ }
5778
+
5779
+ return match;
5780
+ };
5781
+ }
5782
+
5783
+ var regexpExec$2 = patchedExec;
5784
+
5785
+ var $ = _export;
5786
+ var exec = regexpExec$2;
5787
+
5788
+ // `RegExp.prototype.exec` method
5789
+ // https://tc39.es/ecma262/#sec-regexp.prototype.exec
5790
+ $({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
5791
+ exec: exec
5792
+ });
5793
+
5794
+ // TODO: Remove from `core-js@4` since it's moved to entry points
5795
+
5796
+ var uncurryThis = functionUncurryThisClause;
5797
+ var defineBuiltIn = defineBuiltIn$8;
5798
+ var regexpExec$1 = regexpExec$2;
5799
+ var fails = fails$n;
5800
+ var wellKnownSymbol = wellKnownSymbol$i;
5801
+ var createNonEnumerableProperty = createNonEnumerableProperty$6;
5802
+
5803
+ var SPECIES = wellKnownSymbol('species');
5804
+ var RegExpPrototype = RegExp.prototype;
5805
+
5806
+ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
5807
+ var SYMBOL = wellKnownSymbol(KEY);
5808
+
5809
+ var DELEGATES_TO_SYMBOL = !fails(function () {
5810
+ // String methods call symbol-named RegEp methods
5811
+ var O = {};
5812
+ O[SYMBOL] = function () { return 7; };
5813
+ return ''[KEY](O) !== 7;
5814
+ });
5815
+
5816
+ var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
5817
+ // Symbol-named RegExp methods call .exec
5818
+ var execCalled = false;
5819
+ var re = /a/;
5820
+
5821
+ if (KEY === 'split') {
5822
+ // We can't use real regex here since it causes deoptimization
5823
+ // and serious performance degradation in V8
5824
+ // https://github.com/zloirock/core-js/issues/306
5825
+ re = {};
5826
+ // RegExp[@@split] doesn't call the regex's exec method, but first creates
5827
+ // a new one. We need to return the patched regex when creating the new one.
5828
+ re.constructor = {};
5829
+ re.constructor[SPECIES] = function () { return re; };
5830
+ re.flags = '';
5831
+ re[SYMBOL] = /./[SYMBOL];
5832
+ }
5833
+
5834
+ re.exec = function () {
5835
+ execCalled = true;
5836
+ return null;
5837
+ };
5838
+
5839
+ re[SYMBOL]('');
5840
+ return !execCalled;
5841
+ });
5842
+
5843
+ if (
5844
+ !DELEGATES_TO_SYMBOL ||
5845
+ !DELEGATES_TO_EXEC ||
5846
+ FORCED
5847
+ ) {
5848
+ var uncurriedNativeRegExpMethod = uncurryThis(/./[SYMBOL]);
5849
+ var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
5850
+ var uncurriedNativeMethod = uncurryThis(nativeMethod);
5851
+ var $exec = regexp.exec;
5852
+ if ($exec === regexpExec$1 || $exec === RegExpPrototype.exec) {
5853
+ if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
5854
+ // The native String method already delegates to @@method (this
5855
+ // polyfilled function), leasing to infinite recursion.
5856
+ // We avoid it by directly calling the native @@method method.
5857
+ return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };
5858
+ }
5859
+ return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };
5860
+ }
5861
+ return { done: false };
5862
+ });
5863
+
5864
+ defineBuiltIn(String.prototype, KEY, methods[0]);
5865
+ defineBuiltIn(RegExpPrototype, SYMBOL, methods[1]);
5866
+ }
5867
+
5868
+ if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);
5869
+ };
5870
+
5871
+ // `SameValue` abstract operation
5872
+ // https://tc39.es/ecma262/#sec-samevalue
5873
+ // eslint-disable-next-line es/no-object-is -- safe
5874
+ var sameValue$1 = Object.is || function is(x, y) {
5875
+ // eslint-disable-next-line no-self-compare -- NaN check
5876
+ return x === y ? x !== 0 || 1 / x === 1 / y : x !== x && y !== y;
5877
+ };
5878
+
5879
+ var call$1 = functionCall;
5880
+ var anObject$1 = anObject$e;
5881
+ var isCallable = isCallable$n;
5882
+ var classof = classofRaw$2;
5883
+ var regexpExec = regexpExec$2;
5884
+
5885
+ var $TypeError = TypeError;
5886
+
5887
+ // `RegExpExec` abstract operation
5888
+ // https://tc39.es/ecma262/#sec-regexpexec
5889
+ var regexpExecAbstract = function (R, S) {
5890
+ var exec = R.exec;
5891
+ if (isCallable(exec)) {
5892
+ var result = call$1(exec, R, S);
5893
+ if (result !== null) anObject$1(result);
5894
+ return result;
5895
+ }
5896
+ if (classof(R) === 'RegExp') return call$1(regexpExec, R, S);
5897
+ throw new $TypeError('RegExp#exec called on incompatible receiver');
5898
+ };
5899
+
5900
+ var call = functionCall;
5901
+ var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
5902
+ var anObject = anObject$e;
5903
+ var isNullOrUndefined = isNullOrUndefined$5;
5904
+ var requireObjectCoercible = requireObjectCoercible$5;
5905
+ var sameValue = sameValue$1;
5906
+ var toString = toString$8;
5907
+ var getMethod = getMethod$4;
5908
+ var regExpExec = regexpExecAbstract;
5909
+
5910
+ // @@search logic
5911
+ fixRegExpWellKnownSymbolLogic('search', function (SEARCH, nativeSearch, maybeCallNative) {
5912
+ return [
5913
+ // `String.prototype.search` method
5914
+ // https://tc39.es/ecma262/#sec-string.prototype.search
5915
+ function search(regexp) {
5916
+ var O = requireObjectCoercible(this);
5917
+ var searcher = isNullOrUndefined(regexp) ? undefined : getMethod(regexp, SEARCH);
5918
+ return searcher ? call(searcher, regexp, O) : new RegExp(regexp)[SEARCH](toString(O));
5919
+ },
5920
+ // `RegExp.prototype[@@search]` method
5921
+ // https://tc39.es/ecma262/#sec-regexp.prototype-@@search
5922
+ function (string) {
5923
+ var rx = anObject(this);
5924
+ var S = toString(string);
5925
+ var res = maybeCallNative(nativeSearch, rx, S);
5926
+
5927
+ if (res.done) return res.value;
5928
+
5929
+ var previousLastIndex = rx.lastIndex;
5930
+ if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
5931
+ var result = regExpExec(rx, S);
5932
+ if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;
5933
+ return result === null ? -1 : result.index;
5934
+ }
5935
+ ];
5936
+ });
5937
+
5938
+ /**
5939
+ * sum the total of columns or cols in a row
5940
+ * @param colsLength the length of the columns
5941
+ * @param useSelection add a column for selection checkboxes
5942
+ * @param useShowActionColumn add another column for action columns
5943
+ * @param useGroupBy add another columns for groupby
5944
+ */
5945
+ function sumCols(colsLength, useSelection, useShowActionColumn, useGroupBy) {
5946
+ let sum = colsLength;
5947
+ if (useSelection) {
5948
+ sum = sum + 1;
5949
+ }
5950
+ if (useGroupBy) {
5951
+ sum = sum + 1;
5952
+ }
5953
+ if (useShowActionColumn) {
5954
+ sum = sum + 1;
5955
+ }
5956
+ return sum;
5957
+ }
5958
+ /**
5959
+ * sort array of tabke rows
5960
+ * @param items table rows array
5961
+ * @param columnName the target column name
5962
+ * @param sortDirection the sort direction
5963
+ * @return Array of tableRow
5964
+ */
5965
+ function sortArray(items = [], columnName, sortDirection) {
5966
+ var _a;
5967
+ const languages = ((_a = window.navigator) === null || _a === void 0 ? void 0 : _a.languages) || ['sw', 'en'];
5968
+ const sortedItems = [...items].sort((firstItem, secondItem) => {
5969
+ let result = 0;
5970
+ if (sortDirection === SortDirection.ASC) {
5971
+ if (isNaN(secondItem[columnName]) && isNaN(firstItem[columnName])) {
5972
+ result = String(firstItem[columnName]).localeCompare(String(secondItem[columnName]), languages, {
5973
+ sensitivity: 'base',
5974
+ ignorePunctuation: true
5975
+ });
5976
+ } else {
5977
+ result = firstItem[columnName] - secondItem[columnName];
5978
+ }
5979
+ } else {
5980
+ if (isNaN(secondItem[columnName]) && isNaN(firstItem[columnName])) {
5981
+ result = String(secondItem[columnName]).localeCompare(String(firstItem[columnName]), languages, {
5982
+ sensitivity: 'base',
5983
+ ignorePunctuation: true
5984
+ });
5985
+ } else {
5986
+ result = secondItem[columnName] - firstItem[columnName];
5987
+ }
5988
+ }
5989
+ return result;
5990
+ });
5991
+ return sortedItems;
5992
+ }
5993
+ /**
5994
+ *
5995
+ * @param data table data
5996
+ * @param filterColumns filter columns
5997
+ */
5998
+ function filterArrayByColumns(data, filterColumns) {
5999
+ return data.filter(row => {
6000
+ return filterColumns.length === 0 || filterColumns.every(column => {
6001
+ return Array.isArray(column.value) ? column.value.length === 0 || column.value.indexOf(row[column.accessor]) > -1 : row[column.accessor] === column.value;
6002
+ });
6003
+ });
6004
+ }
6005
+ /**
6006
+ * search text in array of table row
6007
+ * @param data the array of table rows
6008
+ * @param keyword The keyword to search in the array
6009
+ * @param searchFields the target field to search
6010
+ */
6011
+ function searchTextByColumns(data, keyword, searchFields) {
6012
+ return [...data].filter(row => {
6013
+ const searchText = String(keyword);
6014
+ return searchFields === null || searchFields === void 0 ? void 0 : searchFields.some(searchColumn => {
6015
+ let result = false;
6016
+ const regEx = new RegExp(searchText, 'gi');
6017
+ if (row[searchColumn] === null || row[searchColumn] === undefined) {
6018
+ result = false;
6019
+ } else if (typeof row[searchColumn] === 'string') {
6020
+ result = row[searchColumn].search(regEx) > -1;
6021
+ } else if (typeof row[searchColumn] === 'number') {
6022
+ result = String(row[searchColumn]).search(regEx) !== -1;
6023
+ }
6024
+ return result;
6025
+ });
6026
+ });
6027
+ }
6028
+ /**
6029
+ * paginate data
6030
+ * @param data table data
6031
+ * @param offset page size
6032
+ * @param currentPage current page index
6033
+ */
6034
+ function paginate(data, offset, currentPage) {
6035
+ if (offset && (data === null || data === void 0 ? void 0 : data.length) > 0) {
6036
+ const start = currentPage * offset;
6037
+ const end = offset + start;
6038
+ const currentPageData = data === null || data === void 0 ? void 0 : data.slice(start, end);
6039
+ return currentPageData;
6040
+ }
6041
+ return data;
6042
+ }
6043
+ /**
6044
+ * on row select
6045
+ * @param event input event
6046
+ * @param data rows of data
6047
+ * @param rowUniqueAccessor row unique accessor
6048
+ * @param rowId row id value
6049
+ */
6050
+ function onRowSelect(event, data, rowUniqueAccessor, rowId) {
6051
+ const target = event.target;
6052
+ let isAllSelected = true;
6053
+ let isIndeterminate = false;
6054
+ const newData = data === null || data === void 0 ? void 0 : data.map(row => {
6055
+ if (row[rowUniqueAccessor] === rowId || rowId === 'all') {
6056
+ row.checked = target.checked;
6057
+ }
6058
+ isAllSelected = isAllSelected && row.checked;
6059
+ isIndeterminate = isIndeterminate || row.checked;
6060
+ return row;
6061
+ });
6062
+ return {
6063
+ data: newData,
6064
+ isAllSelected: !!newData && isAllSelected,
6065
+ isIndeterminate: isIndeterminate && !isAllSelected
6066
+ };
6067
+ }
6068
+
6069
+ const TableCell = /*#__PURE__*/React.forwardRef((_a, ref) => {
6070
+ var props = __rest(_a, []);
6071
+ return jsx("td", Object.assign({}, props, {
6072
+ ref: ref
6073
+ }));
6074
+ });
6075
+ TableCell.displayName = 'TableCell';
6076
+
6077
+ const TableBody = /*#__PURE__*/React.forwardRef((_a, ref) => {
6078
+ var props = __rest(_a, []);
6079
+ let parentKey;
6080
+ /**
6081
+ * clone table row by appending parent key to sub row if necessary
6082
+ * @param Child react element
6083
+ * @param index index number
6084
+ */
6085
+ const cloneTableRow = React.useCallback((Child, index) => {
6086
+ var _a;
6087
+ const isTableRow = /*#__PURE__*/React.isValidElement(Child) && ((_a = Child === null || Child === void 0 ? void 0 : Child.type) === null || _a === void 0 ? void 0 : _a.displayName) === 'TableRow';
6088
+ if (isTableRow && !Child.props.isSubRow) {
6089
+ parentKey = Child.props.uniqueKey;
6090
+ }
6091
+ return isTableRow ? /*#__PURE__*/React.cloneElement(Child, {
6092
+ index,
6093
+ parentKey
6094
+ }) : Child;
6095
+ }, []);
6096
+ return jsx("tbody", Object.assign({}, props, {
6097
+ ref: ref
6098
+ }, {
6099
+ children: React.Children.map(props.children, (Child, i) => {
6100
+ if ((Child === null || Child === void 0 ? void 0 : Child.type) === React.Fragment) {
6101
+ return /*#__PURE__*/React.cloneElement(Child, {
6102
+ children: React.Children.map(Child.props.children, (FragmentChild, fragmentIndex) => cloneTableRow(FragmentChild, fragmentIndex))
6103
+ });
6104
+ } else {
6105
+ return cloneTableRow(Child, i);
6106
+ }
6107
+ })
6108
+ }));
6109
+ });
6110
+ TableBody.displayName = 'TableBody';
6111
+
6112
+ const TableHeader = /*#__PURE__*/React.forwardRef((_a, ref) => {
6113
+ var props = __rest(_a, []);
6114
+ return jsx("thead", Object.assign({}, props, {
6115
+ ref: ref
6116
+ }, {
6117
+ children: React.Children.count(props.children) === 1 && /*#__PURE__*/React.isValidElement(props.children) ? /*#__PURE__*/React.cloneElement(props.children, {
6118
+ isHeaderRow: true,
6119
+ index: -1
6120
+ }) : React.Children.map(props.children, (Child, i) => {
6121
+ var _a;
6122
+ return /*#__PURE__*/React.isValidElement(Child) && ((_a = Child === null || Child === void 0 ? void 0 : Child.type) === null || _a === void 0 ? void 0 : _a.displayName) === 'TableRow' ? /*#__PURE__*/React.cloneElement(Child, {
6123
+ index: i,
6124
+ hideSelect: !Child.props.isHeaderRow
6125
+ }) : Child;
6126
+ })
6127
+ }));
6128
+ });
6129
+ TableHeader.displayName = 'TableHeader';
6130
+
6131
+ const TableHeaderCell = /*#__PURE__*/React.forwardRef((_a, ref) => {
6132
+ var {
6133
+ accessor,
6134
+ disableSort,
6135
+ className,
6136
+ sortDirection,
6137
+ onClick,
6138
+ children
6139
+ } = _a,
6140
+ props = __rest(_a, ["accessor", "disableSort", "className", "sortDirection", "onClick", "children"]);
6141
+ const tableContext = useTableContext();
6142
+ const [sortedColumn, setSortedColumn] = React.useState(null);
6143
+ const [sortOrder, setSortOrder] = React.useState(SortDirection.ASC);
6144
+ const [sortable, setSortable] = React.useState(false);
6145
+ /**
6146
+ * get latest sort direction
6147
+ * @param oldSortDirection current sort direction
6148
+ */
6149
+ const getSortDirection = oldSortDirection => {
6150
+ return oldSortDirection === SortDirection.ASC ? SortDirection.DESC : SortDirection.ASC;
6151
+ };
6152
+ /** on column sort */
6153
+ const onSort = React.useCallback(() => {
6154
+ var _a;
6155
+ const newSortedColumn = sortedColumn && sortedColumn.accessor === accessor ? Object.assign(Object.assign({}, sortedColumn), {
6156
+ sortDirection: getSortDirection(sortedColumn.sortDirection)
6157
+ }) : {
6158
+ accessor,
6159
+ sortDirection: SortDirection.DESC
6160
+ };
6161
+ tableContext.setTableState(Object.assign(Object.assign({}, tableContext.tableState), {
6162
+ sortedColumn: newSortedColumn
6163
+ }));
6164
+ !!newSortedColumn && ((_a = tableContext === null || tableContext === void 0 ? void 0 : tableContext.onSort) === null || _a === void 0 ? void 0 : _a.call(tableContext, newSortedColumn));
6165
+ }, [sortedColumn, tableContext]);
6166
+ const getCurrentSortValue = React.useCallback(() => {
6167
+ if (!sortable || !sortOrder) {
6168
+ return 'none';
6169
+ }
6170
+ if (sortOrder === SortDirection.ASC) {
6171
+ return 'ascending';
6172
+ }
6173
+ return 'descending';
6174
+ }, [sortable, sortOrder]);
6175
+ React.useEffect(() => {
6176
+ setSortable(!disableSort && !!tableContext.onSort);
6177
+ }, [disableSort, tableContext.onSort]);
6178
+ React.useEffect(() => {
6179
+ setSortedColumn(tableContext.tableState.sortedColumn);
6180
+ }, [tableContext.tableState.sortedColumn]);
6181
+ React.useEffect(() => {
6182
+ if (sortDirection && tableContext.onSort) {
6183
+ tableContext.setTableState(Object.assign(Object.assign({}, tableContext.tableState), {
6184
+ sortedColumn: {
6185
+ accessor,
6186
+ sortDirection
6187
+ }
6188
+ }));
6189
+ }
6190
+ }, [sortDirection, tableContext.onSort]);
6191
+ React.useEffect(() => {
6192
+ setSortOrder(sortable && (sortedColumn === null || sortedColumn === void 0 ? void 0 : sortedColumn.accessor) === accessor ? sortedColumn === null || sortedColumn === void 0 ? void 0 : sortedColumn.sortDirection : null);
6193
+ }, [sortable, sortedColumn]);
6194
+ return jsx("th", Object.assign({
6195
+ className: classNames(className, {
6196
+ 'sg-sortable': sortable
6197
+ }),
6198
+ onClick: sortable ? onSort : onClick,
6199
+ ref: ref,
6200
+ "aria-sort": getCurrentSortValue()
6201
+ }, props, {
6202
+ children: sortable ? jsxs("button", Object.assign({
6203
+ className: "sg-table-sort"
6204
+ }, {
6205
+ children: [" ", children]
6206
+ })) : children
6207
+ }));
6208
+ });
6209
+ TableHeaderCell.displayName = 'TableHeaderCell';
6210
+
6211
+ const angleDown = jsx("svg", Object.assign({
6212
+ xmlns: "http://www.w3.org/2000/svg",
6213
+ viewBox: "0 0 256 512"
6214
+ }, {
6215
+ children: jsx("path", {
6216
+ d: "M119.5 326.9L3.5 209.1c-4.7-4.7-4.7-12.3 0-17l7.1-7.1c4.7-4.7 12.3-4.7 17 0L128 287.3l100.4-102.2c4.7-4.7 12.3-4.7 17 0l7.1 7.1c4.7 4.7 4.7 12.3 0 17L136.5 327c-4.7 4.6-12.3 4.6-17-.1z"
6217
+ })
6218
+ }));
6219
+ const angleRightIcon = jsx("svg", Object.assign({
6220
+ name: "angle-right",
6221
+ xmlns: "http://www.w3.org/2000/svg",
6222
+ viewBox: "0 0 192 512"
6223
+ }, {
6224
+ children: jsx("path", {
6225
+ d: "M166.9 264.5l-117.8 116c-4.7 4.7-12.3 4.7-17 0l-7.1-7.1c-4.7-4.7-4.7-12.3 0-17L127.3 256 25.1 155.6c-4.7-4.7-4.7-12.3 0-17l7.1-7.1c4.7-4.7 12.3-4.7 17 0l117.8 116c4.6 4.7 4.6 12.3-.1 17z"
6226
+ })
6227
+ }));
6228
+ const TableRow = /*#__PURE__*/React.forwardRef((_a, ref) => {
6229
+ var _b;
6230
+ var {
6231
+ className,
6232
+ isHeaderRow,
6233
+ hideSelect,
6234
+ uniqueKey,
6235
+ parentKey,
6236
+ checked = false,
6237
+ indeterminate = false,
6238
+ isSubRow = false,
6239
+ isExpanded = false,
6240
+ checkboxProps = {},
6241
+ collapseButtonProps = {}
6242
+ } = _a,
6243
+ props = __rest(_a, ["className", "isHeaderRow", "hideSelect", "uniqueKey", "parentKey", "checked", "indeterminate", "isSubRow", "isExpanded", "checkboxProps", "collapseButtonProps"]);
6244
+ const tableContext = useTableContext();
6245
+ const [uniqueId, setUniqueId] = React.useState(uniqueKey);
6246
+ const [isShown, setIsShown] = React.useState(false);
6247
+ const [expanded, setExpanded] = React.useState(isExpanded);
6248
+ const [isParentRow, setIsParentRow] = React.useState(isExpanded);
6249
+ const [columnProps, setColumnProps] = React.useState(null);
6250
+ const [expandedRows, setExpandedRows] = React.useState(((_b = tableContext.tableState) === null || _b === void 0 ? void 0 : _b.expandedRows) || []);
6251
+ const headerId = useId();
6252
+ /** initiate default expanded row */
6253
+ const initiateExpandedRows = React.useCallback(() => {
6254
+ const newExpandedRows = [...expandedRows];
6255
+ const expandedIndex = newExpandedRows.indexOf(uniqueId);
6256
+ if (isExpanded && expandedIndex === -1) {
6257
+ newExpandedRows.push(uniqueId);
6258
+ } else if (expandedIndex > -1) {
6259
+ const _expandedIndex = newExpandedRows.indexOf(uniqueId);
6260
+ newExpandedRows.splice(_expandedIndex, 1);
6261
+ }
6262
+ tableContext.setTableState(Object.assign(Object.assign({}, tableContext.tableState), {
6263
+ expandedRows: newExpandedRows
6264
+ }));
6265
+ setExpandedRows(newExpandedRows);
6266
+ }, [isExpanded, uniqueId]);
6267
+ React.useEffect(() => {
6268
+ setUniqueId(isHeaderRow ? 'all' : uniqueKey || headerId);
6269
+ }, [uniqueKey, isHeaderRow]);
6270
+ React.useEffect(() => {
6271
+ setExpandedRows(tableContext.tableState.expandedRows || []);
6272
+ }, [tableContext.tableState.expandedRows]);
6273
+ React.useEffect(() => {
6274
+ setExpanded(isExpanded);
6275
+ if (!isSubRow && !isHeaderRow && tableContext.onRowExpand) {
6276
+ initiateExpandedRows();
6277
+ }
6278
+ }, [isExpanded, initiateExpandedRows]);
6279
+ React.useEffect(() => {
6280
+ setColumnProps(isHeaderRow ? {
6281
+ disableSort: true
6282
+ } : null);
6283
+ }, [isHeaderRow]);
6284
+ React.useEffect(() => {
6285
+ setIsParentRow(!(isHeaderRow || isSubRow));
6286
+ }, [isHeaderRow, isSubRow]);
6287
+ React.useEffect(() => {
6288
+ if (tableContext.onRowExpand) {
6289
+ setIsShown(isSubRow && expandedRows.indexOf(parentKey) > -1);
6290
+ }
6291
+ }, [expandedRows]);
6292
+ const Cell = isHeaderRow ? TableHeaderCell : TableCell;
6293
+ return jsxs("tr", Object.assign({}, props, {
6294
+ ref: ref,
6295
+ className: classNames(className, {
6296
+ 'sub-row': isSubRow,
6297
+ expanded: isExpanded,
6298
+ collapsible: isParentRow && !!tableContext.onRowExpand,
6299
+ show: isShown
6300
+ })
6301
+ }, {
6302
+ children: [!!tableContext.onRowExpand && jsx(Cell, Object.assign({}, columnProps, {
6303
+ className: classNames({
6304
+ 'collapse-control': isParentRow
6305
+ })
6306
+ }, {
6307
+ children: isParentRow && jsx("button", Object.assign({}, collapseButtonProps, {
6308
+ className: classNames('collapse-btn', collapseButtonProps.className),
6309
+ onClick: () => {
6310
+ var _a;
6311
+ return (_a = tableContext === null || tableContext === void 0 ? void 0 : tableContext.onRowExpand) === null || _a === void 0 ? void 0 : _a.call(tableContext, !isExpanded, uniqueId);
6312
+ }
6313
+ }, {
6314
+ children: jsx("div", Object.assign({
6315
+ className: "icon-holder"
6316
+ }, {
6317
+ children: expanded ? angleDown : angleRightIcon
6318
+ }))
6319
+ }))
6320
+ })), !!tableContext.onRowSelect && jsx(Cell, Object.assign({}, columnProps, {
6321
+ className: classNames({
6322
+ 'select-control': !(hideSelect || isSubRow)
6323
+ })
6324
+ }, {
6325
+ children: !(hideSelect || isSubRow) && jsxs("label", Object.assign({
6326
+ className: "form-control p-0"
6327
+ }, {
6328
+ children: [jsx("input", {
6329
+ type: "checkbox",
6330
+ checked: checked,
6331
+ ref: input => {
6332
+ if (input) {
6333
+ input.indeterminate = indeterminate && !checked;
6334
+ }
6335
+ },
6336
+ name: `tb_checkbox_${uniqueId}`,
6337
+ id: `tb_checkbox_${uniqueId}`,
6338
+ onChange: event => {
6339
+ var _a;
6340
+ return (_a = tableContext === null || tableContext === void 0 ? void 0 : tableContext.onRowSelect) === null || _a === void 0 ? void 0 : _a.call(tableContext, event, uniqueId);
6341
+ }
6342
+ }), jsx("i", {
6343
+ className: "m-0"
6344
+ })]
6345
+ }))
6346
+ })), props.children]
6347
+ }));
6348
+ });
6349
+ TableRow.displayName = 'TableRow';
6350
+
6351
+ const Table = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef((_a, ref) => {
6352
+ var {
6353
+ onRowSelect,
6354
+ onRowExpand,
6355
+ onSort,
6356
+ sortedColumn = null,
6357
+ className
6358
+ } = _a,
6359
+ props = __rest(_a, ["onRowSelect", "onRowExpand", "onSort", "sortedColumn", "className"]);
6360
+ const [tableState, setTableState] = React.useState({
6361
+ expandedRows: [],
6362
+ sortedColumn
6363
+ });
6364
+ return jsx(TableContext.Provider, Object.assign({
6365
+ value: {
6366
+ tableState,
6367
+ onSort,
6368
+ onRowSelect,
6369
+ onRowExpand,
6370
+ setTableState
6371
+ }
6372
+ }, {
6373
+ children: jsx("table", Object.assign({}, props, {
6374
+ className: classNames('table', className),
6375
+ ref: ref
6376
+ }))
6377
+ }));
6378
+ }));
6379
+
6380
+ export { Accordion, AlertRibbon as Alert, AlertRibbon, Badge, Button, ButtonGroup, Card, Checkbox, ContextMenu, CoreDatepicker, CoreDropdown, CoreOption, Datepicker, Dropdown, EmailInput, Flexbox, Form, FormItem, FormItems, Group, InPageWizardStepCard, Input, Link, List$1 as List, MenuItem, Modal, Navbar, NumberInput, Option, OptionGroup, RadioButton, RadioGroup, Select, Slider, SortDirection, Stepper, Tab, Table, TableBody, TableCell, TableContext, TableHeader, TableHeaderCell, TableRow, Tabs, Text, TextArea, TextInput, valueList$1 as ValueList, filterArrayByColumns, onRowSelect, paginate, searchTextByColumns, sortArray, sumCols, useTableContext };