@sebgroup/green-react 2.6.1 → 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,13 +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, createStepper } from '@sebgroup/extract';
4
- import { getScopedTagName, GdsDropdown, GdsOption } from '@sebgroup/green-core';
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
+ import { createComponent } from '@lit/react';
5
+ import { getScopedTagName, GdsDatepicker, GdsDropdown, GdsOption, GdsContextMenu, GdsMenuItem } from '@sebgroup/green-core';
5
6
  import { registerTransitionalStyles } from '@sebgroup/green-core/transitional-styles';
6
7
  import classNames from 'classnames';
7
8
 
8
9
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
9
10
 
10
- var fails$g = function (exec) {
11
+ var fails$n = function (exec) {
11
12
  try {
12
13
  return !!exec();
13
14
  } catch (error) {
@@ -15,9 +16,9 @@ var fails$g = function (exec) {
15
16
  }
16
17
  };
17
18
 
18
- var fails$f = fails$g;
19
+ var fails$m = fails$n;
19
20
 
20
- var functionBindNative = !fails$f(function () {
21
+ var functionBindNative = !fails$m(function () {
21
22
  // eslint-disable-next-line es/no-function-prototype-bind -- safe
22
23
  var test = (function () { /* empty */ }).bind();
23
24
  // eslint-disable-next-line no-prototype-builtins -- safe
@@ -27,63 +28,63 @@ var functionBindNative = !fails$f(function () {
27
28
  var NATIVE_BIND$3 = functionBindNative;
28
29
 
29
30
  var FunctionPrototype$2 = Function.prototype;
30
- var call$f = FunctionPrototype$2.call;
31
- 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);
32
33
 
33
34
  var functionUncurryThis = NATIVE_BIND$3 ? uncurryThisWithBind : function (fn) {
34
35
  return function () {
35
- return call$f.apply(fn, arguments);
36
+ return call$i.apply(fn, arguments);
36
37
  };
37
38
  };
38
39
 
39
- var uncurryThis$i = functionUncurryThis;
40
+ var uncurryThis$m = functionUncurryThis;
40
41
 
41
- var toString$6 = uncurryThis$i({}.toString);
42
- var stringSlice$2 = uncurryThis$i(''.slice);
42
+ var toString$a = uncurryThis$m({}.toString);
43
+ var stringSlice$4 = uncurryThis$m(''.slice);
43
44
 
44
45
  var classofRaw$2 = function (it) {
45
- return stringSlice$2(toString$6(it), 8, -1);
46
+ return stringSlice$4(toString$a(it), 8, -1);
46
47
  };
47
48
 
48
- var uncurryThis$h = functionUncurryThis;
49
- var fails$e = fails$g;
50
- var classof$6 = classofRaw$2;
49
+ var uncurryThis$l = functionUncurryThis;
50
+ var fails$l = fails$n;
51
+ var classof$7 = classofRaw$2;
51
52
 
52
53
  var $Object$4 = Object;
53
- var split = uncurryThis$h(''.split);
54
+ var split = uncurryThis$l(''.split);
54
55
 
55
56
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
56
- var indexedObject = fails$e(function () {
57
+ var indexedObject = fails$l(function () {
57
58
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
58
59
  // eslint-disable-next-line no-prototype-builtins -- safe
59
60
  return !$Object$4('z').propertyIsEnumerable(0);
60
61
  }) ? function (it) {
61
- return classof$6(it) === 'String' ? split(it, '') : $Object$4(it);
62
+ return classof$7(it) === 'String' ? split(it, '') : $Object$4(it);
62
63
  } : $Object$4;
63
64
 
64
65
  // we can't use just `it == null` since of `document.all` special case
65
66
  // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
66
- var isNullOrUndefined$4 = function (it) {
67
+ var isNullOrUndefined$5 = function (it) {
67
68
  return it === null || it === undefined;
68
69
  };
69
70
 
70
- var isNullOrUndefined$3 = isNullOrUndefined$4;
71
+ var isNullOrUndefined$4 = isNullOrUndefined$5;
71
72
 
72
- var $TypeError$d = TypeError;
73
+ var $TypeError$f = TypeError;
73
74
 
74
75
  // `RequireObjectCoercible` abstract operation
75
76
  // https://tc39.es/ecma262/#sec-requireobjectcoercible
76
- var requireObjectCoercible$4 = function (it) {
77
- 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);
78
79
  return it;
79
80
  };
80
81
 
81
82
  // toObject with fallback for non-array-like ES3 strings
82
83
  var IndexedObject$1 = indexedObject;
83
- var requireObjectCoercible$3 = requireObjectCoercible$4;
84
+ var requireObjectCoercible$4 = requireObjectCoercible$5;
84
85
 
85
86
  var toIndexedObject$5 = function (it) {
86
- return IndexedObject$1(requireObjectCoercible$3(it));
87
+ return IndexedObject$1(requireObjectCoercible$4(it));
87
88
  };
88
89
 
89
90
  var check = function (it) {
@@ -91,7 +92,7 @@ var check = function (it) {
91
92
  };
92
93
 
93
94
  // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
94
- var global$k =
95
+ var global$o =
95
96
  // eslint-disable-next-line es/no-global-this -- safe
96
97
  check(typeof globalThis == 'object' && globalThis) ||
97
98
  check(typeof window == 'object' && window) ||
@@ -102,32 +103,32 @@ var global$k =
102
103
  // eslint-disable-next-line no-new-func -- fallback
103
104
  (function () { return this; })() || Function('return this')();
104
105
 
105
- var shared$3 = {exports: {}};
106
+ var shared$4 = {exports: {}};
106
107
 
107
- var global$j = global$k;
108
+ var global$n = global$o;
108
109
 
109
110
  // eslint-disable-next-line es/no-object-defineproperty -- safe
110
- var defineProperty$6 = Object.defineProperty;
111
+ var defineProperty$7 = Object.defineProperty;
111
112
 
112
113
  var defineGlobalProperty$3 = function (key, value) {
113
114
  try {
114
- defineProperty$6(global$j, key, { value: value, configurable: true, writable: true });
115
+ defineProperty$7(global$n, key, { value: value, configurable: true, writable: true });
115
116
  } catch (error) {
116
- global$j[key] = value;
117
+ global$n[key] = value;
117
118
  } return value;
118
119
  };
119
120
 
120
- var global$i = global$k;
121
+ var global$m = global$o;
121
122
  var defineGlobalProperty$2 = defineGlobalProperty$3;
122
123
 
123
124
  var SHARED = '__core-js_shared__';
124
- var store$3 = global$i[SHARED] || defineGlobalProperty$2(SHARED, {});
125
+ var store$3 = global$m[SHARED] || defineGlobalProperty$2(SHARED, {});
125
126
 
126
127
  var sharedStore = store$3;
127
128
 
128
129
  var store$2 = sharedStore;
129
130
 
130
- (shared$3.exports = function (key, value) {
131
+ (shared$4.exports = function (key, value) {
131
132
  return store$2[key] || (store$2[key] = value !== undefined ? value : {});
132
133
  })('versions', []).push({
133
134
  version: '3.33.3',
@@ -137,45 +138,45 @@ var store$2 = sharedStore;
137
138
  source: 'https://github.com/zloirock/core-js'
138
139
  });
139
140
 
140
- var requireObjectCoercible$2 = requireObjectCoercible$4;
141
+ var requireObjectCoercible$3 = requireObjectCoercible$5;
141
142
 
142
143
  var $Object$3 = Object;
143
144
 
144
145
  // `ToObject` abstract operation
145
146
  // https://tc39.es/ecma262/#sec-toobject
146
- var toObject$3 = function (argument) {
147
- return $Object$3(requireObjectCoercible$2(argument));
147
+ var toObject$4 = function (argument) {
148
+ return $Object$3(requireObjectCoercible$3(argument));
148
149
  };
149
150
 
150
- var uncurryThis$g = functionUncurryThis;
151
- var toObject$2 = toObject$3;
151
+ var uncurryThis$k = functionUncurryThis;
152
+ var toObject$3 = toObject$4;
152
153
 
153
- var hasOwnProperty = uncurryThis$g({}.hasOwnProperty);
154
+ var hasOwnProperty = uncurryThis$k({}.hasOwnProperty);
154
155
 
155
156
  // `HasOwnProperty` abstract operation
156
157
  // https://tc39.es/ecma262/#sec-hasownproperty
157
158
  // eslint-disable-next-line es/no-object-hasown -- safe
158
159
  var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
159
- return hasOwnProperty(toObject$2(it), key);
160
+ return hasOwnProperty(toObject$3(it), key);
160
161
  };
161
162
 
162
- var uncurryThis$f = functionUncurryThis;
163
+ var uncurryThis$j = functionUncurryThis;
163
164
 
164
165
  var id = 0;
165
166
  var postfix = Math.random();
166
- var toString$5 = uncurryThis$f(1.0.toString);
167
+ var toString$9 = uncurryThis$j(1.0.toString);
167
168
 
168
169
  var uid$2 = function (key) {
169
- return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$5(++id + postfix, 36);
170
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$9(++id + postfix, 36);
170
171
  };
171
172
 
172
173
  var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
173
174
 
174
- var global$h = global$k;
175
- var userAgent$3 = engineUserAgent;
175
+ var global$l = global$o;
176
+ var userAgent$5 = engineUserAgent;
176
177
 
177
- var process$3 = global$h.process;
178
- var Deno$1 = global$h.Deno;
178
+ var process$3 = global$l.process;
179
+ var Deno$1 = global$l.Deno;
179
180
  var versions = process$3 && process$3.versions || Deno$1 && Deno$1.version;
180
181
  var v8 = versions && versions.v8;
181
182
  var match, version;
@@ -189,10 +190,10 @@ if (v8) {
189
190
 
190
191
  // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
191
192
  // so check `userAgent` even if `.v8` exists, but 0
192
- if (!version && userAgent$3) {
193
- match = userAgent$3.match(/Edge\/(\d+)/);
193
+ if (!version && userAgent$5) {
194
+ match = userAgent$5.match(/Edge\/(\d+)/);
194
195
  if (!match || match[1] >= 74) {
195
- match = userAgent$3.match(/Chrome\/(\d+)/);
196
+ match = userAgent$5.match(/Chrome\/(\d+)/);
196
197
  if (match) version = +match[1];
197
198
  }
198
199
  }
@@ -201,13 +202,13 @@ var engineV8Version = version;
201
202
 
202
203
  /* eslint-disable es/no-symbol -- required for testing */
203
204
  var V8_VERSION$1 = engineV8Version;
204
- var fails$d = fails$g;
205
- var global$g = global$k;
205
+ var fails$k = fails$n;
206
+ var global$k = global$o;
206
207
 
207
- var $String$5 = global$g.String;
208
+ var $String$5 = global$k.String;
208
209
 
209
210
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
210
- var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$d(function () {
211
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$k(function () {
211
212
  var symbol = Symbol('symbol detection');
212
213
  // Chrome 38 Symbol has incorrect toString conversion
213
214
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
@@ -225,20 +226,20 @@ var useSymbolAsUid = NATIVE_SYMBOL$2
225
226
  && !Symbol.sham
226
227
  && typeof Symbol.iterator == 'symbol';
227
228
 
228
- var global$f = global$k;
229
- var shared$2 = shared$3.exports;
230
- var hasOwn$b = hasOwnProperty_1;
229
+ var global$j = global$o;
230
+ var shared$3 = shared$4.exports;
231
+ var hasOwn$c = hasOwnProperty_1;
231
232
  var uid$1 = uid$2;
232
233
  var NATIVE_SYMBOL$1 = symbolConstructorDetection;
233
234
  var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
234
235
 
235
- var Symbol$2 = global$f.Symbol;
236
- var WellKnownSymbolsStore = shared$2('wks');
236
+ var Symbol$2 = global$j.Symbol;
237
+ var WellKnownSymbolsStore = shared$3('wks');
237
238
  var createWellKnownSymbol = USE_SYMBOL_AS_UID$1 ? Symbol$2['for'] || Symbol$2 : Symbol$2 && Symbol$2.withoutSetter || uid$1;
238
239
 
239
- var wellKnownSymbol$g = function (name) {
240
- if (!hasOwn$b(WellKnownSymbolsStore, name)) {
241
- 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)
242
243
  ? Symbol$2[name]
243
244
  : createWellKnownSymbol('Symbol.' + name);
244
245
  } return WellKnownSymbolsStore[name];
@@ -261,50 +262,50 @@ var documentAll$1 = $documentAll$1.all;
261
262
 
262
263
  // `IsCallable` abstract operation
263
264
  // https://tc39.es/ecma262/#sec-iscallable
264
- var isCallable$l = $documentAll$1.IS_HTMLDDA ? function (argument) {
265
+ var isCallable$n = $documentAll$1.IS_HTMLDDA ? function (argument) {
265
266
  return typeof argument == 'function' || argument === documentAll$1;
266
267
  } : function (argument) {
267
268
  return typeof argument == 'function';
268
269
  };
269
270
 
270
- var isCallable$k = isCallable$l;
271
+ var isCallable$m = isCallable$n;
271
272
  var $documentAll = documentAll_1;
272
273
 
273
274
  var documentAll = $documentAll.all;
274
275
 
275
- var isObject$9 = $documentAll.IS_HTMLDDA ? function (it) {
276
- 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;
277
278
  } : function (it) {
278
- return typeof it == 'object' ? it !== null : isCallable$k(it);
279
+ return typeof it == 'object' ? it !== null : isCallable$m(it);
279
280
  };
280
281
 
281
- var isObject$8 = isObject$9;
282
+ var isObject$9 = isObject$a;
282
283
 
283
284
  var $String$4 = String;
284
- var $TypeError$c = TypeError;
285
+ var $TypeError$e = TypeError;
285
286
 
286
287
  // `Assert: Type(argument) is Object`
287
- var anObject$c = function (argument) {
288
- if (isObject$8(argument)) return argument;
289
- 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');
290
291
  };
291
292
 
292
293
  var objectDefineProperties = {};
293
294
 
294
- var fails$c = fails$g;
295
+ var fails$j = fails$n;
295
296
 
296
297
  // Detect IE8's incomplete defineProperty implementation
297
- var descriptors = !fails$c(function () {
298
+ var descriptors = !fails$j(function () {
298
299
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
299
300
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
300
301
  });
301
302
 
302
- var DESCRIPTORS$b = descriptors;
303
- var fails$b = fails$g;
303
+ var DESCRIPTORS$c = descriptors;
304
+ var fails$i = fails$n;
304
305
 
305
306
  // V8 ~ Chrome 36-
306
307
  // https://bugs.chromium.org/p/v8/issues/detail?id=3334
307
- var v8PrototypeDefineBug = DESCRIPTORS$b && fails$b(function () {
308
+ var v8PrototypeDefineBug = DESCRIPTORS$c && fails$i(function () {
308
309
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
309
310
  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
310
311
  value: 42,
@@ -314,23 +315,23 @@ var v8PrototypeDefineBug = DESCRIPTORS$b && fails$b(function () {
314
315
 
315
316
  var objectDefineProperty = {};
316
317
 
317
- var global$e = global$k;
318
- var isObject$7 = isObject$9;
318
+ var global$i = global$o;
319
+ var isObject$8 = isObject$a;
319
320
 
320
- var document$3 = global$e.document;
321
+ var document$3 = global$i.document;
321
322
  // typeof document.createElement is 'object' in old IE
322
- 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);
323
324
 
324
325
  var documentCreateElement$2 = function (it) {
325
326
  return EXISTS$1 ? document$3.createElement(it) : {};
326
327
  };
327
328
 
328
- var DESCRIPTORS$a = descriptors;
329
- var fails$a = fails$g;
329
+ var DESCRIPTORS$b = descriptors;
330
+ var fails$h = fails$n;
330
331
  var createElement$1 = documentCreateElement$2;
331
332
 
332
333
  // Thanks to IE8 for its funny defineProperty
333
- var ie8DomDefine = !DESCRIPTORS$a && !fails$a(function () {
334
+ var ie8DomDefine = !DESCRIPTORS$b && !fails$h(function () {
334
335
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
335
336
  return Object.defineProperty(createElement$1('div'), 'a', {
336
337
  get: function () { return 7; }
@@ -339,30 +340,30 @@ var ie8DomDefine = !DESCRIPTORS$a && !fails$a(function () {
339
340
 
340
341
  var NATIVE_BIND$2 = functionBindNative;
341
342
 
342
- var call$e = Function.prototype.call;
343
+ var call$h = Function.prototype.call;
343
344
 
344
- var functionCall = NATIVE_BIND$2 ? call$e.bind(call$e) : function () {
345
- 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);
346
347
  };
347
348
 
348
- var global$d = global$k;
349
- var isCallable$j = isCallable$l;
349
+ var global$h = global$o;
350
+ var isCallable$l = isCallable$n;
350
351
 
351
352
  var aFunction = function (argument) {
352
- return isCallable$j(argument) ? argument : undefined;
353
+ return isCallable$l(argument) ? argument : undefined;
353
354
  };
354
355
 
355
356
  var getBuiltIn$7 = function (namespace, method) {
356
- 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];
357
358
  };
358
359
 
359
- var uncurryThis$e = functionUncurryThis;
360
+ var uncurryThis$i = functionUncurryThis;
360
361
 
361
- var objectIsPrototypeOf = uncurryThis$e({}.isPrototypeOf);
362
+ var objectIsPrototypeOf = uncurryThis$i({}.isPrototypeOf);
362
363
 
363
364
  var getBuiltIn$6 = getBuiltIn$7;
364
- var isCallable$i = isCallable$l;
365
- var isPrototypeOf$4 = objectIsPrototypeOf;
365
+ var isCallable$k = isCallable$n;
366
+ var isPrototypeOf$5 = objectIsPrototypeOf;
366
367
  var USE_SYMBOL_AS_UID = useSymbolAsUid;
367
368
 
368
369
  var $Object$2 = Object;
@@ -371,12 +372,12 @@ var isSymbol$2 = USE_SYMBOL_AS_UID ? function (it) {
371
372
  return typeof it == 'symbol';
372
373
  } : function (it) {
373
374
  var $Symbol = getBuiltIn$6('Symbol');
374
- return isCallable$i($Symbol) && isPrototypeOf$4($Symbol.prototype, $Object$2(it));
375
+ return isCallable$k($Symbol) && isPrototypeOf$5($Symbol.prototype, $Object$2(it));
375
376
  };
376
377
 
377
378
  var $String$3 = String;
378
379
 
379
- var tryToString$4 = function (argument) {
380
+ var tryToString$5 = function (argument) {
380
381
  try {
381
382
  return $String$3(argument);
382
383
  } catch (error) {
@@ -384,64 +385,64 @@ var tryToString$4 = function (argument) {
384
385
  }
385
386
  };
386
387
 
387
- var isCallable$h = isCallable$l;
388
- var tryToString$3 = tryToString$4;
388
+ var isCallable$j = isCallable$n;
389
+ var tryToString$4 = tryToString$5;
389
390
 
390
- var $TypeError$b = TypeError;
391
+ var $TypeError$d = TypeError;
391
392
 
392
393
  // `Assert: IsCallable(argument) is true`
393
- var aCallable$8 = function (argument) {
394
- if (isCallable$h(argument)) return argument;
395
- 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');
396
397
  };
397
398
 
398
- var aCallable$7 = aCallable$8;
399
- var isNullOrUndefined$2 = isNullOrUndefined$4;
399
+ var aCallable$8 = aCallable$9;
400
+ var isNullOrUndefined$3 = isNullOrUndefined$5;
400
401
 
401
402
  // `GetMethod` abstract operation
402
403
  // https://tc39.es/ecma262/#sec-getmethod
403
- var getMethod$3 = function (V, P) {
404
+ var getMethod$4 = function (V, P) {
404
405
  var func = V[P];
405
- return isNullOrUndefined$2(func) ? undefined : aCallable$7(func);
406
+ return isNullOrUndefined$3(func) ? undefined : aCallable$8(func);
406
407
  };
407
408
 
408
- var call$d = functionCall;
409
- var isCallable$g = isCallable$l;
410
- var isObject$6 = isObject$9;
409
+ var call$g = functionCall;
410
+ var isCallable$i = isCallable$n;
411
+ var isObject$7 = isObject$a;
411
412
 
412
- var $TypeError$a = TypeError;
413
+ var $TypeError$c = TypeError;
413
414
 
414
415
  // `OrdinaryToPrimitive` abstract operation
415
416
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
416
417
  var ordinaryToPrimitive$1 = function (input, pref) {
417
418
  var fn, val;
418
- if (pref === 'string' && isCallable$g(fn = input.toString) && !isObject$6(val = call$d(fn, input))) return val;
419
- if (isCallable$g(fn = input.valueOf) && !isObject$6(val = call$d(fn, input))) return val;
420
- if (pref !== 'string' && isCallable$g(fn = input.toString) && !isObject$6(val = call$d(fn, input))) return val;
421
- 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");
422
423
  };
423
424
 
424
- var call$c = functionCall;
425
- var isObject$5 = isObject$9;
425
+ var call$f = functionCall;
426
+ var isObject$6 = isObject$a;
426
427
  var isSymbol$1 = isSymbol$2;
427
- var getMethod$2 = getMethod$3;
428
+ var getMethod$3 = getMethod$4;
428
429
  var ordinaryToPrimitive = ordinaryToPrimitive$1;
429
- var wellKnownSymbol$f = wellKnownSymbol$g;
430
+ var wellKnownSymbol$h = wellKnownSymbol$i;
430
431
 
431
- var $TypeError$9 = TypeError;
432
- var TO_PRIMITIVE = wellKnownSymbol$f('toPrimitive');
432
+ var $TypeError$b = TypeError;
433
+ var TO_PRIMITIVE = wellKnownSymbol$h('toPrimitive');
433
434
 
434
435
  // `ToPrimitive` abstract operation
435
436
  // https://tc39.es/ecma262/#sec-toprimitive
436
437
  var toPrimitive$1 = function (input, pref) {
437
- if (!isObject$5(input) || isSymbol$1(input)) return input;
438
- 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);
439
440
  var result;
440
441
  if (exoticToPrim) {
441
442
  if (pref === undefined) pref = 'default';
442
- result = call$c(exoticToPrim, input, pref);
443
- if (!isObject$5(result) || isSymbol$1(result)) return result;
444
- 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");
445
446
  }
446
447
  if (pref === undefined) pref = 'number';
447
448
  return ordinaryToPrimitive(input, pref);
@@ -452,18 +453,18 @@ var isSymbol = isSymbol$2;
452
453
 
453
454
  // `ToPropertyKey` abstract operation
454
455
  // https://tc39.es/ecma262/#sec-topropertykey
455
- var toPropertyKey$2 = function (argument) {
456
+ var toPropertyKey$3 = function (argument) {
456
457
  var key = toPrimitive(argument, 'string');
457
458
  return isSymbol(key) ? key : key + '';
458
459
  };
459
460
 
460
- var DESCRIPTORS$9 = descriptors;
461
+ var DESCRIPTORS$a = descriptors;
461
462
  var IE8_DOM_DEFINE$1 = ie8DomDefine;
462
463
  var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
463
- var anObject$b = anObject$c;
464
- var toPropertyKey$1 = toPropertyKey$2;
464
+ var anObject$d = anObject$e;
465
+ var toPropertyKey$2 = toPropertyKey$3;
465
466
 
466
- var $TypeError$8 = TypeError;
467
+ var $TypeError$a = TypeError;
467
468
  // eslint-disable-next-line es/no-object-defineproperty -- safe
468
469
  var $defineProperty = Object.defineProperty;
469
470
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
@@ -474,10 +475,10 @@ var WRITABLE = 'writable';
474
475
 
475
476
  // `Object.defineProperty` method
476
477
  // https://tc39.es/ecma262/#sec-object.defineproperty
477
- objectDefineProperty.f = DESCRIPTORS$9 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
478
- anObject$b(O);
479
- P = toPropertyKey$1(P);
480
- 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);
481
482
  if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
482
483
  var current = $getOwnPropertyDescriptor$1(O, P);
483
484
  if (current && current[WRITABLE]) {
@@ -490,26 +491,26 @@ objectDefineProperty.f = DESCRIPTORS$9 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
490
491
  }
491
492
  } return $defineProperty(O, P, Attributes);
492
493
  } : $defineProperty : function defineProperty(O, P, Attributes) {
493
- anObject$b(O);
494
- P = toPropertyKey$1(P);
495
- anObject$b(Attributes);
494
+ anObject$d(O);
495
+ P = toPropertyKey$2(P);
496
+ anObject$d(Attributes);
496
497
  if (IE8_DOM_DEFINE$1) try {
497
498
  return $defineProperty(O, P, Attributes);
498
499
  } catch (error) { /* empty */ }
499
- 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');
500
501
  if ('value' in Attributes) O[P] = Attributes.value;
501
502
  return O;
502
503
  };
503
504
 
504
505
  var ceil = Math.ceil;
505
- var floor = Math.floor;
506
+ var floor$1 = Math.floor;
506
507
 
507
508
  // `Math.trunc` method
508
509
  // https://tc39.es/ecma262/#sec-math.trunc
509
510
  // eslint-disable-next-line es/no-math-trunc -- safe
510
511
  var mathTrunc = Math.trunc || function trunc(x) {
511
512
  var n = +x;
512
- return (n > 0 ? floor : ceil)(n);
513
+ return (n > 0 ? floor$1 : ceil)(n);
513
514
  };
514
515
 
515
516
  var trunc = mathTrunc;
@@ -524,15 +525,15 @@ var toIntegerOrInfinity$2 = function (argument) {
524
525
 
525
526
  var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
526
527
 
527
- var max = Math.max;
528
+ var max$1 = Math.max;
528
529
  var min$1 = Math.min;
529
530
 
530
531
  // Helper for a popular repeating case of the spec:
531
532
  // Let integer be ? ToInteger(index).
532
533
  // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
533
- var toAbsoluteIndex$1 = function (index, length) {
534
+ var toAbsoluteIndex$2 = function (index, length) {
534
535
  var integer = toIntegerOrInfinity$1(index);
535
- return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
536
+ return integer < 0 ? max$1(integer + length, 0) : min$1(integer, length);
536
537
  };
537
538
 
538
539
  var toIntegerOrInfinity = toIntegerOrInfinity$2;
@@ -549,20 +550,20 @@ var toLength = toLength$1;
549
550
 
550
551
  // `LengthOfArrayLike` abstract operation
551
552
  // https://tc39.es/ecma262/#sec-lengthofarraylike
552
- var lengthOfArrayLike$2 = function (obj) {
553
+ var lengthOfArrayLike$4 = function (obj) {
553
554
  return toLength(obj.length);
554
555
  };
555
556
 
556
557
  var toIndexedObject$4 = toIndexedObject$5;
557
- var toAbsoluteIndex = toAbsoluteIndex$1;
558
- var lengthOfArrayLike$1 = lengthOfArrayLike$2;
558
+ var toAbsoluteIndex$1 = toAbsoluteIndex$2;
559
+ var lengthOfArrayLike$3 = lengthOfArrayLike$4;
559
560
 
560
561
  // `Array.prototype.{ indexOf, includes }` methods implementation
561
562
  var createMethod$1 = function (IS_INCLUDES) {
562
563
  return function ($this, el, fromIndex) {
563
564
  var O = toIndexedObject$4($this);
564
- var length = lengthOfArrayLike$1(O);
565
- var index = toAbsoluteIndex(fromIndex, length);
565
+ var length = lengthOfArrayLike$3(O);
566
+ var index = toAbsoluteIndex$1(fromIndex, length);
566
567
  var value;
567
568
  // Array#includes uses SameValueZero equality algorithm
568
569
  // eslint-disable-next-line no-self-compare -- NaN check
@@ -588,23 +589,23 @@ var arrayIncludes = {
588
589
 
589
590
  var hiddenKeys$4 = {};
590
591
 
591
- var uncurryThis$d = functionUncurryThis;
592
- var hasOwn$a = hasOwnProperty_1;
592
+ var uncurryThis$h = functionUncurryThis;
593
+ var hasOwn$b = hasOwnProperty_1;
593
594
  var toIndexedObject$3 = toIndexedObject$5;
594
- var indexOf = arrayIncludes.indexOf;
595
+ var indexOf$1 = arrayIncludes.indexOf;
595
596
  var hiddenKeys$3 = hiddenKeys$4;
596
597
 
597
- var push = uncurryThis$d([].push);
598
+ var push$1 = uncurryThis$h([].push);
598
599
 
599
600
  var objectKeysInternal = function (object, names) {
600
601
  var O = toIndexedObject$3(object);
601
602
  var i = 0;
602
603
  var result = [];
603
604
  var key;
604
- 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);
605
606
  // Don't enum bug & hidden keys
606
- while (names.length > i) if (hasOwn$a(O, key = names[i++])) {
607
- ~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);
608
609
  }
609
610
  return result;
610
611
  };
@@ -630,24 +631,24 @@ var objectKeys$2 = Object.keys || function keys(O) {
630
631
  return internalObjectKeys$1(O, enumBugKeys$2);
631
632
  };
632
633
 
633
- var DESCRIPTORS$8 = descriptors;
634
+ var DESCRIPTORS$9 = descriptors;
634
635
  var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
635
- var definePropertyModule$3 = objectDefineProperty;
636
- var anObject$a = anObject$c;
636
+ var definePropertyModule$4 = objectDefineProperty;
637
+ var anObject$c = anObject$e;
637
638
  var toIndexedObject$2 = toIndexedObject$5;
638
639
  var objectKeys$1 = objectKeys$2;
639
640
 
640
641
  // `Object.defineProperties` method
641
642
  // https://tc39.es/ecma262/#sec-object.defineproperties
642
643
  // eslint-disable-next-line es/no-object-defineproperties -- safe
643
- objectDefineProperties.f = DESCRIPTORS$8 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
644
- anObject$a(O);
644
+ objectDefineProperties.f = DESCRIPTORS$9 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
645
+ anObject$c(O);
645
646
  var props = toIndexedObject$2(Properties);
646
647
  var keys = objectKeys$1(Properties);
647
648
  var length = keys.length;
648
649
  var index = 0;
649
650
  var key;
650
- 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]);
651
652
  return O;
652
653
  };
653
654
 
@@ -655,17 +656,17 @@ var getBuiltIn$5 = getBuiltIn$7;
655
656
 
656
657
  var html$2 = getBuiltIn$5('document', 'documentElement');
657
658
 
658
- var shared$1 = shared$3.exports;
659
+ var shared$2 = shared$4.exports;
659
660
  var uid = uid$2;
660
661
 
661
- var keys = shared$1('keys');
662
+ var keys$1 = shared$2('keys');
662
663
 
663
664
  var sharedKey$3 = function (key) {
664
- return keys[key] || (keys[key] = uid(key));
665
+ return keys$1[key] || (keys$1[key] = uid(key));
665
666
  };
666
667
 
667
668
  /* global ActiveXObject -- old IE, WSH */
668
- var anObject$9 = anObject$c;
669
+ var anObject$b = anObject$e;
669
670
  var definePropertiesModule = objectDefineProperties;
670
671
  var enumBugKeys$1 = enumBugKeys$3;
671
672
  var hiddenKeys$2 = hiddenKeys$4;
@@ -739,7 +740,7 @@ hiddenKeys$2[IE_PROTO$1] = true;
739
740
  var objectCreate = Object.create || function create(O, Properties) {
740
741
  var result;
741
742
  if (O !== null) {
742
- EmptyConstructor[PROTOTYPE] = anObject$9(O);
743
+ EmptyConstructor[PROTOTYPE] = anObject$b(O);
743
744
  result = new EmptyConstructor();
744
745
  EmptyConstructor[PROTOTYPE] = null;
745
746
  // add "__proto__" for Object.getPrototypeOf polyfill
@@ -748,19 +749,19 @@ var objectCreate = Object.create || function create(O, Properties) {
748
749
  return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
749
750
  };
750
751
 
751
- var wellKnownSymbol$e = wellKnownSymbol$g;
752
- var create$1 = objectCreate;
753
- var defineProperty$5 = objectDefineProperty.f;
752
+ var wellKnownSymbol$g = wellKnownSymbol$i;
753
+ var create$2 = objectCreate;
754
+ var defineProperty$6 = objectDefineProperty.f;
754
755
 
755
- var UNSCOPABLES = wellKnownSymbol$e('unscopables');
756
+ var UNSCOPABLES = wellKnownSymbol$g('unscopables');
756
757
  var ArrayPrototype$1 = Array.prototype;
757
758
 
758
759
  // Array.prototype[@@unscopables]
759
760
  // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
760
761
  if (ArrayPrototype$1[UNSCOPABLES] === undefined) {
761
- defineProperty$5(ArrayPrototype$1, UNSCOPABLES, {
762
+ defineProperty$6(ArrayPrototype$1, UNSCOPABLES, {
762
763
  configurable: true,
763
- value: create$1(null)
764
+ value: create$2(null)
764
765
  });
765
766
  }
766
767
 
@@ -771,14 +772,14 @@ var addToUnscopables$2 = function (key) {
771
772
 
772
773
  var iterators = {};
773
774
 
774
- var global$c = global$k;
775
- var isCallable$f = isCallable$l;
775
+ var global$g = global$o;
776
+ var isCallable$h = isCallable$n;
776
777
 
777
- var WeakMap$2 = global$c.WeakMap;
778
+ var WeakMap$1 = global$g.WeakMap;
778
779
 
779
- var weakMapBasicDetection = isCallable$f(WeakMap$2) && /native code/.test(String(WeakMap$2));
780
+ var weakMapBasicDetection = isCallable$h(WeakMap$1) && /native code/.test(String(WeakMap$1));
780
781
 
781
- var createPropertyDescriptor$3 = function (bitmap, value) {
782
+ var createPropertyDescriptor$4 = function (bitmap, value) {
782
783
  return {
783
784
  enumerable: !(bitmap & 1),
784
785
  configurable: !(bitmap & 2),
@@ -787,29 +788,29 @@ var createPropertyDescriptor$3 = function (bitmap, value) {
787
788
  };
788
789
  };
789
790
 
790
- var DESCRIPTORS$7 = descriptors;
791
- var definePropertyModule$2 = objectDefineProperty;
792
- var createPropertyDescriptor$2 = createPropertyDescriptor$3;
791
+ var DESCRIPTORS$8 = descriptors;
792
+ var definePropertyModule$3 = objectDefineProperty;
793
+ var createPropertyDescriptor$3 = createPropertyDescriptor$4;
793
794
 
794
- var createNonEnumerableProperty$4 = DESCRIPTORS$7 ? function (object, key, value) {
795
- 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));
796
797
  } : function (object, key, value) {
797
798
  object[key] = value;
798
799
  return object;
799
800
  };
800
801
 
801
802
  var NATIVE_WEAK_MAP = weakMapBasicDetection;
802
- var global$b = global$k;
803
- var isObject$4 = isObject$9;
804
- var createNonEnumerableProperty$3 = createNonEnumerableProperty$4;
805
- var hasOwn$9 = hasOwnProperty_1;
806
- 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;
807
808
  var sharedKey$1 = sharedKey$3;
808
809
  var hiddenKeys$1 = hiddenKeys$4;
809
810
 
810
811
  var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
811
- var TypeError$2 = global$b.TypeError;
812
- var WeakMap$1 = global$b.WeakMap;
812
+ var TypeError$2 = global$f.TypeError;
813
+ var WeakMap = global$f.WeakMap;
813
814
  var set$1, get, has;
814
815
 
815
816
  var enforce = function (it) {
@@ -819,14 +820,14 @@ var enforce = function (it) {
819
820
  var getterFor = function (TYPE) {
820
821
  return function (it) {
821
822
  var state;
822
- if (!isObject$4(it) || (state = get(it)).type !== TYPE) {
823
+ if (!isObject$5(it) || (state = get(it)).type !== TYPE) {
823
824
  throw new TypeError$2('Incompatible receiver, ' + TYPE + ' required');
824
825
  } return state;
825
826
  };
826
827
  };
827
828
 
828
- if (NATIVE_WEAK_MAP || shared.state) {
829
- var store$1 = shared.state || (shared.state = new WeakMap$1());
829
+ if (NATIVE_WEAK_MAP || shared$1.state) {
830
+ var store$1 = shared$1.state || (shared$1.state = new WeakMap());
830
831
  /* eslint-disable no-self-assign -- prototype methods protection */
831
832
  store$1.get = store$1.get;
832
833
  store$1.has = store$1.has;
@@ -848,16 +849,16 @@ if (NATIVE_WEAK_MAP || shared.state) {
848
849
  var STATE = sharedKey$1('state');
849
850
  hiddenKeys$1[STATE] = true;
850
851
  set$1 = function (it, metadata) {
851
- 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);
852
853
  metadata.facade = it;
853
- createNonEnumerableProperty$3(it, STATE, metadata);
854
+ createNonEnumerableProperty$5(it, STATE, metadata);
854
855
  return metadata;
855
856
  };
856
857
  get = function (it) {
857
- return hasOwn$9(it, STATE) ? it[STATE] : {};
858
+ return hasOwn$a(it, STATE) ? it[STATE] : {};
858
859
  };
859
860
  has = function (it) {
860
- return hasOwn$9(it, STATE);
861
+ return hasOwn$a(it, STATE);
861
862
  };
862
863
  }
863
864
 
@@ -887,13 +888,13 @@ objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
887
888
  return !!descriptor && descriptor.enumerable;
888
889
  } : $propertyIsEnumerable;
889
890
 
890
- var DESCRIPTORS$6 = descriptors;
891
- var call$b = functionCall;
891
+ var DESCRIPTORS$7 = descriptors;
892
+ var call$e = functionCall;
892
893
  var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
893
- var createPropertyDescriptor$1 = createPropertyDescriptor$3;
894
+ var createPropertyDescriptor$2 = createPropertyDescriptor$4;
894
895
  var toIndexedObject$1 = toIndexedObject$5;
895
- var toPropertyKey = toPropertyKey$2;
896
- var hasOwn$8 = hasOwnProperty_1;
896
+ var toPropertyKey$1 = toPropertyKey$3;
897
+ var hasOwn$9 = hasOwnProperty_1;
897
898
  var IE8_DOM_DEFINE = ie8DomDefine;
898
899
 
899
900
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
@@ -901,28 +902,28 @@ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
901
902
 
902
903
  // `Object.getOwnPropertyDescriptor` method
903
904
  // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
904
- objectGetOwnPropertyDescriptor.f = DESCRIPTORS$6 ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
905
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$7 ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
905
906
  O = toIndexedObject$1(O);
906
- P = toPropertyKey(P);
907
+ P = toPropertyKey$1(P);
907
908
  if (IE8_DOM_DEFINE) try {
908
909
  return $getOwnPropertyDescriptor(O, P);
909
910
  } catch (error) { /* empty */ }
910
- 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]);
911
912
  };
912
913
 
913
914
  var makeBuiltIn$3 = {exports: {}};
914
915
 
915
- var DESCRIPTORS$5 = descriptors;
916
- var hasOwn$7 = hasOwnProperty_1;
916
+ var DESCRIPTORS$6 = descriptors;
917
+ var hasOwn$8 = hasOwnProperty_1;
917
918
 
918
919
  var FunctionPrototype$1 = Function.prototype;
919
920
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
920
- var getDescriptor = DESCRIPTORS$5 && Object.getOwnPropertyDescriptor;
921
+ var getDescriptor = DESCRIPTORS$6 && Object.getOwnPropertyDescriptor;
921
922
 
922
- var EXISTS = hasOwn$7(FunctionPrototype$1, 'name');
923
+ var EXISTS = hasOwn$8(FunctionPrototype$1, 'name');
923
924
  // additional protection from minified / mangled / dropped function names
924
925
  var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
925
- 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));
926
927
 
927
928
  var functionName = {
928
929
  EXISTS: EXISTS,
@@ -930,14 +931,14 @@ var functionName = {
930
931
  CONFIGURABLE: CONFIGURABLE
931
932
  };
932
933
 
933
- var uncurryThis$c = functionUncurryThis;
934
- var isCallable$e = isCallable$l;
934
+ var uncurryThis$g = functionUncurryThis;
935
+ var isCallable$g = isCallable$n;
935
936
  var store = sharedStore;
936
937
 
937
- var functionToString = uncurryThis$c(Function.toString);
938
+ var functionToString = uncurryThis$g(Function.toString);
938
939
 
939
940
  // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
940
- if (!isCallable$e(store.inspectSource)) {
941
+ if (!isCallable$g(store.inspectSource)) {
941
942
  store.inspectSource = function (it) {
942
943
  return functionToString(it);
943
944
  };
@@ -945,51 +946,51 @@ if (!isCallable$e(store.inspectSource)) {
945
946
 
946
947
  var inspectSource$3 = store.inspectSource;
947
948
 
948
- var uncurryThis$b = functionUncurryThis;
949
- var fails$9 = fails$g;
950
- var isCallable$d = isCallable$l;
951
- var hasOwn$6 = hasOwnProperty_1;
952
- 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;
953
954
  var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
954
955
  var inspectSource$2 = inspectSource$3;
955
956
  var InternalStateModule$2 = internalState;
956
957
 
957
- var enforceInternalState = InternalStateModule$2.enforce;
958
- var getInternalState$1 = InternalStateModule$2.get;
958
+ var enforceInternalState$1 = InternalStateModule$2.enforce;
959
+ var getInternalState$2 = InternalStateModule$2.get;
959
960
  var $String$2 = String;
960
961
  // eslint-disable-next-line es/no-object-defineproperty -- safe
961
- var defineProperty$4 = Object.defineProperty;
962
- var stringSlice$1 = uncurryThis$b(''.slice);
963
- var replace$2 = uncurryThis$b(''.replace);
964
- 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);
965
966
 
966
- var CONFIGURABLE_LENGTH = DESCRIPTORS$4 && !fails$9(function () {
967
- 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;
968
969
  });
969
970
 
970
971
  var TEMPLATE = String(String).split('String');
971
972
 
972
973
  var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) {
973
- if (stringSlice$1($String$2(name), 0, 7) === 'Symbol(') {
974
- 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') + ']';
975
976
  }
976
977
  if (options && options.getter) name = 'get ' + name;
977
978
  if (options && options.setter) name = 'set ' + name;
978
- if (!hasOwn$6(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
979
- 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 });
980
981
  else value.name = name;
981
982
  }
982
- if (CONFIGURABLE_LENGTH && options && hasOwn$6(options, 'arity') && value.length !== options.arity) {
983
- 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 });
984
985
  }
985
986
  try {
986
- if (options && hasOwn$6(options, 'constructor') && options.constructor) {
987
- 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 });
988
989
  // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
989
990
  } else if (value.prototype) value.prototype = undefined;
990
991
  } catch (error) { /* empty */ }
991
- var state = enforceInternalState(value);
992
- if (!hasOwn$6(state, 'source')) {
992
+ var state = enforceInternalState$1(value);
993
+ if (!hasOwn$7(state, 'source')) {
993
994
  state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
994
995
  } return value;
995
996
  };
@@ -997,19 +998,19 @@ var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) {
997
998
  // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
998
999
  // eslint-disable-next-line no-extend-native -- required
999
1000
  Function.prototype.toString = makeBuiltIn$2(function toString() {
1000
- return isCallable$d(this) && getInternalState$1(this).source || inspectSource$2(this);
1001
+ return isCallable$f(this) && getInternalState$2(this).source || inspectSource$2(this);
1001
1002
  }, 'toString');
1002
1003
 
1003
- var isCallable$c = isCallable$l;
1004
- var definePropertyModule$1 = objectDefineProperty;
1004
+ var isCallable$e = isCallable$n;
1005
+ var definePropertyModule$2 = objectDefineProperty;
1005
1006
  var makeBuiltIn$1 = makeBuiltIn$3.exports;
1006
1007
  var defineGlobalProperty$1 = defineGlobalProperty$3;
1007
1008
 
1008
- var defineBuiltIn$6 = function (O, key, value, options) {
1009
+ var defineBuiltIn$8 = function (O, key, value, options) {
1009
1010
  if (!options) options = {};
1010
1011
  var simple = options.enumerable;
1011
1012
  var name = options.name !== undefined ? options.name : key;
1012
- if (isCallable$c(value)) makeBuiltIn$1(value, name, options);
1013
+ if (isCallable$e(value)) makeBuiltIn$1(value, name, options);
1013
1014
  if (options.global) {
1014
1015
  if (simple) O[key] = value;
1015
1016
  else defineGlobalProperty$1(key, value);
@@ -1019,7 +1020,7 @@ var defineBuiltIn$6 = function (O, key, value, options) {
1019
1020
  else if (O[key]) simple = true;
1020
1021
  } catch (error) { /* empty */ }
1021
1022
  if (simple) O[key] = value;
1022
- else definePropertyModule$1.f(O, key, {
1023
+ else definePropertyModule$2.f(O, key, {
1023
1024
  value: value,
1024
1025
  enumerable: false,
1025
1026
  configurable: !options.nonConfigurable,
@@ -1048,67 +1049,67 @@ var objectGetOwnPropertySymbols = {};
1048
1049
  objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
1049
1050
 
1050
1051
  var getBuiltIn$4 = getBuiltIn$7;
1051
- var uncurryThis$a = functionUncurryThis;
1052
+ var uncurryThis$e = functionUncurryThis;
1052
1053
  var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
1053
1054
  var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
1054
- var anObject$8 = anObject$c;
1055
+ var anObject$a = anObject$e;
1055
1056
 
1056
- var concat$1 = uncurryThis$a([].concat);
1057
+ var concat$1 = uncurryThis$e([].concat);
1057
1058
 
1058
1059
  // all object keys, includes non-enumerable and symbols
1059
1060
  var ownKeys$1 = getBuiltIn$4('Reflect', 'ownKeys') || function ownKeys(it) {
1060
- var keys = getOwnPropertyNamesModule.f(anObject$8(it));
1061
+ var keys = getOwnPropertyNamesModule.f(anObject$a(it));
1061
1062
  var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
1062
1063
  return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
1063
1064
  };
1064
1065
 
1065
- var hasOwn$5 = hasOwnProperty_1;
1066
+ var hasOwn$6 = hasOwnProperty_1;
1066
1067
  var ownKeys = ownKeys$1;
1067
1068
  var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
1068
- var definePropertyModule = objectDefineProperty;
1069
+ var definePropertyModule$1 = objectDefineProperty;
1069
1070
 
1070
1071
  var copyConstructorProperties$2 = function (target, source, exceptions) {
1071
1072
  var keys = ownKeys(source);
1072
- var defineProperty = definePropertyModule.f;
1073
+ var defineProperty = definePropertyModule$1.f;
1073
1074
  var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
1074
1075
  for (var i = 0; i < keys.length; i++) {
1075
1076
  var key = keys[i];
1076
- if (!hasOwn$5(target, key) && !(exceptions && hasOwn$5(exceptions, key))) {
1077
+ if (!hasOwn$6(target, key) && !(exceptions && hasOwn$6(exceptions, key))) {
1077
1078
  defineProperty(target, key, getOwnPropertyDescriptor(source, key));
1078
1079
  }
1079
1080
  }
1080
1081
  };
1081
1082
 
1082
- var fails$8 = fails$g;
1083
- var isCallable$b = isCallable$l;
1083
+ var fails$f = fails$n;
1084
+ var isCallable$d = isCallable$n;
1084
1085
 
1085
1086
  var replacement = /#|\.prototype\./;
1086
1087
 
1087
- var isForced$2 = function (feature, detection) {
1088
+ var isForced$3 = function (feature, detection) {
1088
1089
  var value = data[normalize(feature)];
1089
1090
  return value === POLYFILL ? true
1090
1091
  : value === NATIVE ? false
1091
- : isCallable$b(detection) ? fails$8(detection)
1092
+ : isCallable$d(detection) ? fails$f(detection)
1092
1093
  : !!detection;
1093
1094
  };
1094
1095
 
1095
- var normalize = isForced$2.normalize = function (string) {
1096
+ var normalize = isForced$3.normalize = function (string) {
1096
1097
  return String(string).replace(replacement, '.').toLowerCase();
1097
1098
  };
1098
1099
 
1099
- var data = isForced$2.data = {};
1100
- var NATIVE = isForced$2.NATIVE = 'N';
1101
- 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';
1102
1103
 
1103
- var isForced_1 = isForced$2;
1104
+ var isForced_1 = isForced$3;
1104
1105
 
1105
- var global$a = global$k;
1106
+ var global$e = global$o;
1106
1107
  var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
1107
- var createNonEnumerableProperty$2 = createNonEnumerableProperty$4;
1108
- var defineBuiltIn$5 = defineBuiltIn$6;
1108
+ var createNonEnumerableProperty$4 = createNonEnumerableProperty$6;
1109
+ var defineBuiltIn$7 = defineBuiltIn$8;
1109
1110
  var defineGlobalProperty = defineGlobalProperty$3;
1110
1111
  var copyConstructorProperties$1 = copyConstructorProperties$2;
1111
- var isForced$1 = isForced_1;
1112
+ var isForced$2 = isForced_1;
1112
1113
 
1113
1114
  /*
1114
1115
  options.target - name of the target object
@@ -1131,11 +1132,11 @@ var _export = function (options, source) {
1131
1132
  var STATIC = options.stat;
1132
1133
  var FORCED, target, key, targetProperty, sourceProperty, descriptor;
1133
1134
  if (GLOBAL) {
1134
- target = global$a;
1135
+ target = global$e;
1135
1136
  } else if (STATIC) {
1136
- target = global$a[TARGET] || defineGlobalProperty(TARGET, {});
1137
+ target = global$e[TARGET] || defineGlobalProperty(TARGET, {});
1137
1138
  } else {
1138
- target = (global$a[TARGET] || {}).prototype;
1139
+ target = (global$e[TARGET] || {}).prototype;
1139
1140
  }
1140
1141
  if (target) for (key in source) {
1141
1142
  sourceProperty = source[key];
@@ -1143,7 +1144,7 @@ var _export = function (options, source) {
1143
1144
  descriptor = getOwnPropertyDescriptor$1(target, key);
1144
1145
  targetProperty = descriptor && descriptor.value;
1145
1146
  } else targetProperty = target[key];
1146
- FORCED = isForced$1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
1147
+ FORCED = isForced$2(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
1147
1148
  // contained in target
1148
1149
  if (!FORCED && targetProperty !== undefined) {
1149
1150
  if (typeof sourceProperty == typeof targetProperty) continue;
@@ -1151,24 +1152,24 @@ var _export = function (options, source) {
1151
1152
  }
1152
1153
  // add a flag to not completely full polyfills
1153
1154
  if (options.sham || (targetProperty && targetProperty.sham)) {
1154
- createNonEnumerableProperty$2(sourceProperty, 'sham', true);
1155
+ createNonEnumerableProperty$4(sourceProperty, 'sham', true);
1155
1156
  }
1156
- defineBuiltIn$5(target, key, sourceProperty, options);
1157
+ defineBuiltIn$7(target, key, sourceProperty, options);
1157
1158
  }
1158
1159
  };
1159
1160
 
1160
- var fails$7 = fails$g;
1161
+ var fails$e = fails$n;
1161
1162
 
1162
- var correctPrototypeGetter = !fails$7(function () {
1163
+ var correctPrototypeGetter = !fails$e(function () {
1163
1164
  function F() { /* empty */ }
1164
1165
  F.prototype.constructor = null;
1165
1166
  // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
1166
1167
  return Object.getPrototypeOf(new F()) !== F.prototype;
1167
1168
  });
1168
1169
 
1169
- var hasOwn$4 = hasOwnProperty_1;
1170
- var isCallable$a = isCallable$l;
1171
- var toObject$1 = toObject$3;
1170
+ var hasOwn$5 = hasOwnProperty_1;
1171
+ var isCallable$c = isCallable$n;
1172
+ var toObject$2 = toObject$4;
1172
1173
  var sharedKey = sharedKey$3;
1173
1174
  var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
1174
1175
 
@@ -1180,22 +1181,22 @@ var ObjectPrototype = $Object$1.prototype;
1180
1181
  // https://tc39.es/ecma262/#sec-object.getprototypeof
1181
1182
  // eslint-disable-next-line es/no-object-getprototypeof -- safe
1182
1183
  var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf : function (O) {
1183
- var object = toObject$1(O);
1184
- 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];
1185
1186
  var constructor = object.constructor;
1186
- if (isCallable$a(constructor) && object instanceof constructor) {
1187
+ if (isCallable$c(constructor) && object instanceof constructor) {
1187
1188
  return constructor.prototype;
1188
1189
  } return object instanceof $Object$1 ? ObjectPrototype : null;
1189
1190
  };
1190
1191
 
1191
- var fails$6 = fails$g;
1192
- var isCallable$9 = isCallable$l;
1193
- var isObject$3 = isObject$9;
1192
+ var fails$d = fails$n;
1193
+ var isCallable$b = isCallable$n;
1194
+ var isObject$4 = isObject$a;
1194
1195
  var getPrototypeOf$1 = objectGetPrototypeOf;
1195
- var defineBuiltIn$4 = defineBuiltIn$6;
1196
- var wellKnownSymbol$d = wellKnownSymbol$g;
1196
+ var defineBuiltIn$6 = defineBuiltIn$8;
1197
+ var wellKnownSymbol$f = wellKnownSymbol$i;
1197
1198
 
1198
- var ITERATOR$6 = wellKnownSymbol$d('iterator');
1199
+ var ITERATOR$6 = wellKnownSymbol$f('iterator');
1199
1200
  var BUGGY_SAFARI_ITERATORS$1 = false;
1200
1201
 
1201
1202
  // `%IteratorPrototype%` object
@@ -1213,7 +1214,7 @@ if ([].keys) {
1213
1214
  }
1214
1215
  }
1215
1216
 
1216
- var NEW_ITERATOR_PROTOTYPE = !isObject$3(IteratorPrototype$2) || fails$6(function () {
1217
+ var NEW_ITERATOR_PROTOTYPE = !isObject$4(IteratorPrototype$2) || fails$d(function () {
1217
1218
  var test = {};
1218
1219
  // FF44- legacy iterators case
1219
1220
  return IteratorPrototype$2[ITERATOR$6].call(test) !== test;
@@ -1223,8 +1224,8 @@ if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
1223
1224
 
1224
1225
  // `%IteratorPrototype%[@@iterator]()` method
1225
1226
  // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
1226
- if (!isCallable$9(IteratorPrototype$2[ITERATOR$6])) {
1227
- defineBuiltIn$4(IteratorPrototype$2, ITERATOR$6, function () {
1227
+ if (!isCallable$b(IteratorPrototype$2[ITERATOR$6])) {
1228
+ defineBuiltIn$6(IteratorPrototype$2, ITERATOR$6, function () {
1228
1229
  return this;
1229
1230
  });
1230
1231
  }
@@ -1234,22 +1235,22 @@ var iteratorsCore = {
1234
1235
  BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
1235
1236
  };
1236
1237
 
1237
- var defineProperty$3 = objectDefineProperty.f;
1238
- var hasOwn$3 = hasOwnProperty_1;
1239
- var wellKnownSymbol$c = wellKnownSymbol$g;
1238
+ var defineProperty$4 = objectDefineProperty.f;
1239
+ var hasOwn$4 = hasOwnProperty_1;
1240
+ var wellKnownSymbol$e = wellKnownSymbol$i;
1240
1241
 
1241
- var TO_STRING_TAG$3 = wellKnownSymbol$c('toStringTag');
1242
+ var TO_STRING_TAG$3 = wellKnownSymbol$e('toStringTag');
1242
1243
 
1243
1244
  var setToStringTag$3 = function (target, TAG, STATIC) {
1244
1245
  if (target && !STATIC) target = target.prototype;
1245
- if (target && !hasOwn$3(target, TO_STRING_TAG$3)) {
1246
- 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 });
1247
1248
  }
1248
1249
  };
1249
1250
 
1250
1251
  var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
1251
- var create = objectCreate;
1252
- var createPropertyDescriptor = createPropertyDescriptor$3;
1252
+ var create$1 = objectCreate;
1253
+ var createPropertyDescriptor$1 = createPropertyDescriptor$4;
1253
1254
  var setToStringTag$2 = setToStringTag$3;
1254
1255
  var Iterators$4 = iterators;
1255
1256
 
@@ -1257,35 +1258,35 @@ var returnThis$1 = function () { return this; };
1257
1258
 
1258
1259
  var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
1259
1260
  var TO_STRING_TAG = NAME + ' Iterator';
1260
- IteratorConstructor.prototype = create(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
1261
+ IteratorConstructor.prototype = create$1(IteratorPrototype$1, { next: createPropertyDescriptor$1(+!ENUMERABLE_NEXT, next) });
1261
1262
  setToStringTag$2(IteratorConstructor, TO_STRING_TAG, false);
1262
1263
  Iterators$4[TO_STRING_TAG] = returnThis$1;
1263
1264
  return IteratorConstructor;
1264
1265
  };
1265
1266
 
1266
- var uncurryThis$9 = functionUncurryThis;
1267
- var aCallable$6 = aCallable$8;
1267
+ var uncurryThis$d = functionUncurryThis;
1268
+ var aCallable$7 = aCallable$9;
1268
1269
 
1269
1270
  var functionUncurryThisAccessor = function (object, key, method) {
1270
1271
  try {
1271
1272
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1272
- return uncurryThis$9(aCallable$6(Object.getOwnPropertyDescriptor(object, key)[method]));
1273
+ return uncurryThis$d(aCallable$7(Object.getOwnPropertyDescriptor(object, key)[method]));
1273
1274
  } catch (error) { /* empty */ }
1274
1275
  };
1275
1276
 
1276
- var isCallable$8 = isCallable$l;
1277
+ var isCallable$a = isCallable$n;
1277
1278
 
1278
1279
  var $String$1 = String;
1279
- var $TypeError$7 = TypeError;
1280
+ var $TypeError$9 = TypeError;
1280
1281
 
1281
1282
  var aPossiblePrototype$1 = function (argument) {
1282
- if (typeof argument == 'object' || isCallable$8(argument)) return argument;
1283
- 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');
1284
1285
  };
1285
1286
 
1286
1287
  /* eslint-disable no-proto -- safe */
1287
1288
  var uncurryThisAccessor = functionUncurryThisAccessor;
1288
- var anObject$7 = anObject$c;
1289
+ var anObject$9 = anObject$e;
1289
1290
  var aPossiblePrototype = aPossiblePrototype$1;
1290
1291
 
1291
1292
  // `Object.setPrototypeOf` method
@@ -1302,7 +1303,7 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
1302
1303
  CORRECT_SETTER = test instanceof Array;
1303
1304
  } catch (error) { /* empty */ }
1304
1305
  return function setPrototypeOf(O, proto) {
1305
- anObject$7(O);
1306
+ anObject$9(O);
1306
1307
  aPossiblePrototype(proto);
1307
1308
  if (CORRECT_SETTER) setter(O, proto);
1308
1309
  else O.__proto__ = proto;
@@ -1310,17 +1311,17 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
1310
1311
  };
1311
1312
  }() : undefined);
1312
1313
 
1313
- var $$b = _export;
1314
- var call$a = functionCall;
1314
+ var $$d = _export;
1315
+ var call$d = functionCall;
1315
1316
  var FunctionName = functionName;
1316
- var isCallable$7 = isCallable$l;
1317
+ var isCallable$9 = isCallable$n;
1317
1318
  var createIteratorConstructor = iteratorCreateConstructor;
1318
1319
  var getPrototypeOf = objectGetPrototypeOf;
1319
- var setPrototypeOf$1 = objectSetPrototypeOf;
1320
+ var setPrototypeOf$2 = objectSetPrototypeOf;
1320
1321
  var setToStringTag$1 = setToStringTag$3;
1321
- var createNonEnumerableProperty$1 = createNonEnumerableProperty$4;
1322
- var defineBuiltIn$3 = defineBuiltIn$6;
1323
- var wellKnownSymbol$b = wellKnownSymbol$g;
1322
+ var createNonEnumerableProperty$3 = createNonEnumerableProperty$6;
1323
+ var defineBuiltIn$5 = defineBuiltIn$8;
1324
+ var wellKnownSymbol$d = wellKnownSymbol$i;
1324
1325
  var Iterators$3 = iterators;
1325
1326
  var IteratorsCore = iteratorsCore;
1326
1327
 
@@ -1328,7 +1329,7 @@ var PROPER_FUNCTION_NAME$1 = FunctionName.PROPER;
1328
1329
  var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
1329
1330
  var IteratorPrototype = IteratorsCore.IteratorPrototype;
1330
1331
  var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
1331
- var ITERATOR$5 = wellKnownSymbol$b('iterator');
1332
+ var ITERATOR$5 = wellKnownSymbol$d('iterator');
1332
1333
  var KEYS = 'keys';
1333
1334
  var VALUES = 'values';
1334
1335
  var ENTRIES = 'entries';
@@ -1366,10 +1367,10 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1366
1367
  CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
1367
1368
  if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
1368
1369
  if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
1369
- if (setPrototypeOf$1) {
1370
- setPrototypeOf$1(CurrentIteratorPrototype, IteratorPrototype);
1371
- } else if (!isCallable$7(CurrentIteratorPrototype[ITERATOR$5])) {
1372
- 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);
1373
1374
  }
1374
1375
  }
1375
1376
  // Set @@toStringTag to native iterators
@@ -1380,10 +1381,10 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1380
1381
  // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
1381
1382
  if (PROPER_FUNCTION_NAME$1 && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) {
1382
1383
  if (CONFIGURABLE_FUNCTION_NAME) {
1383
- createNonEnumerableProperty$1(IterablePrototype, 'name', VALUES);
1384
+ createNonEnumerableProperty$3(IterablePrototype, 'name', VALUES);
1384
1385
  } else {
1385
1386
  INCORRECT_VALUES_NAME = true;
1386
- defaultIterator = function values() { return call$a(nativeIterator, this); };
1387
+ defaultIterator = function values() { return call$d(nativeIterator, this); };
1387
1388
  }
1388
1389
  }
1389
1390
 
@@ -1396,14 +1397,14 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1396
1397
  };
1397
1398
  if (FORCED) for (KEY in methods) {
1398
1399
  if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1399
- defineBuiltIn$3(IterablePrototype, KEY, methods[KEY]);
1400
+ defineBuiltIn$5(IterablePrototype, KEY, methods[KEY]);
1400
1401
  }
1401
- } 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);
1402
1403
  }
1403
1404
 
1404
1405
  // define iterator
1405
1406
  if (IterablePrototype[ITERATOR$5] !== defaultIterator) {
1406
- defineBuiltIn$3(IterablePrototype, ITERATOR$5, defaultIterator, { name: DEFAULT });
1407
+ defineBuiltIn$5(IterablePrototype, ITERATOR$5, defaultIterator, { name: DEFAULT });
1407
1408
  }
1408
1409
  Iterators$3[NAME] = defaultIterator;
1409
1410
 
@@ -1420,14 +1421,14 @@ var toIndexedObject = toIndexedObject$5;
1420
1421
  var addToUnscopables$1 = addToUnscopables$2;
1421
1422
  var Iterators$2 = iterators;
1422
1423
  var InternalStateModule$1 = internalState;
1423
- var defineProperty$2 = objectDefineProperty.f;
1424
+ var defineProperty$3 = objectDefineProperty.f;
1424
1425
  var defineIterator = iteratorDefine;
1425
1426
  var createIterResultObject = createIterResultObject$1;
1426
- var DESCRIPTORS$3 = descriptors;
1427
+ var DESCRIPTORS$4 = descriptors;
1427
1428
 
1428
1429
  var ARRAY_ITERATOR = 'Array Iterator';
1429
1430
  var setInternalState$1 = InternalStateModule$1.set;
1430
- var getInternalState = InternalStateModule$1.getterFor(ARRAY_ITERATOR);
1431
+ var getInternalState$1 = InternalStateModule$1.getterFor(ARRAY_ITERATOR);
1431
1432
 
1432
1433
  // `Array.prototype.entries` method
1433
1434
  // https://tc39.es/ecma262/#sec-array.prototype.entries
@@ -1449,7 +1450,7 @@ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind)
1449
1450
  // `%ArrayIteratorPrototype%.next` method
1450
1451
  // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
1451
1452
  }, function () {
1452
- var state = getInternalState(this);
1453
+ var state = getInternalState$1(this);
1453
1454
  var target = state.target;
1454
1455
  var index = state.index++;
1455
1456
  if (!target || index >= target.length) {
@@ -1473,8 +1474,8 @@ addToUnscopables$1('values');
1473
1474
  addToUnscopables$1('entries');
1474
1475
 
1475
1476
  // V8 ~ Chrome 45- bug
1476
- if (DESCRIPTORS$3 && values.name !== 'values') try {
1477
- defineProperty$2(values, 'name', { value: 'values' });
1477
+ if (DESCRIPTORS$4 && values.name !== 'values') try {
1478
+ defineProperty$3(values, 'name', { value: 'values' });
1478
1479
  } catch (error) { /* empty */ }
1479
1480
 
1480
1481
  // iterable DOM collections
@@ -1521,32 +1522,32 @@ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.co
1521
1522
 
1522
1523
  var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
1523
1524
 
1524
- var global$9 = global$k;
1525
+ var global$d = global$o;
1525
1526
  var DOMIterables = domIterables;
1526
1527
  var DOMTokenListPrototype = domTokenListPrototype;
1527
1528
  var ArrayIteratorMethods = es_array_iterator;
1528
- var createNonEnumerableProperty = createNonEnumerableProperty$4;
1529
- var wellKnownSymbol$a = wellKnownSymbol$g;
1529
+ var createNonEnumerableProperty$2 = createNonEnumerableProperty$6;
1530
+ var wellKnownSymbol$c = wellKnownSymbol$i;
1530
1531
 
1531
- var ITERATOR$4 = wellKnownSymbol$a('iterator');
1532
- var TO_STRING_TAG$2 = wellKnownSymbol$a('toStringTag');
1532
+ var ITERATOR$4 = wellKnownSymbol$c('iterator');
1533
+ var TO_STRING_TAG$2 = wellKnownSymbol$c('toStringTag');
1533
1534
  var ArrayValues = ArrayIteratorMethods.values;
1534
1535
 
1535
1536
  var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
1536
1537
  if (CollectionPrototype) {
1537
1538
  // some Chrome versions have non-configurable methods on DOMTokenList
1538
1539
  if (CollectionPrototype[ITERATOR$4] !== ArrayValues) try {
1539
- createNonEnumerableProperty(CollectionPrototype, ITERATOR$4, ArrayValues);
1540
+ createNonEnumerableProperty$2(CollectionPrototype, ITERATOR$4, ArrayValues);
1540
1541
  } catch (error) {
1541
1542
  CollectionPrototype[ITERATOR$4] = ArrayValues;
1542
1543
  }
1543
1544
  if (!CollectionPrototype[TO_STRING_TAG$2]) {
1544
- createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG$2, COLLECTION_NAME);
1545
+ createNonEnumerableProperty$2(CollectionPrototype, TO_STRING_TAG$2, COLLECTION_NAME);
1545
1546
  }
1546
1547
  if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
1547
1548
  // some Chrome versions have non-configurable methods on DOMTokenList
1548
1549
  if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
1549
- createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
1550
+ createNonEnumerableProperty$2(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
1550
1551
  } catch (error) {
1551
1552
  CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
1552
1553
  }
@@ -1555,35 +1556,35 @@ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
1555
1556
  };
1556
1557
 
1557
1558
  for (var COLLECTION_NAME in DOMIterables) {
1558
- 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);
1559
1560
  }
1560
1561
 
1561
1562
  handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
1562
1563
 
1563
- var DESCRIPTORS$2 = descriptors;
1564
- var uncurryThis$8 = functionUncurryThis;
1565
- var call$9 = functionCall;
1566
- 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;
1567
1568
  var objectKeys = objectKeys$2;
1568
1569
  var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1569
1570
  var propertyIsEnumerableModule = objectPropertyIsEnumerable;
1570
- var toObject = toObject$3;
1571
+ var toObject$1 = toObject$4;
1571
1572
  var IndexedObject = indexedObject;
1572
1573
 
1573
1574
  // eslint-disable-next-line es/no-object-assign -- safe
1574
1575
  var $assign = Object.assign;
1575
1576
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1576
- var defineProperty$1 = Object.defineProperty;
1577
- var concat = uncurryThis$8([].concat);
1577
+ var defineProperty$2 = Object.defineProperty;
1578
+ var concat = uncurryThis$c([].concat);
1578
1579
 
1579
1580
  // `Object.assign` method
1580
1581
  // https://tc39.es/ecma262/#sec-object.assign
1581
- var objectAssign = !$assign || fails$5(function () {
1582
+ var objectAssign = !$assign || fails$c(function () {
1582
1583
  // should have correct order of operations (Edge bug)
1583
- if (DESCRIPTORS$2 && $assign({ b: 1 }, $assign(defineProperty$1({}, 'a', {
1584
+ if (DESCRIPTORS$3 && $assign({ b: 1 }, $assign(defineProperty$2({}, 'a', {
1584
1585
  enumerable: true,
1585
1586
  get: function () {
1586
- defineProperty$1(this, 'b', {
1587
+ defineProperty$2(this, 'b', {
1587
1588
  value: 3,
1588
1589
  enumerable: false
1589
1590
  });
@@ -1599,7 +1600,7 @@ var objectAssign = !$assign || fails$5(function () {
1599
1600
  alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1600
1601
  return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;
1601
1602
  }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
1602
- var T = toObject(target);
1603
+ var T = toObject$1(target);
1603
1604
  var argumentsLength = arguments.length;
1604
1605
  var index = 1;
1605
1606
  var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
@@ -1612,18 +1613,18 @@ var objectAssign = !$assign || fails$5(function () {
1612
1613
  var key;
1613
1614
  while (length > j) {
1614
1615
  key = keys[j++];
1615
- 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];
1616
1617
  }
1617
1618
  } return T;
1618
1619
  } : $assign;
1619
1620
 
1620
- var $$a = _export;
1621
+ var $$c = _export;
1621
1622
  var assign = objectAssign;
1622
1623
 
1623
1624
  // `Object.assign` method
1624
1625
  // https://tc39.es/ecma262/#sec-object.assign
1625
1626
  // eslint-disable-next-line es/no-object-assign -- required for testing
1626
- $$a({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1627
+ $$c({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1627
1628
  assign: assign
1628
1629
  });
1629
1630
 
@@ -2067,49 +2068,65 @@ function Card({
2067
2068
  }));
2068
2069
  }
2069
2070
 
2070
- const useDatepicker = (datepickerRef, datepickerDialogRef, dateInputRef, datepickerTriggerRef, options = {}) => {
2071
- const dataStub = {
2072
- formattedSelectedDate: '',
2073
- calendar: {
2074
- headers: [],
2075
- calendarGrid: []
2076
- }
2077
- };
2078
- const [data, setData] = useState(dataStub);
2079
- const [state, setState] = useState({
2080
- isActive: false
2081
- });
2082
- const datepickerStub = {};
2083
- const [datepicker, setDatepicker] = useState(datepickerStub);
2084
- useEffect(() => {
2085
- if (!datepicker.open && datepickerRef.current && datepickerDialogRef.current && dateInputRef.current && datepickerTriggerRef.current) {
2086
- setDatepicker(createDatepicker((data, state) => {
2087
- if (data) setData(data);
2088
- if (state) setState(state);
2089
- }, 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);
2090
2099
  }
2091
- }, [datepicker, datepickerRef, datepickerDialogRef, dateInputRef, datepickerTriggerRef, options]);
2092
- return {
2093
- datepicker,
2094
- data,
2095
- state
2096
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
+ }));
2097
2114
  };
2098
2115
 
2099
- var $$9 = _export;
2116
+ var $$b = _export;
2100
2117
  var $includes = arrayIncludes.includes;
2101
- var fails$4 = fails$g;
2118
+ var fails$b = fails$n;
2102
2119
  var addToUnscopables = addToUnscopables$2;
2103
2120
 
2104
2121
  // FF99+ bug
2105
- var BROKEN_ON_SPARSE = fails$4(function () {
2122
+ var BROKEN_ON_SPARSE = fails$b(function () {
2106
2123
  // eslint-disable-next-line es/no-array-prototype-includes -- detection
2107
2124
  return !Array(1).includes();
2108
2125
  });
2109
2126
 
2110
2127
  // `Array.prototype.includes` method
2111
2128
  // https://tc39.es/ecma262/#sec-array.prototype.includes
2112
- $$9({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
2129
+ $$b({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
2113
2130
  includes: function includes(el /* , fromIndex = 0 */) {
2114
2131
  return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
2115
2132
  }
@@ -2118,44 +2135,44 @@ $$9({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
2118
2135
  // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
2119
2136
  addToUnscopables('includes');
2120
2137
 
2121
- var isObject$2 = isObject$9;
2122
- var classof$5 = classofRaw$2;
2123
- var wellKnownSymbol$9 = wellKnownSymbol$g;
2138
+ var isObject$3 = isObject$a;
2139
+ var classof$6 = classofRaw$2;
2140
+ var wellKnownSymbol$b = wellKnownSymbol$i;
2124
2141
 
2125
- var MATCH$1 = wellKnownSymbol$9('match');
2142
+ var MATCH$2 = wellKnownSymbol$b('match');
2126
2143
 
2127
2144
  // `IsRegExp` abstract operation
2128
2145
  // https://tc39.es/ecma262/#sec-isregexp
2129
2146
  var isRegexp = function (it) {
2130
2147
  var isRegExp;
2131
- 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');
2132
2149
  };
2133
2150
 
2134
- var isRegExp = isRegexp;
2151
+ var isRegExp$1 = isRegexp;
2135
2152
 
2136
- var $TypeError$6 = TypeError;
2153
+ var $TypeError$8 = TypeError;
2137
2154
 
2138
2155
  var notARegexp = function (it) {
2139
- if (isRegExp(it)) {
2140
- 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");
2141
2158
  } return it;
2142
2159
  };
2143
2160
 
2144
- var wellKnownSymbol$8 = wellKnownSymbol$g;
2161
+ var wellKnownSymbol$a = wellKnownSymbol$i;
2145
2162
 
2146
- var TO_STRING_TAG$1 = wellKnownSymbol$8('toStringTag');
2147
- var test = {};
2163
+ var TO_STRING_TAG$1 = wellKnownSymbol$a('toStringTag');
2164
+ var test$1 = {};
2148
2165
 
2149
- test[TO_STRING_TAG$1] = 'z';
2166
+ test$1[TO_STRING_TAG$1] = 'z';
2150
2167
 
2151
- var toStringTagSupport = String(test) === '[object z]';
2168
+ var toStringTagSupport = String(test$1) === '[object z]';
2152
2169
 
2153
2170
  var TO_STRING_TAG_SUPPORT = toStringTagSupport;
2154
- var isCallable$6 = isCallable$l;
2171
+ var isCallable$8 = isCallable$n;
2155
2172
  var classofRaw$1 = classofRaw$2;
2156
- var wellKnownSymbol$7 = wellKnownSymbol$g;
2173
+ var wellKnownSymbol$9 = wellKnownSymbol$i;
2157
2174
 
2158
- var TO_STRING_TAG = wellKnownSymbol$7('toStringTag');
2175
+ var TO_STRING_TAG = wellKnownSymbol$9('toStringTag');
2159
2176
  var $Object = Object;
2160
2177
 
2161
2178
  // ES3 wrong here
@@ -2169,7 +2186,7 @@ var tryGet = function (it, key) {
2169
2186
  };
2170
2187
 
2171
2188
  // getting tag from ES6+ `Object.prototype.toString`
2172
- var classof$4 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
2189
+ var classof$5 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
2173
2190
  var O, tag, result;
2174
2191
  return it === undefined ? 'Undefined' : it === null ? 'Null'
2175
2192
  // @@toStringTag case
@@ -2177,21 +2194,21 @@ var classof$4 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
2177
2194
  // builtinTag case
2178
2195
  : CORRECT_ARGUMENTS ? classofRaw$1(O)
2179
2196
  // ES3 arguments fallback
2180
- : (result = classofRaw$1(O)) === 'Object' && isCallable$6(O.callee) ? 'Arguments' : result;
2197
+ : (result = classofRaw$1(O)) === 'Object' && isCallable$8(O.callee) ? 'Arguments' : result;
2181
2198
  };
2182
2199
 
2183
- var classof$3 = classof$4;
2200
+ var classof$4 = classof$5;
2184
2201
 
2185
2202
  var $String = String;
2186
2203
 
2187
- var toString$4 = function (argument) {
2188
- 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');
2189
2206
  return $String(argument);
2190
2207
  };
2191
2208
 
2192
- var wellKnownSymbol$6 = wellKnownSymbol$g;
2209
+ var wellKnownSymbol$8 = wellKnownSymbol$i;
2193
2210
 
2194
- var MATCH = wellKnownSymbol$6('match');
2211
+ var MATCH$1 = wellKnownSymbol$8('match');
2195
2212
 
2196
2213
  var correctIsRegexpLogic = function (METHOD_NAME) {
2197
2214
  var regexp = /./;
@@ -2199,42 +2216,35 @@ var correctIsRegexpLogic = function (METHOD_NAME) {
2199
2216
  '/./'[METHOD_NAME](regexp);
2200
2217
  } catch (error1) {
2201
2218
  try {
2202
- regexp[MATCH] = false;
2219
+ regexp[MATCH$1] = false;
2203
2220
  return '/./'[METHOD_NAME](regexp);
2204
2221
  } catch (error2) { /* empty */ }
2205
2222
  } return false;
2206
2223
  };
2207
2224
 
2208
- var $$8 = _export;
2209
- var uncurryThis$7 = functionUncurryThis;
2225
+ var $$a = _export;
2226
+ var uncurryThis$b = functionUncurryThis;
2210
2227
  var notARegExp = notARegexp;
2211
- var requireObjectCoercible$1 = requireObjectCoercible$4;
2212
- var toString$3 = toString$4;
2228
+ var requireObjectCoercible$2 = requireObjectCoercible$5;
2229
+ var toString$7 = toString$8;
2213
2230
  var correctIsRegExpLogic = correctIsRegexpLogic;
2214
2231
 
2215
- var stringIndexOf = uncurryThis$7(''.indexOf);
2232
+ var stringIndexOf$1 = uncurryThis$b(''.indexOf);
2216
2233
 
2217
2234
  // `String.prototype.includes` method
2218
2235
  // https://tc39.es/ecma262/#sec-string.prototype.includes
2219
- $$8({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
2236
+ $$a({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
2220
2237
  includes: function includes(searchString /* , position = 0 */) {
2221
- return !!~stringIndexOf(
2222
- toString$3(requireObjectCoercible$1(this)),
2223
- toString$3(notARegExp(searchString)),
2238
+ return !!~stringIndexOf$1(
2239
+ toString$7(requireObjectCoercible$2(this)),
2240
+ toString$7(notARegExp(searchString)),
2224
2241
  arguments.length > 1 ? arguments[1] : undefined
2225
2242
  );
2226
2243
  }
2227
2244
  });
2228
2245
 
2229
- /**
2230
- * @license
2231
- * Copyright 2018 Google LLC
2232
- * SPDX-License-Identifier: BSD-3-Clause
2233
- */
2234
- const e=new Set(["children","localName","ref","style","className"]),n=new WeakMap,t=(e,t,l,o,a)=>{const s=a?.[t];void 0===s||l===o?(e[t]=l,null==l&&t in HTMLElement.prototype&&e.removeAttribute(t)):((e,t,l)=>{let o=n.get(e);void 0===o&&n.set(e,o=new Map);let a=o.get(t);void 0!==l?void 0===a?(o.set(t,a={handleEvent:l}),e.addEventListener(t,a)):a.handleEvent=l:void 0!==a&&(o.delete(t),e.removeEventListener(t,a));})(e,s,l);},l=({react:n,tagName:l,elementClass:o,events:a,displayName:s})=>{const c=new Set(Object.keys(a??{})),i=n.forwardRef(((s,i)=>{const r=n.useRef(null),d=n.useRef(null),f={},u={};for(const[n,t]of Object.entries(s))e.has(n)?f["className"===n?"class":n]=t:c.has(n)||n in o.prototype?u[n]=t:f[n]=t;return n.useLayoutEffect((()=>{if(null!==d.current){for(const e in u)t(d.current,e,s[e],r.current?r.current[e]:void 0,a);r.current=s;}})),n.useLayoutEffect((()=>{d.current?.removeAttribute("defer-hydration");}),[]),f.suppressHydrationWarning=!0,n.createElement(l,{...f,ref:n.useCallback((e=>{d.current=e,"function"==typeof i?i(e):null!==i&&(i.current=e);}),[i])})}));return i.displayName=s??o.name,i};
2235
-
2236
2246
  registerTransitionalStyles();
2237
- const CoreDropdown = l({
2247
+ const CoreDropdown = createComponent({
2238
2248
  tagName: getScopedTagName('gds-dropdown'),
2239
2249
  elementClass: GdsDropdown,
2240
2250
  events: {
@@ -2242,7 +2252,7 @@ const CoreDropdown = l({
2242
2252
  },
2243
2253
  react: React
2244
2254
  });
2245
- const CoreOption = l({
2255
+ const CoreOption = createComponent({
2246
2256
  tagName: getScopedTagName('gds-option'),
2247
2257
  elementClass: GdsOption,
2248
2258
  react: React
@@ -2261,7 +2271,8 @@ const Dropdown = ({
2261
2271
  texts,
2262
2272
  useValue: _useValue = 'value',
2263
2273
  validator,
2264
- value
2274
+ value,
2275
+ syncPopoverWidth
2265
2276
  }) => {
2266
2277
  const handleOnChange = e => {
2267
2278
  var _a;
@@ -2289,7 +2300,8 @@ const Dropdown = ({
2289
2300
  invalid: (validator === null || validator === void 0 ? void 0 : validator.indicator) === 'error',
2290
2301
  compareWith: compareWithAdapter,
2291
2302
  value: value,
2292
- searchFilter: searchFilterAdapter
2303
+ searchFilter: searchFilterAdapter,
2304
+ syncPopoverWidth: syncPopoverWidth
2293
2305
  }, {
2294
2306
  children: [informationLabel && jsx("span", Object.assign({
2295
2307
  slot: "sub-label"
@@ -2313,155 +2325,6 @@ const Dropdown = ({
2313
2325
  }));
2314
2326
  };
2315
2327
 
2316
- const Datepicker = (options = {}) => {
2317
- const [uuid] = useState(randomId());
2318
- const id = `sgr-datepicker-${uuid}`;
2319
- const datepickerRef = useRef(null);
2320
- const datepickerTriggerRef = useRef(null);
2321
- const datepickerDialogRef = useRef(null);
2322
- const dateInputRef = useRef(null);
2323
- options = Object.assign({
2324
- label: 'Date'
2325
- }, options);
2326
- const {
2327
- datepicker,
2328
- data,
2329
- state
2330
- } = useDatepicker(datepickerRef, datepickerDialogRef, dateInputRef, datepickerTriggerRef, options);
2331
- useEffect(() => {
2332
- var _a;
2333
- const selDateSub = (_a = datepicker.selectedDate$) === null || _a === void 0 ? void 0 : _a.subscribe(newDate => options.onChange && options.onChange(newDate));
2334
- return () => selDateSub === null || selDateSub === void 0 ? void 0 : selDateSub.unsubscribe();
2335
- }, [datepicker, options]);
2336
- const classNames = day => Object.entries({
2337
- disabled: !day.currentMonth,
2338
- 'sg-date-today': day.today
2339
- // 'sg-date-holiday': day.holiday,
2340
- }).map(([className, add]) => add ? className : '').join(' ');
2341
- return jsxs(Fragment, {
2342
- children: [jsxs("div", Object.assign({
2343
- className: "form-group"
2344
- }, {
2345
- children: [jsx("label", Object.assign({
2346
- htmlFor: id
2347
- }, {
2348
- children: options.label
2349
- })), jsxs("div", Object.assign({
2350
- className: "group",
2351
- ref: datepickerRef
2352
- }, {
2353
- children: [jsx("input", {
2354
- ref: dateInputRef,
2355
- id: id,
2356
- type: "text",
2357
- placeholder: "yyyy-mm-dd",
2358
- value: data.formattedSelectedDate,
2359
- onChange: e => datepicker.select(e.target.value)
2360
- }), jsx("button", Object.assign({
2361
- ref: datepickerTriggerRef,
2362
- type: "button",
2363
- className: "primary",
2364
- onClick: () => datepicker.toggle()
2365
- }, {
2366
- children: jsx("i", Object.assign({
2367
- className: "sg-icon sg-icon-calendar"
2368
- }, {
2369
- children: "Select date"
2370
- }))
2371
- }))]
2372
- })), jsx("span", Object.assign({
2373
- className: "form-info"
2374
- }, {
2375
- children: "Select a date"
2376
- }))]
2377
- })), jsx("div", Object.assign({
2378
- ref: datepickerDialogRef,
2379
- className: `popover popover-datepicker ${state.isActive ? 'active' : ''}`,
2380
- role: "dialog",
2381
- "aria-modal": "true",
2382
- "aria-label": "Choose Date"
2383
- }, {
2384
- children: state.isActive && jsxs("div", Object.assign({
2385
- className: "sg-date"
2386
- }, {
2387
- children: [jsxs("header", {
2388
- children: [jsx("button", Object.assign({
2389
- className: "link",
2390
- onClick: () => datepicker.sub(1, 'months')
2391
- }, {
2392
- children: jsx("i", Object.assign({
2393
- className: "sg-icon sg-icon-previous"
2394
- }, {
2395
- children: "Previous month"
2396
- }))
2397
- })), jsx(Dropdown, {
2398
- options: months({}),
2399
- display: "key",
2400
- texts: {
2401
- placeholder: data.monthName
2402
- },
2403
- onChange: datepicker.setMonth,
2404
- value: data.month
2405
- }), jsx(Dropdown, {
2406
- options: years({}),
2407
- display: "key",
2408
- texts: {
2409
- placeholder: data.year + ''
2410
- },
2411
- onChange: datepicker.setYear,
2412
- value: data.year
2413
- }), jsx("button", Object.assign({
2414
- className: "link",
2415
- onClick: () => datepicker.add(1, 'months')
2416
- }, {
2417
- children: jsx("i", Object.assign({
2418
- className: "sg-icon sg-icon-next"
2419
- }, {
2420
- children: "Next month"
2421
- }))
2422
- }))]
2423
- }), jsx("main", {
2424
- children: jsxs("table", Object.assign({
2425
- role: "grid"
2426
- }, {
2427
- children: [jsx("thead", {
2428
- children: jsx("tr", {
2429
- children: data.calendar.headers.map((header, ix) => jsx("th", Object.assign({
2430
- scope: "col",
2431
- abbr: header.abbr,
2432
- className: header.type === 'week' ? 'sg-week-header' : 'sg-day-header'
2433
- }, {
2434
- children: header.displayText
2435
- }), `week_${ix}`))
2436
- })
2437
- }), jsx("tbody", {
2438
- children: data.calendar.calendarGrid.map((week, ix) => jsxs("tr", {
2439
- children: [data.calendar.weekNumbers ? jsx("th", Object.assign({
2440
- className: "sg-week-number"
2441
- }, {
2442
- children: data.calendar.weekNumbers[ix]
2443
- })) : '', week.map(day => jsx("td", Object.assign({
2444
- "data-date": day.formattedDate,
2445
- className: classNames(day),
2446
- title: day.today ? 'Today' : '',
2447
- 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,
2448
- role: day.selected ? 'gridcell' : undefined,
2449
- "aria-selected": day.selected && !(data === null || data === void 0 ? void 0 : data.highlightedDate) ? true : undefined,
2450
- onClick: () => {
2451
- day.currentMonth && datepicker.select(day.date);
2452
- }
2453
- }, {
2454
- children: day.day
2455
- }), day.day))]
2456
- }, `week_${ix}`))
2457
- })]
2458
- }))
2459
- })]
2460
- }))
2461
- }))]
2462
- });
2463
- };
2464
-
2465
2328
  function Button(_a) {
2466
2329
  var _b;
2467
2330
  var {
@@ -2807,65 +2670,65 @@ function Group({
2807
2670
  }));
2808
2671
  }
2809
2672
 
2810
- var global$8 = global$k;
2811
- var classof$2 = classofRaw$2;
2673
+ var global$c = global$o;
2674
+ var classof$3 = classofRaw$2;
2812
2675
 
2813
- var engineIsNode = classof$2(global$8.process) === 'process';
2676
+ var engineIsNode = classof$3(global$c.process) === 'process';
2814
2677
 
2815
2678
  var makeBuiltIn = makeBuiltIn$3.exports;
2816
- var defineProperty = objectDefineProperty;
2679
+ var defineProperty$1 = objectDefineProperty;
2817
2680
 
2818
2681
  var defineBuiltInAccessor$2 = function (target, name, descriptor) {
2819
2682
  if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
2820
2683
  if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
2821
- return defineProperty.f(target, name, descriptor);
2684
+ return defineProperty$1.f(target, name, descriptor);
2822
2685
  };
2823
2686
 
2824
2687
  var getBuiltIn$3 = getBuiltIn$7;
2825
2688
  var defineBuiltInAccessor$1 = defineBuiltInAccessor$2;
2826
- var wellKnownSymbol$5 = wellKnownSymbol$g;
2827
- var DESCRIPTORS$1 = descriptors;
2689
+ var wellKnownSymbol$7 = wellKnownSymbol$i;
2690
+ var DESCRIPTORS$2 = descriptors;
2828
2691
 
2829
- var SPECIES$2 = wellKnownSymbol$5('species');
2692
+ var SPECIES$3 = wellKnownSymbol$7('species');
2830
2693
 
2831
- var setSpecies$1 = function (CONSTRUCTOR_NAME) {
2694
+ var setSpecies$2 = function (CONSTRUCTOR_NAME) {
2832
2695
  var Constructor = getBuiltIn$3(CONSTRUCTOR_NAME);
2833
2696
 
2834
- if (DESCRIPTORS$1 && Constructor && !Constructor[SPECIES$2]) {
2835
- defineBuiltInAccessor$1(Constructor, SPECIES$2, {
2697
+ if (DESCRIPTORS$2 && Constructor && !Constructor[SPECIES$3]) {
2698
+ defineBuiltInAccessor$1(Constructor, SPECIES$3, {
2836
2699
  configurable: true,
2837
2700
  get: function () { return this; }
2838
2701
  });
2839
2702
  }
2840
2703
  };
2841
2704
 
2842
- var isPrototypeOf$3 = objectIsPrototypeOf;
2705
+ var isPrototypeOf$4 = objectIsPrototypeOf;
2843
2706
 
2844
- var $TypeError$5 = TypeError;
2707
+ var $TypeError$7 = TypeError;
2845
2708
 
2846
2709
  var anInstance$1 = function (it, Prototype) {
2847
- if (isPrototypeOf$3(Prototype, it)) return it;
2848
- throw new $TypeError$5('Incorrect invocation');
2710
+ if (isPrototypeOf$4(Prototype, it)) return it;
2711
+ throw new $TypeError$7('Incorrect invocation');
2849
2712
  };
2850
2713
 
2851
- var uncurryThis$6 = functionUncurryThis;
2852
- var fails$3 = fails$g;
2853
- var isCallable$5 = isCallable$l;
2854
- 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;
2855
2718
  var getBuiltIn$2 = getBuiltIn$7;
2856
2719
  var inspectSource$1 = inspectSource$3;
2857
2720
 
2858
- var noop$1 = function () { /* empty */ };
2721
+ var noop = function () { /* empty */ };
2859
2722
  var empty = [];
2860
2723
  var construct = getBuiltIn$2('Reflect', 'construct');
2861
2724
  var constructorRegExp = /^\s*(?:class|function)\b/;
2862
- var exec$1 = uncurryThis$6(constructorRegExp.exec);
2863
- var INCORRECT_TO_STRING = !constructorRegExp.test(noop$1);
2725
+ var exec$3 = uncurryThis$a(constructorRegExp.exec);
2726
+ var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
2864
2727
 
2865
2728
  var isConstructorModern = function isConstructor(argument) {
2866
- if (!isCallable$5(argument)) return false;
2729
+ if (!isCallable$7(argument)) return false;
2867
2730
  try {
2868
- construct(noop$1, empty, argument);
2731
+ construct(noop, empty, argument);
2869
2732
  return true;
2870
2733
  } catch (error) {
2871
2734
  return false;
@@ -2873,8 +2736,8 @@ var isConstructorModern = function isConstructor(argument) {
2873
2736
  };
2874
2737
 
2875
2738
  var isConstructorLegacy = function isConstructor(argument) {
2876
- if (!isCallable$5(argument)) return false;
2877
- switch (classof$1(argument)) {
2739
+ if (!isCallable$7(argument)) return false;
2740
+ switch (classof$2(argument)) {
2878
2741
  case 'AsyncFunction':
2879
2742
  case 'GeneratorFunction':
2880
2743
  case 'AsyncGeneratorFunction': return false;
@@ -2883,7 +2746,7 @@ var isConstructorLegacy = function isConstructor(argument) {
2883
2746
  // we can't check .prototype since constructors produced by .bind haven't it
2884
2747
  // `Function#toString` throws on some built-it function in some legacy engines
2885
2748
  // (for example, `DOMQuad` and similar in FF41-)
2886
- return INCORRECT_TO_STRING || !!exec$1(constructorRegExp, inspectSource$1(argument));
2749
+ return INCORRECT_TO_STRING || !!exec$3(constructorRegExp, inspectSource$1(argument));
2887
2750
  } catch (error) {
2888
2751
  return true;
2889
2752
  }
@@ -2893,7 +2756,7 @@ isConstructorLegacy.sham = true;
2893
2756
 
2894
2757
  // `IsConstructor` abstract operation
2895
2758
  // https://tc39.es/ecma262/#sec-isconstructor
2896
- var isConstructor$1 = !construct || fails$3(function () {
2759
+ var isConstructor$1 = !construct || fails$a(function () {
2897
2760
  var called;
2898
2761
  return isConstructorModern(isConstructorModern.call)
2899
2762
  || !isConstructorModern(Object)
@@ -2902,114 +2765,114 @@ var isConstructor$1 = !construct || fails$3(function () {
2902
2765
  }) ? isConstructorLegacy : isConstructorModern;
2903
2766
 
2904
2767
  var isConstructor = isConstructor$1;
2905
- var tryToString$2 = tryToString$4;
2768
+ var tryToString$3 = tryToString$5;
2906
2769
 
2907
- var $TypeError$4 = TypeError;
2770
+ var $TypeError$6 = TypeError;
2908
2771
 
2909
2772
  // `Assert: IsConstructor(argument) is true`
2910
2773
  var aConstructor$1 = function (argument) {
2911
2774
  if (isConstructor(argument)) return argument;
2912
- throw new $TypeError$4(tryToString$2(argument) + ' is not a constructor');
2775
+ throw new $TypeError$6(tryToString$3(argument) + ' is not a constructor');
2913
2776
  };
2914
2777
 
2915
- var anObject$6 = anObject$c;
2778
+ var anObject$8 = anObject$e;
2916
2779
  var aConstructor = aConstructor$1;
2917
- var isNullOrUndefined$1 = isNullOrUndefined$4;
2918
- var wellKnownSymbol$4 = wellKnownSymbol$g;
2780
+ var isNullOrUndefined$2 = isNullOrUndefined$5;
2781
+ var wellKnownSymbol$6 = wellKnownSymbol$i;
2919
2782
 
2920
- var SPECIES$1 = wellKnownSymbol$4('species');
2783
+ var SPECIES$2 = wellKnownSymbol$6('species');
2921
2784
 
2922
2785
  // `SpeciesConstructor` abstract operation
2923
2786
  // https://tc39.es/ecma262/#sec-speciesconstructor
2924
2787
  var speciesConstructor$1 = function (O, defaultConstructor) {
2925
- var C = anObject$6(O).constructor;
2788
+ var C = anObject$8(O).constructor;
2926
2789
  var S;
2927
- 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);
2928
2791
  };
2929
2792
 
2930
2793
  var NATIVE_BIND$1 = functionBindNative;
2931
2794
 
2932
2795
  var FunctionPrototype = Function.prototype;
2933
2796
  var apply$1 = FunctionPrototype.apply;
2934
- var call$8 = FunctionPrototype.call;
2797
+ var call$b = FunctionPrototype.call;
2935
2798
 
2936
2799
  // eslint-disable-next-line es/no-reflect -- safe
2937
- var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$8.bind(apply$1) : function () {
2938
- 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);
2939
2802
  });
2940
2803
 
2941
2804
  var classofRaw = classofRaw$2;
2942
- var uncurryThis$5 = functionUncurryThis;
2805
+ var uncurryThis$9 = functionUncurryThis;
2943
2806
 
2944
2807
  var functionUncurryThisClause = function (fn) {
2945
2808
  // Nashorn bug:
2946
2809
  // https://github.com/zloirock/core-js/issues/1128
2947
2810
  // https://github.com/zloirock/core-js/issues/1130
2948
- if (classofRaw(fn) === 'Function') return uncurryThis$5(fn);
2811
+ if (classofRaw(fn) === 'Function') return uncurryThis$9(fn);
2949
2812
  };
2950
2813
 
2951
- var uncurryThis$4 = functionUncurryThisClause;
2952
- var aCallable$5 = aCallable$8;
2814
+ var uncurryThis$8 = functionUncurryThisClause;
2815
+ var aCallable$6 = aCallable$9;
2953
2816
  var NATIVE_BIND = functionBindNative;
2954
2817
 
2955
- var bind$4 = uncurryThis$4(uncurryThis$4.bind);
2818
+ var bind$4 = uncurryThis$8(uncurryThis$8.bind);
2956
2819
 
2957
2820
  // optional / simple context binding
2958
2821
  var functionBindContext = function (fn, that) {
2959
- aCallable$5(fn);
2822
+ aCallable$6(fn);
2960
2823
  return that === undefined ? fn : NATIVE_BIND ? bind$4(fn, that) : function (/* ...args */) {
2961
2824
  return fn.apply(that, arguments);
2962
2825
  };
2963
2826
  };
2964
2827
 
2965
- var uncurryThis$3 = functionUncurryThis;
2828
+ var uncurryThis$7 = functionUncurryThis;
2966
2829
 
2967
- var arraySlice$1 = uncurryThis$3([].slice);
2830
+ var arraySlice$2 = uncurryThis$7([].slice);
2968
2831
 
2969
- var $TypeError$3 = TypeError;
2832
+ var $TypeError$5 = TypeError;
2970
2833
 
2971
2834
  var validateArgumentsLength$1 = function (passed, required) {
2972
- if (passed < required) throw new $TypeError$3('Not enough arguments');
2835
+ if (passed < required) throw new $TypeError$5('Not enough arguments');
2973
2836
  return passed;
2974
2837
  };
2975
2838
 
2976
- var userAgent$2 = engineUserAgent;
2839
+ var userAgent$4 = engineUserAgent;
2977
2840
 
2978
2841
  // eslint-disable-next-line redos/no-vulnerable -- safe
2979
- var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2);
2842
+ var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$4);
2980
2843
 
2981
- var global$7 = global$k;
2844
+ var global$b = global$o;
2982
2845
  var apply = functionApply;
2983
2846
  var bind$3 = functionBindContext;
2984
- var isCallable$4 = isCallable$l;
2985
- var hasOwn$2 = hasOwnProperty_1;
2986
- var fails$2 = fails$g;
2847
+ var isCallable$6 = isCallable$n;
2848
+ var hasOwn$3 = hasOwnProperty_1;
2849
+ var fails$9 = fails$n;
2987
2850
  var html = html$2;
2988
- var arraySlice = arraySlice$1;
2851
+ var arraySlice$1 = arraySlice$2;
2989
2852
  var createElement = documentCreateElement$2;
2990
2853
  var validateArgumentsLength = validateArgumentsLength$1;
2991
2854
  var IS_IOS$1 = engineIsIos;
2992
2855
  var IS_NODE$3 = engineIsNode;
2993
2856
 
2994
- var set = global$7.setImmediate;
2995
- var clear = global$7.clearImmediate;
2996
- var process$2 = global$7.process;
2997
- var Dispatch = global$7.Dispatch;
2998
- var Function$1 = global$7.Function;
2999
- var MessageChannel = global$7.MessageChannel;
3000
- 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;
3001
2864
  var counter = 0;
3002
2865
  var queue$2 = {};
3003
2866
  var ONREADYSTATECHANGE = 'onreadystatechange';
3004
2867
  var $location, defer, channel, port;
3005
2868
 
3006
- fails$2(function () {
2869
+ fails$9(function () {
3007
2870
  // Deno throws a ReferenceError on `location` access without `--location` flag
3008
- $location = global$7.location;
2871
+ $location = global$b.location;
3009
2872
  });
3010
2873
 
3011
2874
  var run = function (id) {
3012
- if (hasOwn$2(queue$2, id)) {
2875
+ if (hasOwn$3(queue$2, id)) {
3013
2876
  var fn = queue$2[id];
3014
2877
  delete queue$2[id];
3015
2878
  fn();
@@ -3028,15 +2891,15 @@ var eventListener = function (event) {
3028
2891
 
3029
2892
  var globalPostMessageDefer = function (id) {
3030
2893
  // old engines have not location.origin
3031
- global$7.postMessage(String$1(id), $location.protocol + '//' + $location.host);
2894
+ global$b.postMessage(String$1(id), $location.protocol + '//' + $location.host);
3032
2895
  };
3033
2896
 
3034
2897
  // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
3035
2898
  if (!set || !clear) {
3036
2899
  set = function setImmediate(handler) {
3037
2900
  validateArgumentsLength(arguments.length, 1);
3038
- var fn = isCallable$4(handler) ? handler : Function$1(handler);
3039
- var args = arraySlice(arguments, 1);
2901
+ var fn = isCallable$6(handler) ? handler : Function$1(handler);
2902
+ var args = arraySlice$1(arguments, 1);
3040
2903
  queue$2[++counter] = function () {
3041
2904
  apply(fn, undefined, args);
3042
2905
  };
@@ -3066,14 +2929,14 @@ if (!set || !clear) {
3066
2929
  // Browsers with postMessage, skip WebWorkers
3067
2930
  // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
3068
2931
  } else if (
3069
- global$7.addEventListener &&
3070
- isCallable$4(global$7.postMessage) &&
3071
- !global$7.importScripts &&
2932
+ global$b.addEventListener &&
2933
+ isCallable$6(global$b.postMessage) &&
2934
+ !global$b.importScripts &&
3072
2935
  $location && $location.protocol !== 'file:' &&
3073
- !fails$2(globalPostMessageDefer)
2936
+ !fails$9(globalPostMessageDefer)
3074
2937
  ) {
3075
2938
  defer = globalPostMessageDefer;
3076
- global$7.addEventListener('message', eventListener, false);
2939
+ global$b.addEventListener('message', eventListener, false);
3077
2940
  // IE8-
3078
2941
  } else if (ONREADYSTATECHANGE in createElement('script')) {
3079
2942
  defer = function (id) {
@@ -3120,15 +2983,15 @@ Queue$2.prototype = {
3120
2983
 
3121
2984
  var queue$1 = Queue$2;
3122
2985
 
3123
- var userAgent$1 = engineUserAgent;
2986
+ var userAgent$3 = engineUserAgent;
3124
2987
 
3125
- 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';
3126
2989
 
3127
- var userAgent = engineUserAgent;
2990
+ var userAgent$2 = engineUserAgent;
3128
2991
 
3129
- var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent);
2992
+ var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent$2);
3130
2993
 
3131
- var global$6 = global$k;
2994
+ var global$a = global$o;
3132
2995
  var bind$2 = functionBindContext;
3133
2996
  var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
3134
2997
  var macrotask = task$1.set;
@@ -3138,12 +3001,12 @@ var IS_IOS_PEBBLE = engineIsIosPebble;
3138
3001
  var IS_WEBOS_WEBKIT = engineIsWebosWebkit;
3139
3002
  var IS_NODE$2 = engineIsNode;
3140
3003
 
3141
- var MutationObserver = global$6.MutationObserver || global$6.WebKitMutationObserver;
3142
- var document$2 = global$6.document;
3143
- var process$1 = global$6.process;
3144
- 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;
3145
3008
  // Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
3146
- var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global$6, 'queueMicrotask');
3009
+ var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global$a, 'queueMicrotask');
3147
3010
  var microtask$1 = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
3148
3011
  var notify$1, toggle, node, promise, then;
3149
3012
 
@@ -3195,7 +3058,7 @@ if (!microtask$1) {
3195
3058
  // - setTimeout
3196
3059
  } else {
3197
3060
  // `webpack` dev server bug on IE global methods - use bind(fn, global)
3198
- macrotask = bind$2(macrotask, global$6);
3061
+ macrotask = bind$2(macrotask, global$a);
3199
3062
  notify$1 = function () {
3200
3063
  macrotask(flush);
3201
3064
  };
@@ -3224,9 +3087,9 @@ var perform$3 = function (exec) {
3224
3087
  }
3225
3088
  };
3226
3089
 
3227
- var global$5 = global$k;
3090
+ var global$9 = global$o;
3228
3091
 
3229
- var promiseNativeConstructor = global$5.Promise;
3092
+ var promiseNativeConstructor = global$9.Promise;
3230
3093
 
3231
3094
  /* global Deno -- Deno case */
3232
3095
  var engineIsDeno = typeof Deno == 'object' && Deno && typeof Deno.version == 'object';
@@ -3238,22 +3101,22 @@ var engineIsBrowser = !IS_DENO$1 && !IS_NODE$1
3238
3101
  && typeof window == 'object'
3239
3102
  && typeof document == 'object';
3240
3103
 
3241
- var global$4 = global$k;
3104
+ var global$8 = global$o;
3242
3105
  var NativePromiseConstructor$3 = promiseNativeConstructor;
3243
- var isCallable$3 = isCallable$l;
3244
- var isForced = isForced_1;
3106
+ var isCallable$5 = isCallable$n;
3107
+ var isForced$1 = isForced_1;
3245
3108
  var inspectSource = inspectSource$3;
3246
- var wellKnownSymbol$3 = wellKnownSymbol$g;
3109
+ var wellKnownSymbol$5 = wellKnownSymbol$i;
3247
3110
  var IS_BROWSER = engineIsBrowser;
3248
3111
  var IS_DENO = engineIsDeno;
3249
3112
  var V8_VERSION = engineV8Version;
3250
3113
 
3251
3114
  NativePromiseConstructor$3 && NativePromiseConstructor$3.prototype;
3252
- var SPECIES = wellKnownSymbol$3('species');
3115
+ var SPECIES$1 = wellKnownSymbol$5('species');
3253
3116
  var SUBCLASSING = false;
3254
- var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$3(global$4.PromiseRejectionEvent);
3117
+ var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$5(global$8.PromiseRejectionEvent);
3255
3118
 
3256
- var FORCED_PROMISE_CONSTRUCTOR$5 = isForced('Promise', function () {
3119
+ var FORCED_PROMISE_CONSTRUCTOR$5 = isForced$1('Promise', function () {
3257
3120
  var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor$3);
3258
3121
  var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor$3);
3259
3122
  // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
@@ -3270,7 +3133,7 @@ var FORCED_PROMISE_CONSTRUCTOR$5 = isForced('Promise', function () {
3270
3133
  exec(function () { /* empty */ }, function () { /* empty */ });
3271
3134
  };
3272
3135
  var constructor = promise.constructor = {};
3273
- constructor[SPECIES] = FakePromise;
3136
+ constructor[SPECIES$1] = FakePromise;
3274
3137
  SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
3275
3138
  if (!SUBCLASSING) return true;
3276
3139
  // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
@@ -3285,19 +3148,19 @@ var promiseConstructorDetection = {
3285
3148
 
3286
3149
  var newPromiseCapability$2 = {};
3287
3150
 
3288
- var aCallable$4 = aCallable$8;
3151
+ var aCallable$5 = aCallable$9;
3289
3152
 
3290
- var $TypeError$2 = TypeError;
3153
+ var $TypeError$4 = TypeError;
3291
3154
 
3292
3155
  var PromiseCapability = function (C) {
3293
3156
  var resolve, reject;
3294
3157
  this.promise = new C(function ($$resolve, $$reject) {
3295
- 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');
3296
3159
  resolve = $$resolve;
3297
3160
  reject = $$reject;
3298
3161
  });
3299
- this.resolve = aCallable$4(resolve);
3300
- this.reject = aCallable$4(reject);
3162
+ this.resolve = aCallable$5(resolve);
3163
+ this.reject = aCallable$5(reject);
3301
3164
  };
3302
3165
 
3303
3166
  // `NewPromiseCapability` abstract operation
@@ -3306,17 +3169,17 @@ newPromiseCapability$2.f = function (C) {
3306
3169
  return new PromiseCapability(C);
3307
3170
  };
3308
3171
 
3309
- var $$7 = _export;
3172
+ var $$9 = _export;
3310
3173
  var IS_NODE = engineIsNode;
3311
- var global$3 = global$k;
3312
- var call$7 = functionCall;
3313
- var defineBuiltIn$2 = defineBuiltIn$6;
3314
- 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;
3315
3178
  var setToStringTag = setToStringTag$3;
3316
- var setSpecies = setSpecies$1;
3317
- var aCallable$3 = aCallable$8;
3318
- var isCallable$2 = isCallable$l;
3319
- 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;
3320
3183
  var anInstance = anInstance$1;
3321
3184
  var speciesConstructor = speciesConstructor$1;
3322
3185
  var task = task$1.set;
@@ -3338,13 +3201,13 @@ var setInternalState = InternalStateModule.set;
3338
3201
  var NativePromisePrototype$1 = NativePromiseConstructor$2 && NativePromiseConstructor$2.prototype;
3339
3202
  var PromiseConstructor = NativePromiseConstructor$2;
3340
3203
  var PromisePrototype = NativePromisePrototype$1;
3341
- var TypeError$1 = global$3.TypeError;
3342
- var document$1 = global$3.document;
3343
- 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;
3344
3207
  var newPromiseCapability$1 = newPromiseCapabilityModule$3.f;
3345
3208
  var newGenericPromiseCapability = newPromiseCapability$1;
3346
3209
 
3347
- var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$3.dispatchEvent);
3210
+ var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$7.dispatchEvent);
3348
3211
  var UNHANDLED_REJECTION = 'unhandledrejection';
3349
3212
  var REJECTION_HANDLED = 'rejectionhandled';
3350
3213
  var PENDING = 0;
@@ -3358,7 +3221,7 @@ var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
3358
3221
  // helpers
3359
3222
  var isThenable = function (it) {
3360
3223
  var then;
3361
- return isObject$1(it) && isCallable$2(then = it.then) ? then : false;
3224
+ return isObject$2(it) && isCallable$4(then = it.then) ? then : false;
3362
3225
  };
3363
3226
 
3364
3227
  var callReaction = function (reaction, state) {
@@ -3387,7 +3250,7 @@ var callReaction = function (reaction, state) {
3387
3250
  if (result === reaction.promise) {
3388
3251
  reject(new TypeError$1('Promise-chain cycle'));
3389
3252
  } else if (then = isThenable(result)) {
3390
- call$7(then, result, resolve, reject);
3253
+ call$a(then, result, resolve, reject);
3391
3254
  } else resolve(result);
3392
3255
  } else reject(value);
3393
3256
  } catch (error) {
@@ -3417,14 +3280,14 @@ var dispatchEvent = function (name, promise, reason) {
3417
3280
  event.promise = promise;
3418
3281
  event.reason = reason;
3419
3282
  event.initEvent(name, false, true);
3420
- global$3.dispatchEvent(event);
3283
+ global$7.dispatchEvent(event);
3421
3284
  } else event = { promise: promise, reason: reason };
3422
- 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);
3423
3286
  else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
3424
3287
  };
3425
3288
 
3426
3289
  var onUnhandled = function (state) {
3427
- call$7(task, global$3, function () {
3290
+ call$a(task, global$7, function () {
3428
3291
  var promise = state.facade;
3429
3292
  var value = state.value;
3430
3293
  var IS_UNHANDLED = isUnhandled(state);
@@ -3447,7 +3310,7 @@ var isUnhandled = function (state) {
3447
3310
  };
3448
3311
 
3449
3312
  var onHandleUnhandled = function (state) {
3450
- call$7(task, global$3, function () {
3313
+ call$a(task, global$7, function () {
3451
3314
  var promise = state.facade;
3452
3315
  if (IS_NODE) {
3453
3316
  process.emit('rejectionHandled', promise);
@@ -3481,7 +3344,7 @@ var internalResolve = function (state, value, unwrap) {
3481
3344
  microtask(function () {
3482
3345
  var wrapper = { done: false };
3483
3346
  try {
3484
- call$7(then, value,
3347
+ call$a(then, value,
3485
3348
  bind$1(internalResolve, wrapper, state),
3486
3349
  bind$1(internalReject, wrapper, state)
3487
3350
  );
@@ -3504,8 +3367,8 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
3504
3367
  // 25.4.3.1 Promise(executor)
3505
3368
  PromiseConstructor = function Promise(executor) {
3506
3369
  anInstance(this, PromisePrototype);
3507
- aCallable$3(executor);
3508
- call$7(Internal, this);
3370
+ aCallable$4(executor);
3371
+ call$a(Internal, this);
3509
3372
  var state = getInternalPromiseState(this);
3510
3373
  try {
3511
3374
  executor(bind$1(internalResolve, state), bind$1(internalReject, state));
@@ -3532,12 +3395,12 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
3532
3395
 
3533
3396
  // `Promise.prototype.then` method
3534
3397
  // https://tc39.es/ecma262/#sec-promise.prototype.then
3535
- Internal.prototype = defineBuiltIn$2(PromisePrototype, 'then', function then(onFulfilled, onRejected) {
3398
+ Internal.prototype = defineBuiltIn$4(PromisePrototype, 'then', function then(onFulfilled, onRejected) {
3536
3399
  var state = getInternalPromiseState(this);
3537
3400
  var reaction = newPromiseCapability$1(speciesConstructor(this, PromiseConstructor));
3538
3401
  state.parent = true;
3539
- reaction.ok = isCallable$2(onFulfilled) ? onFulfilled : true;
3540
- reaction.fail = isCallable$2(onRejected) && onRejected;
3402
+ reaction.ok = isCallable$4(onFulfilled) ? onFulfilled : true;
3403
+ reaction.fail = isCallable$4(onRejected) && onRejected;
3541
3404
  reaction.domain = IS_NODE ? process.domain : undefined;
3542
3405
  if (state.state === PENDING) state.reactions.add(reaction);
3543
3406
  else microtask(function () {
@@ -3560,15 +3423,15 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
3560
3423
  : newGenericPromiseCapability(C);
3561
3424
  };
3562
3425
 
3563
- if (isCallable$2(NativePromiseConstructor$2) && NativePromisePrototype$1 !== Object.prototype) {
3426
+ if (isCallable$4(NativePromiseConstructor$2) && NativePromisePrototype$1 !== Object.prototype) {
3564
3427
  nativeThen = NativePromisePrototype$1.then;
3565
3428
 
3566
3429
  if (!NATIVE_PROMISE_SUBCLASSING) {
3567
3430
  // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
3568
- defineBuiltIn$2(NativePromisePrototype$1, 'then', function then(onFulfilled, onRejected) {
3431
+ defineBuiltIn$4(NativePromisePrototype$1, 'then', function then(onFulfilled, onRejected) {
3569
3432
  var that = this;
3570
3433
  return new PromiseConstructor(function (resolve, reject) {
3571
- call$7(nativeThen, that, resolve, reject);
3434
+ call$a(nativeThen, that, resolve, reject);
3572
3435
  }).then(onFulfilled, onRejected);
3573
3436
  // https://github.com/zloirock/core-js/issues/640
3574
3437
  }, { unsafe: true });
@@ -3580,23 +3443,23 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
3580
3443
  } catch (error) { /* empty */ }
3581
3444
 
3582
3445
  // make `instanceof Promise` work for native promise-based APIs
3583
- if (setPrototypeOf) {
3584
- setPrototypeOf(NativePromisePrototype$1, PromisePrototype);
3446
+ if (setPrototypeOf$1) {
3447
+ setPrototypeOf$1(NativePromisePrototype$1, PromisePrototype);
3585
3448
  }
3586
3449
  }
3587
3450
  }
3588
3451
 
3589
- $$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 }, {
3590
3453
  Promise: PromiseConstructor
3591
3454
  });
3592
3455
 
3593
3456
  setToStringTag(PromiseConstructor, PROMISE, false);
3594
- setSpecies(PROMISE);
3457
+ setSpecies$1(PROMISE);
3595
3458
 
3596
- var wellKnownSymbol$2 = wellKnownSymbol$g;
3459
+ var wellKnownSymbol$4 = wellKnownSymbol$i;
3597
3460
  var Iterators$1 = iterators;
3598
3461
 
3599
- var ITERATOR$3 = wellKnownSymbol$2('iterator');
3462
+ var ITERATOR$3 = wellKnownSymbol$4('iterator');
3600
3463
  var ArrayPrototype = Array.prototype;
3601
3464
 
3602
3465
  // check on default Array iterator
@@ -3604,70 +3467,70 @@ var isArrayIteratorMethod$1 = function (it) {
3604
3467
  return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$3] === it);
3605
3468
  };
3606
3469
 
3607
- var classof = classof$4;
3608
- var getMethod$1 = getMethod$3;
3609
- var isNullOrUndefined = isNullOrUndefined$4;
3470
+ var classof$1 = classof$5;
3471
+ var getMethod$2 = getMethod$4;
3472
+ var isNullOrUndefined$1 = isNullOrUndefined$5;
3610
3473
  var Iterators = iterators;
3611
- var wellKnownSymbol$1 = wellKnownSymbol$g;
3474
+ var wellKnownSymbol$3 = wellKnownSymbol$i;
3612
3475
 
3613
- var ITERATOR$2 = wellKnownSymbol$1('iterator');
3476
+ var ITERATOR$2 = wellKnownSymbol$3('iterator');
3614
3477
 
3615
3478
  var getIteratorMethod$2 = function (it) {
3616
- if (!isNullOrUndefined(it)) return getMethod$1(it, ITERATOR$2)
3617
- || getMethod$1(it, '@@iterator')
3618
- || Iterators[classof(it)];
3479
+ if (!isNullOrUndefined$1(it)) return getMethod$2(it, ITERATOR$2)
3480
+ || getMethod$2(it, '@@iterator')
3481
+ || Iterators[classof$1(it)];
3619
3482
  };
3620
3483
 
3621
- var call$6 = functionCall;
3622
- var aCallable$2 = aCallable$8;
3623
- var anObject$5 = anObject$c;
3624
- 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;
3625
3488
  var getIteratorMethod$1 = getIteratorMethod$2;
3626
3489
 
3627
- var $TypeError$1 = TypeError;
3490
+ var $TypeError$3 = TypeError;
3628
3491
 
3629
3492
  var getIterator$1 = function (argument, usingIterator) {
3630
3493
  var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
3631
- if (aCallable$2(iteratorMethod)) return anObject$5(call$6(iteratorMethod, argument));
3632
- 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');
3633
3496
  };
3634
3497
 
3635
- var call$5 = functionCall;
3636
- var anObject$4 = anObject$c;
3637
- var getMethod = getMethod$3;
3498
+ var call$8 = functionCall;
3499
+ var anObject$6 = anObject$e;
3500
+ var getMethod$1 = getMethod$4;
3638
3501
 
3639
3502
  var iteratorClose$1 = function (iterator, kind, value) {
3640
3503
  var innerResult, innerError;
3641
- anObject$4(iterator);
3504
+ anObject$6(iterator);
3642
3505
  try {
3643
- innerResult = getMethod(iterator, 'return');
3506
+ innerResult = getMethod$1(iterator, 'return');
3644
3507
  if (!innerResult) {
3645
3508
  if (kind === 'throw') throw value;
3646
3509
  return value;
3647
3510
  }
3648
- innerResult = call$5(innerResult, iterator);
3511
+ innerResult = call$8(innerResult, iterator);
3649
3512
  } catch (error) {
3650
3513
  innerError = true;
3651
3514
  innerResult = error;
3652
3515
  }
3653
3516
  if (kind === 'throw') throw value;
3654
3517
  if (innerError) throw innerResult;
3655
- anObject$4(innerResult);
3518
+ anObject$6(innerResult);
3656
3519
  return value;
3657
3520
  };
3658
3521
 
3659
3522
  var bind = functionBindContext;
3660
- var call$4 = functionCall;
3661
- var anObject$3 = anObject$c;
3662
- var tryToString = tryToString$4;
3523
+ var call$7 = functionCall;
3524
+ var anObject$5 = anObject$e;
3525
+ var tryToString$1 = tryToString$5;
3663
3526
  var isArrayIteratorMethod = isArrayIteratorMethod$1;
3664
- var lengthOfArrayLike = lengthOfArrayLike$2;
3665
- var isPrototypeOf$2 = objectIsPrototypeOf;
3527
+ var lengthOfArrayLike$2 = lengthOfArrayLike$4;
3528
+ var isPrototypeOf$3 = objectIsPrototypeOf;
3666
3529
  var getIterator = getIterator$1;
3667
3530
  var getIteratorMethod = getIteratorMethod$2;
3668
3531
  var iteratorClose = iteratorClose$1;
3669
3532
 
3670
- var $TypeError = TypeError;
3533
+ var $TypeError$2 = TypeError;
3671
3534
 
3672
3535
  var Result = function (stopped, result) {
3673
3536
  this.stopped = stopped;
@@ -3692,7 +3555,7 @@ var iterate$2 = function (iterable, unboundFunction, options) {
3692
3555
 
3693
3556
  var callFn = function (value) {
3694
3557
  if (AS_ENTRIES) {
3695
- anObject$3(value);
3558
+ anObject$5(value);
3696
3559
  return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
3697
3560
  } return INTERRUPTED ? fn(value, stop) : fn(value);
3698
3561
  };
@@ -3703,31 +3566,31 @@ var iterate$2 = function (iterable, unboundFunction, options) {
3703
3566
  iterator = iterable;
3704
3567
  } else {
3705
3568
  iterFn = getIteratorMethod(iterable);
3706
- if (!iterFn) throw new $TypeError(tryToString(iterable) + ' is not iterable');
3569
+ if (!iterFn) throw new $TypeError$2(tryToString$1(iterable) + ' is not iterable');
3707
3570
  // optimisation for array iterators
3708
3571
  if (isArrayIteratorMethod(iterFn)) {
3709
- for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
3572
+ for (index = 0, length = lengthOfArrayLike$2(iterable); length > index; index++) {
3710
3573
  result = callFn(iterable[index]);
3711
- if (result && isPrototypeOf$2(ResultPrototype, result)) return result;
3574
+ if (result && isPrototypeOf$3(ResultPrototype, result)) return result;
3712
3575
  } return new Result(false);
3713
3576
  }
3714
3577
  iterator = getIterator(iterable, iterFn);
3715
3578
  }
3716
3579
 
3717
3580
  next = IS_RECORD ? iterable.next : iterator.next;
3718
- while (!(step = call$4(next, iterator)).done) {
3581
+ while (!(step = call$7(next, iterator)).done) {
3719
3582
  try {
3720
3583
  result = callFn(step.value);
3721
3584
  } catch (error) {
3722
3585
  iteratorClose(iterator, 'throw', error);
3723
3586
  }
3724
- if (typeof result == 'object' && result && isPrototypeOf$2(ResultPrototype, result)) return result;
3587
+ if (typeof result == 'object' && result && isPrototypeOf$3(ResultPrototype, result)) return result;
3725
3588
  } return new Result(false);
3726
3589
  };
3727
3590
 
3728
- var wellKnownSymbol = wellKnownSymbol$g;
3591
+ var wellKnownSymbol$2 = wellKnownSymbol$i;
3729
3592
 
3730
- var ITERATOR$1 = wellKnownSymbol('iterator');
3593
+ var ITERATOR$1 = wellKnownSymbol$2('iterator');
3731
3594
  var SAFE_CLOSING = false;
3732
3595
 
3733
3596
  try {
@@ -3774,9 +3637,9 @@ var promiseStaticsIncorrectIteration = FORCED_PROMISE_CONSTRUCTOR$3 || !checkCor
3774
3637
  NativePromiseConstructor$1.all(iterable).then(undefined, function () { /* empty */ });
3775
3638
  });
3776
3639
 
3777
- var $$6 = _export;
3778
- var call$3 = functionCall;
3779
- var aCallable$1 = aCallable$8;
3640
+ var $$8 = _export;
3641
+ var call$6 = functionCall;
3642
+ var aCallable$2 = aCallable$9;
3780
3643
  var newPromiseCapabilityModule$2 = newPromiseCapability$2;
3781
3644
  var perform$1 = perform$3;
3782
3645
  var iterate$1 = iterate$2;
@@ -3784,14 +3647,14 @@ var PROMISE_STATICS_INCORRECT_ITERATION$1 = promiseStaticsIncorrectIteration;
3784
3647
 
3785
3648
  // `Promise.all` method
3786
3649
  // https://tc39.es/ecma262/#sec-promise.all
3787
- $$6({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION$1 }, {
3650
+ $$8({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION$1 }, {
3788
3651
  all: function all(iterable) {
3789
3652
  var C = this;
3790
3653
  var capability = newPromiseCapabilityModule$2.f(C);
3791
3654
  var resolve = capability.resolve;
3792
3655
  var reject = capability.reject;
3793
3656
  var result = perform$1(function () {
3794
- var $promiseResolve = aCallable$1(C.resolve);
3657
+ var $promiseResolve = aCallable$2(C.resolve);
3795
3658
  var values = [];
3796
3659
  var counter = 0;
3797
3660
  var remaining = 1;
@@ -3799,7 +3662,7 @@ $$6({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION
3799
3662
  var index = counter++;
3800
3663
  var alreadyCalled = false;
3801
3664
  remaining++;
3802
- call$3($promiseResolve, C, promise).then(function (value) {
3665
+ call$6($promiseResolve, C, promise).then(function (value) {
3803
3666
  if (alreadyCalled) return;
3804
3667
  alreadyCalled = true;
3805
3668
  values[index] = value;
@@ -3813,34 +3676,34 @@ $$6({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION
3813
3676
  }
3814
3677
  });
3815
3678
 
3816
- var $$5 = _export;
3679
+ var $$7 = _export;
3817
3680
  var FORCED_PROMISE_CONSTRUCTOR$2 = promiseConstructorDetection.CONSTRUCTOR;
3818
3681
  var NativePromiseConstructor = promiseNativeConstructor;
3819
3682
  var getBuiltIn$1 = getBuiltIn$7;
3820
- var isCallable$1 = isCallable$l;
3821
- var defineBuiltIn$1 = defineBuiltIn$6;
3683
+ var isCallable$3 = isCallable$n;
3684
+ var defineBuiltIn$3 = defineBuiltIn$8;
3822
3685
 
3823
3686
  var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
3824
3687
 
3825
3688
  // `Promise.prototype.catch` method
3826
3689
  // https://tc39.es/ecma262/#sec-promise.prototype.catch
3827
- $$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 }, {
3828
3691
  'catch': function (onRejected) {
3829
3692
  return this.then(undefined, onRejected);
3830
3693
  }
3831
3694
  });
3832
3695
 
3833
3696
  // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
3834
- if (isCallable$1(NativePromiseConstructor)) {
3697
+ if (isCallable$3(NativePromiseConstructor)) {
3835
3698
  var method = getBuiltIn$1('Promise').prototype['catch'];
3836
3699
  if (NativePromisePrototype['catch'] !== method) {
3837
- defineBuiltIn$1(NativePromisePrototype, 'catch', method, { unsafe: true });
3700
+ defineBuiltIn$3(NativePromisePrototype, 'catch', method, { unsafe: true });
3838
3701
  }
3839
3702
  }
3840
3703
 
3841
- var $$4 = _export;
3842
- var call$2 = functionCall;
3843
- var aCallable = aCallable$8;
3704
+ var $$6 = _export;
3705
+ var call$5 = functionCall;
3706
+ var aCallable$1 = aCallable$9;
3844
3707
  var newPromiseCapabilityModule$1 = newPromiseCapability$2;
3845
3708
  var perform = perform$3;
3846
3709
  var iterate = iterate$2;
@@ -3848,15 +3711,15 @@ var PROMISE_STATICS_INCORRECT_ITERATION = promiseStaticsIncorrectIteration;
3848
3711
 
3849
3712
  // `Promise.race` method
3850
3713
  // https://tc39.es/ecma262/#sec-promise.race
3851
- $$4({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
3714
+ $$6({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
3852
3715
  race: function race(iterable) {
3853
3716
  var C = this;
3854
3717
  var capability = newPromiseCapabilityModule$1.f(C);
3855
3718
  var reject = capability.reject;
3856
3719
  var result = perform(function () {
3857
- var $promiseResolve = aCallable(C.resolve);
3720
+ var $promiseResolve = aCallable$1(C.resolve);
3858
3721
  iterate(iterable, function (promise) {
3859
- call$2($promiseResolve, C, promise).then(capability.resolve, reject);
3722
+ call$5($promiseResolve, C, promise).then(capability.resolve, reject);
3860
3723
  });
3861
3724
  });
3862
3725
  if (result.error) reject(result.value);
@@ -3864,35 +3727,35 @@ $$4({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION
3864
3727
  }
3865
3728
  });
3866
3729
 
3867
- var $$3 = _export;
3868
- var call$1 = functionCall;
3730
+ var $$5 = _export;
3731
+ var call$4 = functionCall;
3869
3732
  var newPromiseCapabilityModule = newPromiseCapability$2;
3870
3733
  var FORCED_PROMISE_CONSTRUCTOR$1 = promiseConstructorDetection.CONSTRUCTOR;
3871
3734
 
3872
3735
  // `Promise.reject` method
3873
3736
  // https://tc39.es/ecma262/#sec-promise.reject
3874
- $$3({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
3737
+ $$5({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
3875
3738
  reject: function reject(r) {
3876
3739
  var capability = newPromiseCapabilityModule.f(this);
3877
- call$1(capability.reject, undefined, r);
3740
+ call$4(capability.reject, undefined, r);
3878
3741
  return capability.promise;
3879
3742
  }
3880
3743
  });
3881
3744
 
3882
- var anObject$2 = anObject$c;
3883
- var isObject = isObject$9;
3745
+ var anObject$4 = anObject$e;
3746
+ var isObject$1 = isObject$a;
3884
3747
  var newPromiseCapability = newPromiseCapability$2;
3885
3748
 
3886
3749
  var promiseResolve$1 = function (C, x) {
3887
- anObject$2(C);
3888
- if (isObject(x) && x.constructor === C) return x;
3750
+ anObject$4(C);
3751
+ if (isObject$1(x) && x.constructor === C) return x;
3889
3752
  var promiseCapability = newPromiseCapability.f(C);
3890
3753
  var resolve = promiseCapability.resolve;
3891
3754
  resolve(x);
3892
3755
  return promiseCapability.promise;
3893
3756
  };
3894
3757
 
3895
- var $$2 = _export;
3758
+ var $$4 = _export;
3896
3759
  var getBuiltIn = getBuiltIn$7;
3897
3760
  var FORCED_PROMISE_CONSTRUCTOR = promiseConstructorDetection.CONSTRUCTOR;
3898
3761
  var promiseResolve = promiseResolve$1;
@@ -3901,7 +3764,7 @@ getBuiltIn('Promise');
3901
3764
 
3902
3765
  // `Promise.resolve` method
3903
3766
  // https://tc39.es/ecma262/#sec-promise.resolve
3904
- $$2({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
3767
+ $$4({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
3905
3768
  resolve: function resolve(x) {
3906
3769
  return promiseResolve(this, x);
3907
3770
  }
@@ -4156,29 +4019,29 @@ const Text = ({
4156
4019
  children: children
4157
4020
  }));
4158
4021
 
4159
- var $$1 = _export;
4160
- var DESCRIPTORS = descriptors;
4161
- var global$2 = global$k;
4162
- var uncurryThis$2 = functionUncurryThis;
4163
- var hasOwn$1 = hasOwnProperty_1;
4164
- var isCallable = isCallable$l;
4165
- var isPrototypeOf$1 = objectIsPrototypeOf;
4166
- 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;
4167
4030
  var defineBuiltInAccessor = defineBuiltInAccessor$2;
4168
4031
  var copyConstructorProperties = copyConstructorProperties$2;
4169
4032
 
4170
- var NativeSymbol = global$2.Symbol;
4033
+ var NativeSymbol = global$6.Symbol;
4171
4034
  var SymbolPrototype = NativeSymbol && NativeSymbol.prototype;
4172
4035
 
4173
- if (DESCRIPTORS && isCallable(NativeSymbol) && (!('description' in SymbolPrototype) ||
4036
+ if (DESCRIPTORS$1 && isCallable$2(NativeSymbol) && (!('description' in SymbolPrototype) ||
4174
4037
  // Safari 12 bug
4175
4038
  NativeSymbol().description !== undefined
4176
4039
  )) {
4177
4040
  var EmptyStringDescriptionStore = {};
4178
4041
  // wrap Symbol constructor for correct work with undefined description
4179
4042
  var SymbolWrapper = function Symbol() {
4180
- var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString$2(arguments[0]);
4181
- 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)
4182
4045
  ? new NativeSymbol(description)
4183
4046
  // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
4184
4047
  : description === undefined ? NativeSymbol() : NativeSymbol(description);
@@ -4191,24 +4054,24 @@ if (DESCRIPTORS && isCallable(NativeSymbol) && (!('description' in SymbolPrototy
4191
4054
  SymbolPrototype.constructor = SymbolWrapper;
4192
4055
 
4193
4056
  var NATIVE_SYMBOL = String(NativeSymbol('description detection')) === 'Symbol(description detection)';
4194
- var thisSymbolValue = uncurryThis$2(SymbolPrototype.valueOf);
4195
- var symbolDescriptiveString = uncurryThis$2(SymbolPrototype.toString);
4057
+ var thisSymbolValue = uncurryThis$6(SymbolPrototype.valueOf);
4058
+ var symbolDescriptiveString = uncurryThis$6(SymbolPrototype.toString);
4196
4059
  var regexp = /^Symbol\((.*)\)[^)]+$/;
4197
- var replace$1 = uncurryThis$2(''.replace);
4198
- var stringSlice = uncurryThis$2(''.slice);
4060
+ var replace$3 = uncurryThis$6(''.replace);
4061
+ var stringSlice$2 = uncurryThis$6(''.slice);
4199
4062
 
4200
4063
  defineBuiltInAccessor(SymbolPrototype, 'description', {
4201
4064
  configurable: true,
4202
4065
  get: function description() {
4203
4066
  var symbol = thisSymbolValue(this);
4204
- if (hasOwn$1(EmptyStringDescriptionStore, symbol)) return '';
4067
+ if (hasOwn$2(EmptyStringDescriptionStore, symbol)) return '';
4205
4068
  var string = symbolDescriptiveString(symbol);
4206
- 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');
4207
4070
  return desc === '' ? undefined : desc;
4208
4071
  }
4209
4072
  });
4210
4073
 
4211
- $$1({ global: true, constructor: true, forced: true }, {
4074
+ $$3({ global: true, constructor: true, forced: true }, {
4212
4075
  Symbol: SymbolWrapper
4213
4076
  });
4214
4077
  }
@@ -4727,12 +4590,12 @@ const OptionGroup = ({
4727
4590
  }));
4728
4591
  };
4729
4592
 
4730
- var anObject$1 = anObject$c;
4593
+ var anObject$3 = anObject$e;
4731
4594
 
4732
4595
  // `RegExp.prototype.flags` getter implementation
4733
4596
  // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
4734
- var regexpFlags = function () {
4735
- var that = anObject$1(this);
4597
+ var regexpFlags$1 = function () {
4598
+ var that = anObject$3(this);
4736
4599
  var result = '';
4737
4600
  if (that.hasIndices) result += 'd';
4738
4601
  if (that.global) result += 'g';
@@ -4745,41 +4608,41 @@ var regexpFlags = function () {
4745
4608
  return result;
4746
4609
  };
4747
4610
 
4748
- var call = functionCall;
4749
- var hasOwn = hasOwnProperty_1;
4750
- var isPrototypeOf = objectIsPrototypeOf;
4751
- var regExpFlags = regexpFlags;
4611
+ var call$3 = functionCall;
4612
+ var hasOwn$1 = hasOwnProperty_1;
4613
+ var isPrototypeOf$1 = objectIsPrototypeOf;
4614
+ var regExpFlags = regexpFlags$1;
4752
4615
 
4753
- var RegExpPrototype$1 = RegExp.prototype;
4616
+ var RegExpPrototype$3 = RegExp.prototype;
4754
4617
 
4755
4618
  var regexpGetFlags = function (R) {
4756
4619
  var flags = R.flags;
4757
- return flags === undefined && !('flags' in RegExpPrototype$1) && !hasOwn(R, 'flags') && isPrototypeOf(RegExpPrototype$1, R)
4758
- ? 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;
4759
4622
  };
4760
4623
 
4761
4624
  var PROPER_FUNCTION_NAME = functionName.PROPER;
4762
- var defineBuiltIn = defineBuiltIn$6;
4763
- var anObject = anObject$c;
4764
- var $toString = toString$4;
4765
- var fails$1 = fails$g;
4766
- 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;
4767
4630
 
4768
4631
  var TO_STRING = 'toString';
4769
- var RegExpPrototype = RegExp.prototype;
4770
- var nativeToString = RegExpPrototype[TO_STRING];
4632
+ var RegExpPrototype$2 = RegExp.prototype;
4633
+ var nativeToString = RegExpPrototype$2[TO_STRING];
4771
4634
 
4772
- 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'; });
4773
4636
  // FF44- RegExp#toString has a wrong name
4774
4637
  var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name !== TO_STRING;
4775
4638
 
4776
4639
  // `RegExp.prototype.toString` method
4777
4640
  // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
4778
4641
  if (NOT_GENERIC || INCORRECT_NAME) {
4779
- defineBuiltIn(RegExp.prototype, TO_STRING, function toString() {
4780
- var R = anObject(this);
4642
+ defineBuiltIn$2(RegExp.prototype, TO_STRING, function toString() {
4643
+ var R = anObject$2(this);
4781
4644
  var pattern = $toString(R.source);
4782
- var flags = $toString(getRegExpFlags(R));
4645
+ var flags = $toString(getRegExpFlags$1(R));
4783
4646
  return '/' + pattern + '/' + flags;
4784
4647
  }, { unsafe: true });
4785
4648
  }
@@ -4929,93 +4792,54 @@ function Slider({
4929
4792
  });
4930
4793
  }
4931
4794
 
4932
- // eslint-disable-next-line @typescript-eslint/no-empty-function
4933
- const noop = () => {};
4934
- const useStepper = ({
4935
- min,
4936
- max,
4937
- value: _value = 0,
4938
- step: _step = 1,
4939
- id: _id = randomId(),
4940
- onChange
4941
- }) => {
4942
- const pStepper = {
4943
- down: noop,
4944
- setMax: noop,
4945
- setMin: noop,
4946
- setStep: noop,
4947
- setValue: noop,
4948
- up: noop
4949
- };
4950
- const [stepper, setStepper] = useState(pStepper);
4951
- const [data, setData] = useState({
4952
- id: _id,
4953
- value: _value,
4954
- min,
4955
- max,
4956
- step: _step
4957
- });
4958
- // eslint-disable-next-line react-hooks/exhaustive-deps
4959
- useEffect(() => {
4960
- if (max !== data.max) stepper.setMax(max);
4961
- }, [stepper, max]);
4962
- // eslint-disable-next-line react-hooks/exhaustive-deps
4963
- useEffect(() => {
4964
- if (min !== data.min) stepper.setMin(min);
4965
- }, [stepper, min]);
4966
- // eslint-disable-next-line react-hooks/exhaustive-deps
4967
- useEffect(() => {
4968
- if (_step !== data.step) stepper.setStep(_step || 1);
4969
- }, [stepper, _step]);
4970
- // eslint-disable-next-line react-hooks/exhaustive-deps
4971
- useEffect(() => {
4972
- if (_value !== data.value) stepper.setValue(_value || 0, false);
4973
- }, [stepper, _value]);
4974
- useEffect(() => {
4975
- setStepper(createStepper({
4976
- id: _id,
4977
- value: _value,
4978
- min,
4979
- max,
4980
- step: _step,
4981
- onChange
4982
- }, setData));
4983
- // eslint-disable-next-line react-hooks/exhaustive-deps
4984
- }, []);
4985
- return [stepper, data];
4986
- };
4987
-
4988
4795
  // TODO: Should be named "Numeric input" instead of stepper?
4989
4796
  function Stepper(_a) {
4990
4797
  var {
4798
+ id,
4991
4799
  label,
4992
4800
  description,
4993
4801
  statusMessage,
4994
- validator
4802
+ validator,
4803
+ value = 0,
4804
+ onChange = () => undefined,
4805
+ onIncrease = () => undefined,
4806
+ onDecrease = () => undefined,
4807
+ testId
4995
4808
  } = _a,
4996
- stepperArgs = __rest(_a, ["label", "description", "statusMessage", "validator"]);
4997
- const [stepper, data] = useStepper(stepperArgs);
4998
- const onChangeEvent = e => {
4999
- stepper.setValue(e.target.valueAsNumber);
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') {
4815
+ e.preventDefault();
4816
+ onDecrease();
4817
+ }
5000
4818
  };
5001
4819
  const PrimitiveStepper = jsxs("div", Object.assign({
4820
+ "data-testid": testId,
5002
4821
  className: `group group-border group-stepper ${validator && validateClassName(validator === null || validator === void 0 ? void 0 : validator.indicator)}`
5003
4822
  }, {
5004
4823
  children: [jsx("button", Object.assign({
5005
- onClick: () => stepper.down()
4824
+ type: "button",
4825
+ onClick: onDecrease
5006
4826
  }, {
5007
4827
  children: "-"
5008
- })), jsx("input", {
5009
- id: data.id,
5010
- type: "number",
5011
- onChange: onChangeEvent,
4828
+ })), jsx("input", Object.assign({
4829
+ id: id,
4830
+ type: "text",
4831
+ inputMode: "numeric",
4832
+ pattern: "[0-9]*",
4833
+ onChange: onChange,
5012
4834
  onFocus: ({
5013
4835
  target
5014
4836
  }) => target.select(),
4837
+ onKeyDown: handleKeyDown,
5015
4838
  placeholder: "0",
5016
- value: data.value
5017
- }), jsx("button", Object.assign({
5018
- onClick: () => stepper.up()
4839
+ value: value
4840
+ }, props)), jsx("button", Object.assign({
4841
+ type: "button",
4842
+ onClick: onIncrease
5019
4843
  }, {
5020
4844
  children: "+"
5021
4845
  }))]
@@ -5025,7 +4849,7 @@ function Stepper(_a) {
5025
4849
  className: "form-group"
5026
4850
  }, {
5027
4851
  children: [label && jsx("label", Object.assign({
5028
- htmlFor: data.id
4852
+ htmlFor: id
5029
4853
  }, {
5030
4854
  children: label
5031
4855
  })), description && jsx("span", Object.assign({
@@ -5048,21 +4872,21 @@ function Stepper(_a) {
5048
4872
  var whitespaces$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
5049
4873
  '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
5050
4874
 
5051
- var uncurryThis$1 = functionUncurryThis;
5052
- var requireObjectCoercible = requireObjectCoercible$4;
5053
- var toString$1 = toString$4;
4875
+ var uncurryThis$5 = functionUncurryThis;
4876
+ var requireObjectCoercible$1 = requireObjectCoercible$5;
4877
+ var toString$5 = toString$8;
5054
4878
  var whitespaces$1 = whitespaces$2;
5055
4879
 
5056
- var replace = uncurryThis$1(''.replace);
4880
+ var replace$2 = uncurryThis$5(''.replace);
5057
4881
  var ltrim = RegExp('^[' + whitespaces$1 + ']+');
5058
4882
  var rtrim = RegExp('(^|[^' + whitespaces$1 + '])[' + whitespaces$1 + ']+$');
5059
4883
 
5060
4884
  // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
5061
4885
  var createMethod = function (TYPE) {
5062
4886
  return function ($this) {
5063
- var string = toString$1(requireObjectCoercible($this));
5064
- if (TYPE & 1) string = replace(string, ltrim, '');
5065
- 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');
5066
4890
  return string;
5067
4891
  };
5068
4892
  };
@@ -5079,35 +4903,35 @@ var stringTrim = {
5079
4903
  trim: createMethod(3)
5080
4904
  };
5081
4905
 
5082
- var global$1 = global$k;
5083
- var fails = fails$g;
5084
- var uncurryThis = functionUncurryThis;
5085
- 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;
5086
4910
  var trim = stringTrim.trim;
5087
4911
  var whitespaces = whitespaces$2;
5088
4912
 
5089
- var $parseInt$1 = global$1.parseInt;
5090
- var Symbol$1 = global$1.Symbol;
4913
+ var $parseInt$1 = global$5.parseInt;
4914
+ var Symbol$1 = global$5.Symbol;
5091
4915
  var ITERATOR = Symbol$1 && Symbol$1.iterator;
5092
4916
  var hex = /^[+-]?0x/i;
5093
- var exec = uncurryThis(hex.exec);
5094
- 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
5095
4919
  // MS Edge 18- broken with boxed symbols
5096
- || (ITERATOR && !fails(function () { $parseInt$1(Object(ITERATOR)); }));
4920
+ || (ITERATOR && !fails$7(function () { $parseInt$1(Object(ITERATOR)); }));
5097
4921
 
5098
4922
  // `parseInt` method
5099
4923
  // https://tc39.es/ecma262/#sec-parseint-string-radix
5100
- var numberParseInt = FORCED ? function parseInt(string, radix) {
5101
- var S = trim(toString(string));
5102
- 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));
5103
4927
  } : $parseInt$1;
5104
4928
 
5105
- var $ = _export;
4929
+ var $$2 = _export;
5106
4930
  var $parseInt = numberParseInt;
5107
4931
 
5108
4932
  // `parseInt` method
5109
4933
  // https://tc39.es/ecma262/#sec-parseint-string-radix
5110
- $({ global: true, forced: parseInt !== $parseInt }, {
4934
+ $$2({ global: true, forced: parseInt !== $parseInt }, {
5111
4935
  parseInt: $parseInt
5112
4936
  });
5113
4937
 
@@ -5314,4 +5138,1243 @@ const Modal = _a => {
5314
5138
  });
5315
5139
  };
5316
5140
 
5317
- export { Accordion, AlertRibbon as Alert, AlertRibbon, Badge, Button, ButtonGroup, Card, Checkbox, CoreDropdown, CoreOption, Datepicker, Dropdown, EmailInput, Flexbox, Form, FormItem, FormItems, Group, InPageWizardStepCard, Input, Link, List$1 as List, Modal, Navbar, NumberInput, Option, OptionGroup, RadioButton, RadioGroup, Select, Slider, Stepper, Tab, Tabs, Text, TextArea, TextInput, valueList$1 as ValueList };
5141
+ registerTransitionalStyles();
5142
+ const ContextMenu = createComponent({
5143
+ tagName: getScopedTagName('gds-context-menu'),
5144
+ elementClass: GdsContextMenu,
5145
+ events: {
5146
+ onMenuItemClick: 'gds-menu-item-click',
5147
+ onUiStateChange: 'gds-ui-state'
5148
+ },
5149
+ react: React
5150
+ });
5151
+ const MenuItem = createComponent({
5152
+ tagName: getScopedTagName('gds-menu-item'),
5153
+ elementClass: GdsMenuItem,
5154
+ events: {
5155
+ onMenuItemClick: 'gds-menu-item-click'
5156
+ },
5157
+ react: React
5158
+ });
5159
+
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 };