Brunobkr commited on
Commit
ad8d41d
·
verified ·
1 Parent(s): 61dbcef

Upload folder using huggingface_hub (part 31)

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. tools/ui/node_modules/es-abstract/2019/thisSymbolValue.js +20 -0
  2. tools/ui/node_modules/es-abstract/2019/thisTimeValue.js +9 -0
  3. tools/ui/node_modules/es-abstract/2020/AbstractEqualityComparison.js +56 -0
  4. tools/ui/node_modules/es-abstract/2020/AbstractRelationalComparison.js +80 -0
  5. tools/ui/node_modules/es-abstract/2020/AddEntriesFromIterable.js +44 -0
  6. tools/ui/node_modules/es-abstract/2020/AdvanceStringIndex.js +30 -0
  7. tools/ui/node_modules/es-abstract/2020/ArrayCreate.js +42 -0
  8. tools/ui/node_modules/es-abstract/2020/ArraySetLength.js +77 -0
  9. tools/ui/node_modules/es-abstract/2020/ArraySpeciesCreate.js +46 -0
  10. tools/ui/node_modules/es-abstract/2020/AsyncFromSyncIteratorContinuation.js +45 -0
  11. tools/ui/node_modules/es-abstract/2020/AsyncIteratorClose.js +64 -0
  12. tools/ui/node_modules/es-abstract/2020/BigInt/add.js +14 -0
  13. tools/ui/node_modules/es-abstract/2020/BigInt/bitwiseAND.js +14 -0
  14. tools/ui/node_modules/es-abstract/2020/BigInt/bitwiseNOT.js +15 -0
  15. tools/ui/node_modules/es-abstract/2020/BigInt/bitwiseOR.js +14 -0
  16. tools/ui/node_modules/es-abstract/2020/BigInt/bitwiseXOR.js +14 -0
  17. tools/ui/node_modules/es-abstract/2020/BigInt/divide.js +20 -0
  18. tools/ui/node_modules/es-abstract/2020/BigInt/equal.js +13 -0
  19. tools/ui/node_modules/es-abstract/2020/BigInt/exponentiate.js +29 -0
  20. tools/ui/node_modules/es-abstract/2020/BigInt/index.js +43 -0
  21. tools/ui/node_modules/es-abstract/2020/BigInt/leftShift.js +14 -0
  22. tools/ui/node_modules/es-abstract/2020/BigInt/lessThan.js +14 -0
  23. tools/ui/node_modules/es-abstract/2020/BigInt/multiply.js +14 -0
  24. tools/ui/node_modules/es-abstract/2020/BigInt/remainder.js +28 -0
  25. tools/ui/node_modules/es-abstract/2020/BigInt/sameValue.js +15 -0
  26. tools/ui/node_modules/es-abstract/2020/BigInt/sameValueZero.js +15 -0
  27. tools/ui/node_modules/es-abstract/2020/BigInt/signedRightShift.js +15 -0
  28. tools/ui/node_modules/es-abstract/2020/BigInt/subtract.js +14 -0
  29. tools/ui/node_modules/es-abstract/2020/BigInt/toString.js +16 -0
  30. tools/ui/node_modules/es-abstract/2020/BigInt/unaryMinus.js +22 -0
  31. tools/ui/node_modules/es-abstract/2020/BigInt/unsignedRightShift.js +13 -0
  32. tools/ui/node_modules/es-abstract/2020/BigIntBitwiseOp.js +63 -0
  33. tools/ui/node_modules/es-abstract/2020/BinaryAnd.js +12 -0
  34. tools/ui/node_modules/es-abstract/2020/BinaryOr.js +12 -0
  35. tools/ui/node_modules/es-abstract/2020/BinaryXor.js +12 -0
  36. tools/ui/node_modules/es-abstract/2020/Call.js +20 -0
  37. tools/ui/node_modules/es-abstract/2020/CanonicalNumericIndexString.js +19 -0
  38. tools/ui/node_modules/es-abstract/2020/Canonicalize.js +51 -0
  39. tools/ui/node_modules/es-abstract/2020/CharacterRange.js +53 -0
  40. tools/ui/node_modules/es-abstract/2020/CodePointAt.js +55 -0
  41. tools/ui/node_modules/es-abstract/2020/CompletePropertyDescriptor.js +43 -0
  42. tools/ui/node_modules/es-abstract/2020/CompletionRecord.js +48 -0
  43. tools/ui/node_modules/es-abstract/2020/CopyDataProperties.js +62 -0
  44. tools/ui/node_modules/es-abstract/2020/CreateAsyncFromSyncIterator.js +137 -0
  45. tools/ui/node_modules/es-abstract/2020/CreateDataProperty.js +25 -0
  46. tools/ui/node_modules/es-abstract/2020/CreateDataPropertyOrThrow.js +24 -0
  47. tools/ui/node_modules/es-abstract/2020/CreateHTML.js +27 -0
  48. tools/ui/node_modules/es-abstract/2020/CreateIterResultObject.js +15 -0
  49. tools/ui/node_modules/es-abstract/2020/CreateListFromArrayLike.js +46 -0
  50. tools/ui/node_modules/es-abstract/2020/CreateMethodProperty.js +38 -0
