aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-12-17 12:16:52 -0800
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-12-17 12:26:19 -0800
commitbbf8a17bf58292360f323c7d1113057d8e36fb0b (patch)
tree04ab71c77db3bab2a4e3c958f953ae50ad0c0963 /src
parent8c8accf968e4e108a6fcdaf4158440886cf476d8 (diff)
downloadbun-bbf8a17bf58292360f323c7d1113057d8e36fb0b.tar.gz
bun-bbf8a17bf58292360f323c7d1113057d8e36fb0b.tar.zst
bun-bbf8a17bf58292360f323c7d1113057d8e36fb0b.zip
Use Bun.deepEqual in `assert` module
Diffstat (limited to 'src')
-rw-r--r--src/bun.js/assert.exports.js1545
1 files changed, 41 insertions, 1504 deletions
diff --git a/src/bun.js/assert.exports.js b/src/bun.js/assert.exports.js
index 9e82fa72b..a66c0c241 100644
--- a/src/bun.js/assert.exports.js
+++ b/src/bun.js/assert.exports.js
@@ -1,3 +1,5 @@
+var { Bun } = import.meta.primordials;
+var isDeepEqual = Bun.deepEquals;
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -977,1460 +979,6 @@ should equal
},
});
-// es6-object-assign/index.js
-var require_es6_object_assign = __commonJS({
- "es6-object-assign/index.js"(exports, module2) {
- "use strict";
- function assign(target, firstSource) {
- if (target == null)
- throw new TypeError("Cannot convert first argument to object");
- for (var to = Object(target), i = 1; i < arguments.length; i++) {
- var nextSource = arguments[i];
- if (nextSource != null)
- for (
- var keysArray = Object.keys(Object(nextSource)),
- nextIndex = 0,
- len = keysArray.length;
- nextIndex < len;
- nextIndex++
- ) {
- var nextKey = keysArray[nextIndex],
- desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
- desc !== void 0 &&
- desc.enumerable &&
- (to[nextKey] = nextSource[nextKey]);
- }
- }
- return to;
- }
- function polyfill() {
- Object.assign ||
- Object.defineProperty(Object, "assign", {
- enumerable: !1,
- configurable: !0,
- writable: !0,
- value: assign,
- });
- }
- module2.exports = {
- assign,
- polyfill,
- };
- },
-});
-
-// object-keys/isArguments.js
-var require_isArguments = __commonJS({
- "object-keys/isArguments.js"(exports, module2) {
- "use strict";
- var toStr = Object.prototype.toString;
- module2.exports = function (value) {
- var str = toStr.call(value),
- isArgs = str === "[object Arguments]";
- return (
- isArgs ||
- (isArgs =
- str !== "[object Array]" &&
- value !== null &&
- typeof value == "object" &&
- typeof value.length == "number" &&
- value.length >= 0 &&
- toStr.call(value.callee) === "[object Function]"),
- isArgs
- );
- };
- },
-});
-
-// object-keys/implementation.js
-var require_implementation = __commonJS({
- "object-keys/implementation.js"(exports, module2) {
- "use strict";
- var keysShim;
- Object.keys ||
- ((has = Object.prototype.hasOwnProperty),
- (toStr = Object.prototype.toString),
- (isArgs = require_isArguments()),
- (isEnumerable = Object.prototype.propertyIsEnumerable),
- (hasDontEnumBug = !isEnumerable.call({ toString: null }, "toString")),
- (hasProtoEnumBug = isEnumerable.call(function () {}, "prototype")),
- (dontEnums = [
- "toString",
- "toLocaleString",
- "valueOf",
- "hasOwnProperty",
- "isPrototypeOf",
- "propertyIsEnumerable",
- "constructor",
- ]),
- (equalsConstructorPrototype = function (o) {
- var ctor = o.constructor;
- return ctor && ctor.prototype === o;
- }),
- (excludedKeys = {
- $applicationCache: !0,
- $console: !0,
- $external: !0,
- $frame: !0,
- $frameElement: !0,
- $frames: !0,
- $innerHeight: !0,
- $innerWidth: !0,
- $onmozfullscreenchange: !0,
- $onmozfullscreenerror: !0,
- $outerHeight: !0,
- $outerWidth: !0,
- $pageXOffset: !0,
- $pageYOffset: !0,
- $parent: !0,
- $scrollLeft: !0,
- $scrollTop: !0,
- $scrollX: !0,
- $scrollY: !0,
- $self: !0,
- $webkitIndexedDB: !0,
- $webkitStorageInfo: !0,
- $window: !0,
- }),
- (hasAutomationEqualityBug = (function () {
- if (typeof window == "undefined") return !1;
- for (var k in window)
- try {
- if (
- !excludedKeys["$" + k] &&
- has.call(window, k) &&
- window[k] !== null &&
- typeof window[k] == "object"
- )
- try {
- equalsConstructorPrototype(window[k]);
- } catch {
- return !0;
- }
- } catch {
- return !0;
- }
- return !1;
- })()),
- (equalsConstructorPrototypeIfNotBuggy = function (o) {
- if (typeof window == "undefined" || !hasAutomationEqualityBug)
- return equalsConstructorPrototype(o);
- try {
- return equalsConstructorPrototype(o);
- } catch {
- return !1;
- }
- }),
- (keysShim = function (object) {
- var isObject = object !== null && typeof object == "object",
- isFunction = toStr.call(object) === "[object Function]",
- isArguments = isArgs(object),
- isString = isObject && toStr.call(object) === "[object String]",
- theKeys = [];
- if (!isObject && !isFunction && !isArguments)
- throw new TypeError("Object.keys called on a non-object");
- var skipProto = hasProtoEnumBug && isFunction;
- if (isString && object.length > 0 && !has.call(object, 0))
- for (var i = 0; i < object.length; ++i) theKeys.push(String(i));
- if (isArguments && object.length > 0)
- for (var j = 0; j < object.length; ++j) theKeys.push(String(j));
- else
- for (var name in object)
- !(skipProto && name === "prototype") &&
- has.call(object, name) &&
- theKeys.push(String(name));
- if (hasDontEnumBug)
- for (
- var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object),
- k = 0;
- k < dontEnums.length;
- ++k
- )
- !(skipConstructor && dontEnums[k] === "constructor") &&
- has.call(object, dontEnums[k]) &&
- theKeys.push(dontEnums[k]);
- return theKeys;
- }));
- var has,
- toStr,
- isArgs,
- isEnumerable,
- hasDontEnumBug,
- hasProtoEnumBug,
- dontEnums,
- equalsConstructorPrototype,
- excludedKeys,
- hasAutomationEqualityBug,
- equalsConstructorPrototypeIfNotBuggy;
- module2.exports = keysShim;
- },
-});
-
-// object-keys/index.js
-var require_object_keys = __commonJS({
- "object-keys/index.js"(exports, module2) {
- "use strict";
- var slice = Array.prototype.slice,
- isArgs = require_isArguments(),
- origKeys = Object.keys,
- keysShim = origKeys
- ? function (o) {
- return origKeys(o);
- }
- : require_implementation(),
- originalKeys = Object.keys;
- keysShim.shim = function () {
- if (Object.keys) {
- var keysWorksWithArguments = (function () {
- var args = Object.keys(arguments);
- return args && args.length === arguments.length;
- })(1, 2);
- keysWorksWithArguments ||
- (Object.keys = function (object) {
- return isArgs(object)
- ? originalKeys(slice.call(object))
- : originalKeys(object);
- });
- } else Object.keys = keysShim;
- return Object.keys || keysShim;
- };
- module2.exports = keysShim;
- },
-});
-
-// has-symbols/shams.js
-var require_shams = __commonJS({
- "has-symbols/shams.js"(exports, module2) {
- "use strict";
- module2.exports = function () {
- if (
- typeof Symbol != "function" ||
- typeof Object.getOwnPropertySymbols != "function"
- )
- return !1;
- if (typeof Symbol.iterator == "symbol") return !0;
- var obj = {},
- sym = Symbol("test"),
- symObj = Object(sym);
- if (
- typeof sym == "string" ||
- Object.prototype.toString.call(sym) !== "[object Symbol]" ||
- Object.prototype.toString.call(symObj) !== "[object Symbol]"
- )
- return !1;
- var symVal = 42;
- obj[sym] = symVal;
- for (sym in obj) return !1;
- if (
- (typeof Object.keys == "function" && Object.keys(obj).length !== 0) ||
- (typeof Object.getOwnPropertyNames == "function" &&
- Object.getOwnPropertyNames(obj).length !== 0)
- )
- return !1;
- var syms = Object.getOwnPropertySymbols(obj);
- if (
- syms.length !== 1 ||
- syms[0] !== sym ||
- !Object.prototype.propertyIsEnumerable.call(obj, sym)
- )
- return !1;
- if (typeof Object.getOwnPropertyDescriptor == "function") {
- var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
- if (descriptor.value !== symVal || descriptor.enumerable !== !0)
- return !1;
- }
- return !0;
- };
- },
-});
-
-// has-symbols/index.js
-var require_has_symbols = __commonJS({
- "has-symbols/index.js"(exports, module2) {
- "use strict";
- var origSymbol = typeof Symbol != "undefined" && Symbol,
- hasSymbolSham = require_shams();
- module2.exports = function () {
- return typeof origSymbol != "function" ||
- typeof Symbol != "function" ||
- typeof origSymbol("foo") != "symbol" ||
- typeof Symbol("bar") != "symbol"
- ? !1
- : hasSymbolSham();
- };
- },
-});
-
-// function-bind/implementation.js
-var require_implementation2 = __commonJS({
- "function-bind/implementation.js"(exports, module2) {
- "use strict";
- var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ",
- slice = Array.prototype.slice,
- toStr = Object.prototype.toString,
- funcType = "[object Function]";
- module2.exports = function (that) {
- var target = this;
- if (typeof target != "function" || toStr.call(target) !== funcType)
- throw new TypeError(ERROR_MESSAGE + target);
- for (
- var args = slice.call(arguments, 1),
- bound,
- binder = function () {
- if (this instanceof bound) {
- var result = target.apply(
- this,
- args.concat(slice.call(arguments)),
- );
- return Object(result) === result ? result : this;
- } else
- return target.apply(that, args.concat(slice.call(arguments)));
- },
- boundLength = Math.max(0, target.length - args.length),
- boundArgs = [],
- i = 0;
- i < boundLength;
- i++
- )
- boundArgs.push("$" + i);
- if (
- ((bound = Function(
- "binder",
- "return function (" +
- boundArgs.join(",") +
- "){ return binder.apply(this,arguments); }",
- )(binder)),
- target.prototype)
- ) {
- var Empty = function () {};
- (Empty.prototype = target.prototype),
- (bound.prototype = new Empty()),
- (Empty.prototype = null);
- }
- return bound;
- };
- },
-});
-
-// function-bind/index.js
-var require_function_bind = __commonJS({
- "function-bind/index.js"(exports, module2) {
- "use strict";
- var implementation = require_implementation2();
- module2.exports = Function.prototype.bind || implementation;
- },
-});
-
-// has/src/index.js
-var require_src = __commonJS({
- "has/src/index.js"(exports, module2) {
- "use strict";
- var bind = require_function_bind();
- module2.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);
- },
-});
-
-// get-intrinsic/index.js
-var require_get_intrinsic = __commonJS({
- "get-intrinsic/index.js"(exports, module2) {
- "use strict";
- var undefined2,
- $SyntaxError = SyntaxError,
- $Function = Function,
- $TypeError = TypeError,
- getEvalledConstructor = function (expressionSyntax) {
- try {
- return $Function(
- '"use strict"; return (' + expressionSyntax + ").constructor;",
- )();
- } catch {}
- },
- $gOPD = Object.getOwnPropertyDescriptor;
- if ($gOPD)
- try {
- $gOPD({}, "");
- } catch {
- $gOPD = null;
- }
- var throwTypeError = function () {
- throw new $TypeError();
- },
- ThrowTypeError = $gOPD
- ? (function () {
- try {
- return arguments.callee, throwTypeError;
- } catch {
- try {
- return $gOPD(arguments, "callee").get;
- } catch {
- return throwTypeError;
- }
- }
- })()
- : throwTypeError,
- hasSymbols = require_has_symbols()(),
- getProto =
- Object.getPrototypeOf ||
- function (x) {
- return x.__proto__;
- },
- needsEval = {},
- TypedArray =
- typeof Uint8Array == "undefined" ? undefined2 : getProto(Uint8Array),
- INTRINSICS = {
- "%AggregateError%":
- typeof AggregateError == "undefined" ? undefined2 : AggregateError,
- "%Array%": Array,
- "%ArrayBuffer%":
- typeof ArrayBuffer == "undefined" ? undefined2 : ArrayBuffer,
- "%ArrayIteratorPrototype%": hasSymbols
- ? getProto([][Symbol.iterator]())
- : undefined2,
- "%AsyncFromSyncIteratorPrototype%": undefined2,
- "%AsyncFunction%": needsEval,
- "%AsyncGenerator%": needsEval,
- "%AsyncGeneratorFunction%": needsEval,
- "%AsyncIteratorPrototype%": needsEval,
- "%Atomics%": typeof Atomics == "undefined" ? undefined2 : Atomics,
- "%BigInt%": typeof BigInt == "undefined" ? undefined2 : BigInt,
- "%Boolean%": Boolean,
- "%DataView%": typeof DataView == "undefined" ? undefined2 : DataView,
- "%Date%": Date,
- "%decodeURI%": decodeURI,
- "%decodeURIComponent%": decodeURIComponent,
- "%encodeURI%": encodeURI,
- "%encodeURIComponent%": encodeURIComponent,
- "%Error%": Error,
- "%eval%": eval,
- "%EvalError%": EvalError,
- "%Float32Array%":
- typeof Float32Array == "undefined" ? undefined2 : Float32Array,
- "%Float64Array%":
- typeof Float64Array == "undefined" ? undefined2 : Float64Array,
- "%FinalizationRegistry%":
- typeof FinalizationRegistry == "undefined"
- ? undefined2
- : FinalizationRegistry,
- "%Function%": $Function,
- "%GeneratorFunction%": needsEval,
- "%Int8Array%": typeof Int8Array == "undefined" ? undefined2 : Int8Array,
- "%Int16Array%":
- typeof Int16Array == "undefined" ? undefined2 : Int16Array,
- "%Int32Array%":
- typeof Int32Array == "undefined" ? undefined2 : Int32Array,
- "%isFinite%": isFinite,
- "%isNaN%": isNaN,
- "%IteratorPrototype%": hasSymbols
- ? getProto(getProto([][Symbol.iterator]()))
- : undefined2,
- "%JSON%": typeof JSON == "object" ? JSON : undefined2,
- "%Map%": typeof Map == "undefined" ? undefined2 : Map,
- "%MapIteratorPrototype%":
- typeof Map == "undefined" || !hasSymbols
- ? undefined2
- : getProto(new Map()[Symbol.iterator]()),
- "%Math%": Math,
- "%Number%": Number,
- "%Object%": Object,
- "%parseFloat%": parseFloat,
- "%parseInt%": parseInt,
- "%Promise%": typeof Promise == "undefined" ? undefined2 : Promise,
- "%Proxy%": typeof Proxy == "undefined" ? undefined2 : Proxy,
- "%RangeError%": RangeError,
- "%ReferenceError%": ReferenceError,
- "%Reflect%": typeof Reflect == "undefined" ? undefined2 : Reflect,
- "%RegExp%": RegExp,
- "%Set%": typeof Set == "undefined" ? undefined2 : Set,
- "%SetIteratorPrototype%":
- typeof Set == "undefined" || !hasSymbols
- ? undefined2
- : getProto(new Set()[Symbol.iterator]()),
- "%SharedArrayBuffer%":
- typeof SharedArrayBuffer == "undefined"
- ? undefined2
- : SharedArrayBuffer,
- "%String%": String,
- "%StringIteratorPrototype%": hasSymbols
- ? getProto(""[Symbol.iterator]())
- : undefined2,
- "%Symbol%": hasSymbols ? Symbol : undefined2,
- "%SyntaxError%": $SyntaxError,
- "%ThrowTypeError%": ThrowTypeError,
- "%TypedArray%": TypedArray,
- "%TypeError%": $TypeError,
- "%Uint8Array%":
- typeof Uint8Array == "undefined" ? undefined2 : Uint8Array,
- "%Uint8ClampedArray%":
- typeof Uint8ClampedArray == "undefined"
- ? undefined2
- : Uint8ClampedArray,
- "%Uint16Array%":
- typeof Uint16Array == "undefined" ? undefined2 : Uint16Array,
- "%Uint32Array%":
- typeof Uint32Array == "undefined" ? undefined2 : Uint32Array,
- "%URIError%": URIError,
- "%WeakMap%": typeof WeakMap == "undefined" ? undefined2 : WeakMap,
- "%WeakRef%": typeof WeakRef == "undefined" ? undefined2 : WeakRef,
- "%WeakSet%": typeof WeakSet == "undefined" ? undefined2 : WeakSet,
- },
- doEval = function doEval2(name) {
- var value;
- if (name === "%AsyncFunction%")
- value = getEvalledConstructor("async function () {}");
- else if (name === "%GeneratorFunction%")
- value = getEvalledConstructor("function* () {}");
- else if (name === "%AsyncGeneratorFunction%")
- value = getEvalledConstructor("async function* () {}");
- else if (name === "%AsyncGenerator%") {
- var fn = doEval2("%AsyncGeneratorFunction%");
- fn && (value = fn.prototype);
- } else if (name === "%AsyncIteratorPrototype%") {
- var gen = doEval2("%AsyncGenerator%");
- gen && (value = getProto(gen.prototype));
- }
- return (INTRINSICS[name] = value), value;
- },
- LEGACY_ALIASES = {
- "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
- "%ArrayPrototype%": ["Array", "prototype"],
- "%ArrayProto_entries%": ["Array", "prototype", "entries"],
- "%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
- "%ArrayProto_keys%": ["Array", "prototype", "keys"],
- "%ArrayProto_values%": ["Array", "prototype", "values"],
- "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
- "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
- "%AsyncGeneratorPrototype%": [
- "AsyncGeneratorFunction",
- "prototype",
- "prototype",
- ],
- "%BooleanPrototype%": ["Boolean", "prototype"],
- "%DataViewPrototype%": ["DataView", "prototype"],
- "%DatePrototype%": ["Date", "prototype"],
- "%ErrorPrototype%": ["Error", "prototype"],
- "%EvalErrorPrototype%": ["EvalError", "prototype"],
- "%Float32ArrayPrototype%": ["Float32Array", "prototype"],
- "%Float64ArrayPrototype%": ["Float64Array", "prototype"],
- "%FunctionPrototype%": ["Function", "prototype"],
- "%Generator%": ["GeneratorFunction", "prototype"],
- "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
- "%Int8ArrayPrototype%": ["Int8Array", "prototype"],
- "%Int16ArrayPrototype%": ["Int16Array", "prototype"],
- "%Int32ArrayPrototype%": ["Int32Array", "prototype"],
- "%JSONParse%": ["JSON", "parse"],
- "%JSONStringify%": ["JSON", "stringify"],
- "%MapPrototype%": ["Map", "prototype"],
- "%NumberPrototype%": ["Number", "prototype"],
- "%ObjectPrototype%": ["Object", "prototype"],
- "%ObjProto_toString%": ["Object", "prototype", "toString"],
- "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
- "%PromisePrototype%": ["Promise", "prototype"],
- "%PromiseProto_then%": ["Promise", "prototype", "then"],
- "%Promise_all%": ["Promise", "all"],
- "%Promise_reject%": ["Promise", "reject"],
- "%Promise_resolve%": ["Promise", "resolve"],
- "%RangeErrorPrototype%": ["RangeError", "prototype"],
- "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
- "%RegExpPrototype%": ["RegExp", "prototype"],
- "%SetPrototype%": ["Set", "prototype"],
- "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
- "%StringPrototype%": ["String", "prototype"],
- "%SymbolPrototype%": ["Symbol", "prototype"],
- "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
- "%TypedArrayPrototype%": ["TypedArray", "prototype"],
- "%TypeErrorPrototype%": ["TypeError", "prototype"],
- "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
- "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
- "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
- "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
- "%URIErrorPrototype%": ["URIError", "prototype"],
- "%WeakMapPrototype%": ["WeakMap", "prototype"],
- "%WeakSetPrototype%": ["WeakSet", "prototype"],
- },
- bind = require_function_bind(),
- hasOwn = require_src(),
- $concat = bind.call(Function.call, Array.prototype.concat),
- $spliceApply = bind.call(Function.apply, Array.prototype.splice),
- $replace = bind.call(Function.call, String.prototype.replace),
- $strSlice = bind.call(Function.call, String.prototype.slice),
- $exec = bind.call(Function.call, RegExp.prototype.exec),
- rePropName =
- /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,
- reEscapeChar = /\\(\\)?/g,
- stringToPath = function (string) {
- var first = $strSlice(string, 0, 1),
- last = $strSlice(string, -1);
- if (first === "%" && last !== "%")
- throw new $SyntaxError(
- "invalid intrinsic syntax, expected closing `%`",
- );
- if (last === "%" && first !== "%")
- throw new $SyntaxError(
- "invalid intrinsic syntax, expected opening `%`",
- );
- var result = [];
- return (
- $replace(
- string,
- rePropName,
- function (match, number, quote, subString) {
- result[result.length] = quote
- ? $replace(subString, reEscapeChar, "$1")
- : number || match;
- },
- ),
- result
- );
- },
- getBaseIntrinsic = function (name, allowMissing) {
- var intrinsicName = name,
- alias;
- if (
- (hasOwn(LEGACY_ALIASES, intrinsicName) &&
- ((alias = LEGACY_ALIASES[intrinsicName]),
- (intrinsicName = "%" + alias[0] + "%")),
- hasOwn(INTRINSICS, intrinsicName))
- ) {
- var value = INTRINSICS[intrinsicName];
- if (
- (value === needsEval && (value = doEval(intrinsicName)),
- typeof value == "undefined" && !allowMissing)
- )
- throw new $TypeError(
- "intrinsic " +
- name +
- " exists, but is not available. Please file an issue!",
- );
- return {
- alias,
- name: intrinsicName,
- value,
- };
- }
- throw new $SyntaxError("intrinsic " + name + " does not exist!");
- };
- module2.exports = function (name, allowMissing) {
- if (typeof name != "string" || name.length === 0)
- throw new $TypeError("intrinsic name must be a non-empty string");
- if (arguments.length > 1 && typeof allowMissing != "boolean")
- throw new $TypeError('"allowMissing" argument must be a boolean');
- if ($exec(/^%?[^%]*%?$/g, name) === null)
- throw new $SyntaxError(
- "`%` may not be present anywhere but at the beginning and end of the intrinsic name",
- );
- var parts = stringToPath(name),
- intrinsicBaseName = parts.length > 0 ? parts[0] : "",
- intrinsic = getBaseIntrinsic(
- "%" + intrinsicBaseName + "%",
- allowMissing,
- ),
- intrinsicRealName = intrinsic.name,
- value = intrinsic.value,
- skipFurtherCaching = !1,
- alias = intrinsic.alias;
- alias &&
- ((intrinsicBaseName = alias[0]),
- $spliceApply(parts, $concat([0, 1], alias)));
- for (var i = 1, isOwn = !0; i < parts.length; i += 1) {
- var part = parts[i],
- first = $strSlice(part, 0, 1),
- last = $strSlice(part, -1);
- if (
- (first === '"' ||
- first === "'" ||
- first === "`" ||
- last === '"' ||
- last === "'" ||
- last === "`") &&
- first !== last
- )
- throw new $SyntaxError(
- "property names with quotes must have matching quotes",
- );
- if (
- ((part === "constructor" || !isOwn) && (skipFurtherCaching = !0),
- (intrinsicBaseName += "." + part),
- (intrinsicRealName = "%" + intrinsicBaseName + "%"),
- hasOwn(INTRINSICS, intrinsicRealName))
- )
- value = INTRINSICS[intrinsicRealName];
- else if (value != null) {
- if (!(part in value)) {
- if (!allowMissing)
- throw new $TypeError(
- "base intrinsic for " +
- name +
- " exists, but the property is not available.",
- );
- return;
- }
- if ($gOPD && i + 1 >= parts.length) {
- var desc = $gOPD(value, part);
- (isOwn = !!desc),
- isOwn && "get" in desc && !("originalValue" in desc.get)
- ? (value = desc.get)
- : (value = value[part]);
- } else (isOwn = hasOwn(value, part)), (value = value[part]);
- isOwn &&
- !skipFurtherCaching &&
- (INTRINSICS[intrinsicRealName] = value);
- }
- }
- return value;
- };
- },
-});
-
-// has-property-descriptors/index.js
-var require_has_property_descriptors = __commonJS({
- "has-property-descriptors/index.js"(exports, module2) {
- "use strict";
- var GetIntrinsic = require_get_intrinsic(),
- $defineProperty = GetIntrinsic("%Object.defineProperty%", !0),
- hasPropertyDescriptors = function () {
- if ($defineProperty)
- try {
- return $defineProperty({}, "a", { value: 1 }), !0;
- } catch {
- return !1;
- }
- return !1;
- };
- hasPropertyDescriptors.hasArrayLengthDefineBug = function () {
- if (!hasPropertyDescriptors()) return null;
- try {
- return $defineProperty([], "length", { value: 1 }).length !== 1;
- } catch {
- return !0;
- }
- };
- module2.exports = hasPropertyDescriptors;
- },
-});
-
-// define-properties/index.js
-var require_define_properties = __commonJS({
- "define-properties/index.js"(exports, module2) {
- "use strict";
- var keys = require_object_keys(),
- hasSymbols =
- typeof Symbol == "function" && typeof Symbol("foo") == "symbol",
- toStr = Object.prototype.toString,
- concat = Array.prototype.concat,
- origDefineProperty = Object.defineProperty,
- isFunction = function (fn) {
- return (
- typeof fn == "function" && toStr.call(fn) === "[object Function]"
- );
- },
- hasPropertyDescriptors = require_has_property_descriptors()(),
- supportsDescriptors = origDefineProperty && hasPropertyDescriptors,
- defineProperty = function (object, name, value, predicate) {
- (name in object && (!isFunction(predicate) || !predicate())) ||
- (supportsDescriptors
- ? origDefineProperty(object, name, {
- configurable: !0,
- enumerable: !1,
- value,
- writable: !0,
- })
- : (object[name] = value));
- },
- defineProperties = function (object, map) {
- var predicates = arguments.length > 2 ? arguments[2] : {},
- props = keys(map);
- hasSymbols &&
- (props = concat.call(props, Object.getOwnPropertySymbols(map)));
- for (var i = 0; i < props.length; i += 1)
- defineProperty(object, props[i], map[props[i]], predicates[props[i]]);
- };
- defineProperties.supportsDescriptors = !!supportsDescriptors;
- module2.exports = defineProperties;
- },
-});
-
-// call-bind/index.js
-var require_call_bind = __commonJS({
- "call-bind/index.js"(exports, module2) {
- "use strict";
- var bind = require_function_bind(),
- GetIntrinsic = require_get_intrinsic(),
- $apply = GetIntrinsic("%Function.prototype.apply%"),
- $call = GetIntrinsic("%Function.prototype.call%"),
- $reflectApply =
- GetIntrinsic("%Reflect.apply%", !0) || bind.call($call, $apply),
- $gOPD = GetIntrinsic("%Object.getOwnPropertyDescriptor%", !0),
- $defineProperty = GetIntrinsic("%Object.defineProperty%", !0),
- $max = GetIntrinsic("%Math.max%");
- if ($defineProperty)
- try {
- $defineProperty({}, "a", { value: 1 });
- } catch {
- $defineProperty = null;
- }
- module2.exports = function (originalFunction) {
- var func = $reflectApply(bind, $call, arguments);
- if ($gOPD && $defineProperty) {
- var desc = $gOPD(func, "length");
- desc.configurable &&
- $defineProperty(func, "length", {
- value:
- 1 + $max(0, originalFunction.length - (arguments.length - 1)),
- });
- }
- return func;
- };
- var applyBind = function () {
- return $reflectApply(bind, $apply, arguments);
- };
- $defineProperty
- ? $defineProperty(module2.exports, "apply", { value: applyBind })
- : (module2.exports.apply = applyBind);
- },
-});
-
-// object-is/implementation.js
-var require_implementation3 = __commonJS({
- "object-is/implementation.js"(exports, module2) {
- "use strict";
- var numberIsNaN = function (value) {
- return value !== value;
- };
- module2.exports = function (a, b) {
- return a === 0 && b === 0
- ? 1 / a == 1 / b
- : !!(a === b || (numberIsNaN(a) && numberIsNaN(b)));
- };
- },
-});
-
-// object-is/polyfill.js
-var require_polyfill = __commonJS({
- "object-is/polyfill.js"(exports, module2) {
- "use strict";
- var implementation = require_implementation3();
- module2.exports = function () {
- return typeof Object.is == "function" ? Object.is : implementation;
- };
- },
-});
-
-// object-is/shim.js
-var require_shim = __commonJS({
- "object-is/shim.js"(exports, module2) {
- "use strict";
- var getPolyfill = require_polyfill(),
- define = require_define_properties();
- module2.exports = function () {
- var polyfill = getPolyfill();
- return (
- define(
- Object,
- { is: polyfill },
- {
- is: function () {
- return Object.is !== polyfill;
- },
- },
- ),
- polyfill
- );
- };
- },
-});
-
-// object-is/index.js
-var require_object_is = __commonJS({
- "object-is/index.js"(exports, module2) {
- "use strict";
- var define = require_define_properties(),
- callBind = require_call_bind(),
- implementation = require_implementation3(),
- getPolyfill = require_polyfill(),
- shim = require_shim(),
- polyfill = callBind(getPolyfill(), Object);
- define(polyfill, {
- getPolyfill,
- implementation,
- shim,
- });
- module2.exports = polyfill;
- },
-});
-
-// is-nan/implementation.js
-var require_implementation4 = __commonJS({
- "is-nan/implementation.js"(exports, module2) {
- "use strict";
- module2.exports = function (value) {
- return value !== value;
- };
- },
-});
-
-// is-nan/polyfill.js
-var require_polyfill2 = __commonJS({
- "is-nan/polyfill.js"(exports, module2) {
- "use strict";
- var implementation = require_implementation4();
- module2.exports = function () {
- return Number.isNaN && Number.isNaN(NaN) && !Number.isNaN("a")
- ? Number.isNaN
- : implementation;
- };
- },
-});
-
-// is-nan/shim.js
-var require_shim2 = __commonJS({
- "is-nan/shim.js"(exports, module2) {
- "use strict";
- var define = require_define_properties(),
- getPolyfill = require_polyfill2();
- module2.exports = function () {
- var polyfill = getPolyfill();
- return (
- define(
- Number,
- { isNaN: polyfill },
- {
- isNaN: function () {
- return Number.isNaN !== polyfill;
- },
- },
- ),
- polyfill
- );
- };
- },
-});
-
-// is-nan/index.js
-var require_is_nan = __commonJS({
- "is-nan/index.js"(exports, module2) {
- "use strict";
- var callBind = require_call_bind(),
- define = require_define_properties(),
- implementation = require_implementation4(),
- getPolyfill = require_polyfill2(),
- shim = require_shim2(),
- polyfill = callBind(getPolyfill(), Number);
- define(polyfill, {
- getPolyfill,
- implementation,
- shim,
- });
- module2.exports = polyfill;
- },
-});
-
-// assert/build/internal/util/comparisons.js
-var require_comparisons = __commonJS({
- "assert/build/internal/util/comparisons.js"(exports, module2) {
- "use strict";
- function _slicedToArray(arr, i) {
- return (
- _arrayWithHoles(arr) ||
- _iterableToArrayLimit(arr, i) ||
- _nonIterableRest()
- );
- }
- function _nonIterableRest() {
- throw new TypeError(
- "Invalid attempt to destructure non-iterable instance",
- );
- }
- function _iterableToArrayLimit(arr, i) {
- var _arr = [],
- _n = !0,
- _d = !1,
- _e = void 0;
- try {
- for (
- var _i = arr[Symbol.iterator](), _s;
- !(_n = (_s = _i.next()).done) &&
- (_arr.push(_s.value), !(i && _arr.length === i));
- _n = !0
- );
- } catch (err) {
- (_d = !0), (_e = err);
- } finally {
- try {
- !_n && _i.return != null && _i.return();
- } finally {
- if (_d) throw _e;
- }
- }
- return _arr;
- }
- function _arrayWithHoles(arr) {
- if (Array.isArray(arr)) return arr;
- }
- function _typeof(obj) {
- return (
- typeof Symbol == "function" && typeof Symbol.iterator == "symbol"
- ? (_typeof = function (obj2) {
- return typeof obj2;
- })
- : (_typeof = function (obj2) {
- return obj2 &&
- typeof Symbol == "function" &&
- obj2.constructor === Symbol &&
- obj2 !== Symbol.prototype
- ? "symbol"
- : typeof obj2;
- }),
- _typeof(obj)
- );
- }
- var regexFlagsSupported = /a/g.flags !== void 0,
- arrayFromSet = function (set) {
- var array = [];
- return (
- set.forEach(function (value) {
- return array.push(value);
- }),
- array
- );
- },
- arrayFromMap = function (map) {
- var array = [];
- return (
- map.forEach(function (value, key) {
- return array.push([key, value]);
- }),
- array
- );
- },
- objectIs = Object.is ? Object.is : require_object_is(),
- objectGetOwnPropertySymbols = Object.getOwnPropertySymbols
- ? Object.getOwnPropertySymbols
- : function () {
- return [];
- },
- numberIsNaN = Number.isNaN ? Number.isNaN : require_is_nan();
- function uncurryThis(f) {
- return f.call.bind(f);
- }
- var hasOwnProperty = uncurryThis(Object.prototype.hasOwnProperty),
- propertyIsEnumerable = uncurryThis(Object.prototype.propertyIsEnumerable),
- objectToString = uncurryThis(Object.prototype.toString),
- _require$types = require("util").types,
- isAnyArrayBuffer = _require$types.isAnyArrayBuffer,
- isArrayBufferView = _require$types.isArrayBufferView,
- isDate = _require$types.isDate,
- isMap = _require$types.isMap,
- isRegExp = _require$types.isRegExp,
- isSet = _require$types.isSet,
- isNativeError = _require$types.isNativeError,
- isBoxedPrimitive = _require$types.isBoxedPrimitive,
- isNumberObject = _require$types.isNumberObject,
- isStringObject = _require$types.isStringObject,
- isBooleanObject = _require$types.isBooleanObject,
- isBigIntObject = _require$types.isBigIntObject,
- isSymbolObject = _require$types.isSymbolObject,
- isFloat32Array = _require$types.isFloat32Array,
- isFloat64Array = _require$types.isFloat64Array;
- function isNonIndex(key) {
- if (key.length === 0 || key.length > 10) return !0;
- for (var i = 0; i < key.length; i++) {
- var code = key.charCodeAt(i);
- if (code < 48 || code > 57) return !0;
- }
- return key.length === 10 && key >= Math.pow(2, 32);
- }
- function getOwnNonIndexProperties(value) {
- return Object.keys(value)
- .filter(isNonIndex)
- .concat(
- objectGetOwnPropertySymbols(value).filter(
- Object.prototype.propertyIsEnumerable.bind(value),
- ),
- );
- }
- function compare(a, b) {
- if (a === b) return 0;
- for (
- var x = a.length, y = b.length, i = 0, len = Math.min(x, y);
- i < len;
- ++i
- )
- if (a[i] !== b[i]) {
- (x = a[i]), (y = b[i]);
- break;
- }
- return x < y ? -1 : y < x ? 1 : 0;
- }
- var ONLY_ENUMERABLE = void 0,
- kStrict = !0,
- kLoose = !1,
- kNoIterator = 0,
- kIsArray = 1,
- kIsSet = 2,
- kIsMap = 3;
- function areSimilarRegExps(a, b) {
- return regexFlagsSupported
- ? a.source === b.source && a.flags === b.flags
- : RegExp.prototype.toString.call(a) ===
- RegExp.prototype.toString.call(b);
- }
- function areSimilarFloatArrays(a, b) {
- if (a.byteLength !== b.byteLength) return !1;
- for (var offset = 0; offset < a.byteLength; offset++)
- if (a[offset] !== b[offset]) return !1;
- return !0;
- }
- function areSimilarTypedArrays(a, b) {
- return a.byteLength !== b.byteLength
- ? !1
- : compare(
- new Uint8Array(a.buffer, a.byteOffset, a.byteLength),
- new Uint8Array(b.buffer, b.byteOffset, b.byteLength),
- ) === 0;
- }
- function areEqualArrayBuffers(buf1, buf2) {
- return (
- buf1.byteLength === buf2.byteLength &&
- compare(new Uint8Array(buf1), new Uint8Array(buf2)) === 0
- );
- }
- function isEqualBoxedPrimitive(val1, val2) {
- return isNumberObject(val1)
- ? isNumberObject(val2) &&
- objectIs(
- Number.prototype.valueOf.call(val1),
- Number.prototype.valueOf.call(val2),
- )
- : isStringObject(val1)
- ? isStringObject(val2) &&
- String.prototype.valueOf.call(val1) ===
- String.prototype.valueOf.call(val2)
- : isBooleanObject(val1)
- ? isBooleanObject(val2) &&
- Boolean.prototype.valueOf.call(val1) ===
- Boolean.prototype.valueOf.call(val2)
- : isBigIntObject(val1)
- ? isBigIntObject(val2) &&
- BigInt.prototype.valueOf.call(val1) ===
- BigInt.prototype.valueOf.call(val2)
- : isSymbolObject(val2) &&
- Symbol.prototype.valueOf.call(val1) ===
- Symbol.prototype.valueOf.call(val2);
- }
- function innerDeepEqual(val1, val2, strict, memos) {
- if (val1 === val2)
- return val1 !== 0 ? !0 : strict ? objectIs(val1, val2) : !0;
- if (strict) {
- if (_typeof(val1) !== "object")
- return (
- typeof val1 == "number" && numberIsNaN(val1) && numberIsNaN(val2)
- );
- if (
- _typeof(val2) !== "object" ||
- val1 === null ||
- val2 === null ||
- Object.getPrototypeOf(val1) !== Object.getPrototypeOf(val2)
- )
- return !1;
- } else {
- if (val1 === null || _typeof(val1) !== "object")
- return val2 === null || _typeof(val2) !== "object"
- ? val1 == val2
- : !1;
- if (val2 === null || _typeof(val2) !== "object") return !1;
- }
- var val1Tag = objectToString(val1),
- val2Tag = objectToString(val2);
- if (val1Tag !== val2Tag) return !1;
- if (Array.isArray(val1)) {
- if (val1.length !== val2.length) return !1;
- var keys1 = getOwnNonIndexProperties(val1, ONLY_ENUMERABLE),
- keys2 = getOwnNonIndexProperties(val2, ONLY_ENUMERABLE);
- return keys1.length !== keys2.length
- ? !1
- : keyCheck(val1, val2, strict, memos, kIsArray, keys1);
- }
- if (
- val1Tag === "[object Object]" &&
- ((!isMap(val1) && isMap(val2)) || (!isSet(val1) && isSet(val2)))
- )
- return !1;
- if (isDate(val1)) {
- if (
- !isDate(val2) ||
- Date.prototype.getTime.call(val1) !==
- Date.prototype.getTime.call(val2)
- )
- return !1;
- } else if (isRegExp(val1)) {
- if (!isRegExp(val2) || !areSimilarRegExps(val1, val2)) return !1;
- } else if (isNativeError(val1) || val1 instanceof Error) {
- if (val1.message !== val2.message || val1.name !== val2.name) return !1;
- } else if (isArrayBufferView(val1)) {
- if (!strict && (isFloat32Array(val1) || isFloat64Array(val1))) {
- if (!areSimilarFloatArrays(val1, val2)) return !1;
- } else if (!areSimilarTypedArrays(val1, val2)) return !1;
- var _keys = getOwnNonIndexProperties(val1, ONLY_ENUMERABLE),
- _keys2 = getOwnNonIndexProperties(val2, ONLY_ENUMERABLE);
- return _keys.length !== _keys2.length
- ? !1
- : keyCheck(val1, val2, strict, memos, kNoIterator, _keys);
- } else {
- if (isSet(val1))
- return !isSet(val2) || val1.size !== val2.size
- ? !1
- : keyCheck(val1, val2, strict, memos, kIsSet);
- if (isMap(val1))
- return !isMap(val2) || val1.size !== val2.size
- ? !1
- : keyCheck(val1, val2, strict, memos, kIsMap);
- if (isAnyArrayBuffer(val1)) {
- if (!areEqualArrayBuffers(val1, val2)) return !1;
- } else if (isBoxedPrimitive(val1) && !isEqualBoxedPrimitive(val1, val2))
- return !1;
- }
- return keyCheck(val1, val2, strict, memos, kNoIterator);
- }
- function getEnumerables(val, keys) {
- return keys.filter(function (k) {
- return propertyIsEnumerable(val, k);
- });
- }
- function keyCheck(val1, val2, strict, memos, iterationType, aKeys) {
- if (arguments.length === 5) {
- aKeys = Object.keys(val1);
- var bKeys = Object.keys(val2);
- if (aKeys.length !== bKeys.length) return !1;
- }
- for (var i = 0; i < aKeys.length; i++)
- if (!hasOwnProperty(val2, aKeys[i])) return !1;
- if (strict && arguments.length === 5) {
- var symbolKeysA = objectGetOwnPropertySymbols(val1);
- if (symbolKeysA.length !== 0) {
- var count = 0;
- for (i = 0; i < symbolKeysA.length; i++) {
- var key = symbolKeysA[i];
- if (propertyIsEnumerable(val1, key)) {
- if (!propertyIsEnumerable(val2, key)) return !1;
- aKeys.push(key), count++;
- } else if (propertyIsEnumerable(val2, key)) return !1;
- }
- var symbolKeysB = objectGetOwnPropertySymbols(val2);
- if (
- symbolKeysA.length !== symbolKeysB.length &&
- getEnumerables(val2, symbolKeysB).length !== count
- )
- return !1;
- } else {
- var _symbolKeysB = objectGetOwnPropertySymbols(val2);
- if (
- _symbolKeysB.length !== 0 &&
- getEnumerables(val2, _symbolKeysB).length !== 0
- )
- return !1;
- }
- }
- if (
- aKeys.length === 0 &&
- (iterationType === kNoIterator ||
- (iterationType === kIsArray && val1.length === 0) ||
- val1.size === 0)
- )
- return !0;
- if (memos === void 0)
- memos = {
- val1: new Map(),
- val2: new Map(),
- position: 0,
- };
- else {
- var val2MemoA = memos.val1.get(val1);
- if (val2MemoA !== void 0) {
- var val2MemoB = memos.val2.get(val2);
- if (val2MemoB !== void 0) return val2MemoA === val2MemoB;
- }
- memos.position++;
- }
- memos.val1.set(val1, memos.position),
- memos.val2.set(val2, memos.position);
- var areEq = objEquiv(val1, val2, strict, aKeys, memos, iterationType);
- return memos.val1.delete(val1), memos.val2.delete(val2), areEq;
- }
- function setHasEqualElement(set, val1, strict, memo) {
- for (
- var setValues = arrayFromSet(set), i = 0;
- i < setValues.length;
- i++
- ) {
- var val2 = setValues[i];
- if (innerDeepEqual(val1, val2, strict, memo))
- return set.delete(val2), !0;
- }
- return !1;
- }
- function findLooseMatchingPrimitives(prim) {
- switch (_typeof(prim)) {
- case "undefined":
- return null;
- case "object":
- return;
- case "symbol":
- return !1;
- case "string":
- prim = +prim;
- case "number":
- if (numberIsNaN(prim)) return !1;
- }
- return !0;
- }
- function setMightHaveLoosePrim(a, b, prim) {
- var altValue = findLooseMatchingPrimitives(prim);
- return altValue ?? (b.has(altValue) && !a.has(altValue));
- }
- function mapMightHaveLoosePrim(a, b, prim, item, memo) {
- var altValue = findLooseMatchingPrimitives(prim);
- if (altValue != null) return altValue;
- var curB = b.get(altValue);
- return (curB === void 0 && !b.has(altValue)) ||
- !innerDeepEqual(item, curB, !1, memo)
- ? !1
- : !a.has(altValue) && innerDeepEqual(item, curB, !1, memo);
- }
- function setEquiv(a, b, strict, memo) {
- for (
- var set = null, aValues = arrayFromSet(a), i = 0;
- i < aValues.length;
- i++
- ) {
- var val = aValues[i];
- if (_typeof(val) === "object" && val !== null)
- set === null && (set = new Set()), set.add(val);
- else if (!b.has(val)) {
- if (strict || !setMightHaveLoosePrim(a, b, val)) return !1;
- set === null && (set = new Set()), set.add(val);
- }
- }
- if (set !== null) {
- for (var bValues = arrayFromSet(b), _i = 0; _i < bValues.length; _i++) {
- var _val = bValues[_i];
- if (_typeof(_val) === "object" && _val !== null) {
- if (!setHasEqualElement(set, _val, strict, memo)) return !1;
- } else if (
- !strict &&
- !a.has(_val) &&
- !setHasEqualElement(set, _val, strict, memo)
- )
- return !1;
- }
- return set.size === 0;
- }
- return !0;
- }
- function mapHasEqualEntry(set, map, key1, item1, strict, memo) {
- for (
- var setValues = arrayFromSet(set), i = 0;
- i < setValues.length;
- i++
- ) {
- var key2 = setValues[i];
- if (
- innerDeepEqual(key1, key2, strict, memo) &&
- innerDeepEqual(item1, map.get(key2), strict, memo)
- )
- return set.delete(key2), !0;
- }
- return !1;
- }
- function mapEquiv(a, b, strict, memo) {
- for (
- var set = null, aEntries = arrayFromMap(a), i = 0;
- i < aEntries.length;
- i++
- ) {
- var _aEntries$i = _slicedToArray(aEntries[i], 2),
- key = _aEntries$i[0],
- item1 = _aEntries$i[1];
- if (_typeof(key) === "object" && key !== null)
- set === null && (set = new Set()), set.add(key);
- else {
- var item2 = b.get(key);
- if (
- (item2 === void 0 && !b.has(key)) ||
- !innerDeepEqual(item1, item2, strict, memo)
- ) {
- if (strict || !mapMightHaveLoosePrim(a, b, key, item1, memo))
- return !1;
- set === null && (set = new Set()), set.add(key);
- }
- }
- }
- if (set !== null) {
- for (
- var bEntries = arrayFromMap(b), _i2 = 0;
- _i2 < bEntries.length;
- _i2++
- ) {
- var _bEntries$_i = _slicedToArray(bEntries[_i2], 2),
- key = _bEntries$_i[0],
- item = _bEntries$_i[1];
- if (_typeof(key) === "object" && key !== null) {
- if (!mapHasEqualEntry(set, a, key, item, strict, memo)) return !1;
- } else if (
- !strict &&
- (!a.has(key) || !innerDeepEqual(a.get(key), item, !1, memo)) &&
- !mapHasEqualEntry(set, a, key, item, !1, memo)
- )
- return !1;
- }
- return set.size === 0;
- }
- return !0;
- }
- function objEquiv(a, b, strict, keys, memos, iterationType) {
- var i = 0;
- if (iterationType === kIsSet) {
- if (!setEquiv(a, b, strict, memos)) return !1;
- } else if (iterationType === kIsMap) {
- if (!mapEquiv(a, b, strict, memos)) return !1;
- } else if (iterationType === kIsArray)
- for (; i < a.length; i++)
- if (hasOwnProperty(a, i)) {
- if (
- !hasOwnProperty(b, i) ||
- !innerDeepEqual(a[i], b[i], strict, memos)
- )
- return !1;
- } else {
- if (hasOwnProperty(b, i)) return !1;
- for (var keysA = Object.keys(a); i < keysA.length; i++) {
- var key = keysA[i];
- if (
- !hasOwnProperty(b, key) ||
- !innerDeepEqual(a[key], b[key], strict, memos)
- )
- return !1;
- }
- return keysA.length === Object.keys(b).length;
- }
- for (i = 0; i < keys.length; i++) {
- var _key = keys[i];
- if (!innerDeepEqual(a[_key], b[_key], strict, memos)) return !1;
- }
- return !0;
- }
- function isDeepEqual(val1, val2) {
- return innerDeepEqual(val1, val2, kLoose);
- }
- function isDeepStrictEqual(val1, val2) {
- return innerDeepEqual(val1, val2, kStrict);
- }
- module2.exports = {
- isDeepEqual,
- isDeepStrictEqual,
- };
- },
-});
-
// assert/build/assert.js
var require_assert = __commonJS({
"assert/build/assert.js"(exports, module2) {
@@ -2469,18 +1017,10 @@ var require_assert = __commonJS({
_require$types = require("util").types,
isPromise = _require$types.isPromise,
isRegExp = _require$types.isRegExp,
- objectAssign = Object.assign
- ? Object.assign
- : require_es6_object_assign().assign,
- objectIs = Object.is ? Object.is : require_object_is(),
- errorCache = new Map(),
- isDeepEqual,
- isDeepStrictEqual;
- function lazyLoadComparison() {
- var comparison = require_comparisons();
- (isDeepEqual = comparison.isDeepEqual),
- (isDeepStrictEqual = comparison.isDeepStrictEqual);
- }
+ objectAssign = Object.assign,
+ objectIs = Object.is,
+ errorCache = new Map();
+
var warned = !1,
assert = (module2.exports = ok),
NO_EXCEPTION_SENTINEL = {};
@@ -2579,28 +1119,26 @@ var require_assert = __commonJS({
assert.deepEqual = function deepEqual(actual, expected, message) {
if (arguments.length < 2)
throw new ERR_MISSING_ARGS("actual", "expected");
- isDeepEqual === void 0 && lazyLoadComparison(),
- isDeepEqual(actual, expected) ||
- innerFail({
- actual,
- expected,
- message,
- operator: "deepEqual",
- stackStartFn: deepEqual,
- });
+ isDeepEqual(actual, expected, false) ||
+ innerFail({
+ actual,
+ expected,
+ message,
+ operator: "deepEqual",
+ stackStartFn: deepEqual,
+ });
};
assert.notDeepEqual = function notDeepEqual(actual, expected, message) {
if (arguments.length < 2)
throw new ERR_MISSING_ARGS("actual", "expected");
- isDeepEqual === void 0 && lazyLoadComparison(),
- isDeepEqual(actual, expected) &&
- innerFail({
- actual,
- expected,
- message,
- operator: "notDeepEqual",
- stackStartFn: notDeepEqual,
- });
+ isDeepEqual(actual, expected, false) &&
+ innerFail({
+ actual,
+ expected,
+ message,
+ operator: "notDeepEqual",
+ stackStartFn: notDeepEqual,
+ });
};
assert.deepStrictEqual = function deepStrictEqual(
actual,
@@ -2609,29 +1147,29 @@ var require_assert = __commonJS({
) {
if (arguments.length < 2)
throw new ERR_MISSING_ARGS("actual", "expected");
- isDeepEqual === void 0 && lazyLoadComparison(),
- isDeepStrictEqual(actual, expected) ||
- innerFail({
- actual,
- expected,
- message,
- operator: "deepStrictEqual",
- stackStartFn: deepStrictEqual,
- });
+
+ isDeepEqual(actual, expected, true) ||
+ innerFail({
+ actual,
+ expected,
+ message,
+ operator: "deepStrictEqual",
+ stackStartFn: deepStrictEqual,
+ });
};
assert.notDeepStrictEqual = notDeepStrictEqual;
function notDeepStrictEqual(actual, expected, message) {
if (arguments.length < 2)
throw new ERR_MISSING_ARGS("actual", "expected");
- isDeepEqual === void 0 && lazyLoadComparison(),
- isDeepStrictEqual(actual, expected) &&
- innerFail({
- actual,
- expected,
- message,
- operator: "notDeepStrictEqual",
- stackStartFn: notDeepStrictEqual,
- });
+
+ isDeepEqual(actual, expected, true) &&
+ innerFail({
+ actual,
+ expected,
+ message,
+ operator: "notDeepStrictEqual",
+ stackStartFn: notDeepStrictEqual,
+ });
}
assert.strictEqual = function strictEqual(actual, expected, message) {
if (arguments.length < 2)
@@ -2671,7 +1209,7 @@ var require_assert = __commonJS({
});
};
function compareExceptionKey(actual, expected, key, message, keys, fn) {
- if (!(key in actual) || !isDeepStrictEqual(actual[key], expected[key])) {
+ if (!(key in actual) || !isDeepEqual(actual[key], expected[key], true)) {
if (!message) {
var a = new Comparison(actual, keys),
b = new Comparison(expected, keys, actual),
@@ -2725,7 +1263,6 @@ var require_assert = __commonJS({
"may not be an empty object",
);
return (
- isDeepEqual === void 0 && lazyLoadComparison(),
keys.forEach(function (key) {
(typeof actual[key] == "string" &&
isRegExp(expected[key]) &&