@thecb/components 6.0.0-beta.8 → 6.1.0-beta.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/dist/index.cjs.js +1425 -112
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1425 -112
- package/dist/index.esm.js.map +1 -1
- package/package.json +2 -1
- package/src/components/atoms/dropdown/Dropdown.js +178 -150
- package/src/components/atoms/form-select/FormSelect.js +3 -1
- package/src/components/atoms/layouts/Box.js +79 -73
- package/src/components/molecules/highlight-tab-row/HighlightTabRow.js +3 -0
package/dist/index.cjs.js
CHANGED
|
@@ -6309,7 +6309,7 @@ var _excluded$3 = ["padding", "borderSize", "borderColor", "borderRadius", "boxS
|
|
|
6309
6309
|
completely off screen (only for users of screen readers)
|
|
6310
6310
|
*/
|
|
6311
6311
|
|
|
6312
|
-
var Box = function
|
|
6312
|
+
var Box = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
6313
6313
|
var _ref$padding = _ref.padding,
|
|
6314
6314
|
padding = _ref$padding === void 0 ? "16px" : _ref$padding,
|
|
6315
6315
|
_ref$borderSize = _ref.borderSize,
|
|
@@ -6379,9 +6379,10 @@ var Box = function Box(_ref) {
|
|
|
6379
6379
|
onMouseLeave: onMouseLeave,
|
|
6380
6380
|
onFocus: onFocus,
|
|
6381
6381
|
onBlur: onBlur,
|
|
6382
|
-
onTouchEnd: onTouchEnd
|
|
6383
|
-
|
|
6384
|
-
};
|
|
6382
|
+
onTouchEnd: onTouchEnd,
|
|
6383
|
+
ref: ref
|
|
6384
|
+
}, rest), children && safeChildren(children, /*#__PURE__*/React__default.createElement(React.Fragment, null)));
|
|
6385
|
+
});
|
|
6385
6386
|
|
|
6386
6387
|
var CenterWrapper = styled__default.div.withConfig({
|
|
6387
6388
|
displayName: "Centerstyled__CenterWrapper",
|
|
@@ -19398,6 +19399,1254 @@ var DropdownIcon = function DropdownIcon() {
|
|
|
19398
19399
|
})))));
|
|
19399
19400
|
};
|
|
19400
19401
|
|
|
19402
|
+
var check = function (it) {
|
|
19403
|
+
return it && it.Math == Math && it;
|
|
19404
|
+
};
|
|
19405
|
+
|
|
19406
|
+
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
19407
|
+
var global_1 =
|
|
19408
|
+
// eslint-disable-next-line es-x/no-global-this -- safe
|
|
19409
|
+
check(typeof globalThis == 'object' && globalThis) ||
|
|
19410
|
+
check(typeof window == 'object' && window) ||
|
|
19411
|
+
// eslint-disable-next-line no-restricted-globals -- safe
|
|
19412
|
+
check(typeof self == 'object' && self) ||
|
|
19413
|
+
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
|
19414
|
+
// eslint-disable-next-line no-new-func -- fallback
|
|
19415
|
+
(function () { return this; })() || Function('return this')();
|
|
19416
|
+
|
|
19417
|
+
var fails = function (exec) {
|
|
19418
|
+
try {
|
|
19419
|
+
return !!exec();
|
|
19420
|
+
} catch (error) {
|
|
19421
|
+
return true;
|
|
19422
|
+
}
|
|
19423
|
+
};
|
|
19424
|
+
|
|
19425
|
+
// Detect IE8's incomplete defineProperty implementation
|
|
19426
|
+
var descriptors = !fails(function () {
|
|
19427
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
19428
|
+
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
|
19429
|
+
});
|
|
19430
|
+
|
|
19431
|
+
var functionBindNative = !fails(function () {
|
|
19432
|
+
// eslint-disable-next-line es-x/no-function-prototype-bind -- safe
|
|
19433
|
+
var test = (function () { /* empty */ }).bind();
|
|
19434
|
+
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
19435
|
+
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
|
19436
|
+
});
|
|
19437
|
+
|
|
19438
|
+
var call = Function.prototype.call;
|
|
19439
|
+
|
|
19440
|
+
var functionCall = functionBindNative ? call.bind(call) : function () {
|
|
19441
|
+
return call.apply(call, arguments);
|
|
19442
|
+
};
|
|
19443
|
+
|
|
19444
|
+
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
|
19445
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
19446
|
+
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
19447
|
+
|
|
19448
|
+
// Nashorn ~ JDK8 bug
|
|
19449
|
+
var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);
|
|
19450
|
+
|
|
19451
|
+
// `Object.prototype.propertyIsEnumerable` method implementation
|
|
19452
|
+
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
|
19453
|
+
var f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
19454
|
+
var descriptor = getOwnPropertyDescriptor(this, V);
|
|
19455
|
+
return !!descriptor && descriptor.enumerable;
|
|
19456
|
+
} : $propertyIsEnumerable;
|
|
19457
|
+
|
|
19458
|
+
var objectPropertyIsEnumerable = {
|
|
19459
|
+
f: f
|
|
19460
|
+
};
|
|
19461
|
+
|
|
19462
|
+
var createPropertyDescriptor = function (bitmap, value) {
|
|
19463
|
+
return {
|
|
19464
|
+
enumerable: !(bitmap & 1),
|
|
19465
|
+
configurable: !(bitmap & 2),
|
|
19466
|
+
writable: !(bitmap & 4),
|
|
19467
|
+
value: value
|
|
19468
|
+
};
|
|
19469
|
+
};
|
|
19470
|
+
|
|
19471
|
+
var FunctionPrototype = Function.prototype;
|
|
19472
|
+
var bind$1 = FunctionPrototype.bind;
|
|
19473
|
+
var call$1 = FunctionPrototype.call;
|
|
19474
|
+
var uncurryThis = functionBindNative && bind$1.bind(call$1, call$1);
|
|
19475
|
+
|
|
19476
|
+
var functionUncurryThis = functionBindNative ? function (fn) {
|
|
19477
|
+
return fn && uncurryThis(fn);
|
|
19478
|
+
} : function (fn) {
|
|
19479
|
+
return fn && function () {
|
|
19480
|
+
return call$1.apply(fn, arguments);
|
|
19481
|
+
};
|
|
19482
|
+
};
|
|
19483
|
+
|
|
19484
|
+
var toString$2 = functionUncurryThis({}.toString);
|
|
19485
|
+
var stringSlice = functionUncurryThis(''.slice);
|
|
19486
|
+
|
|
19487
|
+
var classofRaw = function (it) {
|
|
19488
|
+
return stringSlice(toString$2(it), 8, -1);
|
|
19489
|
+
};
|
|
19490
|
+
|
|
19491
|
+
var Object$1 = global_1.Object;
|
|
19492
|
+
var split = functionUncurryThis(''.split);
|
|
19493
|
+
|
|
19494
|
+
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
19495
|
+
var indexedObject = fails(function () {
|
|
19496
|
+
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
19497
|
+
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
19498
|
+
return !Object$1('z').propertyIsEnumerable(0);
|
|
19499
|
+
}) ? function (it) {
|
|
19500
|
+
return classofRaw(it) == 'String' ? split(it, '') : Object$1(it);
|
|
19501
|
+
} : Object$1;
|
|
19502
|
+
|
|
19503
|
+
var TypeError$1 = global_1.TypeError;
|
|
19504
|
+
|
|
19505
|
+
// `RequireObjectCoercible` abstract operation
|
|
19506
|
+
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
19507
|
+
var requireObjectCoercible = function (it) {
|
|
19508
|
+
if (it == undefined) throw TypeError$1("Can't call method on " + it);
|
|
19509
|
+
return it;
|
|
19510
|
+
};
|
|
19511
|
+
|
|
19512
|
+
// toObject with fallback for non-array-like ES3 strings
|
|
19513
|
+
|
|
19514
|
+
|
|
19515
|
+
|
|
19516
|
+
var toIndexedObject = function (it) {
|
|
19517
|
+
return indexedObject(requireObjectCoercible(it));
|
|
19518
|
+
};
|
|
19519
|
+
|
|
19520
|
+
// `IsCallable` abstract operation
|
|
19521
|
+
// https://tc39.es/ecma262/#sec-iscallable
|
|
19522
|
+
var isCallable = function (argument) {
|
|
19523
|
+
return typeof argument == 'function';
|
|
19524
|
+
};
|
|
19525
|
+
|
|
19526
|
+
var isObject = function (it) {
|
|
19527
|
+
return typeof it == 'object' ? it !== null : isCallable(it);
|
|
19528
|
+
};
|
|
19529
|
+
|
|
19530
|
+
var aFunction = function (argument) {
|
|
19531
|
+
return isCallable(argument) ? argument : undefined;
|
|
19532
|
+
};
|
|
19533
|
+
|
|
19534
|
+
var getBuiltIn = function (namespace, method) {
|
|
19535
|
+
return arguments.length < 2 ? aFunction(global_1[namespace]) : global_1[namespace] && global_1[namespace][method];
|
|
19536
|
+
};
|
|
19537
|
+
|
|
19538
|
+
var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);
|
|
19539
|
+
|
|
19540
|
+
var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
|
|
19541
|
+
|
|
19542
|
+
var process$1 = global_1.process;
|
|
19543
|
+
var Deno = global_1.Deno;
|
|
19544
|
+
var versions = process$1 && process$1.versions || Deno && Deno.version;
|
|
19545
|
+
var v8 = versions && versions.v8;
|
|
19546
|
+
var match, version;
|
|
19547
|
+
|
|
19548
|
+
if (v8) {
|
|
19549
|
+
match = v8.split('.');
|
|
19550
|
+
// in old Chrome, versions of V8 isn't V8 = Chrome / 10
|
|
19551
|
+
// but their correct versions are not interesting for us
|
|
19552
|
+
version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
|
|
19553
|
+
}
|
|
19554
|
+
|
|
19555
|
+
// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
|
|
19556
|
+
// so check `userAgent` even if `.v8` exists, but 0
|
|
19557
|
+
if (!version && engineUserAgent) {
|
|
19558
|
+
match = engineUserAgent.match(/Edge\/(\d+)/);
|
|
19559
|
+
if (!match || match[1] >= 74) {
|
|
19560
|
+
match = engineUserAgent.match(/Chrome\/(\d+)/);
|
|
19561
|
+
if (match) version = +match[1];
|
|
19562
|
+
}
|
|
19563
|
+
}
|
|
19564
|
+
|
|
19565
|
+
var engineV8Version = version;
|
|
19566
|
+
|
|
19567
|
+
/* eslint-disable es-x/no-symbol -- required for testing */
|
|
19568
|
+
|
|
19569
|
+
|
|
19570
|
+
|
|
19571
|
+
// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
|
|
19572
|
+
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
|
|
19573
|
+
var symbol = Symbol();
|
|
19574
|
+
// Chrome 38 Symbol has incorrect toString conversion
|
|
19575
|
+
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
19576
|
+
return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
|
|
19577
|
+
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
|
19578
|
+
!Symbol.sham && engineV8Version && engineV8Version < 41;
|
|
19579
|
+
});
|
|
19580
|
+
|
|
19581
|
+
/* eslint-disable es-x/no-symbol -- required for testing */
|
|
19582
|
+
|
|
19583
|
+
|
|
19584
|
+
var useSymbolAsUid = nativeSymbol
|
|
19585
|
+
&& !Symbol.sham
|
|
19586
|
+
&& typeof Symbol.iterator == 'symbol';
|
|
19587
|
+
|
|
19588
|
+
var Object$2 = global_1.Object;
|
|
19589
|
+
|
|
19590
|
+
var isSymbol = useSymbolAsUid ? function (it) {
|
|
19591
|
+
return typeof it == 'symbol';
|
|
19592
|
+
} : function (it) {
|
|
19593
|
+
var $Symbol = getBuiltIn('Symbol');
|
|
19594
|
+
return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, Object$2(it));
|
|
19595
|
+
};
|
|
19596
|
+
|
|
19597
|
+
var String$1 = global_1.String;
|
|
19598
|
+
|
|
19599
|
+
var tryToString = function (argument) {
|
|
19600
|
+
try {
|
|
19601
|
+
return String$1(argument);
|
|
19602
|
+
} catch (error) {
|
|
19603
|
+
return 'Object';
|
|
19604
|
+
}
|
|
19605
|
+
};
|
|
19606
|
+
|
|
19607
|
+
var TypeError$2 = global_1.TypeError;
|
|
19608
|
+
|
|
19609
|
+
// `Assert: IsCallable(argument) is true`
|
|
19610
|
+
var aCallable = function (argument) {
|
|
19611
|
+
if (isCallable(argument)) return argument;
|
|
19612
|
+
throw TypeError$2(tryToString(argument) + ' is not a function');
|
|
19613
|
+
};
|
|
19614
|
+
|
|
19615
|
+
// `GetMethod` abstract operation
|
|
19616
|
+
// https://tc39.es/ecma262/#sec-getmethod
|
|
19617
|
+
var getMethod = function (V, P) {
|
|
19618
|
+
var func = V[P];
|
|
19619
|
+
return func == null ? undefined : aCallable(func);
|
|
19620
|
+
};
|
|
19621
|
+
|
|
19622
|
+
var TypeError$3 = global_1.TypeError;
|
|
19623
|
+
|
|
19624
|
+
// `OrdinaryToPrimitive` abstract operation
|
|
19625
|
+
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
19626
|
+
var ordinaryToPrimitive = function (input, pref) {
|
|
19627
|
+
var fn, val;
|
|
19628
|
+
if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
|
|
19629
|
+
if (isCallable(fn = input.valueOf) && !isObject(val = functionCall(fn, input))) return val;
|
|
19630
|
+
if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
|
|
19631
|
+
throw TypeError$3("Can't convert object to primitive value");
|
|
19632
|
+
};
|
|
19633
|
+
|
|
19634
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
|
19635
|
+
var defineProperty = Object.defineProperty;
|
|
19636
|
+
|
|
19637
|
+
var setGlobal = function (key, value) {
|
|
19638
|
+
try {
|
|
19639
|
+
defineProperty(global_1, key, { value: value, configurable: true, writable: true });
|
|
19640
|
+
} catch (error) {
|
|
19641
|
+
global_1[key] = value;
|
|
19642
|
+
} return value;
|
|
19643
|
+
};
|
|
19644
|
+
|
|
19645
|
+
var SHARED = '__core-js_shared__';
|
|
19646
|
+
var store = global_1[SHARED] || setGlobal(SHARED, {});
|
|
19647
|
+
|
|
19648
|
+
var sharedStore = store;
|
|
19649
|
+
|
|
19650
|
+
var shared = createCommonjsModule(function (module) {
|
|
19651
|
+
(module.exports = function (key, value) {
|
|
19652
|
+
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
|
19653
|
+
})('versions', []).push({
|
|
19654
|
+
version: '3.22.5',
|
|
19655
|
+
mode: 'global',
|
|
19656
|
+
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
|
|
19657
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.22.5/LICENSE',
|
|
19658
|
+
source: 'https://github.com/zloirock/core-js'
|
|
19659
|
+
});
|
|
19660
|
+
});
|
|
19661
|
+
|
|
19662
|
+
var Object$3 = global_1.Object;
|
|
19663
|
+
|
|
19664
|
+
// `ToObject` abstract operation
|
|
19665
|
+
// https://tc39.es/ecma262/#sec-toobject
|
|
19666
|
+
var toObject = function (argument) {
|
|
19667
|
+
return Object$3(requireObjectCoercible(argument));
|
|
19668
|
+
};
|
|
19669
|
+
|
|
19670
|
+
var hasOwnProperty = functionUncurryThis({}.hasOwnProperty);
|
|
19671
|
+
|
|
19672
|
+
// `HasOwnProperty` abstract operation
|
|
19673
|
+
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
19674
|
+
// eslint-disable-next-line es-x/no-object-hasown -- safe
|
|
19675
|
+
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
19676
|
+
return hasOwnProperty(toObject(it), key);
|
|
19677
|
+
};
|
|
19678
|
+
|
|
19679
|
+
var id = 0;
|
|
19680
|
+
var postfix = Math.random();
|
|
19681
|
+
var toString$3 = functionUncurryThis(1.0.toString);
|
|
19682
|
+
|
|
19683
|
+
var uid = function (key) {
|
|
19684
|
+
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$3(++id + postfix, 36);
|
|
19685
|
+
};
|
|
19686
|
+
|
|
19687
|
+
var WellKnownSymbolsStore = shared('wks');
|
|
19688
|
+
var Symbol$1 = global_1.Symbol;
|
|
19689
|
+
var symbolFor = Symbol$1 && Symbol$1['for'];
|
|
19690
|
+
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
|
|
19691
|
+
|
|
19692
|
+
var wellKnownSymbol = function (name) {
|
|
19693
|
+
if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
|
|
19694
|
+
var description = 'Symbol.' + name;
|
|
19695
|
+
if (nativeSymbol && hasOwnProperty_1(Symbol$1, name)) {
|
|
19696
|
+
WellKnownSymbolsStore[name] = Symbol$1[name];
|
|
19697
|
+
} else if (useSymbolAsUid && symbolFor) {
|
|
19698
|
+
WellKnownSymbolsStore[name] = symbolFor(description);
|
|
19699
|
+
} else {
|
|
19700
|
+
WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
|
|
19701
|
+
}
|
|
19702
|
+
} return WellKnownSymbolsStore[name];
|
|
19703
|
+
};
|
|
19704
|
+
|
|
19705
|
+
var TypeError$4 = global_1.TypeError;
|
|
19706
|
+
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
|
|
19707
|
+
|
|
19708
|
+
// `ToPrimitive` abstract operation
|
|
19709
|
+
// https://tc39.es/ecma262/#sec-toprimitive
|
|
19710
|
+
var toPrimitive = function (input, pref) {
|
|
19711
|
+
if (!isObject(input) || isSymbol(input)) return input;
|
|
19712
|
+
var exoticToPrim = getMethod(input, TO_PRIMITIVE);
|
|
19713
|
+
var result;
|
|
19714
|
+
if (exoticToPrim) {
|
|
19715
|
+
if (pref === undefined) pref = 'default';
|
|
19716
|
+
result = functionCall(exoticToPrim, input, pref);
|
|
19717
|
+
if (!isObject(result) || isSymbol(result)) return result;
|
|
19718
|
+
throw TypeError$4("Can't convert object to primitive value");
|
|
19719
|
+
}
|
|
19720
|
+
if (pref === undefined) pref = 'number';
|
|
19721
|
+
return ordinaryToPrimitive(input, pref);
|
|
19722
|
+
};
|
|
19723
|
+
|
|
19724
|
+
// `ToPropertyKey` abstract operation
|
|
19725
|
+
// https://tc39.es/ecma262/#sec-topropertykey
|
|
19726
|
+
var toPropertyKey = function (argument) {
|
|
19727
|
+
var key = toPrimitive(argument, 'string');
|
|
19728
|
+
return isSymbol(key) ? key : key + '';
|
|
19729
|
+
};
|
|
19730
|
+
|
|
19731
|
+
var document$1 = global_1.document;
|
|
19732
|
+
// typeof document.createElement is 'object' in old IE
|
|
19733
|
+
var EXISTS = isObject(document$1) && isObject(document$1.createElement);
|
|
19734
|
+
|
|
19735
|
+
var documentCreateElement = function (it) {
|
|
19736
|
+
return EXISTS ? document$1.createElement(it) : {};
|
|
19737
|
+
};
|
|
19738
|
+
|
|
19739
|
+
// Thanks to IE8 for its funny defineProperty
|
|
19740
|
+
var ie8DomDefine = !descriptors && !fails(function () {
|
|
19741
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
19742
|
+
return Object.defineProperty(documentCreateElement('div'), 'a', {
|
|
19743
|
+
get: function () { return 7; }
|
|
19744
|
+
}).a != 7;
|
|
19745
|
+
});
|
|
19746
|
+
|
|
19747
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
19748
|
+
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
19749
|
+
|
|
19750
|
+
// `Object.getOwnPropertyDescriptor` method
|
|
19751
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
19752
|
+
var f$1 = descriptors ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
|
|
19753
|
+
O = toIndexedObject(O);
|
|
19754
|
+
P = toPropertyKey(P);
|
|
19755
|
+
if (ie8DomDefine) try {
|
|
19756
|
+
return $getOwnPropertyDescriptor(O, P);
|
|
19757
|
+
} catch (error) { /* empty */ }
|
|
19758
|
+
if (hasOwnProperty_1(O, P)) return createPropertyDescriptor(!functionCall(objectPropertyIsEnumerable.f, O, P), O[P]);
|
|
19759
|
+
};
|
|
19760
|
+
|
|
19761
|
+
var objectGetOwnPropertyDescriptor = {
|
|
19762
|
+
f: f$1
|
|
19763
|
+
};
|
|
19764
|
+
|
|
19765
|
+
// V8 ~ Chrome 36-
|
|
19766
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
19767
|
+
var v8PrototypeDefineBug = descriptors && fails(function () {
|
|
19768
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
19769
|
+
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
19770
|
+
value: 42,
|
|
19771
|
+
writable: false
|
|
19772
|
+
}).prototype != 42;
|
|
19773
|
+
});
|
|
19774
|
+
|
|
19775
|
+
var String$2 = global_1.String;
|
|
19776
|
+
var TypeError$5 = global_1.TypeError;
|
|
19777
|
+
|
|
19778
|
+
// `Assert: Type(argument) is Object`
|
|
19779
|
+
var anObject = function (argument) {
|
|
19780
|
+
if (isObject(argument)) return argument;
|
|
19781
|
+
throw TypeError$5(String$2(argument) + ' is not an object');
|
|
19782
|
+
};
|
|
19783
|
+
|
|
19784
|
+
var TypeError$6 = global_1.TypeError;
|
|
19785
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
|
19786
|
+
var $defineProperty = Object.defineProperty;
|
|
19787
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
19788
|
+
var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
19789
|
+
var ENUMERABLE = 'enumerable';
|
|
19790
|
+
var CONFIGURABLE = 'configurable';
|
|
19791
|
+
var WRITABLE = 'writable';
|
|
19792
|
+
|
|
19793
|
+
// `Object.defineProperty` method
|
|
19794
|
+
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
19795
|
+
var f$2 = descriptors ? v8PrototypeDefineBug ? function defineProperty(O, P, Attributes) {
|
|
19796
|
+
anObject(O);
|
|
19797
|
+
P = toPropertyKey(P);
|
|
19798
|
+
anObject(Attributes);
|
|
19799
|
+
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
19800
|
+
var current = $getOwnPropertyDescriptor$1(O, P);
|
|
19801
|
+
if (current && current[WRITABLE]) {
|
|
19802
|
+
O[P] = Attributes.value;
|
|
19803
|
+
Attributes = {
|
|
19804
|
+
configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
|
|
19805
|
+
enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
|
|
19806
|
+
writable: false
|
|
19807
|
+
};
|
|
19808
|
+
}
|
|
19809
|
+
} return $defineProperty(O, P, Attributes);
|
|
19810
|
+
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
|
19811
|
+
anObject(O);
|
|
19812
|
+
P = toPropertyKey(P);
|
|
19813
|
+
anObject(Attributes);
|
|
19814
|
+
if (ie8DomDefine) try {
|
|
19815
|
+
return $defineProperty(O, P, Attributes);
|
|
19816
|
+
} catch (error) { /* empty */ }
|
|
19817
|
+
if ('get' in Attributes || 'set' in Attributes) throw TypeError$6('Accessors not supported');
|
|
19818
|
+
if ('value' in Attributes) O[P] = Attributes.value;
|
|
19819
|
+
return O;
|
|
19820
|
+
};
|
|
19821
|
+
|
|
19822
|
+
var objectDefineProperty = {
|
|
19823
|
+
f: f$2
|
|
19824
|
+
};
|
|
19825
|
+
|
|
19826
|
+
var createNonEnumerableProperty = descriptors ? function (object, key, value) {
|
|
19827
|
+
return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
|
|
19828
|
+
} : function (object, key, value) {
|
|
19829
|
+
object[key] = value;
|
|
19830
|
+
return object;
|
|
19831
|
+
};
|
|
19832
|
+
|
|
19833
|
+
var FunctionPrototype$1 = Function.prototype;
|
|
19834
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
19835
|
+
var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
|
|
19836
|
+
|
|
19837
|
+
var EXISTS$1 = hasOwnProperty_1(FunctionPrototype$1, 'name');
|
|
19838
|
+
// additional protection from minified / mangled / dropped function names
|
|
19839
|
+
var PROPER = EXISTS$1 && (function something() { /* empty */ }).name === 'something';
|
|
19840
|
+
var CONFIGURABLE$1 = EXISTS$1 && (!descriptors || (descriptors && getDescriptor(FunctionPrototype$1, 'name').configurable));
|
|
19841
|
+
|
|
19842
|
+
var functionName = {
|
|
19843
|
+
EXISTS: EXISTS$1,
|
|
19844
|
+
PROPER: PROPER,
|
|
19845
|
+
CONFIGURABLE: CONFIGURABLE$1
|
|
19846
|
+
};
|
|
19847
|
+
|
|
19848
|
+
var functionToString = functionUncurryThis(Function.toString);
|
|
19849
|
+
|
|
19850
|
+
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
19851
|
+
if (!isCallable(sharedStore.inspectSource)) {
|
|
19852
|
+
sharedStore.inspectSource = function (it) {
|
|
19853
|
+
return functionToString(it);
|
|
19854
|
+
};
|
|
19855
|
+
}
|
|
19856
|
+
|
|
19857
|
+
var inspectSource = sharedStore.inspectSource;
|
|
19858
|
+
|
|
19859
|
+
var WeakMap$1 = global_1.WeakMap;
|
|
19860
|
+
|
|
19861
|
+
var nativeWeakMap = isCallable(WeakMap$1) && /native code/.test(inspectSource(WeakMap$1));
|
|
19862
|
+
|
|
19863
|
+
var keys$1 = shared('keys');
|
|
19864
|
+
|
|
19865
|
+
var sharedKey = function (key) {
|
|
19866
|
+
return keys$1[key] || (keys$1[key] = uid(key));
|
|
19867
|
+
};
|
|
19868
|
+
|
|
19869
|
+
var hiddenKeys = {};
|
|
19870
|
+
|
|
19871
|
+
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
19872
|
+
var TypeError$7 = global_1.TypeError;
|
|
19873
|
+
var WeakMap$2 = global_1.WeakMap;
|
|
19874
|
+
var set, get, has;
|
|
19875
|
+
|
|
19876
|
+
var enforce = function (it) {
|
|
19877
|
+
return has(it) ? get(it) : set(it, {});
|
|
19878
|
+
};
|
|
19879
|
+
|
|
19880
|
+
var getterFor = function (TYPE) {
|
|
19881
|
+
return function (it) {
|
|
19882
|
+
var state;
|
|
19883
|
+
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
|
19884
|
+
throw TypeError$7('Incompatible receiver, ' + TYPE + ' required');
|
|
19885
|
+
} return state;
|
|
19886
|
+
};
|
|
19887
|
+
};
|
|
19888
|
+
|
|
19889
|
+
if (nativeWeakMap || sharedStore.state) {
|
|
19890
|
+
var store$1 = sharedStore.state || (sharedStore.state = new WeakMap$2());
|
|
19891
|
+
var wmget = functionUncurryThis(store$1.get);
|
|
19892
|
+
var wmhas = functionUncurryThis(store$1.has);
|
|
19893
|
+
var wmset = functionUncurryThis(store$1.set);
|
|
19894
|
+
set = function (it, metadata) {
|
|
19895
|
+
if (wmhas(store$1, it)) throw new TypeError$7(OBJECT_ALREADY_INITIALIZED);
|
|
19896
|
+
metadata.facade = it;
|
|
19897
|
+
wmset(store$1, it, metadata);
|
|
19898
|
+
return metadata;
|
|
19899
|
+
};
|
|
19900
|
+
get = function (it) {
|
|
19901
|
+
return wmget(store$1, it) || {};
|
|
19902
|
+
};
|
|
19903
|
+
has = function (it) {
|
|
19904
|
+
return wmhas(store$1, it);
|
|
19905
|
+
};
|
|
19906
|
+
} else {
|
|
19907
|
+
var STATE = sharedKey('state');
|
|
19908
|
+
hiddenKeys[STATE] = true;
|
|
19909
|
+
set = function (it, metadata) {
|
|
19910
|
+
if (hasOwnProperty_1(it, STATE)) throw new TypeError$7(OBJECT_ALREADY_INITIALIZED);
|
|
19911
|
+
metadata.facade = it;
|
|
19912
|
+
createNonEnumerableProperty(it, STATE, metadata);
|
|
19913
|
+
return metadata;
|
|
19914
|
+
};
|
|
19915
|
+
get = function (it) {
|
|
19916
|
+
return hasOwnProperty_1(it, STATE) ? it[STATE] : {};
|
|
19917
|
+
};
|
|
19918
|
+
has = function (it) {
|
|
19919
|
+
return hasOwnProperty_1(it, STATE);
|
|
19920
|
+
};
|
|
19921
|
+
}
|
|
19922
|
+
|
|
19923
|
+
var internalState = {
|
|
19924
|
+
set: set,
|
|
19925
|
+
get: get,
|
|
19926
|
+
has: has,
|
|
19927
|
+
enforce: enforce,
|
|
19928
|
+
getterFor: getterFor
|
|
19929
|
+
};
|
|
19930
|
+
|
|
19931
|
+
var makeBuiltIn_1 = createCommonjsModule(function (module) {
|
|
19932
|
+
var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
|
|
19933
|
+
|
|
19934
|
+
|
|
19935
|
+
|
|
19936
|
+
var enforceInternalState = internalState.enforce;
|
|
19937
|
+
var getInternalState = internalState.get;
|
|
19938
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
|
19939
|
+
var defineProperty = Object.defineProperty;
|
|
19940
|
+
|
|
19941
|
+
var CONFIGURABLE_LENGTH = descriptors && !fails(function () {
|
|
19942
|
+
return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
|
|
19943
|
+
});
|
|
19944
|
+
|
|
19945
|
+
var TEMPLATE = String(String).split('String');
|
|
19946
|
+
|
|
19947
|
+
var makeBuiltIn = module.exports = function (value, name, options) {
|
|
19948
|
+
if (String(name).slice(0, 7) === 'Symbol(') {
|
|
19949
|
+
name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
|
|
19950
|
+
}
|
|
19951
|
+
if (options && options.getter) name = 'get ' + name;
|
|
19952
|
+
if (options && options.setter) name = 'set ' + name;
|
|
19953
|
+
if (!hasOwnProperty_1(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
|
|
19954
|
+
defineProperty(value, 'name', { value: name, configurable: true });
|
|
19955
|
+
}
|
|
19956
|
+
if (CONFIGURABLE_LENGTH && options && hasOwnProperty_1(options, 'arity') && value.length !== options.arity) {
|
|
19957
|
+
defineProperty(value, 'length', { value: options.arity });
|
|
19958
|
+
}
|
|
19959
|
+
if (options && hasOwnProperty_1(options, 'constructor') && options.constructor) {
|
|
19960
|
+
if (descriptors) try {
|
|
19961
|
+
defineProperty(value, 'prototype', { writable: false });
|
|
19962
|
+
} catch (error) { /* empty */ }
|
|
19963
|
+
} else value.prototype = undefined;
|
|
19964
|
+
var state = enforceInternalState(value);
|
|
19965
|
+
if (!hasOwnProperty_1(state, 'source')) {
|
|
19966
|
+
state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
|
|
19967
|
+
} return value;
|
|
19968
|
+
};
|
|
19969
|
+
|
|
19970
|
+
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
19971
|
+
// eslint-disable-next-line no-extend-native -- required
|
|
19972
|
+
Function.prototype.toString = makeBuiltIn(function toString() {
|
|
19973
|
+
return isCallable(this) && getInternalState(this).source || inspectSource(this);
|
|
19974
|
+
}, 'toString');
|
|
19975
|
+
});
|
|
19976
|
+
|
|
19977
|
+
var defineBuiltIn = function (O, key, value, options) {
|
|
19978
|
+
var unsafe = options ? !!options.unsafe : false;
|
|
19979
|
+
var simple = options ? !!options.enumerable : false;
|
|
19980
|
+
var noTargetGet = options ? !!options.noTargetGet : false;
|
|
19981
|
+
var name = options && options.name !== undefined ? options.name : key;
|
|
19982
|
+
if (isCallable(value)) makeBuiltIn_1(value, name, options);
|
|
19983
|
+
if (O === global_1) {
|
|
19984
|
+
if (simple) O[key] = value;
|
|
19985
|
+
else setGlobal(key, value);
|
|
19986
|
+
return O;
|
|
19987
|
+
} else if (!unsafe) {
|
|
19988
|
+
delete O[key];
|
|
19989
|
+
} else if (!noTargetGet && O[key]) {
|
|
19990
|
+
simple = true;
|
|
19991
|
+
}
|
|
19992
|
+
if (simple) O[key] = value;
|
|
19993
|
+
else createNonEnumerableProperty(O, key, value);
|
|
19994
|
+
return O;
|
|
19995
|
+
};
|
|
19996
|
+
|
|
19997
|
+
var ceil = Math.ceil;
|
|
19998
|
+
var floor = Math.floor;
|
|
19999
|
+
|
|
20000
|
+
// `ToIntegerOrInfinity` abstract operation
|
|
20001
|
+
// https://tc39.es/ecma262/#sec-tointegerorinfinity
|
|
20002
|
+
var toIntegerOrInfinity = function (argument) {
|
|
20003
|
+
var number = +argument;
|
|
20004
|
+
// eslint-disable-next-line no-self-compare -- safe
|
|
20005
|
+
return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);
|
|
20006
|
+
};
|
|
20007
|
+
|
|
20008
|
+
var max = Math.max;
|
|
20009
|
+
var min = Math.min;
|
|
20010
|
+
|
|
20011
|
+
// Helper for a popular repeating case of the spec:
|
|
20012
|
+
// Let integer be ? ToInteger(index).
|
|
20013
|
+
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
20014
|
+
var toAbsoluteIndex = function (index, length) {
|
|
20015
|
+
var integer = toIntegerOrInfinity(index);
|
|
20016
|
+
return integer < 0 ? max(integer + length, 0) : min(integer, length);
|
|
20017
|
+
};
|
|
20018
|
+
|
|
20019
|
+
var min$1 = Math.min;
|
|
20020
|
+
|
|
20021
|
+
// `ToLength` abstract operation
|
|
20022
|
+
// https://tc39.es/ecma262/#sec-tolength
|
|
20023
|
+
var toLength = function (argument) {
|
|
20024
|
+
return argument > 0 ? min$1(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
20025
|
+
};
|
|
20026
|
+
|
|
20027
|
+
// `LengthOfArrayLike` abstract operation
|
|
20028
|
+
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
|
20029
|
+
var lengthOfArrayLike = function (obj) {
|
|
20030
|
+
return toLength(obj.length);
|
|
20031
|
+
};
|
|
20032
|
+
|
|
20033
|
+
// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
20034
|
+
var createMethod = function (IS_INCLUDES) {
|
|
20035
|
+
return function ($this, el, fromIndex) {
|
|
20036
|
+
var O = toIndexedObject($this);
|
|
20037
|
+
var length = lengthOfArrayLike(O);
|
|
20038
|
+
var index = toAbsoluteIndex(fromIndex, length);
|
|
20039
|
+
var value;
|
|
20040
|
+
// Array#includes uses SameValueZero equality algorithm
|
|
20041
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
20042
|
+
if (IS_INCLUDES && el != el) while (length > index) {
|
|
20043
|
+
value = O[index++];
|
|
20044
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
20045
|
+
if (value != value) return true;
|
|
20046
|
+
// Array#indexOf ignores holes, Array#includes - not
|
|
20047
|
+
} else for (;length > index; index++) {
|
|
20048
|
+
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
|
20049
|
+
} return !IS_INCLUDES && -1;
|
|
20050
|
+
};
|
|
20051
|
+
};
|
|
20052
|
+
|
|
20053
|
+
var arrayIncludes = {
|
|
20054
|
+
// `Array.prototype.includes` method
|
|
20055
|
+
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
20056
|
+
includes: createMethod(true),
|
|
20057
|
+
// `Array.prototype.indexOf` method
|
|
20058
|
+
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
20059
|
+
indexOf: createMethod(false)
|
|
20060
|
+
};
|
|
20061
|
+
|
|
20062
|
+
var indexOf = arrayIncludes.indexOf;
|
|
20063
|
+
|
|
20064
|
+
|
|
20065
|
+
var push = functionUncurryThis([].push);
|
|
20066
|
+
|
|
20067
|
+
var objectKeysInternal = function (object, names) {
|
|
20068
|
+
var O = toIndexedObject(object);
|
|
20069
|
+
var i = 0;
|
|
20070
|
+
var result = [];
|
|
20071
|
+
var key;
|
|
20072
|
+
for (key in O) !hasOwnProperty_1(hiddenKeys, key) && hasOwnProperty_1(O, key) && push(result, key);
|
|
20073
|
+
// Don't enum bug & hidden keys
|
|
20074
|
+
while (names.length > i) if (hasOwnProperty_1(O, key = names[i++])) {
|
|
20075
|
+
~indexOf(result, key) || push(result, key);
|
|
20076
|
+
}
|
|
20077
|
+
return result;
|
|
20078
|
+
};
|
|
20079
|
+
|
|
20080
|
+
// IE8- don't enum bug keys
|
|
20081
|
+
var enumBugKeys = [
|
|
20082
|
+
'constructor',
|
|
20083
|
+
'hasOwnProperty',
|
|
20084
|
+
'isPrototypeOf',
|
|
20085
|
+
'propertyIsEnumerable',
|
|
20086
|
+
'toLocaleString',
|
|
20087
|
+
'toString',
|
|
20088
|
+
'valueOf'
|
|
20089
|
+
];
|
|
20090
|
+
|
|
20091
|
+
var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
|
|
20092
|
+
|
|
20093
|
+
// `Object.getOwnPropertyNames` method
|
|
20094
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
20095
|
+
// eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
|
|
20096
|
+
var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
20097
|
+
return objectKeysInternal(O, hiddenKeys$1);
|
|
20098
|
+
};
|
|
20099
|
+
|
|
20100
|
+
var objectGetOwnPropertyNames = {
|
|
20101
|
+
f: f$3
|
|
20102
|
+
};
|
|
20103
|
+
|
|
20104
|
+
// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
|
|
20105
|
+
var f$4 = Object.getOwnPropertySymbols;
|
|
20106
|
+
|
|
20107
|
+
var objectGetOwnPropertySymbols = {
|
|
20108
|
+
f: f$4
|
|
20109
|
+
};
|
|
20110
|
+
|
|
20111
|
+
var concat = functionUncurryThis([].concat);
|
|
20112
|
+
|
|
20113
|
+
// all object keys, includes non-enumerable and symbols
|
|
20114
|
+
var ownKeys$1 = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
20115
|
+
var keys = objectGetOwnPropertyNames.f(anObject(it));
|
|
20116
|
+
var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
|
|
20117
|
+
return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
|
|
20118
|
+
};
|
|
20119
|
+
|
|
20120
|
+
var copyConstructorProperties = function (target, source, exceptions) {
|
|
20121
|
+
var keys = ownKeys$1(source);
|
|
20122
|
+
var defineProperty = objectDefineProperty.f;
|
|
20123
|
+
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
20124
|
+
for (var i = 0; i < keys.length; i++) {
|
|
20125
|
+
var key = keys[i];
|
|
20126
|
+
if (!hasOwnProperty_1(target, key) && !(exceptions && hasOwnProperty_1(exceptions, key))) {
|
|
20127
|
+
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
20128
|
+
}
|
|
20129
|
+
}
|
|
20130
|
+
};
|
|
20131
|
+
|
|
20132
|
+
var replacement = /#|\.prototype\./;
|
|
20133
|
+
|
|
20134
|
+
var isForced = function (feature, detection) {
|
|
20135
|
+
var value = data[normalize(feature)];
|
|
20136
|
+
return value == POLYFILL ? true
|
|
20137
|
+
: value == NATIVE ? false
|
|
20138
|
+
: isCallable(detection) ? fails(detection)
|
|
20139
|
+
: !!detection;
|
|
20140
|
+
};
|
|
20141
|
+
|
|
20142
|
+
var normalize = isForced.normalize = function (string) {
|
|
20143
|
+
return String(string).replace(replacement, '.').toLowerCase();
|
|
20144
|
+
};
|
|
20145
|
+
|
|
20146
|
+
var data = isForced.data = {};
|
|
20147
|
+
var NATIVE = isForced.NATIVE = 'N';
|
|
20148
|
+
var POLYFILL = isForced.POLYFILL = 'P';
|
|
20149
|
+
|
|
20150
|
+
var isForced_1 = isForced;
|
|
20151
|
+
|
|
20152
|
+
var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
|
|
20153
|
+
|
|
20154
|
+
|
|
20155
|
+
|
|
20156
|
+
|
|
20157
|
+
|
|
20158
|
+
|
|
20159
|
+
/*
|
|
20160
|
+
options.target - name of the target object
|
|
20161
|
+
options.global - target is the global object
|
|
20162
|
+
options.stat - export as static methods of target
|
|
20163
|
+
options.proto - export as prototype methods of target
|
|
20164
|
+
options.real - real prototype method for the `pure` version
|
|
20165
|
+
options.forced - export even if the native feature is available
|
|
20166
|
+
options.bind - bind methods to the target, required for the `pure` version
|
|
20167
|
+
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
|
|
20168
|
+
options.unsafe - use the simple assignment of property instead of delete + defineProperty
|
|
20169
|
+
options.sham - add a flag to not completely full polyfills
|
|
20170
|
+
options.enumerable - export as enumerable property
|
|
20171
|
+
options.noTargetGet - prevent calling a getter on target
|
|
20172
|
+
options.name - the .name of the function if it does not match the key
|
|
20173
|
+
*/
|
|
20174
|
+
var _export = function (options, source) {
|
|
20175
|
+
var TARGET = options.target;
|
|
20176
|
+
var GLOBAL = options.global;
|
|
20177
|
+
var STATIC = options.stat;
|
|
20178
|
+
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
20179
|
+
if (GLOBAL) {
|
|
20180
|
+
target = global_1;
|
|
20181
|
+
} else if (STATIC) {
|
|
20182
|
+
target = global_1[TARGET] || setGlobal(TARGET, {});
|
|
20183
|
+
} else {
|
|
20184
|
+
target = (global_1[TARGET] || {}).prototype;
|
|
20185
|
+
}
|
|
20186
|
+
if (target) for (key in source) {
|
|
20187
|
+
sourceProperty = source[key];
|
|
20188
|
+
if (options.noTargetGet) {
|
|
20189
|
+
descriptor = getOwnPropertyDescriptor$1(target, key);
|
|
20190
|
+
targetProperty = descriptor && descriptor.value;
|
|
20191
|
+
} else targetProperty = target[key];
|
|
20192
|
+
FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
|
20193
|
+
// contained in target
|
|
20194
|
+
if (!FORCED && targetProperty !== undefined) {
|
|
20195
|
+
if (typeof sourceProperty == typeof targetProperty) continue;
|
|
20196
|
+
copyConstructorProperties(sourceProperty, targetProperty);
|
|
20197
|
+
}
|
|
20198
|
+
// add a flag to not completely full polyfills
|
|
20199
|
+
if (options.sham || (targetProperty && targetProperty.sham)) {
|
|
20200
|
+
createNonEnumerableProperty(sourceProperty, 'sham', true);
|
|
20201
|
+
}
|
|
20202
|
+
defineBuiltIn(target, key, sourceProperty, options);
|
|
20203
|
+
}
|
|
20204
|
+
};
|
|
20205
|
+
|
|
20206
|
+
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
|
20207
|
+
var test$1 = {};
|
|
20208
|
+
|
|
20209
|
+
test$1[TO_STRING_TAG] = 'z';
|
|
20210
|
+
|
|
20211
|
+
var toStringTagSupport = String(test$1) === '[object z]';
|
|
20212
|
+
|
|
20213
|
+
var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
|
|
20214
|
+
var Object$4 = global_1.Object;
|
|
20215
|
+
|
|
20216
|
+
// ES3 wrong here
|
|
20217
|
+
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
|
20218
|
+
|
|
20219
|
+
// fallback for IE11 Script Access Denied error
|
|
20220
|
+
var tryGet = function (it, key) {
|
|
20221
|
+
try {
|
|
20222
|
+
return it[key];
|
|
20223
|
+
} catch (error) { /* empty */ }
|
|
20224
|
+
};
|
|
20225
|
+
|
|
20226
|
+
// getting tag from ES6+ `Object.prototype.toString`
|
|
20227
|
+
var classof = toStringTagSupport ? classofRaw : function (it) {
|
|
20228
|
+
var O, tag, result;
|
|
20229
|
+
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
20230
|
+
// @@toStringTag case
|
|
20231
|
+
: typeof (tag = tryGet(O = Object$4(it), TO_STRING_TAG$1)) == 'string' ? tag
|
|
20232
|
+
// builtinTag case
|
|
20233
|
+
: CORRECT_ARGUMENTS ? classofRaw(O)
|
|
20234
|
+
// ES3 arguments fallback
|
|
20235
|
+
: (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
|
|
20236
|
+
};
|
|
20237
|
+
|
|
20238
|
+
var String$3 = global_1.String;
|
|
20239
|
+
|
|
20240
|
+
var toString_1 = function (argument) {
|
|
20241
|
+
if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
|
|
20242
|
+
return String$3(argument);
|
|
20243
|
+
};
|
|
20244
|
+
|
|
20245
|
+
var charAt = functionUncurryThis(''.charAt);
|
|
20246
|
+
|
|
20247
|
+
var FORCED = fails(function () {
|
|
20248
|
+
// eslint-disable-next-line es-x/no-array-string-prototype-at -- safe
|
|
20249
|
+
return '𠮷'.at(-2) !== '\uD842';
|
|
20250
|
+
});
|
|
20251
|
+
|
|
20252
|
+
// `String.prototype.at` method
|
|
20253
|
+
// https://github.com/tc39/proposal-relative-indexing-method
|
|
20254
|
+
_export({ target: 'String', proto: true, forced: FORCED }, {
|
|
20255
|
+
at: function at(index) {
|
|
20256
|
+
var S = toString_1(requireObjectCoercible(this));
|
|
20257
|
+
var len = S.length;
|
|
20258
|
+
var relativeIndex = toIntegerOrInfinity(index);
|
|
20259
|
+
var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;
|
|
20260
|
+
return (k < 0 || k >= len) ? undefined : charAt(S, k);
|
|
20261
|
+
}
|
|
20262
|
+
});
|
|
20263
|
+
|
|
20264
|
+
// `Object.keys` method
|
|
20265
|
+
// https://tc39.es/ecma262/#sec-object.keys
|
|
20266
|
+
// eslint-disable-next-line es-x/no-object-keys -- safe
|
|
20267
|
+
var objectKeys = Object.keys || function keys(O) {
|
|
20268
|
+
return objectKeysInternal(O, enumBugKeys);
|
|
20269
|
+
};
|
|
20270
|
+
|
|
20271
|
+
// `Object.defineProperties` method
|
|
20272
|
+
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
20273
|
+
// eslint-disable-next-line es-x/no-object-defineproperties -- safe
|
|
20274
|
+
var f$5 = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
20275
|
+
anObject(O);
|
|
20276
|
+
var props = toIndexedObject(Properties);
|
|
20277
|
+
var keys = objectKeys(Properties);
|
|
20278
|
+
var length = keys.length;
|
|
20279
|
+
var index = 0;
|
|
20280
|
+
var key;
|
|
20281
|
+
while (length > index) objectDefineProperty.f(O, key = keys[index++], props[key]);
|
|
20282
|
+
return O;
|
|
20283
|
+
};
|
|
20284
|
+
|
|
20285
|
+
var objectDefineProperties = {
|
|
20286
|
+
f: f$5
|
|
20287
|
+
};
|
|
20288
|
+
|
|
20289
|
+
var html = getBuiltIn('document', 'documentElement');
|
|
20290
|
+
|
|
20291
|
+
/* global ActiveXObject -- old IE, WSH */
|
|
20292
|
+
|
|
20293
|
+
|
|
20294
|
+
|
|
20295
|
+
|
|
20296
|
+
|
|
20297
|
+
|
|
20298
|
+
|
|
20299
|
+
|
|
20300
|
+
var GT = '>';
|
|
20301
|
+
var LT = '<';
|
|
20302
|
+
var PROTOTYPE = 'prototype';
|
|
20303
|
+
var SCRIPT = 'script';
|
|
20304
|
+
var IE_PROTO = sharedKey('IE_PROTO');
|
|
20305
|
+
|
|
20306
|
+
var EmptyConstructor = function () { /* empty */ };
|
|
20307
|
+
|
|
20308
|
+
var scriptTag = function (content) {
|
|
20309
|
+
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
|
|
20310
|
+
};
|
|
20311
|
+
|
|
20312
|
+
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
|
|
20313
|
+
var NullProtoObjectViaActiveX = function (activeXDocument) {
|
|
20314
|
+
activeXDocument.write(scriptTag(''));
|
|
20315
|
+
activeXDocument.close();
|
|
20316
|
+
var temp = activeXDocument.parentWindow.Object;
|
|
20317
|
+
activeXDocument = null; // avoid memory leak
|
|
20318
|
+
return temp;
|
|
20319
|
+
};
|
|
20320
|
+
|
|
20321
|
+
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
20322
|
+
var NullProtoObjectViaIFrame = function () {
|
|
20323
|
+
// Thrash, waste and sodomy: IE GC bug
|
|
20324
|
+
var iframe = documentCreateElement('iframe');
|
|
20325
|
+
var JS = 'java' + SCRIPT + ':';
|
|
20326
|
+
var iframeDocument;
|
|
20327
|
+
iframe.style.display = 'none';
|
|
20328
|
+
html.appendChild(iframe);
|
|
20329
|
+
// https://github.com/zloirock/core-js/issues/475
|
|
20330
|
+
iframe.src = String(JS);
|
|
20331
|
+
iframeDocument = iframe.contentWindow.document;
|
|
20332
|
+
iframeDocument.open();
|
|
20333
|
+
iframeDocument.write(scriptTag('document.F=Object'));
|
|
20334
|
+
iframeDocument.close();
|
|
20335
|
+
return iframeDocument.F;
|
|
20336
|
+
};
|
|
20337
|
+
|
|
20338
|
+
// Check for document.domain and active x support
|
|
20339
|
+
// No need to use active x approach when document.domain is not set
|
|
20340
|
+
// see https://github.com/es-shims/es5-shim/issues/150
|
|
20341
|
+
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
|
|
20342
|
+
// avoid IE GC bug
|
|
20343
|
+
var activeXDocument;
|
|
20344
|
+
var NullProtoObject = function () {
|
|
20345
|
+
try {
|
|
20346
|
+
activeXDocument = new ActiveXObject('htmlfile');
|
|
20347
|
+
} catch (error) { /* ignore */ }
|
|
20348
|
+
NullProtoObject = typeof document != 'undefined'
|
|
20349
|
+
? document.domain && activeXDocument
|
|
20350
|
+
? NullProtoObjectViaActiveX(activeXDocument) // old IE
|
|
20351
|
+
: NullProtoObjectViaIFrame()
|
|
20352
|
+
: NullProtoObjectViaActiveX(activeXDocument); // WSH
|
|
20353
|
+
var length = enumBugKeys.length;
|
|
20354
|
+
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
|
20355
|
+
return NullProtoObject();
|
|
20356
|
+
};
|
|
20357
|
+
|
|
20358
|
+
hiddenKeys[IE_PROTO] = true;
|
|
20359
|
+
|
|
20360
|
+
// `Object.create` method
|
|
20361
|
+
// https://tc39.es/ecma262/#sec-object.create
|
|
20362
|
+
// eslint-disable-next-line es-x/no-object-create -- safe
|
|
20363
|
+
var objectCreate = Object.create || function create(O, Properties) {
|
|
20364
|
+
var result;
|
|
20365
|
+
if (O !== null) {
|
|
20366
|
+
EmptyConstructor[PROTOTYPE] = anObject(O);
|
|
20367
|
+
result = new EmptyConstructor();
|
|
20368
|
+
EmptyConstructor[PROTOTYPE] = null;
|
|
20369
|
+
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
20370
|
+
result[IE_PROTO] = O;
|
|
20371
|
+
} else result = NullProtoObject();
|
|
20372
|
+
return Properties === undefined ? result : objectDefineProperties.f(result, Properties);
|
|
20373
|
+
};
|
|
20374
|
+
|
|
20375
|
+
var UNSCOPABLES = wellKnownSymbol('unscopables');
|
|
20376
|
+
var ArrayPrototype = Array.prototype;
|
|
20377
|
+
|
|
20378
|
+
// Array.prototype[@@unscopables]
|
|
20379
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
20380
|
+
if (ArrayPrototype[UNSCOPABLES] == undefined) {
|
|
20381
|
+
objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, {
|
|
20382
|
+
configurable: true,
|
|
20383
|
+
value: objectCreate(null)
|
|
20384
|
+
});
|
|
20385
|
+
}
|
|
20386
|
+
|
|
20387
|
+
// add a key to Array.prototype[@@unscopables]
|
|
20388
|
+
var addToUnscopables = function (key) {
|
|
20389
|
+
ArrayPrototype[UNSCOPABLES][key] = true;
|
|
20390
|
+
};
|
|
20391
|
+
|
|
20392
|
+
// `Array.prototype.at` method
|
|
20393
|
+
// https://github.com/tc39/proposal-relative-indexing-method
|
|
20394
|
+
_export({ target: 'Array', proto: true }, {
|
|
20395
|
+
at: function at(index) {
|
|
20396
|
+
var O = toObject(this);
|
|
20397
|
+
var len = lengthOfArrayLike(O);
|
|
20398
|
+
var relativeIndex = toIntegerOrInfinity(index);
|
|
20399
|
+
var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;
|
|
20400
|
+
return (k < 0 || k >= len) ? undefined : O[k];
|
|
20401
|
+
}
|
|
20402
|
+
});
|
|
20403
|
+
|
|
20404
|
+
addToUnscopables('at');
|
|
20405
|
+
|
|
20406
|
+
// eslint-disable-next-line es-x/no-typed-arrays -- safe
|
|
20407
|
+
var arrayBufferNative = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';
|
|
20408
|
+
|
|
20409
|
+
var correctPrototypeGetter = !fails(function () {
|
|
20410
|
+
function F() { /* empty */ }
|
|
20411
|
+
F.prototype.constructor = null;
|
|
20412
|
+
// eslint-disable-next-line es-x/no-object-getprototypeof -- required for testing
|
|
20413
|
+
return Object.getPrototypeOf(new F()) !== F.prototype;
|
|
20414
|
+
});
|
|
20415
|
+
|
|
20416
|
+
var IE_PROTO$1 = sharedKey('IE_PROTO');
|
|
20417
|
+
var Object$5 = global_1.Object;
|
|
20418
|
+
var ObjectPrototype = Object$5.prototype;
|
|
20419
|
+
|
|
20420
|
+
// `Object.getPrototypeOf` method
|
|
20421
|
+
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
20422
|
+
var objectGetPrototypeOf = correctPrototypeGetter ? Object$5.getPrototypeOf : function (O) {
|
|
20423
|
+
var object = toObject(O);
|
|
20424
|
+
if (hasOwnProperty_1(object, IE_PROTO$1)) return object[IE_PROTO$1];
|
|
20425
|
+
var constructor = object.constructor;
|
|
20426
|
+
if (isCallable(constructor) && object instanceof constructor) {
|
|
20427
|
+
return constructor.prototype;
|
|
20428
|
+
} return object instanceof Object$5 ? ObjectPrototype : null;
|
|
20429
|
+
};
|
|
20430
|
+
|
|
20431
|
+
var String$4 = global_1.String;
|
|
20432
|
+
var TypeError$8 = global_1.TypeError;
|
|
20433
|
+
|
|
20434
|
+
var aPossiblePrototype = function (argument) {
|
|
20435
|
+
if (typeof argument == 'object' || isCallable(argument)) return argument;
|
|
20436
|
+
throw TypeError$8("Can't set " + String$4(argument) + ' as a prototype');
|
|
20437
|
+
};
|
|
20438
|
+
|
|
20439
|
+
/* eslint-disable no-proto -- safe */
|
|
20440
|
+
|
|
20441
|
+
|
|
20442
|
+
|
|
20443
|
+
|
|
20444
|
+
// `Object.setPrototypeOf` method
|
|
20445
|
+
// https://tc39.es/ecma262/#sec-object.setprototypeof
|
|
20446
|
+
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
|
20447
|
+
// eslint-disable-next-line es-x/no-object-setprototypeof -- safe
|
|
20448
|
+
var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
|
20449
|
+
var CORRECT_SETTER = false;
|
|
20450
|
+
var test = {};
|
|
20451
|
+
var setter;
|
|
20452
|
+
try {
|
|
20453
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
20454
|
+
setter = functionUncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
|
|
20455
|
+
setter(test, []);
|
|
20456
|
+
CORRECT_SETTER = test instanceof Array;
|
|
20457
|
+
} catch (error) { /* empty */ }
|
|
20458
|
+
return function setPrototypeOf(O, proto) {
|
|
20459
|
+
anObject(O);
|
|
20460
|
+
aPossiblePrototype(proto);
|
|
20461
|
+
if (CORRECT_SETTER) setter(O, proto);
|
|
20462
|
+
else O.__proto__ = proto;
|
|
20463
|
+
return O;
|
|
20464
|
+
};
|
|
20465
|
+
}() : undefined);
|
|
20466
|
+
|
|
20467
|
+
var defineProperty$1 = objectDefineProperty.f;
|
|
20468
|
+
|
|
20469
|
+
|
|
20470
|
+
|
|
20471
|
+
|
|
20472
|
+
|
|
20473
|
+
|
|
20474
|
+
var Int8Array = global_1.Int8Array;
|
|
20475
|
+
var Int8ArrayPrototype = Int8Array && Int8Array.prototype;
|
|
20476
|
+
var Uint8ClampedArray = global_1.Uint8ClampedArray;
|
|
20477
|
+
var Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype;
|
|
20478
|
+
var TypedArray = Int8Array && objectGetPrototypeOf(Int8Array);
|
|
20479
|
+
var TypedArrayPrototype = Int8ArrayPrototype && objectGetPrototypeOf(Int8ArrayPrototype);
|
|
20480
|
+
var ObjectPrototype$1 = Object.prototype;
|
|
20481
|
+
var TypeError$9 = global_1.TypeError;
|
|
20482
|
+
|
|
20483
|
+
var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');
|
|
20484
|
+
var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');
|
|
20485
|
+
var TYPED_ARRAY_CONSTRUCTOR = uid('TYPED_ARRAY_CONSTRUCTOR');
|
|
20486
|
+
// Fixing native typed arrays in Opera Presto crashes the browser, see #595
|
|
20487
|
+
var NATIVE_ARRAY_BUFFER_VIEWS = arrayBufferNative && !!objectSetPrototypeOf && classof(global_1.opera) !== 'Opera';
|
|
20488
|
+
var TYPED_ARRAY_TAG_REQUIRED = false;
|
|
20489
|
+
var NAME, Constructor, Prototype;
|
|
20490
|
+
|
|
20491
|
+
var TypedArrayConstructorsList = {
|
|
20492
|
+
Int8Array: 1,
|
|
20493
|
+
Uint8Array: 1,
|
|
20494
|
+
Uint8ClampedArray: 1,
|
|
20495
|
+
Int16Array: 2,
|
|
20496
|
+
Uint16Array: 2,
|
|
20497
|
+
Int32Array: 4,
|
|
20498
|
+
Uint32Array: 4,
|
|
20499
|
+
Float32Array: 4,
|
|
20500
|
+
Float64Array: 8
|
|
20501
|
+
};
|
|
20502
|
+
|
|
20503
|
+
var BigIntArrayConstructorsList = {
|
|
20504
|
+
BigInt64Array: 8,
|
|
20505
|
+
BigUint64Array: 8
|
|
20506
|
+
};
|
|
20507
|
+
|
|
20508
|
+
var isView = function isView(it) {
|
|
20509
|
+
if (!isObject(it)) return false;
|
|
20510
|
+
var klass = classof(it);
|
|
20511
|
+
return klass === 'DataView'
|
|
20512
|
+
|| hasOwnProperty_1(TypedArrayConstructorsList, klass)
|
|
20513
|
+
|| hasOwnProperty_1(BigIntArrayConstructorsList, klass);
|
|
20514
|
+
};
|
|
20515
|
+
|
|
20516
|
+
var isTypedArray = function (it) {
|
|
20517
|
+
if (!isObject(it)) return false;
|
|
20518
|
+
var klass = classof(it);
|
|
20519
|
+
return hasOwnProperty_1(TypedArrayConstructorsList, klass)
|
|
20520
|
+
|| hasOwnProperty_1(BigIntArrayConstructorsList, klass);
|
|
20521
|
+
};
|
|
20522
|
+
|
|
20523
|
+
var aTypedArray = function (it) {
|
|
20524
|
+
if (isTypedArray(it)) return it;
|
|
20525
|
+
throw TypeError$9('Target is not a typed array');
|
|
20526
|
+
};
|
|
20527
|
+
|
|
20528
|
+
var aTypedArrayConstructor = function (C) {
|
|
20529
|
+
if (isCallable(C) && (!objectSetPrototypeOf || objectIsPrototypeOf(TypedArray, C))) return C;
|
|
20530
|
+
throw TypeError$9(tryToString(C) + ' is not a typed array constructor');
|
|
20531
|
+
};
|
|
20532
|
+
|
|
20533
|
+
var exportTypedArrayMethod = function (KEY, property, forced, options) {
|
|
20534
|
+
if (!descriptors) return;
|
|
20535
|
+
if (forced) for (var ARRAY in TypedArrayConstructorsList) {
|
|
20536
|
+
var TypedArrayConstructor = global_1[ARRAY];
|
|
20537
|
+
if (TypedArrayConstructor && hasOwnProperty_1(TypedArrayConstructor.prototype, KEY)) try {
|
|
20538
|
+
delete TypedArrayConstructor.prototype[KEY];
|
|
20539
|
+
} catch (error) {
|
|
20540
|
+
// old WebKit bug - some methods are non-configurable
|
|
20541
|
+
try {
|
|
20542
|
+
TypedArrayConstructor.prototype[KEY] = property;
|
|
20543
|
+
} catch (error2) { /* empty */ }
|
|
20544
|
+
}
|
|
20545
|
+
}
|
|
20546
|
+
if (!TypedArrayPrototype[KEY] || forced) {
|
|
20547
|
+
defineBuiltIn(TypedArrayPrototype, KEY, forced ? property
|
|
20548
|
+
: NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property, options);
|
|
20549
|
+
}
|
|
20550
|
+
};
|
|
20551
|
+
|
|
20552
|
+
var exportTypedArrayStaticMethod = function (KEY, property, forced) {
|
|
20553
|
+
var ARRAY, TypedArrayConstructor;
|
|
20554
|
+
if (!descriptors) return;
|
|
20555
|
+
if (objectSetPrototypeOf) {
|
|
20556
|
+
if (forced) for (ARRAY in TypedArrayConstructorsList) {
|
|
20557
|
+
TypedArrayConstructor = global_1[ARRAY];
|
|
20558
|
+
if (TypedArrayConstructor && hasOwnProperty_1(TypedArrayConstructor, KEY)) try {
|
|
20559
|
+
delete TypedArrayConstructor[KEY];
|
|
20560
|
+
} catch (error) { /* empty */ }
|
|
20561
|
+
}
|
|
20562
|
+
if (!TypedArray[KEY] || forced) {
|
|
20563
|
+
// V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable
|
|
20564
|
+
try {
|
|
20565
|
+
return defineBuiltIn(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && TypedArray[KEY] || property);
|
|
20566
|
+
} catch (error) { /* empty */ }
|
|
20567
|
+
} else return;
|
|
20568
|
+
}
|
|
20569
|
+
for (ARRAY in TypedArrayConstructorsList) {
|
|
20570
|
+
TypedArrayConstructor = global_1[ARRAY];
|
|
20571
|
+
if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) {
|
|
20572
|
+
defineBuiltIn(TypedArrayConstructor, KEY, property);
|
|
20573
|
+
}
|
|
20574
|
+
}
|
|
20575
|
+
};
|
|
20576
|
+
|
|
20577
|
+
for (NAME in TypedArrayConstructorsList) {
|
|
20578
|
+
Constructor = global_1[NAME];
|
|
20579
|
+
Prototype = Constructor && Constructor.prototype;
|
|
20580
|
+
if (Prototype) createNonEnumerableProperty(Prototype, TYPED_ARRAY_CONSTRUCTOR, Constructor);
|
|
20581
|
+
else NATIVE_ARRAY_BUFFER_VIEWS = false;
|
|
20582
|
+
}
|
|
20583
|
+
|
|
20584
|
+
for (NAME in BigIntArrayConstructorsList) {
|
|
20585
|
+
Constructor = global_1[NAME];
|
|
20586
|
+
Prototype = Constructor && Constructor.prototype;
|
|
20587
|
+
if (Prototype) createNonEnumerableProperty(Prototype, TYPED_ARRAY_CONSTRUCTOR, Constructor);
|
|
20588
|
+
}
|
|
20589
|
+
|
|
20590
|
+
// WebKit bug - typed arrays constructors prototype is Object.prototype
|
|
20591
|
+
if (!NATIVE_ARRAY_BUFFER_VIEWS || !isCallable(TypedArray) || TypedArray === Function.prototype) {
|
|
20592
|
+
// eslint-disable-next-line no-shadow -- safe
|
|
20593
|
+
TypedArray = function TypedArray() {
|
|
20594
|
+
throw TypeError$9('Incorrect invocation');
|
|
20595
|
+
};
|
|
20596
|
+
if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
|
|
20597
|
+
if (global_1[NAME]) objectSetPrototypeOf(global_1[NAME], TypedArray);
|
|
20598
|
+
}
|
|
20599
|
+
}
|
|
20600
|
+
|
|
20601
|
+
if (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype$1) {
|
|
20602
|
+
TypedArrayPrototype = TypedArray.prototype;
|
|
20603
|
+
if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
|
|
20604
|
+
if (global_1[NAME]) objectSetPrototypeOf(global_1[NAME].prototype, TypedArrayPrototype);
|
|
20605
|
+
}
|
|
20606
|
+
}
|
|
20607
|
+
|
|
20608
|
+
// WebKit bug - one more object in Uint8ClampedArray prototype chain
|
|
20609
|
+
if (NATIVE_ARRAY_BUFFER_VIEWS && objectGetPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) {
|
|
20610
|
+
objectSetPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype);
|
|
20611
|
+
}
|
|
20612
|
+
|
|
20613
|
+
if (descriptors && !hasOwnProperty_1(TypedArrayPrototype, TO_STRING_TAG$2)) {
|
|
20614
|
+
TYPED_ARRAY_TAG_REQUIRED = true;
|
|
20615
|
+
defineProperty$1(TypedArrayPrototype, TO_STRING_TAG$2, { get: function () {
|
|
20616
|
+
return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;
|
|
20617
|
+
} });
|
|
20618
|
+
for (NAME in TypedArrayConstructorsList) if (global_1[NAME]) {
|
|
20619
|
+
createNonEnumerableProperty(global_1[NAME], TYPED_ARRAY_TAG, NAME);
|
|
20620
|
+
}
|
|
20621
|
+
}
|
|
20622
|
+
|
|
20623
|
+
var arrayBufferViewCore = {
|
|
20624
|
+
NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS,
|
|
20625
|
+
TYPED_ARRAY_CONSTRUCTOR: TYPED_ARRAY_CONSTRUCTOR,
|
|
20626
|
+
TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQUIRED && TYPED_ARRAY_TAG,
|
|
20627
|
+
aTypedArray: aTypedArray,
|
|
20628
|
+
aTypedArrayConstructor: aTypedArrayConstructor,
|
|
20629
|
+
exportTypedArrayMethod: exportTypedArrayMethod,
|
|
20630
|
+
exportTypedArrayStaticMethod: exportTypedArrayStaticMethod,
|
|
20631
|
+
isView: isView,
|
|
20632
|
+
isTypedArray: isTypedArray,
|
|
20633
|
+
TypedArray: TypedArray,
|
|
20634
|
+
TypedArrayPrototype: TypedArrayPrototype
|
|
20635
|
+
};
|
|
20636
|
+
|
|
20637
|
+
var aTypedArray$1 = arrayBufferViewCore.aTypedArray;
|
|
20638
|
+
var exportTypedArrayMethod$1 = arrayBufferViewCore.exportTypedArrayMethod;
|
|
20639
|
+
|
|
20640
|
+
// `%TypedArray%.prototype.at` method
|
|
20641
|
+
// https://github.com/tc39/proposal-relative-indexing-method
|
|
20642
|
+
exportTypedArrayMethod$1('at', function at(index) {
|
|
20643
|
+
var O = aTypedArray$1(this);
|
|
20644
|
+
var len = lengthOfArrayLike(O);
|
|
20645
|
+
var relativeIndex = toIntegerOrInfinity(index);
|
|
20646
|
+
var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;
|
|
20647
|
+
return (k < 0 || k >= len) ? undefined : O[k];
|
|
20648
|
+
});
|
|
20649
|
+
|
|
19401
20650
|
var selectedColor = "".concat(MATISSE_BLUE);
|
|
19402
20651
|
var hoverColor$3 = "".concat(HOVER_LIGHT_BLUE);
|
|
19403
20652
|
var fallbackValues$e = {
|
|
@@ -19408,24 +20657,24 @@ var fallbackValues$e = {
|
|
|
19408
20657
|
var IconWrapper = styled__default.div.withConfig({
|
|
19409
20658
|
displayName: "Dropdown__IconWrapper",
|
|
19410
20659
|
componentId: "sc-pn6m0h-0"
|
|
19411
|
-
})(["display:flex;flex-direction:column;justify-content:center;transition:transform 0.3s ease;", ""], function (_ref) {
|
|
20660
|
+
})(["position:absolute;display:flex;flex-direction:column;justify-content:center;transition:transform 0.3s ease;", ";top:20px;right:12px;"], function (_ref) {
|
|
19412
20661
|
var open = _ref.open;
|
|
19413
20662
|
return open ? "transform: rotate(-180deg)" : "";
|
|
19414
20663
|
});
|
|
19415
20664
|
var DropdownContentWrapper = styled__default.div.withConfig({
|
|
19416
20665
|
displayName: "Dropdown__DropdownContentWrapper",
|
|
19417
20666
|
componentId: "sc-pn6m0h-1"
|
|
19418
|
-
})(["transform-origin:0 0;border:1px solid ", ";border-radius:2px;background-color:", ";padding:8px 0 8px;position:absolute;width:", ";min-width:100%;max-height:", ";overflow-y:scroll;z-index:1;box-sizing:border-box;&:focus{outline:none;}"], GREY_CHATEAU, WHITE, function (_ref2) {
|
|
20667
|
+
})(["transform-origin:0 0;border:1px solid ", ";border-radius:2px;background-color:", ";padding:8px 0 8px;position:absolute;width:", ";min-width:100%;max-height:", ";overflow-y:scroll;z-index:1;box-sizing:border-box;&:focus{outline:none;}ul{padding-left:0;}"], GREY_CHATEAU, WHITE, function (_ref2) {
|
|
19419
20668
|
var widthFitOptions = _ref2.widthFitOptions;
|
|
19420
20669
|
return widthFitOptions ? "fit-content" : "100%";
|
|
19421
20670
|
}, function (_ref3) {
|
|
19422
20671
|
var maxHeight = _ref3.maxHeight;
|
|
19423
20672
|
return maxHeight || "400px";
|
|
19424
20673
|
});
|
|
19425
|
-
var DropdownItemWrapper = styled__default.
|
|
20674
|
+
var DropdownItemWrapper = styled__default.li.withConfig({
|
|
19426
20675
|
displayName: "Dropdown__DropdownItemWrapper",
|
|
19427
20676
|
componentId: "sc-pn6m0h-2"
|
|
19428
|
-
})(["background-color:", ";text-align:start;border-width:0px;border-color:transparent;box-shadow:none;padding:1rem;box-sizing:border-box;width:100%;cursor:", ";&:hover{background-color:", ";}&:focus{background-color:", ";outline:none;}"], function (_ref4) {
|
|
20677
|
+
})(["background-color:", ";text-align:start;border-width:0px;border-color:transparent;box-shadow:none;padding:1rem;box-sizing:border-box;width:100%;list-style:none;cursor:", ";&:hover{background-color:", ";}&:focus{background-color:", ";outline:none;}"], function (_ref4) {
|
|
19429
20678
|
var selected = _ref4.selected,
|
|
19430
20679
|
themeValues = _ref4.themeValues;
|
|
19431
20680
|
return selected ? themeValues.selectedColor : WHITE;
|
|
@@ -19443,10 +20692,6 @@ var DropdownItemWrapper = styled__default.div.withConfig({
|
|
|
19443
20692
|
themeValues = _ref7.themeValues;
|
|
19444
20693
|
return selected ? themeValues.selectedColor : disabled ? WHITE : themeValues.hoverColor;
|
|
19445
20694
|
});
|
|
19446
|
-
var SearchInput = styled__default.input.withConfig({
|
|
19447
|
-
displayName: "Dropdown__SearchInput",
|
|
19448
|
-
componentId: "sc-pn6m0h-3"
|
|
19449
|
-
})(["border:none;background-color:transparent;font-size:16px;height:24px;min-width:80%;"]);
|
|
19450
20695
|
|
|
19451
20696
|
var Dropdown = function Dropdown(_ref8) {
|
|
19452
20697
|
var placeholder = _ref8.placeholder,
|
|
@@ -19458,7 +20703,7 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
19458
20703
|
_ref8$disabledValues = _ref8.disabledValues,
|
|
19459
20704
|
disabledValues = _ref8$disabledValues === void 0 ? [] : _ref8$disabledValues,
|
|
19460
20705
|
_ref8$onClick = _ref8.onClick,
|
|
19461
|
-
|
|
20706
|
+
_onClick = _ref8$onClick === void 0 ? noop : _ref8$onClick,
|
|
19462
20707
|
themeValues = _ref8.themeValues,
|
|
19463
20708
|
maxHeight = _ref8.maxHeight,
|
|
19464
20709
|
_ref8$widthFitOptions = _ref8.widthFitOptions,
|
|
@@ -19470,7 +20715,9 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
19470
20715
|
autoEraseTypeAhead = _ref8$autoEraseTypeAh === void 0 ? true : _ref8$autoEraseTypeAh,
|
|
19471
20716
|
ariaLabelledby = _ref8.ariaLabelledby,
|
|
19472
20717
|
_ref8$autocompleteVal = _ref8.autocompleteValue,
|
|
19473
|
-
autocompleteValue = _ref8$autocompleteVal === void 0 ? "" : _ref8$autocompleteVal
|
|
20718
|
+
autocompleteValue = _ref8$autocompleteVal === void 0 ? "" : _ref8$autocompleteVal,
|
|
20719
|
+
_ref8$smoothScroll = _ref8.smoothScroll,
|
|
20720
|
+
smoothScroll = _ref8$smoothScroll === void 0 ? true : _ref8$smoothScroll;
|
|
19474
20721
|
|
|
19475
20722
|
var _useState = React.useState(""),
|
|
19476
20723
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -19497,6 +20744,21 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
19497
20744
|
selectedRef = _useState10[0],
|
|
19498
20745
|
setSelectedRef = _useState10[1];
|
|
19499
20746
|
|
|
20747
|
+
var _useState11 = React.useState(undefined),
|
|
20748
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
20749
|
+
focusedRef = _useState12[0],
|
|
20750
|
+
setFocusedRef = _useState12[1];
|
|
20751
|
+
|
|
20752
|
+
var _useState13 = React.useState(false),
|
|
20753
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
20754
|
+
inputChangedByAutofill = _useState14[0],
|
|
20755
|
+
setInputChangedByAutofill = _useState14[1];
|
|
20756
|
+
|
|
20757
|
+
var _useState15 = React.useState(false),
|
|
20758
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
20759
|
+
focusedByClick = _useState16[0],
|
|
20760
|
+
setFocusedByClick = _useState16[1];
|
|
20761
|
+
|
|
19500
20762
|
if (optionsState !== options) {
|
|
19501
20763
|
setOptionsState(options);
|
|
19502
20764
|
setOptionsChanged(true);
|
|
@@ -19507,10 +20769,10 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
19507
20769
|
setOptionsChanged(false);
|
|
19508
20770
|
}
|
|
19509
20771
|
|
|
19510
|
-
var
|
|
19511
|
-
|
|
19512
|
-
timer =
|
|
19513
|
-
setTimer =
|
|
20772
|
+
var _useState17 = React.useState(null),
|
|
20773
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
20774
|
+
timer = _useState18[0],
|
|
20775
|
+
setTimer = _useState18[1];
|
|
19514
20776
|
|
|
19515
20777
|
var optionRefs = React.useRef(_toConsumableArray(Array(options.length)).map(function () {
|
|
19516
20778
|
return /*#__PURE__*/React.createRef();
|
|
@@ -19526,24 +20788,21 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
19526
20788
|
};
|
|
19527
20789
|
|
|
19528
20790
|
var onKeyDown = function onKeyDown(e) {
|
|
19529
|
-
var _optionRefs$current$l, _optionRefs$current;
|
|
19530
|
-
|
|
19531
|
-
console.log("key down event is", e);
|
|
19532
20791
|
var key = e.key,
|
|
19533
20792
|
keyCode = e.keyCode;
|
|
19534
20793
|
var focus = document.activeElement;
|
|
19535
|
-
console.log("dropdown value is", value);
|
|
19536
|
-
console.log("focus is", focus);
|
|
19537
|
-
console.log("option refs are", optionRefs.current);
|
|
19538
20794
|
var optionEl = optionRefs.current.find(function (ref) {
|
|
19539
20795
|
return ref.current === focus;
|
|
19540
20796
|
});
|
|
19541
|
-
console.log("option el is", optionEl);
|
|
19542
20797
|
|
|
19543
20798
|
switch (key) {
|
|
19544
20799
|
case "ArrowDown":
|
|
19545
20800
|
e.preventDefault();
|
|
19546
20801
|
|
|
20802
|
+
if (!isOpen) {
|
|
20803
|
+
_onClick();
|
|
20804
|
+
}
|
|
20805
|
+
|
|
19547
20806
|
if (optionEl) {
|
|
19548
20807
|
if (optionEl.current.nextElementSibling) {
|
|
19549
20808
|
optionEl.current.nextElementSibling.focus();
|
|
@@ -19552,7 +20811,7 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
19552
20811
|
break;
|
|
19553
20812
|
}
|
|
19554
20813
|
} else {
|
|
19555
|
-
|
|
20814
|
+
_onClick();
|
|
19556
20815
|
}
|
|
19557
20816
|
|
|
19558
20817
|
break;
|
|
@@ -19568,7 +20827,7 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
19568
20827
|
break;
|
|
19569
20828
|
}
|
|
19570
20829
|
} else {
|
|
19571
|
-
|
|
20830
|
+
_onClick();
|
|
19572
20831
|
}
|
|
19573
20832
|
|
|
19574
20833
|
break;
|
|
@@ -19592,7 +20851,14 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
19592
20851
|
|
|
19593
20852
|
case "End":
|
|
19594
20853
|
e.preventDefault();
|
|
19595
|
-
optionRefs.current
|
|
20854
|
+
optionRefs.current.at(-1).current.focus();
|
|
20855
|
+
break;
|
|
20856
|
+
|
|
20857
|
+
case "Escape":
|
|
20858
|
+
if (isOpen) {
|
|
20859
|
+
_onClick();
|
|
20860
|
+
}
|
|
20861
|
+
|
|
19596
20862
|
break;
|
|
19597
20863
|
}
|
|
19598
20864
|
|
|
@@ -19602,20 +20868,40 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
19602
20868
|
}
|
|
19603
20869
|
};
|
|
19604
20870
|
|
|
20871
|
+
var handleItemSelection = function handleItemSelection(evt, choice, i) {
|
|
20872
|
+
if (disabledValues.includes(choice.value)) {
|
|
20873
|
+
evt.preventDefault();
|
|
20874
|
+
} else {
|
|
20875
|
+
setSelectedRef(optionRefs.current[i]);
|
|
20876
|
+
onSelect(choice.value);
|
|
20877
|
+
|
|
20878
|
+
if (isOpen) {
|
|
20879
|
+
_onClick();
|
|
20880
|
+
}
|
|
20881
|
+
}
|
|
20882
|
+
};
|
|
20883
|
+
|
|
19605
20884
|
React.useEffect(function () {
|
|
19606
|
-
|
|
19607
|
-
console.log("option ref current in isopen useffect", optionRefs.current[0].current);
|
|
19608
|
-
console.log("selected refs in isopen useffect", selectedRef);
|
|
19609
|
-
console.log("value in isopen useffect", value);
|
|
20885
|
+
var selectedRefExists = selectedRef !== undefined && selectedRef.current !== null;
|
|
19610
20886
|
|
|
19611
|
-
if (isOpen &&
|
|
19612
|
-
// WAI-ARIA requires the selected option to receive focus
|
|
20887
|
+
if (isOpen && selectedRefExists && !focusedByClick) {
|
|
20888
|
+
// For keyboard users, WAI-ARIA requires the selected option to receive focus
|
|
19613
20889
|
selectedRef.current.focus();
|
|
19614
|
-
} else if (isOpen && optionRefs.current[0].current) {
|
|
20890
|
+
} else if (isOpen && optionRefs.current[0].current && !focusedByClick) {
|
|
19615
20891
|
// If no selected option, first option receives focus
|
|
19616
20892
|
optionRefs.current[0].current.focus();
|
|
19617
20893
|
}
|
|
19618
20894
|
|
|
20895
|
+
if (isOpen && focusedByClick && selectedRefExists) {
|
|
20896
|
+
// To support autofill for mouse users, we maintain focus on input just scroll item into view
|
|
20897
|
+
selectedRef.current.scrollIntoView({
|
|
20898
|
+
behavior: smoothScroll ? "smooth" : "auto",
|
|
20899
|
+
block: "nearest",
|
|
20900
|
+
inline: "start"
|
|
20901
|
+
});
|
|
20902
|
+
setFocusedByClick(false);
|
|
20903
|
+
}
|
|
20904
|
+
|
|
19619
20905
|
clearTimeout(timer);
|
|
19620
20906
|
setInputValue("");
|
|
19621
20907
|
}, [isOpen]);
|
|
@@ -19632,10 +20918,20 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
19632
20918
|
}));
|
|
19633
20919
|
}, [inputValue]);
|
|
19634
20920
|
React.useEffect(function () {
|
|
19635
|
-
if (
|
|
19636
|
-
|
|
19637
|
-
|
|
20921
|
+
if (
|
|
20922
|
+
/*
|
|
20923
|
+
Either user has typed a value into input that matches a non-disabled option or
|
|
20924
|
+
user has autofilled or pasted into input a string matching a valid option
|
|
20925
|
+
*/
|
|
20926
|
+
(!isOpen || inputChangedByAutofill) && filteredOptions[0] && !disabledValues.includes(filteredOptions[0].value) && filteredOptions[0].text != placeholder) {
|
|
20927
|
+
setInputChangedByAutofill(false);
|
|
19638
20928
|
onSelect(filteredOptions[0].value);
|
|
20929
|
+
|
|
20930
|
+
if (isOpen) {
|
|
20931
|
+
setTimeout(function () {
|
|
20932
|
+
return _onClick();
|
|
20933
|
+
}, 1000);
|
|
20934
|
+
}
|
|
19639
20935
|
}
|
|
19640
20936
|
|
|
19641
20937
|
if (optionRefs.current[0].current) {
|
|
@@ -19645,55 +20941,61 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
19645
20941
|
}
|
|
19646
20942
|
}, [filteredOptions]);
|
|
19647
20943
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
19648
|
-
onKeyDown: onKeyDown,
|
|
19649
|
-
onClick: onClick,
|
|
19650
20944
|
padding: "0",
|
|
19651
|
-
|
|
19652
|
-
|
|
19653
|
-
"
|
|
19654
|
-
|
|
20945
|
+
background: isOpen ? themeValues.hoverColor : WHITE,
|
|
20946
|
+
extraStyles: "position: relative;",
|
|
20947
|
+
minWidth: "100%",
|
|
20948
|
+
onClick: function onClick() {
|
|
20949
|
+
if (!isOpen) {
|
|
20950
|
+
setFocusedByClick(true);
|
|
20951
|
+
|
|
20952
|
+
_onClick();
|
|
20953
|
+
}
|
|
20954
|
+
},
|
|
20955
|
+
onKeyDown: onKeyDown,
|
|
20956
|
+
width: "100%"
|
|
20957
|
+
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
20958
|
+
as: "input",
|
|
20959
|
+
"aria-multiline": "false",
|
|
20960
|
+
"aria-autocomplete": "list",
|
|
20961
|
+
"aria-controls": "".concat(ariaLabelledby, "_listbox"),
|
|
20962
|
+
"aria-activedescendant": "focused_option",
|
|
19655
20963
|
"aria-owns": "".concat(ariaLabelledby, "_listbox"),
|
|
19656
20964
|
"aria-haspopup": "listbox",
|
|
19657
20965
|
"aria-labelledby": ariaLabelledby,
|
|
19658
|
-
|
|
19659
|
-
|
|
19660
|
-
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
19661
|
-
as: "button",
|
|
20966
|
+
"aria-expanded": isOpen,
|
|
20967
|
+
autocomplete: autocompleteValue,
|
|
19662
20968
|
background: isOpen ? themeValues.hoverColor : WHITE,
|
|
19663
|
-
|
|
19664
|
-
padding: "12px",
|
|
19665
|
-
hoverStyles: "background-color: ".concat(themeValues.hoverColor, ";"),
|
|
20969
|
+
borderRadius: "2px",
|
|
19666
20970
|
borderSize: "1px",
|
|
19667
20971
|
borderColor: isError ? ERROR_COLOR : isOpen ? themeValues.selectedColor : GREY_CHATEAU,
|
|
19668
|
-
|
|
19669
|
-
|
|
19670
|
-
|
|
19671
|
-
|
|
19672
|
-
|
|
19673
|
-
|
|
19674
|
-
bottomItem: 2,
|
|
19675
|
-
extraStyles: "position: relative;"
|
|
19676
|
-
}, /*#__PURE__*/React__default.createElement(SearchInput, {
|
|
19677
|
-
"aria-label": getSelection(),
|
|
19678
|
-
placeholder: getSelection(),
|
|
19679
|
-
value: inputValue,
|
|
20972
|
+
extraStyles: disabled && "color: #6e727e;\n background-color: #f7f7f7;\n pointer-events: none;",
|
|
20973
|
+
hoverStyles: "background-color: ".concat(themeValues.hoverColor, ";"),
|
|
20974
|
+
isOpen: isOpen,
|
|
20975
|
+
minHeight: "48px",
|
|
20976
|
+
minWidth: "100%",
|
|
20977
|
+
name: autocompleteValue,
|
|
19680
20978
|
onChange: function onChange(e) {
|
|
19681
|
-
|
|
20979
|
+
// support autofill and copy/paste
|
|
20980
|
+
if (e.target.value !== inputValue) {
|
|
20981
|
+
setInputValue(e.target.value);
|
|
20982
|
+
setInputChangedByAutofill(true);
|
|
20983
|
+
}
|
|
19682
20984
|
},
|
|
20985
|
+
padding: "12px",
|
|
20986
|
+
placeholder: getSelection(),
|
|
20987
|
+
role: "combobox",
|
|
19683
20988
|
themeValues: themeValues,
|
|
19684
|
-
|
|
20989
|
+
title: hasTitles ? getSelection() : null,
|
|
19685
20990
|
type: "text",
|
|
19686
|
-
|
|
19687
|
-
|
|
19688
|
-
|
|
19689
|
-
|
|
19690
|
-
isOpen: isOpen,
|
|
19691
|
-
tabIndex: -1,
|
|
19692
|
-
name: autocompleteValue,
|
|
19693
|
-
autocomplete: autocompleteValue
|
|
20991
|
+
tabIndex: 0,
|
|
20992
|
+
value: inputValue,
|
|
20993
|
+
width: "100%",
|
|
20994
|
+
dataQa: placeholder
|
|
19694
20995
|
}), /*#__PURE__*/React__default.createElement(IconWrapper, {
|
|
19695
|
-
open: isOpen
|
|
19696
|
-
|
|
20996
|
+
open: isOpen,
|
|
20997
|
+
onClick: _onClick
|
|
20998
|
+
}, /*#__PURE__*/React__default.createElement(DropdownIcon, null)), /*#__PURE__*/React__default.createElement(React.Fragment, null, isOpen ? /*#__PURE__*/React__default.createElement(DropdownContentWrapper, {
|
|
19697
20999
|
maxHeight: maxHeight,
|
|
19698
21000
|
open: isOpen,
|
|
19699
21001
|
ref: dropdownRef,
|
|
@@ -19702,23 +21004,25 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
19702
21004
|
role: "listbox",
|
|
19703
21005
|
id: "".concat(ariaLabelledby, "_listbox")
|
|
19704
21006
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
19705
|
-
childGap: "0"
|
|
21007
|
+
childGap: "0",
|
|
21008
|
+
as: "ul"
|
|
19706
21009
|
}, filteredOptions.map(function (choice, i) {
|
|
19707
21010
|
if (choice.value === value && selectedRef !== optionRefs.current[i]) {
|
|
19708
21011
|
setSelectedRef(optionRefs.current[i]);
|
|
19709
21012
|
}
|
|
19710
21013
|
|
|
19711
21014
|
return /*#__PURE__*/React__default.createElement(DropdownItemWrapper, {
|
|
19712
|
-
id:
|
|
21015
|
+
id: focusedRef === optionRefs.current[i] ? "focused_option" : choice.value,
|
|
19713
21016
|
key: choice.value,
|
|
19714
21017
|
ref: optionRefs.current[i],
|
|
19715
|
-
as: "button",
|
|
19716
21018
|
tabIndex: -1,
|
|
19717
|
-
onClick:
|
|
19718
|
-
return
|
|
19719
|
-
}
|
|
19720
|
-
|
|
19721
|
-
|
|
21019
|
+
onClick: function onClick(e) {
|
|
21020
|
+
return handleItemSelection(e, choice, i);
|
|
21021
|
+
},
|
|
21022
|
+
onKeyDown: function onKeyDown(e) {
|
|
21023
|
+
if (e.keyCode === 13) {
|
|
21024
|
+
handleItemSelection(e, choice, i);
|
|
21025
|
+
}
|
|
19722
21026
|
},
|
|
19723
21027
|
selected: choice.value === value,
|
|
19724
21028
|
"aria-selected": choice.value === value,
|
|
@@ -19726,13 +21030,16 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
19726
21030
|
"data-qa": choice.text,
|
|
19727
21031
|
themeValues: themeValues,
|
|
19728
21032
|
title: hasTitles ? choice.text : null,
|
|
19729
|
-
role: "option"
|
|
21033
|
+
role: "option",
|
|
21034
|
+
onFocus: function onFocus() {
|
|
21035
|
+
return setFocusedRef(optionRefs.current[i]);
|
|
21036
|
+
}
|
|
19730
21037
|
}, /*#__PURE__*/React__default.createElement(Text$1, {
|
|
19731
21038
|
variant: "p",
|
|
19732
21039
|
color: choice.value === value ? WHITE : disabledValues.includes(choice.value) ? STORM_GREY : MINESHAFT_GREY,
|
|
19733
21040
|
extraStyles: "padding-left: 16px; \n cursor: ".concat(disabledValues.includes(choice.value) ? "default" : "pointer", "; \n white-space: nowrap; \n overflow: hidden; \n text-overflow: ellipsis;")
|
|
19734
21041
|
}, choice.text));
|
|
19735
|
-
}))) : /*#__PURE__*/React__default.createElement(React.Fragment, null));
|
|
21042
|
+
}))) : /*#__PURE__*/React__default.createElement(React.Fragment, null)));
|
|
19736
21043
|
};
|
|
19737
21044
|
|
|
19738
21045
|
var Dropdown$1 = themeComponent(Dropdown, "Dropdown", fallbackValues$e);
|
|
@@ -19834,7 +21141,9 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
19834
21141
|
themeValues = _ref.themeValues,
|
|
19835
21142
|
_ref$hasTitles = _ref.hasTitles,
|
|
19836
21143
|
hasTitles = _ref$hasTitles === void 0 ? false : _ref$hasTitles,
|
|
19837
|
-
autocompleteValue = _ref.autocompleteValue
|
|
21144
|
+
autocompleteValue = _ref.autocompleteValue,
|
|
21145
|
+
_ref$smoothScroll = _ref.smoothScroll,
|
|
21146
|
+
smoothScroll = _ref$smoothScroll === void 0 ? true : _ref$smoothScroll;
|
|
19838
21147
|
|
|
19839
21148
|
var _useState = React.useState(false),
|
|
19840
21149
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -19890,7 +21199,8 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
19890
21199
|
return setOpen(!open);
|
|
19891
21200
|
},
|
|
19892
21201
|
disabled: disabled,
|
|
19893
|
-
autocompleteValue: autocompleteValue
|
|
21202
|
+
autocompleteValue: autocompleteValue,
|
|
21203
|
+
smoothScroll: smoothScroll
|
|
19894
21204
|
}), /*#__PURE__*/React__default.createElement(Stack, {
|
|
19895
21205
|
direction: "row",
|
|
19896
21206
|
justify: "space-between"
|
|
@@ -33812,20 +35122,20 @@ function isPlainObject(value) {
|
|
|
33812
35122
|
}
|
|
33813
35123
|
var assign = Object.assign || function assign(target, value) {
|
|
33814
35124
|
for (var key in value) {
|
|
33815
|
-
if (has(value, key)) {
|
|
35125
|
+
if (has$1(value, key)) {
|
|
33816
35126
|
target[key] = value[key];
|
|
33817
35127
|
}
|
|
33818
35128
|
}
|
|
33819
35129
|
|
|
33820
35130
|
return target;
|
|
33821
35131
|
};
|
|
33822
|
-
var ownKeys$
|
|
35132
|
+
var ownKeys$2 = typeof Reflect !== "undefined" && Reflect.ownKeys ? Reflect.ownKeys : typeof Object.getOwnPropertySymbols !== "undefined" ? function (obj) { return Object.getOwnPropertyNames(obj).concat(Object.getOwnPropertySymbols(obj)); } : Object.getOwnPropertyNames;
|
|
33823
35133
|
function shallowCopy(base, invokeGetters) {
|
|
33824
35134
|
if ( invokeGetters === void 0 ) invokeGetters = false;
|
|
33825
35135
|
|
|
33826
35136
|
if (Array.isArray(base)) { return base.slice(); }
|
|
33827
35137
|
var clone = Object.create(Object.getPrototypeOf(base));
|
|
33828
|
-
ownKeys$
|
|
35138
|
+
ownKeys$2(base).forEach(function (key) {
|
|
33829
35139
|
if (key === DRAFT_STATE) {
|
|
33830
35140
|
return; // Never copy over draft state.
|
|
33831
35141
|
}
|
|
@@ -33857,14 +35167,14 @@ function each(value, cb) {
|
|
|
33857
35167
|
if (Array.isArray(value)) {
|
|
33858
35168
|
for (var i = 0; i < value.length; i++) { cb(i, value[i], value); }
|
|
33859
35169
|
} else {
|
|
33860
|
-
ownKeys$
|
|
35170
|
+
ownKeys$2(value).forEach(function (key) { return cb(key, value[key], value); });
|
|
33861
35171
|
}
|
|
33862
35172
|
}
|
|
33863
35173
|
function isEnumerable(base, prop) {
|
|
33864
35174
|
var desc = Object.getOwnPropertyDescriptor(base, prop);
|
|
33865
35175
|
return !!desc && desc.enumerable;
|
|
33866
35176
|
}
|
|
33867
|
-
function has(thing, prop) {
|
|
35177
|
+
function has$1(thing, prop) {
|
|
33868
35178
|
return Object.prototype.hasOwnProperty.call(thing, prop);
|
|
33869
35179
|
}
|
|
33870
35180
|
function is(x, y) {
|
|
@@ -33928,7 +35238,7 @@ function revoke(draft) {
|
|
|
33928
35238
|
|
|
33929
35239
|
// but share them all instead
|
|
33930
35240
|
|
|
33931
|
-
var descriptors = {};
|
|
35241
|
+
var descriptors$1 = {};
|
|
33932
35242
|
function willFinalize(scope, result, isReplaced) {
|
|
33933
35243
|
scope.drafts.forEach(function (draft) {
|
|
33934
35244
|
draft[DRAFT_STATE].finalizing = true;
|
|
@@ -33996,7 +35306,7 @@ function peek(draft, prop) {
|
|
|
33996
35306
|
return draft[prop];
|
|
33997
35307
|
}
|
|
33998
35308
|
|
|
33999
|
-
function get(state, prop) {
|
|
35309
|
+
function get$1(state, prop) {
|
|
34000
35310
|
assertUnrevoked(state);
|
|
34001
35311
|
var value = peek(source(state), prop);
|
|
34002
35312
|
if (state.finalizing) { return value; } // Create a draft if the value is unmodified.
|
|
@@ -34047,17 +35357,17 @@ function clonePotentialDraft(base) {
|
|
|
34047
35357
|
}
|
|
34048
35358
|
|
|
34049
35359
|
function proxyProperty(draft, prop, enumerable) {
|
|
34050
|
-
var desc = descriptors[prop];
|
|
35360
|
+
var desc = descriptors$1[prop];
|
|
34051
35361
|
|
|
34052
35362
|
if (desc) {
|
|
34053
35363
|
desc.enumerable = enumerable;
|
|
34054
35364
|
} else {
|
|
34055
|
-
descriptors[prop] = desc = {
|
|
35365
|
+
descriptors$1[prop] = desc = {
|
|
34056
35366
|
configurable: true,
|
|
34057
35367
|
enumerable: enumerable,
|
|
34058
35368
|
|
|
34059
|
-
get: function get$1() {
|
|
34060
|
-
return get(this[DRAFT_STATE], prop);
|
|
35369
|
+
get: function get$1$1() {
|
|
35370
|
+
return get$1(this[DRAFT_STATE], prop);
|
|
34061
35371
|
},
|
|
34062
35372
|
|
|
34063
35373
|
set: function set$1$1(value) {
|
|
@@ -34103,7 +35413,7 @@ function markChangesRecursively(object) {
|
|
|
34103
35413
|
// Look for added keys.
|
|
34104
35414
|
Object.keys(draft).forEach(function (key) {
|
|
34105
35415
|
// The `undefined` check is a fast path for pre-existing keys.
|
|
34106
|
-
if (base[key] === undefined && !has(base, key)) {
|
|
35416
|
+
if (base[key] === undefined && !has$1(base, key)) {
|
|
34107
35417
|
assigned[key] = true;
|
|
34108
35418
|
markChanged(state);
|
|
34109
35419
|
} else if (!assigned[key]) {
|
|
@@ -34114,7 +35424,7 @@ function markChangesRecursively(object) {
|
|
|
34114
35424
|
|
|
34115
35425
|
Object.keys(base).forEach(function (key) {
|
|
34116
35426
|
// The `undefined` check is a fast path for pre-existing keys.
|
|
34117
|
-
if (draft[key] === undefined && !has(draft, key)) {
|
|
35427
|
+
if (draft[key] === undefined && !has$1(draft, key)) {
|
|
34118
35428
|
assigned[key] = false;
|
|
34119
35429
|
markChanged(state);
|
|
34120
35430
|
}
|
|
@@ -34147,7 +35457,7 @@ function hasObjectChanges(state) {
|
|
|
34147
35457
|
var key = keys[i];
|
|
34148
35458
|
var baseValue = base[key]; // The `undefined` check is a fast path for pre-existing keys.
|
|
34149
35459
|
|
|
34150
|
-
if (baseValue === undefined && !has(base, key)) {
|
|
35460
|
+
if (baseValue === undefined && !has$1(base, key)) {
|
|
34151
35461
|
return true;
|
|
34152
35462
|
} // Once a base key is deleted, future changes go undetected, because its
|
|
34153
35463
|
// descriptor is erased. This branch detects any missed changes.
|
|
@@ -34232,7 +35542,7 @@ function createProxy$1(base, parent) {
|
|
|
34232
35542
|
return proxy;
|
|
34233
35543
|
}
|
|
34234
35544
|
var objectTraps = {
|
|
34235
|
-
get: get$1,
|
|
35545
|
+
get: get$1$1,
|
|
34236
35546
|
|
|
34237
35547
|
has: function has(target, prop) {
|
|
34238
35548
|
return prop in source$1(target);
|
|
@@ -34244,7 +35554,7 @@ var objectTraps = {
|
|
|
34244
35554
|
|
|
34245
35555
|
set: set$1$1,
|
|
34246
35556
|
deleteProperty: deleteProperty,
|
|
34247
|
-
getOwnPropertyDescriptor: getOwnPropertyDescriptor,
|
|
35557
|
+
getOwnPropertyDescriptor: getOwnPropertyDescriptor$2,
|
|
34248
35558
|
|
|
34249
35559
|
defineProperty: function defineProperty() {
|
|
34250
35560
|
throw new Error("Object.defineProperty() cannot be used on an Immer draft"); // prettier-ignore
|
|
@@ -34295,11 +35605,11 @@ function peek$1(draft, prop) {
|
|
|
34295
35605
|
return desc && desc.value;
|
|
34296
35606
|
}
|
|
34297
35607
|
|
|
34298
|
-
function get$1(state, prop) {
|
|
35608
|
+
function get$1$1(state, prop) {
|
|
34299
35609
|
if (prop === DRAFT_STATE) { return state; }
|
|
34300
35610
|
var drafts = state.drafts; // Check for existing draft in unmodified state.
|
|
34301
35611
|
|
|
34302
|
-
if (!state.modified && has(drafts, prop)) {
|
|
35612
|
+
if (!state.modified && has$1(drafts, prop)) {
|
|
34303
35613
|
return drafts[prop];
|
|
34304
35614
|
}
|
|
34305
35615
|
|
|
@@ -34352,7 +35662,7 @@ function deleteProperty(state, prop) {
|
|
|
34352
35662
|
// the same guarantee in ES5 mode.
|
|
34353
35663
|
|
|
34354
35664
|
|
|
34355
|
-
function getOwnPropertyDescriptor(state, prop) {
|
|
35665
|
+
function getOwnPropertyDescriptor$2(state, prop) {
|
|
34356
35666
|
var owner = source$1(state);
|
|
34357
35667
|
var desc = Reflect.getOwnPropertyDescriptor(owner, prop);
|
|
34358
35668
|
|
|
@@ -34771,7 +36081,7 @@ Immer.prototype.finalize = function finalize (draft, path, scope) {
|
|
|
34771
36081
|
var base = state.base;
|
|
34772
36082
|
var copy = state.copy;
|
|
34773
36083
|
each(base, function (prop) {
|
|
34774
|
-
if (!has(copy, prop)) { this$1$1.onDelete(state, prop); }
|
|
36084
|
+
if (!has$1(copy, prop)) { this$1$1.onDelete(state, prop); }
|
|
34775
36085
|
});
|
|
34776
36086
|
}
|
|
34777
36087
|
}
|
|
@@ -34950,7 +36260,7 @@ const createInitialState = formConfig => {
|
|
|
34950
36260
|
};
|
|
34951
36261
|
|
|
34952
36262
|
const SET = "field/SET";
|
|
34953
|
-
const set = fieldName => value => ({
|
|
36263
|
+
const set$2 = fieldName => value => ({
|
|
34954
36264
|
type: SET,
|
|
34955
36265
|
payload: { fieldName, value }
|
|
34956
36266
|
});
|
|
@@ -35030,7 +36340,7 @@ const createMapDispatchToProps = formConfig => {
|
|
|
35030
36340
|
const keys = Object.keys(formConfig);
|
|
35031
36341
|
for (let fieldName of keys) {
|
|
35032
36342
|
dispatchObj.fields[fieldName] = {
|
|
35033
|
-
set: value => dispatch(set(fieldName)(value)),
|
|
36343
|
+
set: value => dispatch(set$2(fieldName)(value)),
|
|
35034
36344
|
addValidator: validator => dispatch(addValidator(fieldName)(validator))
|
|
35035
36345
|
};
|
|
35036
36346
|
}
|
|
@@ -35954,7 +37264,10 @@ var HighlightTabRow = function HighlightTabRow(_ref) {
|
|
|
35954
37264
|
boxShadow: "0px 0px 4px 0px rgb(110, 114, 126)",
|
|
35955
37265
|
role: "region",
|
|
35956
37266
|
"aria-label": "Payment step"
|
|
35957
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
37267
|
+
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
37268
|
+
srOnly: true,
|
|
37269
|
+
padding: "0"
|
|
37270
|
+
}, /*#__PURE__*/React__default.createElement(Text$1, null, "Current step: ".concat(tabs[highlightIndex]))), /*#__PURE__*/React__default.createElement(Center, {
|
|
35958
37271
|
maxWidth: "76.5rem"
|
|
35959
37272
|
}, /*#__PURE__*/React__default.createElement(Reel, {
|
|
35960
37273
|
padding: "0",
|
|
@@ -37966,7 +39279,7 @@ var tabbable_1 = tabbable;
|
|
|
37966
39279
|
|
|
37967
39280
|
var immutable = extend;
|
|
37968
39281
|
|
|
37969
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
39282
|
+
var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
37970
39283
|
|
|
37971
39284
|
function extend() {
|
|
37972
39285
|
var target = {};
|
|
@@ -37975,7 +39288,7 @@ function extend() {
|
|
|
37975
39288
|
var source = arguments[i];
|
|
37976
39289
|
|
|
37977
39290
|
for (var key in source) {
|
|
37978
|
-
if (hasOwnProperty.call(source, key)) {
|
|
39291
|
+
if (hasOwnProperty$1.call(source, key)) {
|
|
37979
39292
|
target[key] = source[key];
|
|
37980
39293
|
}
|
|
37981
39294
|
}
|