tools/ui/node_modules/es-abstract/2019/thisSymbolValue.js ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $SyntaxError = require('es-errors/syntax');
4
+ var callBound = require('call-bound');
5
+
6
+ var $SymbolValueOf = callBound('Symbol.prototype.valueOf', true);
7
+
8
+ // https://262.ecma-international.org/9.0/#sec-thissymbolvalue
9
+
10
+ module.exports = function thisSymbolValue(value) {
11
+ if (typeof value === 'symbol') {
12
+ return value;
13
+ }
14
+
15
+ if (!$SymbolValueOf) {
16
+ throw new $SyntaxError('Symbols are not supported; thisSymbolValue requires that `value` be a Symbol or a Symbol object');
17
+ }
18
+
19
+ return $SymbolValueOf(value);
20
+ };
tools/ui/node_modules/es-abstract/2019/thisTimeValue.js ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var timeValue = require('../helpers/timeValue');
4
+
5
+ // https://262.ecma-international.org/6.0/#sec-properties-of-the-date-prototype-object
6
+
7
+ module.exports = function thisTimeValue(value) {
8
+ return timeValue(value);
9
+ };
tools/ui/node_modules/es-abstract/2020/AbstractEqualityComparison.js ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var StrictEqualityComparison = require('./StrictEqualityComparison');
4
+ var StringToBigInt = require('./StringToBigInt');
5
+ var ToNumber = require('./ToNumber');
6
+ var ToPrimitive = require('./ToPrimitive');
7
+
8
+ var isNaN = require('math-intrinsics/isNaN');
9
+ var isObject = require('es-object-atoms/isObject');
10
+ var isSameType = require('../helpers/isSameType');
11
+
12
+ // https://262.ecma-international.org/11.0/#sec-abstract-equality-comparison
13
+
14
+ module.exports = function AbstractEqualityComparison(x, y) {
15
+ if (isSameType(x, y)) {
16
+ return StrictEqualityComparison(x, y);
17
+ }
18
+ if (x == null && y == null) {
19
+ return true;
20
+ }
21
+ if (typeof x === 'number' && typeof y === 'string') {
22
+ return AbstractEqualityComparison(x, ToNumber(y));
23
+ }
24
+ if (typeof x === 'string' && typeof y === 'number') {
25
+ return AbstractEqualityComparison(ToNumber(x), y);
26
+ }
27
+ if (typeof x === 'bigint' && typeof y === 'string') {
28
+ var n = StringToBigInt(y);
29
+ if (isNaN(n)) {
30
+ return false;
31
+ }
32
+ return AbstractEqualityComparison(x, n);
33
+ }
34
+ if (typeof x === 'string' && typeof y === 'bigint') {
35
+ return AbstractEqualityComparison(y, x);
36
+ }
37
+ if (typeof x === 'boolean') {
38
+ return AbstractEqualityComparison(ToNumber(x), y);
39
+ }
40
+ if (typeof y === 'boolean') {
41
+ return AbstractEqualityComparison(x, ToNumber(y));
42
+ }
43
+ if ((typeof x === 'string' || typeof x === 'number' || typeof x === 'bigint' || typeof x === 'symbol') && isObject(y)) {
44
+ return AbstractEqualityComparison(x, ToPrimitive(y));
45
+ }
46
+ if (isObject(x) && (typeof y === 'string' || typeof y === 'number' || typeof y === 'bigint' || typeof y === 'symbol')) {
47
+ return AbstractEqualityComparison(ToPrimitive(x), y);
48
+ }
49
+ if ((typeof x === 'bigint' && typeof y === 'number') || (typeof x === 'number' && typeof y === 'bigint')) {
50
+ if (isNaN(x) || isNaN(y) || x === Infinity || y === Infinity || x === -Infinity || y === -Infinity) {
51
+ return false;
52
+ }
53
+ return x == y; // eslint-disable-line eqeqeq
54
+ }
55
+ return false;
56
+ };
tools/ui/node_modules/es-abstract/2020/AbstractRelationalComparison.js ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var GetIntrinsic = require('get-intrinsic');
4
+
5
+ var $Number = GetIntrinsic('%Number%');
6
+ var $TypeError = require('es-errors/type');
7
+
8
+ var $isNaN = require('math-intrinsics/isNaN');
9
+
10
+ var IsStringPrefix = require('./IsStringPrefix');
11
+ var StringToBigInt = require('./StringToBigInt');
12
+ var ToNumeric = require('./ToNumeric');
13
+ var ToPrimitive = require('./ToPrimitive');
14
+
15
+ var BigIntLessThan = require('./BigInt/lessThan');
16
+ var NumberLessThan = require('./Number/lessThan');
17
+
18
+ var isSameType = require('../helpers/isSameType');
19
+
20
+ // https://262.ecma-international.org/11.0/#sec-abstract-relational-comparison
21
+
22
+ // eslint-disable-next-line max-statements, max-lines-per-function
23
+ module.exports = function AbstractRelationalComparison(x, y, LeftFirst) {
24
+ if (typeof LeftFirst !== 'boolean') {
25
+ throw new $TypeError('Assertion failed: LeftFirst argument must be a Boolean');
26
+ }
27
+ var px;
28
+ var py;
29
+ if (LeftFirst) {
30
+ px = ToPrimitive(x, $Number);
31
+ py = ToPrimitive(y, $Number);
32
+ } else {
33
+ py = ToPrimitive(y, $Number);
34
+ px = ToPrimitive(x, $Number);
35
+ }
36
+ if (typeof px === 'string' && typeof py === 'string') {
37
+ if (IsStringPrefix(py, px)) {
38
+ return false;
39
+ }
40
+ if (IsStringPrefix(px, py)) {
41
+ return true;
42
+ }
43
+ return px < py; // both strings, neither a prefix of the other. shortcut for steps 3 c-f
44
+ }
45
+
46
+ var nx;
47
+ var ny;
48
+ if (typeof px === 'bigint' && typeof py === 'string') {
49
+ ny = StringToBigInt(py);
50
+ if ($isNaN(ny)) {
51
+ return void undefined;
52
+ }
53
+ return BigIntLessThan(px, ny);
54
+ }
55
+ if (typeof px === 'string' && typeof py === 'bigint') {
56
+ nx = StringToBigInt(px);
57
+ if ($isNaN(nx)) {
58
+ return void undefined;
59
+ }
60
+ return BigIntLessThan(nx, py);
61
+ }
62
+
63
+ nx = ToNumeric(px);
64
+ ny = ToNumeric(py);
65
+ if (isSameType(nx, ny)) {
66
+ return typeof nx === 'number' ? NumberLessThan(nx, ny) : BigIntLessThan(nx, ny);
67
+ }
68
+
69
+ if ($isNaN(nx) || $isNaN(ny)) {
70
+ return void undefined;
71
+ }
72
+ if (nx === -Infinity || ny === Infinity) {
73
+ return true;
74
+ }
75
+ if (nx === Infinity || ny === -Infinity) {
76
+ return false;
77
+ }
78
+
79
+ return nx < ny; // by now, these are both nonzero, finite, and not equal
80
+ };
tools/ui/node_modules/es-abstract/2020/AddEntriesFromIterable.js ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+ var isObject = require('es-object-atoms/isObject');
5
+ var inspect = require('object-inspect');
6
+
7
+ var Call = require('./Call');
8
+ var Get = require('./Get');
9
+ var GetIterator = require('./GetIterator');
10
+ var IsCallable = require('./IsCallable');
11
+ var IteratorClose = require('./IteratorClose');
12
+ var IteratorStep = require('./IteratorStep');
13
+ var IteratorValue = require('./IteratorValue');
14
+ var ThrowCompletion = require('./ThrowCompletion');
15
+
16
+ // https://262.ecma-international.org/10.0/#sec-add-entries-from-iterable
17
+
18
+ module.exports = function AddEntriesFromIterable(target, iterable, adder) {
19
+ if (!IsCallable(adder)) {
20
+ throw new $TypeError('Assertion failed: `adder` is not callable');
21
+ }
22
+ if (iterable == null) {
23
+ throw new $TypeError('Assertion failed: `iterable` is present, and not nullish');
24
+ }
25
+ var iteratorRecord = GetIterator(iterable);
26
+ while (true) {
27
+ var next = IteratorStep(iteratorRecord);
28
+ if (!next) {
29
+ return target;
30
+ }
31
+ var nextItem = IteratorValue(next);
32
+ if (!isObject(nextItem)) {
33
+ var error = ThrowCompletion(new $TypeError('iterator next must return an Object, got ' + inspect(nextItem)));
34
+ return IteratorClose(iteratorRecord, error);
35
+ }
36
+ try {
37
+ var k = Get(nextItem, '0');
38
+ var v = Get(nextItem, '1');
39
+ Call(adder, target, [k, v]);
40
+ } catch (e) {
41
+ return IteratorClose(iteratorRecord, ThrowCompletion(e));
42
+ }
43
+ }
44
+ };
tools/ui/node_modules/es-abstract/2020/AdvanceStringIndex.js ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var CodePointAt = require('./CodePointAt');
4
+
5
+ var $TypeError = require('es-errors/type');
6
+ var isInteger = require('math-intrinsics/isInteger');
7
+ var MAX_SAFE_INTEGER = require('math-intrinsics/constants/maxSafeInteger');
8
+
9
+ // https://262.ecma-international.org/11.0/#sec-advancestringindex
10
+
11
+ module.exports = function AdvanceStringIndex(S, index, unicode) {
12
+ if (typeof S !== 'string') {
13
+ throw new $TypeError('Assertion failed: `S` must be a String');
14
+ }
15
+ if (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {
16
+ throw new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');
17
+ }
18
+ if (typeof unicode !== 'boolean') {
19
+ throw new $TypeError('Assertion failed: `unicode` must be a Boolean');
20
+ }
21
+ if (!unicode) {
22
+ return index + 1;
23
+ }
24
+ var length = S.length;
25
+ if ((index + 1) >= length) {
26
+ return index + 1;
27
+ }
28
+ var cp = CodePointAt(S, index);
29
+ return index + cp['[[CodeUnitCount]]'];
30
+ };
tools/ui/node_modules/es-abstract/2020/ArrayCreate.js ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var GetIntrinsic = require('get-intrinsic');
4
+
5
+ var $ArrayPrototype = GetIntrinsic('%Array.prototype%');
6
+ var $RangeError = require('es-errors/range');
7
+ var $SyntaxError = require('es-errors/syntax');
8
+ var $TypeError = require('es-errors/type');
9
+ var isInteger = require('math-intrinsics/isInteger');
10
+ var MAX_ARRAY_LENGTH = require('math-intrinsics/constants/maxArrayLength');
11
+ var $setProto = require('set-proto');
12
+
13
+ // https://262.ecma-international.org/6.0/#sec-arraycreate
14
+
15
+ module.exports = function ArrayCreate(length) {
16
+ if (!isInteger(length) || length < 0) {
17
+ throw new $TypeError('Assertion failed: `length` must be an integer Number >= 0');
18
+ }
19
+ if (length > MAX_ARRAY_LENGTH) {
20
+ throw new $RangeError('length is greater than (2**32 - 1)');
21
+ }
22
+ var proto = arguments.length > 1 ? arguments[1] : $ArrayPrototype;
23
+ var A = []; // steps 5 - 7, and 9
24
+ if (proto !== $ArrayPrototype) { // step 8
25
+ if (!$setProto) {
26
+ throw new $SyntaxError('ArrayCreate: a `proto` argument that is not `Array.prototype` is not supported in an environment that does not support setting the [[Prototype]]');
27
+ }
28
+ $setProto(A, proto);
29
+ }
30
+ if (length !== 0) { // bypasses the need for step 2
31
+ A.length = length;
32
+ }
33
+ /* step 10, the above as a shortcut for the below
34
+ OrdinaryDefineOwnProperty(A, 'length', {
35
+ '[[Configurable]]': false,
36
+ '[[Enumerable]]': false,
37
+ '[[Value]]': length,
38
+ '[[Writable]]': true
39
+ });
40
+ */
41
+ return A;
42
+ };
tools/ui/node_modules/es-abstract/2020/ArraySetLength.js ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $RangeError = require('es-errors/range');
4
+ var $TypeError = require('es-errors/type');
5
+
6
+ var assign = require('object.assign');
7
+
8
+ var isPropertyDescriptor = require('../helpers/records/property-descriptor');
9
+
10
+ var IsArray = require('./IsArray');
11
+ var IsDataDescriptor = require('./IsDataDescriptor');
12
+ var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty');
13
+ var OrdinaryGetOwnProperty = require('./OrdinaryGetOwnProperty');
14
+ var ToNumber = require('./ToNumber');
15
+ var ToString = require('./ToString');
16
+ var ToUint32 = require('./ToUint32');
17
+
18
+ // https://262.ecma-international.org/6.0/#sec-arraysetlength
19
+
20
+ // eslint-disable-next-line max-statements, max-lines-per-function
21
+ module.exports = function ArraySetLength(A, Desc) {
22
+ if (!IsArray(A)) {
23
+ throw new $TypeError('Assertion failed: A must be an Array');
24
+ }
25
+ if (!isPropertyDescriptor(Desc)) {
26
+ throw new $TypeError('Assertion failed: Desc must be a Property Descriptor');
27
+ }
28
+ if (!('[[Value]]' in Desc)) {
29
+ return OrdinaryDefineOwnProperty(A, 'length', Desc);
30
+ }
31
+ var newLenDesc = assign({}, Desc);
32
+ var newLen = ToUint32(Desc['[[Value]]']);
33
+ var numberLen = ToNumber(Desc['[[Value]]']);
34
+ if (newLen !== numberLen) {
35
+ throw new $RangeError('Invalid array length');
36
+ }
37
+ newLenDesc['[[Value]]'] = newLen;
38
+ var oldLenDesc = OrdinaryGetOwnProperty(A, 'length');
39
+ if (!IsDataDescriptor(oldLenDesc)) {
40
+ throw new $TypeError('Assertion failed: an array had a non-data descriptor on `length`');
41
+ }
42
+ var oldLen = oldLenDesc['[[Value]]'];
43
+ if (newLen >= oldLen) {
44
+ return OrdinaryDefineOwnProperty(A, 'length', newLenDesc);
45
+ }
46
+ if (!oldLenDesc['[[Writable]]']) {
47
+ return false;
48
+ }
49
+ var newWritable;
50
+ if (!('[[Writable]]' in newLenDesc) || newLenDesc['[[Writable]]']) {
51
+ newWritable = true;
52
+ } else {
53
+ newWritable = false;
54
+ newLenDesc['[[Writable]]'] = true;
55
+ }
56
+ var succeeded = OrdinaryDefineOwnProperty(A, 'length', newLenDesc);
57
+ if (!succeeded) {
58
+ return false;
59
+ }
60
+ while (newLen < oldLen) {
61
+ oldLen -= 1;
62
+ // eslint-disable-next-line no-param-reassign
63
+ var deleteSucceeded = delete A[ToString(oldLen)];
64
+ if (!deleteSucceeded) {
65
+ newLenDesc['[[Value]]'] = oldLen + 1;
66
+ if (!newWritable) {
67
+ newLenDesc['[[Writable]]'] = false;
68
+ OrdinaryDefineOwnProperty(A, 'length', newLenDesc);
69
+ return false;
70
+ }
71
+ }
72
+ }
73
+ if (!newWritable) {
74
+ return OrdinaryDefineOwnProperty(A, 'length', { '[[Writable]]': false });
75
+ }
76
+ return true;
77
+ };
tools/ui/node_modules/es-abstract/2020/ArraySpeciesCreate.js ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var GetIntrinsic = require('get-intrinsic');
4
+
5
+ var $Array = GetIntrinsic('%Array%');
6
+ var $species = GetIntrinsic('%Symbol.species%', true);
7
+ var $TypeError = require('es-errors/type');
8
+ var isInteger = require('math-intrinsics/isInteger');
9
+ var isObject = require('es-object-atoms/isObject');
10
+
11
+ var Get = require('./Get');
12
+ var IsArray = require('./IsArray');
13
+ var IsConstructor = require('./IsConstructor');
14
+
15
+ // https://262.ecma-international.org/6.0/#sec-arrayspeciescreate
16
+
17
+ module.exports = function ArraySpeciesCreate(originalArray, length) {
18
+ if (!isInteger(length) || length < 0) {
19
+ throw new $TypeError('Assertion failed: length must be an integer >= 0');
20
+ }
21
+ var len = length === 0 ? 0 : length;
22
+ var C;
23
+ var isArray = IsArray(originalArray);
24
+ if (isArray) {
25
+ C = Get(originalArray, 'constructor');
26
+ // TODO: figure out how to make a cross-realm normal Array, a same-realm Array
27
+ // if (IsConstructor(C)) {
28
+ // if C is another realm's Array, C = undefined
29
+ // Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(Array))) === null ?
30
+ // }
31
+ if ($species && isObject(C)) {
32
+ C = Get(C, $species);
33
+ if (C === null) {
34
+ C = void 0;
35
+ }
36
+ }
37
+ }
38
+ if (typeof C === 'undefined') {
39
+ return $Array(len);
40
+ }
41
+ if (!IsConstructor(C)) {
42
+ throw new $TypeError('C must be a constructor');
43
+ }
44
+ return new C(len); // Construct(C, len);
45
+ };
46
+
tools/ui/node_modules/es-abstract/2020/AsyncFromSyncIteratorContinuation.js ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var GetIntrinsic = require('get-intrinsic');
4
+
5
+ var $SyntaxError = require('es-errors/syntax');
6
+ var $TypeError = require('es-errors/type');
7
+ var isObject = require('es-object-atoms/isObject');
8
+ var $Promise = GetIntrinsic('%Promise%', true);
9
+
10
+ var callBound = require('call-bound');
11
+
12
+ var CreateIterResultObject = require('./CreateIterResultObject');
13
+ var IteratorComplete = require('./IteratorComplete');
14
+ var IteratorValue = require('./IteratorValue');
15
+ var PromiseResolve = require('./PromiseResolve');
16
+
17
+ var $then = callBound('Promise.prototype.then', true);
18
+
19
+ // https://262.ecma-international.org/10.0/#sec-asyncfromsynciteratorcontinuation
20
+
21
+ module.exports = function AsyncFromSyncIteratorContinuation(result) {
22
+ if (!isObject(result)) {
23
+ throw new $TypeError('Assertion failed: Type(O) is not Object');
24
+ }
25
+
26
+ if (arguments.length > 1) {
27
+ throw new $SyntaxError('although AsyncFromSyncIteratorContinuation should take a second argument, it is not used in this implementation');
28
+ }
29
+
30
+ if (!$Promise) {
31
+ throw new $SyntaxError('This environment does not support Promises.');
32
+ }
33
+
34
+ return new $Promise(function (resolve) {
35
+ var done = IteratorComplete(result); // step 2
36
+ var value = IteratorValue(result); // step 4
37
+ var valueWrapper = PromiseResolve($Promise, value); // step 6
38
+
39
+ // eslint-disable-next-line no-shadow
40
+ var onFulfilled = function (value) { // steps 8-9
41
+ return CreateIterResultObject(value, done); // step 8.a
42
+ };
43
+ resolve($then(valueWrapper, onFulfilled)); // step 11
44
+ }); // step 12
45
+ };
tools/ui/node_modules/es-abstract/2020/AsyncIteratorClose.js ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var GetIntrinsic = require('get-intrinsic');
4
+
5
+ var $SyntaxError = require('es-errors/syntax');
6
+ var $TypeError = require('es-errors/type');
7
+ var isObject = require('es-object-atoms/isObject');
8
+ var $Promise = GetIntrinsic('%Promise%', true);
9
+
10
+ var Call = require('./Call');
11
+ var CompletionRecord = require('./CompletionRecord');
12
+ var GetMethod = require('./GetMethod');
13
+
14
+ var isIteratorRecord = require('../helpers/records/iterator-record-2023');
15
+
16
+ var callBound = require('call-bound');
17
+
18
+ var $then = callBound('Promise.prototype.then', true);
19
+
20
+ // https://262.ecma-international.org/9.0/#sec-asynciteratorclose
21
+
22
+ module.exports = function AsyncIteratorClose(iteratorRecord, completion) {
23
+ if (!isIteratorRecord(iteratorRecord)) {
24
+ throw new $TypeError('Assertion failed: `iteratorRecord` must be an Iterator Record'); // step 1
25
+ }
26
+
27
+ if (!(completion instanceof CompletionRecord)) {
28
+ throw new $TypeError('Assertion failed: completion is not a Completion Record instance'); // step 2
29
+ }
30
+
31
+ if (!$then) {
32
+ throw new $SyntaxError('This environment does not support Promises.');
33
+ }
34
+
35
+ var iterator = iteratorRecord['[[Iterator]]']; // step 3
36
+
37
+ return new $Promise(function (resolve) {
38
+ var ret = GetMethod(iterator, 'return'); // step 4
39
+
40
+ if (typeof ret === 'undefined') {
41
+ resolve(completion); // step 5
42
+ } else {
43
+ resolve($then(
44
+ new $Promise(function (resolve2) {
45
+ // process.exit(42);
46
+ resolve2(Call(ret, iterator, [])); // step 6
47
+ }),
48
+ function (innerResult) {
49
+ if (!isObject(innerResult)) {
50
+ throw new $TypeError('`innerResult` must be an Object'); // step 10
51
+ }
52
+ return completion;
53
+ },
54
+ function (e) {
55
+ if (completion.type() === 'throw') {
56
+ completion['?'](); // step 8
57
+ } else {
58
+ throw e; // step 9
59
+ }
60
+ }
61
+ ));
62
+ }
63
+ });
64
+ };
tools/ui/node_modules/es-abstract/2020/BigInt/add.js ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+
5
+ // https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-add
6
+
7
+ module.exports = function BigIntAdd(x, y) {
8
+ if (typeof x !== 'bigint' || typeof y !== 'bigint') {
9
+ throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
10
+ }
11
+
12
+ // shortcut for the actual spec mechanics
13
+ return x + y;
14
+ };
tools/ui/node_modules/es-abstract/2020/BigInt/bitwiseAND.js ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+
5
+ var BigIntBitwiseOp = require('../BigIntBitwiseOp');
6
+
7
+ // https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseAND
8
+
9
+ module.exports = function BigIntBitwiseAND(x, y) {
10
+ if (typeof x !== 'bigint' || typeof y !== 'bigint') {
11
+ throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
12
+ }
13
+ return BigIntBitwiseOp('&', x, y);
14
+ };
tools/ui/node_modules/es-abstract/2020/BigInt/bitwiseNOT.js ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var GetIntrinsic = require('get-intrinsic');
4
+
5
+ var $BigInt = GetIntrinsic('%BigInt%', true);
6
+ var $TypeError = require('es-errors/type');
7
+
8
+ // https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseNOT
9
+
10
+ module.exports = function BigIntBitwiseNOT(x) {
11
+ if (typeof x !== 'bigint') {
12
+ throw new $TypeError('Assertion failed: `x` argument must be a BigInt');
13
+ }
14
+ return -x - $BigInt(1);
15
+ };
tools/ui/node_modules/es-abstract/2020/BigInt/bitwiseOR.js ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+
5
+ var BigIntBitwiseOp = require('../BigIntBitwiseOp');
6
+
7
+ // https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseOR
8
+
9
+ module.exports = function BigIntBitwiseOR(x, y) {
10
+ if (typeof x !== 'bigint' || typeof y !== 'bigint') {
11
+ throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
12
+ }
13
+ return BigIntBitwiseOp('|', x, y);
14
+ };
tools/ui/node_modules/es-abstract/2020/BigInt/bitwiseXOR.js ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+
5
+ var BigIntBitwiseOp = require('../BigIntBitwiseOp');
6
+
7
+ // https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseXOR
8
+
9
+ module.exports = function BigIntBitwiseXOR(x, y) {
10
+ if (typeof x !== 'bigint' || typeof y !== 'bigint') {
11
+ throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
12
+ }
13
+ return BigIntBitwiseOp('^', x, y);
14
+ };
tools/ui/node_modules/es-abstract/2020/BigInt/divide.js ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var GetIntrinsic = require('get-intrinsic');
4
+
5
+ var $BigInt = GetIntrinsic('%BigInt%', true);
6
+ var $RangeError = require('es-errors/range');
7
+ var $TypeError = require('es-errors/type');
8
+
9
+ // https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-divide
10
+
11
+ module.exports = function BigIntDivide(x, y) {
12
+ if (typeof x !== 'bigint' || typeof y !== 'bigint') {
13
+ throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
14
+ }
15
+ if (y === $BigInt(0)) {
16
+ throw new $RangeError('Division by zero');
17
+ }
18
+ // shortcut for the actual spec mechanics
19
+ return x / y;
20
+ };
tools/ui/node_modules/es-abstract/2020/BigInt/equal.js ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+
5
+ // https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-equal
6
+
7
+ module.exports = function BigIntEqual(x, y) {
8
+ if (typeof x !== 'bigint' || typeof y !== 'bigint') {
9
+ throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
10
+ }
11
+ // shortcut for the actual spec mechanics
12
+ return x === y;
13
+ };
tools/ui/node_modules/es-abstract/2020/BigInt/exponentiate.js ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var GetIntrinsic = require('get-intrinsic');
4
+
5
+ var $BigInt = GetIntrinsic('%BigInt%', true);
6
+ var $RangeError = require('es-errors/range');
7
+ var $TypeError = require('es-errors/type');
8
+
9
+ // https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-exponentiate
10
+
11
+ module.exports = function BigIntExponentiate(base, exponent) {
12
+ if (typeof base !== 'bigint' || typeof exponent !== 'bigint') {
13
+ throw new $TypeError('Assertion failed: `base` and `exponent` arguments must be BigInts');
14
+ }
15
+ if (exponent < $BigInt(0)) {
16
+ throw new $RangeError('Exponent must be positive');
17
+ }
18
+ if (/* base === $BigInt(0) && */ exponent === $BigInt(0)) {
19
+ return $BigInt(1);
20
+ }
21
+
22
+ var square = base;
23
+ var remaining = exponent;
24
+ while (remaining > $BigInt(0)) {
25
+ square += exponent;
26
+ --remaining; // eslint-disable-line no-plusplus
27
+ }
28
+ return square;
29
+ };
tools/ui/node_modules/es-abstract/2020/BigInt/index.js ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var add = require('./add');
4
+ var bitwiseAND = require('./bitwiseAND');
5
+ var bitwiseNOT = require('./bitwiseNOT');
6
+ var bitwiseOR = require('./bitwiseOR');
7
+ var bitwiseXOR = require('./bitwiseXOR');
8
+ var divide = require('./divide');
9
+ var equal = require('./equal');
10
+ var exponentiate = require('./exponentiate');
11
+ var leftShift = require('./leftShift');
12
+ var lessThan = require('./lessThan');
13
+ var multiply = require('./multiply');
14
+ var remainder = require('./remainder');
15
+ var sameValue = require('./sameValue');
16
+ var sameValueZero = require('./sameValueZero');
17
+ var signedRightShift = require('./signedRightShift');
18
+ var subtract = require('./subtract');
19
+ var toString = require('./toString');
20
+ var unaryMinus = require('./unaryMinus');
21
+ var unsignedRightShift = require('./unsignedRightShift');
22
+
23
+ module.exports = {
24
+ add: add,
25
+ bitwiseAND: bitwiseAND,
26
+ bitwiseNOT: bitwiseNOT,
27
+ bitwiseOR: bitwiseOR,
28
+ bitwiseXOR: bitwiseXOR,
29
+ divide: divide,
30
+ equal: equal,
31
+ exponentiate: exponentiate,
32
+ leftShift: leftShift,
33
+ lessThan: lessThan,
34
+ multiply: multiply,
35
+ remainder: remainder,
36
+ sameValue: sameValue,
37
+ sameValueZero: sameValueZero,
38
+ signedRightShift: signedRightShift,
39
+ subtract: subtract,
40
+ toString: toString,
41
+ unaryMinus: unaryMinus,
42
+ unsignedRightShift: unsignedRightShift
43
+ };
tools/ui/node_modules/es-abstract/2020/BigInt/leftShift.js ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+
5
+ // https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-leftShift
6
+
7
+ module.exports = function BigIntLeftShift(x, y) {
8
+ if (typeof x !== 'bigint' || typeof y !== 'bigint') {
9
+ throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
10
+ }
11
+
12
+ // shortcut for the actual spec mechanics
13
+ return x << y;
14
+ };
tools/ui/node_modules/es-abstract/2020/BigInt/lessThan.js ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+
5
+ // https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-lessThan
6
+
7
+ module.exports = function BigIntLessThan(x, y) {
8
+ if (typeof x !== 'bigint' || typeof y !== 'bigint') {
9
+ throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
10
+ }
11
+
12
+ // shortcut for the actual spec mechanics
13
+ return x < y;
14
+ };
tools/ui/node_modules/es-abstract/2020/BigInt/multiply.js ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+
5
+ // https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-multiply
6
+
7
+ module.exports = function BigIntMultiply(x, y) {
8
+ if (typeof x !== 'bigint' || typeof y !== 'bigint') {
9
+ throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
10
+ }
11
+
12
+ // shortcut for the actual spec mechanics
13
+ return x * y;
14
+ };
tools/ui/node_modules/es-abstract/2020/BigInt/remainder.js ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var GetIntrinsic = require('get-intrinsic');
4
+
5
+ var $BigInt = GetIntrinsic('%BigInt%', true);
6
+ var $RangeError = require('es-errors/range');
7
+ var $TypeError = require('es-errors/type');
8
+
9
+ var zero = $BigInt && $BigInt(0);
10
+
11
+ // https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-remainder
12
+
13
+ module.exports = function BigIntRemainder(n, d) {
14
+ if (typeof n !== 'bigint' || typeof d !== 'bigint') {
15
+ throw new $TypeError('Assertion failed: `n` and `d` arguments must be BigInts');
16
+ }
17
+
18
+ if (d === zero) {
19
+ throw new $RangeError('Division by zero');
20
+ }
21
+
22
+ if (n === zero) {
23
+ return zero;
24
+ }
25
+
26
+ // shortcut for the actual spec mechanics
27
+ return n % d;
28
+ };
tools/ui/node_modules/es-abstract/2020/BigInt/sameValue.js ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+
5
+ var BigIntEqual = require('./equal');
6
+
7
+ // https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-sameValue
8
+
9
+ module.exports = function BigIntSameValue(x, y) {
10
+ if (typeof x !== 'bigint' || typeof y !== 'bigint') {
11
+ throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
12
+ }
13
+
14
+ return BigIntEqual(x, y);
15
+ };
tools/ui/node_modules/es-abstract/2020/BigInt/sameValueZero.js ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+
5
+ var BigIntEqual = require('./equal');
6
+
7
+ // https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-sameValueZero
8
+
9
+ module.exports = function BigIntSameValueZero(x, y) {
10
+ if (typeof x !== 'bigint' || typeof y !== 'bigint') {
11
+ throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
12
+ }
13
+
14
+ return BigIntEqual(x, y);
15
+ };
tools/ui/node_modules/es-abstract/2020/BigInt/signedRightShift.js ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+
5
+ var BigIntLeftShift = require('./leftShift');
6
+
7
+ // https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-signedRightShift
8
+
9
+ module.exports = function BigIntSignedRightShift(x, y) {
10
+ if (typeof x !== 'bigint' || typeof y !== 'bigint') {
11
+ throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
12
+ }
13
+
14
+ return BigIntLeftShift(x, -y);
15
+ };
tools/ui/node_modules/es-abstract/2020/BigInt/subtract.js ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+
5
+ // https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-subtract
6
+
7
+ module.exports = function BigIntSubtract(x, y) {
8
+ if (typeof x !== 'bigint' || typeof y !== 'bigint') {
9
+ throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
10
+ }
11
+
12
+ // shortcut for the actual spec mechanics
13
+ return x - y;
14
+ };
tools/ui/node_modules/es-abstract/2020/BigInt/toString.js ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var GetIntrinsic = require('get-intrinsic');
4
+
5
+ var $String = GetIntrinsic('%String%');
6
+ var $TypeError = require('es-errors/type');
7
+
8
+ // https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-tostring
9
+
10
+ module.exports = function BigIntToString(x) {
11
+ if (typeof x !== 'bigint') {
12
+ throw new $TypeError('Assertion failed: `x` must be a BigInt');
13
+ }
14
+
15
+ return $String(x);
16
+ };
tools/ui/node_modules/es-abstract/2020/BigInt/unaryMinus.js ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var GetIntrinsic = require('get-intrinsic');
4
+
5
+ var $BigInt = GetIntrinsic('%BigInt%', true);
6
+ var $TypeError = require('es-errors/type');
7
+
8
+ var zero = $BigInt && $BigInt(0);
9
+
10
+ // https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-unaryMinus
11
+
12
+ module.exports = function BigIntUnaryMinus(x) {
13
+ if (typeof x !== 'bigint') {
14
+ throw new $TypeError('Assertion failed: `x` argument must be a BigInt');
15
+ }
16
+
17
+ if (x === zero) {
18
+ return zero;
19
+ }
20
+
21
+ return -x;
22
+ };
tools/ui/node_modules/es-abstract/2020/BigInt/unsignedRightShift.js ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+
5
+ // https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-unsignedRightShift
6
+
7
+ module.exports = function BigIntUnsignedRightShift(x, y) {
8
+ if (typeof x !== 'bigint' || typeof y !== 'bigint') {
9
+ throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
10
+ }
11
+
12
+ throw new $TypeError('BigInts have no unsigned right shift, use >> instead');
13
+ };
tools/ui/node_modules/es-abstract/2020/BigIntBitwiseOp.js ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+ // var $BigInt = GetIntrinsic('%BigInt%', true);
5
+ // var $pow = require('math-intrinsics/pow');
6
+
7
+ // var BinaryAnd = require('./BinaryAnd');
8
+ // var BinaryOr = require('./BinaryOr');
9
+ // var BinaryXor = require('./BinaryXor');
10
+ // var modulo = require('./modulo');
11
+
12
+ // var zero = $BigInt && $BigInt(0);
13
+ // var negOne = $BigInt && $BigInt(-1);
14
+ // var two = $BigInt && $BigInt(2);
15
+
16
+ // https://262.ecma-international.org/11.0/#sec-bigintbitwiseop
17
+
18
+ module.exports = function BigIntBitwiseOp(op, x, y) {
19
+ if (op !== '&' && op !== '|' && op !== '^') {
20
+ throw new $TypeError('Assertion failed: `op` must be `&`, `|`, or `^`');
21
+ }
22
+ if (typeof x !== 'bigint' || typeof y !== 'bigint') {
23
+ throw new $TypeError('`x` and `y` must be BigInts');
24
+ }
25
+
26
+ if (op === '&') {
27
+ return x & y;
28
+ }
29
+ if (op === '|') {
30
+ return x | y;
31
+ }
32
+ return x ^ y;
33
+ /*
34
+ var result = zero;
35
+ var shift = 0;
36
+ while (x !== zero && x !== negOne && y !== zero && y !== negOne) {
37
+ var xDigit = modulo(x, two);
38
+ var yDigit = modulo(y, two);
39
+ if (op === '&') {
40
+ result += $pow(2, shift) * BinaryAnd(xDigit, yDigit);
41
+ } else if (op === '|') {
42
+ result += $pow(2, shift) * BinaryOr(xDigit, yDigit);
43
+ } else if (op === '^') {
44
+ result += $pow(2, shift) * BinaryXor(xDigit, yDigit);
45
+ }
46
+ shift += 1;
47
+ x = (x - xDigit) / two;
48
+ y = (y - yDigit) / two;
49
+ }
50
+ var tmp;
51
+ if (op === '&') {
52
+ tmp = BinaryAnd(modulo(x, two), modulo(y, two));
53
+ } else if (op === '|') {
54
+ tmp = BinaryAnd(modulo(x, two), modulo(y, two));
55
+ } else {
56
+ tmp = BinaryXor(modulo(x, two), modulo(y, two));
57
+ }
58
+ if (tmp !== 0) {
59
+ result -= $pow(2, shift);
60
+ }
61
+ return result;
62
+ */
63
+ };
tools/ui/node_modules/es-abstract/2020/BinaryAnd.js ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+
5
+ // https://262.ecma-international.org/11.0/#sec-binaryand
6
+
7
+ module.exports = function BinaryAnd(x, y) {
8
+ if ((x !== 0 && x !== 1) || (y !== 0 && y !== 1)) {
9
+ throw new $TypeError('Assertion failed: `x` and `y` must be either 0 or 1');
10
+ }
11
+ return x & y;
12
+ };
tools/ui/node_modules/es-abstract/2020/BinaryOr.js ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+
5
+ // https://262.ecma-international.org/11.0/#sec-binaryor
6
+
7
+ module.exports = function BinaryOr(x, y) {
8
+ if ((x !== 0 && x !== 1) || (y !== 0 && y !== 1)) {
9
+ throw new $TypeError('Assertion failed: `x` and `y` must be either 0 or 1');
10
+ }
11
+ return x | y;
12
+ };
tools/ui/node_modules/es-abstract/2020/BinaryXor.js ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+
5
+ // https://262.ecma-international.org/11.0/#sec-binaryxor
6
+
7
+ module.exports = function BinaryXor(x, y) {
8
+ if ((x !== 0 && x !== 1) || (y !== 0 && y !== 1)) {
9
+ throw new $TypeError('Assertion failed: `x` and `y` must be either 0 or 1');
10
+ }
11
+ return x ^ y;
12
+ };
tools/ui/node_modules/es-abstract/2020/Call.js ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var GetIntrinsic = require('get-intrinsic');
4
+ var callBound = require('call-bound');
5
+
6
+ var $TypeError = require('es-errors/type');
7
+
8
+ var IsArray = require('./IsArray');
9
+
10
+ var $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');
11
+
12
+ // https://262.ecma-international.org/6.0/#sec-call
13
+
14
+ module.exports = function Call(F, V) {
15
+ var argumentsList = arguments.length > 2 ? arguments[2] : [];
16
+ if (!IsArray(argumentsList)) {
17
+ throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');
18
+ }
19
+ return $apply(F, V, argumentsList);
20
+ };
tools/ui/node_modules/es-abstract/2020/CanonicalNumericIndexString.js ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+
5
+ var SameValue = require('./SameValue');
6
+ var ToNumber = require('./ToNumber');
7
+ var ToString = require('./ToString');
8
+
9
+ // https://262.ecma-international.org/6.0/#sec-canonicalnumericindexstring
10
+
11
+ module.exports = function CanonicalNumericIndexString(argument) {
12
+ if (typeof argument !== 'string') {
13
+ throw new $TypeError('Assertion failed: `argument` must be a String');
14
+ }
15
+ if (argument === '-0') { return -0; }
16
+ var n = ToNumber(argument);
17
+ if (SameValue(ToString(n), argument)) { return n; }
18
+ return void 0;
19
+ };
tools/ui/node_modules/es-abstract/2020/Canonicalize.js ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+
5
+ var callBound = require('call-bound');
6
+ var hasOwn = require('hasown');
7
+
8
+ var $charCodeAt = callBound('String.prototype.charCodeAt');
9
+ var $toUpperCase = callBound('String.prototype.toUpperCase');
10
+
11
+ var caseFolding = require('../helpers/caseFolding.json');
12
+
13
+ // https://262.ecma-international.org/6.0/#sec-runtime-semantics-canonicalize-ch
14
+
15
+ module.exports = function Canonicalize(ch, IgnoreCase, Unicode) {
16
+ if (typeof ch !== 'string') {
17
+ throw new $TypeError('Assertion failed: `ch` must be a character');
18
+ }
19
+
20
+ if (typeof IgnoreCase !== 'boolean' || typeof Unicode !== 'boolean') {
21
+ throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be Booleans');
22
+ }
23
+
24
+ if (!IgnoreCase) {
25
+ return ch; // step 1
26
+ }
27
+
28
+ if (Unicode) { // step 2
29
+ if (hasOwn(caseFolding.C, ch)) {
30
+ return caseFolding.C[ch];
31
+ }
32
+ if (hasOwn(caseFolding.S, ch)) {
33
+ return caseFolding.S[ch];
34
+ }
35
+ return ch; // step 2.b
36
+ }
37
+
38
+ var u = $toUpperCase(ch); // step 2
39
+
40
+ if (u.length !== 1) {
41
+ return ch; // step 3
42
+ }
43
+
44
+ var cu = u; // step 4
45
+
46
+ if ($charCodeAt(ch, 0) >= 128 && $charCodeAt(cu, 0) < 128) {
47
+ return ch; // step 5
48
+ }
49
+
50
+ return cu;
51
+ };
tools/ui/node_modules/es-abstract/2020/CharacterRange.js ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var GetIntrinsic = require('get-intrinsic');
4
+ var callBound = require('call-bound');
5
+
6
+ var $fromCharCode = GetIntrinsic('%String.fromCharCode%');
7
+ var $TypeError = require('es-errors/type');
8
+ var $charCodeAt = callBound('String.prototype.charCodeAt');
9
+
10
+ var CharSet = require('../helpers/CharSet').CharSet;
11
+
12
+ module.exports = function CharacterRange(A, B) {
13
+ var a;
14
+ var b;
15
+
16
+ if (A instanceof CharSet || B instanceof CharSet) {
17
+ if (!(A instanceof CharSet) || !(B instanceof CharSet)) {
18
+ throw new $TypeError('Assertion failed: CharSets A and B are not both CharSets');
19
+ }
20
+
21
+ A.yield(function (c) {
22
+ if (typeof a !== 'undefined') {
23
+ throw new $TypeError('Assertion failed: CharSet A has more than one character');
24
+ }
25
+ a = c;
26
+ });
27
+ B.yield(function (c) {
28
+ if (typeof b !== 'undefined') {
29
+ throw new $TypeError('Assertion failed: CharSet B has more than one character');
30
+ }
31
+ b = c;
32
+ });
33
+ } else {
34
+ if (A.length !== 1 || B.length !== 1) {
35
+ throw new $TypeError('Assertion failed: CharSets A and B contain exactly one character');
36
+ }
37
+ a = A[0];
38
+ b = B[0];
39
+ }
40
+
41
+ var i = $charCodeAt(a, 0);
42
+ var j = $charCodeAt(b, 0);
43
+
44
+ if (!(i <= j)) {
45
+ throw new $TypeError('Assertion failed: i is not <= j');
46
+ }
47
+
48
+ var arr = [];
49
+ for (var k = i; k <= j; k += 1) {
50
+ arr[arr.length] = $fromCharCode(k);
51
+ }
52
+ return arr;
53
+ };
tools/ui/node_modules/es-abstract/2020/CodePointAt.js ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+ var callBound = require('call-bound');
5
+ var isLeadingSurrogate = require('../helpers/isLeadingSurrogate');
6
+ var isTrailingSurrogate = require('../helpers/isTrailingSurrogate');
7
+
8
+ var UTF16DecodeSurrogatePair = require('./UTF16DecodeSurrogatePair');
9
+
10
+ var $charAt = callBound('String.prototype.charAt');
11
+ var $charCodeAt = callBound('String.prototype.charCodeAt');
12
+
13
+ // https://262.ecma-international.org/11.0/#sec-codepointat
14
+
15
+ module.exports = function CodePointAt(string, position) {
16
+ if (typeof string !== 'string') {
17
+ throw new $TypeError('Assertion failed: `string` must be a String');
18
+ }
19
+ var size = string.length;
20
+ if (position < 0 || position >= size) {
21
+ throw new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');
22
+ }
23
+ var first = $charCodeAt(string, position);
24
+ var cp = $charAt(string, position);
25
+ var firstIsLeading = isLeadingSurrogate(first);
26
+ var firstIsTrailing = isTrailingSurrogate(first);
27
+ if (!firstIsLeading && !firstIsTrailing) {
28
+ return {
29
+ '[[CodePoint]]': cp,
30
+ '[[CodeUnitCount]]': 1,
31
+ '[[IsUnpairedSurrogate]]': false
32
+ };
33
+ }
34
+ if (firstIsTrailing || (position + 1 === size)) {
35
+ return {
36
+ '[[CodePoint]]': cp,
37
+ '[[CodeUnitCount]]': 1,
38
+ '[[IsUnpairedSurrogate]]': true
39
+ };
40
+ }
41
+ var second = $charCodeAt(string, position + 1);
42
+ if (!isTrailingSurrogate(second)) {
43
+ return {
44
+ '[[CodePoint]]': cp,
45
+ '[[CodeUnitCount]]': 1,
46
+ '[[IsUnpairedSurrogate]]': true
47
+ };
48
+ }
49
+
50
+ return {
51
+ '[[CodePoint]]': UTF16DecodeSurrogatePair(first, second),
52
+ '[[CodeUnitCount]]': 2,
53
+ '[[IsUnpairedSurrogate]]': false
54
+ };
55
+ };
tools/ui/node_modules/es-abstract/2020/CompletePropertyDescriptor.js ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+
5
+ var hasOwn = require('hasown');
6
+
7
+ var IsDataDescriptor = require('./IsDataDescriptor');
8
+ var IsGenericDescriptor = require('./IsGenericDescriptor');
9
+
10
+ var isPropertyDescriptor = require('../helpers/records/property-descriptor');
11
+
12
+ // https://262.ecma-international.org/6.0/#sec-completepropertydescriptor
13
+
14
+ module.exports = function CompletePropertyDescriptor(Desc) {
15
+ if (!isPropertyDescriptor(Desc)) {
16
+ throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
17
+ }
18
+
19
+ /* eslint no-param-reassign: 0 */
20
+
21
+ if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) {
22
+ if (!hasOwn(Desc, '[[Value]]')) {
23
+ Desc['[[Value]]'] = void 0;
24
+ }
25
+ if (!hasOwn(Desc, '[[Writable]]')) {
26
+ Desc['[[Writable]]'] = false;
27
+ }
28
+ } else {
29
+ if (!hasOwn(Desc, '[[Get]]')) {
30
+ Desc['[[Get]]'] = void 0;
31
+ }
32
+ if (!hasOwn(Desc, '[[Set]]')) {
33
+ Desc['[[Set]]'] = void 0;
34
+ }
35
+ }
36
+ if (!hasOwn(Desc, '[[Enumerable]]')) {
37
+ Desc['[[Enumerable]]'] = false;
38
+ }
39
+ if (!hasOwn(Desc, '[[Configurable]]')) {
40
+ Desc['[[Configurable]]'] = false;
41
+ }
42
+ return Desc;
43
+ };
tools/ui/node_modules/es-abstract/2020/CompletionRecord.js ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $SyntaxError = require('es-errors/syntax');
4
+
5
+ var SLOT = require('internal-slot');
6
+
7
+ // https://262.ecma-international.org/7.0/#sec-completion-record-specification-type
8
+
9
+ var CompletionRecord = function CompletionRecord(type, value) {
10
+ if (!(this instanceof CompletionRecord)) {
11
+ return new CompletionRecord(type, value);
12
+ }
13
+ if (type !== 'normal' && type !== 'break' && type !== 'continue' && type !== 'return' && type !== 'throw') {
14
+ throw new $SyntaxError('Assertion failed: `type` must be one of "normal", "break", "continue", "return", or "throw"');
15
+ }
16
+ SLOT.set(this, '[[Type]]', type);
17
+ SLOT.set(this, '[[Value]]', value);
18
+ // [[Target]] slot?
19
+ };
20
+
21
+ CompletionRecord.prototype.type = function Type() {
22
+ return SLOT.get(this, '[[Type]]');
23
+ };
24
+
25
+ CompletionRecord.prototype.value = function Value() {
26
+ return SLOT.get(this, '[[Value]]');
27
+ };
28
+
29
+ CompletionRecord.prototype['?'] = function ReturnIfAbrupt() {
30
+ var type = SLOT.get(this, '[[Type]]');
31
+ var value = SLOT.get(this, '[[Value]]');
32
+
33
+ if (type === 'throw') {
34
+ throw value;
35
+ }
36
+ return value;
37
+ };
38
+
39
+ CompletionRecord.prototype['!'] = function assert() {
40
+ var type = SLOT.get(this, '[[Type]]');
41
+
42
+ if (type !== 'normal') {
43
+ throw new $SyntaxError('Assertion failed: Completion Record is not of type "normal"');
44
+ }
45
+ return SLOT.get(this, '[[Value]]');
46
+ };
47
+
48
+ module.exports = CompletionRecord;
tools/ui/node_modules/es-abstract/2020/CopyDataProperties.js ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+ var isObject = require('es-object-atoms/isObject');
5
+ var callBound = require('call-bound');
6
+ var OwnPropertyKeys = require('own-keys');
7
+
8
+ var every = require('../helpers/every');
9
+ var forEach = require('../helpers/forEach');
10
+
11
+ var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
12
+
13
+ var CreateDataPropertyOrThrow = require('./CreateDataPropertyOrThrow');
14
+ var Get = require('./Get');
15
+ var IsArray = require('./IsArray');
16
+ var IsInteger = require('./IsInteger');
17
+ var isPropertyKey = require('../helpers/isPropertyKey');
18
+ var SameValue = require('./SameValue');
19
+ var ToNumber = require('./ToNumber');
20
+ var ToObject = require('./ToObject');
21
+
22
+ // https://262.ecma-international.org/11.0/#sec-copydataproperties
23
+
24
+ module.exports = function CopyDataProperties(target, source, excludedItems) {
25
+ if (!isObject(target)) {
26
+ throw new $TypeError('Assertion failed: "target" must be an Object');
27
+ }
28
+
29
+ if (!IsArray(excludedItems) || !every(excludedItems, isPropertyKey)) {
30
+ throw new $TypeError('Assertion failed: "excludedItems" must be a List of Property Keys');
31
+ }
32
+
33
+ if (typeof source === 'undefined' || source === null) {
34
+ return target;
35
+ }
36
+
37
+ var from = ToObject(source);
38
+
39
+ var sourceKeys = OwnPropertyKeys(from);
40
+ forEach(sourceKeys, function (nextKey) {
41
+ var excluded = false;
42
+
43
+ forEach(excludedItems, function (e) {
44
+ if (SameValue(e, nextKey) === true) {
45
+ excluded = true;
46
+ }
47
+ });
48
+
49
+ var enumerable = $isEnumerable(from, nextKey) || (
50
+ // this is to handle string keys being non-enumerable in older engines
51
+ typeof source === 'string'
52
+ && nextKey >= 0
53
+ && IsInteger(ToNumber(nextKey))
54
+ );
55
+ if (excluded === false && enumerable) {
56
+ var propValue = Get(from, nextKey);
57
+ CreateDataPropertyOrThrow(target, nextKey, propValue);
58
+ }
59
+ });
60
+
61
+ return target;
62
+ };
tools/ui/node_modules/es-abstract/2020/CreateAsyncFromSyncIterator.js ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var GetIntrinsic = require('get-intrinsic');
4
+
5
+ var $SyntaxError = require('es-errors/syntax');
6
+ var $TypeError = require('es-errors/type');
7
+ var isObject = require('es-object-atoms/isObject');
8
+ var $Promise = GetIntrinsic('%Promise%', true);
9
+
10
+ var AsyncFromSyncIteratorContinuation = require('./AsyncFromSyncIteratorContinuation');
11
+ var Call = require('./Call');
12
+ var CreateIterResultObject = require('./CreateIterResultObject');
13
+ var Get = require('./Get');
14
+ var GetMethod = require('./GetMethod');
15
+ var IteratorNext = require('./IteratorNext');
16
+ var OrdinaryObjectCreate = require('./OrdinaryObjectCreate');
17
+
18
+ var isIteratorRecord = require('../helpers/records/iterator-record-2023');
19
+
20
+ var SLOT = require('internal-slot');
21
+
22
+ var $AsyncFromSyncIteratorPrototype = GetIntrinsic('%AsyncFromSyncIteratorPrototype%', true) || {
23
+ next: function next(value) {
24
+ if (!$Promise) {
25
+ throw new $SyntaxError('This environment does not support Promises.');
26
+ }
27
+
28
+ var O = this; // step 1
29
+
30
+ SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2
31
+
32
+ var argsLength = arguments.length;
33
+
34
+ return new $Promise(function (resolve) { // step 3
35
+ var syncIteratorRecord = SLOT.get(O, '[[SyncIteratorRecord]]'); // step 4
36
+ var result;
37
+ if (argsLength > 0) {
38
+ result = IteratorNext(syncIteratorRecord['[[Iterator]]'], value); // step 5.a
39
+ } else { // step 6
40
+ result = IteratorNext(syncIteratorRecord['[[Iterator]]']);// step 6.a
41
+ }
42
+ resolve(AsyncFromSyncIteratorContinuation(result)); // step 8
43
+ });
44
+ },
45
+ 'return': function () {
46
+ if (!$Promise) {
47
+ throw new $SyntaxError('This environment does not support Promises.');
48
+ }
49
+
50
+ var O = this; // step 1
51
+
52
+ SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2
53
+
54
+ var valueIsPresent = arguments.length > 0;
55
+ var value = valueIsPresent ? arguments[0] : void undefined;
56
+
57
+ return new $Promise(function (resolve, reject) { // step 3
58
+ var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4
59
+ var iteratorReturn = GetMethod(syncIterator, 'return'); // step 5
60
+
61
+ if (typeof iteratorReturn === 'undefined') { // step 7
62
+ var iterResult = CreateIterResultObject(value, true); // step 7.a
63
+ Call(resolve, void undefined, [iterResult]); // step 7.b
64
+ return;
65
+ }
66
+ var result;
67
+ if (valueIsPresent) { // step 8
68
+ result = Call(iteratorReturn, syncIterator, [value]); // step 8.a
69
+ } else { // step 9
70
+ result = Call(iteratorReturn, syncIterator); // step 9.a
71
+ }
72
+ if (!isObject(result)) { // step 11
73
+ Call(reject, void undefined, [new $TypeError('Iterator `return` method returned a non-object value.')]); // step 11.a
74
+ return;
75
+ }
76
+
77
+ resolve(AsyncFromSyncIteratorContinuation(result)); // step 12
78
+ });
79
+ },
80
+ 'throw': function () {
81
+ if (!$Promise) {
82
+ throw new $SyntaxError('This environment does not support Promises.');
83
+ }
84
+
85
+ var O = this; // step 1
86
+
87
+ SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2
88
+
89
+ var valueIsPresent = arguments.length > 0;
90
+ var value = valueIsPresent ? arguments[0] : void undefined;
91
+
92
+ return new $Promise(function (resolve, reject) { // step 3
93
+ var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4
94
+
95
+ var throwMethod = GetMethod(syncIterator, 'throw'); // step 5
96
+
97
+ if (typeof throwMethod === 'undefined') { // step 7
98
+ Call(reject, void undefined, [value]); // step 7.a
99
+ return;
100
+ }
101
+
102
+ var result;
103
+ if (valueIsPresent) { // step 8
104
+ result = Call(throwMethod, syncIterator, [value]); // step 8.a
105
+ } else { // step 9
106
+ result = Call(throwMethod, syncIterator); // step 9.a
107
+ }
108
+ if (!isObject(result)) { // step 11
109
+ Call(reject, void undefined, [new $TypeError('Iterator `throw` method returned a non-object value.')]); // step 11.a
110
+ return;
111
+ }
112
+
113
+ resolve(AsyncFromSyncIteratorContinuation(result/* , promiseCapability */)); // step 12
114
+ });
115
+ }
116
+ };
117
+
118
+ // https://262.ecma-international.org/11.0/#sec-createasyncfromsynciterator
119
+
120
+ module.exports = function CreateAsyncFromSyncIterator(syncIteratorRecord) {
121
+ if (!isIteratorRecord(syncIteratorRecord)) {
122
+ throw new $TypeError('Assertion failed: `syncIteratorRecord` must be an Iterator Record');
123
+ }
124
+
125
+ // var asyncIterator = OrdinaryObjectCreate(%AsyncFromSyncIteratorPrototype%, « [[SyncIteratorRecord]] »); // step 1
126
+ var asyncIterator = OrdinaryObjectCreate($AsyncFromSyncIteratorPrototype);
127
+
128
+ SLOT.set(asyncIterator, '[[SyncIteratorRecord]]', syncIteratorRecord); // step 2
129
+
130
+ var nextMethod = Get(asyncIterator, 'next'); // step 3
131
+
132
+ return { // steps 3-4
133
+ '[[Iterator]]': asyncIterator,
134
+ '[[NextMethod]]': nextMethod,
135
+ '[[Done]]': false
136
+ };
137
+ };
tools/ui/node_modules/es-abstract/2020/CreateDataProperty.js ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+ var isObject = require('es-object-atoms/isObject');
5
+
6
+ var isPropertyKey = require('../helpers/isPropertyKey');
7
+ var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty');
8
+
9
+ // https://262.ecma-international.org/6.0/#sec-createdataproperty
10
+
11
+ module.exports = function CreateDataProperty(O, P, V) {
12
+ if (!isObject(O)) {
13
+ throw new $TypeError('Assertion failed: Type(O) is not Object');
14
+ }
15
+ if (!isPropertyKey(P)) {
16
+ throw new $TypeError('Assertion failed: P is not a Property Key');
17
+ }
18
+ var newDesc = {
19
+ '[[Configurable]]': true,
20
+ '[[Enumerable]]': true,
21
+ '[[Value]]': V,
22
+ '[[Writable]]': true
23
+ };
24
+ return OrdinaryDefineOwnProperty(O, P, newDesc);
25
+ };
tools/ui/node_modules/es-abstract/2020/CreateDataPropertyOrThrow.js ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+ var isObject = require('es-object-atoms/isObject');
5
+
6
+ var CreateDataProperty = require('./CreateDataProperty');
7
+
8
+ var isPropertyKey = require('../helpers/isPropertyKey');
9
+
10
+ // // https://262.ecma-international.org/6.0/#sec-createdatapropertyorthrow
11
+
12
+ module.exports = function CreateDataPropertyOrThrow(O, P, V) {
13
+ if (!isObject(O)) {
14
+ throw new $TypeError('Assertion failed: Type(O) is not Object');
15
+ }
16
+ if (!isPropertyKey(P)) {
17
+ throw new $TypeError('Assertion failed: P is not a Property Key');
18
+ }
19
+ var success = CreateDataProperty(O, P, V);
20
+ if (!success) {
21
+ throw new $TypeError('unable to create data property');
22
+ }
23
+ return success;
24
+ };
tools/ui/node_modules/es-abstract/2020/CreateHTML.js ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+
5
+ var callBound = require('call-bound');
6
+
7
+ var $replace = callBound('String.prototype.replace');
8
+
9
+ var RequireObjectCoercible = require('./RequireObjectCoercible');
10
+ var ToString = require('./ToString');
11
+
12
+ // https://262.ecma-international.org/6.0/#sec-createhtml
13
+
14
+ module.exports = function CreateHTML(string, tag, attribute, value) {
15
+ if (typeof tag !== 'string' || typeof attribute !== 'string') {
16
+ throw new $TypeError('Assertion failed: `tag` and `attribute` must be strings');
17
+ }
18
+ var str = RequireObjectCoercible(string);
19
+ var S = ToString(str);
20
+ var p1 = '<' + tag;
21
+ if (attribute !== '') {
22
+ var V = ToString(value);
23
+ var escapedV = $replace(V, /\x22/g, '&quot;');
24
+ p1 += '\x20' + attribute + '\x3D\x22' + escapedV + '\x22';
25
+ }
26
+ return p1 + '>' + S + '</' + tag + '>';
27
+ };
tools/ui/node_modules/es-abstract/2020/CreateIterResultObject.js ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+
5
+ // https://262.ecma-international.org/6.0/#sec-createiterresultobject
6
+
7
+ module.exports = function CreateIterResultObject(value, done) {
8
+ if (typeof done !== 'boolean') {
9
+ throw new $TypeError('Assertion failed: Type(done) is not Boolean');
10
+ }
11
+ return {
12
+ value: value,
13
+ done: done
14
+ };
15
+ };
tools/ui/node_modules/es-abstract/2020/CreateListFromArrayLike.js ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var callBound = require('call-bound');
4
+
5
+ var $TypeError = require('es-errors/type');
6
+ var isObject = require('es-object-atoms/isObject');
7
+ var $indexOf = callBound('Array.prototype.indexOf', true) || callBound('String.prototype.indexOf');
8
+
9
+ var Get = require('./Get');
10
+ var IsArray = require('./IsArray');
11
+ var LengthOfArrayLike = require('./LengthOfArrayLike');
12
+ var ToString = require('./ToString');
13
+ var Type = require('./Type');
14
+
15
+ var defaultElementTypes = ['Undefined', 'Null', 'Boolean', 'String', 'Symbol', 'Number', 'BigInt', 'Object'];
16
+
17
+ // https://262.ecma-international.org/11.0/#sec-createlistfromarraylike
18
+
19
+ /** @type {(obj: object, elementTypes?: typeof defaultElementTypes) => unknown[]} */
20
+ module.exports = function CreateListFromArrayLike(obj) {
21
+ var elementTypes = arguments.length > 1
22
+ ? arguments[1]
23
+ : defaultElementTypes;
24
+
25
+ if (!isObject(obj)) {
26
+ throw new $TypeError('Assertion failed: `obj` must be an Object');
27
+ }
28
+ if (!IsArray(elementTypes)) {
29
+ throw new $TypeError('Assertion failed: `elementTypes`, if provided, must be an array');
30
+ }
31
+ var len = LengthOfArrayLike(obj);
32
+ /** @type {(typeof elementTypes)[]} */
33
+ var list = [];
34
+ var index = 0;
35
+ while (index < len) {
36
+ var indexName = ToString(index);
37
+ var next = Get(obj, indexName);
38
+ var nextType = Type(next);
39
+ if ($indexOf(elementTypes, nextType) < 0) {
40
+ throw new $TypeError('item type ' + nextType + ' is not a valid elementType');
41
+ }
42
+ list[list.length] = next;
43
+ index += 1;
44
+ }
45
+ return list;
46
+ };
tools/ui/node_modules/es-abstract/2020/CreateMethodProperty.js ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+ var isObject = require('es-object-atoms/isObject');
5
+
6
+ var DefineOwnProperty = require('../helpers/DefineOwnProperty');
7
+
8
+ var FromPropertyDescriptor = require('./FromPropertyDescriptor');
9
+ var IsDataDescriptor = require('./IsDataDescriptor');
10
+ var isPropertyKey = require('../helpers/isPropertyKey');
11
+ var SameValue = require('./SameValue');
12
+
13
+ // https://262.ecma-international.org/6.0/#sec-createmethodproperty
14
+
15
+ module.exports = function CreateMethodProperty(O, P, V) {
16
+ if (!isObject(O)) {
17
+ throw new $TypeError('Assertion failed: Type(O) is not Object');
18
+ }
19
+
20
+ if (!isPropertyKey(P)) {
21
+ throw new $TypeError('Assertion failed: P is not a Property Key');
22
+ }
23
+
24
+ var newDesc = {
25
+ '[[Configurable]]': true,
26
+ '[[Enumerable]]': false,
27
+ '[[Value]]': V,
28
+ '[[Writable]]': true
29
+ };
30
+ return DefineOwnProperty(
31
+ IsDataDescriptor,
32
+ SameValue,
33
+ FromPropertyDescriptor,
34
+ O,
35
+ P,
36
+ newDesc
37
+ );
38
+ };