@kasperpeulen/vitest-plugin-nextjs 0.0.0-stage → 0.1.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +249 -2
- package/dist/_virtual/_rolldown/runtime.js +14 -0
- package/dist/action-ids.d.ts +18 -0
- package/dist/action-ids.js +44 -0
- package/dist/adapter.d.ts +8 -0
- package/dist/adapter.js +12 -0
- package/dist/app-requests.d.ts +63 -0
- package/dist/app-requests.js +253 -0
- package/dist/browser-context.d.ts +24 -0
- package/dist/browser-context.js +157 -0
- package/dist/build-output.d.ts +68 -0
- package/dist/build-output.js +216 -0
- package/dist/build.d.ts +26 -0
- package/dist/build.js +39 -0
- package/dist/built-files.d.ts +9 -0
- package/dist/built-files.js +22 -0
- package/dist/cache.d.ts +44 -0
- package/dist/cache.js +99 -0
- package/dist/client-components.d.ts +3 -0
- package/dist/client-components.js +4 -0
- package/dist/client-file-key.d.ts +5 -0
- package/dist/client-file-key.js +5 -0
- package/dist/client-files.d.ts +83 -0
- package/dist/client-files.js +186 -0
- package/dist/client-graph.d.ts +94 -0
- package/dist/client-graph.js +266 -0
- package/dist/client-modules.d.ts +10 -0
- package/dist/client-modules.js +43 -0
- package/dist/client.d.ts +42 -0
- package/dist/client.js +263 -0
- package/dist/commonjs.d.ts +44 -0
- package/dist/commonjs.js +111 -0
- package/dist/compat/browser/client.d.ts +19 -0
- package/dist/compat/browser/client.js +13 -0
- package/dist/compat/build.d.ts +145 -0
- package/dist/compat/build.js +149 -0
- package/dist/compat/checks.d.ts +16 -0
- package/dist/compat/checks.js +148 -0
- package/dist/compat/patches.d.ts +13 -0
- package/dist/compat/patches.js +30 -0
- package/dist/compat/paths.d.ts +74 -0
- package/dist/compat/paths.js +160 -0
- package/dist/compat/rsc/handlers.d.ts +2 -0
- package/dist/compat/rsc/handlers.js +2 -0
- package/dist/compat/rsc/prerender.d.ts +10 -0
- package/dist/compat/rsc/prerender.js +9 -0
- package/dist/compat/server/headers.d.ts +3 -0
- package/dist/compat/server/headers.js +3 -0
- package/dist/compat/ssr/build-output.d.ts +4 -0
- package/dist/compat/ssr/build-output.js +3 -0
- package/dist/compat/ssr/cache.d.ts +6 -0
- package/dist/compat/ssr/cache.js +6 -0
- package/dist/compat/ssr/handler.d.ts +8 -0
- package/dist/compat/ssr/handler.js +8 -0
- package/dist/compat/ssr/node-server.d.ts +5 -0
- package/dist/compat/ssr/node-server.js +4 -0
- package/dist/compat/ssr/render-errors.d.ts +4 -0
- package/dist/compat/ssr/render-errors.js +4 -0
- package/dist/compat/ssr/senders.d.ts +6 -0
- package/dist/compat/ssr/senders.js +6 -0
- package/dist/compat/types.d.ts +8 -0
- package/dist/compat/types.js +1 -0
- package/dist/compile.d.ts +31 -0
- package/dist/compile.js +140 -0
- package/dist/disk.d.ts +16 -0
- package/dist/disk.js +13 -0
- package/dist/document-loads.d.ts +15 -0
- package/dist/document-loads.js +53 -0
- package/dist/document.d.ts +79 -0
- package/dist/document.js +328 -0
- package/dist/downloads.d.ts +15 -0
- package/dist/downloads.js +71 -0
- package/dist/esm-require.d.ts +11 -0
- package/dist/esm-require.js +32 -0
- package/dist/fast-crypto/index.js +1093 -0
- package/dist/fast-crypto.d.ts +20 -0
- package/dist/fast-crypto.js +151 -0
- package/dist/flight.d.ts +19 -0
- package/dist/flight.js +42 -0
- package/dist/form-submission.d.ts +15 -0
- package/dist/form-submission.js +27 -0
- package/dist/from-page.d.ts +5 -0
- package/dist/from-page.js +44 -0
- package/dist/globals.d.ts +1 -0
- package/dist/globals.js +197 -0
- package/dist/host-document.d.ts +26 -0
- package/dist/host-document.js +34 -0
- package/dist/index.d.ts +280 -0
- package/dist/index.js +281 -0
- package/dist/internal.d.ts +2 -0
- package/dist/internal.js +3 -0
- package/dist/leftovers.d.ts +11 -0
- package/dist/leftovers.js +55 -0
- package/dist/mode.d.ts +169 -0
- package/dist/mode.js +31 -0
- package/dist/node/LICENSES.md +3540 -0
- package/dist/node/assert/strict.js +29 -0
- package/dist/node/assert.js +3044 -0
- package/dist/node/buffer.js +1499 -0
- package/dist/node/child_process.js +45 -0
- package/dist/node/cluster.js +85 -0
- package/dist/node/console.js +96 -0
- package/dist/node/constants.js +495 -0
- package/dist/node/crypto.js +1388 -0
- package/dist/node/dgram.js +78 -0
- package/dist/node/diagnostics_channel.js +122 -0
- package/dist/node/dns/promises.js +129 -0
- package/dist/node/dns.js +137 -0
- package/dist/node/domain.js +43 -0
- package/dist/node/events.js +1155 -0
- package/dist/node/fs/promises.js +40 -0
- package/dist/node/fs.js +10375 -0
- package/dist/node/http.js +326 -0
- package/dist/node/http2.js +305 -0
- package/dist/node/https.js +57 -0
- package/dist/node/inspector/promises.js +66 -0
- package/dist/node/inspector.js +76 -0
- package/dist/node/module.js +205 -0
- package/dist/node/net.js +392 -0
- package/dist/node/os.js +259 -0
- package/dist/node/path/posix.js +25 -0
- package/dist/node/path/win32.js +25 -0
- package/dist/node/path.js +384 -0
- package/dist/node/perf_hooks.js +313 -0
- package/dist/node/process.js +452 -0
- package/dist/node/punycode.js +178 -0
- package/dist/node/querystring.js +934 -0
- package/dist/node/readline/promises.js +71 -0
- package/dist/node/readline.js +56 -0
- package/dist/node/repl.js +44 -0
- package/dist/node/sqlite.js +22 -0
- package/dist/node/stream/consumers.js +47 -0
- package/dist/node/stream/promises.js +6 -0
- package/dist/node/stream/web.js +52 -0
- package/dist/node/stream.js +4323 -0
- package/dist/node/string_decoder.js +276 -0
- package/dist/node/sys.js +6 -0
- package/dist/node/timers/promises.js +71 -0
- package/dist/node/timers.js +133 -0
- package/dist/node/tls.js +122 -0
- package/dist/node/trace_events.js +23 -0
- package/dist/node/tty.js +69 -0
- package/dist/node/url.js +1426 -0
- package/dist/node/util/types.js +1456 -0
- package/dist/node/util.js +4807 -0
- package/dist/node/v8.js +160 -0
- package/dist/node/vm.js +88 -0
- package/dist/node/wasi.js +16 -0
- package/dist/node/worker_threads.js +123 -0
- package/dist/node/zlib.js +1396 -0
- package/dist/node-builtins.d.ts +40 -0
- package/dist/node-builtins.js +74 -0
- package/dist/node-on-page.d.ts +46 -0
- package/dist/node-on-page.js +101 -0
- package/dist/node-platform.d.ts +36 -0
- package/dist/node-platform.js +152 -0
- package/dist/node-rendered.d.ts +21 -0
- package/dist/node-rendered.js +26 -0
- package/dist/node-server.d.ts +46 -0
- package/dist/node-server.js +193 -0
- package/dist/optimizer-cache-key.d.ts +26 -0
- package/dist/optimizer-cache-key.js +73 -0
- package/dist/own-package.d.ts +1 -0
- package/dist/own-package.js +6 -0
- package/dist/page-store.d.ts +33 -0
- package/dist/page-store.js +80 -0
- package/dist/page-timers.d.ts +22 -0
- package/dist/page-timers.js +47 -0
- package/dist/page.d.ts +112 -0
- package/dist/page.js +549 -0
- package/dist/paths.d.ts +13 -0
- package/dist/paths.js +47 -0
- package/dist/plugin.d.ts +22 -0
- package/dist/plugin.js +995 -0
- package/dist/prerender-verdict.d.ts +8 -0
- package/dist/prerender-verdict.js +67 -0
- package/dist/project/context.d.ts +546 -0
- package/dist/project/context.js +111 -0
- package/dist/project/entries.d.ts +42 -0
- package/dist/project/entries.js +189 -0
- package/dist/project/env-worker.d.ts +1 -0
- package/dist/project/env-worker.js +9 -0
- package/dist/project/env.d.ts +36 -0
- package/dist/project/env.js +82 -0
- package/dist/project/layers.d.ts +31 -0
- package/dist/project/layers.js +150 -0
- package/dist/project/loaders.d.ts +71 -0
- package/dist/project/loaders.js +300 -0
- package/dist/project/metadata.d.ts +8 -0
- package/dist/project/metadata.js +34 -0
- package/dist/project/module-exports.d.ts +29 -0
- package/dist/project/module-exports.js +77 -0
- package/dist/project/routes.d.ts +19 -0
- package/dist/project/routes.js +92 -0
- package/dist/project/routing.d.ts +46 -0
- package/dist/project/routing.js +280 -0
- package/dist/project/transform.d.ts +8 -0
- package/dist/project/transform.js +110 -0
- package/dist/project/webpack.d.ts +46 -0
- package/dist/project/webpack.js +160 -0
- package/dist/project.d.ts +264 -0
- package/dist/project.js +58 -0
- package/dist/registry-global.d.ts +5 -0
- package/dist/registry-global.js +5 -0
- package/dist/registry.d.ts +241 -0
- package/dist/registry.js +30 -0
- package/dist/route-chunks.d.ts +13 -0
- package/dist/route-chunks.js +32 -0
- package/dist/route-lookup.d.ts +34 -0
- package/dist/route-lookup.js +207 -0
- package/dist/routes-ahead-shared.d.ts +17 -0
- package/dist/routes-ahead-shared.js +9 -0
- package/dist/routes-ahead.d.ts +10 -0
- package/dist/routes-ahead.js +54 -0
- package/dist/rsc.d.ts +19 -0
- package/dist/rsc.js +171 -0
- package/dist/server-action.d.ts +9 -0
- package/dist/server-action.js +15 -0
- package/dist/server-code.d.ts +176 -0
- package/dist/server-code.js +357 -0
- package/dist/server-in-front.d.ts +37 -0
- package/dist/server-in-front.js +90 -0
- package/dist/server-layers.d.ts +22 -0
- package/dist/server-layers.js +33 -0
- package/dist/setup-browser.d.ts +1 -0
- package/dist/setup-browser.js +8 -0
- package/dist/setup-node.d.ts +1 -0
- package/dist/setup-node.js +6 -0
- package/dist/setup.d.ts +8 -0
- package/dist/setup.js +62 -0
- package/dist/speed-features.d.ts +13 -0
- package/dist/speed-features.js +95 -0
- package/dist/ssr.d.ts +70 -0
- package/dist/ssr.js +480 -0
- package/dist/static-build.d.ts +36 -0
- package/dist/static-build.js +92 -0
- package/dist/storage.d.ts +31 -0
- package/dist/storage.js +94 -0
- package/dist/styles-shared.d.ts +137 -0
- package/dist/styles-shared.js +124 -0
- package/dist/styles.d.ts +102 -0
- package/dist/styles.js +730 -0
- package/dist/stylesheet-versions.d.ts +17 -0
- package/dist/stylesheet-versions.js +43 -0
- package/dist/tester.html +10 -0
- package/dist/use-cache.d.ts +15 -0
- package/dist/use-cache.js +93 -0
- package/dist/vitest-version.d.ts +6 -0
- package/dist/vitest-version.js +12 -0
- package/package.json +125 -3
|
@@ -0,0 +1,3044 @@
|
|
|
1
|
+
import __process from "process";
|
|
2
|
+
const process = __process;
|
|
3
|
+
import * as m from "util";
|
|
4
|
+
//#region \0rolldown/runtime.js
|
|
5
|
+
var __create = Object.create;
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
8
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
9
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
10
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
+
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
14
|
+
key = keys[i];
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: ((k) => from[k]).bind(null, key),
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
23
|
+
value: mod,
|
|
24
|
+
enumerable: true
|
|
25
|
+
}) : target, mod));
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region \0require-as-import:util
|
|
28
|
+
var require__require_as_import_util = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
29
|
+
module.exports = m.default;
|
|
30
|
+
}));
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region ../../node_modules/.pnpm/assert@2.1.0/node_modules/assert/build/internal/errors.js
|
|
33
|
+
var require_errors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
34
|
+
function _typeof(o) {
|
|
35
|
+
"@babel/helpers - typeof";
|
|
36
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
37
|
+
return typeof o;
|
|
38
|
+
} : function(o) {
|
|
39
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
40
|
+
}, _typeof(o);
|
|
41
|
+
}
|
|
42
|
+
function _defineProperties(target, props) {
|
|
43
|
+
for (var i = 0; i < props.length; i++) {
|
|
44
|
+
var descriptor = props[i];
|
|
45
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
46
|
+
descriptor.configurable = true;
|
|
47
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
48
|
+
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
52
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
53
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
54
|
+
Object.defineProperty(Constructor, "prototype", { writable: false });
|
|
55
|
+
return Constructor;
|
|
56
|
+
}
|
|
57
|
+
function _toPropertyKey(arg) {
|
|
58
|
+
var key = _toPrimitive(arg, "string");
|
|
59
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
60
|
+
}
|
|
61
|
+
function _toPrimitive(input, hint) {
|
|
62
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
63
|
+
var prim = input[Symbol.toPrimitive];
|
|
64
|
+
if (prim !== void 0) {
|
|
65
|
+
var res = prim.call(input, hint || "default");
|
|
66
|
+
if (_typeof(res) !== "object") return res;
|
|
67
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
68
|
+
}
|
|
69
|
+
return (hint === "string" ? String : Number)(input);
|
|
70
|
+
}
|
|
71
|
+
function _classCallCheck(instance, Constructor) {
|
|
72
|
+
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
|
|
73
|
+
}
|
|
74
|
+
function _inherits(subClass, superClass) {
|
|
75
|
+
if (typeof superClass !== "function" && superClass !== null) throw new TypeError("Super expression must either be null or a function");
|
|
76
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: {
|
|
77
|
+
value: subClass,
|
|
78
|
+
writable: true,
|
|
79
|
+
configurable: true
|
|
80
|
+
} });
|
|
81
|
+
Object.defineProperty(subClass, "prototype", { writable: false });
|
|
82
|
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
83
|
+
}
|
|
84
|
+
function _setPrototypeOf(o, p) {
|
|
85
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
86
|
+
o.__proto__ = p;
|
|
87
|
+
return o;
|
|
88
|
+
};
|
|
89
|
+
return _setPrototypeOf(o, p);
|
|
90
|
+
}
|
|
91
|
+
function _createSuper(Derived) {
|
|
92
|
+
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
93
|
+
return function _createSuperInternal() {
|
|
94
|
+
var Super = _getPrototypeOf(Derived), result;
|
|
95
|
+
if (hasNativeReflectConstruct) {
|
|
96
|
+
var NewTarget = _getPrototypeOf(this).constructor;
|
|
97
|
+
result = Reflect.construct(Super, arguments, NewTarget);
|
|
98
|
+
} else result = Super.apply(this, arguments);
|
|
99
|
+
return _possibleConstructorReturn(this, result);
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
function _possibleConstructorReturn(self, call) {
|
|
103
|
+
if (call && (_typeof(call) === "object" || typeof call === "function")) return call;
|
|
104
|
+
else if (call !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
105
|
+
return _assertThisInitialized(self);
|
|
106
|
+
}
|
|
107
|
+
function _assertThisInitialized(self) {
|
|
108
|
+
if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
109
|
+
return self;
|
|
110
|
+
}
|
|
111
|
+
function _isNativeReflectConstruct() {
|
|
112
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
113
|
+
if (Reflect.construct.sham) return false;
|
|
114
|
+
if (typeof Proxy === "function") return true;
|
|
115
|
+
try {
|
|
116
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
117
|
+
return true;
|
|
118
|
+
} catch (e) {
|
|
119
|
+
return false;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
function _getPrototypeOf(o) {
|
|
123
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
|
124
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
125
|
+
};
|
|
126
|
+
return _getPrototypeOf(o);
|
|
127
|
+
}
|
|
128
|
+
var codes = {};
|
|
129
|
+
var assert;
|
|
130
|
+
var util;
|
|
131
|
+
function createErrorType(code, message, Base) {
|
|
132
|
+
if (!Base) Base = Error;
|
|
133
|
+
function getMessage(arg1, arg2, arg3) {
|
|
134
|
+
if (typeof message === "string") return message;
|
|
135
|
+
else return message(arg1, arg2, arg3);
|
|
136
|
+
}
|
|
137
|
+
codes[code] = /* @__PURE__ */ function(_Base) {
|
|
138
|
+
_inherits(NodeError, _Base);
|
|
139
|
+
var _super = _createSuper(NodeError);
|
|
140
|
+
function NodeError(arg1, arg2, arg3) {
|
|
141
|
+
var _this;
|
|
142
|
+
_classCallCheck(this, NodeError);
|
|
143
|
+
_this = _super.call(this, getMessage(arg1, arg2, arg3));
|
|
144
|
+
_this.code = code;
|
|
145
|
+
return _this;
|
|
146
|
+
}
|
|
147
|
+
return _createClass(NodeError);
|
|
148
|
+
}(Base);
|
|
149
|
+
}
|
|
150
|
+
function oneOf(expected, thing) {
|
|
151
|
+
if (Array.isArray(expected)) {
|
|
152
|
+
var len = expected.length;
|
|
153
|
+
expected = expected.map(function(i) {
|
|
154
|
+
return String(i);
|
|
155
|
+
});
|
|
156
|
+
if (len > 2) return "one of ".concat(thing, " ").concat(expected.slice(0, len - 1).join(", "), ", or ") + expected[len - 1];
|
|
157
|
+
else if (len === 2) return "one of ".concat(thing, " ").concat(expected[0], " or ").concat(expected[1]);
|
|
158
|
+
else return "of ".concat(thing, " ").concat(expected[0]);
|
|
159
|
+
} else return "of ".concat(thing, " ").concat(String(expected));
|
|
160
|
+
}
|
|
161
|
+
function startsWith(str, search, pos) {
|
|
162
|
+
return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;
|
|
163
|
+
}
|
|
164
|
+
function endsWith(str, search, this_len) {
|
|
165
|
+
if (this_len === void 0 || this_len > str.length) this_len = str.length;
|
|
166
|
+
return str.substring(this_len - search.length, this_len) === search;
|
|
167
|
+
}
|
|
168
|
+
function includes(str, search, start) {
|
|
169
|
+
if (typeof start !== "number") start = 0;
|
|
170
|
+
if (start + search.length > str.length) return false;
|
|
171
|
+
else return str.indexOf(search, start) !== -1;
|
|
172
|
+
}
|
|
173
|
+
createErrorType("ERR_AMBIGUOUS_ARGUMENT", "The \"%s\" argument is ambiguous. %s", TypeError);
|
|
174
|
+
createErrorType("ERR_INVALID_ARG_TYPE", function(name, expected, actual) {
|
|
175
|
+
if (assert === void 0) assert = require_assert();
|
|
176
|
+
assert(typeof name === "string", "'name' must be a string");
|
|
177
|
+
var determiner;
|
|
178
|
+
if (typeof expected === "string" && startsWith(expected, "not ")) {
|
|
179
|
+
determiner = "must not be";
|
|
180
|
+
expected = expected.replace(/^not /, "");
|
|
181
|
+
} else determiner = "must be";
|
|
182
|
+
var msg;
|
|
183
|
+
if (endsWith(name, " argument")) msg = "The ".concat(name, " ").concat(determiner, " ").concat(oneOf(expected, "type"));
|
|
184
|
+
else {
|
|
185
|
+
var type = includes(name, ".") ? "property" : "argument";
|
|
186
|
+
msg = "The \"".concat(name, "\" ").concat(type, " ").concat(determiner, " ").concat(oneOf(expected, "type"));
|
|
187
|
+
}
|
|
188
|
+
msg += ". Received type ".concat(_typeof(actual));
|
|
189
|
+
return msg;
|
|
190
|
+
}, TypeError);
|
|
191
|
+
createErrorType("ERR_INVALID_ARG_VALUE", function(name, value) {
|
|
192
|
+
var reason = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "is invalid";
|
|
193
|
+
if (util === void 0) util = require__require_as_import_util();
|
|
194
|
+
var inspected = util.inspect(value);
|
|
195
|
+
if (inspected.length > 128) inspected = "".concat(inspected.slice(0, 128), "...");
|
|
196
|
+
return "The argument '".concat(name, "' ").concat(reason, ". Received ").concat(inspected);
|
|
197
|
+
}, TypeError, RangeError);
|
|
198
|
+
createErrorType("ERR_INVALID_RETURN_VALUE", function(input, name, value) {
|
|
199
|
+
var type;
|
|
200
|
+
if (value && value.constructor && value.constructor.name) type = "instance of ".concat(value.constructor.name);
|
|
201
|
+
else type = "type ".concat(_typeof(value));
|
|
202
|
+
return "Expected ".concat(input, " to be returned from the \"").concat(name, "\"") + " function but got ".concat(type, ".");
|
|
203
|
+
}, TypeError);
|
|
204
|
+
createErrorType("ERR_MISSING_ARGS", function() {
|
|
205
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
|
|
206
|
+
if (assert === void 0) assert = require_assert();
|
|
207
|
+
assert(args.length > 0, "At least one arg needs to be specified");
|
|
208
|
+
var msg = "The ";
|
|
209
|
+
var len = args.length;
|
|
210
|
+
args = args.map(function(a) {
|
|
211
|
+
return "\"".concat(a, "\"");
|
|
212
|
+
});
|
|
213
|
+
switch (len) {
|
|
214
|
+
case 1:
|
|
215
|
+
msg += "".concat(args[0], " argument");
|
|
216
|
+
break;
|
|
217
|
+
case 2:
|
|
218
|
+
msg += "".concat(args[0], " and ").concat(args[1], " arguments");
|
|
219
|
+
break;
|
|
220
|
+
default:
|
|
221
|
+
msg += args.slice(0, len - 1).join(", ");
|
|
222
|
+
msg += ", and ".concat(args[len - 1], " arguments");
|
|
223
|
+
}
|
|
224
|
+
return "".concat(msg, " must be specified");
|
|
225
|
+
}, TypeError);
|
|
226
|
+
module.exports.codes = codes;
|
|
227
|
+
}));
|
|
228
|
+
//#endregion
|
|
229
|
+
//#region ../../node_modules/.pnpm/assert@2.1.0/node_modules/assert/build/internal/assert/assertion_error.js
|
|
230
|
+
var require_assertion_error = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
231
|
+
function ownKeys(e, r) {
|
|
232
|
+
var t = Object.keys(e);
|
|
233
|
+
if (Object.getOwnPropertySymbols) {
|
|
234
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
235
|
+
r && (o = o.filter(function(r) {
|
|
236
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
237
|
+
})), t.push.apply(t, o);
|
|
238
|
+
}
|
|
239
|
+
return t;
|
|
240
|
+
}
|
|
241
|
+
function _objectSpread(e) {
|
|
242
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
243
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
244
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function(r) {
|
|
245
|
+
_defineProperty(e, r, t[r]);
|
|
246
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) {
|
|
247
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
return e;
|
|
251
|
+
}
|
|
252
|
+
function _defineProperty(obj, key, value) {
|
|
253
|
+
key = _toPropertyKey(key);
|
|
254
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
255
|
+
value,
|
|
256
|
+
enumerable: true,
|
|
257
|
+
configurable: true,
|
|
258
|
+
writable: true
|
|
259
|
+
});
|
|
260
|
+
else obj[key] = value;
|
|
261
|
+
return obj;
|
|
262
|
+
}
|
|
263
|
+
function _classCallCheck(instance, Constructor) {
|
|
264
|
+
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
|
|
265
|
+
}
|
|
266
|
+
function _defineProperties(target, props) {
|
|
267
|
+
for (var i = 0; i < props.length; i++) {
|
|
268
|
+
var descriptor = props[i];
|
|
269
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
270
|
+
descriptor.configurable = true;
|
|
271
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
272
|
+
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
276
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
277
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
278
|
+
Object.defineProperty(Constructor, "prototype", { writable: false });
|
|
279
|
+
return Constructor;
|
|
280
|
+
}
|
|
281
|
+
function _toPropertyKey(arg) {
|
|
282
|
+
var key = _toPrimitive(arg, "string");
|
|
283
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
284
|
+
}
|
|
285
|
+
function _toPrimitive(input, hint) {
|
|
286
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
287
|
+
var prim = input[Symbol.toPrimitive];
|
|
288
|
+
if (prim !== void 0) {
|
|
289
|
+
var res = prim.call(input, hint || "default");
|
|
290
|
+
if (_typeof(res) !== "object") return res;
|
|
291
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
292
|
+
}
|
|
293
|
+
return (hint === "string" ? String : Number)(input);
|
|
294
|
+
}
|
|
295
|
+
function _inherits(subClass, superClass) {
|
|
296
|
+
if (typeof superClass !== "function" && superClass !== null) throw new TypeError("Super expression must either be null or a function");
|
|
297
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: {
|
|
298
|
+
value: subClass,
|
|
299
|
+
writable: true,
|
|
300
|
+
configurable: true
|
|
301
|
+
} });
|
|
302
|
+
Object.defineProperty(subClass, "prototype", { writable: false });
|
|
303
|
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
304
|
+
}
|
|
305
|
+
function _createSuper(Derived) {
|
|
306
|
+
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
307
|
+
return function _createSuperInternal() {
|
|
308
|
+
var Super = _getPrototypeOf(Derived), result;
|
|
309
|
+
if (hasNativeReflectConstruct) {
|
|
310
|
+
var NewTarget = _getPrototypeOf(this).constructor;
|
|
311
|
+
result = Reflect.construct(Super, arguments, NewTarget);
|
|
312
|
+
} else result = Super.apply(this, arguments);
|
|
313
|
+
return _possibleConstructorReturn(this, result);
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
function _possibleConstructorReturn(self, call) {
|
|
317
|
+
if (call && (_typeof(call) === "object" || typeof call === "function")) return call;
|
|
318
|
+
else if (call !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
319
|
+
return _assertThisInitialized(self);
|
|
320
|
+
}
|
|
321
|
+
function _assertThisInitialized(self) {
|
|
322
|
+
if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
323
|
+
return self;
|
|
324
|
+
}
|
|
325
|
+
function _wrapNativeSuper(Class) {
|
|
326
|
+
var _cache = typeof Map === "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
327
|
+
_wrapNativeSuper = function _wrapNativeSuper(Class) {
|
|
328
|
+
if (Class === null || !_isNativeFunction(Class)) return Class;
|
|
329
|
+
if (typeof Class !== "function") throw new TypeError("Super expression must either be null or a function");
|
|
330
|
+
if (typeof _cache !== "undefined") {
|
|
331
|
+
if (_cache.has(Class)) return _cache.get(Class);
|
|
332
|
+
_cache.set(Class, Wrapper);
|
|
333
|
+
}
|
|
334
|
+
function Wrapper() {
|
|
335
|
+
return _construct(Class, arguments, _getPrototypeOf(this).constructor);
|
|
336
|
+
}
|
|
337
|
+
Wrapper.prototype = Object.create(Class.prototype, { constructor: {
|
|
338
|
+
value: Wrapper,
|
|
339
|
+
enumerable: false,
|
|
340
|
+
writable: true,
|
|
341
|
+
configurable: true
|
|
342
|
+
} });
|
|
343
|
+
return _setPrototypeOf(Wrapper, Class);
|
|
344
|
+
};
|
|
345
|
+
return _wrapNativeSuper(Class);
|
|
346
|
+
}
|
|
347
|
+
function _construct(Parent, args, Class) {
|
|
348
|
+
if (_isNativeReflectConstruct()) _construct = Reflect.construct.bind();
|
|
349
|
+
else _construct = function _construct(Parent, args, Class) {
|
|
350
|
+
var a = [null];
|
|
351
|
+
a.push.apply(a, args);
|
|
352
|
+
var instance = new (Function.bind.apply(Parent, a))();
|
|
353
|
+
if (Class) _setPrototypeOf(instance, Class.prototype);
|
|
354
|
+
return instance;
|
|
355
|
+
};
|
|
356
|
+
return _construct.apply(null, arguments);
|
|
357
|
+
}
|
|
358
|
+
function _isNativeReflectConstruct() {
|
|
359
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
360
|
+
if (Reflect.construct.sham) return false;
|
|
361
|
+
if (typeof Proxy === "function") return true;
|
|
362
|
+
try {
|
|
363
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
364
|
+
return true;
|
|
365
|
+
} catch (e) {
|
|
366
|
+
return false;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
function _isNativeFunction(fn) {
|
|
370
|
+
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
371
|
+
}
|
|
372
|
+
function _setPrototypeOf(o, p) {
|
|
373
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
374
|
+
o.__proto__ = p;
|
|
375
|
+
return o;
|
|
376
|
+
};
|
|
377
|
+
return _setPrototypeOf(o, p);
|
|
378
|
+
}
|
|
379
|
+
function _getPrototypeOf(o) {
|
|
380
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
|
381
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
382
|
+
};
|
|
383
|
+
return _getPrototypeOf(o);
|
|
384
|
+
}
|
|
385
|
+
function _typeof(o) {
|
|
386
|
+
"@babel/helpers - typeof";
|
|
387
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
388
|
+
return typeof o;
|
|
389
|
+
} : function(o) {
|
|
390
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
391
|
+
}, _typeof(o);
|
|
392
|
+
}
|
|
393
|
+
var inspect = require__require_as_import_util().inspect;
|
|
394
|
+
var ERR_INVALID_ARG_TYPE = require_errors().codes.ERR_INVALID_ARG_TYPE;
|
|
395
|
+
function endsWith(str, search, this_len) {
|
|
396
|
+
if (this_len === void 0 || this_len > str.length) this_len = str.length;
|
|
397
|
+
return str.substring(this_len - search.length, this_len) === search;
|
|
398
|
+
}
|
|
399
|
+
function repeat(str, count) {
|
|
400
|
+
count = Math.floor(count);
|
|
401
|
+
if (str.length == 0 || count == 0) return "";
|
|
402
|
+
var maxCount = str.length * count;
|
|
403
|
+
count = Math.floor(Math.log(count) / Math.log(2));
|
|
404
|
+
while (count) {
|
|
405
|
+
str += str;
|
|
406
|
+
count--;
|
|
407
|
+
}
|
|
408
|
+
str += str.substring(0, maxCount - str.length);
|
|
409
|
+
return str;
|
|
410
|
+
}
|
|
411
|
+
var blue = "";
|
|
412
|
+
var green = "";
|
|
413
|
+
var red = "";
|
|
414
|
+
var white = "";
|
|
415
|
+
var kReadableOperator = {
|
|
416
|
+
deepStrictEqual: "Expected values to be strictly deep-equal:",
|
|
417
|
+
strictEqual: "Expected values to be strictly equal:",
|
|
418
|
+
strictEqualObject: "Expected \"actual\" to be reference-equal to \"expected\":",
|
|
419
|
+
deepEqual: "Expected values to be loosely deep-equal:",
|
|
420
|
+
equal: "Expected values to be loosely equal:",
|
|
421
|
+
notDeepStrictEqual: "Expected \"actual\" not to be strictly deep-equal to:",
|
|
422
|
+
notStrictEqual: "Expected \"actual\" to be strictly unequal to:",
|
|
423
|
+
notStrictEqualObject: "Expected \"actual\" not to be reference-equal to \"expected\":",
|
|
424
|
+
notDeepEqual: "Expected \"actual\" not to be loosely deep-equal to:",
|
|
425
|
+
notEqual: "Expected \"actual\" to be loosely unequal to:",
|
|
426
|
+
notIdentical: "Values identical but not reference-equal:"
|
|
427
|
+
};
|
|
428
|
+
var kMaxShortLength = 10;
|
|
429
|
+
function copyError(source) {
|
|
430
|
+
var keys = Object.keys(source);
|
|
431
|
+
var target = Object.create(Object.getPrototypeOf(source));
|
|
432
|
+
keys.forEach(function(key) {
|
|
433
|
+
target[key] = source[key];
|
|
434
|
+
});
|
|
435
|
+
Object.defineProperty(target, "message", { value: source.message });
|
|
436
|
+
return target;
|
|
437
|
+
}
|
|
438
|
+
function inspectValue(val) {
|
|
439
|
+
return inspect(val, {
|
|
440
|
+
compact: false,
|
|
441
|
+
customInspect: false,
|
|
442
|
+
depth: 1e3,
|
|
443
|
+
maxArrayLength: Infinity,
|
|
444
|
+
showHidden: false,
|
|
445
|
+
breakLength: Infinity,
|
|
446
|
+
showProxy: false,
|
|
447
|
+
sorted: true,
|
|
448
|
+
getters: true
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
function createErrDiff(actual, expected, operator) {
|
|
452
|
+
var other = "";
|
|
453
|
+
var res = "";
|
|
454
|
+
var lastPos = 0;
|
|
455
|
+
var end = "";
|
|
456
|
+
var skipped = false;
|
|
457
|
+
var actualInspected = inspectValue(actual);
|
|
458
|
+
var actualLines = actualInspected.split("\n");
|
|
459
|
+
var expectedLines = inspectValue(expected).split("\n");
|
|
460
|
+
var i = 0;
|
|
461
|
+
var indicator = "";
|
|
462
|
+
if (operator === "strictEqual" && _typeof(actual) === "object" && _typeof(expected) === "object" && actual !== null && expected !== null) operator = "strictEqualObject";
|
|
463
|
+
if (actualLines.length === 1 && expectedLines.length === 1 && actualLines[0] !== expectedLines[0]) {
|
|
464
|
+
var inputLength = actualLines[0].length + expectedLines[0].length;
|
|
465
|
+
if (inputLength <= kMaxShortLength) {
|
|
466
|
+
if ((_typeof(actual) !== "object" || actual === null) && (_typeof(expected) !== "object" || expected === null) && (actual !== 0 || expected !== 0)) return "".concat(kReadableOperator[operator], "\n\n") + "".concat(actualLines[0], " !== ").concat(expectedLines[0], "\n");
|
|
467
|
+
} else if (operator !== "strictEqualObject") {
|
|
468
|
+
if (inputLength < (process.stderr && process.stderr.isTTY ? process.stderr.columns : 80)) {
|
|
469
|
+
while (actualLines[0][i] === expectedLines[0][i]) i++;
|
|
470
|
+
if (i > 2) {
|
|
471
|
+
indicator = "\n ".concat(repeat(" ", i), "^");
|
|
472
|
+
i = 0;
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
var a = actualLines[actualLines.length - 1];
|
|
478
|
+
var b = expectedLines[expectedLines.length - 1];
|
|
479
|
+
while (a === b) {
|
|
480
|
+
if (i++ < 2) end = "\n ".concat(a).concat(end);
|
|
481
|
+
else other = a;
|
|
482
|
+
actualLines.pop();
|
|
483
|
+
expectedLines.pop();
|
|
484
|
+
if (actualLines.length === 0 || expectedLines.length === 0) break;
|
|
485
|
+
a = actualLines[actualLines.length - 1];
|
|
486
|
+
b = expectedLines[expectedLines.length - 1];
|
|
487
|
+
}
|
|
488
|
+
var maxLines = Math.max(actualLines.length, expectedLines.length);
|
|
489
|
+
if (maxLines === 0) {
|
|
490
|
+
var _actualLines = actualInspected.split("\n");
|
|
491
|
+
if (_actualLines.length > 30) {
|
|
492
|
+
_actualLines[26] = "".concat(blue, "...").concat(white);
|
|
493
|
+
while (_actualLines.length > 27) _actualLines.pop();
|
|
494
|
+
}
|
|
495
|
+
return "".concat(kReadableOperator.notIdentical, "\n\n").concat(_actualLines.join("\n"), "\n");
|
|
496
|
+
}
|
|
497
|
+
if (i > 3) {
|
|
498
|
+
end = "\n".concat(blue, "...").concat(white).concat(end);
|
|
499
|
+
skipped = true;
|
|
500
|
+
}
|
|
501
|
+
if (other !== "") {
|
|
502
|
+
end = "\n ".concat(other).concat(end);
|
|
503
|
+
other = "";
|
|
504
|
+
}
|
|
505
|
+
var printedLines = 0;
|
|
506
|
+
var msg = kReadableOperator[operator] + "\n".concat(green, "+ actual").concat(white, " ").concat(red, "- expected").concat(white);
|
|
507
|
+
var skippedMsg = " ".concat(blue, "...").concat(white, " Lines skipped");
|
|
508
|
+
for (i = 0; i < maxLines; i++) {
|
|
509
|
+
var cur = i - lastPos;
|
|
510
|
+
if (actualLines.length < i + 1) {
|
|
511
|
+
if (cur > 1 && i > 2) {
|
|
512
|
+
if (cur > 4) {
|
|
513
|
+
res += "\n".concat(blue, "...").concat(white);
|
|
514
|
+
skipped = true;
|
|
515
|
+
} else if (cur > 3) {
|
|
516
|
+
res += "\n ".concat(expectedLines[i - 2]);
|
|
517
|
+
printedLines++;
|
|
518
|
+
}
|
|
519
|
+
res += "\n ".concat(expectedLines[i - 1]);
|
|
520
|
+
printedLines++;
|
|
521
|
+
}
|
|
522
|
+
lastPos = i;
|
|
523
|
+
other += "\n".concat(red, "-").concat(white, " ").concat(expectedLines[i]);
|
|
524
|
+
printedLines++;
|
|
525
|
+
} else if (expectedLines.length < i + 1) {
|
|
526
|
+
if (cur > 1 && i > 2) {
|
|
527
|
+
if (cur > 4) {
|
|
528
|
+
res += "\n".concat(blue, "...").concat(white);
|
|
529
|
+
skipped = true;
|
|
530
|
+
} else if (cur > 3) {
|
|
531
|
+
res += "\n ".concat(actualLines[i - 2]);
|
|
532
|
+
printedLines++;
|
|
533
|
+
}
|
|
534
|
+
res += "\n ".concat(actualLines[i - 1]);
|
|
535
|
+
printedLines++;
|
|
536
|
+
}
|
|
537
|
+
lastPos = i;
|
|
538
|
+
res += "\n".concat(green, "+").concat(white, " ").concat(actualLines[i]);
|
|
539
|
+
printedLines++;
|
|
540
|
+
} else {
|
|
541
|
+
var expectedLine = expectedLines[i];
|
|
542
|
+
var actualLine = actualLines[i];
|
|
543
|
+
var divergingLines = actualLine !== expectedLine && (!endsWith(actualLine, ",") || actualLine.slice(0, -1) !== expectedLine);
|
|
544
|
+
if (divergingLines && endsWith(expectedLine, ",") && expectedLine.slice(0, -1) === actualLine) {
|
|
545
|
+
divergingLines = false;
|
|
546
|
+
actualLine += ",";
|
|
547
|
+
}
|
|
548
|
+
if (divergingLines) {
|
|
549
|
+
if (cur > 1 && i > 2) {
|
|
550
|
+
if (cur > 4) {
|
|
551
|
+
res += "\n".concat(blue, "...").concat(white);
|
|
552
|
+
skipped = true;
|
|
553
|
+
} else if (cur > 3) {
|
|
554
|
+
res += "\n ".concat(actualLines[i - 2]);
|
|
555
|
+
printedLines++;
|
|
556
|
+
}
|
|
557
|
+
res += "\n ".concat(actualLines[i - 1]);
|
|
558
|
+
printedLines++;
|
|
559
|
+
}
|
|
560
|
+
lastPos = i;
|
|
561
|
+
res += "\n".concat(green, "+").concat(white, " ").concat(actualLine);
|
|
562
|
+
other += "\n".concat(red, "-").concat(white, " ").concat(expectedLine);
|
|
563
|
+
printedLines += 2;
|
|
564
|
+
} else {
|
|
565
|
+
res += other;
|
|
566
|
+
other = "";
|
|
567
|
+
if (cur === 1 || i === 0) {
|
|
568
|
+
res += "\n ".concat(actualLine);
|
|
569
|
+
printedLines++;
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
if (printedLines > 20 && i < maxLines - 2) return "".concat(msg).concat(skippedMsg, "\n").concat(res, "\n").concat(blue, "...").concat(white).concat(other, "\n") + "".concat(blue, "...").concat(white);
|
|
574
|
+
}
|
|
575
|
+
return "".concat(msg).concat(skipped ? skippedMsg : "", "\n").concat(res).concat(other).concat(end).concat(indicator);
|
|
576
|
+
}
|
|
577
|
+
module.exports = /* @__PURE__ */ function(_Error, _inspect$custom) {
|
|
578
|
+
_inherits(AssertionError, _Error);
|
|
579
|
+
var _super = _createSuper(AssertionError);
|
|
580
|
+
function AssertionError(options) {
|
|
581
|
+
var _this;
|
|
582
|
+
_classCallCheck(this, AssertionError);
|
|
583
|
+
if (_typeof(options) !== "object" || options === null) throw new ERR_INVALID_ARG_TYPE("options", "Object", options);
|
|
584
|
+
var message = options.message, operator = options.operator, stackStartFn = options.stackStartFn;
|
|
585
|
+
var actual = options.actual, expected = options.expected;
|
|
586
|
+
var limit = Error.stackTraceLimit;
|
|
587
|
+
Error.stackTraceLimit = 0;
|
|
588
|
+
if (message != null) _this = _super.call(this, String(message));
|
|
589
|
+
else {
|
|
590
|
+
if (process.stderr && process.stderr.isTTY) {
|
|
591
|
+
if (process.stderr && process.stderr.getColorDepth && process.stderr.getColorDepth() !== 1) {
|
|
592
|
+
blue = "\x1B[34m";
|
|
593
|
+
green = "\x1B[32m";
|
|
594
|
+
white = "\x1B[39m";
|
|
595
|
+
red = "\x1B[31m";
|
|
596
|
+
} else {
|
|
597
|
+
blue = "";
|
|
598
|
+
green = "";
|
|
599
|
+
white = "";
|
|
600
|
+
red = "";
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
if (_typeof(actual) === "object" && actual !== null && _typeof(expected) === "object" && expected !== null && "stack" in actual && actual instanceof Error && "stack" in expected && expected instanceof Error) {
|
|
604
|
+
actual = copyError(actual);
|
|
605
|
+
expected = copyError(expected);
|
|
606
|
+
}
|
|
607
|
+
if (operator === "deepStrictEqual" || operator === "strictEqual") _this = _super.call(this, createErrDiff(actual, expected, operator));
|
|
608
|
+
else if (operator === "notDeepStrictEqual" || operator === "notStrictEqual") {
|
|
609
|
+
var base = kReadableOperator[operator];
|
|
610
|
+
var res = inspectValue(actual).split("\n");
|
|
611
|
+
if (operator === "notStrictEqual" && _typeof(actual) === "object" && actual !== null) base = kReadableOperator.notStrictEqualObject;
|
|
612
|
+
if (res.length > 30) {
|
|
613
|
+
res[26] = "".concat(blue, "...").concat(white);
|
|
614
|
+
while (res.length > 27) res.pop();
|
|
615
|
+
}
|
|
616
|
+
if (res.length === 1) _this = _super.call(this, "".concat(base, " ").concat(res[0]));
|
|
617
|
+
else _this = _super.call(this, "".concat(base, "\n\n").concat(res.join("\n"), "\n"));
|
|
618
|
+
} else {
|
|
619
|
+
var _res = inspectValue(actual);
|
|
620
|
+
var other = "";
|
|
621
|
+
var knownOperators = kReadableOperator[operator];
|
|
622
|
+
if (operator === "notDeepEqual" || operator === "notEqual") {
|
|
623
|
+
_res = "".concat(kReadableOperator[operator], "\n\n").concat(_res);
|
|
624
|
+
if (_res.length > 1024) _res = "".concat(_res.slice(0, 1021), "...");
|
|
625
|
+
} else {
|
|
626
|
+
other = "".concat(inspectValue(expected));
|
|
627
|
+
if (_res.length > 512) _res = "".concat(_res.slice(0, 509), "...");
|
|
628
|
+
if (other.length > 512) other = "".concat(other.slice(0, 509), "...");
|
|
629
|
+
if (operator === "deepEqual" || operator === "equal") _res = "".concat(knownOperators, "\n\n").concat(_res, "\n\nshould equal\n\n");
|
|
630
|
+
else other = " ".concat(operator, " ").concat(other);
|
|
631
|
+
}
|
|
632
|
+
_this = _super.call(this, "".concat(_res).concat(other));
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
Error.stackTraceLimit = limit;
|
|
636
|
+
_this.generatedMessage = !message;
|
|
637
|
+
Object.defineProperty(_assertThisInitialized(_this), "name", {
|
|
638
|
+
value: "AssertionError [ERR_ASSERTION]",
|
|
639
|
+
enumerable: false,
|
|
640
|
+
writable: true,
|
|
641
|
+
configurable: true
|
|
642
|
+
});
|
|
643
|
+
_this.code = "ERR_ASSERTION";
|
|
644
|
+
_this.actual = actual;
|
|
645
|
+
_this.expected = expected;
|
|
646
|
+
_this.operator = operator;
|
|
647
|
+
if (Error.captureStackTrace) Error.captureStackTrace(_assertThisInitialized(_this), stackStartFn);
|
|
648
|
+
_this.stack;
|
|
649
|
+
_this.name = "AssertionError";
|
|
650
|
+
return _possibleConstructorReturn(_this);
|
|
651
|
+
}
|
|
652
|
+
_createClass(AssertionError, [{
|
|
653
|
+
key: "toString",
|
|
654
|
+
value: function toString() {
|
|
655
|
+
return "".concat(this.name, " [").concat(this.code, "]: ").concat(this.message);
|
|
656
|
+
}
|
|
657
|
+
}, {
|
|
658
|
+
key: _inspect$custom,
|
|
659
|
+
value: function value(recurseTimes, ctx) {
|
|
660
|
+
return inspect(this, _objectSpread(_objectSpread({}, ctx), {}, {
|
|
661
|
+
customInspect: false,
|
|
662
|
+
depth: 0
|
|
663
|
+
}));
|
|
664
|
+
}
|
|
665
|
+
}]);
|
|
666
|
+
return AssertionError;
|
|
667
|
+
}(/*#__PURE__*/ _wrapNativeSuper(Error), inspect.custom);
|
|
668
|
+
}));
|
|
669
|
+
//#endregion
|
|
670
|
+
//#region ../../node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js
|
|
671
|
+
var require_isArguments = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
672
|
+
var toStr = Object.prototype.toString;
|
|
673
|
+
module.exports = function isArguments(value) {
|
|
674
|
+
var str = toStr.call(value);
|
|
675
|
+
var isArgs = str === "[object Arguments]";
|
|
676
|
+
if (!isArgs) isArgs = str !== "[object Array]" && value !== null && typeof value === "object" && typeof value.length === "number" && value.length >= 0 && toStr.call(value.callee) === "[object Function]";
|
|
677
|
+
return isArgs;
|
|
678
|
+
};
|
|
679
|
+
}));
|
|
680
|
+
//#endregion
|
|
681
|
+
//#region ../../node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js
|
|
682
|
+
var require_implementation$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
683
|
+
var keysShim;
|
|
684
|
+
if (!Object.keys) {
|
|
685
|
+
var has = Object.prototype.hasOwnProperty;
|
|
686
|
+
var toStr = Object.prototype.toString;
|
|
687
|
+
var isArgs = require_isArguments();
|
|
688
|
+
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
|
689
|
+
var hasDontEnumBug = !isEnumerable.call({ toString: null }, "toString");
|
|
690
|
+
var hasProtoEnumBug = isEnumerable.call(function() {}, "prototype");
|
|
691
|
+
var dontEnums = [
|
|
692
|
+
"toString",
|
|
693
|
+
"toLocaleString",
|
|
694
|
+
"valueOf",
|
|
695
|
+
"hasOwnProperty",
|
|
696
|
+
"isPrototypeOf",
|
|
697
|
+
"propertyIsEnumerable",
|
|
698
|
+
"constructor"
|
|
699
|
+
];
|
|
700
|
+
var equalsConstructorPrototype = function(o) {
|
|
701
|
+
var ctor = o.constructor;
|
|
702
|
+
return ctor && ctor.prototype === o;
|
|
703
|
+
};
|
|
704
|
+
var excludedKeys = {
|
|
705
|
+
$applicationCache: true,
|
|
706
|
+
$console: true,
|
|
707
|
+
$external: true,
|
|
708
|
+
$frame: true,
|
|
709
|
+
$frameElement: true,
|
|
710
|
+
$frames: true,
|
|
711
|
+
$innerHeight: true,
|
|
712
|
+
$innerWidth: true,
|
|
713
|
+
$onmozfullscreenchange: true,
|
|
714
|
+
$onmozfullscreenerror: true,
|
|
715
|
+
$outerHeight: true,
|
|
716
|
+
$outerWidth: true,
|
|
717
|
+
$pageXOffset: true,
|
|
718
|
+
$pageYOffset: true,
|
|
719
|
+
$parent: true,
|
|
720
|
+
$scrollLeft: true,
|
|
721
|
+
$scrollTop: true,
|
|
722
|
+
$scrollX: true,
|
|
723
|
+
$scrollY: true,
|
|
724
|
+
$self: true,
|
|
725
|
+
$webkitIndexedDB: true,
|
|
726
|
+
$webkitStorageInfo: true,
|
|
727
|
+
$window: true
|
|
728
|
+
};
|
|
729
|
+
var hasAutomationEqualityBug = function() {
|
|
730
|
+
if (typeof window === "undefined") return false;
|
|
731
|
+
for (var k in window) try {
|
|
732
|
+
if (!excludedKeys["$" + k] && has.call(window, k) && window[k] !== null && typeof window[k] === "object") try {
|
|
733
|
+
equalsConstructorPrototype(window[k]);
|
|
734
|
+
} catch (e) {
|
|
735
|
+
return true;
|
|
736
|
+
}
|
|
737
|
+
} catch (e) {
|
|
738
|
+
return true;
|
|
739
|
+
}
|
|
740
|
+
return false;
|
|
741
|
+
}();
|
|
742
|
+
var equalsConstructorPrototypeIfNotBuggy = function(o) {
|
|
743
|
+
if (typeof window === "undefined" || !hasAutomationEqualityBug) return equalsConstructorPrototype(o);
|
|
744
|
+
try {
|
|
745
|
+
return equalsConstructorPrototype(o);
|
|
746
|
+
} catch (e) {
|
|
747
|
+
return false;
|
|
748
|
+
}
|
|
749
|
+
};
|
|
750
|
+
keysShim = function keys(object) {
|
|
751
|
+
var isObject = object !== null && typeof object === "object";
|
|
752
|
+
var isFunction = toStr.call(object) === "[object Function]";
|
|
753
|
+
var isArguments = isArgs(object);
|
|
754
|
+
var isString = isObject && toStr.call(object) === "[object String]";
|
|
755
|
+
var theKeys = [];
|
|
756
|
+
if (!isObject && !isFunction && !isArguments) throw new TypeError("Object.keys called on a non-object");
|
|
757
|
+
var skipProto = hasProtoEnumBug && isFunction;
|
|
758
|
+
if (isString && object.length > 0 && !has.call(object, 0)) for (var i = 0; i < object.length; ++i) theKeys.push(String(i));
|
|
759
|
+
if (isArguments && object.length > 0) for (var j = 0; j < object.length; ++j) theKeys.push(String(j));
|
|
760
|
+
else for (var name in object) if (!(skipProto && name === "prototype") && has.call(object, name)) theKeys.push(String(name));
|
|
761
|
+
if (hasDontEnumBug) {
|
|
762
|
+
var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);
|
|
763
|
+
for (var k = 0; k < dontEnums.length; ++k) if (!(skipConstructor && dontEnums[k] === "constructor") && has.call(object, dontEnums[k])) theKeys.push(dontEnums[k]);
|
|
764
|
+
}
|
|
765
|
+
return theKeys;
|
|
766
|
+
};
|
|
767
|
+
}
|
|
768
|
+
module.exports = keysShim;
|
|
769
|
+
}));
|
|
770
|
+
//#endregion
|
|
771
|
+
//#region ../../node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js
|
|
772
|
+
var require_object_keys = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
773
|
+
var slice = Array.prototype.slice;
|
|
774
|
+
var isArgs = require_isArguments();
|
|
775
|
+
var origKeys = Object.keys;
|
|
776
|
+
var keysShim = origKeys ? function keys(o) {
|
|
777
|
+
return origKeys(o);
|
|
778
|
+
} : require_implementation$4();
|
|
779
|
+
var originalKeys = Object.keys;
|
|
780
|
+
keysShim.shim = function shimObjectKeys() {
|
|
781
|
+
if (Object.keys) {
|
|
782
|
+
if (!function() {
|
|
783
|
+
var args = Object.keys(arguments);
|
|
784
|
+
return args && args.length === arguments.length;
|
|
785
|
+
}(1, 2)) Object.keys = function keys(object) {
|
|
786
|
+
if (isArgs(object)) return originalKeys(slice.call(object));
|
|
787
|
+
return originalKeys(object);
|
|
788
|
+
};
|
|
789
|
+
} else Object.keys = keysShim;
|
|
790
|
+
return Object.keys || keysShim;
|
|
791
|
+
};
|
|
792
|
+
module.exports = keysShim;
|
|
793
|
+
}));
|
|
794
|
+
//#endregion
|
|
795
|
+
//#region ../../node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/shams.js
|
|
796
|
+
var require_shams = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
797
|
+
module.exports = function hasSymbols() {
|
|
798
|
+
if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") return false;
|
|
799
|
+
if (typeof Symbol.iterator === "symbol") return true;
|
|
800
|
+
var obj = {};
|
|
801
|
+
var sym = Symbol("test");
|
|
802
|
+
var symObj = Object(sym);
|
|
803
|
+
if (typeof sym === "string") return false;
|
|
804
|
+
if (Object.prototype.toString.call(sym) !== "[object Symbol]") return false;
|
|
805
|
+
if (Object.prototype.toString.call(symObj) !== "[object Symbol]") return false;
|
|
806
|
+
var symVal = 42;
|
|
807
|
+
obj[sym] = symVal;
|
|
808
|
+
for (var _ in obj) return false;
|
|
809
|
+
if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) return false;
|
|
810
|
+
if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) return false;
|
|
811
|
+
var syms = Object.getOwnPropertySymbols(obj);
|
|
812
|
+
if (syms.length !== 1 || syms[0] !== sym) return false;
|
|
813
|
+
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) return false;
|
|
814
|
+
if (typeof Object.getOwnPropertyDescriptor === "function") {
|
|
815
|
+
var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
|
|
816
|
+
if (descriptor.value !== symVal || descriptor.enumerable !== true) return false;
|
|
817
|
+
}
|
|
818
|
+
return true;
|
|
819
|
+
};
|
|
820
|
+
}));
|
|
821
|
+
//#endregion
|
|
822
|
+
//#region ../../node_modules/.pnpm/es-object-atoms@1.1.1/node_modules/es-object-atoms/index.js
|
|
823
|
+
var require_es_object_atoms = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
824
|
+
module.exports = Object;
|
|
825
|
+
}));
|
|
826
|
+
//#endregion
|
|
827
|
+
//#region ../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.js
|
|
828
|
+
var require_es_errors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
829
|
+
module.exports = Error;
|
|
830
|
+
}));
|
|
831
|
+
//#endregion
|
|
832
|
+
//#region ../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.js
|
|
833
|
+
var require_eval = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
834
|
+
module.exports = EvalError;
|
|
835
|
+
}));
|
|
836
|
+
//#endregion
|
|
837
|
+
//#region ../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.js
|
|
838
|
+
var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
839
|
+
module.exports = RangeError;
|
|
840
|
+
}));
|
|
841
|
+
//#endregion
|
|
842
|
+
//#region ../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.js
|
|
843
|
+
var require_ref = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
844
|
+
module.exports = ReferenceError;
|
|
845
|
+
}));
|
|
846
|
+
//#endregion
|
|
847
|
+
//#region ../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.js
|
|
848
|
+
var require_syntax = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
849
|
+
module.exports = SyntaxError;
|
|
850
|
+
}));
|
|
851
|
+
//#endregion
|
|
852
|
+
//#region ../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js
|
|
853
|
+
var require_type = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
854
|
+
module.exports = TypeError;
|
|
855
|
+
}));
|
|
856
|
+
//#endregion
|
|
857
|
+
//#region ../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.js
|
|
858
|
+
var require_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
859
|
+
module.exports = URIError;
|
|
860
|
+
}));
|
|
861
|
+
//#endregion
|
|
862
|
+
//#region ../../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/abs.js
|
|
863
|
+
var require_abs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
864
|
+
module.exports = Math.abs;
|
|
865
|
+
}));
|
|
866
|
+
//#endregion
|
|
867
|
+
//#region ../../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/floor.js
|
|
868
|
+
var require_floor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
869
|
+
module.exports = Math.floor;
|
|
870
|
+
}));
|
|
871
|
+
//#endregion
|
|
872
|
+
//#region ../../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/max.js
|
|
873
|
+
var require_max = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
874
|
+
module.exports = Math.max;
|
|
875
|
+
}));
|
|
876
|
+
//#endregion
|
|
877
|
+
//#region ../../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/min.js
|
|
878
|
+
var require_min = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
879
|
+
module.exports = Math.min;
|
|
880
|
+
}));
|
|
881
|
+
//#endregion
|
|
882
|
+
//#region ../../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/pow.js
|
|
883
|
+
var require_pow = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
884
|
+
module.exports = Math.pow;
|
|
885
|
+
}));
|
|
886
|
+
//#endregion
|
|
887
|
+
//#region ../../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/round.js
|
|
888
|
+
var require_round = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
889
|
+
module.exports = Math.round;
|
|
890
|
+
}));
|
|
891
|
+
//#endregion
|
|
892
|
+
//#region ../../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/isNaN.js
|
|
893
|
+
var require_isNaN = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
894
|
+
module.exports = Number.isNaN || function isNaN(a) {
|
|
895
|
+
return a !== a;
|
|
896
|
+
};
|
|
897
|
+
}));
|
|
898
|
+
//#endregion
|
|
899
|
+
//#region ../../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/sign.js
|
|
900
|
+
var require_sign = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
901
|
+
var $isNaN = require_isNaN();
|
|
902
|
+
module.exports = function sign(number) {
|
|
903
|
+
if ($isNaN(number) || number === 0) return number;
|
|
904
|
+
return number < 0 ? -1 : 1;
|
|
905
|
+
};
|
|
906
|
+
}));
|
|
907
|
+
//#endregion
|
|
908
|
+
//#region ../../node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/gOPD.js
|
|
909
|
+
var require_gOPD = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
910
|
+
module.exports = Object.getOwnPropertyDescriptor;
|
|
911
|
+
}));
|
|
912
|
+
//#endregion
|
|
913
|
+
//#region ../../node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/index.js
|
|
914
|
+
var require_gopd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
915
|
+
var $gOPD = require_gOPD();
|
|
916
|
+
if ($gOPD) try {
|
|
917
|
+
$gOPD([], "length");
|
|
918
|
+
} catch (e) {
|
|
919
|
+
$gOPD = null;
|
|
920
|
+
}
|
|
921
|
+
module.exports = $gOPD;
|
|
922
|
+
}));
|
|
923
|
+
//#endregion
|
|
924
|
+
//#region ../../node_modules/.pnpm/es-define-property@1.0.1/node_modules/es-define-property/index.js
|
|
925
|
+
var require_es_define_property = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
926
|
+
var $defineProperty = Object.defineProperty || false;
|
|
927
|
+
if ($defineProperty) try {
|
|
928
|
+
$defineProperty({}, "a", { value: 1 });
|
|
929
|
+
} catch (e) {
|
|
930
|
+
$defineProperty = false;
|
|
931
|
+
}
|
|
932
|
+
module.exports = $defineProperty;
|
|
933
|
+
}));
|
|
934
|
+
//#endregion
|
|
935
|
+
//#region ../../node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/index.js
|
|
936
|
+
var require_has_symbols = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
937
|
+
var origSymbol = typeof Symbol !== "undefined" && Symbol;
|
|
938
|
+
var hasSymbolSham = require_shams();
|
|
939
|
+
module.exports = function hasNativeSymbols() {
|
|
940
|
+
if (typeof origSymbol !== "function") return false;
|
|
941
|
+
if (typeof Symbol !== "function") return false;
|
|
942
|
+
if (typeof origSymbol("foo") !== "symbol") return false;
|
|
943
|
+
if (typeof Symbol("bar") !== "symbol") return false;
|
|
944
|
+
return hasSymbolSham();
|
|
945
|
+
};
|
|
946
|
+
}));
|
|
947
|
+
//#endregion
|
|
948
|
+
//#region ../../node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Reflect.getPrototypeOf.js
|
|
949
|
+
var require_Reflect_getPrototypeOf = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
950
|
+
module.exports = typeof Reflect !== "undefined" && Reflect.getPrototypeOf || null;
|
|
951
|
+
}));
|
|
952
|
+
//#endregion
|
|
953
|
+
//#region ../../node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Object.getPrototypeOf.js
|
|
954
|
+
var require_Object_getPrototypeOf = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
955
|
+
module.exports = require_es_object_atoms().getPrototypeOf || null;
|
|
956
|
+
}));
|
|
957
|
+
//#endregion
|
|
958
|
+
//#region ../../node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js
|
|
959
|
+
var require_implementation$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
960
|
+
var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
|
|
961
|
+
var toStr = Object.prototype.toString;
|
|
962
|
+
var max = Math.max;
|
|
963
|
+
var funcType = "[object Function]";
|
|
964
|
+
var concatty = function concatty(a, b) {
|
|
965
|
+
var arr = [];
|
|
966
|
+
for (var i = 0; i < a.length; i += 1) arr[i] = a[i];
|
|
967
|
+
for (var j = 0; j < b.length; j += 1) arr[j + a.length] = b[j];
|
|
968
|
+
return arr;
|
|
969
|
+
};
|
|
970
|
+
var slicy = function slicy(arrLike, offset) {
|
|
971
|
+
var arr = [];
|
|
972
|
+
for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) arr[j] = arrLike[i];
|
|
973
|
+
return arr;
|
|
974
|
+
};
|
|
975
|
+
var joiny = function(arr, joiner) {
|
|
976
|
+
var str = "";
|
|
977
|
+
for (var i = 0; i < arr.length; i += 1) {
|
|
978
|
+
str += arr[i];
|
|
979
|
+
if (i + 1 < arr.length) str += joiner;
|
|
980
|
+
}
|
|
981
|
+
return str;
|
|
982
|
+
};
|
|
983
|
+
module.exports = function bind(that) {
|
|
984
|
+
var target = this;
|
|
985
|
+
if (typeof target !== "function" || toStr.apply(target) !== funcType) throw new TypeError(ERROR_MESSAGE + target);
|
|
986
|
+
var args = slicy(arguments, 1);
|
|
987
|
+
var bound;
|
|
988
|
+
var binder = function() {
|
|
989
|
+
if (this instanceof bound) {
|
|
990
|
+
var result = target.apply(this, concatty(args, arguments));
|
|
991
|
+
if (Object(result) === result) return result;
|
|
992
|
+
return this;
|
|
993
|
+
}
|
|
994
|
+
return target.apply(that, concatty(args, arguments));
|
|
995
|
+
};
|
|
996
|
+
var boundLength = max(0, target.length - args.length);
|
|
997
|
+
var boundArgs = [];
|
|
998
|
+
for (var i = 0; i < boundLength; i++) boundArgs[i] = "$" + i;
|
|
999
|
+
bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
|
|
1000
|
+
if (target.prototype) {
|
|
1001
|
+
var Empty = function Empty() {};
|
|
1002
|
+
Empty.prototype = target.prototype;
|
|
1003
|
+
bound.prototype = new Empty();
|
|
1004
|
+
Empty.prototype = null;
|
|
1005
|
+
}
|
|
1006
|
+
return bound;
|
|
1007
|
+
};
|
|
1008
|
+
}));
|
|
1009
|
+
//#endregion
|
|
1010
|
+
//#region ../../node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js
|
|
1011
|
+
var require_function_bind = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1012
|
+
var implementation = require_implementation$3();
|
|
1013
|
+
module.exports = Function.prototype.bind || implementation;
|
|
1014
|
+
}));
|
|
1015
|
+
//#endregion
|
|
1016
|
+
//#region ../../node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionCall.js
|
|
1017
|
+
var require_functionCall = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1018
|
+
module.exports = Function.prototype.call;
|
|
1019
|
+
}));
|
|
1020
|
+
//#endregion
|
|
1021
|
+
//#region ../../node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionApply.js
|
|
1022
|
+
var require_functionApply = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1023
|
+
module.exports = Function.prototype.apply;
|
|
1024
|
+
}));
|
|
1025
|
+
//#endregion
|
|
1026
|
+
//#region ../../node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/reflectApply.js
|
|
1027
|
+
var require_reflectApply = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1028
|
+
module.exports = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
|
|
1029
|
+
}));
|
|
1030
|
+
//#endregion
|
|
1031
|
+
//#region ../../node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/actualApply.js
|
|
1032
|
+
var require_actualApply = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1033
|
+
var bind = require_function_bind();
|
|
1034
|
+
var $apply = require_functionApply();
|
|
1035
|
+
var $call = require_functionCall();
|
|
1036
|
+
module.exports = require_reflectApply() || bind.call($call, $apply);
|
|
1037
|
+
}));
|
|
1038
|
+
//#endregion
|
|
1039
|
+
//#region ../../node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/index.js
|
|
1040
|
+
var require_call_bind_apply_helpers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1041
|
+
var bind = require_function_bind();
|
|
1042
|
+
var $TypeError = require_type();
|
|
1043
|
+
var $call = require_functionCall();
|
|
1044
|
+
var $actualApply = require_actualApply();
|
|
1045
|
+
module.exports = function callBindBasic(args) {
|
|
1046
|
+
if (args.length < 1 || typeof args[0] !== "function") throw new $TypeError("a function is required");
|
|
1047
|
+
return $actualApply(bind, $call, args);
|
|
1048
|
+
};
|
|
1049
|
+
}));
|
|
1050
|
+
//#endregion
|
|
1051
|
+
//#region ../../node_modules/.pnpm/dunder-proto@1.0.1/node_modules/dunder-proto/get.js
|
|
1052
|
+
var require_get = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1053
|
+
var callBind = require_call_bind_apply_helpers();
|
|
1054
|
+
var gOPD = require_gopd();
|
|
1055
|
+
var hasProtoAccessor;
|
|
1056
|
+
try {
|
|
1057
|
+
hasProtoAccessor = [].__proto__ === Array.prototype;
|
|
1058
|
+
} catch (e) {
|
|
1059
|
+
if (!e || typeof e !== "object" || !("code" in e) || e.code !== "ERR_PROTO_ACCESS") throw e;
|
|
1060
|
+
}
|
|
1061
|
+
var desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, "__proto__");
|
|
1062
|
+
var $Object = Object;
|
|
1063
|
+
var $getPrototypeOf = $Object.getPrototypeOf;
|
|
1064
|
+
module.exports = desc && typeof desc.get === "function" ? callBind([desc.get]) : typeof $getPrototypeOf === "function" ? function getDunder(value) {
|
|
1065
|
+
return $getPrototypeOf(value == null ? value : $Object(value));
|
|
1066
|
+
} : false;
|
|
1067
|
+
}));
|
|
1068
|
+
//#endregion
|
|
1069
|
+
//#region ../../node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/index.js
|
|
1070
|
+
var require_get_proto = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1071
|
+
var reflectGetProto = require_Reflect_getPrototypeOf();
|
|
1072
|
+
var originalGetProto = require_Object_getPrototypeOf();
|
|
1073
|
+
var getDunderProto = require_get();
|
|
1074
|
+
module.exports = reflectGetProto ? function getProto(O) {
|
|
1075
|
+
return reflectGetProto(O);
|
|
1076
|
+
} : originalGetProto ? function getProto(O) {
|
|
1077
|
+
if (!O || typeof O !== "object" && typeof O !== "function") throw new TypeError("getProto: not an object");
|
|
1078
|
+
return originalGetProto(O);
|
|
1079
|
+
} : getDunderProto ? function getProto(O) {
|
|
1080
|
+
return getDunderProto(O);
|
|
1081
|
+
} : null;
|
|
1082
|
+
}));
|
|
1083
|
+
//#endregion
|
|
1084
|
+
//#region ../../node_modules/.pnpm/hasown@2.0.4/node_modules/hasown/index.js
|
|
1085
|
+
var require_hasown = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1086
|
+
var call = Function.prototype.call;
|
|
1087
|
+
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
1088
|
+
module.exports = require_function_bind().call(call, $hasOwn);
|
|
1089
|
+
}));
|
|
1090
|
+
//#endregion
|
|
1091
|
+
//#region ../../node_modules/.pnpm/get-intrinsic@1.3.0/node_modules/get-intrinsic/index.js
|
|
1092
|
+
var require_get_intrinsic = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1093
|
+
var undefined;
|
|
1094
|
+
var $Object = require_es_object_atoms();
|
|
1095
|
+
var $Error = require_es_errors();
|
|
1096
|
+
var $EvalError = require_eval();
|
|
1097
|
+
var $RangeError = require_range();
|
|
1098
|
+
var $ReferenceError = require_ref();
|
|
1099
|
+
var $SyntaxError = require_syntax();
|
|
1100
|
+
var $TypeError = require_type();
|
|
1101
|
+
var $URIError = require_uri();
|
|
1102
|
+
var abs = require_abs();
|
|
1103
|
+
var floor = require_floor();
|
|
1104
|
+
var max = require_max();
|
|
1105
|
+
var min = require_min();
|
|
1106
|
+
var pow = require_pow();
|
|
1107
|
+
var round = require_round();
|
|
1108
|
+
var sign = require_sign();
|
|
1109
|
+
var $Function = Function;
|
|
1110
|
+
var getEvalledConstructor = function(expressionSyntax) {
|
|
1111
|
+
try {
|
|
1112
|
+
return $Function("\"use strict\"; return (" + expressionSyntax + ").constructor;")();
|
|
1113
|
+
} catch (e) {}
|
|
1114
|
+
};
|
|
1115
|
+
var $gOPD = require_gopd();
|
|
1116
|
+
var $defineProperty = require_es_define_property();
|
|
1117
|
+
var throwTypeError = function() {
|
|
1118
|
+
throw new $TypeError();
|
|
1119
|
+
};
|
|
1120
|
+
var ThrowTypeError = $gOPD ? function() {
|
|
1121
|
+
try {
|
|
1122
|
+
arguments.callee;
|
|
1123
|
+
return throwTypeError;
|
|
1124
|
+
} catch (calleeThrows) {
|
|
1125
|
+
try {
|
|
1126
|
+
return $gOPD(arguments, "callee").get;
|
|
1127
|
+
} catch (gOPDthrows) {
|
|
1128
|
+
return throwTypeError;
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
}() : throwTypeError;
|
|
1132
|
+
var hasSymbols = require_has_symbols()();
|
|
1133
|
+
var getProto = require_get_proto();
|
|
1134
|
+
var $ObjectGPO = require_Object_getPrototypeOf();
|
|
1135
|
+
var $ReflectGPO = require_Reflect_getPrototypeOf();
|
|
1136
|
+
var $apply = require_functionApply();
|
|
1137
|
+
var $call = require_functionCall();
|
|
1138
|
+
var needsEval = {};
|
|
1139
|
+
var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined : getProto(Uint8Array);
|
|
1140
|
+
var INTRINSICS = {
|
|
1141
|
+
__proto__: null,
|
|
1142
|
+
"%AggregateError%": typeof AggregateError === "undefined" ? undefined : AggregateError,
|
|
1143
|
+
"%Array%": Array,
|
|
1144
|
+
"%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined : ArrayBuffer,
|
|
1145
|
+
"%ArrayIteratorPrototype%": hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,
|
|
1146
|
+
"%AsyncFromSyncIteratorPrototype%": undefined,
|
|
1147
|
+
"%AsyncFunction%": needsEval,
|
|
1148
|
+
"%AsyncGenerator%": needsEval,
|
|
1149
|
+
"%AsyncGeneratorFunction%": needsEval,
|
|
1150
|
+
"%AsyncIteratorPrototype%": needsEval,
|
|
1151
|
+
"%Atomics%": typeof Atomics === "undefined" ? undefined : Atomics,
|
|
1152
|
+
"%BigInt%": typeof BigInt === "undefined" ? undefined : BigInt,
|
|
1153
|
+
"%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined : BigInt64Array,
|
|
1154
|
+
"%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined : BigUint64Array,
|
|
1155
|
+
"%Boolean%": Boolean,
|
|
1156
|
+
"%DataView%": typeof DataView === "undefined" ? undefined : DataView,
|
|
1157
|
+
"%Date%": Date,
|
|
1158
|
+
"%decodeURI%": decodeURI,
|
|
1159
|
+
"%decodeURIComponent%": decodeURIComponent,
|
|
1160
|
+
"%encodeURI%": encodeURI,
|
|
1161
|
+
"%encodeURIComponent%": encodeURIComponent,
|
|
1162
|
+
"%Error%": $Error,
|
|
1163
|
+
"%eval%": eval,
|
|
1164
|
+
"%EvalError%": $EvalError,
|
|
1165
|
+
"%Float16Array%": typeof Float16Array === "undefined" ? undefined : Float16Array,
|
|
1166
|
+
"%Float32Array%": typeof Float32Array === "undefined" ? undefined : Float32Array,
|
|
1167
|
+
"%Float64Array%": typeof Float64Array === "undefined" ? undefined : Float64Array,
|
|
1168
|
+
"%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined : FinalizationRegistry,
|
|
1169
|
+
"%Function%": $Function,
|
|
1170
|
+
"%GeneratorFunction%": needsEval,
|
|
1171
|
+
"%Int8Array%": typeof Int8Array === "undefined" ? undefined : Int8Array,
|
|
1172
|
+
"%Int16Array%": typeof Int16Array === "undefined" ? undefined : Int16Array,
|
|
1173
|
+
"%Int32Array%": typeof Int32Array === "undefined" ? undefined : Int32Array,
|
|
1174
|
+
"%isFinite%": isFinite,
|
|
1175
|
+
"%isNaN%": isNaN,
|
|
1176
|
+
"%IteratorPrototype%": hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,
|
|
1177
|
+
"%JSON%": typeof JSON === "object" ? JSON : undefined,
|
|
1178
|
+
"%Map%": typeof Map === "undefined" ? undefined : Map,
|
|
1179
|
+
"%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols || !getProto ? undefined : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
1180
|
+
"%Math%": Math,
|
|
1181
|
+
"%Number%": Number,
|
|
1182
|
+
"%Object%": $Object,
|
|
1183
|
+
"%Object.getOwnPropertyDescriptor%": $gOPD,
|
|
1184
|
+
"%parseFloat%": parseFloat,
|
|
1185
|
+
"%parseInt%": parseInt,
|
|
1186
|
+
"%Promise%": typeof Promise === "undefined" ? undefined : Promise,
|
|
1187
|
+
"%Proxy%": typeof Proxy === "undefined" ? undefined : Proxy,
|
|
1188
|
+
"%RangeError%": $RangeError,
|
|
1189
|
+
"%ReferenceError%": $ReferenceError,
|
|
1190
|
+
"%Reflect%": typeof Reflect === "undefined" ? undefined : Reflect,
|
|
1191
|
+
"%RegExp%": RegExp,
|
|
1192
|
+
"%Set%": typeof Set === "undefined" ? undefined : Set,
|
|
1193
|
+
"%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols || !getProto ? undefined : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()),
|
|
1194
|
+
"%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined : SharedArrayBuffer,
|
|
1195
|
+
"%String%": String,
|
|
1196
|
+
"%StringIteratorPrototype%": hasSymbols && getProto ? getProto(""[Symbol.iterator]()) : undefined,
|
|
1197
|
+
"%Symbol%": hasSymbols ? Symbol : undefined,
|
|
1198
|
+
"%SyntaxError%": $SyntaxError,
|
|
1199
|
+
"%ThrowTypeError%": ThrowTypeError,
|
|
1200
|
+
"%TypedArray%": TypedArray,
|
|
1201
|
+
"%TypeError%": $TypeError,
|
|
1202
|
+
"%Uint8Array%": typeof Uint8Array === "undefined" ? undefined : Uint8Array,
|
|
1203
|
+
"%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined : Uint8ClampedArray,
|
|
1204
|
+
"%Uint16Array%": typeof Uint16Array === "undefined" ? undefined : Uint16Array,
|
|
1205
|
+
"%Uint32Array%": typeof Uint32Array === "undefined" ? undefined : Uint32Array,
|
|
1206
|
+
"%URIError%": $URIError,
|
|
1207
|
+
"%WeakMap%": typeof WeakMap === "undefined" ? undefined : WeakMap,
|
|
1208
|
+
"%WeakRef%": typeof WeakRef === "undefined" ? undefined : WeakRef,
|
|
1209
|
+
"%WeakSet%": typeof WeakSet === "undefined" ? undefined : WeakSet,
|
|
1210
|
+
"%Function.prototype.call%": $call,
|
|
1211
|
+
"%Function.prototype.apply%": $apply,
|
|
1212
|
+
"%Object.defineProperty%": $defineProperty,
|
|
1213
|
+
"%Object.getPrototypeOf%": $ObjectGPO,
|
|
1214
|
+
"%Math.abs%": abs,
|
|
1215
|
+
"%Math.floor%": floor,
|
|
1216
|
+
"%Math.max%": max,
|
|
1217
|
+
"%Math.min%": min,
|
|
1218
|
+
"%Math.pow%": pow,
|
|
1219
|
+
"%Math.round%": round,
|
|
1220
|
+
"%Math.sign%": sign,
|
|
1221
|
+
"%Reflect.getPrototypeOf%": $ReflectGPO
|
|
1222
|
+
};
|
|
1223
|
+
if (getProto) try {
|
|
1224
|
+
null.error;
|
|
1225
|
+
} catch (e) {
|
|
1226
|
+
INTRINSICS["%Error.prototype%"] = getProto(getProto(e));
|
|
1227
|
+
}
|
|
1228
|
+
var doEval = function doEval(name) {
|
|
1229
|
+
var value;
|
|
1230
|
+
if (name === "%AsyncFunction%") value = getEvalledConstructor("async function () {}");
|
|
1231
|
+
else if (name === "%GeneratorFunction%") value = getEvalledConstructor("function* () {}");
|
|
1232
|
+
else if (name === "%AsyncGeneratorFunction%") value = getEvalledConstructor("async function* () {}");
|
|
1233
|
+
else if (name === "%AsyncGenerator%") {
|
|
1234
|
+
var fn = doEval("%AsyncGeneratorFunction%");
|
|
1235
|
+
if (fn) value = fn.prototype;
|
|
1236
|
+
} else if (name === "%AsyncIteratorPrototype%") {
|
|
1237
|
+
var gen = doEval("%AsyncGenerator%");
|
|
1238
|
+
if (gen && getProto) value = getProto(gen.prototype);
|
|
1239
|
+
}
|
|
1240
|
+
INTRINSICS[name] = value;
|
|
1241
|
+
return value;
|
|
1242
|
+
};
|
|
1243
|
+
var LEGACY_ALIASES = {
|
|
1244
|
+
__proto__: null,
|
|
1245
|
+
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
1246
|
+
"%ArrayPrototype%": ["Array", "prototype"],
|
|
1247
|
+
"%ArrayProto_entries%": [
|
|
1248
|
+
"Array",
|
|
1249
|
+
"prototype",
|
|
1250
|
+
"entries"
|
|
1251
|
+
],
|
|
1252
|
+
"%ArrayProto_forEach%": [
|
|
1253
|
+
"Array",
|
|
1254
|
+
"prototype",
|
|
1255
|
+
"forEach"
|
|
1256
|
+
],
|
|
1257
|
+
"%ArrayProto_keys%": [
|
|
1258
|
+
"Array",
|
|
1259
|
+
"prototype",
|
|
1260
|
+
"keys"
|
|
1261
|
+
],
|
|
1262
|
+
"%ArrayProto_values%": [
|
|
1263
|
+
"Array",
|
|
1264
|
+
"prototype",
|
|
1265
|
+
"values"
|
|
1266
|
+
],
|
|
1267
|
+
"%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
|
|
1268
|
+
"%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
|
|
1269
|
+
"%AsyncGeneratorPrototype%": [
|
|
1270
|
+
"AsyncGeneratorFunction",
|
|
1271
|
+
"prototype",
|
|
1272
|
+
"prototype"
|
|
1273
|
+
],
|
|
1274
|
+
"%BooleanPrototype%": ["Boolean", "prototype"],
|
|
1275
|
+
"%DataViewPrototype%": ["DataView", "prototype"],
|
|
1276
|
+
"%DatePrototype%": ["Date", "prototype"],
|
|
1277
|
+
"%ErrorPrototype%": ["Error", "prototype"],
|
|
1278
|
+
"%EvalErrorPrototype%": ["EvalError", "prototype"],
|
|
1279
|
+
"%Float32ArrayPrototype%": ["Float32Array", "prototype"],
|
|
1280
|
+
"%Float64ArrayPrototype%": ["Float64Array", "prototype"],
|
|
1281
|
+
"%FunctionPrototype%": ["Function", "prototype"],
|
|
1282
|
+
"%Generator%": ["GeneratorFunction", "prototype"],
|
|
1283
|
+
"%GeneratorPrototype%": [
|
|
1284
|
+
"GeneratorFunction",
|
|
1285
|
+
"prototype",
|
|
1286
|
+
"prototype"
|
|
1287
|
+
],
|
|
1288
|
+
"%Int8ArrayPrototype%": ["Int8Array", "prototype"],
|
|
1289
|
+
"%Int16ArrayPrototype%": ["Int16Array", "prototype"],
|
|
1290
|
+
"%Int32ArrayPrototype%": ["Int32Array", "prototype"],
|
|
1291
|
+
"%JSONParse%": ["JSON", "parse"],
|
|
1292
|
+
"%JSONStringify%": ["JSON", "stringify"],
|
|
1293
|
+
"%MapPrototype%": ["Map", "prototype"],
|
|
1294
|
+
"%NumberPrototype%": ["Number", "prototype"],
|
|
1295
|
+
"%ObjectPrototype%": ["Object", "prototype"],
|
|
1296
|
+
"%ObjProto_toString%": [
|
|
1297
|
+
"Object",
|
|
1298
|
+
"prototype",
|
|
1299
|
+
"toString"
|
|
1300
|
+
],
|
|
1301
|
+
"%ObjProto_valueOf%": [
|
|
1302
|
+
"Object",
|
|
1303
|
+
"prototype",
|
|
1304
|
+
"valueOf"
|
|
1305
|
+
],
|
|
1306
|
+
"%PromisePrototype%": ["Promise", "prototype"],
|
|
1307
|
+
"%PromiseProto_then%": [
|
|
1308
|
+
"Promise",
|
|
1309
|
+
"prototype",
|
|
1310
|
+
"then"
|
|
1311
|
+
],
|
|
1312
|
+
"%Promise_all%": ["Promise", "all"],
|
|
1313
|
+
"%Promise_reject%": ["Promise", "reject"],
|
|
1314
|
+
"%Promise_resolve%": ["Promise", "resolve"],
|
|
1315
|
+
"%RangeErrorPrototype%": ["RangeError", "prototype"],
|
|
1316
|
+
"%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
|
|
1317
|
+
"%RegExpPrototype%": ["RegExp", "prototype"],
|
|
1318
|
+
"%SetPrototype%": ["Set", "prototype"],
|
|
1319
|
+
"%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
|
|
1320
|
+
"%StringPrototype%": ["String", "prototype"],
|
|
1321
|
+
"%SymbolPrototype%": ["Symbol", "prototype"],
|
|
1322
|
+
"%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
|
|
1323
|
+
"%TypedArrayPrototype%": ["TypedArray", "prototype"],
|
|
1324
|
+
"%TypeErrorPrototype%": ["TypeError", "prototype"],
|
|
1325
|
+
"%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
|
|
1326
|
+
"%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
|
|
1327
|
+
"%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
|
|
1328
|
+
"%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
|
|
1329
|
+
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
1330
|
+
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
1331
|
+
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
1332
|
+
};
|
|
1333
|
+
var bind = require_function_bind();
|
|
1334
|
+
var hasOwn = require_hasown();
|
|
1335
|
+
var $concat = bind.call($call, Array.prototype.concat);
|
|
1336
|
+
var $spliceApply = bind.call($apply, Array.prototype.splice);
|
|
1337
|
+
var $replace = bind.call($call, String.prototype.replace);
|
|
1338
|
+
var $strSlice = bind.call($call, String.prototype.slice);
|
|
1339
|
+
var $exec = bind.call($call, RegExp.prototype.exec);
|
|
1340
|
+
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
1341
|
+
var reEscapeChar = /\\(\\)?/g;
|
|
1342
|
+
var stringToPath = function stringToPath(string) {
|
|
1343
|
+
var first = $strSlice(string, 0, 1);
|
|
1344
|
+
var last = $strSlice(string, -1);
|
|
1345
|
+
if (first === "%" && last !== "%") throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");
|
|
1346
|
+
else if (last === "%" && first !== "%") throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
|
|
1347
|
+
var result = [];
|
|
1348
|
+
$replace(string, rePropName, function(match, number, quote, subString) {
|
|
1349
|
+
result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number || match;
|
|
1350
|
+
});
|
|
1351
|
+
return result;
|
|
1352
|
+
};
|
|
1353
|
+
var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
|
|
1354
|
+
var intrinsicName = name;
|
|
1355
|
+
var alias;
|
|
1356
|
+
if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
|
|
1357
|
+
alias = LEGACY_ALIASES[intrinsicName];
|
|
1358
|
+
intrinsicName = "%" + alias[0] + "%";
|
|
1359
|
+
}
|
|
1360
|
+
if (hasOwn(INTRINSICS, intrinsicName)) {
|
|
1361
|
+
var value = INTRINSICS[intrinsicName];
|
|
1362
|
+
if (value === needsEval) value = doEval(intrinsicName);
|
|
1363
|
+
if (typeof value === "undefined" && !allowMissing) throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!");
|
|
1364
|
+
return {
|
|
1365
|
+
alias,
|
|
1366
|
+
name: intrinsicName,
|
|
1367
|
+
value
|
|
1368
|
+
};
|
|
1369
|
+
}
|
|
1370
|
+
throw new $SyntaxError("intrinsic " + name + " does not exist!");
|
|
1371
|
+
};
|
|
1372
|
+
module.exports = function GetIntrinsic(name, allowMissing) {
|
|
1373
|
+
if (typeof name !== "string" || name.length === 0) throw new $TypeError("intrinsic name must be a non-empty string");
|
|
1374
|
+
if (arguments.length > 1 && typeof allowMissing !== "boolean") throw new $TypeError("\"allowMissing\" argument must be a boolean");
|
|
1375
|
+
if ($exec(/^%?[^%]*%?$/, name) === null) throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
1376
|
+
var parts = stringToPath(name);
|
|
1377
|
+
var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
|
|
1378
|
+
var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
|
|
1379
|
+
var intrinsicRealName = intrinsic.name;
|
|
1380
|
+
var value = intrinsic.value;
|
|
1381
|
+
var skipFurtherCaching = false;
|
|
1382
|
+
var alias = intrinsic.alias;
|
|
1383
|
+
if (alias) {
|
|
1384
|
+
intrinsicBaseName = alias[0];
|
|
1385
|
+
$spliceApply(parts, $concat([0, 1], alias));
|
|
1386
|
+
}
|
|
1387
|
+
for (var i = 1, isOwn = true; i < parts.length; i += 1) {
|
|
1388
|
+
var part = parts[i];
|
|
1389
|
+
var first = $strSlice(part, 0, 1);
|
|
1390
|
+
var last = $strSlice(part, -1);
|
|
1391
|
+
if ((first === "\"" || first === "'" || first === "`" || last === "\"" || last === "'" || last === "`") && first !== last) throw new $SyntaxError("property names with quotes must have matching quotes");
|
|
1392
|
+
if (part === "constructor" || !isOwn) skipFurtherCaching = true;
|
|
1393
|
+
intrinsicBaseName += "." + part;
|
|
1394
|
+
intrinsicRealName = "%" + intrinsicBaseName + "%";
|
|
1395
|
+
if (hasOwn(INTRINSICS, intrinsicRealName)) value = INTRINSICS[intrinsicRealName];
|
|
1396
|
+
else if (value != null) {
|
|
1397
|
+
if (!(part in value)) {
|
|
1398
|
+
if (!allowMissing) throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available.");
|
|
1399
|
+
return;
|
|
1400
|
+
}
|
|
1401
|
+
if ($gOPD && i + 1 >= parts.length) {
|
|
1402
|
+
var desc = $gOPD(value, part);
|
|
1403
|
+
isOwn = !!desc;
|
|
1404
|
+
if (isOwn && "get" in desc && !("originalValue" in desc.get)) value = desc.get;
|
|
1405
|
+
else value = value[part];
|
|
1406
|
+
} else {
|
|
1407
|
+
isOwn = hasOwn(value, part);
|
|
1408
|
+
value = value[part];
|
|
1409
|
+
}
|
|
1410
|
+
if (isOwn && !skipFurtherCaching) INTRINSICS[intrinsicRealName] = value;
|
|
1411
|
+
}
|
|
1412
|
+
}
|
|
1413
|
+
return value;
|
|
1414
|
+
};
|
|
1415
|
+
}));
|
|
1416
|
+
//#endregion
|
|
1417
|
+
//#region ../../node_modules/.pnpm/call-bound@1.0.4/node_modules/call-bound/index.js
|
|
1418
|
+
var require_call_bound = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1419
|
+
var GetIntrinsic = require_get_intrinsic();
|
|
1420
|
+
var callBindBasic = require_call_bind_apply_helpers();
|
|
1421
|
+
var $indexOf = callBindBasic([GetIntrinsic("%String.prototype.indexOf%")]);
|
|
1422
|
+
module.exports = function callBoundIntrinsic(name, allowMissing) {
|
|
1423
|
+
var intrinsic = GetIntrinsic(name, !!allowMissing);
|
|
1424
|
+
if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) return callBindBasic([intrinsic]);
|
|
1425
|
+
return intrinsic;
|
|
1426
|
+
};
|
|
1427
|
+
}));
|
|
1428
|
+
//#endregion
|
|
1429
|
+
//#region ../../node_modules/.pnpm/object.assign@4.1.7/node_modules/object.assign/implementation.js
|
|
1430
|
+
var require_implementation$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1431
|
+
var objectKeys = require_object_keys();
|
|
1432
|
+
var hasSymbols = require_shams()();
|
|
1433
|
+
var callBound = require_call_bound();
|
|
1434
|
+
var $Object = require_es_object_atoms();
|
|
1435
|
+
var $push = callBound("Array.prototype.push");
|
|
1436
|
+
var $propIsEnumerable = callBound("Object.prototype.propertyIsEnumerable");
|
|
1437
|
+
var originalGetSymbols = hasSymbols ? $Object.getOwnPropertySymbols : null;
|
|
1438
|
+
module.exports = function assign(target, source1) {
|
|
1439
|
+
if (target == null) throw new TypeError("target must be an object");
|
|
1440
|
+
var to = $Object(target);
|
|
1441
|
+
if (arguments.length === 1) return to;
|
|
1442
|
+
for (var s = 1; s < arguments.length; ++s) {
|
|
1443
|
+
var from = $Object(arguments[s]);
|
|
1444
|
+
var keys = objectKeys(from);
|
|
1445
|
+
var getSymbols = hasSymbols && ($Object.getOwnPropertySymbols || originalGetSymbols);
|
|
1446
|
+
if (getSymbols) {
|
|
1447
|
+
var syms = getSymbols(from);
|
|
1448
|
+
for (var j = 0; j < syms.length; ++j) {
|
|
1449
|
+
var key = syms[j];
|
|
1450
|
+
if ($propIsEnumerable(from, key)) $push(keys, key);
|
|
1451
|
+
}
|
|
1452
|
+
}
|
|
1453
|
+
for (var i = 0; i < keys.length; ++i) {
|
|
1454
|
+
var nextKey = keys[i];
|
|
1455
|
+
if ($propIsEnumerable(from, nextKey)) to[nextKey] = from[nextKey];
|
|
1456
|
+
}
|
|
1457
|
+
}
|
|
1458
|
+
return to;
|
|
1459
|
+
};
|
|
1460
|
+
}));
|
|
1461
|
+
//#endregion
|
|
1462
|
+
//#region ../../node_modules/.pnpm/object.assign@4.1.7/node_modules/object.assign/polyfill.js
|
|
1463
|
+
var require_polyfill$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1464
|
+
var implementation = require_implementation$2();
|
|
1465
|
+
var lacksProperEnumerationOrder = function() {
|
|
1466
|
+
if (!Object.assign) return false;
|
|
1467
|
+
var str = "abcdefghijklmnopqrst";
|
|
1468
|
+
var letters = str.split("");
|
|
1469
|
+
var map = {};
|
|
1470
|
+
for (var i = 0; i < letters.length; ++i) map[letters[i]] = letters[i];
|
|
1471
|
+
var obj = Object.assign({}, map);
|
|
1472
|
+
var actual = "";
|
|
1473
|
+
for (var k in obj) actual += k;
|
|
1474
|
+
return str !== actual;
|
|
1475
|
+
};
|
|
1476
|
+
var assignHasPendingExceptions = function() {
|
|
1477
|
+
if (!Object.assign || !Object.preventExtensions) return false;
|
|
1478
|
+
var thrower = Object.preventExtensions({ 1: 2 });
|
|
1479
|
+
try {
|
|
1480
|
+
Object.assign(thrower, "xy");
|
|
1481
|
+
} catch (e) {
|
|
1482
|
+
return thrower[1] === "y";
|
|
1483
|
+
}
|
|
1484
|
+
return false;
|
|
1485
|
+
};
|
|
1486
|
+
module.exports = function getPolyfill() {
|
|
1487
|
+
if (!Object.assign) return implementation;
|
|
1488
|
+
if (lacksProperEnumerationOrder()) return implementation;
|
|
1489
|
+
if (assignHasPendingExceptions()) return implementation;
|
|
1490
|
+
return Object.assign;
|
|
1491
|
+
};
|
|
1492
|
+
}));
|
|
1493
|
+
//#endregion
|
|
1494
|
+
//#region ../../node_modules/.pnpm/object-is@1.1.6/node_modules/object-is/implementation.js
|
|
1495
|
+
var require_implementation$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1496
|
+
var numberIsNaN = function(value) {
|
|
1497
|
+
return value !== value;
|
|
1498
|
+
};
|
|
1499
|
+
module.exports = function is(a, b) {
|
|
1500
|
+
if (a === 0 && b === 0) return 1 / a === 1 / b;
|
|
1501
|
+
if (a === b) return true;
|
|
1502
|
+
if (numberIsNaN(a) && numberIsNaN(b)) return true;
|
|
1503
|
+
return false;
|
|
1504
|
+
};
|
|
1505
|
+
}));
|
|
1506
|
+
//#endregion
|
|
1507
|
+
//#region ../../node_modules/.pnpm/object-is@1.1.6/node_modules/object-is/polyfill.js
|
|
1508
|
+
var require_polyfill$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1509
|
+
var implementation = require_implementation$1();
|
|
1510
|
+
module.exports = function getPolyfill() {
|
|
1511
|
+
return typeof Object.is === "function" ? Object.is : implementation;
|
|
1512
|
+
};
|
|
1513
|
+
}));
|
|
1514
|
+
//#endregion
|
|
1515
|
+
//#region ../../node_modules/.pnpm/define-data-property@1.1.4/node_modules/define-data-property/index.js
|
|
1516
|
+
var require_define_data_property = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1517
|
+
var $defineProperty = require_es_define_property();
|
|
1518
|
+
var $SyntaxError = require_syntax();
|
|
1519
|
+
var $TypeError = require_type();
|
|
1520
|
+
var gopd = require_gopd();
|
|
1521
|
+
module.exports = function defineDataProperty(obj, property, value) {
|
|
1522
|
+
if (!obj || typeof obj !== "object" && typeof obj !== "function") throw new $TypeError("`obj` must be an object or a function`");
|
|
1523
|
+
if (typeof property !== "string" && typeof property !== "symbol") throw new $TypeError("`property` must be a string or a symbol`");
|
|
1524
|
+
if (arguments.length > 3 && typeof arguments[3] !== "boolean" && arguments[3] !== null) throw new $TypeError("`nonEnumerable`, if provided, must be a boolean or null");
|
|
1525
|
+
if (arguments.length > 4 && typeof arguments[4] !== "boolean" && arguments[4] !== null) throw new $TypeError("`nonWritable`, if provided, must be a boolean or null");
|
|
1526
|
+
if (arguments.length > 5 && typeof arguments[5] !== "boolean" && arguments[5] !== null) throw new $TypeError("`nonConfigurable`, if provided, must be a boolean or null");
|
|
1527
|
+
if (arguments.length > 6 && typeof arguments[6] !== "boolean") throw new $TypeError("`loose`, if provided, must be a boolean");
|
|
1528
|
+
var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
|
|
1529
|
+
var nonWritable = arguments.length > 4 ? arguments[4] : null;
|
|
1530
|
+
var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
|
|
1531
|
+
var loose = arguments.length > 6 ? arguments[6] : false;
|
|
1532
|
+
var desc = !!gopd && gopd(obj, property);
|
|
1533
|
+
if ($defineProperty) $defineProperty(obj, property, {
|
|
1534
|
+
configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
|
|
1535
|
+
enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
|
|
1536
|
+
value,
|
|
1537
|
+
writable: nonWritable === null && desc ? desc.writable : !nonWritable
|
|
1538
|
+
});
|
|
1539
|
+
else if (loose || !nonEnumerable && !nonWritable && !nonConfigurable) obj[property] = value;
|
|
1540
|
+
else throw new $SyntaxError("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
1541
|
+
};
|
|
1542
|
+
}));
|
|
1543
|
+
//#endregion
|
|
1544
|
+
//#region ../../node_modules/.pnpm/has-property-descriptors@1.0.2/node_modules/has-property-descriptors/index.js
|
|
1545
|
+
var require_has_property_descriptors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1546
|
+
var $defineProperty = require_es_define_property();
|
|
1547
|
+
var hasPropertyDescriptors = function hasPropertyDescriptors() {
|
|
1548
|
+
return !!$defineProperty;
|
|
1549
|
+
};
|
|
1550
|
+
hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
|
|
1551
|
+
if (!$defineProperty) return null;
|
|
1552
|
+
try {
|
|
1553
|
+
return $defineProperty([], "length", { value: 1 }).length !== 1;
|
|
1554
|
+
} catch (e) {
|
|
1555
|
+
return true;
|
|
1556
|
+
}
|
|
1557
|
+
};
|
|
1558
|
+
module.exports = hasPropertyDescriptors;
|
|
1559
|
+
}));
|
|
1560
|
+
//#endregion
|
|
1561
|
+
//#region ../../node_modules/.pnpm/set-function-length@1.2.2/node_modules/set-function-length/index.js
|
|
1562
|
+
var require_set_function_length = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1563
|
+
var GetIntrinsic = require_get_intrinsic();
|
|
1564
|
+
var define = require_define_data_property();
|
|
1565
|
+
var hasDescriptors = require_has_property_descriptors()();
|
|
1566
|
+
var gOPD = require_gopd();
|
|
1567
|
+
var $TypeError = require_type();
|
|
1568
|
+
var $floor = GetIntrinsic("%Math.floor%");
|
|
1569
|
+
module.exports = function setFunctionLength(fn, length) {
|
|
1570
|
+
if (typeof fn !== "function") throw new $TypeError("`fn` is not a function");
|
|
1571
|
+
if (typeof length !== "number" || length < 0 || length > 4294967295 || $floor(length) !== length) throw new $TypeError("`length` must be a positive 32-bit integer");
|
|
1572
|
+
var loose = arguments.length > 2 && !!arguments[2];
|
|
1573
|
+
var functionLengthIsConfigurable = true;
|
|
1574
|
+
var functionLengthIsWritable = true;
|
|
1575
|
+
if ("length" in fn && gOPD) {
|
|
1576
|
+
var desc = gOPD(fn, "length");
|
|
1577
|
+
if (desc && !desc.configurable) functionLengthIsConfigurable = false;
|
|
1578
|
+
if (desc && !desc.writable) functionLengthIsWritable = false;
|
|
1579
|
+
}
|
|
1580
|
+
if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
|
|
1581
|
+
if (hasDescriptors) define(fn, "length", length, true, true);
|
|
1582
|
+
else define(fn, "length", length);
|
|
1583
|
+
}
|
|
1584
|
+
return fn;
|
|
1585
|
+
};
|
|
1586
|
+
}));
|
|
1587
|
+
//#endregion
|
|
1588
|
+
//#region ../../node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/applyBind.js
|
|
1589
|
+
var require_applyBind = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1590
|
+
var bind = require_function_bind();
|
|
1591
|
+
var $apply = require_functionApply();
|
|
1592
|
+
var actualApply = require_actualApply();
|
|
1593
|
+
module.exports = function applyBind() {
|
|
1594
|
+
return actualApply(bind, $apply, arguments);
|
|
1595
|
+
};
|
|
1596
|
+
}));
|
|
1597
|
+
//#endregion
|
|
1598
|
+
//#region ../../node_modules/.pnpm/call-bind@1.0.9/node_modules/call-bind/index.js
|
|
1599
|
+
var require_call_bind = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1600
|
+
var setFunctionLength = require_set_function_length();
|
|
1601
|
+
var $defineProperty = require_es_define_property();
|
|
1602
|
+
var callBindBasic = require_call_bind_apply_helpers();
|
|
1603
|
+
var applyBind = require_applyBind();
|
|
1604
|
+
module.exports = function callBind(originalFunction) {
|
|
1605
|
+
var func = callBindBasic(arguments);
|
|
1606
|
+
var adjustedLength = 1 + originalFunction.length - (arguments.length - 1);
|
|
1607
|
+
return setFunctionLength(func, adjustedLength > 0 ? adjustedLength : 0, true);
|
|
1608
|
+
};
|
|
1609
|
+
if ($defineProperty) $defineProperty(module.exports, "apply", { value: applyBind });
|
|
1610
|
+
else module.exports.apply = applyBind;
|
|
1611
|
+
}));
|
|
1612
|
+
//#endregion
|
|
1613
|
+
//#region ../../node_modules/.pnpm/call-bind@1.0.9/node_modules/call-bind/callBound.js
|
|
1614
|
+
var require_callBound = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1615
|
+
var GetIntrinsic = require_get_intrinsic();
|
|
1616
|
+
var callBind = require_call_bind();
|
|
1617
|
+
var $indexOf = callBind(GetIntrinsic("String.prototype.indexOf"));
|
|
1618
|
+
module.exports = function callBoundIntrinsic(name, allowMissing) {
|
|
1619
|
+
var intrinsic = GetIntrinsic(name, !!allowMissing);
|
|
1620
|
+
if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) return callBind(intrinsic);
|
|
1621
|
+
return intrinsic;
|
|
1622
|
+
};
|
|
1623
|
+
}));
|
|
1624
|
+
//#endregion
|
|
1625
|
+
//#region ../../node_modules/.pnpm/define-properties@1.2.1/node_modules/define-properties/index.js
|
|
1626
|
+
var require_define_properties = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1627
|
+
var keys = require_object_keys();
|
|
1628
|
+
var hasSymbols = typeof Symbol === "function" && typeof Symbol("foo") === "symbol";
|
|
1629
|
+
var toStr = Object.prototype.toString;
|
|
1630
|
+
var concat = Array.prototype.concat;
|
|
1631
|
+
var defineDataProperty = require_define_data_property();
|
|
1632
|
+
var isFunction = function(fn) {
|
|
1633
|
+
return typeof fn === "function" && toStr.call(fn) === "[object Function]";
|
|
1634
|
+
};
|
|
1635
|
+
var supportsDescriptors = require_has_property_descriptors()();
|
|
1636
|
+
var defineProperty = function(object, name, value, predicate) {
|
|
1637
|
+
if (name in object) {
|
|
1638
|
+
if (predicate === true) {
|
|
1639
|
+
if (object[name] === value) return;
|
|
1640
|
+
} else if (!isFunction(predicate) || !predicate()) return;
|
|
1641
|
+
}
|
|
1642
|
+
if (supportsDescriptors) defineDataProperty(object, name, value, true);
|
|
1643
|
+
else defineDataProperty(object, name, value);
|
|
1644
|
+
};
|
|
1645
|
+
var defineProperties = function(object, map) {
|
|
1646
|
+
var predicates = arguments.length > 2 ? arguments[2] : {};
|
|
1647
|
+
var props = keys(map);
|
|
1648
|
+
if (hasSymbols) props = concat.call(props, Object.getOwnPropertySymbols(map));
|
|
1649
|
+
for (var i = 0; i < props.length; i += 1) defineProperty(object, props[i], map[props[i]], predicates[props[i]]);
|
|
1650
|
+
};
|
|
1651
|
+
defineProperties.supportsDescriptors = !!supportsDescriptors;
|
|
1652
|
+
module.exports = defineProperties;
|
|
1653
|
+
}));
|
|
1654
|
+
//#endregion
|
|
1655
|
+
//#region ../../node_modules/.pnpm/object-is@1.1.6/node_modules/object-is/shim.js
|
|
1656
|
+
var require_shim$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1657
|
+
var getPolyfill = require_polyfill$1();
|
|
1658
|
+
var define = require_define_properties();
|
|
1659
|
+
module.exports = function shimObjectIs() {
|
|
1660
|
+
var polyfill = getPolyfill();
|
|
1661
|
+
define(Object, { is: polyfill }, { is: function testObjectIs() {
|
|
1662
|
+
return Object.is !== polyfill;
|
|
1663
|
+
} });
|
|
1664
|
+
return polyfill;
|
|
1665
|
+
};
|
|
1666
|
+
}));
|
|
1667
|
+
//#endregion
|
|
1668
|
+
//#region ../../node_modules/.pnpm/object-is@1.1.6/node_modules/object-is/index.js
|
|
1669
|
+
var require_object_is = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1670
|
+
var define = require_define_properties();
|
|
1671
|
+
var callBind = require_call_bind();
|
|
1672
|
+
var implementation = require_implementation$1();
|
|
1673
|
+
var getPolyfill = require_polyfill$1();
|
|
1674
|
+
var shim = require_shim$1();
|
|
1675
|
+
var polyfill = callBind(getPolyfill(), Object);
|
|
1676
|
+
define(polyfill, {
|
|
1677
|
+
getPolyfill,
|
|
1678
|
+
implementation,
|
|
1679
|
+
shim
|
|
1680
|
+
});
|
|
1681
|
+
module.exports = polyfill;
|
|
1682
|
+
}));
|
|
1683
|
+
//#endregion
|
|
1684
|
+
//#region ../../node_modules/.pnpm/is-nan@1.3.2/node_modules/is-nan/implementation.js
|
|
1685
|
+
var require_implementation = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1686
|
+
module.exports = function isNaN(value) {
|
|
1687
|
+
return value !== value;
|
|
1688
|
+
};
|
|
1689
|
+
}));
|
|
1690
|
+
//#endregion
|
|
1691
|
+
//#region ../../node_modules/.pnpm/is-nan@1.3.2/node_modules/is-nan/polyfill.js
|
|
1692
|
+
var require_polyfill = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1693
|
+
var implementation = require_implementation();
|
|
1694
|
+
module.exports = function getPolyfill() {
|
|
1695
|
+
if (Number.isNaN && !Number.isNaN("a")) return Number.isNaN;
|
|
1696
|
+
return implementation;
|
|
1697
|
+
};
|
|
1698
|
+
}));
|
|
1699
|
+
//#endregion
|
|
1700
|
+
//#region ../../node_modules/.pnpm/is-nan@1.3.2/node_modules/is-nan/shim.js
|
|
1701
|
+
var require_shim = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1702
|
+
var define = require_define_properties();
|
|
1703
|
+
var getPolyfill = require_polyfill();
|
|
1704
|
+
module.exports = function shimNumberIsNaN() {
|
|
1705
|
+
var polyfill = getPolyfill();
|
|
1706
|
+
define(Number, { isNaN: polyfill }, { isNaN: function testIsNaN() {
|
|
1707
|
+
return Number.isNaN !== polyfill;
|
|
1708
|
+
} });
|
|
1709
|
+
return polyfill;
|
|
1710
|
+
};
|
|
1711
|
+
}));
|
|
1712
|
+
//#endregion
|
|
1713
|
+
//#region ../../node_modules/.pnpm/is-nan@1.3.2/node_modules/is-nan/index.js
|
|
1714
|
+
var require_is_nan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1715
|
+
var callBind = require_call_bind();
|
|
1716
|
+
var define = require_define_properties();
|
|
1717
|
+
var implementation = require_implementation();
|
|
1718
|
+
var getPolyfill = require_polyfill();
|
|
1719
|
+
var shim = require_shim();
|
|
1720
|
+
var polyfill = callBind(getPolyfill(), Number);
|
|
1721
|
+
define(polyfill, {
|
|
1722
|
+
getPolyfill,
|
|
1723
|
+
implementation,
|
|
1724
|
+
shim
|
|
1725
|
+
});
|
|
1726
|
+
module.exports = polyfill;
|
|
1727
|
+
}));
|
|
1728
|
+
//#endregion
|
|
1729
|
+
//#region ../../node_modules/.pnpm/assert@2.1.0/node_modules/assert/build/internal/util/comparisons.js
|
|
1730
|
+
var require_comparisons = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1731
|
+
function _slicedToArray(arr, i) {
|
|
1732
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
1733
|
+
}
|
|
1734
|
+
function _nonIterableRest() {
|
|
1735
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1736
|
+
}
|
|
1737
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
1738
|
+
if (!o) return;
|
|
1739
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
1740
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1741
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
1742
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
1743
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
1744
|
+
}
|
|
1745
|
+
function _arrayLikeToArray(arr, len) {
|
|
1746
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
1747
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
1748
|
+
return arr2;
|
|
1749
|
+
}
|
|
1750
|
+
function _iterableToArrayLimit(r, l) {
|
|
1751
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
1752
|
+
if (null != t) {
|
|
1753
|
+
var e, n, i, u, a = [], f = !0, o = !1;
|
|
1754
|
+
try {
|
|
1755
|
+
if (i = (t = t.call(r)).next, 0 === l) {
|
|
1756
|
+
if (Object(t) !== t) return;
|
|
1757
|
+
f = !1;
|
|
1758
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
1759
|
+
} catch (r) {
|
|
1760
|
+
o = !0, n = r;
|
|
1761
|
+
} finally {
|
|
1762
|
+
try {
|
|
1763
|
+
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
1764
|
+
} finally {
|
|
1765
|
+
if (o) throw n;
|
|
1766
|
+
}
|
|
1767
|
+
}
|
|
1768
|
+
return a;
|
|
1769
|
+
}
|
|
1770
|
+
}
|
|
1771
|
+
function _arrayWithHoles(arr) {
|
|
1772
|
+
if (Array.isArray(arr)) return arr;
|
|
1773
|
+
}
|
|
1774
|
+
function _typeof(o) {
|
|
1775
|
+
"@babel/helpers - typeof";
|
|
1776
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
1777
|
+
return typeof o;
|
|
1778
|
+
} : function(o) {
|
|
1779
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
1780
|
+
}, _typeof(o);
|
|
1781
|
+
}
|
|
1782
|
+
var regexFlagsSupported = /a/g.flags !== void 0;
|
|
1783
|
+
var arrayFromSet = function arrayFromSet(set) {
|
|
1784
|
+
var array = [];
|
|
1785
|
+
set.forEach(function(value) {
|
|
1786
|
+
return array.push(value);
|
|
1787
|
+
});
|
|
1788
|
+
return array;
|
|
1789
|
+
};
|
|
1790
|
+
var arrayFromMap = function arrayFromMap(map) {
|
|
1791
|
+
var array = [];
|
|
1792
|
+
map.forEach(function(value, key) {
|
|
1793
|
+
return array.push([key, value]);
|
|
1794
|
+
});
|
|
1795
|
+
return array;
|
|
1796
|
+
};
|
|
1797
|
+
var objectIs = Object.is ? Object.is : require_object_is();
|
|
1798
|
+
var objectGetOwnPropertySymbols = Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols : function() {
|
|
1799
|
+
return [];
|
|
1800
|
+
};
|
|
1801
|
+
var numberIsNaN = Number.isNaN ? Number.isNaN : require_is_nan();
|
|
1802
|
+
function uncurryThis(f) {
|
|
1803
|
+
return f.call.bind(f);
|
|
1804
|
+
}
|
|
1805
|
+
var hasOwnProperty = uncurryThis(Object.prototype.hasOwnProperty);
|
|
1806
|
+
var propertyIsEnumerable = uncurryThis(Object.prototype.propertyIsEnumerable);
|
|
1807
|
+
var objectToString = uncurryThis(Object.prototype.toString);
|
|
1808
|
+
var _require$types = require__require_as_import_util().types;
|
|
1809
|
+
var isAnyArrayBuffer = _require$types.isAnyArrayBuffer;
|
|
1810
|
+
var isArrayBufferView = _require$types.isArrayBufferView;
|
|
1811
|
+
var isDate = _require$types.isDate;
|
|
1812
|
+
var isMap = _require$types.isMap;
|
|
1813
|
+
var isRegExp = _require$types.isRegExp;
|
|
1814
|
+
var isSet = _require$types.isSet;
|
|
1815
|
+
var isNativeError = _require$types.isNativeError;
|
|
1816
|
+
var isBoxedPrimitive = _require$types.isBoxedPrimitive;
|
|
1817
|
+
var isNumberObject = _require$types.isNumberObject;
|
|
1818
|
+
var isStringObject = _require$types.isStringObject;
|
|
1819
|
+
var isBooleanObject = _require$types.isBooleanObject;
|
|
1820
|
+
var isBigIntObject = _require$types.isBigIntObject;
|
|
1821
|
+
var isSymbolObject = _require$types.isSymbolObject;
|
|
1822
|
+
var isFloat32Array = _require$types.isFloat32Array;
|
|
1823
|
+
var isFloat64Array = _require$types.isFloat64Array;
|
|
1824
|
+
function isNonIndex(key) {
|
|
1825
|
+
if (key.length === 0 || key.length > 10) return true;
|
|
1826
|
+
for (var i = 0; i < key.length; i++) {
|
|
1827
|
+
var code = key.charCodeAt(i);
|
|
1828
|
+
if (code < 48 || code > 57) return true;
|
|
1829
|
+
}
|
|
1830
|
+
return key.length === 10 && key >= Math.pow(2, 32);
|
|
1831
|
+
}
|
|
1832
|
+
function getOwnNonIndexProperties(value) {
|
|
1833
|
+
return Object.keys(value).filter(isNonIndex).concat(objectGetOwnPropertySymbols(value).filter(Object.prototype.propertyIsEnumerable.bind(value)));
|
|
1834
|
+
}
|
|
1835
|
+
function compare(a, b) {
|
|
1836
|
+
if (a === b) return 0;
|
|
1837
|
+
var x = a.length;
|
|
1838
|
+
var y = b.length;
|
|
1839
|
+
for (var i = 0, len = Math.min(x, y); i < len; ++i) if (a[i] !== b[i]) {
|
|
1840
|
+
x = a[i];
|
|
1841
|
+
y = b[i];
|
|
1842
|
+
break;
|
|
1843
|
+
}
|
|
1844
|
+
if (x < y) return -1;
|
|
1845
|
+
if (y < x) return 1;
|
|
1846
|
+
return 0;
|
|
1847
|
+
}
|
|
1848
|
+
var ONLY_ENUMERABLE = void 0;
|
|
1849
|
+
var kStrict = true;
|
|
1850
|
+
var kLoose = false;
|
|
1851
|
+
var kNoIterator = 0;
|
|
1852
|
+
var kIsArray = 1;
|
|
1853
|
+
var kIsSet = 2;
|
|
1854
|
+
var kIsMap = 3;
|
|
1855
|
+
function areSimilarRegExps(a, b) {
|
|
1856
|
+
return regexFlagsSupported ? a.source === b.source && a.flags === b.flags : RegExp.prototype.toString.call(a) === RegExp.prototype.toString.call(b);
|
|
1857
|
+
}
|
|
1858
|
+
function areSimilarFloatArrays(a, b) {
|
|
1859
|
+
if (a.byteLength !== b.byteLength) return false;
|
|
1860
|
+
for (var offset = 0; offset < a.byteLength; offset++) if (a[offset] !== b[offset]) return false;
|
|
1861
|
+
return true;
|
|
1862
|
+
}
|
|
1863
|
+
function areSimilarTypedArrays(a, b) {
|
|
1864
|
+
if (a.byteLength !== b.byteLength) return false;
|
|
1865
|
+
return compare(new Uint8Array(a.buffer, a.byteOffset, a.byteLength), new Uint8Array(b.buffer, b.byteOffset, b.byteLength)) === 0;
|
|
1866
|
+
}
|
|
1867
|
+
function areEqualArrayBuffers(buf1, buf2) {
|
|
1868
|
+
return buf1.byteLength === buf2.byteLength && compare(new Uint8Array(buf1), new Uint8Array(buf2)) === 0;
|
|
1869
|
+
}
|
|
1870
|
+
function isEqualBoxedPrimitive(val1, val2) {
|
|
1871
|
+
if (isNumberObject(val1)) return isNumberObject(val2) && objectIs(Number.prototype.valueOf.call(val1), Number.prototype.valueOf.call(val2));
|
|
1872
|
+
if (isStringObject(val1)) return isStringObject(val2) && String.prototype.valueOf.call(val1) === String.prototype.valueOf.call(val2);
|
|
1873
|
+
if (isBooleanObject(val1)) return isBooleanObject(val2) && Boolean.prototype.valueOf.call(val1) === Boolean.prototype.valueOf.call(val2);
|
|
1874
|
+
if (isBigIntObject(val1)) return isBigIntObject(val2) && BigInt.prototype.valueOf.call(val1) === BigInt.prototype.valueOf.call(val2);
|
|
1875
|
+
return isSymbolObject(val2) && Symbol.prototype.valueOf.call(val1) === Symbol.prototype.valueOf.call(val2);
|
|
1876
|
+
}
|
|
1877
|
+
function innerDeepEqual(val1, val2, strict, memos) {
|
|
1878
|
+
if (val1 === val2) {
|
|
1879
|
+
if (val1 !== 0) return true;
|
|
1880
|
+
return strict ? objectIs(val1, val2) : true;
|
|
1881
|
+
}
|
|
1882
|
+
if (strict) {
|
|
1883
|
+
if (_typeof(val1) !== "object") return typeof val1 === "number" && numberIsNaN(val1) && numberIsNaN(val2);
|
|
1884
|
+
if (_typeof(val2) !== "object" || val1 === null || val2 === null) return false;
|
|
1885
|
+
if (Object.getPrototypeOf(val1) !== Object.getPrototypeOf(val2)) return false;
|
|
1886
|
+
} else {
|
|
1887
|
+
if (val1 === null || _typeof(val1) !== "object") {
|
|
1888
|
+
if (val2 === null || _typeof(val2) !== "object") return val1 == val2;
|
|
1889
|
+
return false;
|
|
1890
|
+
}
|
|
1891
|
+
if (val2 === null || _typeof(val2) !== "object") return false;
|
|
1892
|
+
}
|
|
1893
|
+
var val1Tag = objectToString(val1);
|
|
1894
|
+
if (val1Tag !== objectToString(val2)) return false;
|
|
1895
|
+
if (Array.isArray(val1)) {
|
|
1896
|
+
if (val1.length !== val2.length) return false;
|
|
1897
|
+
var keys1 = getOwnNonIndexProperties(val1, ONLY_ENUMERABLE);
|
|
1898
|
+
var keys2 = getOwnNonIndexProperties(val2, ONLY_ENUMERABLE);
|
|
1899
|
+
if (keys1.length !== keys2.length) return false;
|
|
1900
|
+
return keyCheck(val1, val2, strict, memos, kIsArray, keys1);
|
|
1901
|
+
}
|
|
1902
|
+
if (val1Tag === "[object Object]") {
|
|
1903
|
+
if (!isMap(val1) && isMap(val2) || !isSet(val1) && isSet(val2)) return false;
|
|
1904
|
+
}
|
|
1905
|
+
if (isDate(val1)) {
|
|
1906
|
+
if (!isDate(val2) || Date.prototype.getTime.call(val1) !== Date.prototype.getTime.call(val2)) return false;
|
|
1907
|
+
} else if (isRegExp(val1)) {
|
|
1908
|
+
if (!isRegExp(val2) || !areSimilarRegExps(val1, val2)) return false;
|
|
1909
|
+
} else if (isNativeError(val1) || val1 instanceof Error) {
|
|
1910
|
+
if (val1.message !== val2.message || val1.name !== val2.name) return false;
|
|
1911
|
+
} else if (isArrayBufferView(val1)) {
|
|
1912
|
+
if (!strict && (isFloat32Array(val1) || isFloat64Array(val1))) {
|
|
1913
|
+
if (!areSimilarFloatArrays(val1, val2)) return false;
|
|
1914
|
+
} else if (!areSimilarTypedArrays(val1, val2)) return false;
|
|
1915
|
+
var _keys = getOwnNonIndexProperties(val1, ONLY_ENUMERABLE);
|
|
1916
|
+
var _keys2 = getOwnNonIndexProperties(val2, ONLY_ENUMERABLE);
|
|
1917
|
+
if (_keys.length !== _keys2.length) return false;
|
|
1918
|
+
return keyCheck(val1, val2, strict, memos, kNoIterator, _keys);
|
|
1919
|
+
} else if (isSet(val1)) {
|
|
1920
|
+
if (!isSet(val2) || val1.size !== val2.size) return false;
|
|
1921
|
+
return keyCheck(val1, val2, strict, memos, kIsSet);
|
|
1922
|
+
} else if (isMap(val1)) {
|
|
1923
|
+
if (!isMap(val2) || val1.size !== val2.size) return false;
|
|
1924
|
+
return keyCheck(val1, val2, strict, memos, kIsMap);
|
|
1925
|
+
} else if (isAnyArrayBuffer(val1)) {
|
|
1926
|
+
if (!areEqualArrayBuffers(val1, val2)) return false;
|
|
1927
|
+
} else if (isBoxedPrimitive(val1) && !isEqualBoxedPrimitive(val1, val2)) return false;
|
|
1928
|
+
return keyCheck(val1, val2, strict, memos, kNoIterator);
|
|
1929
|
+
}
|
|
1930
|
+
function getEnumerables(val, keys) {
|
|
1931
|
+
return keys.filter(function(k) {
|
|
1932
|
+
return propertyIsEnumerable(val, k);
|
|
1933
|
+
});
|
|
1934
|
+
}
|
|
1935
|
+
function keyCheck(val1, val2, strict, memos, iterationType, aKeys) {
|
|
1936
|
+
if (arguments.length === 5) {
|
|
1937
|
+
aKeys = Object.keys(val1);
|
|
1938
|
+
var bKeys = Object.keys(val2);
|
|
1939
|
+
if (aKeys.length !== bKeys.length) return false;
|
|
1940
|
+
}
|
|
1941
|
+
var i = 0;
|
|
1942
|
+
for (; i < aKeys.length; i++) if (!hasOwnProperty(val2, aKeys[i])) return false;
|
|
1943
|
+
if (strict && arguments.length === 5) {
|
|
1944
|
+
var symbolKeysA = objectGetOwnPropertySymbols(val1);
|
|
1945
|
+
if (symbolKeysA.length !== 0) {
|
|
1946
|
+
var count = 0;
|
|
1947
|
+
for (i = 0; i < symbolKeysA.length; i++) {
|
|
1948
|
+
var key = symbolKeysA[i];
|
|
1949
|
+
if (propertyIsEnumerable(val1, key)) {
|
|
1950
|
+
if (!propertyIsEnumerable(val2, key)) return false;
|
|
1951
|
+
aKeys.push(key);
|
|
1952
|
+
count++;
|
|
1953
|
+
} else if (propertyIsEnumerable(val2, key)) return false;
|
|
1954
|
+
}
|
|
1955
|
+
var symbolKeysB = objectGetOwnPropertySymbols(val2);
|
|
1956
|
+
if (symbolKeysA.length !== symbolKeysB.length && getEnumerables(val2, symbolKeysB).length !== count) return false;
|
|
1957
|
+
} else {
|
|
1958
|
+
var _symbolKeysB = objectGetOwnPropertySymbols(val2);
|
|
1959
|
+
if (_symbolKeysB.length !== 0 && getEnumerables(val2, _symbolKeysB).length !== 0) return false;
|
|
1960
|
+
}
|
|
1961
|
+
}
|
|
1962
|
+
if (aKeys.length === 0 && (iterationType === kNoIterator || iterationType === kIsArray && val1.length === 0 || val1.size === 0)) return true;
|
|
1963
|
+
if (memos === void 0) memos = {
|
|
1964
|
+
val1: /* @__PURE__ */ new Map(),
|
|
1965
|
+
val2: /* @__PURE__ */ new Map(),
|
|
1966
|
+
position: 0
|
|
1967
|
+
};
|
|
1968
|
+
else {
|
|
1969
|
+
var val2MemoA = memos.val1.get(val1);
|
|
1970
|
+
if (val2MemoA !== void 0) {
|
|
1971
|
+
var val2MemoB = memos.val2.get(val2);
|
|
1972
|
+
if (val2MemoB !== void 0) return val2MemoA === val2MemoB;
|
|
1973
|
+
}
|
|
1974
|
+
memos.position++;
|
|
1975
|
+
}
|
|
1976
|
+
memos.val1.set(val1, memos.position);
|
|
1977
|
+
memos.val2.set(val2, memos.position);
|
|
1978
|
+
var areEq = objEquiv(val1, val2, strict, aKeys, memos, iterationType);
|
|
1979
|
+
memos.val1.delete(val1);
|
|
1980
|
+
memos.val2.delete(val2);
|
|
1981
|
+
return areEq;
|
|
1982
|
+
}
|
|
1983
|
+
function setHasEqualElement(set, val1, strict, memo) {
|
|
1984
|
+
var setValues = arrayFromSet(set);
|
|
1985
|
+
for (var i = 0; i < setValues.length; i++) {
|
|
1986
|
+
var val2 = setValues[i];
|
|
1987
|
+
if (innerDeepEqual(val1, val2, strict, memo)) {
|
|
1988
|
+
set.delete(val2);
|
|
1989
|
+
return true;
|
|
1990
|
+
}
|
|
1991
|
+
}
|
|
1992
|
+
return false;
|
|
1993
|
+
}
|
|
1994
|
+
function findLooseMatchingPrimitives(prim) {
|
|
1995
|
+
switch (_typeof(prim)) {
|
|
1996
|
+
case "undefined": return null;
|
|
1997
|
+
case "object": return;
|
|
1998
|
+
case "symbol": return false;
|
|
1999
|
+
case "string": prim = +prim;
|
|
2000
|
+
case "number": if (numberIsNaN(prim)) return false;
|
|
2001
|
+
}
|
|
2002
|
+
return true;
|
|
2003
|
+
}
|
|
2004
|
+
function setMightHaveLoosePrim(a, b, prim) {
|
|
2005
|
+
var altValue = findLooseMatchingPrimitives(prim);
|
|
2006
|
+
if (altValue != null) return altValue;
|
|
2007
|
+
return b.has(altValue) && !a.has(altValue);
|
|
2008
|
+
}
|
|
2009
|
+
function mapMightHaveLoosePrim(a, b, prim, item, memo) {
|
|
2010
|
+
var altValue = findLooseMatchingPrimitives(prim);
|
|
2011
|
+
if (altValue != null) return altValue;
|
|
2012
|
+
var curB = b.get(altValue);
|
|
2013
|
+
if (curB === void 0 && !b.has(altValue) || !innerDeepEqual(item, curB, false, memo)) return false;
|
|
2014
|
+
return !a.has(altValue) && innerDeepEqual(item, curB, false, memo);
|
|
2015
|
+
}
|
|
2016
|
+
function setEquiv(a, b, strict, memo) {
|
|
2017
|
+
var set = null;
|
|
2018
|
+
var aValues = arrayFromSet(a);
|
|
2019
|
+
for (var i = 0; i < aValues.length; i++) {
|
|
2020
|
+
var val = aValues[i];
|
|
2021
|
+
if (_typeof(val) === "object" && val !== null) {
|
|
2022
|
+
if (set === null) set = /* @__PURE__ */ new Set();
|
|
2023
|
+
set.add(val);
|
|
2024
|
+
} else if (!b.has(val)) {
|
|
2025
|
+
if (strict) return false;
|
|
2026
|
+
if (!setMightHaveLoosePrim(a, b, val)) return false;
|
|
2027
|
+
if (set === null) set = /* @__PURE__ */ new Set();
|
|
2028
|
+
set.add(val);
|
|
2029
|
+
}
|
|
2030
|
+
}
|
|
2031
|
+
if (set !== null) {
|
|
2032
|
+
var bValues = arrayFromSet(b);
|
|
2033
|
+
for (var _i = 0; _i < bValues.length; _i++) {
|
|
2034
|
+
var _val = bValues[_i];
|
|
2035
|
+
if (_typeof(_val) === "object" && _val !== null) {
|
|
2036
|
+
if (!setHasEqualElement(set, _val, strict, memo)) return false;
|
|
2037
|
+
} else if (!strict && !a.has(_val) && !setHasEqualElement(set, _val, strict, memo)) return false;
|
|
2038
|
+
}
|
|
2039
|
+
return set.size === 0;
|
|
2040
|
+
}
|
|
2041
|
+
return true;
|
|
2042
|
+
}
|
|
2043
|
+
function mapHasEqualEntry(set, map, key1, item1, strict, memo) {
|
|
2044
|
+
var setValues = arrayFromSet(set);
|
|
2045
|
+
for (var i = 0; i < setValues.length; i++) {
|
|
2046
|
+
var key2 = setValues[i];
|
|
2047
|
+
if (innerDeepEqual(key1, key2, strict, memo) && innerDeepEqual(item1, map.get(key2), strict, memo)) {
|
|
2048
|
+
set.delete(key2);
|
|
2049
|
+
return true;
|
|
2050
|
+
}
|
|
2051
|
+
}
|
|
2052
|
+
return false;
|
|
2053
|
+
}
|
|
2054
|
+
function mapEquiv(a, b, strict, memo) {
|
|
2055
|
+
var set = null;
|
|
2056
|
+
var aEntries = arrayFromMap(a);
|
|
2057
|
+
for (var i = 0; i < aEntries.length; i++) {
|
|
2058
|
+
var _aEntries$i = _slicedToArray(aEntries[i], 2), key = _aEntries$i[0], item1 = _aEntries$i[1];
|
|
2059
|
+
if (_typeof(key) === "object" && key !== null) {
|
|
2060
|
+
if (set === null) set = /* @__PURE__ */ new Set();
|
|
2061
|
+
set.add(key);
|
|
2062
|
+
} else {
|
|
2063
|
+
var item2 = b.get(key);
|
|
2064
|
+
if (item2 === void 0 && !b.has(key) || !innerDeepEqual(item1, item2, strict, memo)) {
|
|
2065
|
+
if (strict) return false;
|
|
2066
|
+
if (!mapMightHaveLoosePrim(a, b, key, item1, memo)) return false;
|
|
2067
|
+
if (set === null) set = /* @__PURE__ */ new Set();
|
|
2068
|
+
set.add(key);
|
|
2069
|
+
}
|
|
2070
|
+
}
|
|
2071
|
+
}
|
|
2072
|
+
if (set !== null) {
|
|
2073
|
+
var bEntries = arrayFromMap(b);
|
|
2074
|
+
for (var _i2 = 0; _i2 < bEntries.length; _i2++) {
|
|
2075
|
+
var _bEntries$_i = _slicedToArray(bEntries[_i2], 2), _key = _bEntries$_i[0], item = _bEntries$_i[1];
|
|
2076
|
+
if (_typeof(_key) === "object" && _key !== null) {
|
|
2077
|
+
if (!mapHasEqualEntry(set, a, _key, item, strict, memo)) return false;
|
|
2078
|
+
} else if (!strict && (!a.has(_key) || !innerDeepEqual(a.get(_key), item, false, memo)) && !mapHasEqualEntry(set, a, _key, item, false, memo)) return false;
|
|
2079
|
+
}
|
|
2080
|
+
return set.size === 0;
|
|
2081
|
+
}
|
|
2082
|
+
return true;
|
|
2083
|
+
}
|
|
2084
|
+
function objEquiv(a, b, strict, keys, memos, iterationType) {
|
|
2085
|
+
var i = 0;
|
|
2086
|
+
if (iterationType === kIsSet) {
|
|
2087
|
+
if (!setEquiv(a, b, strict, memos)) return false;
|
|
2088
|
+
} else if (iterationType === kIsMap) {
|
|
2089
|
+
if (!mapEquiv(a, b, strict, memos)) return false;
|
|
2090
|
+
} else if (iterationType === kIsArray) for (; i < a.length; i++) if (hasOwnProperty(a, i)) {
|
|
2091
|
+
if (!hasOwnProperty(b, i) || !innerDeepEqual(a[i], b[i], strict, memos)) return false;
|
|
2092
|
+
} else if (hasOwnProperty(b, i)) return false;
|
|
2093
|
+
else {
|
|
2094
|
+
var keysA = Object.keys(a);
|
|
2095
|
+
for (; i < keysA.length; i++) {
|
|
2096
|
+
var key = keysA[i];
|
|
2097
|
+
if (!hasOwnProperty(b, key) || !innerDeepEqual(a[key], b[key], strict, memos)) return false;
|
|
2098
|
+
}
|
|
2099
|
+
if (keysA.length !== Object.keys(b).length) return false;
|
|
2100
|
+
return true;
|
|
2101
|
+
}
|
|
2102
|
+
for (i = 0; i < keys.length; i++) {
|
|
2103
|
+
var _key2 = keys[i];
|
|
2104
|
+
if (!innerDeepEqual(a[_key2], b[_key2], strict, memos)) return false;
|
|
2105
|
+
}
|
|
2106
|
+
return true;
|
|
2107
|
+
}
|
|
2108
|
+
function isDeepEqual(val1, val2) {
|
|
2109
|
+
return innerDeepEqual(val1, val2, kLoose);
|
|
2110
|
+
}
|
|
2111
|
+
function isDeepStrictEqual(val1, val2) {
|
|
2112
|
+
return innerDeepEqual(val1, val2, kStrict);
|
|
2113
|
+
}
|
|
2114
|
+
module.exports = {
|
|
2115
|
+
isDeepEqual,
|
|
2116
|
+
isDeepStrictEqual
|
|
2117
|
+
};
|
|
2118
|
+
}));
|
|
2119
|
+
//#endregion
|
|
2120
|
+
//#region ../../node_modules/.pnpm/assert@2.1.0/node_modules/assert/build/assert.js
|
|
2121
|
+
var require_assert = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2122
|
+
function _typeof(o) {
|
|
2123
|
+
"@babel/helpers - typeof";
|
|
2124
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
2125
|
+
return typeof o;
|
|
2126
|
+
} : function(o) {
|
|
2127
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
2128
|
+
}, _typeof(o);
|
|
2129
|
+
}
|
|
2130
|
+
function _defineProperties(target, props) {
|
|
2131
|
+
for (var i = 0; i < props.length; i++) {
|
|
2132
|
+
var descriptor = props[i];
|
|
2133
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
2134
|
+
descriptor.configurable = true;
|
|
2135
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
2136
|
+
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
2137
|
+
}
|
|
2138
|
+
}
|
|
2139
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
2140
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
2141
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
2142
|
+
Object.defineProperty(Constructor, "prototype", { writable: false });
|
|
2143
|
+
return Constructor;
|
|
2144
|
+
}
|
|
2145
|
+
function _toPropertyKey(arg) {
|
|
2146
|
+
var key = _toPrimitive(arg, "string");
|
|
2147
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
2148
|
+
}
|
|
2149
|
+
function _toPrimitive(input, hint) {
|
|
2150
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
2151
|
+
var prim = input[Symbol.toPrimitive];
|
|
2152
|
+
if (prim !== void 0) {
|
|
2153
|
+
var res = prim.call(input, hint || "default");
|
|
2154
|
+
if (_typeof(res) !== "object") return res;
|
|
2155
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
2156
|
+
}
|
|
2157
|
+
return (hint === "string" ? String : Number)(input);
|
|
2158
|
+
}
|
|
2159
|
+
function _classCallCheck(instance, Constructor) {
|
|
2160
|
+
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
|
|
2161
|
+
}
|
|
2162
|
+
var _require$codes = require_errors().codes;
|
|
2163
|
+
var ERR_AMBIGUOUS_ARGUMENT = _require$codes.ERR_AMBIGUOUS_ARGUMENT;
|
|
2164
|
+
var ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE;
|
|
2165
|
+
var ERR_INVALID_ARG_VALUE = _require$codes.ERR_INVALID_ARG_VALUE;
|
|
2166
|
+
var ERR_INVALID_RETURN_VALUE = _require$codes.ERR_INVALID_RETURN_VALUE;
|
|
2167
|
+
var ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS;
|
|
2168
|
+
var AssertionError = require_assertion_error();
|
|
2169
|
+
var inspect = require__require_as_import_util().inspect;
|
|
2170
|
+
var _require$types = require__require_as_import_util().types;
|
|
2171
|
+
var isPromise = _require$types.isPromise;
|
|
2172
|
+
var isRegExp = _require$types.isRegExp;
|
|
2173
|
+
var objectAssign = require_polyfill$2()();
|
|
2174
|
+
var objectIs = require_polyfill$1()();
|
|
2175
|
+
var RegExpPrototypeTest = require_callBound()("RegExp.prototype.test");
|
|
2176
|
+
var isDeepEqual;
|
|
2177
|
+
var isDeepStrictEqual;
|
|
2178
|
+
function lazyLoadComparison() {
|
|
2179
|
+
var comparison = require_comparisons();
|
|
2180
|
+
isDeepEqual = comparison.isDeepEqual;
|
|
2181
|
+
isDeepStrictEqual = comparison.isDeepStrictEqual;
|
|
2182
|
+
}
|
|
2183
|
+
var warned = false;
|
|
2184
|
+
var assert = module.exports = ok;
|
|
2185
|
+
var NO_EXCEPTION_SENTINEL = {};
|
|
2186
|
+
function innerFail(obj) {
|
|
2187
|
+
if (obj.message instanceof Error) throw obj.message;
|
|
2188
|
+
throw new AssertionError(obj);
|
|
2189
|
+
}
|
|
2190
|
+
function fail(actual, expected, message, operator, stackStartFn) {
|
|
2191
|
+
var argsLen = arguments.length;
|
|
2192
|
+
var internalMessage;
|
|
2193
|
+
if (argsLen === 0) internalMessage = "Failed";
|
|
2194
|
+
else if (argsLen === 1) {
|
|
2195
|
+
message = actual;
|
|
2196
|
+
actual = void 0;
|
|
2197
|
+
} else {
|
|
2198
|
+
if (warned === false) {
|
|
2199
|
+
warned = true;
|
|
2200
|
+
(process.emitWarning ? process.emitWarning : console.warn.bind(console))("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.", "DeprecationWarning", "DEP0094");
|
|
2201
|
+
}
|
|
2202
|
+
if (argsLen === 2) operator = "!=";
|
|
2203
|
+
}
|
|
2204
|
+
if (message instanceof Error) throw message;
|
|
2205
|
+
var errArgs = {
|
|
2206
|
+
actual,
|
|
2207
|
+
expected,
|
|
2208
|
+
operator: operator === void 0 ? "fail" : operator,
|
|
2209
|
+
stackStartFn: stackStartFn || fail
|
|
2210
|
+
};
|
|
2211
|
+
if (message !== void 0) errArgs.message = message;
|
|
2212
|
+
var err = new AssertionError(errArgs);
|
|
2213
|
+
if (internalMessage) {
|
|
2214
|
+
err.message = internalMessage;
|
|
2215
|
+
err.generatedMessage = true;
|
|
2216
|
+
}
|
|
2217
|
+
throw err;
|
|
2218
|
+
}
|
|
2219
|
+
assert.fail = fail;
|
|
2220
|
+
assert.AssertionError = AssertionError;
|
|
2221
|
+
function innerOk(fn, argLen, value, message) {
|
|
2222
|
+
if (!value) {
|
|
2223
|
+
var generatedMessage = false;
|
|
2224
|
+
if (argLen === 0) {
|
|
2225
|
+
generatedMessage = true;
|
|
2226
|
+
message = "No value argument passed to `assert.ok()`";
|
|
2227
|
+
} else if (message instanceof Error) throw message;
|
|
2228
|
+
var err = new AssertionError({
|
|
2229
|
+
actual: value,
|
|
2230
|
+
expected: true,
|
|
2231
|
+
message,
|
|
2232
|
+
operator: "==",
|
|
2233
|
+
stackStartFn: fn
|
|
2234
|
+
});
|
|
2235
|
+
err.generatedMessage = generatedMessage;
|
|
2236
|
+
throw err;
|
|
2237
|
+
}
|
|
2238
|
+
}
|
|
2239
|
+
function ok() {
|
|
2240
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
|
|
2241
|
+
innerOk.apply(void 0, [ok, args.length].concat(args));
|
|
2242
|
+
}
|
|
2243
|
+
assert.ok = ok;
|
|
2244
|
+
assert.equal = function equal(actual, expected, message) {
|
|
2245
|
+
if (arguments.length < 2) throw new ERR_MISSING_ARGS("actual", "expected");
|
|
2246
|
+
if (actual != expected) innerFail({
|
|
2247
|
+
actual,
|
|
2248
|
+
expected,
|
|
2249
|
+
message,
|
|
2250
|
+
operator: "==",
|
|
2251
|
+
stackStartFn: equal
|
|
2252
|
+
});
|
|
2253
|
+
};
|
|
2254
|
+
assert.notEqual = function notEqual(actual, expected, message) {
|
|
2255
|
+
if (arguments.length < 2) throw new ERR_MISSING_ARGS("actual", "expected");
|
|
2256
|
+
if (actual == expected) innerFail({
|
|
2257
|
+
actual,
|
|
2258
|
+
expected,
|
|
2259
|
+
message,
|
|
2260
|
+
operator: "!=",
|
|
2261
|
+
stackStartFn: notEqual
|
|
2262
|
+
});
|
|
2263
|
+
};
|
|
2264
|
+
assert.deepEqual = function deepEqual(actual, expected, message) {
|
|
2265
|
+
if (arguments.length < 2) throw new ERR_MISSING_ARGS("actual", "expected");
|
|
2266
|
+
if (isDeepEqual === void 0) lazyLoadComparison();
|
|
2267
|
+
if (!isDeepEqual(actual, expected)) innerFail({
|
|
2268
|
+
actual,
|
|
2269
|
+
expected,
|
|
2270
|
+
message,
|
|
2271
|
+
operator: "deepEqual",
|
|
2272
|
+
stackStartFn: deepEqual
|
|
2273
|
+
});
|
|
2274
|
+
};
|
|
2275
|
+
assert.notDeepEqual = function notDeepEqual(actual, expected, message) {
|
|
2276
|
+
if (arguments.length < 2) throw new ERR_MISSING_ARGS("actual", "expected");
|
|
2277
|
+
if (isDeepEqual === void 0) lazyLoadComparison();
|
|
2278
|
+
if (isDeepEqual(actual, expected)) innerFail({
|
|
2279
|
+
actual,
|
|
2280
|
+
expected,
|
|
2281
|
+
message,
|
|
2282
|
+
operator: "notDeepEqual",
|
|
2283
|
+
stackStartFn: notDeepEqual
|
|
2284
|
+
});
|
|
2285
|
+
};
|
|
2286
|
+
assert.deepStrictEqual = function deepStrictEqual(actual, expected, message) {
|
|
2287
|
+
if (arguments.length < 2) throw new ERR_MISSING_ARGS("actual", "expected");
|
|
2288
|
+
if (isDeepEqual === void 0) lazyLoadComparison();
|
|
2289
|
+
if (!isDeepStrictEqual(actual, expected)) innerFail({
|
|
2290
|
+
actual,
|
|
2291
|
+
expected,
|
|
2292
|
+
message,
|
|
2293
|
+
operator: "deepStrictEqual",
|
|
2294
|
+
stackStartFn: deepStrictEqual
|
|
2295
|
+
});
|
|
2296
|
+
};
|
|
2297
|
+
assert.notDeepStrictEqual = notDeepStrictEqual;
|
|
2298
|
+
function notDeepStrictEqual(actual, expected, message) {
|
|
2299
|
+
if (arguments.length < 2) throw new ERR_MISSING_ARGS("actual", "expected");
|
|
2300
|
+
if (isDeepEqual === void 0) lazyLoadComparison();
|
|
2301
|
+
if (isDeepStrictEqual(actual, expected)) innerFail({
|
|
2302
|
+
actual,
|
|
2303
|
+
expected,
|
|
2304
|
+
message,
|
|
2305
|
+
operator: "notDeepStrictEqual",
|
|
2306
|
+
stackStartFn: notDeepStrictEqual
|
|
2307
|
+
});
|
|
2308
|
+
}
|
|
2309
|
+
assert.strictEqual = function strictEqual(actual, expected, message) {
|
|
2310
|
+
if (arguments.length < 2) throw new ERR_MISSING_ARGS("actual", "expected");
|
|
2311
|
+
if (!objectIs(actual, expected)) innerFail({
|
|
2312
|
+
actual,
|
|
2313
|
+
expected,
|
|
2314
|
+
message,
|
|
2315
|
+
operator: "strictEqual",
|
|
2316
|
+
stackStartFn: strictEqual
|
|
2317
|
+
});
|
|
2318
|
+
};
|
|
2319
|
+
assert.notStrictEqual = function notStrictEqual(actual, expected, message) {
|
|
2320
|
+
if (arguments.length < 2) throw new ERR_MISSING_ARGS("actual", "expected");
|
|
2321
|
+
if (objectIs(actual, expected)) innerFail({
|
|
2322
|
+
actual,
|
|
2323
|
+
expected,
|
|
2324
|
+
message,
|
|
2325
|
+
operator: "notStrictEqual",
|
|
2326
|
+
stackStartFn: notStrictEqual
|
|
2327
|
+
});
|
|
2328
|
+
};
|
|
2329
|
+
var Comparison = /*#__PURE__*/ _createClass(function Comparison(obj, keys, actual) {
|
|
2330
|
+
var _this = this;
|
|
2331
|
+
_classCallCheck(this, Comparison);
|
|
2332
|
+
keys.forEach(function(key) {
|
|
2333
|
+
if (key in obj) {
|
|
2334
|
+
if (actual !== void 0 && typeof actual[key] === "string" && isRegExp(obj[key]) && RegExpPrototypeTest(obj[key], actual[key])) _this[key] = actual[key];
|
|
2335
|
+
else _this[key] = obj[key];
|
|
2336
|
+
}
|
|
2337
|
+
});
|
|
2338
|
+
});
|
|
2339
|
+
function compareExceptionKey(actual, expected, key, message, keys, fn) {
|
|
2340
|
+
if (!(key in actual) || !isDeepStrictEqual(actual[key], expected[key])) {
|
|
2341
|
+
if (!message) {
|
|
2342
|
+
var err = new AssertionError({
|
|
2343
|
+
actual: new Comparison(actual, keys),
|
|
2344
|
+
expected: new Comparison(expected, keys, actual),
|
|
2345
|
+
operator: "deepStrictEqual",
|
|
2346
|
+
stackStartFn: fn
|
|
2347
|
+
});
|
|
2348
|
+
err.actual = actual;
|
|
2349
|
+
err.expected = expected;
|
|
2350
|
+
err.operator = fn.name;
|
|
2351
|
+
throw err;
|
|
2352
|
+
}
|
|
2353
|
+
innerFail({
|
|
2354
|
+
actual,
|
|
2355
|
+
expected,
|
|
2356
|
+
message,
|
|
2357
|
+
operator: fn.name,
|
|
2358
|
+
stackStartFn: fn
|
|
2359
|
+
});
|
|
2360
|
+
}
|
|
2361
|
+
}
|
|
2362
|
+
function expectedException(actual, expected, msg, fn) {
|
|
2363
|
+
if (typeof expected !== "function") {
|
|
2364
|
+
if (isRegExp(expected)) return RegExpPrototypeTest(expected, actual);
|
|
2365
|
+
if (arguments.length === 2) throw new ERR_INVALID_ARG_TYPE("expected", ["Function", "RegExp"], expected);
|
|
2366
|
+
if (_typeof(actual) !== "object" || actual === null) {
|
|
2367
|
+
var err = new AssertionError({
|
|
2368
|
+
actual,
|
|
2369
|
+
expected,
|
|
2370
|
+
message: msg,
|
|
2371
|
+
operator: "deepStrictEqual",
|
|
2372
|
+
stackStartFn: fn
|
|
2373
|
+
});
|
|
2374
|
+
err.operator = fn.name;
|
|
2375
|
+
throw err;
|
|
2376
|
+
}
|
|
2377
|
+
var keys = Object.keys(expected);
|
|
2378
|
+
if (expected instanceof Error) keys.push("name", "message");
|
|
2379
|
+
else if (keys.length === 0) throw new ERR_INVALID_ARG_VALUE("error", expected, "may not be an empty object");
|
|
2380
|
+
if (isDeepEqual === void 0) lazyLoadComparison();
|
|
2381
|
+
keys.forEach(function(key) {
|
|
2382
|
+
if (typeof actual[key] === "string" && isRegExp(expected[key]) && RegExpPrototypeTest(expected[key], actual[key])) return;
|
|
2383
|
+
compareExceptionKey(actual, expected, key, msg, keys, fn);
|
|
2384
|
+
});
|
|
2385
|
+
return true;
|
|
2386
|
+
}
|
|
2387
|
+
if (expected.prototype !== void 0 && actual instanceof expected) return true;
|
|
2388
|
+
if (Error.isPrototypeOf(expected)) return false;
|
|
2389
|
+
return expected.call({}, actual) === true;
|
|
2390
|
+
}
|
|
2391
|
+
function getActual(fn) {
|
|
2392
|
+
if (typeof fn !== "function") throw new ERR_INVALID_ARG_TYPE("fn", "Function", fn);
|
|
2393
|
+
try {
|
|
2394
|
+
fn();
|
|
2395
|
+
} catch (e) {
|
|
2396
|
+
return e;
|
|
2397
|
+
}
|
|
2398
|
+
return NO_EXCEPTION_SENTINEL;
|
|
2399
|
+
}
|
|
2400
|
+
function checkIsPromise(obj) {
|
|
2401
|
+
return isPromise(obj) || obj !== null && _typeof(obj) === "object" && typeof obj.then === "function" && typeof obj.catch === "function";
|
|
2402
|
+
}
|
|
2403
|
+
function waitForActual(promiseFn) {
|
|
2404
|
+
return Promise.resolve().then(function() {
|
|
2405
|
+
var resultPromise;
|
|
2406
|
+
if (typeof promiseFn === "function") {
|
|
2407
|
+
resultPromise = promiseFn();
|
|
2408
|
+
if (!checkIsPromise(resultPromise)) throw new ERR_INVALID_RETURN_VALUE("instance of Promise", "promiseFn", resultPromise);
|
|
2409
|
+
} else if (checkIsPromise(promiseFn)) resultPromise = promiseFn;
|
|
2410
|
+
else throw new ERR_INVALID_ARG_TYPE("promiseFn", ["Function", "Promise"], promiseFn);
|
|
2411
|
+
return Promise.resolve().then(function() {
|
|
2412
|
+
return resultPromise;
|
|
2413
|
+
}).then(function() {
|
|
2414
|
+
return NO_EXCEPTION_SENTINEL;
|
|
2415
|
+
}).catch(function(e) {
|
|
2416
|
+
return e;
|
|
2417
|
+
});
|
|
2418
|
+
});
|
|
2419
|
+
}
|
|
2420
|
+
function expectsError(stackStartFn, actual, error, message) {
|
|
2421
|
+
if (typeof error === "string") {
|
|
2422
|
+
if (arguments.length === 4) throw new ERR_INVALID_ARG_TYPE("error", [
|
|
2423
|
+
"Object",
|
|
2424
|
+
"Error",
|
|
2425
|
+
"Function",
|
|
2426
|
+
"RegExp"
|
|
2427
|
+
], error);
|
|
2428
|
+
if (_typeof(actual) === "object" && actual !== null) {
|
|
2429
|
+
if (actual.message === error) throw new ERR_AMBIGUOUS_ARGUMENT("error/message", "The error message \"".concat(actual.message, "\" is identical to the message."));
|
|
2430
|
+
} else if (actual === error) throw new ERR_AMBIGUOUS_ARGUMENT("error/message", "The error \"".concat(actual, "\" is identical to the message."));
|
|
2431
|
+
message = error;
|
|
2432
|
+
error = void 0;
|
|
2433
|
+
} else if (error != null && _typeof(error) !== "object" && typeof error !== "function") throw new ERR_INVALID_ARG_TYPE("error", [
|
|
2434
|
+
"Object",
|
|
2435
|
+
"Error",
|
|
2436
|
+
"Function",
|
|
2437
|
+
"RegExp"
|
|
2438
|
+
], error);
|
|
2439
|
+
if (actual === NO_EXCEPTION_SENTINEL) {
|
|
2440
|
+
var details = "";
|
|
2441
|
+
if (error && error.name) details += " (".concat(error.name, ")");
|
|
2442
|
+
details += message ? ": ".concat(message) : ".";
|
|
2443
|
+
var fnType = stackStartFn.name === "rejects" ? "rejection" : "exception";
|
|
2444
|
+
innerFail({
|
|
2445
|
+
actual: void 0,
|
|
2446
|
+
expected: error,
|
|
2447
|
+
operator: stackStartFn.name,
|
|
2448
|
+
message: "Missing expected ".concat(fnType).concat(details),
|
|
2449
|
+
stackStartFn
|
|
2450
|
+
});
|
|
2451
|
+
}
|
|
2452
|
+
if (error && !expectedException(actual, error, message, stackStartFn)) throw actual;
|
|
2453
|
+
}
|
|
2454
|
+
function expectsNoError(stackStartFn, actual, error, message) {
|
|
2455
|
+
if (actual === NO_EXCEPTION_SENTINEL) return;
|
|
2456
|
+
if (typeof error === "string") {
|
|
2457
|
+
message = error;
|
|
2458
|
+
error = void 0;
|
|
2459
|
+
}
|
|
2460
|
+
if (!error || expectedException(actual, error)) {
|
|
2461
|
+
var details = message ? ": ".concat(message) : ".";
|
|
2462
|
+
var fnType = stackStartFn.name === "doesNotReject" ? "rejection" : "exception";
|
|
2463
|
+
innerFail({
|
|
2464
|
+
actual,
|
|
2465
|
+
expected: error,
|
|
2466
|
+
operator: stackStartFn.name,
|
|
2467
|
+
message: "Got unwanted ".concat(fnType).concat(details, "\n") + "Actual message: \"".concat(actual && actual.message, "\""),
|
|
2468
|
+
stackStartFn
|
|
2469
|
+
});
|
|
2470
|
+
}
|
|
2471
|
+
throw actual;
|
|
2472
|
+
}
|
|
2473
|
+
assert.throws = function throws(promiseFn) {
|
|
2474
|
+
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) args[_key2 - 1] = arguments[_key2];
|
|
2475
|
+
expectsError.apply(void 0, [throws, getActual(promiseFn)].concat(args));
|
|
2476
|
+
};
|
|
2477
|
+
assert.rejects = function rejects(promiseFn) {
|
|
2478
|
+
for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) args[_key3 - 1] = arguments[_key3];
|
|
2479
|
+
return waitForActual(promiseFn).then(function(result) {
|
|
2480
|
+
return expectsError.apply(void 0, [rejects, result].concat(args));
|
|
2481
|
+
});
|
|
2482
|
+
};
|
|
2483
|
+
assert.doesNotThrow = function doesNotThrow(fn) {
|
|
2484
|
+
for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) args[_key4 - 1] = arguments[_key4];
|
|
2485
|
+
expectsNoError.apply(void 0, [doesNotThrow, getActual(fn)].concat(args));
|
|
2486
|
+
};
|
|
2487
|
+
assert.doesNotReject = function doesNotReject(fn) {
|
|
2488
|
+
for (var _len5 = arguments.length, args = new Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) args[_key5 - 1] = arguments[_key5];
|
|
2489
|
+
return waitForActual(fn).then(function(result) {
|
|
2490
|
+
return expectsNoError.apply(void 0, [doesNotReject, result].concat(args));
|
|
2491
|
+
});
|
|
2492
|
+
};
|
|
2493
|
+
assert.ifError = function ifError(err) {
|
|
2494
|
+
if (err !== null && err !== void 0) {
|
|
2495
|
+
var message = "ifError got unwanted exception: ";
|
|
2496
|
+
if (_typeof(err) === "object" && typeof err.message === "string") {
|
|
2497
|
+
if (err.message.length === 0 && err.constructor) message += err.constructor.name;
|
|
2498
|
+
else message += err.message;
|
|
2499
|
+
} else message += inspect(err);
|
|
2500
|
+
var newErr = new AssertionError({
|
|
2501
|
+
actual: err,
|
|
2502
|
+
expected: null,
|
|
2503
|
+
operator: "ifError",
|
|
2504
|
+
message,
|
|
2505
|
+
stackStartFn: ifError
|
|
2506
|
+
});
|
|
2507
|
+
var origStack = err.stack;
|
|
2508
|
+
if (typeof origStack === "string") {
|
|
2509
|
+
var tmp2 = origStack.split("\n");
|
|
2510
|
+
tmp2.shift();
|
|
2511
|
+
var tmp1 = newErr.stack.split("\n");
|
|
2512
|
+
for (var i = 0; i < tmp2.length; i++) {
|
|
2513
|
+
var pos = tmp1.indexOf(tmp2[i]);
|
|
2514
|
+
if (pos !== -1) {
|
|
2515
|
+
tmp1 = tmp1.slice(0, pos);
|
|
2516
|
+
break;
|
|
2517
|
+
}
|
|
2518
|
+
}
|
|
2519
|
+
newErr.stack = "".concat(tmp1.join("\n"), "\n").concat(tmp2.join("\n"));
|
|
2520
|
+
}
|
|
2521
|
+
throw newErr;
|
|
2522
|
+
}
|
|
2523
|
+
};
|
|
2524
|
+
function internalMatch(string, regexp, message, fn, fnName) {
|
|
2525
|
+
if (!isRegExp(regexp)) throw new ERR_INVALID_ARG_TYPE("regexp", "RegExp", regexp);
|
|
2526
|
+
var match = fnName === "match";
|
|
2527
|
+
if (typeof string !== "string" || RegExpPrototypeTest(regexp, string) !== match) {
|
|
2528
|
+
if (message instanceof Error) throw message;
|
|
2529
|
+
var generatedMessage = !message;
|
|
2530
|
+
message = message || (typeof string !== "string" ? "The \"string\" argument must be of type string. Received type " + "".concat(_typeof(string), " (").concat(inspect(string), ")") : (match ? "The input did not match the regular expression " : "The input was expected to not match the regular expression ") + "".concat(inspect(regexp), ". Input:\n\n").concat(inspect(string), "\n"));
|
|
2531
|
+
var err = new AssertionError({
|
|
2532
|
+
actual: string,
|
|
2533
|
+
expected: regexp,
|
|
2534
|
+
message,
|
|
2535
|
+
operator: fnName,
|
|
2536
|
+
stackStartFn: fn
|
|
2537
|
+
});
|
|
2538
|
+
err.generatedMessage = generatedMessage;
|
|
2539
|
+
throw err;
|
|
2540
|
+
}
|
|
2541
|
+
}
|
|
2542
|
+
assert.match = function match(string, regexp, message) {
|
|
2543
|
+
internalMatch(string, regexp, message, match, "match");
|
|
2544
|
+
};
|
|
2545
|
+
assert.doesNotMatch = function doesNotMatch(string, regexp, message) {
|
|
2546
|
+
internalMatch(string, regexp, message, doesNotMatch, "doesNotMatch");
|
|
2547
|
+
};
|
|
2548
|
+
function strict() {
|
|
2549
|
+
for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) args[_key6] = arguments[_key6];
|
|
2550
|
+
innerOk.apply(void 0, [strict, args.length].concat(args));
|
|
2551
|
+
}
|
|
2552
|
+
assert.strict = objectAssign(strict, assert, {
|
|
2553
|
+
equal: assert.strictEqual,
|
|
2554
|
+
deepEqual: assert.deepStrictEqual,
|
|
2555
|
+
notEqual: assert.notStrictEqual,
|
|
2556
|
+
notDeepEqual: assert.notDeepStrictEqual
|
|
2557
|
+
});
|
|
2558
|
+
assert.strict.strict = assert.strict;
|
|
2559
|
+
}));
|
|
2560
|
+
//#endregion
|
|
2561
|
+
//#region ../../node_modules/.pnpm/unenv@2.0.0-rc.24/node_modules/unenv/dist/runtime/_internal/utils.mjs
|
|
2562
|
+
var import_assert = /* @__PURE__ */ __toESM(require_assert(), 1);
|
|
2563
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
2564
|
+
function createNotImplementedError(name) {
|
|
2565
|
+
return /* @__PURE__ */ new Error(`[unenv] ${name} is not implemented yet!`);
|
|
2566
|
+
}
|
|
2567
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
2568
|
+
function notImplemented(name) {
|
|
2569
|
+
const fn = () => {
|
|
2570
|
+
throw /* @__PURE__ */ createNotImplementedError(name);
|
|
2571
|
+
};
|
|
2572
|
+
return Object.assign(fn, { __unenv__: true });
|
|
2573
|
+
}
|
|
2574
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
2575
|
+
function notImplementedClass(name) {
|
|
2576
|
+
return class {
|
|
2577
|
+
__unenv__ = true;
|
|
2578
|
+
constructor() {
|
|
2579
|
+
throw new Error(`[unenv] ${name} is not implemented yet!`);
|
|
2580
|
+
}
|
|
2581
|
+
};
|
|
2582
|
+
}
|
|
2583
|
+
//#endregion
|
|
2584
|
+
//#region ../../node_modules/.pnpm/unenv@2.0.0-rc.24/node_modules/unenv/dist/runtime/node/assert.mjs
|
|
2585
|
+
const ERR_AMBIGUOUS_ARGUMENT = Error;
|
|
2586
|
+
const ERR_INVALID_ARG_TYPE = Error;
|
|
2587
|
+
const ERR_INVALID_ARG_VALUE = Error;
|
|
2588
|
+
const ERR_INVALID_RETURN_VALUE = Error;
|
|
2589
|
+
const ERR_MISSING_ARGS = Error;
|
|
2590
|
+
var AssertionError$1 = class extends Error {
|
|
2591
|
+
actual;
|
|
2592
|
+
expected;
|
|
2593
|
+
operator;
|
|
2594
|
+
generatedMessage;
|
|
2595
|
+
code = "ERR_ASSERTION";
|
|
2596
|
+
constructor(options) {
|
|
2597
|
+
super();
|
|
2598
|
+
this.actual = options.actual;
|
|
2599
|
+
this.expected = options.expected;
|
|
2600
|
+
this.operator = options.operator || "";
|
|
2601
|
+
this.generatedMessage = options.message === void 0;
|
|
2602
|
+
const stackStartFn = options.stackStartFn || fail$1;
|
|
2603
|
+
Error.captureStackTrace?.(this, stackStartFn);
|
|
2604
|
+
}
|
|
2605
|
+
};
|
|
2606
|
+
const inspect = (val, opts) => val;
|
|
2607
|
+
const isEqual = (a, b) => a === b || JSON.stringify(a) === JSON.stringify(b);
|
|
2608
|
+
const isDeepEqual = isEqual;
|
|
2609
|
+
const isDeepStrictEqual = isEqual;
|
|
2610
|
+
let warned = false;
|
|
2611
|
+
const NO_EXCEPTION_SENTINEL = {};
|
|
2612
|
+
function ok$1(...args) {
|
|
2613
|
+
innerOk(ok$1, args.length, ...args);
|
|
2614
|
+
}
|
|
2615
|
+
function equal$1(actual, expected, message) {
|
|
2616
|
+
if (arguments.length < 2) throw new ERR_MISSING_ARGS("actual", "expected");
|
|
2617
|
+
if (actual != expected && (!Number.isNaN(actual) || !Number.isNaN(expected))) innerFail({
|
|
2618
|
+
actual,
|
|
2619
|
+
expected,
|
|
2620
|
+
message,
|
|
2621
|
+
operator: "==",
|
|
2622
|
+
stackStartFn: equal$1
|
|
2623
|
+
});
|
|
2624
|
+
}
|
|
2625
|
+
function notEqual$1(actual, expected, message) {
|
|
2626
|
+
if (arguments.length < 2) throw new ERR_MISSING_ARGS("actual", "expected");
|
|
2627
|
+
if (actual == expected || Number.isNaN(actual) && Number.isNaN(expected)) innerFail({
|
|
2628
|
+
actual,
|
|
2629
|
+
expected,
|
|
2630
|
+
message,
|
|
2631
|
+
operator: "!=",
|
|
2632
|
+
stackStartFn: notEqual$1
|
|
2633
|
+
});
|
|
2634
|
+
}
|
|
2635
|
+
function deepEqual$1(actual, expected, message) {
|
|
2636
|
+
if (arguments.length < 2) throw new ERR_MISSING_ARGS("actual", "expected");
|
|
2637
|
+
if (!isDeepEqual(actual, expected)) innerFail({
|
|
2638
|
+
actual,
|
|
2639
|
+
expected,
|
|
2640
|
+
message,
|
|
2641
|
+
operator: "deepEqual",
|
|
2642
|
+
stackStartFn: deepEqual$1
|
|
2643
|
+
});
|
|
2644
|
+
}
|
|
2645
|
+
function notDeepEqual$1(actual, expected, message) {
|
|
2646
|
+
if (arguments.length < 2) throw new ERR_MISSING_ARGS("actual", "expected");
|
|
2647
|
+
if (isDeepEqual(actual, expected)) innerFail({
|
|
2648
|
+
actual,
|
|
2649
|
+
expected,
|
|
2650
|
+
message,
|
|
2651
|
+
operator: "notDeepEqual",
|
|
2652
|
+
stackStartFn: notDeepEqual$1
|
|
2653
|
+
});
|
|
2654
|
+
}
|
|
2655
|
+
function deepStrictEqual$1(actual, expected, message) {
|
|
2656
|
+
if (arguments.length < 2) throw new ERR_MISSING_ARGS("actual", "expected");
|
|
2657
|
+
if (!isDeepStrictEqual(actual, expected)) innerFail({
|
|
2658
|
+
actual,
|
|
2659
|
+
expected,
|
|
2660
|
+
message,
|
|
2661
|
+
operator: "deepStrictEqual",
|
|
2662
|
+
stackStartFn: deepStrictEqual$1
|
|
2663
|
+
});
|
|
2664
|
+
}
|
|
2665
|
+
function notDeepStrictEqual$1(actual, expected, message) {
|
|
2666
|
+
if (arguments.length < 2) throw new ERR_MISSING_ARGS("actual", "expected");
|
|
2667
|
+
if (isDeepStrictEqual(actual, expected)) innerFail({
|
|
2668
|
+
actual,
|
|
2669
|
+
expected,
|
|
2670
|
+
message,
|
|
2671
|
+
operator: "notDeepStrictEqual",
|
|
2672
|
+
stackStartFn: notDeepStrictEqual$1
|
|
2673
|
+
});
|
|
2674
|
+
}
|
|
2675
|
+
function strictEqual$1(actual, expected, message) {
|
|
2676
|
+
if (arguments.length < 2) throw new ERR_MISSING_ARGS("actual", "expected");
|
|
2677
|
+
if (!Object.is(actual, expected)) innerFail({
|
|
2678
|
+
actual,
|
|
2679
|
+
expected,
|
|
2680
|
+
message,
|
|
2681
|
+
operator: "strictEqual",
|
|
2682
|
+
stackStartFn: strictEqual$1
|
|
2683
|
+
});
|
|
2684
|
+
}
|
|
2685
|
+
function notStrictEqual$1(actual, expected, message) {
|
|
2686
|
+
if (arguments.length < 2) throw new ERR_MISSING_ARGS("actual", "expected");
|
|
2687
|
+
if (Object.is(actual, expected)) innerFail({
|
|
2688
|
+
actual,
|
|
2689
|
+
expected,
|
|
2690
|
+
message,
|
|
2691
|
+
operator: "notStrictEqual",
|
|
2692
|
+
stackStartFn: notStrictEqual$1
|
|
2693
|
+
});
|
|
2694
|
+
}
|
|
2695
|
+
function throws$1(promiseFn, ...args) {
|
|
2696
|
+
expectsError(throws$1, getActual(promiseFn), ...args);
|
|
2697
|
+
}
|
|
2698
|
+
async function rejects$1(promiseFn, ...args) {
|
|
2699
|
+
expectsError(rejects$1, await waitForActual(promiseFn), ...args);
|
|
2700
|
+
}
|
|
2701
|
+
function doesNotThrow$1(fn, ...args) {
|
|
2702
|
+
expectsNoError(doesNotThrow$1, getActual(fn), ...args);
|
|
2703
|
+
}
|
|
2704
|
+
async function doesNotReject$1(fn, ...args) {
|
|
2705
|
+
expectsNoError(doesNotReject$1, await waitForActual(fn), ...args);
|
|
2706
|
+
}
|
|
2707
|
+
function ifError$1(err) {
|
|
2708
|
+
if (err !== null && err !== void 0) {
|
|
2709
|
+
let message = "ifError got unwanted exception: ";
|
|
2710
|
+
if (typeof err === "object" && typeof err.message === "string") {
|
|
2711
|
+
if (err.message.length === 0 && err.constructor) message += err.constructor.name;
|
|
2712
|
+
else message += err.message;
|
|
2713
|
+
} else message += inspect(err);
|
|
2714
|
+
const newErr = new AssertionError$1({
|
|
2715
|
+
actual: err,
|
|
2716
|
+
expected: null,
|
|
2717
|
+
operator: "ifError",
|
|
2718
|
+
message,
|
|
2719
|
+
stackStartFn: ifError$1
|
|
2720
|
+
});
|
|
2721
|
+
const origStack = err?.stack;
|
|
2722
|
+
if (typeof origStack === "string") {
|
|
2723
|
+
const origStackStart = origStack.indexOf("\n at");
|
|
2724
|
+
if (origStackStart !== -1) {
|
|
2725
|
+
const originalFrames = origStack.slice(origStackStart + 1).split("\n");
|
|
2726
|
+
let newFrames = (newErr.stack || "").split("\n");
|
|
2727
|
+
for (const errFrame of originalFrames) {
|
|
2728
|
+
const pos = newFrames.indexOf(errFrame);
|
|
2729
|
+
if (pos !== -1) {
|
|
2730
|
+
newFrames = newFrames.slice(0, pos);
|
|
2731
|
+
break;
|
|
2732
|
+
}
|
|
2733
|
+
}
|
|
2734
|
+
newErr.stack = `${newFrames.join("\n")}\n${originalFrames.join("\n")}`;
|
|
2735
|
+
}
|
|
2736
|
+
}
|
|
2737
|
+
throw newErr;
|
|
2738
|
+
}
|
|
2739
|
+
}
|
|
2740
|
+
function match$1(string, regexp, message) {
|
|
2741
|
+
internalMatch(string, regexp, message, match$1);
|
|
2742
|
+
}
|
|
2743
|
+
function doesNotMatch$1(string, regexp, message) {
|
|
2744
|
+
internalMatch(string, regexp, message, doesNotMatch$1);
|
|
2745
|
+
}
|
|
2746
|
+
function fail$1(actual, expected, message, operator, stackStartFn) {
|
|
2747
|
+
const argsLen = arguments.length;
|
|
2748
|
+
let internalMessage = false;
|
|
2749
|
+
if (actual == null && argsLen <= 1) {
|
|
2750
|
+
internalMessage = true;
|
|
2751
|
+
message = "Failed";
|
|
2752
|
+
} else if (argsLen === 1) {
|
|
2753
|
+
message = actual;
|
|
2754
|
+
actual = void 0;
|
|
2755
|
+
} else {
|
|
2756
|
+
if (warned === false) {
|
|
2757
|
+
warned = true;
|
|
2758
|
+
process.emitWarning("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.", "DeprecationWarning", "DEP0094");
|
|
2759
|
+
}
|
|
2760
|
+
if (argsLen === 2) operator = "!=";
|
|
2761
|
+
}
|
|
2762
|
+
if (message instanceof Error) throw message;
|
|
2763
|
+
const err = new AssertionError$1({
|
|
2764
|
+
actual,
|
|
2765
|
+
expected,
|
|
2766
|
+
operator: operator === void 0 ? "fail" : operator,
|
|
2767
|
+
stackStartFn: stackStartFn || fail$1,
|
|
2768
|
+
message
|
|
2769
|
+
});
|
|
2770
|
+
if (internalMessage) err.generatedMessage = true;
|
|
2771
|
+
throw err;
|
|
2772
|
+
}
|
|
2773
|
+
function innerFail(obj) {
|
|
2774
|
+
if (obj.message instanceof Error) throw obj.message;
|
|
2775
|
+
throw new AssertionError$1(obj);
|
|
2776
|
+
}
|
|
2777
|
+
function innerOk(fn, argLen, value, message) {
|
|
2778
|
+
if (!value) {
|
|
2779
|
+
let generatedMessage = false;
|
|
2780
|
+
if (argLen === 0) {
|
|
2781
|
+
generatedMessage = true;
|
|
2782
|
+
message = "No value argument passed to `assert.ok()`";
|
|
2783
|
+
} else if (message == null) {
|
|
2784
|
+
generatedMessage = true;
|
|
2785
|
+
message = "<null>";
|
|
2786
|
+
} else if (message instanceof Error) throw message;
|
|
2787
|
+
const err = new AssertionError$1({
|
|
2788
|
+
actual: value,
|
|
2789
|
+
expected: true,
|
|
2790
|
+
message,
|
|
2791
|
+
operator: "==",
|
|
2792
|
+
stackStartFn: fn
|
|
2793
|
+
});
|
|
2794
|
+
err.generatedMessage = generatedMessage;
|
|
2795
|
+
throw err;
|
|
2796
|
+
}
|
|
2797
|
+
}
|
|
2798
|
+
var Comparison = class {
|
|
2799
|
+
constructor(obj, keys, actual) {
|
|
2800
|
+
for (const key of keys) if (key in obj) {
|
|
2801
|
+
if (actual !== void 0 && typeof actual[key] === "string" && obj[key] instanceof RegExp && obj[key].exec(actual[key]) !== null) this[key] = actual[key];
|
|
2802
|
+
else this[key] = obj[key];
|
|
2803
|
+
}
|
|
2804
|
+
}
|
|
2805
|
+
};
|
|
2806
|
+
function compareExceptionKey(actual, expected, key, message, keys, fn) {
|
|
2807
|
+
if (!(key in actual) || !isDeepStrictEqual(actual[key], expected[key])) {
|
|
2808
|
+
if (!message) {
|
|
2809
|
+
const err = new AssertionError$1({
|
|
2810
|
+
actual: new Comparison(actual, keys),
|
|
2811
|
+
expected: new Comparison(expected, keys, actual),
|
|
2812
|
+
operator: "deepStrictEqual",
|
|
2813
|
+
stackStartFn: fn
|
|
2814
|
+
});
|
|
2815
|
+
err.actual = actual;
|
|
2816
|
+
err.expected = expected;
|
|
2817
|
+
err.operator = fn.name;
|
|
2818
|
+
throw err;
|
|
2819
|
+
}
|
|
2820
|
+
innerFail({
|
|
2821
|
+
actual,
|
|
2822
|
+
expected,
|
|
2823
|
+
message,
|
|
2824
|
+
operator: fn.name,
|
|
2825
|
+
stackStartFn: fn
|
|
2826
|
+
});
|
|
2827
|
+
}
|
|
2828
|
+
}
|
|
2829
|
+
function expectedException(actual, expected, message, fn) {
|
|
2830
|
+
let generatedMessage = false;
|
|
2831
|
+
let throwError = false;
|
|
2832
|
+
if (typeof expected !== "function") {
|
|
2833
|
+
if (expected instanceof RegExp) {
|
|
2834
|
+
const str = String(actual);
|
|
2835
|
+
if (RegExp.prototype.exec.call(expected, str) !== null) return;
|
|
2836
|
+
if (!message) {
|
|
2837
|
+
generatedMessage = true;
|
|
2838
|
+
message = `The input did not match the regular expression ${inspect(expected)}. Input:\n\n${inspect(str)}\n`;
|
|
2839
|
+
}
|
|
2840
|
+
throwError = true;
|
|
2841
|
+
} else if (typeof actual !== "object" || actual === null) {
|
|
2842
|
+
const err = new AssertionError$1({
|
|
2843
|
+
actual,
|
|
2844
|
+
expected,
|
|
2845
|
+
message,
|
|
2846
|
+
operator: "deepStrictEqual",
|
|
2847
|
+
stackStartFn: fn
|
|
2848
|
+
});
|
|
2849
|
+
err.operator = fn.name;
|
|
2850
|
+
throw err;
|
|
2851
|
+
} else {
|
|
2852
|
+
const keys = Object.keys(expected);
|
|
2853
|
+
if (expected instanceof Error) keys.push("name", "message");
|
|
2854
|
+
else if (keys.length === 0) throw new ERR_INVALID_ARG_VALUE("error", expected, "may not be an empty object");
|
|
2855
|
+
for (const key of keys) {
|
|
2856
|
+
if (typeof actual[key] === "string" && expected[key] instanceof RegExp && expected[key].exec(actual[key]) !== null) continue;
|
|
2857
|
+
compareExceptionKey(actual, expected, key, message, keys, fn);
|
|
2858
|
+
}
|
|
2859
|
+
return;
|
|
2860
|
+
}
|
|
2861
|
+
} else if (expected.prototype !== void 0 && actual instanceof expected) return;
|
|
2862
|
+
else if (expected instanceof Error) {
|
|
2863
|
+
if (!message) {
|
|
2864
|
+
generatedMessage = true;
|
|
2865
|
+
message = `The error is expected to be an instance of "${expected.name}". Received `;
|
|
2866
|
+
if (actual instanceof Error) {
|
|
2867
|
+
const name = actual.constructor && actual.constructor.name || actual.name;
|
|
2868
|
+
if (expected.name === name) message += "an error with identical name but a different prototype.";
|
|
2869
|
+
else message += `"${name}"`;
|
|
2870
|
+
if (actual.message) message += `\n\nError message:\n\n${actual.message}`;
|
|
2871
|
+
} else message += `"${inspect(actual, { depth: -1 })}"`;
|
|
2872
|
+
}
|
|
2873
|
+
throwError = true;
|
|
2874
|
+
} else {
|
|
2875
|
+
const res = Reflect.apply(expected, {}, [actual]);
|
|
2876
|
+
if (res !== true) {
|
|
2877
|
+
if (!message) {
|
|
2878
|
+
generatedMessage = true;
|
|
2879
|
+
message = `The ${expected.name ? `"${expected.name}" ` : ""}validation function is expected to return "true". Received ${inspect(res)}`;
|
|
2880
|
+
if (actual instanceof Error) message += `\n\nCaught error:\n\n${actual}`;
|
|
2881
|
+
}
|
|
2882
|
+
throwError = true;
|
|
2883
|
+
}
|
|
2884
|
+
}
|
|
2885
|
+
if (throwError) {
|
|
2886
|
+
const err = new AssertionError$1({
|
|
2887
|
+
actual,
|
|
2888
|
+
expected,
|
|
2889
|
+
message,
|
|
2890
|
+
operator: fn.name,
|
|
2891
|
+
stackStartFn: fn
|
|
2892
|
+
});
|
|
2893
|
+
err.generatedMessage = generatedMessage;
|
|
2894
|
+
throw err;
|
|
2895
|
+
}
|
|
2896
|
+
}
|
|
2897
|
+
function getActual(fn) {
|
|
2898
|
+
try {
|
|
2899
|
+
fn();
|
|
2900
|
+
} catch (error_) {
|
|
2901
|
+
return error_;
|
|
2902
|
+
}
|
|
2903
|
+
return NO_EXCEPTION_SENTINEL;
|
|
2904
|
+
}
|
|
2905
|
+
function checkIsPromise(obj) {
|
|
2906
|
+
return obj instanceof Promise || obj !== null && typeof obj === "object" && typeof obj.then === "function" && typeof obj.catch === "function";
|
|
2907
|
+
}
|
|
2908
|
+
function internalMatch(string, regexp, message, fn) {
|
|
2909
|
+
if (!(regexp instanceof RegExp)) throw new ERR_INVALID_ARG_TYPE("regexp", "RegExp", regexp);
|
|
2910
|
+
const match = fn === assert$1.match;
|
|
2911
|
+
if (typeof string !== "string" || regexp.exec(string) !== null !== match) {
|
|
2912
|
+
if (message instanceof Error) throw message;
|
|
2913
|
+
const generatedMessage = !message;
|
|
2914
|
+
message = message || (typeof string === "string" ? (match ? "The input did not match the regular expression " : "The input was expected to not match the regular expression ") + `${inspect(regexp)}. Input:\n\n${inspect(string)}\n` : `The "string" argument must be of type string. Received type ${typeof string} (${inspect(string)})`);
|
|
2915
|
+
const err = new AssertionError$1({
|
|
2916
|
+
actual: string,
|
|
2917
|
+
expected: regexp,
|
|
2918
|
+
message,
|
|
2919
|
+
operator: fn?.name,
|
|
2920
|
+
stackStartFn: fn
|
|
2921
|
+
});
|
|
2922
|
+
err.generatedMessage = generatedMessage;
|
|
2923
|
+
throw err;
|
|
2924
|
+
}
|
|
2925
|
+
}
|
|
2926
|
+
async function waitForActual(promiseFn) {
|
|
2927
|
+
let resultPromise;
|
|
2928
|
+
if (typeof promiseFn === "function") {
|
|
2929
|
+
resultPromise = promiseFn();
|
|
2930
|
+
if (!checkIsPromise(resultPromise)) throw new ERR_INVALID_RETURN_VALUE("instance of Promise", "promiseFn", resultPromise);
|
|
2931
|
+
} else if (checkIsPromise(promiseFn)) resultPromise = promiseFn;
|
|
2932
|
+
else throw new ERR_INVALID_ARG_TYPE("promiseFn", ["Function", "Promise"], promiseFn);
|
|
2933
|
+
try {
|
|
2934
|
+
await resultPromise;
|
|
2935
|
+
} catch (error_) {
|
|
2936
|
+
return error_;
|
|
2937
|
+
}
|
|
2938
|
+
return NO_EXCEPTION_SENTINEL;
|
|
2939
|
+
}
|
|
2940
|
+
function expectsError(stackStartFn, actual, error, message) {
|
|
2941
|
+
if (typeof error === "string") {
|
|
2942
|
+
if (arguments.length === 4) throw new ERR_INVALID_ARG_TYPE("error", [
|
|
2943
|
+
"Object",
|
|
2944
|
+
"Error",
|
|
2945
|
+
"Function",
|
|
2946
|
+
"RegExp"
|
|
2947
|
+
], error);
|
|
2948
|
+
if (typeof actual === "object" && actual !== null) {
|
|
2949
|
+
if (actual?.message === error) throw new ERR_AMBIGUOUS_ARGUMENT("error/message", `The error message "${actual.message}" is identical to the message.`);
|
|
2950
|
+
} else if (actual === error) throw new ERR_AMBIGUOUS_ARGUMENT("error/message", `The error "${actual}" is identical to the message.`);
|
|
2951
|
+
message = error;
|
|
2952
|
+
error = void 0;
|
|
2953
|
+
} else if (error != null && typeof error !== "object" && typeof error !== "function") throw new ERR_INVALID_ARG_TYPE("error", [
|
|
2954
|
+
"Object",
|
|
2955
|
+
"Error",
|
|
2956
|
+
"Function",
|
|
2957
|
+
"RegExp"
|
|
2958
|
+
], error);
|
|
2959
|
+
if (actual === NO_EXCEPTION_SENTINEL) {
|
|
2960
|
+
let details = "";
|
|
2961
|
+
if (error && error.name) details += ` (${error.name})`;
|
|
2962
|
+
details += message ? `: ${message}` : ".";
|
|
2963
|
+
const fnType = stackStartFn === assert$1.rejects ? "rejection" : "exception";
|
|
2964
|
+
innerFail({
|
|
2965
|
+
actual: void 0,
|
|
2966
|
+
expected: error,
|
|
2967
|
+
operator: stackStartFn.name,
|
|
2968
|
+
message: `Missing expected ${fnType}${details}`,
|
|
2969
|
+
stackStartFn
|
|
2970
|
+
});
|
|
2971
|
+
}
|
|
2972
|
+
if (!error) return;
|
|
2973
|
+
expectedException(actual, error, message, stackStartFn);
|
|
2974
|
+
}
|
|
2975
|
+
function hasMatchingError(actual, expected) {
|
|
2976
|
+
if (typeof expected !== "function") {
|
|
2977
|
+
if (expected instanceof RegExp) {
|
|
2978
|
+
const str = String(actual);
|
|
2979
|
+
return RegExp.prototype.exec.call(expected, str) !== null;
|
|
2980
|
+
}
|
|
2981
|
+
throw new ERR_INVALID_ARG_TYPE("expected", ["Function", "RegExp"], expected);
|
|
2982
|
+
}
|
|
2983
|
+
if (expected.prototype !== void 0 && actual instanceof expected) return true;
|
|
2984
|
+
if (expected instanceof Error) return false;
|
|
2985
|
+
return Reflect.apply(expected, {}, [actual]) === true;
|
|
2986
|
+
}
|
|
2987
|
+
function expectsNoError(stackStartFn, actual, error, message) {
|
|
2988
|
+
if (actual === NO_EXCEPTION_SENTINEL) return;
|
|
2989
|
+
if (typeof error === "string") {
|
|
2990
|
+
message = error;
|
|
2991
|
+
error = void 0;
|
|
2992
|
+
}
|
|
2993
|
+
if (!error || hasMatchingError(actual, error)) {
|
|
2994
|
+
const details = message ? `: ${message}` : ".";
|
|
2995
|
+
const fnType = stackStartFn === assert$1.doesNotReject ? "rejection" : "exception";
|
|
2996
|
+
innerFail({
|
|
2997
|
+
actual,
|
|
2998
|
+
expected: error,
|
|
2999
|
+
operator: stackStartFn?.name,
|
|
3000
|
+
message: `Got unwanted ${fnType}${details}\nActual message: "${actual && actual.message}"`,
|
|
3001
|
+
stackStartFn
|
|
3002
|
+
});
|
|
3003
|
+
}
|
|
3004
|
+
throw actual;
|
|
3005
|
+
}
|
|
3006
|
+
const assert$1 = Object.assign(ok$1, {});
|
|
3007
|
+
const CallTracker = /* @__PURE__ */ notImplementedClass("asset.CallTracker");
|
|
3008
|
+
const partialDeepStrictEqual = /* @__PURE__ */ notImplemented("assert.partialDeepStrictEqual");
|
|
3009
|
+
assert$1.fail = fail$1;
|
|
3010
|
+
assert$1.ok = ok$1;
|
|
3011
|
+
assert$1.equal = equal$1;
|
|
3012
|
+
assert$1.notEqual = notEqual$1;
|
|
3013
|
+
assert$1.deepEqual = deepEqual$1;
|
|
3014
|
+
assert$1.notDeepEqual = notDeepEqual$1;
|
|
3015
|
+
assert$1.deepStrictEqual = deepStrictEqual$1;
|
|
3016
|
+
assert$1.notDeepStrictEqual = notDeepStrictEqual$1;
|
|
3017
|
+
assert$1.strictEqual = strictEqual$1;
|
|
3018
|
+
assert$1.notStrictEqual = notStrictEqual$1;
|
|
3019
|
+
assert$1.throws = throws$1;
|
|
3020
|
+
assert$1.rejects = rejects$1;
|
|
3021
|
+
assert$1.doesNotThrow = doesNotThrow$1;
|
|
3022
|
+
assert$1.doesNotReject = doesNotReject$1;
|
|
3023
|
+
assert$1.ifError = ifError$1;
|
|
3024
|
+
assert$1.match = match$1;
|
|
3025
|
+
assert$1.doesNotMatch = doesNotMatch$1;
|
|
3026
|
+
assert$1.partialDeepStrictEqual = partialDeepStrictEqual;
|
|
3027
|
+
assert$1.AssertionError = AssertionError$1;
|
|
3028
|
+
assert$1.CallTracker = CallTracker;
|
|
3029
|
+
const strict$1 = Object.assign(function _strict(...args) {
|
|
3030
|
+
innerOk(strict$1, args.length, ...args);
|
|
3031
|
+
}, assert$1, {
|
|
3032
|
+
equal: assert$1.strictEqual,
|
|
3033
|
+
deepEqual: assert$1.deepStrictEqual,
|
|
3034
|
+
notEqual: assert$1.notStrictEqual,
|
|
3035
|
+
notDeepEqual: assert$1.notDeepStrictEqual
|
|
3036
|
+
});
|
|
3037
|
+
assert$1.strict = strict$1;
|
|
3038
|
+
assert$1.strict.strict = assert$1.strict;
|
|
3039
|
+
//#endregion
|
|
3040
|
+
//#region src/node/assert.ts
|
|
3041
|
+
var assert_default = import_assert.default;
|
|
3042
|
+
const { AssertionError, deepEqual, deepStrictEqual, doesNotMatch, doesNotReject, doesNotThrow, equal, fail, ifError, match, notDeepEqual, notDeepStrictEqual, notEqual, notStrictEqual, ok, rejects, strict, strictEqual, throws } = import_assert.default;
|
|
3043
|
+
//#endregion
|
|
3044
|
+
export { AssertionError, CallTracker, deepEqual, deepStrictEqual, assert_default as default, doesNotMatch, doesNotReject, doesNotThrow, equal, fail, ifError, match, notDeepEqual, notDeepStrictEqual, notEqual, notStrictEqual, ok, partialDeepStrictEqual, rejects, strict, strictEqual, throws };
|