@kitware/vtk.js 25.13.3 → 25.13.5
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/Interaction/Widgets/OrientationMarkerWidget.js +3 -1
- package/Rendering/Core/RenderWindowInteractor.d.ts +2 -1
- package/Rendering/Core/RenderWindowInteractor.js +1 -1
- package/Rendering/OpenGL/ImageMapper.js +4 -8
- package/Rendering/OpenGL/PolyDataMapper.js +4 -8
- package/macros.js +2 -2
- package/package.json +2 -1
- package/_vendor/available-typed-arrays/index.js_commonjs-proxy.js +0 -1
- package/_vendor/call-bind/callBound.js_commonjs-proxy.js +0 -1
- package/_vendor/call-bind/index.js_commonjs-module.js +0 -3
- package/_vendor/call-bind/index.js_commonjs-proxy.js +0 -1
- package/_vendor/deep-equal/node_modules/isarray/index.js_commonjs-proxy.js +0 -1
- package/_vendor/define-properties/index.js_commonjs-proxy.js +0 -1
- package/_vendor/es-abstract/helpers/getOwnPropertyDescriptor.js_commonjs-proxy.js +0 -1
- package/_vendor/es-get-iterator/index.js_commonjs-module.js +0 -3
- package/_vendor/es-get-iterator/index.js_commonjs-proxy.js +0 -1
- package/_vendor/es-get-iterator/node_modules/isarray/index.js_commonjs-proxy.js +0 -1
- package/_vendor/foreach/index.js_commonjs-proxy.js +0 -1
- package/_vendor/function-bind/implementation.js_commonjs-proxy.js +0 -1
- package/_vendor/function-bind/index.js_commonjs-proxy.js +0 -1
- package/_vendor/get-intrinsic/index.js_commonjs-proxy.js +0 -1
- package/_vendor/has/src/index.js_commonjs-proxy.js +0 -1
- package/_vendor/has-bigints/index.js_commonjs-proxy.js +0 -1
- package/_vendor/has-symbols/index.js_commonjs-proxy.js +0 -1
- package/_vendor/has-symbols/shams.js_commonjs-proxy.js +0 -1
- package/_vendor/has-tostringtag/shams.js_commonjs-proxy.js +0 -1
- package/_vendor/is-arguments/index.js_commonjs-proxy.js +0 -1
- package/_vendor/is-bigint/index.js_commonjs-module.js +0 -3
- package/_vendor/is-bigint/index.js_commonjs-proxy.js +0 -1
- package/_vendor/is-boolean-object/index.js_commonjs-proxy.js +0 -1
- package/_vendor/is-date-object/index.js_commonjs-proxy.js +0 -1
- package/_vendor/is-map/index.js_commonjs-proxy.js +0 -1
- package/_vendor/is-number-object/index.js_commonjs-proxy.js +0 -1
- package/_vendor/is-regex/index.js_commonjs-proxy.js +0 -1
- package/_vendor/is-set/index.js_commonjs-proxy.js +0 -1
- package/_vendor/is-string/index.js_commonjs-proxy.js +0 -1
- package/_vendor/is-symbol/index.js_commonjs-module.js +0 -3
- package/_vendor/is-symbol/index.js_commonjs-proxy.js +0 -1
- package/_vendor/is-typed-array/index.js_commonjs-proxy.js +0 -1
- package/_vendor/is-weakmap/index.js_commonjs-proxy.js +0 -1
- package/_vendor/is-weakset/index.js_commonjs-proxy.js +0 -1
- package/_vendor/object-inspect/index.js_commonjs-proxy.js +0 -1
- package/_vendor/object-is/implementation.js_commonjs-proxy.js +0 -1
- package/_vendor/object-is/index.js_commonjs-proxy.js +0 -1
- package/_vendor/object-is/polyfill.js_commonjs-proxy.js +0 -1
- package/_vendor/object-is/shim.js_commonjs-proxy.js +0 -1
- package/_vendor/object-keys/implementation.js_commonjs-proxy.js +0 -1
- package/_vendor/object-keys/index.js_commonjs-proxy.js +0 -1
- package/_vendor/object-keys/isArguments.js_commonjs-proxy.js +0 -1
- package/_vendor/object.assign/implementation.js_commonjs-proxy.js +0 -1
- package/_vendor/object.assign/index.js_commonjs-proxy.js +0 -1
- package/_vendor/object.assign/polyfill.js_commonjs-proxy.js +0 -1
- package/_vendor/object.assign/shim.js_commonjs-proxy.js +0 -2
- package/_vendor/regexp.prototype.flags/implementation.js_commonjs-proxy.js +0 -1
- package/_vendor/regexp.prototype.flags/index.js_commonjs-proxy.js +0 -1
- package/_vendor/regexp.prototype.flags/polyfill.js_commonjs-proxy.js +0 -1
- package/_vendor/regexp.prototype.flags/shim.js_commonjs-proxy.js +0 -1
- package/_vendor/side-channel/index.js_commonjs-proxy.js +0 -1
- package/_vendor/which-boxed-primitive/index.js_commonjs-proxy.js +0 -5
- package/_vendor/which-collection/index.js_commonjs-proxy.js +0 -4
- package/_vendor/which-typed-array/index.js_commonjs-proxy.js +0 -1
- package/_virtual/_node-resolve_empty.js_commonjs-proxy.js +0 -6
- package/_virtual/commonjsHelpers.js +0 -18
- package/_virtual/node-resolve_empty.js +0 -8
- package/_virtual/polyfill-node.global.js +0 -5
- package/_virtual/polyfill-node.process.js +0 -225
- package/vendor/available-typed-arrays/index.js +0 -29
- package/vendor/call-bind/callBound.js +0 -19
- package/vendor/call-bind/index.js +0 -52
- package/vendor/deep-equal/index.js +0 -379
- package/vendor/deep-equal/node_modules/isarray/index.js +0 -7
- package/vendor/define-properties/index.js +0 -60
- package/vendor/es-abstract/helpers/getOwnPropertyDescriptor.js +0 -17
- package/vendor/es-get-iterator/index.js +0 -217
- package/vendor/es-get-iterator/node_modules/isarray/index.js +0 -7
- package/vendor/foreach/index.js +0 -22
- package/vendor/function-bind/implementation.js +0 -52
- package/vendor/function-bind/index.js +0 -7
- package/vendor/get-intrinsic/index.js +0 -334
- package/vendor/has/src/index.js +0 -7
- package/vendor/has-bigints/index.js +0 -12
- package/vendor/has-symbols/index.js +0 -15
- package/vendor/has-symbols/shams.js +0 -42
- package/vendor/has-tostringtag/shams.js +0 -9
- package/vendor/is-arguments/index.js +0 -36
- package/vendor/is-bigint/index.js +0 -39
- package/vendor/is-boolean-object/index.js +0 -29
- package/vendor/is-date-object/index.js +0 -22
- package/vendor/is-map/index.js +0 -42
- package/vendor/is-number-object/index.js +0 -26
- package/vendor/is-regex/index.js +0 -61
- package/vendor/is-set/index.js +0 -42
- package/vendor/is-string/index.js +0 -26
- package/vendor/is-symbol/index.js +0 -36
- package/vendor/is-typed-array/index.js +0 -67
- package/vendor/is-weakmap/index.js +0 -42
- package/vendor/is-weakset/index.js +0 -42
- package/vendor/object-inspect/index.js +0 -515
- package/vendor/object-is/implementation.js +0 -18
- package/vendor/object-is/index.js +0 -25
- package/vendor/object-is/polyfill.js +0 -9
- package/vendor/object-is/shim.js +0 -17
- package/vendor/object-keys/implementation.js +0 -124
- package/vendor/object-keys/index.js +0 -35
- package/vendor/object-keys/isArguments.js +0 -17
- package/vendor/object.assign/implementation.js +0 -46
- package/vendor/object.assign/index.js +0 -29
- package/vendor/object.assign/polyfill.js +0 -57
- package/vendor/object.assign/shim.js +0 -17
- package/vendor/regexp.prototype.flags/implementation.js +0 -30
- package/vendor/regexp.prototype.flags/index.js +0 -25
- package/vendor/regexp.prototype.flags/polyfill.js +0 -23
- package/vendor/regexp.prototype.flags/shim.js +0 -29
- package/vendor/side-channel/index.js +0 -128
- package/vendor/which-boxed-primitive/index.js +0 -38
- package/vendor/which-collection/index.js +0 -29
- package/vendor/which-typed-array/index.js +0 -63
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { g as getIntrinsic } from '../get-intrinsic/index.js';
|
|
2
|
-
import './index.js';
|
|
3
|
-
import { c as callBind$1 } from '../../_vendor/call-bind/index.js_commonjs-module.js';
|
|
4
|
-
|
|
5
|
-
var GetIntrinsic = getIntrinsic;
|
|
6
|
-
|
|
7
|
-
var callBind = callBind$1.exports;
|
|
8
|
-
|
|
9
|
-
var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
|
|
10
|
-
|
|
11
|
-
var callBound = function callBoundIntrinsic(name, allowMissing) {
|
|
12
|
-
var intrinsic = GetIntrinsic(name, !!allowMissing);
|
|
13
|
-
if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
|
|
14
|
-
return callBind(intrinsic);
|
|
15
|
-
}
|
|
16
|
-
return intrinsic;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export { callBound as c };
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { c as callBind } from '../../_vendor/call-bind/index.js_commonjs-module.js';
|
|
2
|
-
import { f as functionBind } from '../function-bind/index.js';
|
|
3
|
-
import { g as getIntrinsic } from '../get-intrinsic/index.js';
|
|
4
|
-
|
|
5
|
-
(function (module) {
|
|
6
|
-
|
|
7
|
-
var bind = functionBind;
|
|
8
|
-
var GetIntrinsic = getIntrinsic;
|
|
9
|
-
|
|
10
|
-
var $apply = GetIntrinsic('%Function.prototype.apply%');
|
|
11
|
-
var $call = GetIntrinsic('%Function.prototype.call%');
|
|
12
|
-
var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
|
|
13
|
-
|
|
14
|
-
var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
|
|
15
|
-
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
|
|
16
|
-
var $max = GetIntrinsic('%Math.max%');
|
|
17
|
-
|
|
18
|
-
if ($defineProperty) {
|
|
19
|
-
try {
|
|
20
|
-
$defineProperty({}, 'a', { value: 1 });
|
|
21
|
-
} catch (e) {
|
|
22
|
-
// IE 8 has a broken defineProperty
|
|
23
|
-
$defineProperty = null;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
module.exports = function callBind(originalFunction) {
|
|
28
|
-
var func = $reflectApply(bind, $call, arguments);
|
|
29
|
-
if ($gOPD && $defineProperty) {
|
|
30
|
-
var desc = $gOPD(func, 'length');
|
|
31
|
-
if (desc.configurable) {
|
|
32
|
-
// original length, plus the receiver, minus any additional arguments (after the receiver)
|
|
33
|
-
$defineProperty(
|
|
34
|
-
func,
|
|
35
|
-
'length',
|
|
36
|
-
{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
return func;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
var applyBind = function applyBind() {
|
|
44
|
-
return $reflectApply(bind, $apply, arguments);
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
if ($defineProperty) {
|
|
48
|
-
$defineProperty(module.exports, 'apply', { value: applyBind });
|
|
49
|
-
} else {
|
|
50
|
-
module.exports.apply = applyBind;
|
|
51
|
-
}
|
|
52
|
-
}(callBind));
|
|
@@ -1,379 +0,0 @@
|
|
|
1
|
-
import { o as objectKeys$1 } from '../object-keys/index.js';
|
|
2
|
-
import { i as isArguments$1 } from '../is-arguments/index.js';
|
|
3
|
-
import { o as objectIs } from '../object-is/index.js';
|
|
4
|
-
import { i as isRegex$1 } from '../is-regex/index.js';
|
|
5
|
-
import { r as regexp_prototype_flags } from '../regexp.prototype.flags/index.js';
|
|
6
|
-
import { i as isarray } from './node_modules/isarray/index.js';
|
|
7
|
-
import { i as isDateObject } from '../is-date-object/index.js';
|
|
8
|
-
import { w as whichBoxedPrimitive$1 } from '../which-boxed-primitive/index.js';
|
|
9
|
-
import { g as getIntrinsic } from '../get-intrinsic/index.js';
|
|
10
|
-
import { c as callBound$1 } from '../call-bind/callBound.js';
|
|
11
|
-
import { w as whichCollection$1 } from '../which-collection/index.js';
|
|
12
|
-
import '../es-get-iterator/index.js';
|
|
13
|
-
import { s as sideChannel } from '../side-channel/index.js';
|
|
14
|
-
import { w as whichTypedArray$1 } from '../which-typed-array/index.js';
|
|
15
|
-
import { o as object_assign } from '../object.assign/index.js';
|
|
16
|
-
import { e as esGetIterator } from '../../_vendor/es-get-iterator/index.js_commonjs-module.js';
|
|
17
|
-
|
|
18
|
-
var objectKeys = objectKeys$1;
|
|
19
|
-
var isArguments = isArguments$1;
|
|
20
|
-
var is = objectIs;
|
|
21
|
-
var isRegex = isRegex$1;
|
|
22
|
-
var flags = regexp_prototype_flags;
|
|
23
|
-
var isArray = isarray;
|
|
24
|
-
var isDate = isDateObject;
|
|
25
|
-
var whichBoxedPrimitive = whichBoxedPrimitive$1;
|
|
26
|
-
var GetIntrinsic = getIntrinsic;
|
|
27
|
-
var callBound = callBound$1;
|
|
28
|
-
var whichCollection = whichCollection$1;
|
|
29
|
-
var getIterator = esGetIterator.exports;
|
|
30
|
-
var getSideChannel = sideChannel;
|
|
31
|
-
var whichTypedArray = whichTypedArray$1;
|
|
32
|
-
var assign = object_assign;
|
|
33
|
-
|
|
34
|
-
var $getTime = callBound('Date.prototype.getTime');
|
|
35
|
-
var gPO = Object.getPrototypeOf;
|
|
36
|
-
var $objToString = callBound('Object.prototype.toString');
|
|
37
|
-
|
|
38
|
-
var $Set = GetIntrinsic('%Set%', true);
|
|
39
|
-
var $mapHas = callBound('Map.prototype.has', true);
|
|
40
|
-
var $mapGet = callBound('Map.prototype.get', true);
|
|
41
|
-
var $mapSize = callBound('Map.prototype.size', true);
|
|
42
|
-
var $setAdd = callBound('Set.prototype.add', true);
|
|
43
|
-
var $setDelete = callBound('Set.prototype.delete', true);
|
|
44
|
-
var $setHas = callBound('Set.prototype.has', true);
|
|
45
|
-
var $setSize = callBound('Set.prototype.size', true);
|
|
46
|
-
|
|
47
|
-
// taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L401-L414
|
|
48
|
-
function setHasEqualElement(set, val1, opts, channel) {
|
|
49
|
-
var i = getIterator(set);
|
|
50
|
-
var result;
|
|
51
|
-
while ((result = i.next()) && !result.done) {
|
|
52
|
-
if (internalDeepEqual(val1, result.value, opts, channel)) { // eslint-disable-line no-use-before-define
|
|
53
|
-
// Remove the matching element to make sure we do not check that again.
|
|
54
|
-
$setDelete(set, result.value);
|
|
55
|
-
return true;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
return false;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
// taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L416-L439
|
|
63
|
-
function findLooseMatchingPrimitives(prim) {
|
|
64
|
-
if (typeof prim === 'undefined') {
|
|
65
|
-
return null;
|
|
66
|
-
}
|
|
67
|
-
if (typeof prim === 'object') { // Only pass in null as object!
|
|
68
|
-
return void 0;
|
|
69
|
-
}
|
|
70
|
-
if (typeof prim === 'symbol') {
|
|
71
|
-
return false;
|
|
72
|
-
}
|
|
73
|
-
if (typeof prim === 'string' || typeof prim === 'number') {
|
|
74
|
-
// Loose equal entries exist only if the string is possible to convert to a regular number and not NaN.
|
|
75
|
-
return +prim === +prim; // eslint-disable-line no-implicit-coercion
|
|
76
|
-
}
|
|
77
|
-
return true;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L449-L460
|
|
81
|
-
function mapMightHaveLoosePrim(a, b, prim, item, opts, channel) {
|
|
82
|
-
var altValue = findLooseMatchingPrimitives(prim);
|
|
83
|
-
if (altValue != null) {
|
|
84
|
-
return altValue;
|
|
85
|
-
}
|
|
86
|
-
var curB = $mapGet(b, altValue);
|
|
87
|
-
var looseOpts = assign({}, opts, { strict: false });
|
|
88
|
-
if (
|
|
89
|
-
(typeof curB === 'undefined' && !$mapHas(b, altValue))
|
|
90
|
-
// eslint-disable-next-line no-use-before-define
|
|
91
|
-
|| !internalDeepEqual(item, curB, looseOpts, channel)
|
|
92
|
-
) {
|
|
93
|
-
return false;
|
|
94
|
-
}
|
|
95
|
-
// eslint-disable-next-line no-use-before-define
|
|
96
|
-
return !$mapHas(a, altValue) && internalDeepEqual(item, curB, looseOpts, channel);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
// taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L441-L447
|
|
100
|
-
function setMightHaveLoosePrim(a, b, prim) {
|
|
101
|
-
var altValue = findLooseMatchingPrimitives(prim);
|
|
102
|
-
if (altValue != null) {
|
|
103
|
-
return altValue;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
return $setHas(b, altValue) && !$setHas(a, altValue);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
// taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L518-L533
|
|
110
|
-
function mapHasEqualEntry(set, map, key1, item1, opts, channel) {
|
|
111
|
-
var i = getIterator(set);
|
|
112
|
-
var result;
|
|
113
|
-
var key2;
|
|
114
|
-
while ((result = i.next()) && !result.done) {
|
|
115
|
-
key2 = result.value;
|
|
116
|
-
if (
|
|
117
|
-
// eslint-disable-next-line no-use-before-define
|
|
118
|
-
internalDeepEqual(key1, key2, opts, channel)
|
|
119
|
-
// eslint-disable-next-line no-use-before-define
|
|
120
|
-
&& internalDeepEqual(item1, $mapGet(map, key2), opts, channel)
|
|
121
|
-
) {
|
|
122
|
-
$setDelete(set, key2);
|
|
123
|
-
return true;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
return false;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
function internalDeepEqual(actual, expected, options, channel) {
|
|
131
|
-
var opts = options || {};
|
|
132
|
-
|
|
133
|
-
// 7.1. All identical values are equivalent, as determined by ===.
|
|
134
|
-
if (opts.strict ? is(actual, expected) : actual === expected) {
|
|
135
|
-
return true;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
var actualBoxed = whichBoxedPrimitive(actual);
|
|
139
|
-
var expectedBoxed = whichBoxedPrimitive(expected);
|
|
140
|
-
if (actualBoxed !== expectedBoxed) {
|
|
141
|
-
return false;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
// 7.3. Other pairs that do not both pass typeof value == 'object', equivalence is determined by ==.
|
|
145
|
-
if (!actual || !expected || (typeof actual !== 'object' && typeof expected !== 'object')) {
|
|
146
|
-
return opts.strict ? is(actual, expected) : actual == expected; // eslint-disable-line eqeqeq
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
/*
|
|
150
|
-
* 7.4. For all other Object pairs, including Array objects, equivalence is
|
|
151
|
-
* determined by having the same number of owned properties (as verified
|
|
152
|
-
* with Object.prototype.hasOwnProperty.call), the same set of keys
|
|
153
|
-
* (although not necessarily the same order), equivalent values for every
|
|
154
|
-
* corresponding key, and an identical 'prototype' property. Note: this
|
|
155
|
-
* accounts for both named and indexed properties on Arrays.
|
|
156
|
-
*/
|
|
157
|
-
// see https://github.com/nodejs/node/commit/d3aafd02efd3a403d646a3044adcf14e63a88d32 for memos/channel inspiration
|
|
158
|
-
|
|
159
|
-
var hasActual = channel.has(actual);
|
|
160
|
-
var hasExpected = channel.has(expected);
|
|
161
|
-
var sentinel;
|
|
162
|
-
if (hasActual && hasExpected) {
|
|
163
|
-
if (channel.get(actual) === channel.get(expected)) {
|
|
164
|
-
return true;
|
|
165
|
-
}
|
|
166
|
-
} else {
|
|
167
|
-
sentinel = {};
|
|
168
|
-
}
|
|
169
|
-
if (!hasActual) { channel.set(actual, sentinel); }
|
|
170
|
-
if (!hasExpected) { channel.set(expected, sentinel); }
|
|
171
|
-
|
|
172
|
-
// eslint-disable-next-line no-use-before-define
|
|
173
|
-
return objEquiv(actual, expected, opts, channel);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
function isBuffer(x) {
|
|
177
|
-
if (!x || typeof x !== 'object' || typeof x.length !== 'number') {
|
|
178
|
-
return false;
|
|
179
|
-
}
|
|
180
|
-
if (typeof x.copy !== 'function' || typeof x.slice !== 'function') {
|
|
181
|
-
return false;
|
|
182
|
-
}
|
|
183
|
-
if (x.length > 0 && typeof x[0] !== 'number') {
|
|
184
|
-
return false;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
return !!(x.constructor && x.constructor.isBuffer && x.constructor.isBuffer(x));
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
function setEquiv(a, b, opts, channel) {
|
|
191
|
-
if ($setSize(a) !== $setSize(b)) {
|
|
192
|
-
return false;
|
|
193
|
-
}
|
|
194
|
-
var iA = getIterator(a);
|
|
195
|
-
var iB = getIterator(b);
|
|
196
|
-
var resultA;
|
|
197
|
-
var resultB;
|
|
198
|
-
var set;
|
|
199
|
-
while ((resultA = iA.next()) && !resultA.done) {
|
|
200
|
-
if (resultA.value && typeof resultA.value === 'object') {
|
|
201
|
-
if (!set) { set = new $Set(); }
|
|
202
|
-
$setAdd(set, resultA.value);
|
|
203
|
-
} else if (!$setHas(b, resultA.value)) {
|
|
204
|
-
if (opts.strict) { return false; }
|
|
205
|
-
if (!setMightHaveLoosePrim(a, b, resultA.value)) {
|
|
206
|
-
return false;
|
|
207
|
-
}
|
|
208
|
-
if (!set) { set = new $Set(); }
|
|
209
|
-
$setAdd(set, resultA.value);
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
if (set) {
|
|
213
|
-
while ((resultB = iB.next()) && !resultB.done) {
|
|
214
|
-
// We have to check if a primitive value is already matching and only if it's not, go hunting for it.
|
|
215
|
-
if (resultB.value && typeof resultB.value === 'object') {
|
|
216
|
-
if (!setHasEqualElement(set, resultB.value, opts.strict, channel)) {
|
|
217
|
-
return false;
|
|
218
|
-
}
|
|
219
|
-
} else if (
|
|
220
|
-
!opts.strict
|
|
221
|
-
&& !$setHas(a, resultB.value)
|
|
222
|
-
&& !setHasEqualElement(set, resultB.value, opts.strict, channel)
|
|
223
|
-
) {
|
|
224
|
-
return false;
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
return $setSize(set) === 0;
|
|
228
|
-
}
|
|
229
|
-
return true;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
function mapEquiv(a, b, opts, channel) {
|
|
233
|
-
if ($mapSize(a) !== $mapSize(b)) {
|
|
234
|
-
return false;
|
|
235
|
-
}
|
|
236
|
-
var iA = getIterator(a);
|
|
237
|
-
var iB = getIterator(b);
|
|
238
|
-
var resultA;
|
|
239
|
-
var resultB;
|
|
240
|
-
var set;
|
|
241
|
-
var key;
|
|
242
|
-
var item1;
|
|
243
|
-
var item2;
|
|
244
|
-
while ((resultA = iA.next()) && !resultA.done) {
|
|
245
|
-
key = resultA.value[0];
|
|
246
|
-
item1 = resultA.value[1];
|
|
247
|
-
if (key && typeof key === 'object') {
|
|
248
|
-
if (!set) { set = new $Set(); }
|
|
249
|
-
$setAdd(set, key);
|
|
250
|
-
} else {
|
|
251
|
-
item2 = $mapGet(b, key);
|
|
252
|
-
if ((typeof item2 === 'undefined' && !$mapHas(b, key)) || !internalDeepEqual(item1, item2, opts, channel)) {
|
|
253
|
-
if (opts.strict) {
|
|
254
|
-
return false;
|
|
255
|
-
}
|
|
256
|
-
if (!mapMightHaveLoosePrim(a, b, key, item1, opts, channel)) {
|
|
257
|
-
return false;
|
|
258
|
-
}
|
|
259
|
-
if (!set) { set = new $Set(); }
|
|
260
|
-
$setAdd(set, key);
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
if (set) {
|
|
266
|
-
while ((resultB = iB.next()) && !resultB.done) {
|
|
267
|
-
key = resultB.value[0];
|
|
268
|
-
item2 = resultB.value[1];
|
|
269
|
-
if (key && typeof key === 'object') {
|
|
270
|
-
if (!mapHasEqualEntry(set, a, key, item2, opts, channel)) {
|
|
271
|
-
return false;
|
|
272
|
-
}
|
|
273
|
-
} else if (
|
|
274
|
-
!opts.strict
|
|
275
|
-
&& (!a.has(key) || !internalDeepEqual($mapGet(a, key), item2, opts, channel))
|
|
276
|
-
&& !mapHasEqualEntry(set, a, key, item2, assign({}, opts, { strict: false }), channel)
|
|
277
|
-
) {
|
|
278
|
-
return false;
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
return $setSize(set) === 0;
|
|
282
|
-
}
|
|
283
|
-
return true;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
function objEquiv(a, b, opts, channel) {
|
|
287
|
-
/* eslint max-statements: [2, 100], max-lines-per-function: [2, 120], max-depth: [2, 5] */
|
|
288
|
-
var i, key;
|
|
289
|
-
|
|
290
|
-
if (typeof a !== typeof b) { return false; }
|
|
291
|
-
if (a == null || b == null) { return false; }
|
|
292
|
-
|
|
293
|
-
if ($objToString(a) !== $objToString(b)) { return false; }
|
|
294
|
-
|
|
295
|
-
if (isArguments(a) !== isArguments(b)) { return false; }
|
|
296
|
-
|
|
297
|
-
var aIsArray = isArray(a);
|
|
298
|
-
var bIsArray = isArray(b);
|
|
299
|
-
if (aIsArray !== bIsArray) { return false; }
|
|
300
|
-
|
|
301
|
-
// TODO: replace when a cross-realm brand check is available
|
|
302
|
-
var aIsError = a instanceof Error;
|
|
303
|
-
var bIsError = b instanceof Error;
|
|
304
|
-
if (aIsError !== bIsError) { return false; }
|
|
305
|
-
if (aIsError || bIsError) {
|
|
306
|
-
if (a.name !== b.name || a.message !== b.message) { return false; }
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
var aIsRegex = isRegex(a);
|
|
310
|
-
var bIsRegex = isRegex(b);
|
|
311
|
-
if (aIsRegex !== bIsRegex) { return false; }
|
|
312
|
-
if ((aIsRegex || bIsRegex) && (a.source !== b.source || flags(a) !== flags(b))) {
|
|
313
|
-
return false;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
var aIsDate = isDate(a);
|
|
317
|
-
var bIsDate = isDate(b);
|
|
318
|
-
if (aIsDate !== bIsDate) { return false; }
|
|
319
|
-
if (aIsDate || bIsDate) { // && would work too, because both are true or both false here
|
|
320
|
-
if ($getTime(a) !== $getTime(b)) { return false; }
|
|
321
|
-
}
|
|
322
|
-
if (opts.strict && gPO && gPO(a) !== gPO(b)) { return false; }
|
|
323
|
-
|
|
324
|
-
if (whichTypedArray(a) !== whichTypedArray(b)) {
|
|
325
|
-
return false;
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
var aIsBuffer = isBuffer(a);
|
|
329
|
-
var bIsBuffer = isBuffer(b);
|
|
330
|
-
if (aIsBuffer !== bIsBuffer) { return false; }
|
|
331
|
-
if (aIsBuffer || bIsBuffer) { // && would work too, because both are true or both false here
|
|
332
|
-
if (a.length !== b.length) { return false; }
|
|
333
|
-
for (i = 0; i < a.length; i++) {
|
|
334
|
-
if (a[i] !== b[i]) { return false; }
|
|
335
|
-
}
|
|
336
|
-
return true;
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
if (typeof a !== typeof b) { return false; }
|
|
340
|
-
|
|
341
|
-
var ka = objectKeys(a);
|
|
342
|
-
var kb = objectKeys(b);
|
|
343
|
-
// having the same number of owned properties (keys incorporates hasOwnProperty)
|
|
344
|
-
if (ka.length !== kb.length) { return false; }
|
|
345
|
-
|
|
346
|
-
// the same set of keys (although not necessarily the same order),
|
|
347
|
-
ka.sort();
|
|
348
|
-
kb.sort();
|
|
349
|
-
// ~~~cheap key test
|
|
350
|
-
for (i = ka.length - 1; i >= 0; i--) {
|
|
351
|
-
if (ka[i] != kb[i]) { return false; } // eslint-disable-line eqeqeq
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
// equivalent values for every corresponding key, and ~~~possibly expensive deep test
|
|
355
|
-
for (i = ka.length - 1; i >= 0; i--) {
|
|
356
|
-
key = ka[i];
|
|
357
|
-
if (!internalDeepEqual(a[key], b[key], opts, channel)) { return false; }
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
var aCollection = whichCollection(a);
|
|
361
|
-
var bCollection = whichCollection(b);
|
|
362
|
-
if (aCollection !== bCollection) {
|
|
363
|
-
return false;
|
|
364
|
-
}
|
|
365
|
-
if (aCollection === 'Set' || bCollection === 'Set') { // aCollection === bCollection
|
|
366
|
-
return setEquiv(a, b, opts, channel);
|
|
367
|
-
}
|
|
368
|
-
if (aCollection === 'Map') { // aCollection === bCollection
|
|
369
|
-
return mapEquiv(a, b, opts, channel);
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
return true;
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
var deepEqual = function deepEqual(a, b, opts) {
|
|
376
|
-
return internalDeepEqual(a, b, opts, getSideChannel());
|
|
377
|
-
};
|
|
378
|
-
|
|
379
|
-
export { deepEqual as d };
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { o as objectKeys } from '../object-keys/index.js';
|
|
2
|
-
|
|
3
|
-
var keys = objectKeys;
|
|
4
|
-
var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
|
|
5
|
-
|
|
6
|
-
var toStr = Object.prototype.toString;
|
|
7
|
-
var concat = Array.prototype.concat;
|
|
8
|
-
var origDefineProperty = Object.defineProperty;
|
|
9
|
-
|
|
10
|
-
var isFunction = function (fn) {
|
|
11
|
-
return typeof fn === 'function' && toStr.call(fn) === '[object Function]';
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
var arePropertyDescriptorsSupported = function () {
|
|
15
|
-
var obj = {};
|
|
16
|
-
try {
|
|
17
|
-
origDefineProperty(obj, 'x', { enumerable: false, value: obj });
|
|
18
|
-
// eslint-disable-next-line no-unused-vars, no-restricted-syntax
|
|
19
|
-
for (var _ in obj) { // jscs:ignore disallowUnusedVariables
|
|
20
|
-
return false;
|
|
21
|
-
}
|
|
22
|
-
return obj.x === obj;
|
|
23
|
-
} catch (e) { /* this is IE 8. */
|
|
24
|
-
return false;
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
var supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported();
|
|
28
|
-
|
|
29
|
-
var defineProperty = function (object, name, value, predicate) {
|
|
30
|
-
if (name in object && (!isFunction(predicate) || !predicate())) {
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
if (supportsDescriptors) {
|
|
34
|
-
origDefineProperty(object, name, {
|
|
35
|
-
configurable: true,
|
|
36
|
-
enumerable: false,
|
|
37
|
-
value: value,
|
|
38
|
-
writable: true
|
|
39
|
-
});
|
|
40
|
-
} else {
|
|
41
|
-
object[name] = value;
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
var defineProperties = function (object, map) {
|
|
46
|
-
var predicates = arguments.length > 2 ? arguments[2] : {};
|
|
47
|
-
var props = keys(map);
|
|
48
|
-
if (hasSymbols) {
|
|
49
|
-
props = concat.call(props, Object.getOwnPropertySymbols(map));
|
|
50
|
-
}
|
|
51
|
-
for (var i = 0; i < props.length; i += 1) {
|
|
52
|
-
defineProperty(object, props[i], map[props[i]], predicates[props[i]]);
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
defineProperties.supportsDescriptors = !!supportsDescriptors;
|
|
57
|
-
|
|
58
|
-
var defineProperties_1 = defineProperties;
|
|
59
|
-
|
|
60
|
-
export { defineProperties_1 as d };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { g as getIntrinsic } from '../../get-intrinsic/index.js';
|
|
2
|
-
|
|
3
|
-
var GetIntrinsic = getIntrinsic;
|
|
4
|
-
|
|
5
|
-
var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
|
|
6
|
-
if ($gOPD) {
|
|
7
|
-
try {
|
|
8
|
-
$gOPD([], 'length');
|
|
9
|
-
} catch (e) {
|
|
10
|
-
// IE 8 has a broken gOPD
|
|
11
|
-
$gOPD = null;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
var getOwnPropertyDescriptor = $gOPD;
|
|
16
|
-
|
|
17
|
-
export { getOwnPropertyDescriptor as g };
|