@probelabs/probe 0.6.0-rc341 → 0.6.0-rc342
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/bin/binaries/{probe-v0.6.0-rc341-x86_64-apple-darwin.tar.gz → probe-v0.6.0-rc342-aarch64-apple-darwin.tar.gz} +0 -0
- package/bin/binaries/{probe-v0.6.0-rc341-aarch64-unknown-linux-musl.tar.gz → probe-v0.6.0-rc342-aarch64-unknown-linux-musl.tar.gz} +0 -0
- package/bin/binaries/{probe-v0.6.0-rc341-x86_64-pc-windows-msvc.zip → probe-v0.6.0-rc342-x86_64-apple-darwin.tar.gz} +0 -0
- package/bin/binaries/{probe-v0.6.0-rc341-aarch64-apple-darwin.tar.gz → probe-v0.6.0-rc342-x86_64-pc-windows-msvc.zip} +0 -0
- package/bin/binaries/{probe-v0.6.0-rc341-x86_64-unknown-linux-musl.tar.gz → probe-v0.6.0-rc342-x86_64-unknown-linux-musl.tar.gz} +0 -0
- package/cjs/agent/ProbeAgent.cjs +316 -75
- package/cjs/index.cjs +316 -75
- package/package.json +1 -1
package/cjs/agent/ProbeAgent.cjs
CHANGED
|
@@ -16587,6 +16587,13 @@ function getCurrentModulePath() {
|
|
|
16587
16587
|
Error.prepareStackTrace = originalPrepareStackTrace;
|
|
16588
16588
|
}
|
|
16589
16589
|
}
|
|
16590
|
+
function sanitizeRequestHeaders(input) {
|
|
16591
|
+
const headers = new Headers(input);
|
|
16592
|
+
for (const name22 of BLOCKED_REQUEST_HEADERS) {
|
|
16593
|
+
headers.delete(name22);
|
|
16594
|
+
}
|
|
16595
|
+
return headers;
|
|
16596
|
+
}
|
|
16590
16597
|
async function getValidatedFetch(customFetch) {
|
|
16591
16598
|
return customFetch == null || customFetch === globalThis.fetch ? await getDefaultDownloadFetch() : customFetch;
|
|
16592
16599
|
}
|
|
@@ -16599,10 +16606,14 @@ async function fetchWithValidatedRedirects({
|
|
|
16599
16606
|
trustedOrigin
|
|
16600
16607
|
}) {
|
|
16601
16608
|
var _a22;
|
|
16602
|
-
|
|
16603
|
-
|
|
16604
|
-
|
|
16605
|
-
|
|
16609
|
+
let currentHeaders = headers === void 0 ? void 0 : sanitizeRequestHeaders(headers);
|
|
16610
|
+
const perHopInit = (redirect) => {
|
|
16611
|
+
const init = { signal: abortSignal, redirect };
|
|
16612
|
+
if (currentHeaders !== void 0) {
|
|
16613
|
+
init.headers = new Headers(currentHeaders);
|
|
16614
|
+
}
|
|
16615
|
+
return init;
|
|
16616
|
+
};
|
|
16606
16617
|
let currentUrl = url2;
|
|
16607
16618
|
for (let redirectCount = 0; redirectCount <= maxRedirects; redirectCount++) {
|
|
16608
16619
|
const isTrustedHop = trustedOrigin !== void 0 && isSameOrigin(currentUrl, trustedOrigin);
|
|
@@ -16610,10 +16621,7 @@ async function fetchWithValidatedRedirects({
|
|
|
16610
16621
|
validateDownloadUrl(currentUrl);
|
|
16611
16622
|
}
|
|
16612
16623
|
const fetch2 = isTrustedHop && customFetch != null ? customFetch : isTrustedHop ? globalThis.fetch : await getValidatedFetch(customFetch);
|
|
16613
|
-
const response = await fetch2(currentUrl,
|
|
16614
|
-
...baseInit,
|
|
16615
|
-
redirect: "manual"
|
|
16616
|
-
});
|
|
16624
|
+
const response = await fetch2(currentUrl, perHopInit("manual"));
|
|
16617
16625
|
if (response.type === "opaqueredirect") {
|
|
16618
16626
|
if (!isBrowserRuntime()) {
|
|
16619
16627
|
throw new DownloadError({
|
|
@@ -16621,12 +16629,19 @@ async function fetchWithValidatedRedirects({
|
|
|
16621
16629
|
message: `Redirect from ${currentUrl} could not be validated and was blocked`
|
|
16622
16630
|
});
|
|
16623
16631
|
}
|
|
16624
|
-
return await fetch2(currentUrl,
|
|
16632
|
+
return await fetch2(currentUrl, perHopInit("follow"));
|
|
16625
16633
|
}
|
|
16626
16634
|
const location = (_a22 = response.headers) == null ? void 0 : _a22.get("location");
|
|
16627
|
-
if (
|
|
16628
|
-
|
|
16629
|
-
|
|
16635
|
+
if (REDIRECT_STATUS_CODES.has(response.status) && location) {
|
|
16636
|
+
void cancelResponseBody(response);
|
|
16637
|
+
const nextUrl = new URL(location, currentUrl).toString();
|
|
16638
|
+
if (currentHeaders !== void 0 && !isSameOrigin(nextUrl, currentUrl)) {
|
|
16639
|
+
const userAgent = currentHeaders.get("user-agent");
|
|
16640
|
+
currentHeaders = new Headers(
|
|
16641
|
+
userAgent == null ? void 0 : { "user-agent": userAgent }
|
|
16642
|
+
);
|
|
16643
|
+
}
|
|
16644
|
+
currentUrl = nextUrl;
|
|
16630
16645
|
continue;
|
|
16631
16646
|
}
|
|
16632
16647
|
return response;
|
|
@@ -18061,7 +18076,7 @@ function stripFileExtension(filename) {
|
|
|
18061
18076
|
function withoutTrailingSlash(url2) {
|
|
18062
18077
|
return url2 == null ? void 0 : url2.replace(/\/$/, "");
|
|
18063
18078
|
}
|
|
18064
|
-
var btoa2, atob2, name14, marker15, symbol16, _a15, _b15, DownloadError, safeNodeFetchPromise, MAX_DOWNLOAD_REDIRECTS, DEFAULT_MAX_DOWNLOAD_SIZE, createIdGenerator, generateId, FETCH_FAILED_ERROR_MESSAGES, RETRYABLE_NETWORK_ERROR_CODES, VERSION, DEFAULT_SCHEMA_PREFIX, DEFAULT_SCHEMA_SUFFIX, DEFAULT_GENERIC_SUFFIX, suspectProtoRx, suspectConstructorRx, ignoreOverride, defaultOptions, getDefaultOptions, parseCatchDef, integerDateParser, isJsonSchema7AllOfType, emojiRegex2, zodPatterns, ALPHA_NUMERIC, primitiveMappings, asAnyOf, parseOptionalDef, parsePipelineDef, parseReadonlyDef, selectParser, getRelativePath, get$ref, addMeta, getRefs, zod3ToJsonSchema, schemaSymbol, getOriginalFetch2, postJsonToApi, postFormDataToApi, postToApi, textDecoder, createJsonErrorResponseHandler, createEventSourceResponseHandler, createJsonResponseHandler, StreamingToolCallArgumentState, StreamingToolCallTracker;
|
|
18079
|
+
var btoa2, atob2, name14, marker15, symbol16, _a15, _b15, DownloadError, safeNodeFetchPromise, BLOCKED_REQUEST_HEADERS, MAX_DOWNLOAD_REDIRECTS, REDIRECT_STATUS_CODES, DEFAULT_MAX_DOWNLOAD_SIZE, createIdGenerator, generateId, FETCH_FAILED_ERROR_MESSAGES, RETRYABLE_NETWORK_ERROR_CODES, VERSION, getOriginalFetch, getFromApi, DEFAULT_SCHEMA_PREFIX, DEFAULT_SCHEMA_SUFFIX, DEFAULT_GENERIC_SUFFIX, suspectProtoRx, suspectConstructorRx, ignoreOverride, defaultOptions, getDefaultOptions, parseCatchDef, integerDateParser, isJsonSchema7AllOfType, emojiRegex2, zodPatterns, ALPHA_NUMERIC, primitiveMappings, asAnyOf, parseOptionalDef, parsePipelineDef, parseReadonlyDef, selectParser, getRelativePath, get$ref, addMeta, getRefs, zod3ToJsonSchema, schemaSymbol, getOriginalFetch2, postJsonToApi, postFormDataToApi, postToApi, textDecoder, createJsonErrorResponseHandler, createEventSourceResponseHandler, createJsonResponseHandler, createBinaryResponseHandler, createStatusCodeErrorResponseHandler, StreamingToolCallArgumentState, StreamingToolCallTracker;
|
|
18065
18080
|
var init_dist3 = __esm({
|
|
18066
18081
|
"node_modules/@ai-sdk/provider-utils/dist/index.mjs"() {
|
|
18067
18082
|
init_dist();
|
|
@@ -18071,6 +18086,7 @@ var init_dist3 = __esm({
|
|
|
18071
18086
|
init_dist();
|
|
18072
18087
|
init_dist();
|
|
18073
18088
|
init_dist();
|
|
18089
|
+
init_dist();
|
|
18074
18090
|
init_v4();
|
|
18075
18091
|
init_v3();
|
|
18076
18092
|
init_v3();
|
|
@@ -18102,7 +18118,35 @@ var init_dist3 = __esm({
|
|
|
18102
18118
|
return AISDKError.hasMarker(error40, marker15);
|
|
18103
18119
|
}
|
|
18104
18120
|
};
|
|
18121
|
+
BLOCKED_REQUEST_HEADERS = [
|
|
18122
|
+
// Hop-by-hop / transport (RFC 7230 §6.1)
|
|
18123
|
+
"connection",
|
|
18124
|
+
"keep-alive",
|
|
18125
|
+
"te",
|
|
18126
|
+
"trailer",
|
|
18127
|
+
"transfer-encoding",
|
|
18128
|
+
"upgrade",
|
|
18129
|
+
// Host / virtual-host routing
|
|
18130
|
+
"host",
|
|
18131
|
+
// Proxy / origin spoofing
|
|
18132
|
+
"forwarded",
|
|
18133
|
+
"proxy-authorization",
|
|
18134
|
+
"via",
|
|
18135
|
+
"x-forwarded-for",
|
|
18136
|
+
"x-forwarded-host",
|
|
18137
|
+
"x-forwarded-proto",
|
|
18138
|
+
"x-real-ip",
|
|
18139
|
+
// Cloud metadata (GCP, AWS IMDSv1/v2, Azure, Alibaba, DigitalOcean)
|
|
18140
|
+
"metadata",
|
|
18141
|
+
"metadata-flavor",
|
|
18142
|
+
"x-aws-ec2-metadata-token",
|
|
18143
|
+
"x-metadata-token",
|
|
18144
|
+
// Session / cookie
|
|
18145
|
+
"cookie",
|
|
18146
|
+
"set-cookie"
|
|
18147
|
+
];
|
|
18105
18148
|
MAX_DOWNLOAD_REDIRECTS = 10;
|
|
18149
|
+
REDIRECT_STATUS_CODES = /* @__PURE__ */ new Set([301, 302, 303, 307, 308]);
|
|
18106
18150
|
DEFAULT_MAX_DOWNLOAD_SIZE = 2 * 1024 * 1024 * 1024;
|
|
18107
18151
|
createIdGenerator = ({
|
|
18108
18152
|
prefix,
|
|
@@ -18144,7 +18188,87 @@ var init_dist3 = __esm({
|
|
|
18144
18188
|
"UND_ERR_BODY_TIMEOUT",
|
|
18145
18189
|
"UND_ERR_CONNECT_TIMEOUT"
|
|
18146
18190
|
]);
|
|
18147
|
-
VERSION = true ? "4.0.
|
|
18191
|
+
VERSION = true ? "4.0.61" : "0.0.0-test";
|
|
18192
|
+
getOriginalFetch = () => globalThis.fetch;
|
|
18193
|
+
getFromApi = async ({
|
|
18194
|
+
url: url2,
|
|
18195
|
+
headers = {},
|
|
18196
|
+
successfulResponseHandler,
|
|
18197
|
+
failedResponseHandler,
|
|
18198
|
+
abortSignal,
|
|
18199
|
+
fetch: fetch2,
|
|
18200
|
+
validateUrl,
|
|
18201
|
+
credentialedOrigin,
|
|
18202
|
+
trustedOrigin
|
|
18203
|
+
}) => {
|
|
18204
|
+
try {
|
|
18205
|
+
const requestFetch = fetch2 != null ? fetch2 : getOriginalFetch();
|
|
18206
|
+
const outgoingHeaders = credentialedOrigin !== void 0 && !isSameOrigin(url2, credentialedOrigin) ? {} : headers;
|
|
18207
|
+
const requestHeaders = withUserAgentSuffix(
|
|
18208
|
+
outgoingHeaders,
|
|
18209
|
+
`ai-sdk/provider-utils/${VERSION}`,
|
|
18210
|
+
getRuntimeEnvironmentUserAgent()
|
|
18211
|
+
);
|
|
18212
|
+
const response = validateUrl ? await fetchWithValidatedRedirects({
|
|
18213
|
+
url: url2,
|
|
18214
|
+
headers: requestHeaders,
|
|
18215
|
+
abortSignal,
|
|
18216
|
+
fetch: fetch2,
|
|
18217
|
+
trustedOrigin
|
|
18218
|
+
}) : await requestFetch(url2, {
|
|
18219
|
+
method: "GET",
|
|
18220
|
+
headers: requestHeaders,
|
|
18221
|
+
signal: abortSignal
|
|
18222
|
+
});
|
|
18223
|
+
const responseHeaders = extractResponseHeaders(response);
|
|
18224
|
+
if (!response.ok) {
|
|
18225
|
+
let errorInformation;
|
|
18226
|
+
try {
|
|
18227
|
+
errorInformation = await failedResponseHandler({
|
|
18228
|
+
response,
|
|
18229
|
+
url: url2,
|
|
18230
|
+
requestBodyValues: {}
|
|
18231
|
+
});
|
|
18232
|
+
} catch (error40) {
|
|
18233
|
+
if (isAbortError(error40) || APICallError.isInstance(error40)) {
|
|
18234
|
+
throw error40;
|
|
18235
|
+
}
|
|
18236
|
+
throw new APICallError({
|
|
18237
|
+
message: "Failed to process error response",
|
|
18238
|
+
cause: error40,
|
|
18239
|
+
statusCode: response.status,
|
|
18240
|
+
url: url2,
|
|
18241
|
+
responseHeaders,
|
|
18242
|
+
requestBodyValues: {}
|
|
18243
|
+
});
|
|
18244
|
+
}
|
|
18245
|
+
throw errorInformation.value;
|
|
18246
|
+
}
|
|
18247
|
+
try {
|
|
18248
|
+
return await successfulResponseHandler({
|
|
18249
|
+
response,
|
|
18250
|
+
url: url2,
|
|
18251
|
+
requestBodyValues: {}
|
|
18252
|
+
});
|
|
18253
|
+
} catch (error40) {
|
|
18254
|
+
if (error40 instanceof Error) {
|
|
18255
|
+
if (isAbortError(error40) || APICallError.isInstance(error40)) {
|
|
18256
|
+
throw error40;
|
|
18257
|
+
}
|
|
18258
|
+
}
|
|
18259
|
+
throw new APICallError({
|
|
18260
|
+
message: "Failed to process successful response",
|
|
18261
|
+
cause: error40,
|
|
18262
|
+
statusCode: response.status,
|
|
18263
|
+
url: url2,
|
|
18264
|
+
responseHeaders,
|
|
18265
|
+
requestBodyValues: {}
|
|
18266
|
+
});
|
|
18267
|
+
}
|
|
18268
|
+
} catch (error40) {
|
|
18269
|
+
throw handleFetchError({ error: error40, url: url2, requestBodyValues: {} });
|
|
18270
|
+
}
|
|
18271
|
+
};
|
|
18148
18272
|
DEFAULT_SCHEMA_PREFIX = "JSON schema:";
|
|
18149
18273
|
DEFAULT_SCHEMA_SUFFIX = "You MUST answer with a JSON object that matches the JSON schema above.";
|
|
18150
18274
|
DEFAULT_GENERIC_SUFFIX = "You MUST answer with JSON.";
|
|
@@ -18698,6 +18822,51 @@ var init_dist3 = __esm({
|
|
|
18698
18822
|
rawValue: parsedResult.rawValue
|
|
18699
18823
|
};
|
|
18700
18824
|
};
|
|
18825
|
+
createBinaryResponseHandler = () => async ({ response, url: url2, requestBodyValues }) => {
|
|
18826
|
+
const responseHeaders = extractResponseHeaders(response);
|
|
18827
|
+
if (!response.body) {
|
|
18828
|
+
throw new APICallError({
|
|
18829
|
+
message: "Response body is empty",
|
|
18830
|
+
url: url2,
|
|
18831
|
+
requestBodyValues,
|
|
18832
|
+
statusCode: response.status,
|
|
18833
|
+
responseHeaders,
|
|
18834
|
+
responseBody: void 0
|
|
18835
|
+
});
|
|
18836
|
+
}
|
|
18837
|
+
try {
|
|
18838
|
+
const buffer = await response.arrayBuffer();
|
|
18839
|
+
return {
|
|
18840
|
+
responseHeaders,
|
|
18841
|
+
value: new Uint8Array(buffer)
|
|
18842
|
+
};
|
|
18843
|
+
} catch (error40) {
|
|
18844
|
+
throw new APICallError({
|
|
18845
|
+
message: "Failed to read response as array buffer",
|
|
18846
|
+
url: url2,
|
|
18847
|
+
requestBodyValues,
|
|
18848
|
+
statusCode: response.status,
|
|
18849
|
+
responseHeaders,
|
|
18850
|
+
responseBody: void 0,
|
|
18851
|
+
cause: error40
|
|
18852
|
+
});
|
|
18853
|
+
}
|
|
18854
|
+
};
|
|
18855
|
+
createStatusCodeErrorResponseHandler = () => async ({ response, url: url2, requestBodyValues }) => {
|
|
18856
|
+
const responseHeaders = extractResponseHeaders(response);
|
|
18857
|
+
const responseBody = await readResponseBodyAsText({ response, url: url2 });
|
|
18858
|
+
return {
|
|
18859
|
+
responseHeaders,
|
|
18860
|
+
value: new APICallError({
|
|
18861
|
+
message: response.statusText,
|
|
18862
|
+
url: url2,
|
|
18863
|
+
requestBodyValues,
|
|
18864
|
+
statusCode: response.status,
|
|
18865
|
+
responseHeaders,
|
|
18866
|
+
responseBody
|
|
18867
|
+
})
|
|
18868
|
+
};
|
|
18869
|
+
};
|
|
18701
18870
|
StreamingToolCallArgumentState = class {
|
|
18702
18871
|
constructor(initialValue = "") {
|
|
18703
18872
|
this.structure = { kind: "undetermined" };
|
|
@@ -19601,6 +19770,7 @@ var init_dist4 = __esm({
|
|
|
19601
19770
|
init_dist3();
|
|
19602
19771
|
init_v4();
|
|
19603
19772
|
init_v4();
|
|
19773
|
+
init_dist();
|
|
19604
19774
|
init_dist3();
|
|
19605
19775
|
init_v4();
|
|
19606
19776
|
init_dist3();
|
|
@@ -19819,7 +19989,6 @@ var init_dist4 = __esm({
|
|
|
19819
19989
|
});
|
|
19820
19990
|
}
|
|
19821
19991
|
const content = [];
|
|
19822
|
-
content.push(...convertOpenAICompatibleContent(choice.message.content));
|
|
19823
19992
|
const reasoning = (_a17 = choice.message.reasoning_content) != null ? _a17 : choice.message.reasoning;
|
|
19824
19993
|
if (reasoning != null && reasoning.length > 0) {
|
|
19825
19994
|
content.push({
|
|
@@ -19827,6 +19996,7 @@ var init_dist4 = __esm({
|
|
|
19827
19996
|
text: reasoning
|
|
19828
19997
|
});
|
|
19829
19998
|
}
|
|
19999
|
+
content.push(...convertOpenAICompatibleContent(choice.message.content));
|
|
19830
20000
|
if (choice.message.tool_calls != null) {
|
|
19831
20001
|
for (const toolCall of choice.message.tool_calls) {
|
|
19832
20002
|
const thoughtSignature = (_c = (_b16 = toolCall.extra_content) == null ? void 0 : _b16.google) == null ? void 0 : _c.thought_signature;
|
|
@@ -20660,13 +20830,16 @@ var init_dist4 = __esm({
|
|
|
20660
20830
|
}
|
|
20661
20831
|
const currentDate = (_c = (_b16 = (_a17 = this.config._internal) == null ? void 0 : _a17.currentDate) == null ? void 0 : _b16.call(_a17)) != null ? _c : /* @__PURE__ */ new Date();
|
|
20662
20832
|
const args = this.getArgs(providerOptions);
|
|
20663
|
-
|
|
20833
|
+
const isEditing = files != null && files.length > 0;
|
|
20834
|
+
const url2 = this.config.url({
|
|
20835
|
+
path: isEditing ? "/images/edits" : "/images/generations",
|
|
20836
|
+
modelId: this.modelId
|
|
20837
|
+
});
|
|
20838
|
+
const requestHeaders = combineHeaders(this.config.headers(), headers);
|
|
20839
|
+
if (isEditing) {
|
|
20664
20840
|
const { value: response2, responseHeaders: responseHeaders2 } = await postFormDataToApi({
|
|
20665
|
-
url:
|
|
20666
|
-
|
|
20667
|
-
modelId: this.modelId
|
|
20668
|
-
}),
|
|
20669
|
-
headers: combineHeaders(this.config.headers(), headers),
|
|
20841
|
+
url: url2,
|
|
20842
|
+
headers: requestHeaders,
|
|
20670
20843
|
formData: convertToFormData({
|
|
20671
20844
|
model: this.modelId,
|
|
20672
20845
|
prompt,
|
|
@@ -20686,7 +20859,11 @@ var init_dist4 = __esm({
|
|
|
20686
20859
|
fetch: this.config.fetch
|
|
20687
20860
|
});
|
|
20688
20861
|
return {
|
|
20689
|
-
images: response2.data
|
|
20862
|
+
images: await this.getImages(response2.data, {
|
|
20863
|
+
url: url2,
|
|
20864
|
+
headers: requestHeaders,
|
|
20865
|
+
abortSignal
|
|
20866
|
+
}),
|
|
20690
20867
|
warnings,
|
|
20691
20868
|
response: {
|
|
20692
20869
|
timestamp: currentDate,
|
|
@@ -20696,11 +20873,8 @@ var init_dist4 = __esm({
|
|
|
20696
20873
|
};
|
|
20697
20874
|
}
|
|
20698
20875
|
const { value: response, responseHeaders } = await postJsonToApi({
|
|
20699
|
-
url:
|
|
20700
|
-
|
|
20701
|
-
modelId: this.modelId
|
|
20702
|
-
}),
|
|
20703
|
-
headers: combineHeaders(this.config.headers(), headers),
|
|
20876
|
+
url: url2,
|
|
20877
|
+
headers: requestHeaders,
|
|
20704
20878
|
body: {
|
|
20705
20879
|
model: this.modelId,
|
|
20706
20880
|
prompt,
|
|
@@ -20719,7 +20893,11 @@ var init_dist4 = __esm({
|
|
|
20719
20893
|
fetch: this.config.fetch
|
|
20720
20894
|
});
|
|
20721
20895
|
return {
|
|
20722
|
-
images: response.data
|
|
20896
|
+
images: await this.getImages(response.data, {
|
|
20897
|
+
url: url2,
|
|
20898
|
+
headers: requestHeaders,
|
|
20899
|
+
abortSignal
|
|
20900
|
+
}),
|
|
20723
20901
|
warnings,
|
|
20724
20902
|
response: {
|
|
20725
20903
|
timestamp: currentDate,
|
|
@@ -20728,11 +20906,48 @@ var init_dist4 = __esm({
|
|
|
20728
20906
|
}
|
|
20729
20907
|
};
|
|
20730
20908
|
}
|
|
20909
|
+
async getImages(data2, options) {
|
|
20910
|
+
if (data2.every((image) => image.b64_json != null)) {
|
|
20911
|
+
return data2.map((image) => image.b64_json);
|
|
20912
|
+
}
|
|
20913
|
+
return Promise.all(
|
|
20914
|
+
data2.map(async (image) => {
|
|
20915
|
+
if (image.b64_json != null) {
|
|
20916
|
+
return convertBase64ToUint8Array(image.b64_json);
|
|
20917
|
+
}
|
|
20918
|
+
if (image.url == null) {
|
|
20919
|
+
throw new InvalidResponseDataError({
|
|
20920
|
+
data: image,
|
|
20921
|
+
message: "Expected url in the image response"
|
|
20922
|
+
});
|
|
20923
|
+
}
|
|
20924
|
+
const { value } = await getFromApi({
|
|
20925
|
+
url: image.url,
|
|
20926
|
+
validateUrl: true,
|
|
20927
|
+
trustedOrigin: options.url,
|
|
20928
|
+
credentialedOrigin: options.url,
|
|
20929
|
+
headers: options.headers,
|
|
20930
|
+
abortSignal: options.abortSignal,
|
|
20931
|
+
fetch: this.config.fetch,
|
|
20932
|
+
successfulResponseHandler: createBinaryResponseHandler(),
|
|
20933
|
+
failedResponseHandler: createStatusCodeErrorResponseHandler()
|
|
20934
|
+
});
|
|
20935
|
+
return value;
|
|
20936
|
+
})
|
|
20937
|
+
);
|
|
20938
|
+
}
|
|
20731
20939
|
};
|
|
20732
20940
|
openaiCompatibleImageResponseSchema = external_exports.object({
|
|
20733
|
-
data: external_exports.array(
|
|
20941
|
+
data: external_exports.array(
|
|
20942
|
+
external_exports.object({
|
|
20943
|
+
b64_json: external_exports.string().nullish(),
|
|
20944
|
+
url: external_exports.string().nullish()
|
|
20945
|
+
}).refine((image) => image.b64_json != null || image.url != null, {
|
|
20946
|
+
message: "Expected b64_json or url in the image response"
|
|
20947
|
+
})
|
|
20948
|
+
)
|
|
20734
20949
|
});
|
|
20735
|
-
VERSION2 = true ? "2.0.
|
|
20950
|
+
VERSION2 = true ? "2.0.86" : "0.0.0-test";
|
|
20736
20951
|
}
|
|
20737
20952
|
});
|
|
20738
20953
|
|
|
@@ -25403,16 +25618,10 @@ function isAnthropicModel({
|
|
|
25403
25618
|
return modelFamily === "anthropic" || modelId.includes("anthropic") || modelId.includes(":application-inference-profile/") && reasoningBudgetTokens != null;
|
|
25404
25619
|
}
|
|
25405
25620
|
function supportsStrictTools(modelId) {
|
|
25406
|
-
return !
|
|
25621
|
+
return !modelId.includes("claude-") || LEGACY_CLAUDE_PATTERN.test(modelId) || MODELS_WITH_STRICT_TOOL_SUPPORT.some((pattern) => pattern.test(modelId));
|
|
25407
25622
|
}
|
|
25408
25623
|
function supportsNativeStructuredOutput(modelId) {
|
|
25409
|
-
return
|
|
25410
|
-
modelId,
|
|
25411
|
-
MODELS_WITHOUT_RELIABLE_NATIVE_STRUCTURED_OUTPUT
|
|
25412
|
-
);
|
|
25413
|
-
}
|
|
25414
|
-
function matchesModel(modelId, models) {
|
|
25415
|
-
return models.some((model) => modelId.includes(model));
|
|
25624
|
+
return supportsStrictTools(modelId) && !/claude-(?:sonnet-4-6|haiku-4-5)(?=[-.:]|$)/.test(modelId);
|
|
25416
25625
|
}
|
|
25417
25626
|
function createBedrockEventStreamDecoder(body, processEvent) {
|
|
25418
25627
|
const codec = new import_eventstream_codec.EventStreamCodec(import_util_utf8.toUtf8, import_util_utf8.fromUtf8);
|
|
@@ -26174,7 +26383,9 @@ function createSigV4FetchFunction(getCredentials, fetch2, service = "bedrock") {
|
|
|
26174
26383
|
const signer = new AwsV4Signer({
|
|
26175
26384
|
url: url2,
|
|
26176
26385
|
method: "POST",
|
|
26177
|
-
headers: Object.entries(headersWithUserAgent)
|
|
26386
|
+
headers: Object.entries(headersWithUserAgent).filter(
|
|
26387
|
+
([, value]) => isAscii(value)
|
|
26388
|
+
),
|
|
26178
26389
|
body,
|
|
26179
26390
|
region: credentials.region,
|
|
26180
26391
|
accessKeyId: credentials.accessKeyId,
|
|
@@ -26203,6 +26414,9 @@ function prepareBodyString(body) {
|
|
|
26203
26414
|
return JSON.stringify(body);
|
|
26204
26415
|
}
|
|
26205
26416
|
}
|
|
26417
|
+
function isAscii(value) {
|
|
26418
|
+
return !/[\u0080-\uffff]/.test(value);
|
|
26419
|
+
}
|
|
26206
26420
|
function createApiKeyFetchFunction(apiKey, fetch2) {
|
|
26207
26421
|
return async (input, init) => {
|
|
26208
26422
|
const effectiveFetch = fetch2 != null ? fetch2 : globalThis.fetch;
|
|
@@ -26389,7 +26603,7 @@ Original error: ${errorMessage}`
|
|
|
26389
26603
|
provider.tools = import_internal.anthropicTools;
|
|
26390
26604
|
return provider;
|
|
26391
26605
|
}
|
|
26392
|
-
var import_internal, import_internal2, import_eventstream_codec, import_util_utf8, import_internal3, BEDROCK_STOP_REASONS, BEDROCK_IMAGE_MIME_TYPES, BEDROCK_DOCUMENT_MIME_TYPES, bedrockFilePartProviderOptions, amazonBedrockLanguageModelOptions,
|
|
26606
|
+
var import_internal, import_internal2, import_eventstream_codec, import_util_utf8, import_internal3, BEDROCK_STOP_REASONS, BEDROCK_IMAGE_MIME_TYPES, BEDROCK_DOCUMENT_MIME_TYPES, bedrockFilePartProviderOptions, amazonBedrockLanguageModelOptions, LEGACY_CLAUDE_PATTERN, MODELS_WITH_STRICT_TOOL_SUPPORT, BedrockErrorSchema, bedrockFailedResponseHandler, createBedrockEventStreamResponseHandler, bedrockReasoningMetadataSchema, anthropicProviderOptions, BedrockChatLanguageModel, JsonObjectTextExtractor, BedrockStopReasonSchema, BedrockAdditionalModelResponseFieldsSchema, BedrockToolUseSchema, BedrockReasoningTextSchema, BedrockRedactedReasoningSchema, AmazonBedrockCacheDetailSchema, BedrockResponseSchema, BedrockStreamSchema, amazonBedrockEmbeddingModelOptionsSchema, BedrockEmbeddingModel, BedrockEmbeddingResponseSchema, modelMaxImagesPerCall, BedrockImageModel, bedrockImageResponseSchema, VERSION3, bedrockRerankingResponseSchema, amazonBedrockRerankingModelOptionsSchema, BedrockRerankingModel, AWS_PARTITION_DNS_SUFFIXES, bedrock;
|
|
26393
26607
|
var init_dist5 = __esm({
|
|
26394
26608
|
"node_modules/@ai-sdk/amazon-bedrock/dist/index.mjs"() {
|
|
26395
26609
|
import_internal = require("@ai-sdk/anthropic/internal");
|
|
@@ -26505,17 +26719,13 @@ var init_dist5 = __esm({
|
|
|
26505
26719
|
*/
|
|
26506
26720
|
serviceTier: external_exports.enum(["reserved", "priority", "default", "flex"]).optional()
|
|
26507
26721
|
});
|
|
26508
|
-
|
|
26509
|
-
|
|
26510
|
-
|
|
26511
|
-
|
|
26512
|
-
|
|
26513
|
-
|
|
26514
|
-
|
|
26515
|
-
MODELS_WITHOUT_RELIABLE_NATIVE_STRUCTURED_OUTPUT = [
|
|
26516
|
-
...MODELS_WITHOUT_STRICT_TOOL_SUPPORT,
|
|
26517
|
-
"claude-sonnet-4-6",
|
|
26518
|
-
"claude-haiku-4-5"
|
|
26722
|
+
LEGACY_CLAUDE_PATTERN = /claude-(?:instant|v?2|3)(?=[-.:]|$)/;
|
|
26723
|
+
MODELS_WITH_STRICT_TOOL_SUPPORT = [
|
|
26724
|
+
// Original Claude 4 IDs include a release date instead of a minor version.
|
|
26725
|
+
/claude-(?:opus|sonnet)-4(?:-\d{8})?(?:-v\d+)?(?=[:.]|$)/,
|
|
26726
|
+
/claude-opus-4-(?:1|5|6)(?=[-.:]|$)/,
|
|
26727
|
+
/claude-sonnet-4-(?:5|6)(?=[-.:]|$)/,
|
|
26728
|
+
/claude-haiku-4-5(?=[-.:]|$)/
|
|
26519
26729
|
];
|
|
26520
26730
|
BedrockErrorSchema = external_exports.object({
|
|
26521
26731
|
message: external_exports.string(),
|
|
@@ -26662,7 +26872,8 @@ var init_dist5 = __esm({
|
|
|
26662
26872
|
const isThinkingEnabled = ((_e = bedrockOptions.reasoningConfig) == null ? void 0 : _e.type) === "enabled" || ((_f = bedrockOptions.reasoningConfig) == null ? void 0 : _f.type) === "adaptive";
|
|
26663
26873
|
const {
|
|
26664
26874
|
supportsStructuredOutput: modelSupportsStructuredOutput,
|
|
26665
|
-
rejectsForcedToolUse
|
|
26875
|
+
rejectsForcedToolUse,
|
|
26876
|
+
isKnownModel
|
|
26666
26877
|
} = (0, import_internal2.getModelCapabilities)(this.modelId);
|
|
26667
26878
|
const structuredOutputMode = (_h = (_g = bedrockOptions.structuredOutputMode) != null ? _g : anthropicOptions == null ? void 0 : anthropicOptions.structuredOutputMode) != null ? _h : "auto";
|
|
26668
26879
|
if (structuredOutputMode === "jsonTool") {
|
|
@@ -26683,7 +26894,7 @@ var init_dist5 = __esm({
|
|
|
26683
26894
|
}
|
|
26684
26895
|
const modelSupportsNativeStructuredOutput = supportsNativeStructuredOutput(this.modelId) && (modelSupportsStructuredOutput || isThinkingEnabled || this.config.modelFamily === "anthropic");
|
|
26685
26896
|
const useNativeStructuredOutput = isAnthropicModel2 && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null && (structuredOutputMode === "outputFormat" || structuredOutputMode === "auto" && modelSupportsNativeStructuredOutput);
|
|
26686
|
-
const useJsonInstructionForStructuredOutput = !useNativeStructuredOutput && isAnthropicModel2 && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null && (rejectsForcedToolUse || structuredOutputMode !== "jsonTool" && !supportsStrictTools(this.modelId) && tools != null && tools.length > 0);
|
|
26897
|
+
const useJsonInstructionForStructuredOutput = !useNativeStructuredOutput && isAnthropicModel2 && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null && (rejectsForcedToolUse || this.modelId.includes("claude-") && (!isKnownModel || !modelSupportsStructuredOutput) && !supportsNativeStructuredOutput(this.modelId) && structuredOutputMode !== "jsonTool" || structuredOutputMode !== "jsonTool" && !supportsStrictTools(this.modelId) && tools != null && tools.length > 0);
|
|
26687
26898
|
const jsonResponseTool = (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null && !useNativeStructuredOutput && !useJsonInstructionForStructuredOutput ? {
|
|
26688
26899
|
type: "function",
|
|
26689
26900
|
name: "json",
|
|
@@ -27937,7 +28148,7 @@ var init_dist5 = __esm({
|
|
|
27937
28148
|
details: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
27938
28149
|
preview: external_exports.unknown().optional()
|
|
27939
28150
|
});
|
|
27940
|
-
VERSION3 = true ? "4.0.
|
|
28151
|
+
VERSION3 = true ? "4.0.199" : "0.0.0-test";
|
|
27941
28152
|
bedrockRerankingResponseSchema = lazySchema(
|
|
27942
28153
|
() => zodSchema(
|
|
27943
28154
|
external_exports.object({
|
|
@@ -28272,10 +28483,10 @@ function compareUint8Arrays(a, b) {
|
|
|
28272
28483
|
}
|
|
28273
28484
|
return a.length - b.length;
|
|
28274
28485
|
}
|
|
28275
|
-
var
|
|
28486
|
+
var isAscii2, HIGH_SURROGATE_START, HIGH_SURROGATE_END, textDecoder2;
|
|
28276
28487
|
var init_utfUtil = __esm({
|
|
28277
28488
|
"node_modules/gpt-tokenizer/esm/utfUtil.js"() {
|
|
28278
|
-
|
|
28489
|
+
isAscii2 = (codePoint) => codePoint <= 127;
|
|
28279
28490
|
HIGH_SURROGATE_START = 55296;
|
|
28280
28491
|
HIGH_SURROGATE_END = 56319;
|
|
28281
28492
|
textDecoder2 = new TextDecoder("utf8", { fatal: false });
|
|
@@ -28610,7 +28821,7 @@ var init_BytePairEncodingCore = __esm({
|
|
|
28610
28821
|
this.mergeCache.set(key, value);
|
|
28611
28822
|
}
|
|
28612
28823
|
bytePairEncode(input) {
|
|
28613
|
-
if (input.length === 1 &&
|
|
28824
|
+
if (input.length === 1 && isAscii2(input.codePointAt(0))) {
|
|
28614
28825
|
return [this.getBpeRankFromStringOrThrow(input)];
|
|
28615
28826
|
}
|
|
28616
28827
|
if (this.mergeCache?.has(input)) {
|
|
@@ -38420,6 +38631,17 @@ function pushComment(options, array2) {
|
|
|
38420
38631
|
function functionFlags(async, generator) {
|
|
38421
38632
|
return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0);
|
|
38422
38633
|
}
|
|
38634
|
+
function keywordOpAt(parser, pos) {
|
|
38635
|
+
var end = pos + 1, stop = Math.min(parser.input.length, pos + 11);
|
|
38636
|
+
while (end < stop) {
|
|
38637
|
+
var ch = parser.fullCharCodeAt(end);
|
|
38638
|
+
if (!isIdentifierChar(ch, true)) {
|
|
38639
|
+
break;
|
|
38640
|
+
}
|
|
38641
|
+
end += ch <= 65535 ? 1 : 2;
|
|
38642
|
+
}
|
|
38643
|
+
return end === pos + 2 && parser.input.slice(pos, end) === "in" || end === pos + 10 && parser.input.slice(pos, end) === "instanceof";
|
|
38644
|
+
}
|
|
38423
38645
|
function isPrivateNameConflicted(privateNameMap, element) {
|
|
38424
38646
|
var name15 = element.key.name;
|
|
38425
38647
|
var curr = privateNameMap[name15];
|
|
@@ -38551,10 +38773,10 @@ function parse5(input, options) {
|
|
|
38551
38773
|
var astralIdentifierCodes, astralIdentifierStartCodes, nonASCIIidentifierChars, nonASCIIidentifierStartChars, reservedWords, ecma5AndLessKeywords, keywords$1, keywordRelationalOperator, nonASCIIidentifierStart, nonASCIIidentifier, TokenType, beforeExpr, startsExpr, keywords, types$1, lineBreak, lineBreakG, nonASCIIwhitespace, skipWhiteSpace, ref, hasOwnProperty, toString, hasOwn2, isArray, regexpCache, loneSurrogate, Position, SourceLocation, defaultOptions2, warnedAboutEcmaVersion, SCOPE_TOP, SCOPE_FUNCTION, SCOPE_ASYNC, SCOPE_GENERATOR, SCOPE_ARROW, SCOPE_SIMPLE_CATCH, SCOPE_SUPER, SCOPE_DIRECT_SUPER, SCOPE_CLASS_STATIC_BLOCK, SCOPE_CLASS_FIELD_INIT, SCOPE_SWITCH, SCOPE_VAR, BIND_NONE, BIND_VAR, BIND_LEXICAL, BIND_FUNCTION, BIND_SIMPLE_CATCH, BIND_OUTSIDE, Parser, prototypeAccessors, pp$9, literal2, DestructuringErrors, pp$8, loopLabel, switchLabel, empty$1, FUNC_STATEMENT, FUNC_HANGING_STATEMENT, FUNC_NULLABLE_ID, pp$7, TokContext, types, pp$6, pp$5, empty, pp$4, pp$3, Scope, Node, pp$2, scriptValuesAddedInUnicode, ecma9BinaryProperties, ecma10BinaryProperties, ecma11BinaryProperties, ecma12BinaryProperties, ecma13BinaryProperties, ecma14BinaryProperties, unicodeBinaryProperties, ecma14BinaryPropertiesOfStrings, unicodeBinaryPropertiesOfStrings, unicodeGeneralCategoryValues, ecma9ScriptValues, ecma10ScriptValues, ecma11ScriptValues, ecma12ScriptValues, ecma13ScriptValues, ecma14ScriptValues, unicodeScriptValues, data, ecmaVersion, i, list, pp$1, BranchID, RegExpValidationState, CharSetNone, CharSetOk, CharSetString, Token, pp, INVALID_TEMPLATE_ESCAPE_ERROR, version2;
|
|
38552
38774
|
var init_acorn = __esm({
|
|
38553
38775
|
"node_modules/acorn/dist/acorn.mjs"() {
|
|
38554
|
-
astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1,
|
|
38555
|
-
astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2,
|
|
38556
|
-
nonASCIIidentifierChars = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\
|
|
38557
|
-
nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\
|
|
38776
|
+
astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 31, 4, 33, 15, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 199, 7, 137, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 55, 9, 7, 0, 259, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 481, 1, 61, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 12, 2, 9, 1, 3, 0, 33, 1, 1357, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 233, 0, 3, 0, 8, 1, 6, 0, 475, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
|
|
38777
|
+
astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 13, 65, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 7, 25, 39, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 5, 18, 21, 18, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 18, 0, 182, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 24, 43, 22, 0, 239, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 111, 6, 206, 13, 310, 2314, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 33, 24, 3, 24, 45, 74, 6, 0, 67, 12, 65, 1, 2, 0, 15, 4, 10, 7386, 37, 33, 96, 114, 14, 913, 15, 50, 7710, 3, 2, 6, 2, 1, 2, 296, 10, 0, 30, 2, 3, 0, 15, 4, 8, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 340, 2, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 129, 15, 6, 55, 50, 49, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 208, 30, 2, 2, 2, 1, 2, 6, 3, 4, 10, 1, 225, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4382, 2, 5773, 3, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 8489, 39815, 11327];
|
|
38778
|
+
nonASCIIidentifierChars = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7-\u05C9\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B53-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1AF0\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65";
|
|
38779
|
+
nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0558\u0559\u0560-\u0588\u058B\u058C\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u208F-\u209F\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DD\uA7E2\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB6C\uAB6D\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
|
|
38558
38780
|
reservedWords = {
|
|
38559
38781
|
3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
|
|
38560
38782
|
5: "class enum extends super const export import",
|
|
@@ -39002,7 +39224,7 @@ var init_acorn = __esm({
|
|
|
39002
39224
|
skipWhiteSpace.lastIndex = start + match2[0].length;
|
|
39003
39225
|
var spaceAfter = skipWhiteSpace.exec(this.input), end = spaceAfter.index + spaceAfter[0].length;
|
|
39004
39226
|
var next = this.input.charAt(end);
|
|
39005
|
-
return next === ";" || next === "}" || lineBreak.test(spaceAfter[0]) && !(/[(`.[+\-/*%<>=,?^&]/.test(next) || next === "!" && this.input.charAt(end + 1) === "=");
|
|
39227
|
+
return next === ";" || next === "}" || lineBreak.test(spaceAfter[0]) && !(/[(`.[+\-/*%<>=,?^&]/.test(next) || next === "!" && this.input.charAt(end + 1) === "=" || next === "i" && keywordOpAt(this, end));
|
|
39006
39228
|
}
|
|
39007
39229
|
start += match2[0].length;
|
|
39008
39230
|
skipWhiteSpace.lastIndex = start;
|
|
@@ -40750,10 +40972,13 @@ var init_acorn = __esm({
|
|
|
40750
40972
|
left = this.toAssignable(left, false, refDestructuringErrors);
|
|
40751
40973
|
}
|
|
40752
40974
|
if (!ownDestructuringErrors) {
|
|
40753
|
-
refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma =
|
|
40754
|
-
|
|
40755
|
-
|
|
40756
|
-
|
|
40975
|
+
refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = -1;
|
|
40976
|
+
if (refDestructuringErrors.shorthandAssign >= left.start) {
|
|
40977
|
+
refDestructuringErrors.shorthandAssign = -1;
|
|
40978
|
+
}
|
|
40979
|
+
if (refDestructuringErrors.doubleProto >= left.start) {
|
|
40980
|
+
refDestructuringErrors.doubleProto = -1;
|
|
40981
|
+
}
|
|
40757
40982
|
}
|
|
40758
40983
|
if (this.type === types$1.eq) {
|
|
40759
40984
|
this.checkLValPattern(left);
|
|
@@ -40893,20 +41118,35 @@ var init_acorn = __esm({
|
|
|
40893
41118
|
};
|
|
40894
41119
|
pp$5.parseExprSubscripts = function(refDestructuringErrors, forInit) {
|
|
40895
41120
|
var startPos = this.start, startLoc = this.startLoc;
|
|
41121
|
+
var oldDoubleProto = -1, oldShorthandAssign = -1;
|
|
41122
|
+
if (refDestructuringErrors) {
|
|
41123
|
+
oldDoubleProto = refDestructuringErrors.doubleProto;
|
|
41124
|
+
oldShorthandAssign = refDestructuringErrors.shorthandAssign;
|
|
41125
|
+
refDestructuringErrors.doubleProto = refDestructuringErrors.shorthandAssign = -1;
|
|
41126
|
+
}
|
|
40896
41127
|
var expr = this.parseExprAtom(refDestructuringErrors, forInit);
|
|
40897
41128
|
if (expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")") {
|
|
40898
41129
|
return expr;
|
|
40899
41130
|
}
|
|
40900
41131
|
var result = this.parseSubscripts(expr, startPos, startLoc, false, forInit);
|
|
40901
|
-
if (refDestructuringErrors
|
|
40902
|
-
if (
|
|
40903
|
-
refDestructuringErrors
|
|
41132
|
+
if (refDestructuringErrors) {
|
|
41133
|
+
if (result.end > expr.end) {
|
|
41134
|
+
this.checkExpressionErrors(refDestructuringErrors, true);
|
|
41135
|
+
if (refDestructuringErrors.parenthesizedAssign >= result.start) {
|
|
41136
|
+
refDestructuringErrors.parenthesizedAssign = -1;
|
|
41137
|
+
}
|
|
41138
|
+
if (refDestructuringErrors.parenthesizedBind >= result.start) {
|
|
41139
|
+
refDestructuringErrors.parenthesizedBind = -1;
|
|
41140
|
+
}
|
|
41141
|
+
if (refDestructuringErrors.trailingComma >= result.start) {
|
|
41142
|
+
refDestructuringErrors.trailingComma = -1;
|
|
41143
|
+
}
|
|
40904
41144
|
}
|
|
40905
|
-
if (
|
|
40906
|
-
refDestructuringErrors.
|
|
41145
|
+
if (oldDoubleProto > -1) {
|
|
41146
|
+
refDestructuringErrors.doubleProto = oldDoubleProto;
|
|
40907
41147
|
}
|
|
40908
|
-
if (
|
|
40909
|
-
refDestructuringErrors.
|
|
41148
|
+
if (oldShorthandAssign > -1) {
|
|
41149
|
+
refDestructuringErrors.shorthandAssign = oldShorthandAssign;
|
|
40910
41150
|
}
|
|
40911
41151
|
}
|
|
40912
41152
|
return result;
|
|
@@ -40919,7 +41159,7 @@ var init_acorn = __esm({
|
|
|
40919
41159
|
if (element.optional) {
|
|
40920
41160
|
optionalChained = true;
|
|
40921
41161
|
}
|
|
40922
|
-
if (element === base2 || element.type === "ArrowFunctionExpression") {
|
|
41162
|
+
if (element.end === base2.end || element.type === "ArrowFunctionExpression") {
|
|
40923
41163
|
if (optionalChained) {
|
|
40924
41164
|
var chainNode = this.startNodeAt(startPos, startLoc);
|
|
40925
41165
|
chainNode.expression = element;
|
|
@@ -40928,6 +41168,7 @@ var init_acorn = __esm({
|
|
|
40928
41168
|
return element;
|
|
40929
41169
|
}
|
|
40930
41170
|
base2 = element;
|
|
41171
|
+
maybeAsyncArrow = false;
|
|
40931
41172
|
}
|
|
40932
41173
|
};
|
|
40933
41174
|
pp$5.shouldParseAsyncArrow = function() {
|
|
@@ -43934,7 +44175,7 @@ var init_acorn = __esm({
|
|
|
43934
44175
|
}
|
|
43935
44176
|
return this.finishToken(type, word);
|
|
43936
44177
|
};
|
|
43937
|
-
version2 = "8.
|
|
44178
|
+
version2 = "8.19.0";
|
|
43938
44179
|
Parser.acorn = {
|
|
43939
44180
|
Parser,
|
|
43940
44181
|
version: version2,
|