@bolttech/molecules-dropdown 0.1.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.js ADDED
@@ -0,0 +1,2529 @@
1
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
+ import { useState, useRef, useEffect, useCallback } from 'react';
3
+ import { Select, SelectWithHeaders } from '@bolttech/atoms-select';
4
+ import { Icon } from '@bolttech/atoms-icon';
5
+ import { InputStyled } from '@bolttech/atoms-input';
6
+ import styled, { css } from 'styled-components';
7
+
8
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
9
+
10
+ var fails$g = function (exec) {
11
+ try {
12
+ return !!exec();
13
+ } catch (error) {
14
+ return true;
15
+ }
16
+ };
17
+
18
+ var fails$f = fails$g;
19
+
20
+ var functionBindNative = !fails$f(function () {
21
+ // eslint-disable-next-line es/no-function-prototype-bind -- safe
22
+ var test = (function () { /* empty */ }).bind();
23
+ // eslint-disable-next-line no-prototype-builtins -- safe
24
+ return typeof test != 'function' || test.hasOwnProperty('prototype');
25
+ });
26
+
27
+ var NATIVE_BIND$1 = functionBindNative;
28
+
29
+ var FunctionPrototype$1 = Function.prototype;
30
+ var call$9 = FunctionPrototype$1.call;
31
+ var uncurryThisWithBind = NATIVE_BIND$1 && FunctionPrototype$1.bind.bind(call$9, call$9);
32
+
33
+ var functionUncurryThis = NATIVE_BIND$1 ? uncurryThisWithBind : function (fn) {
34
+ return function () {
35
+ return call$9.apply(fn, arguments);
36
+ };
37
+ };
38
+
39
+ var uncurryThis$d = functionUncurryThis;
40
+
41
+ var toString$5 = uncurryThis$d({}.toString);
42
+ var stringSlice$1 = uncurryThis$d(''.slice);
43
+
44
+ var classofRaw$2 = function (it) {
45
+ return stringSlice$1(toString$5(it), 8, -1);
46
+ };
47
+
48
+ var uncurryThis$c = functionUncurryThis;
49
+ var fails$e = fails$g;
50
+ var classof$3 = classofRaw$2;
51
+
52
+ var $Object$4 = Object;
53
+ var split = uncurryThis$c(''.split);
54
+
55
+ // fallback for non-array-like ES3 and non-enumerable old V8 strings
56
+ var indexedObject = fails$e(function () {
57
+ // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
58
+ // eslint-disable-next-line no-prototype-builtins -- safe
59
+ return !$Object$4('z').propertyIsEnumerable(0);
60
+ }) ? function (it) {
61
+ return classof$3(it) == 'String' ? split(it, '') : $Object$4(it);
62
+ } : $Object$4;
63
+
64
+ // we can't use just `it == null` since of `document.all` special case
65
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
66
+ var isNullOrUndefined$3 = function (it) {
67
+ return it === null || it === undefined;
68
+ };
69
+
70
+ var isNullOrUndefined$2 = isNullOrUndefined$3;
71
+
72
+ var $TypeError$7 = TypeError;
73
+
74
+ // `RequireObjectCoercible` abstract operation
75
+ // https://tc39.es/ecma262/#sec-requireobjectcoercible
76
+ var requireObjectCoercible$4 = function (it) {
77
+ if (isNullOrUndefined$2(it)) throw $TypeError$7("Can't call method on " + it);
78
+ return it;
79
+ };
80
+
81
+ // toObject with fallback for non-array-like ES3 strings
82
+ var IndexedObject$1 = indexedObject;
83
+ var requireObjectCoercible$3 = requireObjectCoercible$4;
84
+
85
+ var toIndexedObject$5 = function (it) {
86
+ return IndexedObject$1(requireObjectCoercible$3(it));
87
+ };
88
+
89
+ var check = function (it) {
90
+ return it && it.Math == Math && it;
91
+ };
92
+
93
+ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
94
+ var global$e =
95
+ // eslint-disable-next-line es/no-global-this -- safe
96
+ check(typeof globalThis == 'object' && globalThis) ||
97
+ check(typeof window == 'object' && window) ||
98
+ // eslint-disable-next-line no-restricted-globals -- safe
99
+ check(typeof self == 'object' && self) ||
100
+ check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
101
+ // eslint-disable-next-line no-new-func -- fallback
102
+ (function () { return this; })() || Function('return this')();
103
+
104
+ var shared$4 = {exports: {}};
105
+
106
+ var global$d = global$e;
107
+
108
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
109
+ var defineProperty$5 = Object.defineProperty;
110
+
111
+ var defineGlobalProperty$3 = function (key, value) {
112
+ try {
113
+ defineProperty$5(global$d, key, { value: value, configurable: true, writable: true });
114
+ } catch (error) {
115
+ global$d[key] = value;
116
+ } return value;
117
+ };
118
+
119
+ var global$c = global$e;
120
+ var defineGlobalProperty$2 = defineGlobalProperty$3;
121
+
122
+ var SHARED = '__core-js_shared__';
123
+ var store$3 = global$c[SHARED] || defineGlobalProperty$2(SHARED, {});
124
+
125
+ var sharedStore = store$3;
126
+
127
+ var store$2 = sharedStore;
128
+
129
+ (shared$4.exports = function (key, value) {
130
+ return store$2[key] || (store$2[key] = value !== undefined ? value : {});
131
+ })('versions', []).push({
132
+ version: '3.26.1',
133
+ mode: 'global',
134
+ copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
135
+ license: 'https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE',
136
+ source: 'https://github.com/zloirock/core-js'
137
+ });
138
+
139
+ var requireObjectCoercible$2 = requireObjectCoercible$4;
140
+
141
+ var $Object$3 = Object;
142
+
143
+ // `ToObject` abstract operation
144
+ // https://tc39.es/ecma262/#sec-toobject
145
+ var toObject$3 = function (argument) {
146
+ return $Object$3(requireObjectCoercible$2(argument));
147
+ };
148
+
149
+ var uncurryThis$b = functionUncurryThis;
150
+ var toObject$2 = toObject$3;
151
+
152
+ var hasOwnProperty = uncurryThis$b({}.hasOwnProperty);
153
+
154
+ // `HasOwnProperty` abstract operation
155
+ // https://tc39.es/ecma262/#sec-hasownproperty
156
+ // eslint-disable-next-line es/no-object-hasown -- safe
157
+ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
158
+ return hasOwnProperty(toObject$2(it), key);
159
+ };
160
+
161
+ var uncurryThis$a = functionUncurryThis;
162
+
163
+ var id = 0;
164
+ var postfix = Math.random();
165
+ var toString$4 = uncurryThis$a(1.0.toString);
166
+
167
+ var uid$2 = function (key) {
168
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$4(++id + postfix, 36);
169
+ };
170
+
171
+ var documentAll$2 = typeof document == 'object' && document.all;
172
+
173
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
174
+ var IS_HTMLDDA = typeof documentAll$2 == 'undefined' && documentAll$2 !== undefined;
175
+
176
+ var documentAll_1 = {
177
+ all: documentAll$2,
178
+ IS_HTMLDDA: IS_HTMLDDA
179
+ };
180
+
181
+ var $documentAll$1 = documentAll_1;
182
+
183
+ var documentAll$1 = $documentAll$1.all;
184
+
185
+ // `IsCallable` abstract operation
186
+ // https://tc39.es/ecma262/#sec-iscallable
187
+ var isCallable$g = $documentAll$1.IS_HTMLDDA ? function (argument) {
188
+ return typeof argument == 'function' || argument === documentAll$1;
189
+ } : function (argument) {
190
+ return typeof argument == 'function';
191
+ };
192
+
193
+ var global$b = global$e;
194
+ var isCallable$f = isCallable$g;
195
+
196
+ var aFunction = function (argument) {
197
+ return isCallable$f(argument) ? argument : undefined;
198
+ };
199
+
200
+ var getBuiltIn$4 = function (namespace, method) {
201
+ return arguments.length < 2 ? aFunction(global$b[namespace]) : global$b[namespace] && global$b[namespace][method];
202
+ };
203
+
204
+ var getBuiltIn$3 = getBuiltIn$4;
205
+
206
+ var engineUserAgent = getBuiltIn$3('navigator', 'userAgent') || '';
207
+
208
+ var global$a = global$e;
209
+ var userAgent = engineUserAgent;
210
+
211
+ var process = global$a.process;
212
+ var Deno = global$a.Deno;
213
+ var versions = process && process.versions || Deno && Deno.version;
214
+ var v8 = versions && versions.v8;
215
+ var match, version;
216
+
217
+ if (v8) {
218
+ match = v8.split('.');
219
+ // in old Chrome, versions of V8 isn't V8 = Chrome / 10
220
+ // but their correct versions are not interesting for us
221
+ version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
222
+ }
223
+
224
+ // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
225
+ // so check `userAgent` even if `.v8` exists, but 0
226
+ if (!version && userAgent) {
227
+ match = userAgent.match(/Edge\/(\d+)/);
228
+ if (!match || match[1] >= 74) {
229
+ match = userAgent.match(/Chrome\/(\d+)/);
230
+ if (match) version = +match[1];
231
+ }
232
+ }
233
+
234
+ var engineV8Version = version;
235
+
236
+ /* eslint-disable es/no-symbol -- required for testing */
237
+
238
+ var V8_VERSION = engineV8Version;
239
+ var fails$d = fails$g;
240
+
241
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
242
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$d(function () {
243
+ var symbol = Symbol();
244
+ // Chrome 38 Symbol has incorrect toString conversion
245
+ // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
246
+ return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
247
+ // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
248
+ !Symbol.sham && V8_VERSION && V8_VERSION < 41;
249
+ });
250
+
251
+ /* eslint-disable es/no-symbol -- required for testing */
252
+
253
+ var NATIVE_SYMBOL$1 = symbolConstructorDetection;
254
+
255
+ var useSymbolAsUid = NATIVE_SYMBOL$1
256
+ && !Symbol.sham
257
+ && typeof Symbol.iterator == 'symbol';
258
+
259
+ var global$9 = global$e;
260
+ var shared$3 = shared$4.exports;
261
+ var hasOwn$8 = hasOwnProperty_1;
262
+ var uid$1 = uid$2;
263
+ var NATIVE_SYMBOL = symbolConstructorDetection;
264
+ var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
265
+
266
+ var WellKnownSymbolsStore = shared$3('wks');
267
+ var Symbol$1 = global$9.Symbol;
268
+ var symbolFor = Symbol$1 && Symbol$1['for'];
269
+ var createWellKnownSymbol = USE_SYMBOL_AS_UID$1 ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
270
+
271
+ var wellKnownSymbol$9 = function (name) {
272
+ if (!hasOwn$8(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
273
+ var description = 'Symbol.' + name;
274
+ if (NATIVE_SYMBOL && hasOwn$8(Symbol$1, name)) {
275
+ WellKnownSymbolsStore[name] = Symbol$1[name];
276
+ } else if (USE_SYMBOL_AS_UID$1 && symbolFor) {
277
+ WellKnownSymbolsStore[name] = symbolFor(description);
278
+ } else {
279
+ WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
280
+ }
281
+ } return WellKnownSymbolsStore[name];
282
+ };
283
+
284
+ var isCallable$e = isCallable$g;
285
+ var $documentAll = documentAll_1;
286
+
287
+ var documentAll = $documentAll.all;
288
+
289
+ var isObject$6 = $documentAll.IS_HTMLDDA ? function (it) {
290
+ return typeof it == 'object' ? it !== null : isCallable$e(it) || it === documentAll;
291
+ } : function (it) {
292
+ return typeof it == 'object' ? it !== null : isCallable$e(it);
293
+ };
294
+
295
+ var isObject$5 = isObject$6;
296
+
297
+ var $String$3 = String;
298
+ var $TypeError$6 = TypeError;
299
+
300
+ // `Assert: Type(argument) is Object`
301
+ var anObject$8 = function (argument) {
302
+ if (isObject$5(argument)) return argument;
303
+ throw $TypeError$6($String$3(argument) + ' is not an object');
304
+ };
305
+
306
+ var objectDefineProperties = {};
307
+
308
+ var fails$c = fails$g;
309
+
310
+ // Detect IE8's incomplete defineProperty implementation
311
+ var descriptors = !fails$c(function () {
312
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
313
+ return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
314
+ });
315
+
316
+ var DESCRIPTORS$9 = descriptors;
317
+ var fails$b = fails$g;
318
+
319
+ // V8 ~ Chrome 36-
320
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3334
321
+ var v8PrototypeDefineBug = DESCRIPTORS$9 && fails$b(function () {
322
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
323
+ return Object.defineProperty(function () { /* empty */ }, 'prototype', {
324
+ value: 42,
325
+ writable: false
326
+ }).prototype != 42;
327
+ });
328
+
329
+ var objectDefineProperty = {};
330
+
331
+ var global$8 = global$e;
332
+ var isObject$4 = isObject$6;
333
+
334
+ var document$1 = global$8.document;
335
+ // typeof document.createElement is 'object' in old IE
336
+ var EXISTS$1 = isObject$4(document$1) && isObject$4(document$1.createElement);
337
+
338
+ var documentCreateElement$2 = function (it) {
339
+ return EXISTS$1 ? document$1.createElement(it) : {};
340
+ };
341
+
342
+ var DESCRIPTORS$8 = descriptors;
343
+ var fails$a = fails$g;
344
+ var createElement = documentCreateElement$2;
345
+
346
+ // Thanks to IE8 for its funny defineProperty
347
+ var ie8DomDefine = !DESCRIPTORS$8 && !fails$a(function () {
348
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
349
+ return Object.defineProperty(createElement('div'), 'a', {
350
+ get: function () { return 7; }
351
+ }).a != 7;
352
+ });
353
+
354
+ var NATIVE_BIND = functionBindNative;
355
+
356
+ var call$8 = Function.prototype.call;
357
+
358
+ var functionCall = NATIVE_BIND ? call$8.bind(call$8) : function () {
359
+ return call$8.apply(call$8, arguments);
360
+ };
361
+
362
+ var uncurryThis$9 = functionUncurryThis;
363
+
364
+ var objectIsPrototypeOf = uncurryThis$9({}.isPrototypeOf);
365
+
366
+ var getBuiltIn$2 = getBuiltIn$4;
367
+ var isCallable$d = isCallable$g;
368
+ var isPrototypeOf = objectIsPrototypeOf;
369
+ var USE_SYMBOL_AS_UID = useSymbolAsUid;
370
+
371
+ var $Object$2 = Object;
372
+
373
+ var isSymbol$2 = USE_SYMBOL_AS_UID ? function (it) {
374
+ return typeof it == 'symbol';
375
+ } : function (it) {
376
+ var $Symbol = getBuiltIn$2('Symbol');
377
+ return isCallable$d($Symbol) && isPrototypeOf($Symbol.prototype, $Object$2(it));
378
+ };
379
+
380
+ var $String$2 = String;
381
+
382
+ var tryToString$1 = function (argument) {
383
+ try {
384
+ return $String$2(argument);
385
+ } catch (error) {
386
+ return 'Object';
387
+ }
388
+ };
389
+
390
+ var isCallable$c = isCallable$g;
391
+ var tryToString = tryToString$1;
392
+
393
+ var $TypeError$5 = TypeError;
394
+
395
+ // `Assert: IsCallable(argument) is true`
396
+ var aCallable$1 = function (argument) {
397
+ if (isCallable$c(argument)) return argument;
398
+ throw $TypeError$5(tryToString(argument) + ' is not a function');
399
+ };
400
+
401
+ var aCallable = aCallable$1;
402
+ var isNullOrUndefined$1 = isNullOrUndefined$3;
403
+
404
+ // `GetMethod` abstract operation
405
+ // https://tc39.es/ecma262/#sec-getmethod
406
+ var getMethod$2 = function (V, P) {
407
+ var func = V[P];
408
+ return isNullOrUndefined$1(func) ? undefined : aCallable(func);
409
+ };
410
+
411
+ var call$7 = functionCall;
412
+ var isCallable$b = isCallable$g;
413
+ var isObject$3 = isObject$6;
414
+
415
+ var $TypeError$4 = TypeError;
416
+
417
+ // `OrdinaryToPrimitive` abstract operation
418
+ // https://tc39.es/ecma262/#sec-ordinarytoprimitive
419
+ var ordinaryToPrimitive$1 = function (input, pref) {
420
+ var fn, val;
421
+ if (pref === 'string' && isCallable$b(fn = input.toString) && !isObject$3(val = call$7(fn, input))) return val;
422
+ if (isCallable$b(fn = input.valueOf) && !isObject$3(val = call$7(fn, input))) return val;
423
+ if (pref !== 'string' && isCallable$b(fn = input.toString) && !isObject$3(val = call$7(fn, input))) return val;
424
+ throw $TypeError$4("Can't convert object to primitive value");
425
+ };
426
+
427
+ var call$6 = functionCall;
428
+ var isObject$2 = isObject$6;
429
+ var isSymbol$1 = isSymbol$2;
430
+ var getMethod$1 = getMethod$2;
431
+ var ordinaryToPrimitive = ordinaryToPrimitive$1;
432
+ var wellKnownSymbol$8 = wellKnownSymbol$9;
433
+
434
+ var $TypeError$3 = TypeError;
435
+ var TO_PRIMITIVE = wellKnownSymbol$8('toPrimitive');
436
+
437
+ // `ToPrimitive` abstract operation
438
+ // https://tc39.es/ecma262/#sec-toprimitive
439
+ var toPrimitive$1 = function (input, pref) {
440
+ if (!isObject$2(input) || isSymbol$1(input)) return input;
441
+ var exoticToPrim = getMethod$1(input, TO_PRIMITIVE);
442
+ var result;
443
+ if (exoticToPrim) {
444
+ if (pref === undefined) pref = 'default';
445
+ result = call$6(exoticToPrim, input, pref);
446
+ if (!isObject$2(result) || isSymbol$1(result)) return result;
447
+ throw $TypeError$3("Can't convert object to primitive value");
448
+ }
449
+ if (pref === undefined) pref = 'number';
450
+ return ordinaryToPrimitive(input, pref);
451
+ };
452
+
453
+ var toPrimitive = toPrimitive$1;
454
+ var isSymbol = isSymbol$2;
455
+
456
+ // `ToPropertyKey` abstract operation
457
+ // https://tc39.es/ecma262/#sec-topropertykey
458
+ var toPropertyKey$2 = function (argument) {
459
+ var key = toPrimitive(argument, 'string');
460
+ return isSymbol(key) ? key : key + '';
461
+ };
462
+
463
+ var DESCRIPTORS$7 = descriptors;
464
+ var IE8_DOM_DEFINE$1 = ie8DomDefine;
465
+ var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
466
+ var anObject$7 = anObject$8;
467
+ var toPropertyKey$1 = toPropertyKey$2;
468
+
469
+ var $TypeError$2 = TypeError;
470
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
471
+ var $defineProperty = Object.defineProperty;
472
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
473
+ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
474
+ var ENUMERABLE = 'enumerable';
475
+ var CONFIGURABLE$1 = 'configurable';
476
+ var WRITABLE = 'writable';
477
+
478
+ // `Object.defineProperty` method
479
+ // https://tc39.es/ecma262/#sec-object.defineproperty
480
+ objectDefineProperty.f = DESCRIPTORS$7 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
481
+ anObject$7(O);
482
+ P = toPropertyKey$1(P);
483
+ anObject$7(Attributes);
484
+ if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
485
+ var current = $getOwnPropertyDescriptor$1(O, P);
486
+ if (current && current[WRITABLE]) {
487
+ O[P] = Attributes.value;
488
+ Attributes = {
489
+ configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
490
+ enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
491
+ writable: false
492
+ };
493
+ }
494
+ } return $defineProperty(O, P, Attributes);
495
+ } : $defineProperty : function defineProperty(O, P, Attributes) {
496
+ anObject$7(O);
497
+ P = toPropertyKey$1(P);
498
+ anObject$7(Attributes);
499
+ if (IE8_DOM_DEFINE$1) try {
500
+ return $defineProperty(O, P, Attributes);
501
+ } catch (error) { /* empty */ }
502
+ if ('get' in Attributes || 'set' in Attributes) throw $TypeError$2('Accessors not supported');
503
+ if ('value' in Attributes) O[P] = Attributes.value;
504
+ return O;
505
+ };
506
+
507
+ var ceil = Math.ceil;
508
+ var floor = Math.floor;
509
+
510
+ // `Math.trunc` method
511
+ // https://tc39.es/ecma262/#sec-math.trunc
512
+ // eslint-disable-next-line es/no-math-trunc -- safe
513
+ var mathTrunc = Math.trunc || function trunc(x) {
514
+ var n = +x;
515
+ return (n > 0 ? floor : ceil)(n);
516
+ };
517
+
518
+ var trunc = mathTrunc;
519
+
520
+ // `ToIntegerOrInfinity` abstract operation
521
+ // https://tc39.es/ecma262/#sec-tointegerorinfinity
522
+ var toIntegerOrInfinity$2 = function (argument) {
523
+ var number = +argument;
524
+ // eslint-disable-next-line no-self-compare -- NaN check
525
+ return number !== number || number === 0 ? 0 : trunc(number);
526
+ };
527
+
528
+ var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
529
+
530
+ var max = Math.max;
531
+ var min$1 = Math.min;
532
+
533
+ // Helper for a popular repeating case of the spec:
534
+ // Let integer be ? ToInteger(index).
535
+ // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
536
+ var toAbsoluteIndex$1 = function (index, length) {
537
+ var integer = toIntegerOrInfinity$1(index);
538
+ return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
539
+ };
540
+
541
+ var toIntegerOrInfinity = toIntegerOrInfinity$2;
542
+
543
+ var min = Math.min;
544
+
545
+ // `ToLength` abstract operation
546
+ // https://tc39.es/ecma262/#sec-tolength
547
+ var toLength$1 = function (argument) {
548
+ return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
549
+ };
550
+
551
+ var toLength = toLength$1;
552
+
553
+ // `LengthOfArrayLike` abstract operation
554
+ // https://tc39.es/ecma262/#sec-lengthofarraylike
555
+ var lengthOfArrayLike$1 = function (obj) {
556
+ return toLength(obj.length);
557
+ };
558
+
559
+ var toIndexedObject$4 = toIndexedObject$5;
560
+ var toAbsoluteIndex = toAbsoluteIndex$1;
561
+ var lengthOfArrayLike = lengthOfArrayLike$1;
562
+
563
+ // `Array.prototype.{ indexOf, includes }` methods implementation
564
+ var createMethod$1 = function (IS_INCLUDES) {
565
+ return function ($this, el, fromIndex) {
566
+ var O = toIndexedObject$4($this);
567
+ var length = lengthOfArrayLike(O);
568
+ var index = toAbsoluteIndex(fromIndex, length);
569
+ var value;
570
+ // Array#includes uses SameValueZero equality algorithm
571
+ // eslint-disable-next-line no-self-compare -- NaN check
572
+ if (IS_INCLUDES && el != el) while (length > index) {
573
+ value = O[index++];
574
+ // eslint-disable-next-line no-self-compare -- NaN check
575
+ if (value != value) return true;
576
+ // Array#indexOf ignores holes, Array#includes - not
577
+ } else for (;length > index; index++) {
578
+ if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
579
+ } return !IS_INCLUDES && -1;
580
+ };
581
+ };
582
+
583
+ var arrayIncludes = {
584
+ // `Array.prototype.includes` method
585
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
586
+ includes: createMethod$1(true),
587
+ // `Array.prototype.indexOf` method
588
+ // https://tc39.es/ecma262/#sec-array.prototype.indexof
589
+ indexOf: createMethod$1(false)
590
+ };
591
+
592
+ var hiddenKeys$4 = {};
593
+
594
+ var uncurryThis$8 = functionUncurryThis;
595
+ var hasOwn$7 = hasOwnProperty_1;
596
+ var toIndexedObject$3 = toIndexedObject$5;
597
+ var indexOf$1 = arrayIncludes.indexOf;
598
+ var hiddenKeys$3 = hiddenKeys$4;
599
+
600
+ var push = uncurryThis$8([].push);
601
+
602
+ var objectKeysInternal = function (object, names) {
603
+ var O = toIndexedObject$3(object);
604
+ var i = 0;
605
+ var result = [];
606
+ var key;
607
+ for (key in O) !hasOwn$7(hiddenKeys$3, key) && hasOwn$7(O, key) && push(result, key);
608
+ // Don't enum bug & hidden keys
609
+ while (names.length > i) if (hasOwn$7(O, key = names[i++])) {
610
+ ~indexOf$1(result, key) || push(result, key);
611
+ }
612
+ return result;
613
+ };
614
+
615
+ // IE8- don't enum bug keys
616
+ var enumBugKeys$3 = [
617
+ 'constructor',
618
+ 'hasOwnProperty',
619
+ 'isPrototypeOf',
620
+ 'propertyIsEnumerable',
621
+ 'toLocaleString',
622
+ 'toString',
623
+ 'valueOf'
624
+ ];
625
+
626
+ var internalObjectKeys$1 = objectKeysInternal;
627
+ var enumBugKeys$2 = enumBugKeys$3;
628
+
629
+ // `Object.keys` method
630
+ // https://tc39.es/ecma262/#sec-object.keys
631
+ // eslint-disable-next-line es/no-object-keys -- safe
632
+ var objectKeys$2 = Object.keys || function keys(O) {
633
+ return internalObjectKeys$1(O, enumBugKeys$2);
634
+ };
635
+
636
+ var DESCRIPTORS$6 = descriptors;
637
+ var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
638
+ var definePropertyModule$3 = objectDefineProperty;
639
+ var anObject$6 = anObject$8;
640
+ var toIndexedObject$2 = toIndexedObject$5;
641
+ var objectKeys$1 = objectKeys$2;
642
+
643
+ // `Object.defineProperties` method
644
+ // https://tc39.es/ecma262/#sec-object.defineproperties
645
+ // eslint-disable-next-line es/no-object-defineproperties -- safe
646
+ objectDefineProperties.f = DESCRIPTORS$6 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
647
+ anObject$6(O);
648
+ var props = toIndexedObject$2(Properties);
649
+ var keys = objectKeys$1(Properties);
650
+ var length = keys.length;
651
+ var index = 0;
652
+ var key;
653
+ while (length > index) definePropertyModule$3.f(O, key = keys[index++], props[key]);
654
+ return O;
655
+ };
656
+
657
+ var getBuiltIn$1 = getBuiltIn$4;
658
+
659
+ var html$1 = getBuiltIn$1('document', 'documentElement');
660
+
661
+ var shared$2 = shared$4.exports;
662
+ var uid = uid$2;
663
+
664
+ var keys = shared$2('keys');
665
+
666
+ var sharedKey$3 = function (key) {
667
+ return keys[key] || (keys[key] = uid(key));
668
+ };
669
+
670
+ /* global ActiveXObject -- old IE, WSH */
671
+
672
+ var anObject$5 = anObject$8;
673
+ var definePropertiesModule = objectDefineProperties;
674
+ var enumBugKeys$1 = enumBugKeys$3;
675
+ var hiddenKeys$2 = hiddenKeys$4;
676
+ var html = html$1;
677
+ var documentCreateElement$1 = documentCreateElement$2;
678
+ var sharedKey$2 = sharedKey$3;
679
+
680
+ var GT = '>';
681
+ var LT = '<';
682
+ var PROTOTYPE = 'prototype';
683
+ var SCRIPT = 'script';
684
+ var IE_PROTO$1 = sharedKey$2('IE_PROTO');
685
+
686
+ var EmptyConstructor = function () { /* empty */ };
687
+
688
+ var scriptTag = function (content) {
689
+ return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
690
+ };
691
+
692
+ // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
693
+ var NullProtoObjectViaActiveX = function (activeXDocument) {
694
+ activeXDocument.write(scriptTag(''));
695
+ activeXDocument.close();
696
+ var temp = activeXDocument.parentWindow.Object;
697
+ activeXDocument = null; // avoid memory leak
698
+ return temp;
699
+ };
700
+
701
+ // Create object with fake `null` prototype: use iframe Object with cleared prototype
702
+ var NullProtoObjectViaIFrame = function () {
703
+ // Thrash, waste and sodomy: IE GC bug
704
+ var iframe = documentCreateElement$1('iframe');
705
+ var JS = 'java' + SCRIPT + ':';
706
+ var iframeDocument;
707
+ iframe.style.display = 'none';
708
+ html.appendChild(iframe);
709
+ // https://github.com/zloirock/core-js/issues/475
710
+ iframe.src = String(JS);
711
+ iframeDocument = iframe.contentWindow.document;
712
+ iframeDocument.open();
713
+ iframeDocument.write(scriptTag('document.F=Object'));
714
+ iframeDocument.close();
715
+ return iframeDocument.F;
716
+ };
717
+
718
+ // Check for document.domain and active x support
719
+ // No need to use active x approach when document.domain is not set
720
+ // see https://github.com/es-shims/es5-shim/issues/150
721
+ // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
722
+ // avoid IE GC bug
723
+ var activeXDocument;
724
+ var NullProtoObject = function () {
725
+ try {
726
+ activeXDocument = new ActiveXObject('htmlfile');
727
+ } catch (error) { /* ignore */ }
728
+ NullProtoObject = typeof document != 'undefined'
729
+ ? document.domain && activeXDocument
730
+ ? NullProtoObjectViaActiveX(activeXDocument) // old IE
731
+ : NullProtoObjectViaIFrame()
732
+ : NullProtoObjectViaActiveX(activeXDocument); // WSH
733
+ var length = enumBugKeys$1.length;
734
+ while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys$1[length]];
735
+ return NullProtoObject();
736
+ };
737
+
738
+ hiddenKeys$2[IE_PROTO$1] = true;
739
+
740
+ // `Object.create` method
741
+ // https://tc39.es/ecma262/#sec-object.create
742
+ // eslint-disable-next-line es/no-object-create -- safe
743
+ var objectCreate = Object.create || function create(O, Properties) {
744
+ var result;
745
+ if (O !== null) {
746
+ EmptyConstructor[PROTOTYPE] = anObject$5(O);
747
+ result = new EmptyConstructor();
748
+ EmptyConstructor[PROTOTYPE] = null;
749
+ // add "__proto__" for Object.getPrototypeOf polyfill
750
+ result[IE_PROTO$1] = O;
751
+ } else result = NullProtoObject();
752
+ return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
753
+ };
754
+
755
+ var wellKnownSymbol$7 = wellKnownSymbol$9;
756
+ var create$2 = objectCreate;
757
+ var defineProperty$4 = objectDefineProperty.f;
758
+
759
+ var UNSCOPABLES = wellKnownSymbol$7('unscopables');
760
+ var ArrayPrototype = Array.prototype;
761
+
762
+ // Array.prototype[@@unscopables]
763
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
764
+ if (ArrayPrototype[UNSCOPABLES] == undefined) {
765
+ defineProperty$4(ArrayPrototype, UNSCOPABLES, {
766
+ configurable: true,
767
+ value: create$2(null)
768
+ });
769
+ }
770
+
771
+ // add a key to Array.prototype[@@unscopables]
772
+ var addToUnscopables$1 = function (key) {
773
+ ArrayPrototype[UNSCOPABLES][key] = true;
774
+ };
775
+
776
+ var iterators = {};
777
+
778
+ var global$7 = global$e;
779
+ var isCallable$a = isCallable$g;
780
+
781
+ var WeakMap$1 = global$7.WeakMap;
782
+
783
+ var weakMapBasicDetection = isCallable$a(WeakMap$1) && /native code/.test(String(WeakMap$1));
784
+
785
+ var createPropertyDescriptor$3 = function (bitmap, value) {
786
+ return {
787
+ enumerable: !(bitmap & 1),
788
+ configurable: !(bitmap & 2),
789
+ writable: !(bitmap & 4),
790
+ value: value
791
+ };
792
+ };
793
+
794
+ var DESCRIPTORS$5 = descriptors;
795
+ var definePropertyModule$2 = objectDefineProperty;
796
+ var createPropertyDescriptor$2 = createPropertyDescriptor$3;
797
+
798
+ var createNonEnumerableProperty$5 = DESCRIPTORS$5 ? function (object, key, value) {
799
+ return definePropertyModule$2.f(object, key, createPropertyDescriptor$2(1, value));
800
+ } : function (object, key, value) {
801
+ object[key] = value;
802
+ return object;
803
+ };
804
+
805
+ var NATIVE_WEAK_MAP = weakMapBasicDetection;
806
+ var global$6 = global$e;
807
+ var isObject$1 = isObject$6;
808
+ var createNonEnumerableProperty$4 = createNonEnumerableProperty$5;
809
+ var hasOwn$6 = hasOwnProperty_1;
810
+ var shared$1 = sharedStore;
811
+ var sharedKey$1 = sharedKey$3;
812
+ var hiddenKeys$1 = hiddenKeys$4;
813
+
814
+ var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
815
+ var TypeError$1 = global$6.TypeError;
816
+ var WeakMap = global$6.WeakMap;
817
+ var set, get, has;
818
+
819
+ var enforce = function (it) {
820
+ return has(it) ? get(it) : set(it, {});
821
+ };
822
+
823
+ var getterFor = function (TYPE) {
824
+ return function (it) {
825
+ var state;
826
+ if (!isObject$1(it) || (state = get(it)).type !== TYPE) {
827
+ throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
828
+ } return state;
829
+ };
830
+ };
831
+
832
+ if (NATIVE_WEAK_MAP || shared$1.state) {
833
+ var store$1 = shared$1.state || (shared$1.state = new WeakMap());
834
+ /* eslint-disable no-self-assign -- prototype methods protection */
835
+ store$1.get = store$1.get;
836
+ store$1.has = store$1.has;
837
+ store$1.set = store$1.set;
838
+ /* eslint-enable no-self-assign -- prototype methods protection */
839
+ set = function (it, metadata) {
840
+ if (store$1.has(it)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
841
+ metadata.facade = it;
842
+ store$1.set(it, metadata);
843
+ return metadata;
844
+ };
845
+ get = function (it) {
846
+ return store$1.get(it) || {};
847
+ };
848
+ has = function (it) {
849
+ return store$1.has(it);
850
+ };
851
+ } else {
852
+ var STATE = sharedKey$1('state');
853
+ hiddenKeys$1[STATE] = true;
854
+ set = function (it, metadata) {
855
+ if (hasOwn$6(it, STATE)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
856
+ metadata.facade = it;
857
+ createNonEnumerableProperty$4(it, STATE, metadata);
858
+ return metadata;
859
+ };
860
+ get = function (it) {
861
+ return hasOwn$6(it, STATE) ? it[STATE] : {};
862
+ };
863
+ has = function (it) {
864
+ return hasOwn$6(it, STATE);
865
+ };
866
+ }
867
+
868
+ var internalState = {
869
+ set: set,
870
+ get: get,
871
+ has: has,
872
+ enforce: enforce,
873
+ getterFor: getterFor
874
+ };
875
+
876
+ var objectGetOwnPropertyDescriptor = {};
877
+
878
+ var objectPropertyIsEnumerable = {};
879
+
880
+ var $propertyIsEnumerable = {}.propertyIsEnumerable;
881
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
882
+ var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
883
+
884
+ // Nashorn ~ JDK8 bug
885
+ var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
886
+
887
+ // `Object.prototype.propertyIsEnumerable` method implementation
888
+ // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
889
+ objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
890
+ var descriptor = getOwnPropertyDescriptor$1(this, V);
891
+ return !!descriptor && descriptor.enumerable;
892
+ } : $propertyIsEnumerable;
893
+
894
+ var DESCRIPTORS$4 = descriptors;
895
+ var call$5 = functionCall;
896
+ var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
897
+ var createPropertyDescriptor$1 = createPropertyDescriptor$3;
898
+ var toIndexedObject$1 = toIndexedObject$5;
899
+ var toPropertyKey = toPropertyKey$2;
900
+ var hasOwn$5 = hasOwnProperty_1;
901
+ var IE8_DOM_DEFINE = ie8DomDefine;
902
+
903
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
904
+ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
905
+
906
+ // `Object.getOwnPropertyDescriptor` method
907
+ // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
908
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$4 ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
909
+ O = toIndexedObject$1(O);
910
+ P = toPropertyKey(P);
911
+ if (IE8_DOM_DEFINE) try {
912
+ return $getOwnPropertyDescriptor(O, P);
913
+ } catch (error) { /* empty */ }
914
+ if (hasOwn$5(O, P)) return createPropertyDescriptor$1(!call$5(propertyIsEnumerableModule$1.f, O, P), O[P]);
915
+ };
916
+
917
+ var makeBuiltIn$2 = {exports: {}};
918
+
919
+ var DESCRIPTORS$3 = descriptors;
920
+ var hasOwn$4 = hasOwnProperty_1;
921
+
922
+ var FunctionPrototype = Function.prototype;
923
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
924
+ var getDescriptor = DESCRIPTORS$3 && Object.getOwnPropertyDescriptor;
925
+
926
+ var EXISTS = hasOwn$4(FunctionPrototype, 'name');
927
+ // additional protection from minified / mangled / dropped function names
928
+ var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
929
+ var CONFIGURABLE = EXISTS && (!DESCRIPTORS$3 || (DESCRIPTORS$3 && getDescriptor(FunctionPrototype, 'name').configurable));
930
+
931
+ var functionName = {
932
+ EXISTS: EXISTS,
933
+ PROPER: PROPER,
934
+ CONFIGURABLE: CONFIGURABLE
935
+ };
936
+
937
+ var uncurryThis$7 = functionUncurryThis;
938
+ var isCallable$9 = isCallable$g;
939
+ var store = sharedStore;
940
+
941
+ var functionToString = uncurryThis$7(Function.toString);
942
+
943
+ // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
944
+ if (!isCallable$9(store.inspectSource)) {
945
+ store.inspectSource = function (it) {
946
+ return functionToString(it);
947
+ };
948
+ }
949
+
950
+ var inspectSource$1 = store.inspectSource;
951
+
952
+ var fails$9 = fails$g;
953
+ var isCallable$8 = isCallable$g;
954
+ var hasOwn$3 = hasOwnProperty_1;
955
+ var DESCRIPTORS$2 = descriptors;
956
+ var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
957
+ var inspectSource = inspectSource$1;
958
+ var InternalStateModule$1 = internalState;
959
+
960
+ var enforceInternalState = InternalStateModule$1.enforce;
961
+ var getInternalState$2 = InternalStateModule$1.get;
962
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
963
+ var defineProperty$3 = Object.defineProperty;
964
+
965
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$2 && !fails$9(function () {
966
+ return defineProperty$3(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
967
+ });
968
+
969
+ var TEMPLATE = String(String).split('String');
970
+
971
+ var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
972
+ if (String(name).slice(0, 7) === 'Symbol(') {
973
+ name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
974
+ }
975
+ if (options && options.getter) name = 'get ' + name;
976
+ if (options && options.setter) name = 'set ' + name;
977
+ if (!hasOwn$3(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
978
+ if (DESCRIPTORS$2) defineProperty$3(value, 'name', { value: name, configurable: true });
979
+ else value.name = name;
980
+ }
981
+ if (CONFIGURABLE_LENGTH && options && hasOwn$3(options, 'arity') && value.length !== options.arity) {
982
+ defineProperty$3(value, 'length', { value: options.arity });
983
+ }
984
+ try {
985
+ if (options && hasOwn$3(options, 'constructor') && options.constructor) {
986
+ if (DESCRIPTORS$2) defineProperty$3(value, 'prototype', { writable: false });
987
+ // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
988
+ } else if (value.prototype) value.prototype = undefined;
989
+ } catch (error) { /* empty */ }
990
+ var state = enforceInternalState(value);
991
+ if (!hasOwn$3(state, 'source')) {
992
+ state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
993
+ } return value;
994
+ };
995
+
996
+ // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
997
+ // eslint-disable-next-line no-extend-native -- required
998
+ Function.prototype.toString = makeBuiltIn$1(function toString() {
999
+ return isCallable$8(this) && getInternalState$2(this).source || inspectSource(this);
1000
+ }, 'toString');
1001
+
1002
+ var isCallable$7 = isCallable$g;
1003
+ var definePropertyModule$1 = objectDefineProperty;
1004
+ var makeBuiltIn = makeBuiltIn$2.exports;
1005
+ var defineGlobalProperty$1 = defineGlobalProperty$3;
1006
+
1007
+ var defineBuiltIn$4 = function (O, key, value, options) {
1008
+ if (!options) options = {};
1009
+ var simple = options.enumerable;
1010
+ var name = options.name !== undefined ? options.name : key;
1011
+ if (isCallable$7(value)) makeBuiltIn(value, name, options);
1012
+ if (options.global) {
1013
+ if (simple) O[key] = value;
1014
+ else defineGlobalProperty$1(key, value);
1015
+ } else {
1016
+ try {
1017
+ if (!options.unsafe) delete O[key];
1018
+ else if (O[key]) simple = true;
1019
+ } catch (error) { /* empty */ }
1020
+ if (simple) O[key] = value;
1021
+ else definePropertyModule$1.f(O, key, {
1022
+ value: value,
1023
+ enumerable: false,
1024
+ configurable: !options.nonConfigurable,
1025
+ writable: !options.nonWritable
1026
+ });
1027
+ } return O;
1028
+ };
1029
+
1030
+ var objectGetOwnPropertyNames = {};
1031
+
1032
+ var internalObjectKeys = objectKeysInternal;
1033
+ var enumBugKeys = enumBugKeys$3;
1034
+
1035
+ var hiddenKeys = enumBugKeys.concat('length', 'prototype');
1036
+
1037
+ // `Object.getOwnPropertyNames` method
1038
+ // https://tc39.es/ecma262/#sec-object.getownpropertynames
1039
+ // eslint-disable-next-line es/no-object-getownpropertynames -- safe
1040
+ objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
1041
+ return internalObjectKeys(O, hiddenKeys);
1042
+ };
1043
+
1044
+ var objectGetOwnPropertySymbols = {};
1045
+
1046
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
1047
+ objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
1048
+
1049
+ var getBuiltIn = getBuiltIn$4;
1050
+ var uncurryThis$6 = functionUncurryThis;
1051
+ var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
1052
+ var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
1053
+ var anObject$4 = anObject$8;
1054
+
1055
+ var concat$1 = uncurryThis$6([].concat);
1056
+
1057
+ // all object keys, includes non-enumerable and symbols
1058
+ var ownKeys$1 = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
1059
+ var keys = getOwnPropertyNamesModule.f(anObject$4(it));
1060
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
1061
+ return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
1062
+ };
1063
+
1064
+ var hasOwn$2 = hasOwnProperty_1;
1065
+ var ownKeys = ownKeys$1;
1066
+ var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
1067
+ var definePropertyModule = objectDefineProperty;
1068
+
1069
+ var copyConstructorProperties$1 = function (target, source, exceptions) {
1070
+ var keys = ownKeys(source);
1071
+ var defineProperty = definePropertyModule.f;
1072
+ var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
1073
+ for (var i = 0; i < keys.length; i++) {
1074
+ var key = keys[i];
1075
+ if (!hasOwn$2(target, key) && !(exceptions && hasOwn$2(exceptions, key))) {
1076
+ defineProperty(target, key, getOwnPropertyDescriptor(source, key));
1077
+ }
1078
+ }
1079
+ };
1080
+
1081
+ var fails$8 = fails$g;
1082
+ var isCallable$6 = isCallable$g;
1083
+
1084
+ var replacement = /#|\.prototype\./;
1085
+
1086
+ var isForced$1 = function (feature, detection) {
1087
+ var value = data[normalize(feature)];
1088
+ return value == POLYFILL ? true
1089
+ : value == NATIVE ? false
1090
+ : isCallable$6(detection) ? fails$8(detection)
1091
+ : !!detection;
1092
+ };
1093
+
1094
+ var normalize = isForced$1.normalize = function (string) {
1095
+ return String(string).replace(replacement, '.').toLowerCase();
1096
+ };
1097
+
1098
+ var data = isForced$1.data = {};
1099
+ var NATIVE = isForced$1.NATIVE = 'N';
1100
+ var POLYFILL = isForced$1.POLYFILL = 'P';
1101
+
1102
+ var isForced_1 = isForced$1;
1103
+
1104
+ var global$5 = global$e;
1105
+ var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
1106
+ var createNonEnumerableProperty$3 = createNonEnumerableProperty$5;
1107
+ var defineBuiltIn$3 = defineBuiltIn$4;
1108
+ var defineGlobalProperty = defineGlobalProperty$3;
1109
+ var copyConstructorProperties = copyConstructorProperties$1;
1110
+ var isForced = isForced_1;
1111
+
1112
+ /*
1113
+ options.target - name of the target object
1114
+ options.global - target is the global object
1115
+ options.stat - export as static methods of target
1116
+ options.proto - export as prototype methods of target
1117
+ options.real - real prototype method for the `pure` version
1118
+ options.forced - export even if the native feature is available
1119
+ options.bind - bind methods to the target, required for the `pure` version
1120
+ options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
1121
+ options.unsafe - use the simple assignment of property instead of delete + defineProperty
1122
+ options.sham - add a flag to not completely full polyfills
1123
+ options.enumerable - export as enumerable property
1124
+ options.dontCallGetSet - prevent calling a getter on target
1125
+ options.name - the .name of the function if it does not match the key
1126
+ */
1127
+ var _export = function (options, source) {
1128
+ var TARGET = options.target;
1129
+ var GLOBAL = options.global;
1130
+ var STATIC = options.stat;
1131
+ var FORCED, target, key, targetProperty, sourceProperty, descriptor;
1132
+ if (GLOBAL) {
1133
+ target = global$5;
1134
+ } else if (STATIC) {
1135
+ target = global$5[TARGET] || defineGlobalProperty(TARGET, {});
1136
+ } else {
1137
+ target = (global$5[TARGET] || {}).prototype;
1138
+ }
1139
+ if (target) for (key in source) {
1140
+ sourceProperty = source[key];
1141
+ if (options.dontCallGetSet) {
1142
+ descriptor = getOwnPropertyDescriptor(target, key);
1143
+ targetProperty = descriptor && descriptor.value;
1144
+ } else targetProperty = target[key];
1145
+ FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
1146
+ // contained in target
1147
+ if (!FORCED && targetProperty !== undefined) {
1148
+ if (typeof sourceProperty == typeof targetProperty) continue;
1149
+ copyConstructorProperties(sourceProperty, targetProperty);
1150
+ }
1151
+ // add a flag to not completely full polyfills
1152
+ if (options.sham || (targetProperty && targetProperty.sham)) {
1153
+ createNonEnumerableProperty$3(sourceProperty, 'sham', true);
1154
+ }
1155
+ defineBuiltIn$3(target, key, sourceProperty, options);
1156
+ }
1157
+ };
1158
+
1159
+ var fails$7 = fails$g;
1160
+
1161
+ var correctPrototypeGetter = !fails$7(function () {
1162
+ function F() { /* empty */ }
1163
+ F.prototype.constructor = null;
1164
+ // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
1165
+ return Object.getPrototypeOf(new F()) !== F.prototype;
1166
+ });
1167
+
1168
+ var hasOwn$1 = hasOwnProperty_1;
1169
+ var isCallable$5 = isCallable$g;
1170
+ var toObject$1 = toObject$3;
1171
+ var sharedKey = sharedKey$3;
1172
+ var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
1173
+
1174
+ var IE_PROTO = sharedKey('IE_PROTO');
1175
+ var $Object$1 = Object;
1176
+ var ObjectPrototype = $Object$1.prototype;
1177
+
1178
+ // `Object.getPrototypeOf` method
1179
+ // https://tc39.es/ecma262/#sec-object.getprototypeof
1180
+ // eslint-disable-next-line es/no-object-getprototypeof -- safe
1181
+ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf : function (O) {
1182
+ var object = toObject$1(O);
1183
+ if (hasOwn$1(object, IE_PROTO)) return object[IE_PROTO];
1184
+ var constructor = object.constructor;
1185
+ if (isCallable$5(constructor) && object instanceof constructor) {
1186
+ return constructor.prototype;
1187
+ } return object instanceof $Object$1 ? ObjectPrototype : null;
1188
+ };
1189
+
1190
+ var fails$6 = fails$g;
1191
+ var isCallable$4 = isCallable$g;
1192
+ var isObject = isObject$6;
1193
+ var getPrototypeOf$1 = objectGetPrototypeOf;
1194
+ var defineBuiltIn$2 = defineBuiltIn$4;
1195
+ var wellKnownSymbol$6 = wellKnownSymbol$9;
1196
+
1197
+ var ITERATOR$2 = wellKnownSymbol$6('iterator');
1198
+ var BUGGY_SAFARI_ITERATORS$1 = false;
1199
+
1200
+ // `%IteratorPrototype%` object
1201
+ // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
1202
+ var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator;
1203
+
1204
+ /* eslint-disable es/no-array-prototype-keys -- safe */
1205
+ if ([].keys) {
1206
+ arrayIterator = [].keys();
1207
+ // Safari 8 has buggy iterators w/o `next`
1208
+ if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true;
1209
+ else {
1210
+ PrototypeOfArrayIteratorPrototype = getPrototypeOf$1(getPrototypeOf$1(arrayIterator));
1211
+ if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$2 = PrototypeOfArrayIteratorPrototype;
1212
+ }
1213
+ }
1214
+
1215
+ var NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype$2) || fails$6(function () {
1216
+ var test = {};
1217
+ // FF44- legacy iterators case
1218
+ return IteratorPrototype$2[ITERATOR$2].call(test) !== test;
1219
+ });
1220
+
1221
+ if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
1222
+
1223
+ // `%IteratorPrototype%[@@iterator]()` method
1224
+ // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
1225
+ if (!isCallable$4(IteratorPrototype$2[ITERATOR$2])) {
1226
+ defineBuiltIn$2(IteratorPrototype$2, ITERATOR$2, function () {
1227
+ return this;
1228
+ });
1229
+ }
1230
+
1231
+ var iteratorsCore = {
1232
+ IteratorPrototype: IteratorPrototype$2,
1233
+ BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
1234
+ };
1235
+
1236
+ var defineProperty$2 = objectDefineProperty.f;
1237
+ var hasOwn = hasOwnProperty_1;
1238
+ var wellKnownSymbol$5 = wellKnownSymbol$9;
1239
+
1240
+ var TO_STRING_TAG$3 = wellKnownSymbol$5('toStringTag');
1241
+
1242
+ var setToStringTag$2 = function (target, TAG, STATIC) {
1243
+ if (target && !STATIC) target = target.prototype;
1244
+ if (target && !hasOwn(target, TO_STRING_TAG$3)) {
1245
+ defineProperty$2(target, TO_STRING_TAG$3, { configurable: true, value: TAG });
1246
+ }
1247
+ };
1248
+
1249
+ var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
1250
+ var create$1 = objectCreate;
1251
+ var createPropertyDescriptor = createPropertyDescriptor$3;
1252
+ var setToStringTag$1 = setToStringTag$2;
1253
+ var Iterators$2 = iterators;
1254
+
1255
+ var returnThis$1 = function () { return this; };
1256
+
1257
+ var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
1258
+ var TO_STRING_TAG = NAME + ' Iterator';
1259
+ IteratorConstructor.prototype = create$1(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
1260
+ setToStringTag$1(IteratorConstructor, TO_STRING_TAG, false);
1261
+ Iterators$2[TO_STRING_TAG] = returnThis$1;
1262
+ return IteratorConstructor;
1263
+ };
1264
+
1265
+ var isCallable$3 = isCallable$g;
1266
+
1267
+ var $String$1 = String;
1268
+ var $TypeError$1 = TypeError;
1269
+
1270
+ var aPossiblePrototype$1 = function (argument) {
1271
+ if (typeof argument == 'object' || isCallable$3(argument)) return argument;
1272
+ throw $TypeError$1("Can't set " + $String$1(argument) + ' as a prototype');
1273
+ };
1274
+
1275
+ /* eslint-disable no-proto -- safe */
1276
+
1277
+ var uncurryThis$5 = functionUncurryThis;
1278
+ var anObject$3 = anObject$8;
1279
+ var aPossiblePrototype = aPossiblePrototype$1;
1280
+
1281
+ // `Object.setPrototypeOf` method
1282
+ // https://tc39.es/ecma262/#sec-object.setprototypeof
1283
+ // Works with __proto__ only. Old v8 can't work with null proto objects.
1284
+ // eslint-disable-next-line es/no-object-setprototypeof -- safe
1285
+ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
1286
+ var CORRECT_SETTER = false;
1287
+ var test = {};
1288
+ var setter;
1289
+ try {
1290
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1291
+ setter = uncurryThis$5(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
1292
+ setter(test, []);
1293
+ CORRECT_SETTER = test instanceof Array;
1294
+ } catch (error) { /* empty */ }
1295
+ return function setPrototypeOf(O, proto) {
1296
+ anObject$3(O);
1297
+ aPossiblePrototype(proto);
1298
+ if (CORRECT_SETTER) setter(O, proto);
1299
+ else O.__proto__ = proto;
1300
+ return O;
1301
+ };
1302
+ }() : undefined);
1303
+
1304
+ var $$3 = _export;
1305
+ var call$4 = functionCall;
1306
+ var FunctionName = functionName;
1307
+ var isCallable$2 = isCallable$g;
1308
+ var createIteratorConstructor = iteratorCreateConstructor;
1309
+ var getPrototypeOf = objectGetPrototypeOf;
1310
+ var setPrototypeOf = objectSetPrototypeOf;
1311
+ var setToStringTag = setToStringTag$2;
1312
+ var createNonEnumerableProperty$2 = createNonEnumerableProperty$5;
1313
+ var defineBuiltIn$1 = defineBuiltIn$4;
1314
+ var wellKnownSymbol$4 = wellKnownSymbol$9;
1315
+ var Iterators$1 = iterators;
1316
+ var IteratorsCore = iteratorsCore;
1317
+
1318
+ var PROPER_FUNCTION_NAME$1 = FunctionName.PROPER;
1319
+ var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
1320
+ var IteratorPrototype = IteratorsCore.IteratorPrototype;
1321
+ var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
1322
+ var ITERATOR$1 = wellKnownSymbol$4('iterator');
1323
+ var KEYS = 'keys';
1324
+ var VALUES = 'values';
1325
+ var ENTRIES = 'entries';
1326
+
1327
+ var returnThis = function () { return this; };
1328
+
1329
+ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
1330
+ createIteratorConstructor(IteratorConstructor, NAME, next);
1331
+
1332
+ var getIterationMethod = function (KIND) {
1333
+ if (KIND === DEFAULT && defaultIterator) return defaultIterator;
1334
+ if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
1335
+ switch (KIND) {
1336
+ case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
1337
+ case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
1338
+ case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
1339
+ } return function () { return new IteratorConstructor(this); };
1340
+ };
1341
+
1342
+ var TO_STRING_TAG = NAME + ' Iterator';
1343
+ var INCORRECT_VALUES_NAME = false;
1344
+ var IterablePrototype = Iterable.prototype;
1345
+ var nativeIterator = IterablePrototype[ITERATOR$1]
1346
+ || IterablePrototype['@@iterator']
1347
+ || DEFAULT && IterablePrototype[DEFAULT];
1348
+ var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
1349
+ var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
1350
+ var CurrentIteratorPrototype, methods, KEY;
1351
+
1352
+ // fix native
1353
+ if (anyNativeIterator) {
1354
+ CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
1355
+ if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
1356
+ if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
1357
+ if (setPrototypeOf) {
1358
+ setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
1359
+ } else if (!isCallable$2(CurrentIteratorPrototype[ITERATOR$1])) {
1360
+ defineBuiltIn$1(CurrentIteratorPrototype, ITERATOR$1, returnThis);
1361
+ }
1362
+ }
1363
+ // Set @@toStringTag to native iterators
1364
+ setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true);
1365
+ }
1366
+ }
1367
+
1368
+ // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
1369
+ if (PROPER_FUNCTION_NAME$1 && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
1370
+ if (CONFIGURABLE_FUNCTION_NAME) {
1371
+ createNonEnumerableProperty$2(IterablePrototype, 'name', VALUES);
1372
+ } else {
1373
+ INCORRECT_VALUES_NAME = true;
1374
+ defaultIterator = function values() { return call$4(nativeIterator, this); };
1375
+ }
1376
+ }
1377
+
1378
+ // export additional methods
1379
+ if (DEFAULT) {
1380
+ methods = {
1381
+ values: getIterationMethod(VALUES),
1382
+ keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
1383
+ entries: getIterationMethod(ENTRIES)
1384
+ };
1385
+ if (FORCED) for (KEY in methods) {
1386
+ if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1387
+ defineBuiltIn$1(IterablePrototype, KEY, methods[KEY]);
1388
+ }
1389
+ } else $$3({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1390
+ }
1391
+
1392
+ // define iterator
1393
+ if (IterablePrototype[ITERATOR$1] !== defaultIterator) {
1394
+ defineBuiltIn$1(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT });
1395
+ }
1396
+ Iterators$1[NAME] = defaultIterator;
1397
+
1398
+ return methods;
1399
+ };
1400
+
1401
+ // `CreateIterResultObject` abstract operation
1402
+ // https://tc39.es/ecma262/#sec-createiterresultobject
1403
+ var createIterResultObject$1 = function (value, done) {
1404
+ return { value: value, done: done };
1405
+ };
1406
+
1407
+ var toIndexedObject = toIndexedObject$5;
1408
+ var addToUnscopables = addToUnscopables$1;
1409
+ var Iterators = iterators;
1410
+ var InternalStateModule = internalState;
1411
+ var defineProperty$1 = objectDefineProperty.f;
1412
+ var defineIterator = iteratorDefine;
1413
+ var createIterResultObject = createIterResultObject$1;
1414
+ var DESCRIPTORS$1 = descriptors;
1415
+
1416
+ var ARRAY_ITERATOR = 'Array Iterator';
1417
+ var setInternalState = InternalStateModule.set;
1418
+ var getInternalState$1 = InternalStateModule.getterFor(ARRAY_ITERATOR);
1419
+
1420
+ // `Array.prototype.entries` method
1421
+ // https://tc39.es/ecma262/#sec-array.prototype.entries
1422
+ // `Array.prototype.keys` method
1423
+ // https://tc39.es/ecma262/#sec-array.prototype.keys
1424
+ // `Array.prototype.values` method
1425
+ // https://tc39.es/ecma262/#sec-array.prototype.values
1426
+ // `Array.prototype[@@iterator]` method
1427
+ // https://tc39.es/ecma262/#sec-array.prototype-@@iterator
1428
+ // `CreateArrayIterator` internal method
1429
+ // https://tc39.es/ecma262/#sec-createarrayiterator
1430
+ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
1431
+ setInternalState(this, {
1432
+ type: ARRAY_ITERATOR,
1433
+ target: toIndexedObject(iterated), // target
1434
+ index: 0, // next index
1435
+ kind: kind // kind
1436
+ });
1437
+ // `%ArrayIteratorPrototype%.next` method
1438
+ // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
1439
+ }, function () {
1440
+ var state = getInternalState$1(this);
1441
+ var target = state.target;
1442
+ var kind = state.kind;
1443
+ var index = state.index++;
1444
+ if (!target || index >= target.length) {
1445
+ state.target = undefined;
1446
+ return createIterResultObject(undefined, true);
1447
+ }
1448
+ if (kind == 'keys') return createIterResultObject(index, false);
1449
+ if (kind == 'values') return createIterResultObject(target[index], false);
1450
+ return createIterResultObject([index, target[index]], false);
1451
+ }, 'values');
1452
+
1453
+ // argumentsList[@@iterator] is %ArrayProto_values%
1454
+ // https://tc39.es/ecma262/#sec-createunmappedargumentsobject
1455
+ // https://tc39.es/ecma262/#sec-createmappedargumentsobject
1456
+ var values = Iterators.Arguments = Iterators.Array;
1457
+
1458
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1459
+ addToUnscopables('keys');
1460
+ addToUnscopables('values');
1461
+ addToUnscopables('entries');
1462
+
1463
+ // V8 ~ Chrome 45- bug
1464
+ if (DESCRIPTORS$1 && values.name !== 'values') try {
1465
+ defineProperty$1(values, 'name', { value: 'values' });
1466
+ } catch (error) { /* empty */ }
1467
+
1468
+ // iterable DOM collections
1469
+ // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
1470
+ var domIterables = {
1471
+ CSSRuleList: 0,
1472
+ CSSStyleDeclaration: 0,
1473
+ CSSValueList: 0,
1474
+ ClientRectList: 0,
1475
+ DOMRectList: 0,
1476
+ DOMStringList: 0,
1477
+ DOMTokenList: 1,
1478
+ DataTransferItemList: 0,
1479
+ FileList: 0,
1480
+ HTMLAllCollection: 0,
1481
+ HTMLCollection: 0,
1482
+ HTMLFormElement: 0,
1483
+ HTMLSelectElement: 0,
1484
+ MediaList: 0,
1485
+ MimeTypeArray: 0,
1486
+ NamedNodeMap: 0,
1487
+ NodeList: 1,
1488
+ PaintRequestList: 0,
1489
+ Plugin: 0,
1490
+ PluginArray: 0,
1491
+ SVGLengthList: 0,
1492
+ SVGNumberList: 0,
1493
+ SVGPathSegList: 0,
1494
+ SVGPointList: 0,
1495
+ SVGStringList: 0,
1496
+ SVGTransformList: 0,
1497
+ SourceBufferList: 0,
1498
+ StyleSheetList: 0,
1499
+ TextTrackCueList: 0,
1500
+ TextTrackList: 0,
1501
+ TouchList: 0
1502
+ };
1503
+
1504
+ // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
1505
+ var documentCreateElement = documentCreateElement$2;
1506
+
1507
+ var classList = documentCreateElement('span').classList;
1508
+ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
1509
+
1510
+ var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
1511
+
1512
+ var global$4 = global$e;
1513
+ var DOMIterables = domIterables;
1514
+ var DOMTokenListPrototype = domTokenListPrototype;
1515
+ var ArrayIteratorMethods = es_array_iterator;
1516
+ var createNonEnumerableProperty$1 = createNonEnumerableProperty$5;
1517
+ var wellKnownSymbol$3 = wellKnownSymbol$9;
1518
+
1519
+ var ITERATOR = wellKnownSymbol$3('iterator');
1520
+ var TO_STRING_TAG$2 = wellKnownSymbol$3('toStringTag');
1521
+ var ArrayValues = ArrayIteratorMethods.values;
1522
+
1523
+ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
1524
+ if (CollectionPrototype) {
1525
+ // some Chrome versions have non-configurable methods on DOMTokenList
1526
+ if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
1527
+ createNonEnumerableProperty$1(CollectionPrototype, ITERATOR, ArrayValues);
1528
+ } catch (error) {
1529
+ CollectionPrototype[ITERATOR] = ArrayValues;
1530
+ }
1531
+ if (!CollectionPrototype[TO_STRING_TAG$2]) {
1532
+ createNonEnumerableProperty$1(CollectionPrototype, TO_STRING_TAG$2, COLLECTION_NAME);
1533
+ }
1534
+ if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
1535
+ // some Chrome versions have non-configurable methods on DOMTokenList
1536
+ if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
1537
+ createNonEnumerableProperty$1(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
1538
+ } catch (error) {
1539
+ CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
1540
+ }
1541
+ }
1542
+ }
1543
+ };
1544
+
1545
+ for (var COLLECTION_NAME in DOMIterables) {
1546
+ handlePrototype(global$4[COLLECTION_NAME] && global$4[COLLECTION_NAME].prototype, COLLECTION_NAME);
1547
+ }
1548
+
1549
+ handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
1550
+
1551
+ var DESCRIPTORS = descriptors;
1552
+ var uncurryThis$4 = functionUncurryThis;
1553
+ var call$3 = functionCall;
1554
+ var fails$5 = fails$g;
1555
+ var objectKeys = objectKeys$2;
1556
+ var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1557
+ var propertyIsEnumerableModule = objectPropertyIsEnumerable;
1558
+ var toObject = toObject$3;
1559
+ var IndexedObject = indexedObject;
1560
+
1561
+ // eslint-disable-next-line es/no-object-assign -- safe
1562
+ var $assign = Object.assign;
1563
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1564
+ var defineProperty = Object.defineProperty;
1565
+ var concat = uncurryThis$4([].concat);
1566
+
1567
+ // `Object.assign` method
1568
+ // https://tc39.es/ecma262/#sec-object.assign
1569
+ var objectAssign = !$assign || fails$5(function () {
1570
+ // should have correct order of operations (Edge bug)
1571
+ if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
1572
+ enumerable: true,
1573
+ get: function () {
1574
+ defineProperty(this, 'b', {
1575
+ value: 3,
1576
+ enumerable: false
1577
+ });
1578
+ }
1579
+ }), { b: 2 })).b !== 1) return true;
1580
+ // should work with symbols and should have deterministic property order (V8 bug)
1581
+ var A = {};
1582
+ var B = {};
1583
+ // eslint-disable-next-line es/no-symbol -- safe
1584
+ var symbol = Symbol();
1585
+ var alphabet = 'abcdefghijklmnopqrst';
1586
+ A[symbol] = 7;
1587
+ alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1588
+ return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
1589
+ }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
1590
+ var T = toObject(target);
1591
+ var argumentsLength = arguments.length;
1592
+ var index = 1;
1593
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1594
+ var propertyIsEnumerable = propertyIsEnumerableModule.f;
1595
+ while (argumentsLength > index) {
1596
+ var S = IndexedObject(arguments[index++]);
1597
+ var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
1598
+ var length = keys.length;
1599
+ var j = 0;
1600
+ var key;
1601
+ while (length > j) {
1602
+ key = keys[j++];
1603
+ if (!DESCRIPTORS || call$3(propertyIsEnumerable, S, key)) T[key] = S[key];
1604
+ }
1605
+ } return T;
1606
+ } : $assign;
1607
+
1608
+ var $$2 = _export;
1609
+ var assign = objectAssign;
1610
+
1611
+ // `Object.assign` method
1612
+ // https://tc39.es/ecma262/#sec-object.assign
1613
+ // eslint-disable-next-line es/no-object-assign -- required for testing
1614
+ $$2({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1615
+ assign: assign
1616
+ });
1617
+
1618
+ /******************************************************************************
1619
+ Copyright (c) Microsoft Corporation.
1620
+
1621
+ Permission to use, copy, modify, and/or distribute this software for any
1622
+ purpose with or without fee is hereby granted.
1623
+
1624
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
1625
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
1626
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
1627
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
1628
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
1629
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1630
+ PERFORMANCE OF THIS SOFTWARE.
1631
+ ***************************************************************************** */
1632
+
1633
+ function __awaiter(thisArg, _arguments, P, generator) {
1634
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
1635
+ return new (P || (P = Promise))(function (resolve, reject) {
1636
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
1637
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
1638
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
1639
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
1640
+ });
1641
+ }
1642
+
1643
+ const ClickableElement = /*#__PURE__*/styled.div.withConfig({
1644
+ displayName: "molecules-dropdownstyles__ClickableElement",
1645
+ componentId: "sc-3wugi4-0"
1646
+ })(["cursor:pointer;"]);
1647
+ const ContainerDropdown = /*#__PURE__*/styled.section.withConfig({
1648
+ displayName: "molecules-dropdownstyles__ContainerDropdown",
1649
+ componentId: "sc-3wugi4-1"
1650
+ })(["padding-top:", ";padding-bottom:", ";padding-right:", ";padding-left:", ";gap:", ";background-color:", ";border:", ";border-radius:", ";box-shadow:", ";.fieldLabel{color:", ";font-family:", ";font-weight:", ";line-height:", ";font-size:", ";letter-spacing:", ";}.requiredLabel{color:", ";font-family:", ";font-weight:", ";line-height:", ";font-size:", ";letter-spacing:", ";}svg{width:", ";fill:", ";}input{color:", ";font-family:", ";font-weight:", ";line-height:", ";font-size:", ";letter-spacing:", ";}&:focus-within{background-color:", ";border:", ";", "}", " ", ""], ({
1651
+ theme
1652
+ }) => theme.components.dropdown.paddingHorizontal, ({
1653
+ theme
1654
+ }) => theme.components.dropdown.paddingHorizontal, ({
1655
+ theme
1656
+ }) => theme.components.dropdown.paddingVertical, ({
1657
+ theme
1658
+ }) => theme.components.dropdown.paddingVertical, ({
1659
+ theme
1660
+ }) => theme.components.dropdown.gap, ({
1661
+ theme,
1662
+ variant
1663
+ }) => theme.components.dropdown[variant].container.color.default, ({
1664
+ theme,
1665
+ variant
1666
+ }) => `1px solid ${theme.components.dropdown[variant].container.border.default}`, ({
1667
+ theme
1668
+ }) => theme.components.dropdown.borderRadius, ({
1669
+ theme: {
1670
+ effects: {
1671
+ shadow
1672
+ }
1673
+ }
1674
+ }) => `${shadow.lvl0.x} ${shadow.lvl0.y} ${shadow.lvl0.blur} ${shadow.lvl0.spread} ${shadow.lvl0.color}`, ({
1675
+ theme,
1676
+ variant,
1677
+ hasValue
1678
+ }) => theme.components.dropdown[variant].text.color.fieldLabel[hasValue ? 'filled' : 'default'], ({
1679
+ theme
1680
+ }) => theme.components.dropdown.fieldLabel.fontFamily, ({
1681
+ theme
1682
+ }) => theme.components.dropdown.fieldLabel.fontWeight, ({
1683
+ theme
1684
+ }) => theme.components.dropdown.fieldLabel.lineHeight, ({
1685
+ theme
1686
+ }) => theme.components.dropdown.fieldLabel.fontSize, ({
1687
+ theme
1688
+ }) => theme.components.dropdown.fieldLabel.letterSpacing, ({
1689
+ theme,
1690
+ variant,
1691
+ hasValue
1692
+ }) => theme.components.dropdown[variant].text.color.required[hasValue ? 'filled' : 'default'], ({
1693
+ theme
1694
+ }) => theme.components.dropdown.required.fontFamily, ({
1695
+ theme
1696
+ }) => theme.components.dropdown.required.fontWeight, ({
1697
+ theme
1698
+ }) => theme.components.dropdown.required.lineHeight, ({
1699
+ theme
1700
+ }) => theme.components.dropdown.required.fontSize, ({
1701
+ theme
1702
+ }) => theme.components.dropdown.required.letterSpacing, ({
1703
+ theme
1704
+ }) => theme.components.dropdown.icon.size, ({
1705
+ theme,
1706
+ variant,
1707
+ hasValue
1708
+ }) => theme.components.dropdown[variant].icon.color[hasValue ? 'filled' : 'default'], ({
1709
+ theme,
1710
+ variant
1711
+ }) => theme.components.dropdown[variant].text.color.fieldLabel.default, ({
1712
+ theme
1713
+ }) => theme.components.dropdown.required.fontFamily, ({
1714
+ theme
1715
+ }) => theme.components.dropdown.required.fontWeight, ({
1716
+ theme
1717
+ }) => theme.components.dropdown.required.lineHeight, ({
1718
+ theme
1719
+ }) => theme.components.dropdown.required.fontSize, ({
1720
+ theme
1721
+ }) => theme.components.dropdown.required.letterSpacing, ({
1722
+ theme,
1723
+ variant,
1724
+ hasError
1725
+ }) => theme.components.dropdown[variant].container.color[hasError ? 'error' : 'focus'], ({
1726
+ theme,
1727
+ variant,
1728
+ hasError
1729
+ }) => `1px solid ${theme.components.dropdown[variant].container.border[hasError ? 'error' : 'focus']}`, ({
1730
+ hasError
1731
+ }) => !hasError && css([".fieldLabel{color:", ";}.requiredLabel{color:", ";}svg{fill:", ";}"], ({
1732
+ theme,
1733
+ variant
1734
+ }) => theme.components.dropdown[variant].text.color.fieldLabel.focus, ({
1735
+ theme,
1736
+ variant
1737
+ }) => theme.components.dropdown[variant].text.color.required.focus, ({
1738
+ theme,
1739
+ variant
1740
+ }) => theme.components.dropdown[variant].icon.color.focus), ({
1741
+ hasError,
1742
+ hasValue
1743
+ }) => hasError && css(["border:", ";background-color:", ";.fieldLabel{color:", ";}.requiredLabel{color:", ";}svg{fill:", ";}"], ({
1744
+ theme,
1745
+ variant
1746
+ }) => `1px solid ${theme.components.dropdown[variant].container.border[hasValue ? 'errorFilled' : 'error']}`, ({
1747
+ theme,
1748
+ variant
1749
+ }) => theme.components.dropdown[variant].container.color[hasValue ? 'errorFilled' : 'error'], ({
1750
+ theme,
1751
+ variant,
1752
+ hasValue
1753
+ }) => theme.components.dropdown[variant].text.color.fieldLabel[hasValue ? 'errorFilled' : 'error'], ({
1754
+ theme,
1755
+ variant,
1756
+ hasValue
1757
+ }) => theme.components.dropdown[variant].text.color.required[hasValue ? 'errorFilled' : 'error'], ({
1758
+ theme,
1759
+ variant
1760
+ }) => theme.components.dropdown[variant].icon.color[hasValue ? 'errorFilled' : 'error']), ({
1761
+ disabled
1762
+ }) => disabled && css(["cursor:not-allowed;border:", ";background-color:", ";*{cursor:not-allowed;}.fieldLabel{color:", ";}.requiredLabel{color:", ";}svg{fill:", ";}input{::placeholder{color:", ";}}"], ({
1763
+ theme,
1764
+ variant
1765
+ }) => `1px solid ${theme.components.dropdown[variant].container.border.disable}`, ({
1766
+ theme,
1767
+ variant
1768
+ }) => theme.components.dropdown[variant].container.color.disable, ({
1769
+ theme,
1770
+ variant
1771
+ }) => theme.components.dropdown[variant].text.color.fieldLabel.disable, ({
1772
+ theme,
1773
+ variant
1774
+ }) => theme.components.dropdown[variant].text.color.required.disable, ({
1775
+ theme,
1776
+ variant
1777
+ }) => theme.components.dropdown[variant].icon.color.disable, ({
1778
+ theme,
1779
+ variant
1780
+ }) => theme.components.dropdown[variant].text.color.required.disable));
1781
+ const SectionContainer = /*#__PURE__*/styled.section.withConfig({
1782
+ displayName: "molecules-dropdownstyles__SectionContainer",
1783
+ componentId: "sc-3wugi4-2"
1784
+ })([".errorMessage{width:100%;padding-right:", ";padding-left:", ";label{color:", ";font-family:", ";font-weight:", ";line-height:", ";font-size:", ";letter-spacing:", ";}}"], ({
1785
+ theme
1786
+ }) => theme.components.dropdown.paddingVertical, ({
1787
+ theme
1788
+ }) => theme.components.dropdown.paddingVertical, ({
1789
+ theme,
1790
+ variant
1791
+ }) => theme.components.dropdown[variant].text.color.errorMessage.error, ({
1792
+ theme
1793
+ }) => theme.components.dropdown.error.fontFamily, ({
1794
+ theme
1795
+ }) => theme.components.dropdown.error.fontWeight, ({
1796
+ theme
1797
+ }) => theme.components.dropdown.error.lineHeight, ({
1798
+ theme
1799
+ }) => theme.components.dropdown.error.fontSize, ({
1800
+ theme
1801
+ }) => theme.components.dropdown.error.letterSpacing);
1802
+ const InputAndIconDropdown = /*#__PURE__*/styled.div.withConfig({
1803
+ displayName: "molecules-dropdownstyles__InputAndIconDropdown",
1804
+ componentId: "sc-3wugi4-3"
1805
+ })(["display:flex;"]);
1806
+ const ContentDropdown = /*#__PURE__*/styled.div.withConfig({
1807
+ displayName: "molecules-dropdownstyles__ContentDropdown",
1808
+ componentId: "sc-3wugi4-4"
1809
+ })(["gap:", ";"], ({
1810
+ theme
1811
+ }) => theme.components.dropdown.gap);
1812
+ const FieldLabelAndRequiredLabelDropdown = /*#__PURE__*/styled(ClickableElement).withConfig({
1813
+ displayName: "molecules-dropdownstyles__FieldLabelAndRequiredLabelDropdown",
1814
+ componentId: "sc-3wugi4-5"
1815
+ })(["gap:", ";display:flex;"], ({
1816
+ theme
1817
+ }) => theme.components.dropdown.requiredGap);
1818
+
1819
+ const ReusableDropdownComponent = ({
1820
+ label,
1821
+ variant: _variant = 'grey',
1822
+ required,
1823
+ inputValue,
1824
+ hasError,
1825
+ disabled,
1826
+ errorMessage,
1827
+ onChangeInputValue,
1828
+ setShowSelectComponent,
1829
+ showSelectComponent,
1830
+ setSelectedOptionOnInputValue,
1831
+ inputRef,
1832
+ dataTestId,
1833
+ placeholder
1834
+ }) => {
1835
+ return jsxs(Fragment, {
1836
+ children: [jsx(ContainerDropdown, Object.assign({
1837
+ variant: _variant,
1838
+ hasValue: inputValue,
1839
+ hasError: hasError,
1840
+ disabled: disabled,
1841
+ "data-testid": `${dataTestId}-dropdown-container`
1842
+ }, {
1843
+ children: jsxs(ContentDropdown, {
1844
+ children: [jsxs(FieldLabelAndRequiredLabelDropdown, Object.assign({
1845
+ onClick: () => {
1846
+ setShowSelectComponent(disabled ? false : !showSelectComponent);
1847
+ }
1848
+ }, {
1849
+ children: [jsx("label", Object.assign({
1850
+ className: "fieldLabel",
1851
+ "data-testid": `${dataTestId}-label`
1852
+ }, {
1853
+ children: label
1854
+ })), required && jsx("label", Object.assign({
1855
+ className: "requiredLabel",
1856
+ "data-testid": `${dataTestId}-label-required`
1857
+ }, {
1858
+ children: "*"
1859
+ }))]
1860
+ })), jsxs(InputAndIconDropdown, {
1861
+ children: [jsx(InputStyled, {
1862
+ "data-testid": `${dataTestId}-input`,
1863
+ ref: inputRef,
1864
+ disabled: disabled,
1865
+ value: inputValue,
1866
+ variant: _variant,
1867
+ placeholder: placeholder,
1868
+ onChange: e => {
1869
+ var _a;
1870
+ onChangeInputValue(((_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.value) || '');
1871
+ setShowSelectComponent(true);
1872
+ },
1873
+ onFocus: () => {
1874
+ onChangeInputValue('');
1875
+ setShowSelectComponent(true);
1876
+ },
1877
+ onBlur: () => {
1878
+ setSelectedOptionOnInputValue();
1879
+ setShowSelectComponent(false);
1880
+ }
1881
+ }), jsx(ClickableElement, Object.assign({
1882
+ onClick: () => {
1883
+ if (!disabled) setShowSelectComponent(!showSelectComponent);
1884
+ }
1885
+ }, {
1886
+ children: jsx(Icon, {
1887
+ dataTestId: `${dataTestId}-icon`,
1888
+ icon: !showSelectComponent ? 'keyboard_arrow_down' : 'keyboard_arrow_up'
1889
+ })
1890
+ }))]
1891
+ })]
1892
+ })
1893
+ })), !showSelectComponent && hasError && errorMessage && jsx("div", Object.assign({
1894
+ className: "errorMessage"
1895
+ }, {
1896
+ children: jsx("label", Object.assign({
1897
+ "data-testid": `${dataTestId}-label-error-message`
1898
+ }, {
1899
+ children: errorMessage
1900
+ }))
1901
+ }))]
1902
+ });
1903
+ };
1904
+
1905
+ var wellKnownSymbol$2 = wellKnownSymbol$9;
1906
+
1907
+ var TO_STRING_TAG$1 = wellKnownSymbol$2('toStringTag');
1908
+ var test = {};
1909
+
1910
+ test[TO_STRING_TAG$1] = 'z';
1911
+
1912
+ var toStringTagSupport = String(test) === '[object z]';
1913
+
1914
+ var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1915
+ var isCallable$1 = isCallable$g;
1916
+ var classofRaw$1 = classofRaw$2;
1917
+ var wellKnownSymbol$1 = wellKnownSymbol$9;
1918
+
1919
+ var TO_STRING_TAG = wellKnownSymbol$1('toStringTag');
1920
+ var $Object = Object;
1921
+
1922
+ // ES3 wrong here
1923
+ var CORRECT_ARGUMENTS = classofRaw$1(function () { return arguments; }()) == 'Arguments';
1924
+
1925
+ // fallback for IE11 Script Access Denied error
1926
+ var tryGet = function (it, key) {
1927
+ try {
1928
+ return it[key];
1929
+ } catch (error) { /* empty */ }
1930
+ };
1931
+
1932
+ // getting tag from ES6+ `Object.prototype.toString`
1933
+ var classof$2 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
1934
+ var O, tag, result;
1935
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
1936
+ // @@toStringTag case
1937
+ : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
1938
+ // builtinTag case
1939
+ : CORRECT_ARGUMENTS ? classofRaw$1(O)
1940
+ // ES3 arguments fallback
1941
+ : (result = classofRaw$1(O)) == 'Object' && isCallable$1(O.callee) ? 'Arguments' : result;
1942
+ };
1943
+
1944
+ var classof$1 = classof$2;
1945
+
1946
+ var $String = String;
1947
+
1948
+ var toString$3 = function (argument) {
1949
+ if (classof$1(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
1950
+ return $String(argument);
1951
+ };
1952
+
1953
+ var anObject$2 = anObject$8;
1954
+
1955
+ // `RegExp.prototype.flags` getter implementation
1956
+ // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
1957
+ var regexpFlags$1 = function () {
1958
+ var that = anObject$2(this);
1959
+ var result = '';
1960
+ if (that.hasIndices) result += 'd';
1961
+ if (that.global) result += 'g';
1962
+ if (that.ignoreCase) result += 'i';
1963
+ if (that.multiline) result += 'm';
1964
+ if (that.dotAll) result += 's';
1965
+ if (that.unicode) result += 'u';
1966
+ if (that.unicodeSets) result += 'v';
1967
+ if (that.sticky) result += 'y';
1968
+ return result;
1969
+ };
1970
+
1971
+ var fails$4 = fails$g;
1972
+ var global$3 = global$e;
1973
+
1974
+ // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
1975
+ var $RegExp$2 = global$3.RegExp;
1976
+
1977
+ var UNSUPPORTED_Y$1 = fails$4(function () {
1978
+ var re = $RegExp$2('a', 'y');
1979
+ re.lastIndex = 2;
1980
+ return re.exec('abcd') != null;
1981
+ });
1982
+
1983
+ // UC Browser bug
1984
+ // https://github.com/zloirock/core-js/issues/1008
1985
+ var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$4(function () {
1986
+ return !$RegExp$2('a', 'y').sticky;
1987
+ });
1988
+
1989
+ var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$4(function () {
1990
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
1991
+ var re = $RegExp$2('^r', 'gy');
1992
+ re.lastIndex = 2;
1993
+ return re.exec('str') != null;
1994
+ });
1995
+
1996
+ var regexpStickyHelpers = {
1997
+ BROKEN_CARET: BROKEN_CARET,
1998
+ MISSED_STICKY: MISSED_STICKY,
1999
+ UNSUPPORTED_Y: UNSUPPORTED_Y$1
2000
+ };
2001
+
2002
+ var fails$3 = fails$g;
2003
+ var global$2 = global$e;
2004
+
2005
+ // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
2006
+ var $RegExp$1 = global$2.RegExp;
2007
+
2008
+ var regexpUnsupportedDotAll = fails$3(function () {
2009
+ var re = $RegExp$1('.', 's');
2010
+ return !(re.dotAll && re.exec('\n') && re.flags === 's');
2011
+ });
2012
+
2013
+ var fails$2 = fails$g;
2014
+ var global$1 = global$e;
2015
+
2016
+ // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
2017
+ var $RegExp = global$1.RegExp;
2018
+
2019
+ var regexpUnsupportedNcg = fails$2(function () {
2020
+ var re = $RegExp('(?<a>b)', 'g');
2021
+ return re.exec('b').groups.a !== 'b' ||
2022
+ 'b'.replace(re, '$<a>c') !== 'bc';
2023
+ });
2024
+
2025
+ /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
2026
+ /* eslint-disable regexp/no-useless-quantifier -- testing */
2027
+ var call$2 = functionCall;
2028
+ var uncurryThis$3 = functionUncurryThis;
2029
+ var toString$2 = toString$3;
2030
+ var regexpFlags = regexpFlags$1;
2031
+ var stickyHelpers = regexpStickyHelpers;
2032
+ var shared = shared$4.exports;
2033
+ var create = objectCreate;
2034
+ var getInternalState = internalState.get;
2035
+ var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
2036
+ var UNSUPPORTED_NCG = regexpUnsupportedNcg;
2037
+
2038
+ var nativeReplace = shared('native-string-replace', String.prototype.replace);
2039
+ var nativeExec = RegExp.prototype.exec;
2040
+ var patchedExec = nativeExec;
2041
+ var charAt = uncurryThis$3(''.charAt);
2042
+ var indexOf = uncurryThis$3(''.indexOf);
2043
+ var replace$1 = uncurryThis$3(''.replace);
2044
+ var stringSlice = uncurryThis$3(''.slice);
2045
+
2046
+ var UPDATES_LAST_INDEX_WRONG = (function () {
2047
+ var re1 = /a/;
2048
+ var re2 = /b*/g;
2049
+ call$2(nativeExec, re1, 'a');
2050
+ call$2(nativeExec, re2, 'a');
2051
+ return re1.lastIndex !== 0 || re2.lastIndex !== 0;
2052
+ })();
2053
+
2054
+ var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;
2055
+
2056
+ // nonparticipating capturing group, copied from es5-shim's String#split patch.
2057
+ var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
2058
+
2059
+ var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
2060
+
2061
+ if (PATCH) {
2062
+ patchedExec = function exec(string) {
2063
+ var re = this;
2064
+ var state = getInternalState(re);
2065
+ var str = toString$2(string);
2066
+ var raw = state.raw;
2067
+ var result, reCopy, lastIndex, match, i, object, group;
2068
+
2069
+ if (raw) {
2070
+ raw.lastIndex = re.lastIndex;
2071
+ result = call$2(patchedExec, raw, str);
2072
+ re.lastIndex = raw.lastIndex;
2073
+ return result;
2074
+ }
2075
+
2076
+ var groups = state.groups;
2077
+ var sticky = UNSUPPORTED_Y && re.sticky;
2078
+ var flags = call$2(regexpFlags, re);
2079
+ var source = re.source;
2080
+ var charsAdded = 0;
2081
+ var strCopy = str;
2082
+
2083
+ if (sticky) {
2084
+ flags = replace$1(flags, 'y', '');
2085
+ if (indexOf(flags, 'g') === -1) {
2086
+ flags += 'g';
2087
+ }
2088
+
2089
+ strCopy = stringSlice(str, re.lastIndex);
2090
+ // Support anchored sticky behavior.
2091
+ if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt(str, re.lastIndex - 1) !== '\n')) {
2092
+ source = '(?: ' + source + ')';
2093
+ strCopy = ' ' + strCopy;
2094
+ charsAdded++;
2095
+ }
2096
+ // ^(? + rx + ) is needed, in combination with some str slicing, to
2097
+ // simulate the 'y' flag.
2098
+ reCopy = new RegExp('^(?:' + source + ')', flags);
2099
+ }
2100
+
2101
+ if (NPCG_INCLUDED) {
2102
+ reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
2103
+ }
2104
+ if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
2105
+
2106
+ match = call$2(nativeExec, sticky ? reCopy : re, strCopy);
2107
+
2108
+ if (sticky) {
2109
+ if (match) {
2110
+ match.input = stringSlice(match.input, charsAdded);
2111
+ match[0] = stringSlice(match[0], charsAdded);
2112
+ match.index = re.lastIndex;
2113
+ re.lastIndex += match[0].length;
2114
+ } else re.lastIndex = 0;
2115
+ } else if (UPDATES_LAST_INDEX_WRONG && match) {
2116
+ re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
2117
+ }
2118
+ if (NPCG_INCLUDED && match && match.length > 1) {
2119
+ // Fix browsers whose `exec` methods don't consistently return `undefined`
2120
+ // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
2121
+ call$2(nativeReplace, match[0], reCopy, function () {
2122
+ for (i = 1; i < arguments.length - 2; i++) {
2123
+ if (arguments[i] === undefined) match[i] = undefined;
2124
+ }
2125
+ });
2126
+ }
2127
+
2128
+ if (match && groups) {
2129
+ match.groups = object = create(null);
2130
+ for (i = 0; i < groups.length; i++) {
2131
+ group = groups[i];
2132
+ object[group[0]] = match[group[1]];
2133
+ }
2134
+ }
2135
+
2136
+ return match;
2137
+ };
2138
+ }
2139
+
2140
+ var regexpExec$2 = patchedExec;
2141
+
2142
+ var $$1 = _export;
2143
+ var exec = regexpExec$2;
2144
+
2145
+ // `RegExp.prototype.exec` method
2146
+ // https://tc39.es/ecma262/#sec-regexp.prototype.exec
2147
+ $$1({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
2148
+ exec: exec
2149
+ });
2150
+
2151
+ var classofRaw = classofRaw$2;
2152
+ var uncurryThis$2 = functionUncurryThis;
2153
+
2154
+ var functionUncurryThisClause = function (fn) {
2155
+ // Nashorn bug:
2156
+ // https://github.com/zloirock/core-js/issues/1128
2157
+ // https://github.com/zloirock/core-js/issues/1130
2158
+ if (classofRaw(fn) === 'Function') return uncurryThis$2(fn);
2159
+ };
2160
+
2161
+ // TODO: Remove from `core-js@4` since it's moved to entry points
2162
+
2163
+ var uncurryThis$1 = functionUncurryThisClause;
2164
+ var defineBuiltIn = defineBuiltIn$4;
2165
+ var regexpExec$1 = regexpExec$2;
2166
+ var fails$1 = fails$g;
2167
+ var wellKnownSymbol = wellKnownSymbol$9;
2168
+ var createNonEnumerableProperty = createNonEnumerableProperty$5;
2169
+
2170
+ var SPECIES = wellKnownSymbol('species');
2171
+ var RegExpPrototype = RegExp.prototype;
2172
+
2173
+ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
2174
+ var SYMBOL = wellKnownSymbol(KEY);
2175
+
2176
+ var DELEGATES_TO_SYMBOL = !fails$1(function () {
2177
+ // String methods call symbol-named RegEp methods
2178
+ var O = {};
2179
+ O[SYMBOL] = function () { return 7; };
2180
+ return ''[KEY](O) != 7;
2181
+ });
2182
+
2183
+ var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$1(function () {
2184
+ // Symbol-named RegExp methods call .exec
2185
+ var execCalled = false;
2186
+ var re = /a/;
2187
+
2188
+ if (KEY === 'split') {
2189
+ // We can't use real regex here since it causes deoptimization
2190
+ // and serious performance degradation in V8
2191
+ // https://github.com/zloirock/core-js/issues/306
2192
+ re = {};
2193
+ // RegExp[@@split] doesn't call the regex's exec method, but first creates
2194
+ // a new one. We need to return the patched regex when creating the new one.
2195
+ re.constructor = {};
2196
+ re.constructor[SPECIES] = function () { return re; };
2197
+ re.flags = '';
2198
+ re[SYMBOL] = /./[SYMBOL];
2199
+ }
2200
+
2201
+ re.exec = function () { execCalled = true; return null; };
2202
+
2203
+ re[SYMBOL]('');
2204
+ return !execCalled;
2205
+ });
2206
+
2207
+ if (
2208
+ !DELEGATES_TO_SYMBOL ||
2209
+ !DELEGATES_TO_EXEC ||
2210
+ FORCED
2211
+ ) {
2212
+ var uncurriedNativeRegExpMethod = uncurryThis$1(/./[SYMBOL]);
2213
+ var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
2214
+ var uncurriedNativeMethod = uncurryThis$1(nativeMethod);
2215
+ var $exec = regexp.exec;
2216
+ if ($exec === regexpExec$1 || $exec === RegExpPrototype.exec) {
2217
+ if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
2218
+ // The native String method already delegates to @@method (this
2219
+ // polyfilled function), leasing to infinite recursion.
2220
+ // We avoid it by directly calling the native @@method method.
2221
+ return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };
2222
+ }
2223
+ return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };
2224
+ }
2225
+ return { done: false };
2226
+ });
2227
+
2228
+ defineBuiltIn(String.prototype, KEY, methods[0]);
2229
+ defineBuiltIn(RegExpPrototype, SYMBOL, methods[1]);
2230
+ }
2231
+
2232
+ if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);
2233
+ };
2234
+
2235
+ // `SameValue` abstract operation
2236
+ // https://tc39.es/ecma262/#sec-samevalue
2237
+ // eslint-disable-next-line es/no-object-is -- safe
2238
+ var sameValue$1 = Object.is || function is(x, y) {
2239
+ // eslint-disable-next-line no-self-compare -- NaN check
2240
+ return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
2241
+ };
2242
+
2243
+ var call$1 = functionCall;
2244
+ var anObject$1 = anObject$8;
2245
+ var isCallable = isCallable$g;
2246
+ var classof = classofRaw$2;
2247
+ var regexpExec = regexpExec$2;
2248
+
2249
+ var $TypeError = TypeError;
2250
+
2251
+ // `RegExpExec` abstract operation
2252
+ // https://tc39.es/ecma262/#sec-regexpexec
2253
+ var regexpExecAbstract = function (R, S) {
2254
+ var exec = R.exec;
2255
+ if (isCallable(exec)) {
2256
+ var result = call$1(exec, R, S);
2257
+ if (result !== null) anObject$1(result);
2258
+ return result;
2259
+ }
2260
+ if (classof(R) === 'RegExp') return call$1(regexpExec, R, S);
2261
+ throw $TypeError('RegExp#exec called on incompatible receiver');
2262
+ };
2263
+
2264
+ var call = functionCall;
2265
+ var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
2266
+ var anObject = anObject$8;
2267
+ var isNullOrUndefined = isNullOrUndefined$3;
2268
+ var requireObjectCoercible$1 = requireObjectCoercible$4;
2269
+ var sameValue = sameValue$1;
2270
+ var toString$1 = toString$3;
2271
+ var getMethod = getMethod$2;
2272
+ var regExpExec = regexpExecAbstract;
2273
+
2274
+ // @@search logic
2275
+ fixRegExpWellKnownSymbolLogic('search', function (SEARCH, nativeSearch, maybeCallNative) {
2276
+ return [
2277
+ // `String.prototype.search` method
2278
+ // https://tc39.es/ecma262/#sec-string.prototype.search
2279
+ function search(regexp) {
2280
+ var O = requireObjectCoercible$1(this);
2281
+ var searcher = isNullOrUndefined(regexp) ? undefined : getMethod(regexp, SEARCH);
2282
+ return searcher ? call(searcher, regexp, O) : new RegExp(regexp)[SEARCH](toString$1(O));
2283
+ },
2284
+ // `RegExp.prototype[@@search]` method
2285
+ // https://tc39.es/ecma262/#sec-regexp.prototype-@@search
2286
+ function (string) {
2287
+ var rx = anObject(this);
2288
+ var S = toString$1(string);
2289
+ var res = maybeCallNative(nativeSearch, rx, S);
2290
+
2291
+ if (res.done) return res.value;
2292
+
2293
+ var previousLastIndex = rx.lastIndex;
2294
+ if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
2295
+ var result = regExpExec(rx, S);
2296
+ if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;
2297
+ return result === null ? -1 : result.index;
2298
+ }
2299
+ ];
2300
+ });
2301
+
2302
+ // a string of all valid unicode whitespaces
2303
+ var whitespaces$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
2304
+ '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
2305
+
2306
+ var uncurryThis = functionUncurryThis;
2307
+ var requireObjectCoercible = requireObjectCoercible$4;
2308
+ var toString = toString$3;
2309
+ var whitespaces$1 = whitespaces$2;
2310
+
2311
+ var replace = uncurryThis(''.replace);
2312
+ var whitespace = '[' + whitespaces$1 + ']';
2313
+ var ltrim = RegExp('^' + whitespace + whitespace + '*');
2314
+ var rtrim = RegExp(whitespace + whitespace + '*$');
2315
+
2316
+ // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
2317
+ var createMethod = function (TYPE) {
2318
+ return function ($this) {
2319
+ var string = toString(requireObjectCoercible($this));
2320
+ if (TYPE & 1) string = replace(string, ltrim, '');
2321
+ if (TYPE & 2) string = replace(string, rtrim, '');
2322
+ return string;
2323
+ };
2324
+ };
2325
+
2326
+ var stringTrim = {
2327
+ // `String.prototype.{ trimLeft, trimStart }` methods
2328
+ // https://tc39.es/ecma262/#sec-string.prototype.trimstart
2329
+ start: createMethod(1),
2330
+ // `String.prototype.{ trimRight, trimEnd }` methods
2331
+ // https://tc39.es/ecma262/#sec-string.prototype.trimend
2332
+ end: createMethod(2),
2333
+ // `String.prototype.trim` method
2334
+ // https://tc39.es/ecma262/#sec-string.prototype.trim
2335
+ trim: createMethod(3)
2336
+ };
2337
+
2338
+ var PROPER_FUNCTION_NAME = functionName.PROPER;
2339
+ var fails = fails$g;
2340
+ var whitespaces = whitespaces$2;
2341
+
2342
+ var non = '\u200B\u0085\u180E';
2343
+
2344
+ // check that a method works with the correct list
2345
+ // of whitespaces and has a correct name
2346
+ var stringTrimForced = function (METHOD_NAME) {
2347
+ return fails(function () {
2348
+ return !!whitespaces[METHOD_NAME]()
2349
+ || non[METHOD_NAME]() !== non
2350
+ || (PROPER_FUNCTION_NAME && whitespaces[METHOD_NAME].name !== METHOD_NAME);
2351
+ });
2352
+ };
2353
+
2354
+ var $ = _export;
2355
+ var $trim = stringTrim.trim;
2356
+ var forcedStringTrimMethod = stringTrimForced;
2357
+
2358
+ // `String.prototype.trim` method
2359
+ // https://tc39.es/ecma262/#sec-string.prototype.trim
2360
+ $({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
2361
+ trim: function trim() {
2362
+ return $trim(this);
2363
+ }
2364
+ });
2365
+
2366
+ function filterOptions(inputValue, optionList) {
2367
+ if (!optionList) return [];
2368
+ if (!inputValue) return optionList;
2369
+ return optionList.filter(opt => opt.label.toLowerCase().search(inputValue.trim().toLowerCase()) !== -1);
2370
+ }
2371
+ function filterOptionsWithHeaders(inputValue, optionList) {
2372
+ if (!optionList) return [];
2373
+ if (!inputValue) return optionList;
2374
+ return optionList.map(element => {
2375
+ return Object.assign(Object.assign({}, element), {
2376
+ options: element.options.filter(subElement => subElement.label.toLowerCase().search(inputValue.trim().toLowerCase()) !== -1)
2377
+ });
2378
+ });
2379
+ }
2380
+
2381
+ const Dropdown = ({
2382
+ label,
2383
+ variant: _variant = 'grey',
2384
+ required,
2385
+ hasError,
2386
+ optionList,
2387
+ disabled,
2388
+ errorMessage,
2389
+ urlFilterOptions,
2390
+ dataTestId,
2391
+ filterOptionsParam: _filterOptionsParam = filterOptions,
2392
+ selectedOption,
2393
+ setSelectedOption,
2394
+ placeholder
2395
+ }) => {
2396
+ const [showSelectComponent, setShowSelectComponent] = useState(false);
2397
+ const [currentOptionList, setCurrentOptionList] = useState([]);
2398
+ const [inputValue, setInputValue] = useState('');
2399
+ const inputRef = useRef(null);
2400
+ useEffect(() => {
2401
+ const normalizeOptionList = () => __awaiter(void 0, void 0, void 0, function* () {
2402
+ return yield _filterOptionsParam(inputValue, optionList, urlFilterOptions);
2403
+ });
2404
+ normalizeOptionList().then(optionsResponse => setCurrentOptionList([...optionsResponse])).catch(error => console.error('An error happens when trying to normalize options', error));
2405
+ }, [_filterOptionsParam, optionList, urlFilterOptions, inputValue]);
2406
+ const setSelectedOptionOnInputValue = useCallback(() => {
2407
+ if (!inputValue && selectedOption) {
2408
+ setInputValue((selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.value) || '');
2409
+ return;
2410
+ }
2411
+ if (inputValue !== (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.value)) {
2412
+ const isValidValue = currentOptionList.some(currentOption => currentOption.value === inputValue);
2413
+ if (!isValidValue) setInputValue((selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.value) || '');
2414
+ }
2415
+ }, [currentOptionList, inputValue, selectedOption]);
2416
+ return jsxs(SectionContainer, Object.assign({
2417
+ onClick: () => {
2418
+ var _a;
2419
+ return (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
2420
+ },
2421
+ variant: _variant,
2422
+ "data-testid": `${dataTestId}-container`
2423
+ }, {
2424
+ children: [jsx(ReusableDropdownComponent, {
2425
+ label: label,
2426
+ variant: _variant,
2427
+ required: required,
2428
+ inputValue: inputValue,
2429
+ dataTestId: dataTestId,
2430
+ disabled: disabled,
2431
+ errorMessage: errorMessage,
2432
+ hasError: hasError,
2433
+ showSelectComponent: showSelectComponent,
2434
+ inputRef: inputRef,
2435
+ placeholder: placeholder,
2436
+ setShowSelectComponent: setShowSelectComponent,
2437
+ onChangeInputValue: setInputValue,
2438
+ setSelectedOptionOnInputValue: setSelectedOptionOnInputValue
2439
+ }), showSelectComponent && !disabled && jsx("div", {
2440
+ children: jsx(Select, {
2441
+ dataTestId: `${dataTestId}-select`,
2442
+ onChange: selectedValue => {
2443
+ setInputValue(selectedValue.value);
2444
+ setSelectedOption(selectedValue);
2445
+ },
2446
+ active: selectedOption,
2447
+ options: currentOptionList
2448
+ })
2449
+ })]
2450
+ }));
2451
+ };
2452
+
2453
+ const DropdownOptionsWithHeaders = ({
2454
+ label,
2455
+ variant: _variant = 'grey',
2456
+ required,
2457
+ hasError,
2458
+ optionList,
2459
+ disabled,
2460
+ errorMessage,
2461
+ urlFilterOptions,
2462
+ dataTestId,
2463
+ filterOptionsParam: _filterOptionsParam = filterOptionsWithHeaders,
2464
+ selectedOption,
2465
+ setSelectedOption,
2466
+ placeholder
2467
+ }) => {
2468
+ const [showSelectComponent, setShowSelectComponent] = useState(false);
2469
+ const [currentOptionList, setCurrentOptionList] = useState([]);
2470
+ const [inputValue, setInputValue] = useState('');
2471
+ const inputRef = useRef(null);
2472
+ useEffect(() => {
2473
+ const normalizeOptionList = () => __awaiter(void 0, void 0, void 0, function* () {
2474
+ return yield _filterOptionsParam(inputValue, optionList, urlFilterOptions);
2475
+ });
2476
+ normalizeOptionList().then(optionsResponse => setCurrentOptionList([...optionsResponse])).catch(error => console.error('An error happens when trying to normalize options', error));
2477
+ }, [_filterOptionsParam, optionList, urlFilterOptions, inputValue]);
2478
+ const setSelectedOptionOnInputValue = useCallback(() => {
2479
+ if (!inputValue && selectedOption) {
2480
+ setInputValue((selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.value) || '');
2481
+ return;
2482
+ }
2483
+ if (inputValue !== (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.value)) {
2484
+ let isValidValue = false;
2485
+ currentOptionList.forEach(currentOptionsGroup => {
2486
+ isValidValue = currentOptionsGroup.options.some(currentOption => currentOption.value === inputValue);
2487
+ if (isValidValue) return;
2488
+ });
2489
+ if (!isValidValue) setInputValue((selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.value) || '');
2490
+ }
2491
+ }, [currentOptionList, inputValue, selectedOption]);
2492
+ return jsxs(SectionContainer, Object.assign({
2493
+ onClick: () => {
2494
+ var _a;
2495
+ return (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
2496
+ },
2497
+ variant: _variant,
2498
+ "data-testid": `${dataTestId}-container`
2499
+ }, {
2500
+ children: [jsx(ReusableDropdownComponent, {
2501
+ label: label,
2502
+ variant: _variant,
2503
+ required: required,
2504
+ inputValue: inputValue,
2505
+ dataTestId: dataTestId,
2506
+ disabled: disabled,
2507
+ errorMessage: errorMessage,
2508
+ hasError: hasError,
2509
+ showSelectComponent: showSelectComponent,
2510
+ inputRef: inputRef,
2511
+ placeholder: placeholder,
2512
+ setShowSelectComponent: setShowSelectComponent,
2513
+ onChangeInputValue: setInputValue,
2514
+ setSelectedOptionOnInputValue: setSelectedOptionOnInputValue
2515
+ }), showSelectComponent && !disabled && jsx("div", {
2516
+ children: jsx(SelectWithHeaders, {
2517
+ dataTestId: `${dataTestId}-select`,
2518
+ onChange: selectedValue => {
2519
+ setInputValue(selectedValue.value);
2520
+ setSelectedOption(selectedValue);
2521
+ },
2522
+ active: selectedOption,
2523
+ options: currentOptionList
2524
+ })
2525
+ })]
2526
+ }));
2527
+ };
2528
+
2529
+ export { Dropdown, DropdownOptionsWithHeaders };