@tonyclaw/agent-inspector 4.0.7 → 4.0.9
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/.output/backend/nitro.json +1 -1
- package/.output/cli.js +915 -25970
- package/.output/server/_chunks/ssr-renderer.mjs +1 -38
- package/.output/server/_libs/@opentelemetry/semantic-conventions+[...].mjs +1 -2658
- package/.output/server/_libs/agent-base.mjs +2 -234
- package/.output/server/_libs/ajv-formats.mjs +1 -330
- package/.output/server/_libs/ajv.mjs +8 -6080
- package/.output/server/_libs/anthropic-ai__sdk.mjs +19 -6021
- package/.output/server/_libs/atomically.mjs +1 -155
- package/.output/server/_libs/base64-js.mjs +1 -102
- package/.output/server/_libs/bignumber.js.mjs +1 -1353
- package/.output/server/_libs/buffer-equal-constant-time.mjs +1 -38
- package/.output/server/_libs/conf.mjs +1 -635
- package/.output/server/_libs/cookie-es.mjs +1 -44
- package/.output/server/_libs/core-util-is.mjs +1 -75
- package/.output/server/_libs/data-uri-to-buffer.mjs +1 -39
- package/.output/server/_libs/debounce-fn.mjs +1 -69
- package/.output/server/_libs/debug.mjs +5 -547
- package/.output/server/_libs/dot-prop.mjs +1 -265
- package/.output/server/_libs/ecdsa-sig-formatter.mjs +1 -162
- package/.output/server/_libs/env-paths.mjs +1 -57
- package/.output/server/_libs/extend.mjs +1 -94
- package/.output/server/_libs/fast-deep-equal.mjs +1 -38
- package/.output/server/_libs/fast-uri.mjs +1 -812
- package/.output/server/_libs/fetch-blob.mjs +1 -287
- package/.output/server/_libs/formdata-polyfill.mjs +9 -86
- package/.output/server/_libs/gaxios.mjs +5 -926
- package/.output/server/_libs/gcp-metadata.mjs +1 -322
- package/.output/server/_libs/google-auth-library.mjs +16 -6339
- package/.output/server/_libs/google-logging-utils.mjs +1 -385
- package/.output/server/_libs/google__genai.mjs +13 -18034
- package/.output/server/_libs/h3-v2.mjs +2 -287
- package/.output/server/_libs/h3.mjs +2 -408
- package/.output/server/_libs/has-flag.mjs +1 -16
- package/.output/server/_libs/https-proxy-agent.mjs +7 -280
- package/.output/server/_libs/immediate.mjs +1 -74
- package/.output/server/_libs/inherits.mjs +1 -50
- package/.output/server/_libs/isarray.mjs +1 -14
- package/.output/server/_libs/isbot.mjs +1 -20
- package/.output/server/_libs/json-bigint.mjs +8 -413
- package/.output/server/_libs/json-schema-traverse.mjs +1 -91
- package/.output/server/_libs/jszip.mjs +2 -3051
- package/.output/server/_libs/jwa.mjs +3 -233
- package/.output/server/_libs/jws.mjs +1 -298
- package/.output/server/_libs/lie.mjs +1 -273
- package/.output/server/_libs/mariozechner__pi-agent-core.mjs +1 -824
- package/.output/server/_libs/mariozechner__pi-ai.mjs +34 -22887
- package/.output/server/_libs/mimic-function.mjs +2 -47
- package/.output/server/_libs/mistralai__mistralai.mjs +7 -32045
- package/.output/server/_libs/modelcontextprotocol__core.mjs +1 -1121
- package/.output/server/_libs/modelcontextprotocol__server.mjs +13 -13205
- package/.output/server/_libs/ms.mjs +1 -120
- package/.output/server/_libs/node-domexception.mjs +1 -17
- package/.output/server/_libs/node-fetch.mjs +4 -1578
- package/.output/server/_libs/ohash.mjs +1 -1
- package/.output/server/_libs/openai.mjs +23 -6766
- package/.output/server/_libs/opentelemetry__api.mjs +1 -1678
- package/.output/server/_libs/p-retry.mjs +1 -87
- package/.output/server/_libs/pako.mjs +1 -4223
- package/.output/server/_libs/partial-json.mjs +2 -244
- package/.output/server/_libs/process-nextick-args.mjs +1 -48
- package/.output/server/_libs/react-dom.mjs +62 -10778
- package/.output/server/_libs/react.mjs +1 -519
- package/.output/server/_libs/readable-stream.mjs +1 -1518
- package/.output/server/_libs/retry.mjs +1 -236
- package/.output/server/_libs/rou3.mjs +1 -14
- package/.output/server/_libs/safe-buffer.mjs +1 -126
- package/.output/server/_libs/semver.mjs +1 -1938
- package/.output/server/_libs/seroval-plugins.mjs +1 -58
- package/.output/server/_libs/seroval.mjs +3 -1775
- package/.output/server/_libs/setimmediate.mjs +1 -152
- package/.output/server/_libs/srvx.mjs +4 -1390
- package/.output/server/_libs/stubborn-fs.mjs +1 -91
- package/.output/server/_libs/stubborn-utils.mjs +1 -66
- package/.output/server/_libs/supports-color.mjs +1 -108
- package/.output/server/_libs/tanstack__history.mjs +1 -230
- package/.output/server/_libs/tanstack__react-router.mjs +1 -848
- package/.output/server/_libs/tanstack__react-store.mjs +1 -1
- package/.output/server/_libs/tanstack__router-core.mjs +1 -4839
- package/.output/server/_libs/typebox.mjs +3 -6596
- package/.output/server/_libs/ufo.mjs +1 -54
- package/.output/server/_libs/uint8array-extras.mjs +1 -69
- package/.output/server/_libs/util-deprecate.mjs +1 -12
- package/.output/server/_libs/web-streams-polyfill.mjs +1 -4282
- package/.output/server/_libs/when-exit.mjs +1 -53
- package/.output/server/_libs/ws.mjs +7 -3715
- package/.output/server/_libs/zod-to-json-schema.mjs +5 -1207
- package/.output/server/_libs/zod.mjs +59 -9958
- package/.output/server/_ssr/empty-plugin-adapters-C3Q1xu4u.mjs +1 -0
- package/.output/server/_ssr/index.mjs +2 -1512
- package/.output/server/_ssr/publicBasePathContext--TAQS2_5.mjs +1 -0
- package/.output/server/_ssr/router-zSWaME0l.mjs +341 -0
- package/.output/server/_ssr/start-PDVGOqUN.mjs +1 -0
- package/.output/server/_tanstack-start-manifest_v-D7cKwKzM.mjs +1 -0
- package/.output/server/index.mjs +1 -320
- package/.output/ui/assets/{CompareDrawer-fWsmegqc.js → CompareDrawer-C6KvvPtJ.js} +1 -1
- package/.output/ui/assets/{InspectorPet-Z9XIA0t8.js → InspectorPet-CSH6OAhB.js} +1 -1
- package/.output/ui/assets/{ProxyViewerContainer-DhIB_ZAU.js → ProxyViewerContainer-vPd7g0Xn.js} +4 -4
- package/.output/ui/assets/{ReplayDialog-w_3PENIi.js → ReplayDialog-DbXUcT39.js} +1 -1
- package/.output/ui/assets/{RequestAnatomy-Dix0D4G6.js → RequestAnatomy-BWOCIN7J.js} +1 -1
- package/.output/ui/assets/{ResponseView-BtlbxW2o.js → ResponseView-BqDbTzFs.js} +1 -1
- package/.output/ui/assets/{StreamingChunkSequence-BqNQJASb.js → StreamingChunkSequence-UHl2g6w6.js} +1 -1
- package/.output/ui/assets/{_sessionId-DPiw4uu2.js → _sessionId-B2S61lDJ.js} +1 -1
- package/.output/ui/assets/{_sessionId-Bo9J8C5J.js → _sessionId-CS6hqj8-.js} +1 -1
- package/.output/ui/assets/{index-BL5id77_.js → index-C6V66rNI.js} +1 -1
- package/.output/ui/assets/{index-icwV1YtX.js → index-DY5xBYHr.js} +1 -1
- package/.output/ui/assets/{index-Wd6TK76x.js → index-DgyIeqyV.js} +2 -2
- package/.output/ui/assets/{index-CWSVfojK.js → index-HLs5jTyi.js} +1 -1
- package/.output/ui/assets/{json-viewer-Cpr3uw1I.js → json-viewer-i5LcN8e7.js} +1 -1
- package/.output/ui/assets/{jszip.min-Cncg6JOi.js → jszip.min-yNpb9qnf.js} +1 -1
- package/.output/ui/index.html +1 -1
- package/.output/workers/logFinalizer.worker.js +41 -17739
- package/.output/workers/sessionWorkerEntry.js +41 -17735
- package/package.json +7 -7
- package/.output/server/_ssr/empty-plugin-adapters-BFgPZ6_d.mjs +0 -6
- package/.output/server/_ssr/publicBasePathContext-IH2ilOfu.mjs +0 -176
- package/.output/server/_ssr/router-weYHAqCb.mjs +0 -27177
- package/.output/server/_ssr/start-COQu_AgD.mjs +0 -57
- package/.output/server/_tanstack-start-manifest_v-ClTaMkEj.mjs +0 -4
|
@@ -1,265 +1 @@
|
|
|
1
|
-
const
|
|
2
|
-
const type = typeof value;
|
|
3
|
-
return value !== null && (type === "object" || type === "function");
|
|
4
|
-
};
|
|
5
|
-
const disallowedKeys = /* @__PURE__ */ new Set([
|
|
6
|
-
"__proto__",
|
|
7
|
-
"prototype",
|
|
8
|
-
"constructor"
|
|
9
|
-
]);
|
|
10
|
-
const MAX_ARRAY_INDEX = 1e6;
|
|
11
|
-
const isDigit = (character) => character >= "0" && character <= "9";
|
|
12
|
-
function shouldCoerceToNumber(segment) {
|
|
13
|
-
if (segment === "0") {
|
|
14
|
-
return true;
|
|
15
|
-
}
|
|
16
|
-
if (/^[1-9]\d*$/.test(segment)) {
|
|
17
|
-
const parsedNumber = Number.parseInt(segment, 10);
|
|
18
|
-
return parsedNumber <= Number.MAX_SAFE_INTEGER && parsedNumber <= MAX_ARRAY_INDEX;
|
|
19
|
-
}
|
|
20
|
-
return false;
|
|
21
|
-
}
|
|
22
|
-
function processSegment(segment, parts) {
|
|
23
|
-
if (disallowedKeys.has(segment)) {
|
|
24
|
-
return false;
|
|
25
|
-
}
|
|
26
|
-
if (segment && shouldCoerceToNumber(segment)) {
|
|
27
|
-
parts.push(Number.parseInt(segment, 10));
|
|
28
|
-
} else {
|
|
29
|
-
parts.push(segment);
|
|
30
|
-
}
|
|
31
|
-
return true;
|
|
32
|
-
}
|
|
33
|
-
function parsePath(path) {
|
|
34
|
-
if (typeof path !== "string") {
|
|
35
|
-
throw new TypeError(`Expected a string, got ${typeof path}`);
|
|
36
|
-
}
|
|
37
|
-
const parts = [];
|
|
38
|
-
let currentSegment = "";
|
|
39
|
-
let currentPart = "start";
|
|
40
|
-
let isEscaping = false;
|
|
41
|
-
let position = 0;
|
|
42
|
-
for (const character of path) {
|
|
43
|
-
position++;
|
|
44
|
-
if (isEscaping) {
|
|
45
|
-
currentSegment += character;
|
|
46
|
-
isEscaping = false;
|
|
47
|
-
continue;
|
|
48
|
-
}
|
|
49
|
-
if (character === "\\") {
|
|
50
|
-
if (currentPart === "index") {
|
|
51
|
-
throw new Error(`Invalid character '${character}' in an index at position ${position}`);
|
|
52
|
-
}
|
|
53
|
-
if (currentPart === "indexEnd") {
|
|
54
|
-
throw new Error(`Invalid character '${character}' after an index at position ${position}`);
|
|
55
|
-
}
|
|
56
|
-
isEscaping = true;
|
|
57
|
-
currentPart = currentPart === "start" ? "property" : currentPart;
|
|
58
|
-
continue;
|
|
59
|
-
}
|
|
60
|
-
switch (character) {
|
|
61
|
-
case ".": {
|
|
62
|
-
if (currentPart === "index") {
|
|
63
|
-
throw new Error(`Invalid character '${character}' in an index at position ${position}`);
|
|
64
|
-
}
|
|
65
|
-
if (currentPart === "indexEnd") {
|
|
66
|
-
currentPart = "property";
|
|
67
|
-
break;
|
|
68
|
-
}
|
|
69
|
-
if (!processSegment(currentSegment, parts)) {
|
|
70
|
-
return [];
|
|
71
|
-
}
|
|
72
|
-
currentSegment = "";
|
|
73
|
-
currentPart = "property";
|
|
74
|
-
break;
|
|
75
|
-
}
|
|
76
|
-
case "[": {
|
|
77
|
-
if (currentPart === "index") {
|
|
78
|
-
throw new Error(`Invalid character '${character}' in an index at position ${position}`);
|
|
79
|
-
}
|
|
80
|
-
if (currentPart === "indexEnd") {
|
|
81
|
-
currentPart = "index";
|
|
82
|
-
break;
|
|
83
|
-
}
|
|
84
|
-
if (currentPart === "property" || currentPart === "start") {
|
|
85
|
-
if ((currentSegment || currentPart === "property") && !processSegment(currentSegment, parts)) {
|
|
86
|
-
return [];
|
|
87
|
-
}
|
|
88
|
-
currentSegment = "";
|
|
89
|
-
}
|
|
90
|
-
currentPart = "index";
|
|
91
|
-
break;
|
|
92
|
-
}
|
|
93
|
-
case "]": {
|
|
94
|
-
if (currentPart === "index") {
|
|
95
|
-
if (currentSegment === "") {
|
|
96
|
-
const lastSegment = parts.pop() || "";
|
|
97
|
-
currentSegment = lastSegment + "[]";
|
|
98
|
-
currentPart = "property";
|
|
99
|
-
} else {
|
|
100
|
-
const parsedNumber = Number.parseInt(currentSegment, 10);
|
|
101
|
-
const isValidInteger = !Number.isNaN(parsedNumber) && Number.isFinite(parsedNumber) && parsedNumber >= 0 && parsedNumber <= Number.MAX_SAFE_INTEGER && parsedNumber <= MAX_ARRAY_INDEX && currentSegment === String(parsedNumber);
|
|
102
|
-
if (isValidInteger) {
|
|
103
|
-
parts.push(parsedNumber);
|
|
104
|
-
} else {
|
|
105
|
-
parts.push(currentSegment);
|
|
106
|
-
}
|
|
107
|
-
currentSegment = "";
|
|
108
|
-
currentPart = "indexEnd";
|
|
109
|
-
}
|
|
110
|
-
break;
|
|
111
|
-
}
|
|
112
|
-
if (currentPart === "indexEnd") {
|
|
113
|
-
throw new Error(`Invalid character '${character}' after an index at position ${position}`);
|
|
114
|
-
}
|
|
115
|
-
currentSegment += character;
|
|
116
|
-
break;
|
|
117
|
-
}
|
|
118
|
-
default: {
|
|
119
|
-
if (currentPart === "index" && !isDigit(character)) {
|
|
120
|
-
throw new Error(`Invalid character '${character}' in an index at position ${position}`);
|
|
121
|
-
}
|
|
122
|
-
if (currentPart === "indexEnd") {
|
|
123
|
-
throw new Error(`Invalid character '${character}' after an index at position ${position}`);
|
|
124
|
-
}
|
|
125
|
-
if (currentPart === "start") {
|
|
126
|
-
currentPart = "property";
|
|
127
|
-
}
|
|
128
|
-
currentSegment += character;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
if (isEscaping) {
|
|
133
|
-
currentSegment += "\\";
|
|
134
|
-
}
|
|
135
|
-
switch (currentPart) {
|
|
136
|
-
case "property": {
|
|
137
|
-
if (!processSegment(currentSegment, parts)) {
|
|
138
|
-
return [];
|
|
139
|
-
}
|
|
140
|
-
break;
|
|
141
|
-
}
|
|
142
|
-
case "index": {
|
|
143
|
-
throw new Error("Index was not closed");
|
|
144
|
-
}
|
|
145
|
-
case "start": {
|
|
146
|
-
parts.push("");
|
|
147
|
-
break;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
return parts;
|
|
151
|
-
}
|
|
152
|
-
function normalizePath(path) {
|
|
153
|
-
if (typeof path === "string") {
|
|
154
|
-
return parsePath(path);
|
|
155
|
-
}
|
|
156
|
-
if (Array.isArray(path)) {
|
|
157
|
-
const normalized = [];
|
|
158
|
-
for (const [index, segment] of path.entries()) {
|
|
159
|
-
if (typeof segment !== "string" && typeof segment !== "number") {
|
|
160
|
-
throw new TypeError(`Expected a string or number for path segment at index ${index}, got ${typeof segment}`);
|
|
161
|
-
}
|
|
162
|
-
if (typeof segment === "number" && !Number.isFinite(segment)) {
|
|
163
|
-
throw new TypeError(`Path segment at index ${index} must be a finite number, got ${segment}`);
|
|
164
|
-
}
|
|
165
|
-
if (disallowedKeys.has(segment)) {
|
|
166
|
-
return [];
|
|
167
|
-
}
|
|
168
|
-
if (typeof segment === "string" && shouldCoerceToNumber(segment)) {
|
|
169
|
-
normalized.push(Number.parseInt(segment, 10));
|
|
170
|
-
} else {
|
|
171
|
-
normalized.push(segment);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
return normalized;
|
|
175
|
-
}
|
|
176
|
-
return [];
|
|
177
|
-
}
|
|
178
|
-
function getProperty(object, path, value) {
|
|
179
|
-
if (!isObject(object) || typeof path !== "string" && !Array.isArray(path)) {
|
|
180
|
-
return value === void 0 ? object : value;
|
|
181
|
-
}
|
|
182
|
-
const pathArray = normalizePath(path);
|
|
183
|
-
if (pathArray.length === 0) {
|
|
184
|
-
return value;
|
|
185
|
-
}
|
|
186
|
-
for (let index = 0; index < pathArray.length; index++) {
|
|
187
|
-
const key = pathArray[index];
|
|
188
|
-
object = object[key];
|
|
189
|
-
if (object === void 0 || object === null) {
|
|
190
|
-
if (index !== pathArray.length - 1) {
|
|
191
|
-
return value;
|
|
192
|
-
}
|
|
193
|
-
break;
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
return object === void 0 ? value : object;
|
|
197
|
-
}
|
|
198
|
-
function setProperty(object, path, value) {
|
|
199
|
-
if (!isObject(object) || typeof path !== "string" && !Array.isArray(path)) {
|
|
200
|
-
return object;
|
|
201
|
-
}
|
|
202
|
-
const root = object;
|
|
203
|
-
const pathArray = normalizePath(path);
|
|
204
|
-
if (pathArray.length === 0) {
|
|
205
|
-
return object;
|
|
206
|
-
}
|
|
207
|
-
for (let index = 0; index < pathArray.length; index++) {
|
|
208
|
-
const key = pathArray[index];
|
|
209
|
-
if (index === pathArray.length - 1) {
|
|
210
|
-
object[key] = value;
|
|
211
|
-
} else if (!isObject(object[key])) {
|
|
212
|
-
const nextKey = pathArray[index + 1];
|
|
213
|
-
const shouldCreateArray = typeof nextKey === "number";
|
|
214
|
-
object[key] = shouldCreateArray ? [] : {};
|
|
215
|
-
}
|
|
216
|
-
object = object[key];
|
|
217
|
-
}
|
|
218
|
-
return root;
|
|
219
|
-
}
|
|
220
|
-
function deleteProperty(object, path) {
|
|
221
|
-
if (!isObject(object) || typeof path !== "string" && !Array.isArray(path)) {
|
|
222
|
-
return false;
|
|
223
|
-
}
|
|
224
|
-
const pathArray = normalizePath(path);
|
|
225
|
-
if (pathArray.length === 0) {
|
|
226
|
-
return false;
|
|
227
|
-
}
|
|
228
|
-
for (let index = 0; index < pathArray.length; index++) {
|
|
229
|
-
const key = pathArray[index];
|
|
230
|
-
if (index === pathArray.length - 1) {
|
|
231
|
-
const existed = Object.hasOwn(object, key);
|
|
232
|
-
if (!existed) {
|
|
233
|
-
return false;
|
|
234
|
-
}
|
|
235
|
-
delete object[key];
|
|
236
|
-
return true;
|
|
237
|
-
}
|
|
238
|
-
object = object[key];
|
|
239
|
-
if (!isObject(object)) {
|
|
240
|
-
return false;
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
function hasProperty(object, path) {
|
|
245
|
-
if (!isObject(object) || typeof path !== "string" && !Array.isArray(path)) {
|
|
246
|
-
return false;
|
|
247
|
-
}
|
|
248
|
-
const pathArray = normalizePath(path);
|
|
249
|
-
if (pathArray.length === 0) {
|
|
250
|
-
return false;
|
|
251
|
-
}
|
|
252
|
-
for (const key of pathArray) {
|
|
253
|
-
if (!isObject(object) || !(key in object)) {
|
|
254
|
-
return false;
|
|
255
|
-
}
|
|
256
|
-
object = object[key];
|
|
257
|
-
}
|
|
258
|
-
return true;
|
|
259
|
-
}
|
|
260
|
-
export {
|
|
261
|
-
deleteProperty as d,
|
|
262
|
-
getProperty as g,
|
|
263
|
-
hasProperty as h,
|
|
264
|
-
setProperty as s
|
|
265
|
-
};
|
|
1
|
+
const f=r=>{const n=typeof r;return r!==null&&(n==="object"||n==="function")},l=new Set(["__proto__","prototype","constructor"]),y=1e6,h=r=>r>="0"&&r<="9";function c(r){if(r==="0")return!0;if(/^[1-9]\d*$/.test(r)){const n=Number.parseInt(r,10);return n<=Number.MAX_SAFE_INTEGER&&n<=y}return!1}function d(r,n){return l.has(r)?!1:(r&&c(r)?n.push(Number.parseInt(r,10)):n.push(r),!0)}function x(r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);const n=[];let t="",e="start",i=!1,o=0;for(const s of r){if(o++,i){t+=s,i=!1;continue}if(s==="\\"){if(e==="index")throw new Error(`Invalid character '${s}' in an index at position ${o}`);if(e==="indexEnd")throw new Error(`Invalid character '${s}' after an index at position ${o}`);i=!0,e=e==="start"?"property":e;continue}switch(s){case".":{if(e==="index")throw new Error(`Invalid character '${s}' in an index at position ${o}`);if(e==="indexEnd"){e="property";break}if(!d(t,n))return[];t="",e="property";break}case"[":{if(e==="index")throw new Error(`Invalid character '${s}' in an index at position ${o}`);if(e==="indexEnd"){e="index";break}if(e==="property"||e==="start"){if((t||e==="property")&&!d(t,n))return[];t=""}e="index";break}case"]":{if(e==="index"){if(t==="")t=(n.pop()||"")+"[]",e="property";else{const a=Number.parseInt(t,10);!Number.isNaN(a)&&Number.isFinite(a)&&a>=0&&a<=Number.MAX_SAFE_INTEGER&&a<=y&&t===String(a)?n.push(a):n.push(t),t="",e="indexEnd"}break}if(e==="indexEnd")throw new Error(`Invalid character '${s}' after an index at position ${o}`);t+=s;break}default:{if(e==="index"&&!h(s))throw new Error(`Invalid character '${s}' in an index at position ${o}`);if(e==="indexEnd")throw new Error(`Invalid character '${s}' after an index at position ${o}`);e==="start"&&(e="property"),t+=s}}}switch(i&&(t+="\\"),e){case"property":{if(!d(t,n))return[];break}case"index":throw new Error("Index was not closed");case"start":{n.push("");break}}return n}function u(r){if(typeof r=="string")return x(r);if(Array.isArray(r)){const n=[];for(const[t,e]of r.entries()){if(typeof e!="string"&&typeof e!="number")throw new TypeError(`Expected a string or number for path segment at index ${t}, got ${typeof e}`);if(typeof e=="number"&&!Number.isFinite(e))throw new TypeError(`Path segment at index ${t} must be a finite number, got ${e}`);if(l.has(e))return[];typeof e=="string"&&c(e)?n.push(Number.parseInt(e,10)):n.push(e)}return n}return[]}function g(r,n,t){if(!f(r)||typeof n!="string"&&!Array.isArray(n))return t===void 0?r:t;const e=u(n);if(e.length===0)return t;for(let i=0;i<e.length;i++){const o=e[i];if(r=r[o],r==null){if(i!==e.length-1)return t;break}}return r===void 0?t:r}function w(r,n,t){if(!f(r)||typeof n!="string"&&!Array.isArray(n))return r;const e=r,i=u(n);if(i.length===0)return r;for(let o=0;o<i.length;o++){const s=i[o];if(o===i.length-1)r[s]=t;else if(!f(r[s])){const p=typeof i[o+1]=="number";r[s]=p?[]:{}}r=r[s]}return e}function E(r,n){if(!f(r)||typeof n!="string"&&!Array.isArray(n))return!1;const t=u(n);if(t.length===0)return!1;for(let e=0;e<t.length;e++){const i=t[e];if(e===t.length-1)return Object.hasOwn(r,i)?(delete r[i],!0):!1;if(r=r[i],!f(r))return!1}}function A(r,n){if(!f(r)||typeof n!="string"&&!Array.isArray(n))return!1;const t=u(n);if(t.length===0)return!1;for(const e of t){if(!f(r)||!(e in r))return!1;r=r[e]}return!0}export{E as d,g,A as h,w as s};
|
|
@@ -1,162 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
var paramBytesForAlg_1;
|
|
3
|
-
var hasRequiredParamBytesForAlg;
|
|
4
|
-
function requireParamBytesForAlg() {
|
|
5
|
-
if (hasRequiredParamBytesForAlg) return paramBytesForAlg_1;
|
|
6
|
-
hasRequiredParamBytesForAlg = 1;
|
|
7
|
-
function getParamSize(keySize) {
|
|
8
|
-
var result = (keySize / 8 | 0) + (keySize % 8 === 0 ? 0 : 1);
|
|
9
|
-
return result;
|
|
10
|
-
}
|
|
11
|
-
var paramBytesForAlg = {
|
|
12
|
-
ES256: getParamSize(256),
|
|
13
|
-
ES384: getParamSize(384),
|
|
14
|
-
ES512: getParamSize(521)
|
|
15
|
-
};
|
|
16
|
-
function getParamBytesForAlg(alg) {
|
|
17
|
-
var paramBytes = paramBytesForAlg[alg];
|
|
18
|
-
if (paramBytes) {
|
|
19
|
-
return paramBytes;
|
|
20
|
-
}
|
|
21
|
-
throw new Error('Unknown algorithm "' + alg + '"');
|
|
22
|
-
}
|
|
23
|
-
paramBytesForAlg_1 = getParamBytesForAlg;
|
|
24
|
-
return paramBytesForAlg_1;
|
|
25
|
-
}
|
|
26
|
-
var ecdsaSigFormatter;
|
|
27
|
-
var hasRequiredEcdsaSigFormatter;
|
|
28
|
-
function requireEcdsaSigFormatter() {
|
|
29
|
-
if (hasRequiredEcdsaSigFormatter) return ecdsaSigFormatter;
|
|
30
|
-
hasRequiredEcdsaSigFormatter = 1;
|
|
31
|
-
var Buffer = requireSafeBuffer().Buffer;
|
|
32
|
-
var getParamBytesForAlg = requireParamBytesForAlg();
|
|
33
|
-
var MAX_OCTET = 128, CLASS_UNIVERSAL = 0, PRIMITIVE_BIT = 32, TAG_SEQ = 16, TAG_INT = 2, ENCODED_TAG_SEQ = TAG_SEQ | PRIMITIVE_BIT | CLASS_UNIVERSAL << 6, ENCODED_TAG_INT = TAG_INT | CLASS_UNIVERSAL << 6;
|
|
34
|
-
function base64Url(base64) {
|
|
35
|
-
return base64.replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
|
|
36
|
-
}
|
|
37
|
-
function signatureAsBuffer(signature) {
|
|
38
|
-
if (Buffer.isBuffer(signature)) {
|
|
39
|
-
return signature;
|
|
40
|
-
} else if ("string" === typeof signature) {
|
|
41
|
-
return Buffer.from(signature, "base64");
|
|
42
|
-
}
|
|
43
|
-
throw new TypeError("ECDSA signature must be a Base64 string or a Buffer");
|
|
44
|
-
}
|
|
45
|
-
function derToJose(signature, alg) {
|
|
46
|
-
signature = signatureAsBuffer(signature);
|
|
47
|
-
var paramBytes = getParamBytesForAlg(alg);
|
|
48
|
-
var maxEncodedParamLength = paramBytes + 1;
|
|
49
|
-
var inputLength = signature.length;
|
|
50
|
-
var offset = 0;
|
|
51
|
-
if (signature[offset++] !== ENCODED_TAG_SEQ) {
|
|
52
|
-
throw new Error('Could not find expected "seq"');
|
|
53
|
-
}
|
|
54
|
-
var seqLength = signature[offset++];
|
|
55
|
-
if (seqLength === (MAX_OCTET | 1)) {
|
|
56
|
-
seqLength = signature[offset++];
|
|
57
|
-
}
|
|
58
|
-
if (inputLength - offset < seqLength) {
|
|
59
|
-
throw new Error('"seq" specified length of "' + seqLength + '", only "' + (inputLength - offset) + '" remaining');
|
|
60
|
-
}
|
|
61
|
-
if (signature[offset++] !== ENCODED_TAG_INT) {
|
|
62
|
-
throw new Error('Could not find expected "int" for "r"');
|
|
63
|
-
}
|
|
64
|
-
var rLength = signature[offset++];
|
|
65
|
-
if (inputLength - offset - 2 < rLength) {
|
|
66
|
-
throw new Error('"r" specified length of "' + rLength + '", only "' + (inputLength - offset - 2) + '" available');
|
|
67
|
-
}
|
|
68
|
-
if (maxEncodedParamLength < rLength) {
|
|
69
|
-
throw new Error('"r" specified length of "' + rLength + '", max of "' + maxEncodedParamLength + '" is acceptable');
|
|
70
|
-
}
|
|
71
|
-
var rOffset = offset;
|
|
72
|
-
offset += rLength;
|
|
73
|
-
if (signature[offset++] !== ENCODED_TAG_INT) {
|
|
74
|
-
throw new Error('Could not find expected "int" for "s"');
|
|
75
|
-
}
|
|
76
|
-
var sLength = signature[offset++];
|
|
77
|
-
if (inputLength - offset !== sLength) {
|
|
78
|
-
throw new Error('"s" specified length of "' + sLength + '", expected "' + (inputLength - offset) + '"');
|
|
79
|
-
}
|
|
80
|
-
if (maxEncodedParamLength < sLength) {
|
|
81
|
-
throw new Error('"s" specified length of "' + sLength + '", max of "' + maxEncodedParamLength + '" is acceptable');
|
|
82
|
-
}
|
|
83
|
-
var sOffset = offset;
|
|
84
|
-
offset += sLength;
|
|
85
|
-
if (offset !== inputLength) {
|
|
86
|
-
throw new Error('Expected to consume entire buffer, but "' + (inputLength - offset) + '" bytes remain');
|
|
87
|
-
}
|
|
88
|
-
var rPadding = paramBytes - rLength, sPadding = paramBytes - sLength;
|
|
89
|
-
var dst = Buffer.allocUnsafe(rPadding + rLength + sPadding + sLength);
|
|
90
|
-
for (offset = 0; offset < rPadding; ++offset) {
|
|
91
|
-
dst[offset] = 0;
|
|
92
|
-
}
|
|
93
|
-
signature.copy(dst, offset, rOffset + Math.max(-rPadding, 0), rOffset + rLength);
|
|
94
|
-
offset = paramBytes;
|
|
95
|
-
for (var o = offset; offset < o + sPadding; ++offset) {
|
|
96
|
-
dst[offset] = 0;
|
|
97
|
-
}
|
|
98
|
-
signature.copy(dst, offset, sOffset + Math.max(-sPadding, 0), sOffset + sLength);
|
|
99
|
-
dst = dst.toString("base64");
|
|
100
|
-
dst = base64Url(dst);
|
|
101
|
-
return dst;
|
|
102
|
-
}
|
|
103
|
-
function countPadding(buf, start, stop) {
|
|
104
|
-
var padding = 0;
|
|
105
|
-
while (start + padding < stop && buf[start + padding] === 0) {
|
|
106
|
-
++padding;
|
|
107
|
-
}
|
|
108
|
-
var needsSign = buf[start + padding] >= MAX_OCTET;
|
|
109
|
-
if (needsSign) {
|
|
110
|
-
--padding;
|
|
111
|
-
}
|
|
112
|
-
return padding;
|
|
113
|
-
}
|
|
114
|
-
function joseToDer(signature, alg) {
|
|
115
|
-
signature = signatureAsBuffer(signature);
|
|
116
|
-
var paramBytes = getParamBytesForAlg(alg);
|
|
117
|
-
var signatureBytes = signature.length;
|
|
118
|
-
if (signatureBytes !== paramBytes * 2) {
|
|
119
|
-
throw new TypeError('"' + alg + '" signatures must be "' + paramBytes * 2 + '" bytes, saw "' + signatureBytes + '"');
|
|
120
|
-
}
|
|
121
|
-
var rPadding = countPadding(signature, 0, paramBytes);
|
|
122
|
-
var sPadding = countPadding(signature, paramBytes, signature.length);
|
|
123
|
-
var rLength = paramBytes - rPadding;
|
|
124
|
-
var sLength = paramBytes - sPadding;
|
|
125
|
-
var rsBytes = 1 + 1 + rLength + 1 + 1 + sLength;
|
|
126
|
-
var shortLength = rsBytes < MAX_OCTET;
|
|
127
|
-
var dst = Buffer.allocUnsafe((shortLength ? 2 : 3) + rsBytes);
|
|
128
|
-
var offset = 0;
|
|
129
|
-
dst[offset++] = ENCODED_TAG_SEQ;
|
|
130
|
-
if (shortLength) {
|
|
131
|
-
dst[offset++] = rsBytes;
|
|
132
|
-
} else {
|
|
133
|
-
dst[offset++] = MAX_OCTET | 1;
|
|
134
|
-
dst[offset++] = rsBytes & 255;
|
|
135
|
-
}
|
|
136
|
-
dst[offset++] = ENCODED_TAG_INT;
|
|
137
|
-
dst[offset++] = rLength;
|
|
138
|
-
if (rPadding < 0) {
|
|
139
|
-
dst[offset++] = 0;
|
|
140
|
-
offset += signature.copy(dst, offset, 0, paramBytes);
|
|
141
|
-
} else {
|
|
142
|
-
offset += signature.copy(dst, offset, rPadding, paramBytes);
|
|
143
|
-
}
|
|
144
|
-
dst[offset++] = ENCODED_TAG_INT;
|
|
145
|
-
dst[offset++] = sLength;
|
|
146
|
-
if (sPadding < 0) {
|
|
147
|
-
dst[offset++] = 0;
|
|
148
|
-
signature.copy(dst, offset, paramBytes);
|
|
149
|
-
} else {
|
|
150
|
-
signature.copy(dst, offset, paramBytes + sPadding);
|
|
151
|
-
}
|
|
152
|
-
return dst;
|
|
153
|
-
}
|
|
154
|
-
ecdsaSigFormatter = {
|
|
155
|
-
derToJose,
|
|
156
|
-
joseToDer
|
|
157
|
-
};
|
|
158
|
-
return ecdsaSigFormatter;
|
|
159
|
-
}
|
|
160
|
-
export {
|
|
161
|
-
requireEcdsaSigFormatter as r
|
|
162
|
-
};
|
|
1
|
+
import{a as D}from"./safe-buffer.mjs";var g,S;function I(){if(S)return g;S=1;function d(l){var m=(l/8|0)+(l%8===0?0:1);return m}var w={ES256:d(256),ES384:d(384),ES512:d(521)};function E(l){var m=w[l];if(m)return m;throw new Error('Unknown algorithm "'+l+'"')}return g=E,g}var B,P;function O(){if(P)return B;P=1;var d=D().Buffer,w=I(),E=128,l=0,m=32,b=16,_=2,x=b|m|l<<6,u=_|l<<6;function L(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function T(e){if(d.isBuffer(e))return e;if(typeof e=="string")return d.from(e,"base64");throw new TypeError("ECDSA signature must be a Base64 string or a Buffer")}function F(e,h){e=T(e);var a=w(h),f=a+1,n=e.length,r=0;if(e[r++]!==x)throw new Error('Could not find expected "seq"');var v=e[r++];if(v===(E|1)&&(v=e[r++]),n-r<v)throw new Error('"seq" specified length of "'+v+'", only "'+(n-r)+'" remaining');if(e[r++]!==u)throw new Error('Could not find expected "int" for "r"');var i=e[r++];if(n-r-2<i)throw new Error('"r" specified length of "'+i+'", only "'+(n-r-2)+'" available');if(f<i)throw new Error('"r" specified length of "'+i+'", max of "'+f+'" is acceptable');var p=r;if(r+=i,e[r++]!==u)throw new Error('Could not find expected "int" for "s"');var s=e[r++];if(n-r!==s)throw new Error('"s" specified length of "'+s+'", expected "'+(n-r)+'"');if(f<s)throw new Error('"s" specified length of "'+s+'", max of "'+f+'" is acceptable');var t=r;if(r+=s,r!==n)throw new Error('Expected to consume entire buffer, but "'+(n-r)+'" bytes remain');var o=a-i,y=a-s,c=d.allocUnsafe(o+i+y+s);for(r=0;r<o;++r)c[r]=0;e.copy(c,r,p+Math.max(-o,0),p+i),r=a;for(var C=r;r<C+y;++r)c[r]=0;return e.copy(c,r,t+Math.max(-y,0),t+s),c=c.toString("base64"),c=L(c),c}function A(e,h,a){for(var f=0;h+f<a&&e[h+f]===0;)++f;var n=e[h+f]>=E;return n&&--f,f}function q(e,h){e=T(e);var a=w(h),f=e.length;if(f!==a*2)throw new TypeError('"'+h+'" signatures must be "'+a*2+'" bytes, saw "'+f+'"');var n=A(e,0,a),r=A(e,a,e.length),v=a-n,i=a-r,p=2+v+1+1+i,s=p<E,t=d.allocUnsafe((s?2:3)+p),o=0;return t[o++]=x,s?t[o++]=p:(t[o++]=E|1,t[o++]=p&255),t[o++]=u,t[o++]=v,n<0?(t[o++]=0,o+=e.copy(t,o,0,a)):o+=e.copy(t,o,n,a),t[o++]=u,t[o++]=i,r<0?(t[o++]=0,e.copy(t,o,a)):e.copy(t,o,a+r),t}return B={derToJose:F,joseToDer:q},B}export{O as r};
|
|
@@ -1,57 +1 @@
|
|
|
1
|
-
import path from "node:
|
|
2
|
-
import os from "node:os";
|
|
3
|
-
import process from "node:process";
|
|
4
|
-
const homedir = os.homedir();
|
|
5
|
-
const tmpdir = os.tmpdir();
|
|
6
|
-
const { env } = process;
|
|
7
|
-
const macos = (name) => {
|
|
8
|
-
const library = path.join(homedir, "Library");
|
|
9
|
-
return {
|
|
10
|
-
data: path.join(library, "Application Support", name),
|
|
11
|
-
config: path.join(library, "Preferences", name),
|
|
12
|
-
cache: path.join(library, "Caches", name),
|
|
13
|
-
log: path.join(library, "Logs", name),
|
|
14
|
-
temp: path.join(tmpdir, name)
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
const windows = (name) => {
|
|
18
|
-
const appData = env.APPDATA || path.join(homedir, "AppData", "Roaming");
|
|
19
|
-
const localAppData = env.LOCALAPPDATA || path.join(homedir, "AppData", "Local");
|
|
20
|
-
return {
|
|
21
|
-
// Data/config/cache/log are invented by me as Windows isn't opinionated about this
|
|
22
|
-
data: path.join(localAppData, name, "Data"),
|
|
23
|
-
config: path.join(appData, name, "Config"),
|
|
24
|
-
cache: path.join(localAppData, name, "Cache"),
|
|
25
|
-
log: path.join(localAppData, name, "Log"),
|
|
26
|
-
temp: path.join(tmpdir, name)
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
const linux = (name) => {
|
|
30
|
-
const username = path.basename(homedir);
|
|
31
|
-
return {
|
|
32
|
-
data: path.join(env.XDG_DATA_HOME || path.join(homedir, ".local", "share"), name),
|
|
33
|
-
config: path.join(env.XDG_CONFIG_HOME || path.join(homedir, ".config"), name),
|
|
34
|
-
cache: path.join(env.XDG_CACHE_HOME || path.join(homedir, ".cache"), name),
|
|
35
|
-
// https://wiki.debian.org/XDGBaseDirectorySpecification#state
|
|
36
|
-
log: path.join(env.XDG_STATE_HOME || path.join(homedir, ".local", "state"), name),
|
|
37
|
-
temp: path.join(tmpdir, username, name)
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
function envPaths(name, { suffix = "nodejs" } = {}) {
|
|
41
|
-
if (typeof name !== "string") {
|
|
42
|
-
throw new TypeError(`Expected a string, got ${typeof name}`);
|
|
43
|
-
}
|
|
44
|
-
if (suffix) {
|
|
45
|
-
name += `-${suffix}`;
|
|
46
|
-
}
|
|
47
|
-
if (process.platform === "darwin") {
|
|
48
|
-
return macos(name);
|
|
49
|
-
}
|
|
50
|
-
if (process.platform === "win32") {
|
|
51
|
-
return windows(name);
|
|
52
|
-
}
|
|
53
|
-
return linux(name);
|
|
54
|
-
}
|
|
55
|
-
export {
|
|
56
|
-
envPaths as e
|
|
57
|
-
};
|
|
1
|
+
import i from"node:path";import s from"node:os";import p from"node:process";const n=s.homedir(),a=s.tmpdir(),{env:r}=p,j=o=>{const t=i.join(n,"Library");return{data:i.join(t,"Application Support",o),config:i.join(t,"Preferences",o),cache:i.join(t,"Caches",o),log:i.join(t,"Logs",o),temp:i.join(a,o)}},e=o=>{const t=r.APPDATA||i.join(n,"AppData","Roaming"),c=r.LOCALAPPDATA||i.join(n,"AppData","Local");return{data:i.join(c,o,"Data"),config:i.join(t,o,"Config"),cache:i.join(c,o,"Cache"),log:i.join(c,o,"Log"),temp:i.join(a,o)}},f=o=>{const t=i.basename(n);return{data:i.join(r.XDG_DATA_HOME||i.join(n,".local","share"),o),config:i.join(r.XDG_CONFIG_HOME||i.join(n,".config"),o),cache:i.join(r.XDG_CACHE_HOME||i.join(n,".cache"),o),log:i.join(r.XDG_STATE_HOME||i.join(n,".local","state"),o),temp:i.join(a,t,o)}};function h(o,{suffix:t="nodejs"}={}){if(typeof o!="string")throw new TypeError(`Expected a string, got ${typeof o}`);return t&&(o+=`-${t}`),p.platform==="darwin"?j(o):p.platform==="win32"?e(o):f(o)}export{h as e};
|
|
@@ -1,94 +1 @@
|
|
|
1
|
-
var
|
|
2
|
-
var hasRequiredExtend;
|
|
3
|
-
function requireExtend() {
|
|
4
|
-
if (hasRequiredExtend) return extend;
|
|
5
|
-
hasRequiredExtend = 1;
|
|
6
|
-
var hasOwn = Object.prototype.hasOwnProperty;
|
|
7
|
-
var toStr = Object.prototype.toString;
|
|
8
|
-
var defineProperty = Object.defineProperty;
|
|
9
|
-
var gOPD = Object.getOwnPropertyDescriptor;
|
|
10
|
-
var isArray = function isArray2(arr) {
|
|
11
|
-
if (typeof Array.isArray === "function") {
|
|
12
|
-
return Array.isArray(arr);
|
|
13
|
-
}
|
|
14
|
-
return toStr.call(arr) === "[object Array]";
|
|
15
|
-
};
|
|
16
|
-
var isPlainObject = function isPlainObject2(obj) {
|
|
17
|
-
if (!obj || toStr.call(obj) !== "[object Object]") {
|
|
18
|
-
return false;
|
|
19
|
-
}
|
|
20
|
-
var hasOwnConstructor = hasOwn.call(obj, "constructor");
|
|
21
|
-
var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, "isPrototypeOf");
|
|
22
|
-
if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {
|
|
23
|
-
return false;
|
|
24
|
-
}
|
|
25
|
-
var key;
|
|
26
|
-
for (key in obj) {
|
|
27
|
-
}
|
|
28
|
-
return typeof key === "undefined" || hasOwn.call(obj, key);
|
|
29
|
-
};
|
|
30
|
-
var setProperty = function setProperty2(target, options) {
|
|
31
|
-
if (defineProperty && options.name === "__proto__") {
|
|
32
|
-
defineProperty(target, options.name, {
|
|
33
|
-
enumerable: true,
|
|
34
|
-
configurable: true,
|
|
35
|
-
value: options.newValue,
|
|
36
|
-
writable: true
|
|
37
|
-
});
|
|
38
|
-
} else {
|
|
39
|
-
target[options.name] = options.newValue;
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
var getProperty = function getProperty2(obj, name) {
|
|
43
|
-
if (name === "__proto__") {
|
|
44
|
-
if (!hasOwn.call(obj, name)) {
|
|
45
|
-
return void 0;
|
|
46
|
-
} else if (gOPD) {
|
|
47
|
-
return gOPD(obj, name).value;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return obj[name];
|
|
51
|
-
};
|
|
52
|
-
extend = function extend2() {
|
|
53
|
-
var options, name, src, copy, copyIsArray, clone;
|
|
54
|
-
var target = arguments[0];
|
|
55
|
-
var i = 1;
|
|
56
|
-
var length = arguments.length;
|
|
57
|
-
var deep = false;
|
|
58
|
-
if (typeof target === "boolean") {
|
|
59
|
-
deep = target;
|
|
60
|
-
target = arguments[1] || {};
|
|
61
|
-
i = 2;
|
|
62
|
-
}
|
|
63
|
-
if (target == null || typeof target !== "object" && typeof target !== "function") {
|
|
64
|
-
target = {};
|
|
65
|
-
}
|
|
66
|
-
for (; i < length; ++i) {
|
|
67
|
-
options = arguments[i];
|
|
68
|
-
if (options != null) {
|
|
69
|
-
for (name in options) {
|
|
70
|
-
src = getProperty(target, name);
|
|
71
|
-
copy = getProperty(options, name);
|
|
72
|
-
if (target !== copy) {
|
|
73
|
-
if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {
|
|
74
|
-
if (copyIsArray) {
|
|
75
|
-
copyIsArray = false;
|
|
76
|
-
clone = src && isArray(src) ? src : [];
|
|
77
|
-
} else {
|
|
78
|
-
clone = src && isPlainObject(src) ? src : {};
|
|
79
|
-
}
|
|
80
|
-
setProperty(target, { name, newValue: extend2(deep, clone, copy) });
|
|
81
|
-
} else if (typeof copy !== "undefined") {
|
|
82
|
-
setProperty(target, { name, newValue: copy });
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
return target;
|
|
89
|
-
};
|
|
90
|
-
return extend;
|
|
91
|
-
}
|
|
92
|
-
export {
|
|
93
|
-
requireExtend as r
|
|
94
|
-
};
|
|
1
|
+
var s,w;function A(){if(w)return s;w=1;var u=Object.prototype.hasOwnProperty,y=Object.prototype.toString,p=Object.defineProperty,v=Object.getOwnPropertyDescriptor,O=function(r){return typeof Array.isArray=="function"?Array.isArray(r):y.call(r)==="[object Array]"},d=function(r){if(!r||y.call(r)!=="[object Object]")return!1;var e=u.call(r,"constructor"),a=r.constructor&&r.constructor.prototype&&u.call(r.constructor.prototype,"isPrototypeOf");if(r.constructor&&!e&&!a)return!1;var t;for(t in r);return typeof t>"u"||u.call(r,t)},P=function(r,e){p&&e.name==="__proto__"?p(r,e.name,{enumerable:!0,configurable:!0,value:e.newValue,writable:!0}):r[e.name]=e.newValue},g=function(r,e){if(e==="__proto__")if(u.call(r,e)){if(v)return v(r,e).value}else return;return r[e]};return s=function o(){var r,e,a,t,i,c,n=arguments[0],f=1,m=arguments.length,l=!1;for(typeof n=="boolean"&&(l=n,n=arguments[1]||{},f=2),(n==null||typeof n!="object"&&typeof n!="function")&&(n={});f<m;++f)if(r=arguments[f],r!=null)for(e in r)a=g(n,e),t=g(r,e),n!==t&&(l&&t&&(d(t)||(i=O(t)))?(i?(i=!1,c=a&&O(a)?a:[]):c=a&&d(a)?a:{},P(n,{name:e,newValue:o(l,c,t)})):typeof t<"u"&&P(n,{name:e,newValue:t}));return n},s}export{A as r};
|
|
@@ -1,38 +1 @@
|
|
|
1
|
-
var
|
|
2
|
-
var hasRequiredFastDeepEqual;
|
|
3
|
-
function requireFastDeepEqual() {
|
|
4
|
-
if (hasRequiredFastDeepEqual) return fastDeepEqual;
|
|
5
|
-
hasRequiredFastDeepEqual = 1;
|
|
6
|
-
fastDeepEqual = function equal(a, b) {
|
|
7
|
-
if (a === b) return true;
|
|
8
|
-
if (a && b && typeof a == "object" && typeof b == "object") {
|
|
9
|
-
if (a.constructor !== b.constructor) return false;
|
|
10
|
-
var length, i, keys;
|
|
11
|
-
if (Array.isArray(a)) {
|
|
12
|
-
length = a.length;
|
|
13
|
-
if (length != b.length) return false;
|
|
14
|
-
for (i = length; i-- !== 0; )
|
|
15
|
-
if (!equal(a[i], b[i])) return false;
|
|
16
|
-
return true;
|
|
17
|
-
}
|
|
18
|
-
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
|
19
|
-
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
|
|
20
|
-
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
|
|
21
|
-
keys = Object.keys(a);
|
|
22
|
-
length = keys.length;
|
|
23
|
-
if (length !== Object.keys(b).length) return false;
|
|
24
|
-
for (i = length; i-- !== 0; )
|
|
25
|
-
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
26
|
-
for (i = length; i-- !== 0; ) {
|
|
27
|
-
var key = keys[i];
|
|
28
|
-
if (!equal(a[key], b[key])) return false;
|
|
29
|
-
}
|
|
30
|
-
return true;
|
|
31
|
-
}
|
|
32
|
-
return a !== a && b !== b;
|
|
33
|
-
};
|
|
34
|
-
return fastDeepEqual;
|
|
35
|
-
}
|
|
36
|
-
export {
|
|
37
|
-
requireFastDeepEqual as r
|
|
38
|
-
};
|
|
1
|
+
var o,c;function l(){return c||(c=1,o=function n(r,e){if(r===e)return!0;if(r&&e&&typeof r=="object"&&typeof e=="object"){if(r.constructor!==e.constructor)return!1;var u,t,f;if(Array.isArray(r)){if(u=r.length,u!=e.length)return!1;for(t=u;t--!==0;)if(!n(r[t],e[t]))return!1;return!0}if(r.constructor===RegExp)return r.source===e.source&&r.flags===e.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===e.valueOf();if(r.toString!==Object.prototype.toString)return r.toString()===e.toString();if(f=Object.keys(r),u=f.length,u!==Object.keys(e).length)return!1;for(t=u;t--!==0;)if(!Object.prototype.hasOwnProperty.call(e,f[t]))return!1;for(t=u;t--!==0;){var s=f[t];if(!n(r[s],e[s]))return!1}return!0}return r!==r&&e!==e}),o}export{l as r};
|