@probelabs/probe 0.6.0-rc325 → 0.6.0-rc330
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-rc325-x86_64-pc-windows-msvc.zip → probe-v0.6.0-rc330-aarch64-apple-darwin.tar.gz} +0 -0
- package/bin/binaries/{probe-v0.6.0-rc325-aarch64-unknown-linux-musl.tar.gz → probe-v0.6.0-rc330-aarch64-unknown-linux-musl.tar.gz} +0 -0
- package/bin/binaries/{probe-v0.6.0-rc325-aarch64-apple-darwin.tar.gz → probe-v0.6.0-rc330-x86_64-apple-darwin.tar.gz} +0 -0
- package/bin/binaries/{probe-v0.6.0-rc325-x86_64-apple-darwin.tar.gz → probe-v0.6.0-rc330-x86_64-pc-windows-msvc.zip} +0 -0
- package/bin/binaries/{probe-v0.6.0-rc325-x86_64-unknown-linux-musl.tar.gz → probe-v0.6.0-rc330-x86_64-unknown-linux-musl.tar.gz} +0 -0
- package/cjs/agent/ProbeAgent.cjs +1043 -1586
- package/cjs/index.cjs +1043 -1586
- package/package.json +1 -1
package/cjs/agent/ProbeAgent.cjs
CHANGED
|
@@ -16451,6 +16451,70 @@ function convertUint8ArrayToBase64(array2) {
|
|
|
16451
16451
|
function convertToBase64(value) {
|
|
16452
16452
|
return value instanceof Uint8Array ? convertUint8ArrayToBase64(value) : value;
|
|
16453
16453
|
}
|
|
16454
|
+
async function cancelResponseBody(response) {
|
|
16455
|
+
var _a22;
|
|
16456
|
+
try {
|
|
16457
|
+
await ((_a22 = response.body) == null ? void 0 : _a22.cancel());
|
|
16458
|
+
} catch (e) {
|
|
16459
|
+
}
|
|
16460
|
+
}
|
|
16461
|
+
function isNodeDefaultFetch(fetch2) {
|
|
16462
|
+
const source = Function.prototype.toString.call(fetch2);
|
|
16463
|
+
return source.includes("internal/deps/undici") || source.includes("lazy loading of undici");
|
|
16464
|
+
}
|
|
16465
|
+
async function readResponseWithSizeLimit({
|
|
16466
|
+
response,
|
|
16467
|
+
url: url2,
|
|
16468
|
+
maxBytes = DEFAULT_MAX_DOWNLOAD_SIZE
|
|
16469
|
+
}) {
|
|
16470
|
+
const contentLength = response.headers.get("content-length");
|
|
16471
|
+
if (contentLength != null) {
|
|
16472
|
+
const length = parseInt(contentLength, 10);
|
|
16473
|
+
if (!isNaN(length) && length > maxBytes) {
|
|
16474
|
+
await cancelResponseBody(response);
|
|
16475
|
+
throw new DownloadError({
|
|
16476
|
+
url: url2,
|
|
16477
|
+
message: `Download of ${url2} exceeded maximum size of ${maxBytes} bytes (Content-Length: ${length}).`
|
|
16478
|
+
});
|
|
16479
|
+
}
|
|
16480
|
+
}
|
|
16481
|
+
const body = response.body;
|
|
16482
|
+
if (body == null) {
|
|
16483
|
+
return new Uint8Array(0);
|
|
16484
|
+
}
|
|
16485
|
+
const reader = body.getReader();
|
|
16486
|
+
const chunks = [];
|
|
16487
|
+
let totalBytes = 0;
|
|
16488
|
+
try {
|
|
16489
|
+
while (true) {
|
|
16490
|
+
const { done, value } = await reader.read();
|
|
16491
|
+
if (done) {
|
|
16492
|
+
break;
|
|
16493
|
+
}
|
|
16494
|
+
totalBytes += value.length;
|
|
16495
|
+
if (totalBytes > maxBytes) {
|
|
16496
|
+
throw new DownloadError({
|
|
16497
|
+
url: url2,
|
|
16498
|
+
message: `Download of ${url2} exceeded maximum size of ${maxBytes} bytes.`
|
|
16499
|
+
});
|
|
16500
|
+
}
|
|
16501
|
+
chunks.push(value);
|
|
16502
|
+
}
|
|
16503
|
+
} finally {
|
|
16504
|
+
try {
|
|
16505
|
+
await reader.cancel();
|
|
16506
|
+
} finally {
|
|
16507
|
+
reader.releaseLock();
|
|
16508
|
+
}
|
|
16509
|
+
}
|
|
16510
|
+
const result = new Uint8Array(totalBytes);
|
|
16511
|
+
let offset2 = 0;
|
|
16512
|
+
for (const chunk of chunks) {
|
|
16513
|
+
result.set(chunk, offset2);
|
|
16514
|
+
offset2 += chunk.length;
|
|
16515
|
+
}
|
|
16516
|
+
return result;
|
|
16517
|
+
}
|
|
16454
16518
|
function isAbortError(error40) {
|
|
16455
16519
|
return (error40 instanceof Error || error40 instanceof DOMException) && (error40.name === "AbortError" || error40.name === "ResponseAborted" || // Next.js
|
|
16456
16520
|
error40.name === "TimeoutError");
|
|
@@ -16543,6 +16607,40 @@ function withUserAgentSuffix(headers, ...userAgentSuffixParts) {
|
|
|
16543
16607
|
);
|
|
16544
16608
|
return Object.fromEntries(normalizedHeaders.entries());
|
|
16545
16609
|
}
|
|
16610
|
+
function injectJsonInstruction({
|
|
16611
|
+
prompt,
|
|
16612
|
+
schema,
|
|
16613
|
+
schemaPrefix = schema != null ? DEFAULT_SCHEMA_PREFIX : void 0,
|
|
16614
|
+
schemaSuffix = schema != null ? DEFAULT_SCHEMA_SUFFIX : DEFAULT_GENERIC_SUFFIX
|
|
16615
|
+
}) {
|
|
16616
|
+
return [
|
|
16617
|
+
prompt != null && prompt.length > 0 ? prompt : void 0,
|
|
16618
|
+
prompt != null && prompt.length > 0 ? "" : void 0,
|
|
16619
|
+
// add a newline if prompt is not null
|
|
16620
|
+
schemaPrefix,
|
|
16621
|
+
schema != null ? JSON.stringify(schema) : void 0,
|
|
16622
|
+
schemaSuffix
|
|
16623
|
+
].filter((line) => line != null).join("\n");
|
|
16624
|
+
}
|
|
16625
|
+
function injectJsonInstructionIntoMessages({
|
|
16626
|
+
messages,
|
|
16627
|
+
schema,
|
|
16628
|
+
schemaPrefix,
|
|
16629
|
+
schemaSuffix
|
|
16630
|
+
}) {
|
|
16631
|
+
var _a22, _b22;
|
|
16632
|
+
const systemMessage = ((_a22 = messages[0]) == null ? void 0 : _a22.role) === "system" ? { ...messages[0] } : { role: "system", content: "" };
|
|
16633
|
+
systemMessage.content = injectJsonInstruction({
|
|
16634
|
+
prompt: systemMessage.content,
|
|
16635
|
+
schema,
|
|
16636
|
+
schemaPrefix,
|
|
16637
|
+
schemaSuffix
|
|
16638
|
+
});
|
|
16639
|
+
return [
|
|
16640
|
+
systemMessage,
|
|
16641
|
+
...((_b22 = messages[0]) == null ? void 0 : _b22.role) === "system" ? messages.slice(1) : messages
|
|
16642
|
+
];
|
|
16643
|
+
}
|
|
16546
16644
|
function loadOptionalSetting({
|
|
16547
16645
|
settingValue,
|
|
16548
16646
|
environmentVariableName
|
|
@@ -17462,15 +17560,26 @@ function isSchema(value) {
|
|
|
17462
17560
|
return typeof value === "object" && value !== null && schemaSymbol in value && value[schemaSymbol] === true && "jsonSchema" in value && "validate" in value;
|
|
17463
17561
|
}
|
|
17464
17562
|
function asSchema(schema) {
|
|
17465
|
-
return schema == null ? jsonSchema({
|
|
17563
|
+
return schema == null ? jsonSchema({
|
|
17564
|
+
type: "object",
|
|
17565
|
+
properties: {},
|
|
17566
|
+
additionalProperties: false
|
|
17567
|
+
}) : isSchema(schema) ? schema : "~standard" in schema ? schema["~standard"].vendor === "zod" ? zodSchema(schema) : standardSchema(schema) : schema();
|
|
17466
17568
|
}
|
|
17467
17569
|
function standardSchema(standardSchema2) {
|
|
17468
17570
|
return jsonSchema(
|
|
17469
|
-
() =>
|
|
17470
|
-
standardSchema2
|
|
17471
|
-
|
|
17472
|
-
|
|
17473
|
-
|
|
17571
|
+
() => {
|
|
17572
|
+
if (!hasStandardJsonSchema(standardSchema2)) {
|
|
17573
|
+
throw new Error(
|
|
17574
|
+
`Standard schema vendor '${standardSchema2["~standard"].vendor}' does not support JSON Schema conversion.`
|
|
17575
|
+
);
|
|
17576
|
+
}
|
|
17577
|
+
return addAdditionalPropertiesToJsonSchema(
|
|
17578
|
+
standardSchema2["~standard"].jsonSchema.input({
|
|
17579
|
+
target: "draft-07"
|
|
17580
|
+
})
|
|
17581
|
+
);
|
|
17582
|
+
},
|
|
17474
17583
|
{
|
|
17475
17584
|
validate: async (value) => {
|
|
17476
17585
|
const result = await standardSchema2["~standard"].validate(value);
|
|
@@ -17485,6 +17594,9 @@ function standardSchema(standardSchema2) {
|
|
|
17485
17594
|
}
|
|
17486
17595
|
);
|
|
17487
17596
|
}
|
|
17597
|
+
function hasStandardJsonSchema(schema) {
|
|
17598
|
+
return schema["~standard"].jsonSchema != null;
|
|
17599
|
+
}
|
|
17488
17600
|
function zod3Schema(zodSchema2, options) {
|
|
17489
17601
|
var _a22;
|
|
17490
17602
|
const useReferences = (_a22 = options == null ? void 0 : options.useReferences) != null ? _a22 : false;
|
|
@@ -17631,6 +17743,17 @@ async function resolve(value) {
|
|
|
17631
17743
|
}
|
|
17632
17744
|
return Promise.resolve(value);
|
|
17633
17745
|
}
|
|
17746
|
+
async function readResponseBodyAsText({
|
|
17747
|
+
response,
|
|
17748
|
+
url: url2
|
|
17749
|
+
}) {
|
|
17750
|
+
return textDecoder.decode(
|
|
17751
|
+
await readResponseWithSizeLimit({
|
|
17752
|
+
response,
|
|
17753
|
+
url: url2
|
|
17754
|
+
})
|
|
17755
|
+
);
|
|
17756
|
+
}
|
|
17634
17757
|
function stripFileExtension(filename) {
|
|
17635
17758
|
const firstDotIndex = filename.indexOf(".");
|
|
17636
17759
|
return firstDotIndex === -1 ? filename : filename.slice(0, firstDotIndex);
|
|
@@ -17638,7 +17761,7 @@ function stripFileExtension(filename) {
|
|
|
17638
17761
|
function withoutTrailingSlash(url2) {
|
|
17639
17762
|
return url2 == null ? void 0 : url2.replace(/\/$/, "");
|
|
17640
17763
|
}
|
|
17641
|
-
var btoa2, atob2, name14, marker15, symbol16, _a15, _b15, DownloadError, DEFAULT_MAX_DOWNLOAD_SIZE, createIdGenerator, generateId, FETCH_FAILED_ERROR_MESSAGES, BUN_ERROR_CODES, VERSION, 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, postToApi, createJsonErrorResponseHandler, createJsonResponseHandler;
|
|
17764
|
+
var btoa2, atob2, name14, marker15, symbol16, _a15, _b15, DownloadError, initialGlobalFetch, initialGlobalFetchIsNodeDefault, DEFAULT_MAX_DOWNLOAD_SIZE, createIdGenerator, generateId, FETCH_FAILED_ERROR_MESSAGES, BUN_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, postToApi, textDecoder, createJsonErrorResponseHandler, createJsonResponseHandler;
|
|
17642
17765
|
var init_dist2 = __esm({
|
|
17643
17766
|
"node_modules/@ai-sdk/provider-utils/dist/index.mjs"() {
|
|
17644
17767
|
init_dist();
|
|
@@ -17677,6 +17800,8 @@ var init_dist2 = __esm({
|
|
|
17677
17800
|
return AISDKError.hasMarker(error40, marker15);
|
|
17678
17801
|
}
|
|
17679
17802
|
};
|
|
17803
|
+
initialGlobalFetch = globalThis.fetch;
|
|
17804
|
+
initialGlobalFetchIsNodeDefault = isNodeDefaultFetch(initialGlobalFetch);
|
|
17680
17805
|
DEFAULT_MAX_DOWNLOAD_SIZE = 2 * 1024 * 1024 * 1024;
|
|
17681
17806
|
createIdGenerator = ({
|
|
17682
17807
|
prefix,
|
|
@@ -17714,7 +17839,10 @@ var init_dist2 = __esm({
|
|
|
17714
17839
|
"ETIMEDOUT",
|
|
17715
17840
|
"EPIPE"
|
|
17716
17841
|
];
|
|
17717
|
-
VERSION = true ? "4.0.
|
|
17842
|
+
VERSION = true ? "4.0.41" : "0.0.0-test";
|
|
17843
|
+
DEFAULT_SCHEMA_PREFIX = "JSON schema:";
|
|
17844
|
+
DEFAULT_SCHEMA_SUFFIX = "You MUST answer with a JSON object that matches the JSON schema above.";
|
|
17845
|
+
DEFAULT_GENERIC_SUFFIX = "You MUST answer with JSON.";
|
|
17718
17846
|
suspectProtoRx = /"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/;
|
|
17719
17847
|
suspectConstructorRx = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;
|
|
17720
17848
|
ignoreOverride = /* @__PURE__ */ Symbol(
|
|
@@ -18147,12 +18275,13 @@ var init_dist2 = __esm({
|
|
|
18147
18275
|
throw handleFetchError({ error: error40, url: url2, requestBodyValues: body.values });
|
|
18148
18276
|
}
|
|
18149
18277
|
};
|
|
18278
|
+
textDecoder = new TextDecoder();
|
|
18150
18279
|
createJsonErrorResponseHandler = ({
|
|
18151
18280
|
errorSchema,
|
|
18152
18281
|
errorToMessage,
|
|
18153
18282
|
isRetryable
|
|
18154
18283
|
}) => async ({ response, url: url2, requestBodyValues }) => {
|
|
18155
|
-
const responseBody = await response
|
|
18284
|
+
const responseBody = await readResponseBodyAsText({ response, url: url2 });
|
|
18156
18285
|
const responseHeaders = extractResponseHeaders(response);
|
|
18157
18286
|
if (responseBody.trim() === "") {
|
|
18158
18287
|
return {
|
|
@@ -18202,7 +18331,7 @@ var init_dist2 = __esm({
|
|
|
18202
18331
|
}
|
|
18203
18332
|
};
|
|
18204
18333
|
createJsonResponseHandler = (responseSchema) => async ({ response, url: url2, requestBodyValues }) => {
|
|
18205
|
-
const responseBody = await response
|
|
18334
|
+
const responseBody = await readResponseBodyAsText({ response, url: url2 });
|
|
18206
18335
|
const parsedResult = await safeParseJSON({
|
|
18207
18336
|
text: responseBody,
|
|
18208
18337
|
schema: responseSchema
|
|
@@ -18228,1111 +18357,6 @@ var init_dist2 = __esm({
|
|
|
18228
18357
|
}
|
|
18229
18358
|
});
|
|
18230
18359
|
|
|
18231
|
-
// node_modules/tslib/tslib.es6.mjs
|
|
18232
|
-
var tslib_es6_exports = {};
|
|
18233
|
-
__export(tslib_es6_exports, {
|
|
18234
|
-
__addDisposableResource: () => __addDisposableResource,
|
|
18235
|
-
__assign: () => __assign,
|
|
18236
|
-
__asyncDelegator: () => __asyncDelegator,
|
|
18237
|
-
__asyncGenerator: () => __asyncGenerator,
|
|
18238
|
-
__asyncValues: () => __asyncValues,
|
|
18239
|
-
__await: () => __await,
|
|
18240
|
-
__awaiter: () => __awaiter,
|
|
18241
|
-
__classPrivateFieldGet: () => __classPrivateFieldGet,
|
|
18242
|
-
__classPrivateFieldIn: () => __classPrivateFieldIn,
|
|
18243
|
-
__classPrivateFieldSet: () => __classPrivateFieldSet,
|
|
18244
|
-
__createBinding: () => __createBinding,
|
|
18245
|
-
__decorate: () => __decorate,
|
|
18246
|
-
__disposeResources: () => __disposeResources,
|
|
18247
|
-
__esDecorate: () => __esDecorate,
|
|
18248
|
-
__exportStar: () => __exportStar,
|
|
18249
|
-
__extends: () => __extends,
|
|
18250
|
-
__generator: () => __generator,
|
|
18251
|
-
__importDefault: () => __importDefault,
|
|
18252
|
-
__importStar: () => __importStar,
|
|
18253
|
-
__makeTemplateObject: () => __makeTemplateObject,
|
|
18254
|
-
__metadata: () => __metadata,
|
|
18255
|
-
__param: () => __param,
|
|
18256
|
-
__propKey: () => __propKey,
|
|
18257
|
-
__read: () => __read,
|
|
18258
|
-
__rest: () => __rest,
|
|
18259
|
-
__rewriteRelativeImportExtension: () => __rewriteRelativeImportExtension,
|
|
18260
|
-
__runInitializers: () => __runInitializers,
|
|
18261
|
-
__setFunctionName: () => __setFunctionName,
|
|
18262
|
-
__spread: () => __spread,
|
|
18263
|
-
__spreadArray: () => __spreadArray,
|
|
18264
|
-
__spreadArrays: () => __spreadArrays,
|
|
18265
|
-
__values: () => __values,
|
|
18266
|
-
default: () => tslib_es6_default
|
|
18267
|
-
});
|
|
18268
|
-
function __extends(d, b) {
|
|
18269
|
-
if (typeof b !== "function" && b !== null)
|
|
18270
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
18271
|
-
extendStatics(d, b);
|
|
18272
|
-
function __() {
|
|
18273
|
-
this.constructor = d;
|
|
18274
|
-
}
|
|
18275
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
18276
|
-
}
|
|
18277
|
-
function __rest(s, e) {
|
|
18278
|
-
var t = {};
|
|
18279
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
18280
|
-
t[p] = s[p];
|
|
18281
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18282
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18283
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
18284
|
-
t[p[i]] = s[p[i]];
|
|
18285
|
-
}
|
|
18286
|
-
return t;
|
|
18287
|
-
}
|
|
18288
|
-
function __decorate(decorators, target, key, desc) {
|
|
18289
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
18290
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
18291
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
18292
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
18293
|
-
}
|
|
18294
|
-
function __param(paramIndex, decorator) {
|
|
18295
|
-
return function(target, key) {
|
|
18296
|
-
decorator(target, key, paramIndex);
|
|
18297
|
-
};
|
|
18298
|
-
}
|
|
18299
|
-
function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
18300
|
-
function accept(f) {
|
|
18301
|
-
if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
|
|
18302
|
-
return f;
|
|
18303
|
-
}
|
|
18304
|
-
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
18305
|
-
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
18306
|
-
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
18307
|
-
var _, done = false;
|
|
18308
|
-
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
18309
|
-
var context = {};
|
|
18310
|
-
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
18311
|
-
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
18312
|
-
context.addInitializer = function(f) {
|
|
18313
|
-
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
18314
|
-
extraInitializers.push(accept(f || null));
|
|
18315
|
-
};
|
|
18316
|
-
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
18317
|
-
if (kind === "accessor") {
|
|
18318
|
-
if (result === void 0) continue;
|
|
18319
|
-
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
18320
|
-
if (_ = accept(result.get)) descriptor.get = _;
|
|
18321
|
-
if (_ = accept(result.set)) descriptor.set = _;
|
|
18322
|
-
if (_ = accept(result.init)) initializers.unshift(_);
|
|
18323
|
-
} else if (_ = accept(result)) {
|
|
18324
|
-
if (kind === "field") initializers.unshift(_);
|
|
18325
|
-
else descriptor[key] = _;
|
|
18326
|
-
}
|
|
18327
|
-
}
|
|
18328
|
-
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
18329
|
-
done = true;
|
|
18330
|
-
}
|
|
18331
|
-
function __runInitializers(thisArg, initializers, value) {
|
|
18332
|
-
var useValue = arguments.length > 2;
|
|
18333
|
-
for (var i = 0; i < initializers.length; i++) {
|
|
18334
|
-
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
18335
|
-
}
|
|
18336
|
-
return useValue ? value : void 0;
|
|
18337
|
-
}
|
|
18338
|
-
function __propKey(x) {
|
|
18339
|
-
return typeof x === "symbol" ? x : "".concat(x);
|
|
18340
|
-
}
|
|
18341
|
-
function __setFunctionName(f, name15, prefix) {
|
|
18342
|
-
if (typeof name15 === "symbol") name15 = name15.description ? "[".concat(name15.description, "]") : "";
|
|
18343
|
-
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name15) : name15 });
|
|
18344
|
-
}
|
|
18345
|
-
function __metadata(metadataKey, metadataValue) {
|
|
18346
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
|
18347
|
-
}
|
|
18348
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
18349
|
-
function adopt(value) {
|
|
18350
|
-
return value instanceof P ? value : new P(function(resolve9) {
|
|
18351
|
-
resolve9(value);
|
|
18352
|
-
});
|
|
18353
|
-
}
|
|
18354
|
-
return new (P || (P = Promise))(function(resolve9, reject2) {
|
|
18355
|
-
function fulfilled(value) {
|
|
18356
|
-
try {
|
|
18357
|
-
step(generator.next(value));
|
|
18358
|
-
} catch (e) {
|
|
18359
|
-
reject2(e);
|
|
18360
|
-
}
|
|
18361
|
-
}
|
|
18362
|
-
function rejected(value) {
|
|
18363
|
-
try {
|
|
18364
|
-
step(generator["throw"](value));
|
|
18365
|
-
} catch (e) {
|
|
18366
|
-
reject2(e);
|
|
18367
|
-
}
|
|
18368
|
-
}
|
|
18369
|
-
function step(result) {
|
|
18370
|
-
result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
18371
|
-
}
|
|
18372
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18373
|
-
});
|
|
18374
|
-
}
|
|
18375
|
-
function __generator(thisArg, body) {
|
|
18376
|
-
var _ = { label: 0, sent: function() {
|
|
18377
|
-
if (t[0] & 1) throw t[1];
|
|
18378
|
-
return t[1];
|
|
18379
|
-
}, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
18380
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
18381
|
-
return this;
|
|
18382
|
-
}), g;
|
|
18383
|
-
function verb(n) {
|
|
18384
|
-
return function(v) {
|
|
18385
|
-
return step([n, v]);
|
|
18386
|
-
};
|
|
18387
|
-
}
|
|
18388
|
-
function step(op) {
|
|
18389
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
18390
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18391
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18392
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
18393
|
-
switch (op[0]) {
|
|
18394
|
-
case 0:
|
|
18395
|
-
case 1:
|
|
18396
|
-
t = op;
|
|
18397
|
-
break;
|
|
18398
|
-
case 4:
|
|
18399
|
-
_.label++;
|
|
18400
|
-
return { value: op[1], done: false };
|
|
18401
|
-
case 5:
|
|
18402
|
-
_.label++;
|
|
18403
|
-
y = op[1];
|
|
18404
|
-
op = [0];
|
|
18405
|
-
continue;
|
|
18406
|
-
case 7:
|
|
18407
|
-
op = _.ops.pop();
|
|
18408
|
-
_.trys.pop();
|
|
18409
|
-
continue;
|
|
18410
|
-
default:
|
|
18411
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
18412
|
-
_ = 0;
|
|
18413
|
-
continue;
|
|
18414
|
-
}
|
|
18415
|
-
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
18416
|
-
_.label = op[1];
|
|
18417
|
-
break;
|
|
18418
|
-
}
|
|
18419
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
18420
|
-
_.label = t[1];
|
|
18421
|
-
t = op;
|
|
18422
|
-
break;
|
|
18423
|
-
}
|
|
18424
|
-
if (t && _.label < t[2]) {
|
|
18425
|
-
_.label = t[2];
|
|
18426
|
-
_.ops.push(op);
|
|
18427
|
-
break;
|
|
18428
|
-
}
|
|
18429
|
-
if (t[2]) _.ops.pop();
|
|
18430
|
-
_.trys.pop();
|
|
18431
|
-
continue;
|
|
18432
|
-
}
|
|
18433
|
-
op = body.call(thisArg, _);
|
|
18434
|
-
} catch (e) {
|
|
18435
|
-
op = [6, e];
|
|
18436
|
-
y = 0;
|
|
18437
|
-
} finally {
|
|
18438
|
-
f = t = 0;
|
|
18439
|
-
}
|
|
18440
|
-
if (op[0] & 5) throw op[1];
|
|
18441
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
|
18442
|
-
}
|
|
18443
|
-
}
|
|
18444
|
-
function __exportStar(m, o) {
|
|
18445
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
|
|
18446
|
-
}
|
|
18447
|
-
function __values(o) {
|
|
18448
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
18449
|
-
if (m) return m.call(o);
|
|
18450
|
-
if (o && typeof o.length === "number") return {
|
|
18451
|
-
next: function() {
|
|
18452
|
-
if (o && i >= o.length) o = void 0;
|
|
18453
|
-
return { value: o && o[i++], done: !o };
|
|
18454
|
-
}
|
|
18455
|
-
};
|
|
18456
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
18457
|
-
}
|
|
18458
|
-
function __read(o, n) {
|
|
18459
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
18460
|
-
if (!m) return o;
|
|
18461
|
-
var i = m.call(o), r, ar = [], e;
|
|
18462
|
-
try {
|
|
18463
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
18464
|
-
} catch (error40) {
|
|
18465
|
-
e = { error: error40 };
|
|
18466
|
-
} finally {
|
|
18467
|
-
try {
|
|
18468
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
18469
|
-
} finally {
|
|
18470
|
-
if (e) throw e.error;
|
|
18471
|
-
}
|
|
18472
|
-
}
|
|
18473
|
-
return ar;
|
|
18474
|
-
}
|
|
18475
|
-
function __spread() {
|
|
18476
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
18477
|
-
ar = ar.concat(__read(arguments[i]));
|
|
18478
|
-
return ar;
|
|
18479
|
-
}
|
|
18480
|
-
function __spreadArrays() {
|
|
18481
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
18482
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
18483
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
18484
|
-
r[k] = a[j];
|
|
18485
|
-
return r;
|
|
18486
|
-
}
|
|
18487
|
-
function __spreadArray(to, from, pack) {
|
|
18488
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
18489
|
-
if (ar || !(i in from)) {
|
|
18490
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
18491
|
-
ar[i] = from[i];
|
|
18492
|
-
}
|
|
18493
|
-
}
|
|
18494
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
18495
|
-
}
|
|
18496
|
-
function __await(v) {
|
|
18497
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
18498
|
-
}
|
|
18499
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
18500
|
-
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
18501
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
18502
|
-
return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() {
|
|
18503
|
-
return this;
|
|
18504
|
-
}, i;
|
|
18505
|
-
function awaitReturn(f) {
|
|
18506
|
-
return function(v) {
|
|
18507
|
-
return Promise.resolve(v).then(f, reject2);
|
|
18508
|
-
};
|
|
18509
|
-
}
|
|
18510
|
-
function verb(n, f) {
|
|
18511
|
-
if (g[n]) {
|
|
18512
|
-
i[n] = function(v) {
|
|
18513
|
-
return new Promise(function(a, b) {
|
|
18514
|
-
q.push([n, v, a, b]) > 1 || resume(n, v);
|
|
18515
|
-
});
|
|
18516
|
-
};
|
|
18517
|
-
if (f) i[n] = f(i[n]);
|
|
18518
|
-
}
|
|
18519
|
-
}
|
|
18520
|
-
function resume(n, v) {
|
|
18521
|
-
try {
|
|
18522
|
-
step(g[n](v));
|
|
18523
|
-
} catch (e) {
|
|
18524
|
-
settle(q[0][3], e);
|
|
18525
|
-
}
|
|
18526
|
-
}
|
|
18527
|
-
function step(r) {
|
|
18528
|
-
r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject2) : settle(q[0][2], r);
|
|
18529
|
-
}
|
|
18530
|
-
function fulfill(value) {
|
|
18531
|
-
resume("next", value);
|
|
18532
|
-
}
|
|
18533
|
-
function reject2(value) {
|
|
18534
|
-
resume("throw", value);
|
|
18535
|
-
}
|
|
18536
|
-
function settle(f, v) {
|
|
18537
|
-
if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);
|
|
18538
|
-
}
|
|
18539
|
-
}
|
|
18540
|
-
function __asyncDelegator(o) {
|
|
18541
|
-
var i, p;
|
|
18542
|
-
return i = {}, verb("next"), verb("throw", function(e) {
|
|
18543
|
-
throw e;
|
|
18544
|
-
}), verb("return"), i[Symbol.iterator] = function() {
|
|
18545
|
-
return this;
|
|
18546
|
-
}, i;
|
|
18547
|
-
function verb(n, f) {
|
|
18548
|
-
i[n] = o[n] ? function(v) {
|
|
18549
|
-
return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v;
|
|
18550
|
-
} : f;
|
|
18551
|
-
}
|
|
18552
|
-
}
|
|
18553
|
-
function __asyncValues(o) {
|
|
18554
|
-
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
18555
|
-
var m = o[Symbol.asyncIterator], i;
|
|
18556
|
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
|
|
18557
|
-
return this;
|
|
18558
|
-
}, i);
|
|
18559
|
-
function verb(n) {
|
|
18560
|
-
i[n] = o[n] && function(v) {
|
|
18561
|
-
return new Promise(function(resolve9, reject2) {
|
|
18562
|
-
v = o[n](v), settle(resolve9, reject2, v.done, v.value);
|
|
18563
|
-
});
|
|
18564
|
-
};
|
|
18565
|
-
}
|
|
18566
|
-
function settle(resolve9, reject2, d, v) {
|
|
18567
|
-
Promise.resolve(v).then(function(v2) {
|
|
18568
|
-
resolve9({ value: v2, done: d });
|
|
18569
|
-
}, reject2);
|
|
18570
|
-
}
|
|
18571
|
-
}
|
|
18572
|
-
function __makeTemplateObject(cooked, raw) {
|
|
18573
|
-
if (Object.defineProperty) {
|
|
18574
|
-
Object.defineProperty(cooked, "raw", { value: raw });
|
|
18575
|
-
} else {
|
|
18576
|
-
cooked.raw = raw;
|
|
18577
|
-
}
|
|
18578
|
-
return cooked;
|
|
18579
|
-
}
|
|
18580
|
-
function __importStar(mod) {
|
|
18581
|
-
if (mod && mod.__esModule) return mod;
|
|
18582
|
-
var result = {};
|
|
18583
|
-
if (mod != null) {
|
|
18584
|
-
for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
18585
|
-
}
|
|
18586
|
-
__setModuleDefault(result, mod);
|
|
18587
|
-
return result;
|
|
18588
|
-
}
|
|
18589
|
-
function __importDefault(mod) {
|
|
18590
|
-
return mod && mod.__esModule ? mod : { default: mod };
|
|
18591
|
-
}
|
|
18592
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
18593
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
18594
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
18595
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
18596
|
-
}
|
|
18597
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
18598
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
18599
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
18600
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
18601
|
-
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
|
|
18602
|
-
}
|
|
18603
|
-
function __classPrivateFieldIn(state, receiver) {
|
|
18604
|
-
if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object");
|
|
18605
|
-
return typeof state === "function" ? receiver === state : state.has(receiver);
|
|
18606
|
-
}
|
|
18607
|
-
function __addDisposableResource(env, value, async) {
|
|
18608
|
-
if (value !== null && value !== void 0) {
|
|
18609
|
-
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
|
|
18610
|
-
var dispose, inner;
|
|
18611
|
-
if (async) {
|
|
18612
|
-
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
18613
|
-
dispose = value[Symbol.asyncDispose];
|
|
18614
|
-
}
|
|
18615
|
-
if (dispose === void 0) {
|
|
18616
|
-
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
|
|
18617
|
-
dispose = value[Symbol.dispose];
|
|
18618
|
-
if (async) inner = dispose;
|
|
18619
|
-
}
|
|
18620
|
-
if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
|
|
18621
|
-
if (inner) dispose = function() {
|
|
18622
|
-
try {
|
|
18623
|
-
inner.call(this);
|
|
18624
|
-
} catch (e) {
|
|
18625
|
-
return Promise.reject(e);
|
|
18626
|
-
}
|
|
18627
|
-
};
|
|
18628
|
-
env.stack.push({ value, dispose, async });
|
|
18629
|
-
} else if (async) {
|
|
18630
|
-
env.stack.push({ async: true });
|
|
18631
|
-
}
|
|
18632
|
-
return value;
|
|
18633
|
-
}
|
|
18634
|
-
function __disposeResources(env) {
|
|
18635
|
-
function fail(e) {
|
|
18636
|
-
env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
|
|
18637
|
-
env.hasError = true;
|
|
18638
|
-
}
|
|
18639
|
-
var r, s = 0;
|
|
18640
|
-
function next() {
|
|
18641
|
-
while (r = env.stack.pop()) {
|
|
18642
|
-
try {
|
|
18643
|
-
if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
|
|
18644
|
-
if (r.dispose) {
|
|
18645
|
-
var result = r.dispose.call(r.value);
|
|
18646
|
-
if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) {
|
|
18647
|
-
fail(e);
|
|
18648
|
-
return next();
|
|
18649
|
-
});
|
|
18650
|
-
} else s |= 1;
|
|
18651
|
-
} catch (e) {
|
|
18652
|
-
fail(e);
|
|
18653
|
-
}
|
|
18654
|
-
}
|
|
18655
|
-
if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
|
|
18656
|
-
if (env.hasError) throw env.error;
|
|
18657
|
-
}
|
|
18658
|
-
return next();
|
|
18659
|
-
}
|
|
18660
|
-
function __rewriteRelativeImportExtension(path9, preserveJsx) {
|
|
18661
|
-
if (typeof path9 === "string" && /^\.\.?\//.test(path9)) {
|
|
18662
|
-
return path9.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext2, cm) {
|
|
18663
|
-
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext2 || !cm) ? m : d + ext2 + "." + cm.toLowerCase() + "js";
|
|
18664
|
-
});
|
|
18665
|
-
}
|
|
18666
|
-
return path9;
|
|
18667
|
-
}
|
|
18668
|
-
var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default;
|
|
18669
|
-
var init_tslib_es6 = __esm({
|
|
18670
|
-
"node_modules/tslib/tslib.es6.mjs"() {
|
|
18671
|
-
extendStatics = function(d, b) {
|
|
18672
|
-
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
18673
|
-
d2.__proto__ = b2;
|
|
18674
|
-
} || function(d2, b2) {
|
|
18675
|
-
for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
|
|
18676
|
-
};
|
|
18677
|
-
return extendStatics(d, b);
|
|
18678
|
-
};
|
|
18679
|
-
__assign = function() {
|
|
18680
|
-
__assign = Object.assign || function __assign2(t) {
|
|
18681
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
18682
|
-
s = arguments[i];
|
|
18683
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
18684
|
-
}
|
|
18685
|
-
return t;
|
|
18686
|
-
};
|
|
18687
|
-
return __assign.apply(this, arguments);
|
|
18688
|
-
};
|
|
18689
|
-
__createBinding = Object.create ? (function(o, m, k, k2) {
|
|
18690
|
-
if (k2 === void 0) k2 = k;
|
|
18691
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
18692
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
18693
|
-
desc = { enumerable: true, get: function() {
|
|
18694
|
-
return m[k];
|
|
18695
|
-
} };
|
|
18696
|
-
}
|
|
18697
|
-
Object.defineProperty(o, k2, desc);
|
|
18698
|
-
}) : (function(o, m, k, k2) {
|
|
18699
|
-
if (k2 === void 0) k2 = k;
|
|
18700
|
-
o[k2] = m[k];
|
|
18701
|
-
});
|
|
18702
|
-
__setModuleDefault = Object.create ? (function(o, v) {
|
|
18703
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18704
|
-
}) : function(o, v) {
|
|
18705
|
-
o["default"] = v;
|
|
18706
|
-
};
|
|
18707
|
-
ownKeys = function(o) {
|
|
18708
|
-
ownKeys = Object.getOwnPropertyNames || function(o2) {
|
|
18709
|
-
var ar = [];
|
|
18710
|
-
for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k;
|
|
18711
|
-
return ar;
|
|
18712
|
-
};
|
|
18713
|
-
return ownKeys(o);
|
|
18714
|
-
};
|
|
18715
|
-
_SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error40, suppressed, message) {
|
|
18716
|
-
var e = new Error(message);
|
|
18717
|
-
return e.name = "SuppressedError", e.error = error40, e.suppressed = suppressed, e;
|
|
18718
|
-
};
|
|
18719
|
-
tslib_es6_default = {
|
|
18720
|
-
__extends,
|
|
18721
|
-
__assign,
|
|
18722
|
-
__rest,
|
|
18723
|
-
__decorate,
|
|
18724
|
-
__param,
|
|
18725
|
-
__esDecorate,
|
|
18726
|
-
__runInitializers,
|
|
18727
|
-
__propKey,
|
|
18728
|
-
__setFunctionName,
|
|
18729
|
-
__metadata,
|
|
18730
|
-
__awaiter,
|
|
18731
|
-
__generator,
|
|
18732
|
-
__createBinding,
|
|
18733
|
-
__exportStar,
|
|
18734
|
-
__values,
|
|
18735
|
-
__read,
|
|
18736
|
-
__spread,
|
|
18737
|
-
__spreadArrays,
|
|
18738
|
-
__spreadArray,
|
|
18739
|
-
__await,
|
|
18740
|
-
__asyncGenerator,
|
|
18741
|
-
__asyncDelegator,
|
|
18742
|
-
__asyncValues,
|
|
18743
|
-
__makeTemplateObject,
|
|
18744
|
-
__importStar,
|
|
18745
|
-
__importDefault,
|
|
18746
|
-
__classPrivateFieldGet,
|
|
18747
|
-
__classPrivateFieldSet,
|
|
18748
|
-
__classPrivateFieldIn,
|
|
18749
|
-
__addDisposableResource,
|
|
18750
|
-
__disposeResources,
|
|
18751
|
-
__rewriteRelativeImportExtension
|
|
18752
|
-
};
|
|
18753
|
-
}
|
|
18754
|
-
});
|
|
18755
|
-
|
|
18756
|
-
// node_modules/@smithy/is-array-buffer/dist-cjs/index.js
|
|
18757
|
-
var require_dist_cjs = __commonJS({
|
|
18758
|
-
"node_modules/@smithy/is-array-buffer/dist-cjs/index.js"(exports2, module2) {
|
|
18759
|
-
var __defProp2 = Object.defineProperty;
|
|
18760
|
-
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
18761
|
-
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
18762
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
18763
|
-
var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
|
|
18764
|
-
var __export2 = (target, all) => {
|
|
18765
|
-
for (var name15 in all)
|
|
18766
|
-
__defProp2(target, name15, { get: all[name15], enumerable: true });
|
|
18767
|
-
};
|
|
18768
|
-
var __copyProps2 = (to, from, except, desc) => {
|
|
18769
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
18770
|
-
for (let key of __getOwnPropNames2(from))
|
|
18771
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
18772
|
-
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
18773
|
-
}
|
|
18774
|
-
return to;
|
|
18775
|
-
};
|
|
18776
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
18777
|
-
var src_exports = {};
|
|
18778
|
-
__export2(src_exports, {
|
|
18779
|
-
isArrayBuffer: () => isArrayBuffer2
|
|
18780
|
-
});
|
|
18781
|
-
module2.exports = __toCommonJS2(src_exports);
|
|
18782
|
-
var isArrayBuffer2 = /* @__PURE__ */ __name((arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]", "isArrayBuffer");
|
|
18783
|
-
}
|
|
18784
|
-
});
|
|
18785
|
-
|
|
18786
|
-
// node_modules/@smithy/util-buffer-from/dist-cjs/index.js
|
|
18787
|
-
var require_dist_cjs2 = __commonJS({
|
|
18788
|
-
"node_modules/@smithy/util-buffer-from/dist-cjs/index.js"(exports2, module2) {
|
|
18789
|
-
var __defProp2 = Object.defineProperty;
|
|
18790
|
-
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
18791
|
-
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
18792
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
18793
|
-
var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
|
|
18794
|
-
var __export2 = (target, all) => {
|
|
18795
|
-
for (var name15 in all)
|
|
18796
|
-
__defProp2(target, name15, { get: all[name15], enumerable: true });
|
|
18797
|
-
};
|
|
18798
|
-
var __copyProps2 = (to, from, except, desc) => {
|
|
18799
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
18800
|
-
for (let key of __getOwnPropNames2(from))
|
|
18801
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
18802
|
-
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
18803
|
-
}
|
|
18804
|
-
return to;
|
|
18805
|
-
};
|
|
18806
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
18807
|
-
var src_exports = {};
|
|
18808
|
-
__export2(src_exports, {
|
|
18809
|
-
fromArrayBuffer: () => fromArrayBuffer2,
|
|
18810
|
-
fromString: () => fromString2
|
|
18811
|
-
});
|
|
18812
|
-
module2.exports = __toCommonJS2(src_exports);
|
|
18813
|
-
var import_is_array_buffer3 = require_dist_cjs();
|
|
18814
|
-
var import_buffer = require("buffer");
|
|
18815
|
-
var fromArrayBuffer2 = /* @__PURE__ */ __name((input, offset2 = 0, length = input.byteLength - offset2) => {
|
|
18816
|
-
if (!(0, import_is_array_buffer3.isArrayBuffer)(input)) {
|
|
18817
|
-
throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`);
|
|
18818
|
-
}
|
|
18819
|
-
return import_buffer.Buffer.from(input, offset2, length);
|
|
18820
|
-
}, "fromArrayBuffer");
|
|
18821
|
-
var fromString2 = /* @__PURE__ */ __name((input, encoding) => {
|
|
18822
|
-
if (typeof input !== "string") {
|
|
18823
|
-
throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`);
|
|
18824
|
-
}
|
|
18825
|
-
return encoding ? import_buffer.Buffer.from(input, encoding) : import_buffer.Buffer.from(input);
|
|
18826
|
-
}, "fromString");
|
|
18827
|
-
}
|
|
18828
|
-
});
|
|
18829
|
-
|
|
18830
|
-
// node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-cjs/index.js
|
|
18831
|
-
var require_dist_cjs3 = __commonJS({
|
|
18832
|
-
"node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-cjs/index.js"(exports2, module2) {
|
|
18833
|
-
var __defProp2 = Object.defineProperty;
|
|
18834
|
-
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
18835
|
-
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
18836
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
18837
|
-
var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
|
|
18838
|
-
var __export2 = (target, all) => {
|
|
18839
|
-
for (var name15 in all)
|
|
18840
|
-
__defProp2(target, name15, { get: all[name15], enumerable: true });
|
|
18841
|
-
};
|
|
18842
|
-
var __copyProps2 = (to, from, except, desc) => {
|
|
18843
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
18844
|
-
for (let key of __getOwnPropNames2(from))
|
|
18845
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
18846
|
-
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
18847
|
-
}
|
|
18848
|
-
return to;
|
|
18849
|
-
};
|
|
18850
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
18851
|
-
var src_exports = {};
|
|
18852
|
-
__export2(src_exports, {
|
|
18853
|
-
fromUtf8: () => fromUtf84,
|
|
18854
|
-
toUint8Array: () => toUint8Array2,
|
|
18855
|
-
toUtf8: () => toUtf84
|
|
18856
|
-
});
|
|
18857
|
-
module2.exports = __toCommonJS2(src_exports);
|
|
18858
|
-
var import_util_buffer_from = require_dist_cjs2();
|
|
18859
|
-
var fromUtf84 = /* @__PURE__ */ __name((input) => {
|
|
18860
|
-
const buf = (0, import_util_buffer_from.fromString)(input, "utf8");
|
|
18861
|
-
return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT);
|
|
18862
|
-
}, "fromUtf8");
|
|
18863
|
-
var toUint8Array2 = /* @__PURE__ */ __name((data2) => {
|
|
18864
|
-
if (typeof data2 === "string") {
|
|
18865
|
-
return fromUtf84(data2);
|
|
18866
|
-
}
|
|
18867
|
-
if (ArrayBuffer.isView(data2)) {
|
|
18868
|
-
return new Uint8Array(data2.buffer, data2.byteOffset, data2.byteLength / Uint8Array.BYTES_PER_ELEMENT);
|
|
18869
|
-
}
|
|
18870
|
-
return new Uint8Array(data2);
|
|
18871
|
-
}, "toUint8Array");
|
|
18872
|
-
var toUtf84 = /* @__PURE__ */ __name((input) => {
|
|
18873
|
-
if (typeof input === "string") {
|
|
18874
|
-
return input;
|
|
18875
|
-
}
|
|
18876
|
-
if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") {
|
|
18877
|
-
throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");
|
|
18878
|
-
}
|
|
18879
|
-
return (0, import_util_buffer_from.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("utf8");
|
|
18880
|
-
}, "toUtf8");
|
|
18881
|
-
}
|
|
18882
|
-
});
|
|
18883
|
-
|
|
18884
|
-
// node_modules/@aws-crypto/util/build/main/convertToBuffer.js
|
|
18885
|
-
var require_convertToBuffer = __commonJS({
|
|
18886
|
-
"node_modules/@aws-crypto/util/build/main/convertToBuffer.js"(exports2) {
|
|
18887
|
-
"use strict";
|
|
18888
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
18889
|
-
exports2.convertToBuffer = void 0;
|
|
18890
|
-
var util_utf8_1 = require_dist_cjs3();
|
|
18891
|
-
var fromUtf84 = typeof Buffer !== "undefined" && Buffer.from ? function(input) {
|
|
18892
|
-
return Buffer.from(input, "utf8");
|
|
18893
|
-
} : util_utf8_1.fromUtf8;
|
|
18894
|
-
function convertToBuffer(data2) {
|
|
18895
|
-
if (data2 instanceof Uint8Array)
|
|
18896
|
-
return data2;
|
|
18897
|
-
if (typeof data2 === "string") {
|
|
18898
|
-
return fromUtf84(data2);
|
|
18899
|
-
}
|
|
18900
|
-
if (ArrayBuffer.isView(data2)) {
|
|
18901
|
-
return new Uint8Array(data2.buffer, data2.byteOffset, data2.byteLength / Uint8Array.BYTES_PER_ELEMENT);
|
|
18902
|
-
}
|
|
18903
|
-
return new Uint8Array(data2);
|
|
18904
|
-
}
|
|
18905
|
-
exports2.convertToBuffer = convertToBuffer;
|
|
18906
|
-
}
|
|
18907
|
-
});
|
|
18908
|
-
|
|
18909
|
-
// node_modules/@aws-crypto/util/build/main/isEmptyData.js
|
|
18910
|
-
var require_isEmptyData = __commonJS({
|
|
18911
|
-
"node_modules/@aws-crypto/util/build/main/isEmptyData.js"(exports2) {
|
|
18912
|
-
"use strict";
|
|
18913
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
18914
|
-
exports2.isEmptyData = void 0;
|
|
18915
|
-
function isEmptyData(data2) {
|
|
18916
|
-
if (typeof data2 === "string") {
|
|
18917
|
-
return data2.length === 0;
|
|
18918
|
-
}
|
|
18919
|
-
return data2.byteLength === 0;
|
|
18920
|
-
}
|
|
18921
|
-
exports2.isEmptyData = isEmptyData;
|
|
18922
|
-
}
|
|
18923
|
-
});
|
|
18924
|
-
|
|
18925
|
-
// node_modules/@aws-crypto/util/build/main/numToUint8.js
|
|
18926
|
-
var require_numToUint8 = __commonJS({
|
|
18927
|
-
"node_modules/@aws-crypto/util/build/main/numToUint8.js"(exports2) {
|
|
18928
|
-
"use strict";
|
|
18929
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
18930
|
-
exports2.numToUint8 = void 0;
|
|
18931
|
-
function numToUint8(num) {
|
|
18932
|
-
return new Uint8Array([
|
|
18933
|
-
(num & 4278190080) >> 24,
|
|
18934
|
-
(num & 16711680) >> 16,
|
|
18935
|
-
(num & 65280) >> 8,
|
|
18936
|
-
num & 255
|
|
18937
|
-
]);
|
|
18938
|
-
}
|
|
18939
|
-
exports2.numToUint8 = numToUint8;
|
|
18940
|
-
}
|
|
18941
|
-
});
|
|
18942
|
-
|
|
18943
|
-
// node_modules/@aws-crypto/util/build/main/uint32ArrayFrom.js
|
|
18944
|
-
var require_uint32ArrayFrom = __commonJS({
|
|
18945
|
-
"node_modules/@aws-crypto/util/build/main/uint32ArrayFrom.js"(exports2) {
|
|
18946
|
-
"use strict";
|
|
18947
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
18948
|
-
exports2.uint32ArrayFrom = void 0;
|
|
18949
|
-
function uint32ArrayFrom(a_lookUpTable) {
|
|
18950
|
-
if (!Uint32Array.from) {
|
|
18951
|
-
var return_array = new Uint32Array(a_lookUpTable.length);
|
|
18952
|
-
var a_index = 0;
|
|
18953
|
-
while (a_index < a_lookUpTable.length) {
|
|
18954
|
-
return_array[a_index] = a_lookUpTable[a_index];
|
|
18955
|
-
a_index += 1;
|
|
18956
|
-
}
|
|
18957
|
-
return return_array;
|
|
18958
|
-
}
|
|
18959
|
-
return Uint32Array.from(a_lookUpTable);
|
|
18960
|
-
}
|
|
18961
|
-
exports2.uint32ArrayFrom = uint32ArrayFrom;
|
|
18962
|
-
}
|
|
18963
|
-
});
|
|
18964
|
-
|
|
18965
|
-
// node_modules/@aws-crypto/util/build/main/index.js
|
|
18966
|
-
var require_main2 = __commonJS({
|
|
18967
|
-
"node_modules/@aws-crypto/util/build/main/index.js"(exports2) {
|
|
18968
|
-
"use strict";
|
|
18969
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
18970
|
-
exports2.uint32ArrayFrom = exports2.numToUint8 = exports2.isEmptyData = exports2.convertToBuffer = void 0;
|
|
18971
|
-
var convertToBuffer_1 = require_convertToBuffer();
|
|
18972
|
-
Object.defineProperty(exports2, "convertToBuffer", { enumerable: true, get: function() {
|
|
18973
|
-
return convertToBuffer_1.convertToBuffer;
|
|
18974
|
-
} });
|
|
18975
|
-
var isEmptyData_1 = require_isEmptyData();
|
|
18976
|
-
Object.defineProperty(exports2, "isEmptyData", { enumerable: true, get: function() {
|
|
18977
|
-
return isEmptyData_1.isEmptyData;
|
|
18978
|
-
} });
|
|
18979
|
-
var numToUint8_1 = require_numToUint8();
|
|
18980
|
-
Object.defineProperty(exports2, "numToUint8", { enumerable: true, get: function() {
|
|
18981
|
-
return numToUint8_1.numToUint8;
|
|
18982
|
-
} });
|
|
18983
|
-
var uint32ArrayFrom_1 = require_uint32ArrayFrom();
|
|
18984
|
-
Object.defineProperty(exports2, "uint32ArrayFrom", { enumerable: true, get: function() {
|
|
18985
|
-
return uint32ArrayFrom_1.uint32ArrayFrom;
|
|
18986
|
-
} });
|
|
18987
|
-
}
|
|
18988
|
-
});
|
|
18989
|
-
|
|
18990
|
-
// node_modules/@aws-crypto/crc32/build/main/aws_crc32.js
|
|
18991
|
-
var require_aws_crc32 = __commonJS({
|
|
18992
|
-
"node_modules/@aws-crypto/crc32/build/main/aws_crc32.js"(exports2) {
|
|
18993
|
-
"use strict";
|
|
18994
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
18995
|
-
exports2.AwsCrc32 = void 0;
|
|
18996
|
-
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
|
|
18997
|
-
var util_1 = require_main2();
|
|
18998
|
-
var index_1 = require_main3();
|
|
18999
|
-
var AwsCrc32 = (
|
|
19000
|
-
/** @class */
|
|
19001
|
-
(function() {
|
|
19002
|
-
function AwsCrc322() {
|
|
19003
|
-
this.crc32 = new index_1.Crc32();
|
|
19004
|
-
}
|
|
19005
|
-
AwsCrc322.prototype.update = function(toHash) {
|
|
19006
|
-
if ((0, util_1.isEmptyData)(toHash))
|
|
19007
|
-
return;
|
|
19008
|
-
this.crc32.update((0, util_1.convertToBuffer)(toHash));
|
|
19009
|
-
};
|
|
19010
|
-
AwsCrc322.prototype.digest = function() {
|
|
19011
|
-
return tslib_1.__awaiter(this, void 0, void 0, function() {
|
|
19012
|
-
return tslib_1.__generator(this, function(_a17) {
|
|
19013
|
-
return [2, (0, util_1.numToUint8)(this.crc32.digest())];
|
|
19014
|
-
});
|
|
19015
|
-
});
|
|
19016
|
-
};
|
|
19017
|
-
AwsCrc322.prototype.reset = function() {
|
|
19018
|
-
this.crc32 = new index_1.Crc32();
|
|
19019
|
-
};
|
|
19020
|
-
return AwsCrc322;
|
|
19021
|
-
})()
|
|
19022
|
-
);
|
|
19023
|
-
exports2.AwsCrc32 = AwsCrc32;
|
|
19024
|
-
}
|
|
19025
|
-
});
|
|
19026
|
-
|
|
19027
|
-
// node_modules/@aws-crypto/crc32/build/main/index.js
|
|
19028
|
-
var require_main3 = __commonJS({
|
|
19029
|
-
"node_modules/@aws-crypto/crc32/build/main/index.js"(exports2) {
|
|
19030
|
-
"use strict";
|
|
19031
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
19032
|
-
exports2.AwsCrc32 = exports2.Crc32 = exports2.crc32 = void 0;
|
|
19033
|
-
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
|
|
19034
|
-
var util_1 = require_main2();
|
|
19035
|
-
function crc32(data2) {
|
|
19036
|
-
return new Crc323().update(data2).digest();
|
|
19037
|
-
}
|
|
19038
|
-
exports2.crc32 = crc32;
|
|
19039
|
-
var Crc323 = (
|
|
19040
|
-
/** @class */
|
|
19041
|
-
(function() {
|
|
19042
|
-
function Crc324() {
|
|
19043
|
-
this.checksum = 4294967295;
|
|
19044
|
-
}
|
|
19045
|
-
Crc324.prototype.update = function(data2) {
|
|
19046
|
-
var e_1, _a17;
|
|
19047
|
-
try {
|
|
19048
|
-
for (var data_1 = tslib_1.__values(data2), data_1_1 = data_1.next(); !data_1_1.done; data_1_1 = data_1.next()) {
|
|
19049
|
-
var byte = data_1_1.value;
|
|
19050
|
-
this.checksum = this.checksum >>> 8 ^ lookupTable[(this.checksum ^ byte) & 255];
|
|
19051
|
-
}
|
|
19052
|
-
} catch (e_1_1) {
|
|
19053
|
-
e_1 = { error: e_1_1 };
|
|
19054
|
-
} finally {
|
|
19055
|
-
try {
|
|
19056
|
-
if (data_1_1 && !data_1_1.done && (_a17 = data_1.return)) _a17.call(data_1);
|
|
19057
|
-
} finally {
|
|
19058
|
-
if (e_1) throw e_1.error;
|
|
19059
|
-
}
|
|
19060
|
-
}
|
|
19061
|
-
return this;
|
|
19062
|
-
};
|
|
19063
|
-
Crc324.prototype.digest = function() {
|
|
19064
|
-
return (this.checksum ^ 4294967295) >>> 0;
|
|
19065
|
-
};
|
|
19066
|
-
return Crc324;
|
|
19067
|
-
})()
|
|
19068
|
-
);
|
|
19069
|
-
exports2.Crc32 = Crc323;
|
|
19070
|
-
var a_lookUpTable = [
|
|
19071
|
-
0,
|
|
19072
|
-
1996959894,
|
|
19073
|
-
3993919788,
|
|
19074
|
-
2567524794,
|
|
19075
|
-
124634137,
|
|
19076
|
-
1886057615,
|
|
19077
|
-
3915621685,
|
|
19078
|
-
2657392035,
|
|
19079
|
-
249268274,
|
|
19080
|
-
2044508324,
|
|
19081
|
-
3772115230,
|
|
19082
|
-
2547177864,
|
|
19083
|
-
162941995,
|
|
19084
|
-
2125561021,
|
|
19085
|
-
3887607047,
|
|
19086
|
-
2428444049,
|
|
19087
|
-
498536548,
|
|
19088
|
-
1789927666,
|
|
19089
|
-
4089016648,
|
|
19090
|
-
2227061214,
|
|
19091
|
-
450548861,
|
|
19092
|
-
1843258603,
|
|
19093
|
-
4107580753,
|
|
19094
|
-
2211677639,
|
|
19095
|
-
325883990,
|
|
19096
|
-
1684777152,
|
|
19097
|
-
4251122042,
|
|
19098
|
-
2321926636,
|
|
19099
|
-
335633487,
|
|
19100
|
-
1661365465,
|
|
19101
|
-
4195302755,
|
|
19102
|
-
2366115317,
|
|
19103
|
-
997073096,
|
|
19104
|
-
1281953886,
|
|
19105
|
-
3579855332,
|
|
19106
|
-
2724688242,
|
|
19107
|
-
1006888145,
|
|
19108
|
-
1258607687,
|
|
19109
|
-
3524101629,
|
|
19110
|
-
2768942443,
|
|
19111
|
-
901097722,
|
|
19112
|
-
1119000684,
|
|
19113
|
-
3686517206,
|
|
19114
|
-
2898065728,
|
|
19115
|
-
853044451,
|
|
19116
|
-
1172266101,
|
|
19117
|
-
3705015759,
|
|
19118
|
-
2882616665,
|
|
19119
|
-
651767980,
|
|
19120
|
-
1373503546,
|
|
19121
|
-
3369554304,
|
|
19122
|
-
3218104598,
|
|
19123
|
-
565507253,
|
|
19124
|
-
1454621731,
|
|
19125
|
-
3485111705,
|
|
19126
|
-
3099436303,
|
|
19127
|
-
671266974,
|
|
19128
|
-
1594198024,
|
|
19129
|
-
3322730930,
|
|
19130
|
-
2970347812,
|
|
19131
|
-
795835527,
|
|
19132
|
-
1483230225,
|
|
19133
|
-
3244367275,
|
|
19134
|
-
3060149565,
|
|
19135
|
-
1994146192,
|
|
19136
|
-
31158534,
|
|
19137
|
-
2563907772,
|
|
19138
|
-
4023717930,
|
|
19139
|
-
1907459465,
|
|
19140
|
-
112637215,
|
|
19141
|
-
2680153253,
|
|
19142
|
-
3904427059,
|
|
19143
|
-
2013776290,
|
|
19144
|
-
251722036,
|
|
19145
|
-
2517215374,
|
|
19146
|
-
3775830040,
|
|
19147
|
-
2137656763,
|
|
19148
|
-
141376813,
|
|
19149
|
-
2439277719,
|
|
19150
|
-
3865271297,
|
|
19151
|
-
1802195444,
|
|
19152
|
-
476864866,
|
|
19153
|
-
2238001368,
|
|
19154
|
-
4066508878,
|
|
19155
|
-
1812370925,
|
|
19156
|
-
453092731,
|
|
19157
|
-
2181625025,
|
|
19158
|
-
4111451223,
|
|
19159
|
-
1706088902,
|
|
19160
|
-
314042704,
|
|
19161
|
-
2344532202,
|
|
19162
|
-
4240017532,
|
|
19163
|
-
1658658271,
|
|
19164
|
-
366619977,
|
|
19165
|
-
2362670323,
|
|
19166
|
-
4224994405,
|
|
19167
|
-
1303535960,
|
|
19168
|
-
984961486,
|
|
19169
|
-
2747007092,
|
|
19170
|
-
3569037538,
|
|
19171
|
-
1256170817,
|
|
19172
|
-
1037604311,
|
|
19173
|
-
2765210733,
|
|
19174
|
-
3554079995,
|
|
19175
|
-
1131014506,
|
|
19176
|
-
879679996,
|
|
19177
|
-
2909243462,
|
|
19178
|
-
3663771856,
|
|
19179
|
-
1141124467,
|
|
19180
|
-
855842277,
|
|
19181
|
-
2852801631,
|
|
19182
|
-
3708648649,
|
|
19183
|
-
1342533948,
|
|
19184
|
-
654459306,
|
|
19185
|
-
3188396048,
|
|
19186
|
-
3373015174,
|
|
19187
|
-
1466479909,
|
|
19188
|
-
544179635,
|
|
19189
|
-
3110523913,
|
|
19190
|
-
3462522015,
|
|
19191
|
-
1591671054,
|
|
19192
|
-
702138776,
|
|
19193
|
-
2966460450,
|
|
19194
|
-
3352799412,
|
|
19195
|
-
1504918807,
|
|
19196
|
-
783551873,
|
|
19197
|
-
3082640443,
|
|
19198
|
-
3233442989,
|
|
19199
|
-
3988292384,
|
|
19200
|
-
2596254646,
|
|
19201
|
-
62317068,
|
|
19202
|
-
1957810842,
|
|
19203
|
-
3939845945,
|
|
19204
|
-
2647816111,
|
|
19205
|
-
81470997,
|
|
19206
|
-
1943803523,
|
|
19207
|
-
3814918930,
|
|
19208
|
-
2489596804,
|
|
19209
|
-
225274430,
|
|
19210
|
-
2053790376,
|
|
19211
|
-
3826175755,
|
|
19212
|
-
2466906013,
|
|
19213
|
-
167816743,
|
|
19214
|
-
2097651377,
|
|
19215
|
-
4027552580,
|
|
19216
|
-
2265490386,
|
|
19217
|
-
503444072,
|
|
19218
|
-
1762050814,
|
|
19219
|
-
4150417245,
|
|
19220
|
-
2154129355,
|
|
19221
|
-
426522225,
|
|
19222
|
-
1852507879,
|
|
19223
|
-
4275313526,
|
|
19224
|
-
2312317920,
|
|
19225
|
-
282753626,
|
|
19226
|
-
1742555852,
|
|
19227
|
-
4189708143,
|
|
19228
|
-
2394877945,
|
|
19229
|
-
397917763,
|
|
19230
|
-
1622183637,
|
|
19231
|
-
3604390888,
|
|
19232
|
-
2714866558,
|
|
19233
|
-
953729732,
|
|
19234
|
-
1340076626,
|
|
19235
|
-
3518719985,
|
|
19236
|
-
2797360999,
|
|
19237
|
-
1068828381,
|
|
19238
|
-
1219638859,
|
|
19239
|
-
3624741850,
|
|
19240
|
-
2936675148,
|
|
19241
|
-
906185462,
|
|
19242
|
-
1090812512,
|
|
19243
|
-
3747672003,
|
|
19244
|
-
2825379669,
|
|
19245
|
-
829329135,
|
|
19246
|
-
1181335161,
|
|
19247
|
-
3412177804,
|
|
19248
|
-
3160834842,
|
|
19249
|
-
628085408,
|
|
19250
|
-
1382605366,
|
|
19251
|
-
3423369109,
|
|
19252
|
-
3138078467,
|
|
19253
|
-
570562233,
|
|
19254
|
-
1426400815,
|
|
19255
|
-
3317316542,
|
|
19256
|
-
2998733608,
|
|
19257
|
-
733239954,
|
|
19258
|
-
1555261956,
|
|
19259
|
-
3268935591,
|
|
19260
|
-
3050360625,
|
|
19261
|
-
752459403,
|
|
19262
|
-
1541320221,
|
|
19263
|
-
2607071920,
|
|
19264
|
-
3965973030,
|
|
19265
|
-
1969922972,
|
|
19266
|
-
40735498,
|
|
19267
|
-
2617837225,
|
|
19268
|
-
3943577151,
|
|
19269
|
-
1913087877,
|
|
19270
|
-
83908371,
|
|
19271
|
-
2512341634,
|
|
19272
|
-
3803740692,
|
|
19273
|
-
2075208622,
|
|
19274
|
-
213261112,
|
|
19275
|
-
2463272603,
|
|
19276
|
-
3855990285,
|
|
19277
|
-
2094854071,
|
|
19278
|
-
198958881,
|
|
19279
|
-
2262029012,
|
|
19280
|
-
4057260610,
|
|
19281
|
-
1759359992,
|
|
19282
|
-
534414190,
|
|
19283
|
-
2176718541,
|
|
19284
|
-
4139329115,
|
|
19285
|
-
1873836001,
|
|
19286
|
-
414664567,
|
|
19287
|
-
2282248934,
|
|
19288
|
-
4279200368,
|
|
19289
|
-
1711684554,
|
|
19290
|
-
285281116,
|
|
19291
|
-
2405801727,
|
|
19292
|
-
4167216745,
|
|
19293
|
-
1634467795,
|
|
19294
|
-
376229701,
|
|
19295
|
-
2685067896,
|
|
19296
|
-
3608007406,
|
|
19297
|
-
1308918612,
|
|
19298
|
-
956543938,
|
|
19299
|
-
2808555105,
|
|
19300
|
-
3495958263,
|
|
19301
|
-
1231636301,
|
|
19302
|
-
1047427035,
|
|
19303
|
-
2932959818,
|
|
19304
|
-
3654703836,
|
|
19305
|
-
1088359270,
|
|
19306
|
-
936918e3,
|
|
19307
|
-
2847714899,
|
|
19308
|
-
3736837829,
|
|
19309
|
-
1202900863,
|
|
19310
|
-
817233897,
|
|
19311
|
-
3183342108,
|
|
19312
|
-
3401237130,
|
|
19313
|
-
1404277552,
|
|
19314
|
-
615818150,
|
|
19315
|
-
3134207493,
|
|
19316
|
-
3453421203,
|
|
19317
|
-
1423857449,
|
|
19318
|
-
601450431,
|
|
19319
|
-
3009837614,
|
|
19320
|
-
3294710456,
|
|
19321
|
-
1567103746,
|
|
19322
|
-
711928724,
|
|
19323
|
-
3020668471,
|
|
19324
|
-
3272380065,
|
|
19325
|
-
1510334235,
|
|
19326
|
-
755167117
|
|
19327
|
-
];
|
|
19328
|
-
var lookupTable = (0, util_1.uint32ArrayFrom)(a_lookUpTable);
|
|
19329
|
-
var aws_crc32_1 = require_aws_crc32();
|
|
19330
|
-
Object.defineProperty(exports2, "AwsCrc32", { enumerable: true, get: function() {
|
|
19331
|
-
return aws_crc32_1.AwsCrc32;
|
|
19332
|
-
} });
|
|
19333
|
-
}
|
|
19334
|
-
});
|
|
19335
|
-
|
|
19336
18360
|
// node_modules/@smithy/core/dist-es/submodules/serde/is-array-buffer/is-array-buffer.js
|
|
19337
18361
|
var isArrayBuffer;
|
|
19338
18362
|
var init_is_array_buffer = __esm({
|
|
@@ -19414,12 +18438,12 @@ var init_toBase64 = __esm({
|
|
|
19414
18438
|
});
|
|
19415
18439
|
|
|
19416
18440
|
// node_modules/@smithy/core/dist-es/submodules/serde/util-stream/blob/Uint8ArrayBlobAdapter.js
|
|
19417
|
-
function bindUint8ArrayBlobAdapter(toUtf84, fromUtf84, toBase643,
|
|
18441
|
+
function bindUint8ArrayBlobAdapter(toUtf84, fromUtf84, toBase643, fromBase642) {
|
|
19418
18442
|
return class Uint8ArrayBlobAdapter2 extends Uint8Array {
|
|
19419
18443
|
static fromString(source, encoding = "utf-8") {
|
|
19420
18444
|
if (typeof source === "string") {
|
|
19421
18445
|
if (encoding === "base64") {
|
|
19422
|
-
return Uint8ArrayBlobAdapter2.mutate(
|
|
18446
|
+
return Uint8ArrayBlobAdapter2.mutate(fromBase642(source));
|
|
19423
18447
|
}
|
|
19424
18448
|
return Uint8ArrayBlobAdapter2.mutate(fromUtf84(source));
|
|
19425
18449
|
}
|
|
@@ -19483,7 +18507,7 @@ var init_v42 = __esm({
|
|
|
19483
18507
|
var copyDocumentWithTransform;
|
|
19484
18508
|
var init_copyDocumentWithTransform = __esm({
|
|
19485
18509
|
"node_modules/@smithy/core/dist-es/submodules/serde/copyDocumentWithTransform.js"() {
|
|
19486
|
-
copyDocumentWithTransform = (source,
|
|
18510
|
+
copyDocumentWithTransform = (source, _schemaRef, _transform2 = (_) => _) => source;
|
|
19487
18511
|
}
|
|
19488
18512
|
});
|
|
19489
18513
|
|
|
@@ -19762,7 +18786,7 @@ var init_date_utils = __esm({
|
|
|
19762
18786
|
const day = parseDateValue(dayStr, "day", 1, 31);
|
|
19763
18787
|
return buildDate(year2, month, day, { hours, minutes, seconds, fractionalMilliseconds });
|
|
19764
18788
|
};
|
|
19765
|
-
RFC3339_WITH_OFFSET = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}
|
|
18789
|
+
RFC3339_WITH_OFFSET = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}:\d{2})|[zZ])$/);
|
|
19766
18790
|
parseRfc3339DateTimeWithOffset = (value) => {
|
|
19767
18791
|
if (value === null || value === void 0) {
|
|
19768
18792
|
return void 0;
|
|
@@ -20144,7 +19168,7 @@ function nv(input) {
|
|
|
20144
19168
|
var format, NumericValue;
|
|
20145
19169
|
var init_NumericValue = __esm({
|
|
20146
19170
|
"node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js"() {
|
|
20147
|
-
format =
|
|
19171
|
+
format = /^-?((0|[1-9]\d*)(\.\d+)?|\.\d+)([eE][+-]?\d+)?$/;
|
|
20148
19172
|
NumericValue = class _NumericValue {
|
|
20149
19173
|
string;
|
|
20150
19174
|
type;
|
|
@@ -20152,7 +19176,7 @@ var init_NumericValue = __esm({
|
|
|
20152
19176
|
this.string = string4;
|
|
20153
19177
|
this.type = type;
|
|
20154
19178
|
if (!format.test(string4)) {
|
|
20155
|
-
throw new Error(`@smithy/core/serde - NumericValue must
|
|
19179
|
+
throw new Error(`@smithy/core/serde - NumericValue string must conform to the Smithy bigDecimal format. Received: "${string4}"`);
|
|
20156
19180
|
}
|
|
20157
19181
|
}
|
|
20158
19182
|
toString() {
|
|
@@ -20243,6 +19267,9 @@ var init_toUint8Array = __esm({
|
|
|
20243
19267
|
"node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/toUint8Array.js"() {
|
|
20244
19268
|
init_fromUtf8();
|
|
20245
19269
|
toUint8Array = (data2) => {
|
|
19270
|
+
if (data2 instanceof Uint8Array) {
|
|
19271
|
+
return data2;
|
|
19272
|
+
}
|
|
20246
19273
|
if (typeof data2 === "string") {
|
|
20247
19274
|
return fromUtf8(data2);
|
|
20248
19275
|
}
|
|
@@ -20254,44 +19281,64 @@ var init_toUint8Array = __esm({
|
|
|
20254
19281
|
}
|
|
20255
19282
|
});
|
|
20256
19283
|
|
|
19284
|
+
// node_modules/@smithy/core/dist-es/submodules/serde/concatBytes.js
|
|
19285
|
+
function concatBytes(arrays, length) {
|
|
19286
|
+
if (length === void 0) {
|
|
19287
|
+
length = 0;
|
|
19288
|
+
for (const bytes of arrays) {
|
|
19289
|
+
length += bytes.byteLength;
|
|
19290
|
+
}
|
|
19291
|
+
}
|
|
19292
|
+
const result = new Uint8Array(length);
|
|
19293
|
+
let offset2 = 0;
|
|
19294
|
+
for (const buf of arrays) {
|
|
19295
|
+
result.set(buf, offset2);
|
|
19296
|
+
offset2 += buf.byteLength;
|
|
19297
|
+
}
|
|
19298
|
+
return result;
|
|
19299
|
+
}
|
|
19300
|
+
var init_concatBytes = __esm({
|
|
19301
|
+
"node_modules/@smithy/core/dist-es/submodules/serde/concatBytes.js"() {
|
|
19302
|
+
}
|
|
19303
|
+
});
|
|
19304
|
+
|
|
20257
19305
|
// node_modules/@smithy/types/dist-cjs/index.js
|
|
20258
|
-
var
|
|
19306
|
+
var require_dist_cjs = __commonJS({
|
|
20259
19307
|
"node_modules/@smithy/types/dist-cjs/index.js"(exports2) {
|
|
20260
|
-
|
|
20261
|
-
|
|
20262
|
-
|
|
20263
|
-
|
|
20264
|
-
|
|
20265
|
-
|
|
20266
|
-
|
|
20267
|
-
|
|
20268
|
-
|
|
20269
|
-
|
|
20270
|
-
|
|
20271
|
-
|
|
20272
|
-
|
|
20273
|
-
|
|
20274
|
-
|
|
20275
|
-
|
|
20276
|
-
|
|
20277
|
-
|
|
20278
|
-
|
|
20279
|
-
|
|
20280
|
-
|
|
20281
|
-
|
|
20282
|
-
|
|
20283
|
-
})(exports2.AlgorithmId || (exports2.AlgorithmId = {}));
|
|
19308
|
+
var HttpAuthLocation;
|
|
19309
|
+
(function(HttpAuthLocation2) {
|
|
19310
|
+
HttpAuthLocation2["HEADER"] = "header";
|
|
19311
|
+
HttpAuthLocation2["QUERY"] = "query";
|
|
19312
|
+
})(HttpAuthLocation || (HttpAuthLocation = {}));
|
|
19313
|
+
var HttpApiKeyAuthLocation;
|
|
19314
|
+
(function(HttpApiKeyAuthLocation2) {
|
|
19315
|
+
HttpApiKeyAuthLocation2["HEADER"] = "header";
|
|
19316
|
+
HttpApiKeyAuthLocation2["QUERY"] = "query";
|
|
19317
|
+
})(HttpApiKeyAuthLocation || (HttpApiKeyAuthLocation = {}));
|
|
19318
|
+
var EndpointURLScheme;
|
|
19319
|
+
(function(EndpointURLScheme2) {
|
|
19320
|
+
EndpointURLScheme2["HTTP"] = "http";
|
|
19321
|
+
EndpointURLScheme2["HTTPS"] = "https";
|
|
19322
|
+
})(EndpointURLScheme || (EndpointURLScheme = {}));
|
|
19323
|
+
var AlgorithmId;
|
|
19324
|
+
(function(AlgorithmId2) {
|
|
19325
|
+
AlgorithmId2["MD5"] = "md5";
|
|
19326
|
+
AlgorithmId2["CRC32"] = "crc32";
|
|
19327
|
+
AlgorithmId2["CRC32C"] = "crc32c";
|
|
19328
|
+
AlgorithmId2["SHA1"] = "sha1";
|
|
19329
|
+
AlgorithmId2["SHA256"] = "sha256";
|
|
19330
|
+
})(AlgorithmId || (AlgorithmId = {}));
|
|
20284
19331
|
var getChecksumConfiguration = (runtimeConfig) => {
|
|
20285
19332
|
const checksumAlgorithms = [];
|
|
20286
19333
|
if (runtimeConfig.sha256 !== void 0) {
|
|
20287
19334
|
checksumAlgorithms.push({
|
|
20288
|
-
algorithmId: () =>
|
|
19335
|
+
algorithmId: () => AlgorithmId.SHA256,
|
|
20289
19336
|
checksumConstructor: () => runtimeConfig.sha256
|
|
20290
19337
|
});
|
|
20291
19338
|
}
|
|
20292
19339
|
if (runtimeConfig.md5 != void 0) {
|
|
20293
19340
|
checksumAlgorithms.push({
|
|
20294
|
-
algorithmId: () =>
|
|
19341
|
+
algorithmId: () => AlgorithmId.MD5,
|
|
20295
19342
|
checksumConstructor: () => runtimeConfig.md5
|
|
20296
19343
|
});
|
|
20297
19344
|
}
|
|
@@ -20317,24 +19364,31 @@ var require_dist_cjs4 = __commonJS({
|
|
|
20317
19364
|
var resolveDefaultRuntimeConfig = (config2) => {
|
|
20318
19365
|
return resolveChecksumRuntimeConfig(config2);
|
|
20319
19366
|
};
|
|
20320
|
-
|
|
20321
|
-
(function(
|
|
20322
|
-
|
|
20323
|
-
|
|
20324
|
-
})(
|
|
19367
|
+
var FieldPosition;
|
|
19368
|
+
(function(FieldPosition2) {
|
|
19369
|
+
FieldPosition2[FieldPosition2["HEADER"] = 0] = "HEADER";
|
|
19370
|
+
FieldPosition2[FieldPosition2["TRAILER"] = 1] = "TRAILER";
|
|
19371
|
+
})(FieldPosition || (FieldPosition = {}));
|
|
20325
19372
|
var SMITHY_CONTEXT_KEY2 = "__smithy_context";
|
|
20326
|
-
|
|
20327
|
-
(function(
|
|
20328
|
-
|
|
20329
|
-
|
|
20330
|
-
|
|
20331
|
-
})(
|
|
20332
|
-
|
|
20333
|
-
(function(
|
|
20334
|
-
|
|
20335
|
-
|
|
20336
|
-
|
|
20337
|
-
})(
|
|
19373
|
+
var IniSectionType3;
|
|
19374
|
+
(function(IniSectionType4) {
|
|
19375
|
+
IniSectionType4["PROFILE"] = "profile";
|
|
19376
|
+
IniSectionType4["SSO_SESSION"] = "sso-session";
|
|
19377
|
+
IniSectionType4["SERVICES"] = "services";
|
|
19378
|
+
})(IniSectionType3 || (IniSectionType3 = {}));
|
|
19379
|
+
var RequestHandlerProtocol;
|
|
19380
|
+
(function(RequestHandlerProtocol2) {
|
|
19381
|
+
RequestHandlerProtocol2["HTTP_0_9"] = "http/0.9";
|
|
19382
|
+
RequestHandlerProtocol2["HTTP_1_0"] = "http/1.0";
|
|
19383
|
+
RequestHandlerProtocol2["TDS_8_0"] = "tds/8.0";
|
|
19384
|
+
})(RequestHandlerProtocol || (RequestHandlerProtocol = {}));
|
|
19385
|
+
exports2.AlgorithmId = AlgorithmId;
|
|
19386
|
+
exports2.EndpointURLScheme = EndpointURLScheme;
|
|
19387
|
+
exports2.FieldPosition = FieldPosition;
|
|
19388
|
+
exports2.HttpApiKeyAuthLocation = HttpApiKeyAuthLocation;
|
|
19389
|
+
exports2.HttpAuthLocation = HttpAuthLocation;
|
|
19390
|
+
exports2.IniSectionType = IniSectionType3;
|
|
19391
|
+
exports2.RequestHandlerProtocol = RequestHandlerProtocol;
|
|
20338
19392
|
exports2.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY2;
|
|
20339
19393
|
exports2.getDefaultClientConfiguration = getDefaultClientConfiguration;
|
|
20340
19394
|
exports2.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig;
|
|
@@ -20345,7 +19399,7 @@ var require_dist_cjs4 = __commonJS({
|
|
|
20345
19399
|
var import_types, getSmithyContext;
|
|
20346
19400
|
var init_getSmithyContext = __esm({
|
|
20347
19401
|
"node_modules/@smithy/core/dist-es/submodules/transport/getSmithyContext.js"() {
|
|
20348
|
-
import_types = __toESM(
|
|
19402
|
+
import_types = __toESM(require_dist_cjs());
|
|
20349
19403
|
getSmithyContext = (context) => context[import_types.SMITHY_CONTEXT_KEY] || (context[import_types.SMITHY_CONTEXT_KEY] = {});
|
|
20350
19404
|
}
|
|
20351
19405
|
});
|
|
@@ -20498,7 +19552,7 @@ var init_deserializerMiddleware = __esm({
|
|
|
20498
19552
|
const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`;
|
|
20499
19553
|
try {
|
|
20500
19554
|
error40.message += "\n " + hint;
|
|
20501
|
-
} catch (
|
|
19555
|
+
} catch (ignored) {
|
|
20502
19556
|
if (!context.logger || context.logger?.constructor?.name === "NoOpLogger") {
|
|
20503
19557
|
console.warn(hint);
|
|
20504
19558
|
} else {
|
|
@@ -20521,7 +19575,7 @@ var init_deserializerMiddleware = __esm({
|
|
|
20521
19575
|
cfId: findHeader(/^x-[\w-]+-cf-id$/, headerEntries)
|
|
20522
19576
|
};
|
|
20523
19577
|
}
|
|
20524
|
-
} catch (
|
|
19578
|
+
} catch (ignored) {
|
|
20525
19579
|
}
|
|
20526
19580
|
}
|
|
20527
19581
|
throw error40;
|
|
@@ -20665,6 +19719,33 @@ var init_memoize = __esm({
|
|
|
20665
19719
|
}
|
|
20666
19720
|
});
|
|
20667
19721
|
|
|
19722
|
+
// node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/booleanSelector.js
|
|
19723
|
+
var booleanSelector;
|
|
19724
|
+
var init_booleanSelector = __esm({
|
|
19725
|
+
"node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/booleanSelector.js"() {
|
|
19726
|
+
booleanSelector = (obj, key, type) => {
|
|
19727
|
+
if (!(key in obj))
|
|
19728
|
+
return void 0;
|
|
19729
|
+
if (obj[key] === "true")
|
|
19730
|
+
return true;
|
|
19731
|
+
if (obj[key] === "false")
|
|
19732
|
+
return false;
|
|
19733
|
+
throw new Error(`Cannot load ${type} "${key}". Expected "true" or "false", got ${obj[key]}.`);
|
|
19734
|
+
};
|
|
19735
|
+
}
|
|
19736
|
+
});
|
|
19737
|
+
|
|
19738
|
+
// node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/types.js
|
|
19739
|
+
var SelectorType;
|
|
19740
|
+
var init_types2 = __esm({
|
|
19741
|
+
"node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/types.js"() {
|
|
19742
|
+
(function(SelectorType2) {
|
|
19743
|
+
SelectorType2["ENV"] = "env";
|
|
19744
|
+
SelectorType2["CONFIG"] = "shared config entry";
|
|
19745
|
+
})(SelectorType || (SelectorType = {}));
|
|
19746
|
+
}
|
|
19747
|
+
});
|
|
19748
|
+
|
|
20668
19749
|
// node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getHomeDir.js
|
|
20669
19750
|
var import_node_os, import_node_path, homeDirCache, getHomeDirCacheKey, getHomeDir;
|
|
20670
19751
|
var init_getHomeDir = __esm({
|
|
@@ -20716,7 +19797,7 @@ var init_constants = __esm({
|
|
|
20716
19797
|
var import_types2, getConfigData;
|
|
20717
19798
|
var init_getConfigData = __esm({
|
|
20718
19799
|
"node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getConfigData.js"() {
|
|
20719
|
-
import_types2 = __toESM(
|
|
19800
|
+
import_types2 = __toESM(require_dist_cjs());
|
|
20720
19801
|
init_constants();
|
|
20721
19802
|
getConfigData = (data2) => Object.entries(data2).filter(([key]) => {
|
|
20722
19803
|
const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR);
|
|
@@ -20761,9 +19842,9 @@ var init_getCredentialsFilepath = __esm({
|
|
|
20761
19842
|
var import_types3, prefixKeyRegex, profileNameBlockList, parseIni;
|
|
20762
19843
|
var init_parseIni = __esm({
|
|
20763
19844
|
"node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/parseIni.js"() {
|
|
20764
|
-
import_types3 = __toESM(
|
|
19845
|
+
import_types3 = __toESM(require_dist_cjs());
|
|
20765
19846
|
init_constants();
|
|
20766
|
-
prefixKeyRegex = /^([\w-]+)\s(["'])?([\w
|
|
19847
|
+
prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@+.%:/]+)\2$/;
|
|
20767
19848
|
profileNameBlockList = ["__proto__", "profile __proto__"];
|
|
20768
19849
|
parseIni = (iniData) => {
|
|
20769
19850
|
const map3 = {};
|
|
@@ -20880,7 +19961,7 @@ function getSelectorName(functionString) {
|
|
|
20880
19961
|
constants.delete("CONFIG_PREFIX_SEPARATOR");
|
|
20881
19962
|
constants.delete("ENV");
|
|
20882
19963
|
return [...constants].join(", ");
|
|
20883
|
-
} catch (
|
|
19964
|
+
} catch (ignored) {
|
|
20884
19965
|
return functionString;
|
|
20885
19966
|
}
|
|
20886
19967
|
}
|
|
@@ -20964,16 +20045,126 @@ var init_configLoader = __esm({
|
|
|
20964
20045
|
}
|
|
20965
20046
|
});
|
|
20966
20047
|
|
|
20967
|
-
// node_modules/@smithy/core/dist-es/submodules/
|
|
20968
|
-
var
|
|
20969
|
-
|
|
20970
|
-
|
|
20048
|
+
// node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js
|
|
20049
|
+
var TypeRegistry;
|
|
20050
|
+
var init_TypeRegistry = __esm({
|
|
20051
|
+
"node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js"() {
|
|
20052
|
+
TypeRegistry = class _TypeRegistry {
|
|
20053
|
+
namespace;
|
|
20054
|
+
schemas;
|
|
20055
|
+
exceptions;
|
|
20056
|
+
static registries = /* @__PURE__ */ new Map();
|
|
20057
|
+
constructor(namespace, schemas = /* @__PURE__ */ new Map(), exceptions = /* @__PURE__ */ new Map()) {
|
|
20058
|
+
this.namespace = namespace;
|
|
20059
|
+
this.schemas = schemas;
|
|
20060
|
+
this.exceptions = exceptions;
|
|
20061
|
+
}
|
|
20062
|
+
static for(namespace) {
|
|
20063
|
+
if (!_TypeRegistry.registries.has(namespace)) {
|
|
20064
|
+
_TypeRegistry.registries.set(namespace, new _TypeRegistry(namespace));
|
|
20065
|
+
}
|
|
20066
|
+
return _TypeRegistry.registries.get(namespace);
|
|
20067
|
+
}
|
|
20068
|
+
copyFrom(other) {
|
|
20069
|
+
const { schemas, exceptions } = this;
|
|
20070
|
+
for (const [k, v] of other.schemas) {
|
|
20071
|
+
if (!schemas.has(k)) {
|
|
20072
|
+
schemas.set(k, v);
|
|
20073
|
+
}
|
|
20074
|
+
}
|
|
20075
|
+
for (const [k, v] of other.exceptions) {
|
|
20076
|
+
if (!exceptions.has(k)) {
|
|
20077
|
+
exceptions.set(k, v);
|
|
20078
|
+
}
|
|
20079
|
+
}
|
|
20080
|
+
}
|
|
20081
|
+
register(shapeId, schema) {
|
|
20082
|
+
const qualifiedName = this.normalizeShapeId(shapeId);
|
|
20083
|
+
for (const r of [this, _TypeRegistry.for(qualifiedName.split("#")[0])]) {
|
|
20084
|
+
r.schemas.set(qualifiedName, schema);
|
|
20085
|
+
}
|
|
20086
|
+
}
|
|
20087
|
+
getSchema(shapeId) {
|
|
20088
|
+
const id = this.normalizeShapeId(shapeId);
|
|
20089
|
+
if (!this.schemas.has(id)) {
|
|
20090
|
+
if (!shapeId.includes("#")) {
|
|
20091
|
+
const suffix = "#" + shapeId;
|
|
20092
|
+
const candidates = [];
|
|
20093
|
+
for (const [shapeId2, schema] of this.schemas.entries()) {
|
|
20094
|
+
if (shapeId2.endsWith(suffix)) {
|
|
20095
|
+
candidates.push(schema);
|
|
20096
|
+
}
|
|
20097
|
+
}
|
|
20098
|
+
if (candidates.length === 1) {
|
|
20099
|
+
return candidates[0];
|
|
20100
|
+
}
|
|
20101
|
+
}
|
|
20102
|
+
throw new Error(`@smithy/core/schema - schema not found for ${id}`);
|
|
20103
|
+
}
|
|
20104
|
+
return this.schemas.get(id);
|
|
20105
|
+
}
|
|
20106
|
+
registerError(es, ctor) {
|
|
20107
|
+
const $error = es;
|
|
20108
|
+
const ns = $error[1];
|
|
20109
|
+
for (const r of [this, _TypeRegistry.for(ns)]) {
|
|
20110
|
+
r.schemas.set(ns + "#" + $error[2], $error);
|
|
20111
|
+
r.exceptions.set($error, ctor);
|
|
20112
|
+
}
|
|
20113
|
+
}
|
|
20114
|
+
getErrorCtor(es) {
|
|
20115
|
+
const $error = es;
|
|
20116
|
+
if (this.exceptions.has($error)) {
|
|
20117
|
+
return this.exceptions.get($error);
|
|
20118
|
+
}
|
|
20119
|
+
const registry2 = _TypeRegistry.for($error[1]);
|
|
20120
|
+
return registry2.exceptions.get($error);
|
|
20121
|
+
}
|
|
20122
|
+
getBaseException() {
|
|
20123
|
+
for (const exceptionKey of this.exceptions.keys()) {
|
|
20124
|
+
if (Array.isArray(exceptionKey)) {
|
|
20125
|
+
const [, ns, name15] = exceptionKey;
|
|
20126
|
+
const id = ns + "#" + name15;
|
|
20127
|
+
if (id.startsWith("smithy.ts.sdk.synthetic.") && id.endsWith("ServiceException")) {
|
|
20128
|
+
return exceptionKey;
|
|
20129
|
+
}
|
|
20130
|
+
}
|
|
20131
|
+
}
|
|
20132
|
+
return void 0;
|
|
20133
|
+
}
|
|
20134
|
+
find(predicate) {
|
|
20135
|
+
for (const schema of this.schemas.values()) {
|
|
20136
|
+
if (predicate(schema)) {
|
|
20137
|
+
return schema;
|
|
20138
|
+
}
|
|
20139
|
+
}
|
|
20140
|
+
return void 0;
|
|
20141
|
+
}
|
|
20142
|
+
clear() {
|
|
20143
|
+
this.schemas.clear();
|
|
20144
|
+
this.exceptions.clear();
|
|
20145
|
+
}
|
|
20146
|
+
normalizeShapeId(shapeId) {
|
|
20147
|
+
if (shapeId.includes("#")) {
|
|
20148
|
+
return shapeId;
|
|
20149
|
+
}
|
|
20150
|
+
return this.namespace + "#" + shapeId;
|
|
20151
|
+
}
|
|
20152
|
+
};
|
|
20153
|
+
}
|
|
20154
|
+
});
|
|
20155
|
+
|
|
20156
|
+
// node_modules/@smithy/core/dist-es/submodules/schema/index.js
|
|
20157
|
+
var init_schema = __esm({
|
|
20158
|
+
"node_modules/@smithy/core/dist-es/submodules/schema/index.js"() {
|
|
20159
|
+
init_TypeRegistry();
|
|
20971
20160
|
}
|
|
20972
20161
|
});
|
|
20973
20162
|
|
|
20974
20163
|
// node_modules/@smithy/core/dist-es/submodules/config/index.js
|
|
20975
20164
|
var init_config = __esm({
|
|
20976
20165
|
"node_modules/@smithy/core/dist-es/submodules/config/index.js"() {
|
|
20166
|
+
init_booleanSelector();
|
|
20167
|
+
init_types2();
|
|
20977
20168
|
init_constants();
|
|
20978
20169
|
init_configLoader();
|
|
20979
20170
|
}
|
|
@@ -20998,14 +20189,16 @@ var init_getEndpointUrlConfig = __esm({
|
|
|
20998
20189
|
return void 0;
|
|
20999
20190
|
},
|
|
21000
20191
|
configFileSelector: (profile, config2) => {
|
|
21001
|
-
if (
|
|
21002
|
-
const
|
|
21003
|
-
if (
|
|
21004
|
-
|
|
21005
|
-
const endpointUrl2 = servicesSection[[servicePrefixParts.join("_"), CONFIG_ENDPOINT_URL].join(CONFIG_PREFIX_SEPARATOR)];
|
|
21006
|
-
if (endpointUrl2)
|
|
21007
|
-
return endpointUrl2;
|
|
20192
|
+
if (profile.services) {
|
|
20193
|
+
const servicesSectionKey = ["services", profile.services].join(CONFIG_PREFIX_SEPARATOR);
|
|
20194
|
+
if (!config2 || !config2[servicesSectionKey]) {
|
|
20195
|
+
throw new Error(`The services section "${profile.services}" specified in the profile is not present in the shared configuration file.`);
|
|
21008
20196
|
}
|
|
20197
|
+
const servicesSection = config2[servicesSectionKey];
|
|
20198
|
+
const servicePrefixParts = serviceId.split(" ").map((w) => w.toLowerCase());
|
|
20199
|
+
const endpointUrl2 = servicesSection[[servicePrefixParts.join("_"), CONFIG_ENDPOINT_URL].join(CONFIG_PREFIX_SEPARATOR)];
|
|
20200
|
+
if (endpointUrl2)
|
|
20201
|
+
return endpointUrl2;
|
|
21009
20202
|
}
|
|
21010
20203
|
const endpointUrl = profile[CONFIG_ENDPOINT_URL];
|
|
21011
20204
|
if (endpointUrl)
|
|
@@ -21017,13 +20210,35 @@ var init_getEndpointUrlConfig = __esm({
|
|
|
21017
20210
|
}
|
|
21018
20211
|
});
|
|
21019
20212
|
|
|
20213
|
+
// node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getIgnoreConfiguredEndpointUrls.js
|
|
20214
|
+
var ENV_IGNORE_CONFIGURED_ENDPOINT_URLS, CONFIG_IGNORE_CONFIGURED_ENDPOINT_URLS, ignoreConfiguredEndpointUrlsConfigSelectors;
|
|
20215
|
+
var init_getIgnoreConfiguredEndpointUrls = __esm({
|
|
20216
|
+
"node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getIgnoreConfiguredEndpointUrls.js"() {
|
|
20217
|
+
init_config();
|
|
20218
|
+
ENV_IGNORE_CONFIGURED_ENDPOINT_URLS = "AWS_IGNORE_CONFIGURED_ENDPOINT_URLS";
|
|
20219
|
+
CONFIG_IGNORE_CONFIGURED_ENDPOINT_URLS = "ignore_configured_endpoint_urls";
|
|
20220
|
+
ignoreConfiguredEndpointUrlsConfigSelectors = {
|
|
20221
|
+
environmentVariableSelector: (env) => booleanSelector(env, ENV_IGNORE_CONFIGURED_ENDPOINT_URLS, SelectorType.ENV),
|
|
20222
|
+
configFileSelector: (profile) => booleanSelector(profile, CONFIG_IGNORE_CONFIGURED_ENDPOINT_URLS, SelectorType.CONFIG),
|
|
20223
|
+
default: false
|
|
20224
|
+
};
|
|
20225
|
+
}
|
|
20226
|
+
});
|
|
20227
|
+
|
|
21020
20228
|
// node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getEndpointFromConfig.js
|
|
21021
20229
|
var getEndpointFromConfig;
|
|
21022
20230
|
var init_getEndpointFromConfig = __esm({
|
|
21023
20231
|
"node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getEndpointFromConfig.js"() {
|
|
21024
20232
|
init_config();
|
|
21025
20233
|
init_getEndpointUrlConfig();
|
|
21026
|
-
|
|
20234
|
+
init_getIgnoreConfiguredEndpointUrls();
|
|
20235
|
+
getEndpointFromConfig = async (serviceId) => {
|
|
20236
|
+
const ignore2 = await loadConfig(ignoreConfiguredEndpointUrlsConfigSelectors)();
|
|
20237
|
+
if (ignore2) {
|
|
20238
|
+
return void 0;
|
|
20239
|
+
}
|
|
20240
|
+
return loadConfig(getEndpointUrlConfig(serviceId ?? ""))();
|
|
20241
|
+
};
|
|
21027
20242
|
}
|
|
21028
20243
|
});
|
|
21029
20244
|
|
|
@@ -21049,7 +20264,7 @@ var init_s3 = __esm({
|
|
|
21049
20264
|
}
|
|
21050
20265
|
return endpointParams;
|
|
21051
20266
|
};
|
|
21052
|
-
DOMAIN_PATTERN = /^[a-z0-9][a-z0-9
|
|
20267
|
+
DOMAIN_PATTERN = /^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$/;
|
|
21053
20268
|
IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/;
|
|
21054
20269
|
DOTS_PATTERN = /\.\./;
|
|
21055
20270
|
isDnsCompatibleBucketName = (bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName);
|
|
@@ -21138,7 +20353,7 @@ var init_toEndpointV12 = __esm({
|
|
|
21138
20353
|
// node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getEndpointFromInstructions.js
|
|
21139
20354
|
function bindGetEndpointFromInstructions(getEndpointFromConfig2) {
|
|
21140
20355
|
return async (commandInput, instructionsSupplier, clientConfig, context) => {
|
|
21141
|
-
if (!clientConfig.isCustomEndpoint) {
|
|
20356
|
+
if (!clientConfig.isCustomEndpoint && !clientConfig.ignoreConfiguredEndpointUrls) {
|
|
21142
20357
|
let endpointFromConfig;
|
|
21143
20358
|
if (clientConfig.serviceConfiguredEndpoint) {
|
|
21144
20359
|
endpointFromConfig = await clientConfig.serviceConfiguredEndpoint();
|
|
@@ -21148,6 +20363,7 @@ function bindGetEndpointFromInstructions(getEndpointFromConfig2) {
|
|
|
21148
20363
|
if (endpointFromConfig) {
|
|
21149
20364
|
clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig));
|
|
21150
20365
|
clientConfig.isCustomEndpoint = true;
|
|
20366
|
+
context?.logger?.debug?.(`@smithy/core/endpoints - resolved endpoint from config: ${endpointFromConfig}`);
|
|
21151
20367
|
}
|
|
21152
20368
|
}
|
|
21153
20369
|
const endpointParams = await resolveParams(commandInput, instructionsSupplier, clientConfig);
|
|
@@ -21253,7 +20469,7 @@ function bindEndpointMiddleware(getEndpointFromConfig2) {
|
|
|
21253
20469
|
}
|
|
21254
20470
|
var init_endpointMiddleware = __esm({
|
|
21255
20471
|
"node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/endpointMiddleware.js"() {
|
|
21256
|
-
|
|
20472
|
+
init_transport();
|
|
21257
20473
|
init_getEndpointFromInstructions();
|
|
21258
20474
|
}
|
|
21259
20475
|
});
|
|
@@ -21303,7 +20519,8 @@ function bindResolveEndpointConfig(getEndpointFromConfig2) {
|
|
|
21303
20519
|
tls,
|
|
21304
20520
|
isCustomEndpoint,
|
|
21305
20521
|
useDualstackEndpoint: normalizeProvider(useDualstackEndpoint ?? false),
|
|
21306
|
-
useFipsEndpoint: normalizeProvider(useFipsEndpoint ?? false)
|
|
20522
|
+
useFipsEndpoint: normalizeProvider(useFipsEndpoint ?? false),
|
|
20523
|
+
ignoreConfiguredEndpointUrls: !!input.ignoreConfiguredEndpointUrls
|
|
21307
20524
|
});
|
|
21308
20525
|
let configuredEndpointPromise = void 0;
|
|
21309
20526
|
resolvedConfig.serviceConfiguredEndpoint = async () => {
|
|
@@ -21322,61 +20539,6 @@ var init_resolveEndpointConfig = __esm({
|
|
|
21322
20539
|
}
|
|
21323
20540
|
});
|
|
21324
20541
|
|
|
21325
|
-
// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/EndpointError.js
|
|
21326
|
-
var init_EndpointError = __esm({
|
|
21327
|
-
"node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/EndpointError.js"() {
|
|
21328
|
-
}
|
|
21329
|
-
});
|
|
21330
|
-
|
|
21331
|
-
// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/EndpointFunctions.js
|
|
21332
|
-
var init_EndpointFunctions = __esm({
|
|
21333
|
-
"node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/EndpointFunctions.js"() {
|
|
21334
|
-
}
|
|
21335
|
-
});
|
|
21336
|
-
|
|
21337
|
-
// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/EndpointRuleObject.js
|
|
21338
|
-
var init_EndpointRuleObject = __esm({
|
|
21339
|
-
"node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/EndpointRuleObject.js"() {
|
|
21340
|
-
}
|
|
21341
|
-
});
|
|
21342
|
-
|
|
21343
|
-
// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/ErrorRuleObject.js
|
|
21344
|
-
var init_ErrorRuleObject = __esm({
|
|
21345
|
-
"node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/ErrorRuleObject.js"() {
|
|
21346
|
-
}
|
|
21347
|
-
});
|
|
21348
|
-
|
|
21349
|
-
// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/RuleSetObject.js
|
|
21350
|
-
var init_RuleSetObject = __esm({
|
|
21351
|
-
"node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/RuleSetObject.js"() {
|
|
21352
|
-
}
|
|
21353
|
-
});
|
|
21354
|
-
|
|
21355
|
-
// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/TreeRuleObject.js
|
|
21356
|
-
var init_TreeRuleObject = __esm({
|
|
21357
|
-
"node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/TreeRuleObject.js"() {
|
|
21358
|
-
}
|
|
21359
|
-
});
|
|
21360
|
-
|
|
21361
|
-
// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/shared.js
|
|
21362
|
-
var init_shared = __esm({
|
|
21363
|
-
"node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/shared.js"() {
|
|
21364
|
-
}
|
|
21365
|
-
});
|
|
21366
|
-
|
|
21367
|
-
// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/index.js
|
|
21368
|
-
var init_types2 = __esm({
|
|
21369
|
-
"node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/index.js"() {
|
|
21370
|
-
init_EndpointError();
|
|
21371
|
-
init_EndpointFunctions();
|
|
21372
|
-
init_EndpointRuleObject();
|
|
21373
|
-
init_ErrorRuleObject();
|
|
21374
|
-
init_RuleSetObject();
|
|
21375
|
-
init_TreeRuleObject();
|
|
21376
|
-
init_shared();
|
|
21377
|
-
}
|
|
21378
|
-
});
|
|
21379
|
-
|
|
21380
20542
|
// node_modules/@smithy/core/dist-es/submodules/endpoints/index.js
|
|
21381
20543
|
var getEndpointFromInstructions, resolveEndpointConfig, endpointMiddleware, getEndpointPlugin;
|
|
21382
20544
|
var init_endpoints = __esm({
|
|
@@ -21387,7 +20549,6 @@ var init_endpoints = __esm({
|
|
|
21387
20549
|
init_getEndpointPlugin();
|
|
21388
20550
|
init_resolveEndpointConfig();
|
|
21389
20551
|
init_transport();
|
|
21390
|
-
init_types2();
|
|
21391
20552
|
getEndpointFromInstructions = bindGetEndpointFromInstructions(getEndpointFromConfig);
|
|
21392
20553
|
resolveEndpointConfig = bindResolveEndpointConfig(getEndpointFromConfig);
|
|
21393
20554
|
endpointMiddleware = bindEndpointMiddleware(getEndpointFromConfig);
|
|
@@ -21491,58 +20652,77 @@ var init_ChecksumStream = __esm({
|
|
|
21491
20652
|
"node_modules/@smithy/core/dist-es/submodules/serde/util-stream/checksum/ChecksumStream.js"() {
|
|
21492
20653
|
import_node_stream = require("node:stream");
|
|
21493
20654
|
init_toBase64();
|
|
21494
|
-
ChecksumStream = class extends import_node_stream.
|
|
20655
|
+
ChecksumStream = class extends import_node_stream.Readable {
|
|
21495
20656
|
expectedChecksum;
|
|
21496
20657
|
checksumSourceLocation;
|
|
21497
20658
|
checksum;
|
|
21498
20659
|
source;
|
|
21499
20660
|
base64Encoder;
|
|
21500
|
-
pendingCallback = null;
|
|
21501
20661
|
constructor({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder }) {
|
|
21502
20662
|
super();
|
|
21503
|
-
if (typeof source.pipe
|
|
21504
|
-
this.source = source;
|
|
21505
|
-
} else {
|
|
20663
|
+
if (typeof source.pipe !== "function") {
|
|
21506
20664
|
throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`);
|
|
21507
20665
|
}
|
|
20666
|
+
this.source = source;
|
|
21508
20667
|
this.base64Encoder = base64Encoder ?? toBase64;
|
|
21509
20668
|
this.expectedChecksum = expectedChecksum;
|
|
21510
20669
|
this.checksum = checksum;
|
|
21511
20670
|
this.checksumSourceLocation = checksumSourceLocation;
|
|
21512
|
-
this.source.
|
|
21513
|
-
|
|
21514
|
-
|
|
21515
|
-
|
|
21516
|
-
|
|
21517
|
-
|
|
21518
|
-
|
|
20671
|
+
this.source.on("data", this.onSourceData);
|
|
20672
|
+
this.source.on("end", this.onSourceEnd);
|
|
20673
|
+
this.source.on("error", this.onSourceError);
|
|
20674
|
+
this.source.on("close", this.onSourceClose);
|
|
20675
|
+
this.source.pause();
|
|
20676
|
+
}
|
|
20677
|
+
onSourceData = (chunk) => {
|
|
20678
|
+
if (this.destroyed) {
|
|
20679
|
+
return;
|
|
21519
20680
|
}
|
|
21520
|
-
}
|
|
21521
|
-
_write(chunk, encoding, callback) {
|
|
21522
20681
|
try {
|
|
21523
20682
|
this.checksum.update(chunk);
|
|
21524
|
-
const canPushMore = this.push(chunk);
|
|
21525
|
-
if (!canPushMore) {
|
|
21526
|
-
this.pendingCallback = callback;
|
|
21527
|
-
return;
|
|
21528
|
-
}
|
|
21529
20683
|
} catch (e) {
|
|
21530
|
-
|
|
20684
|
+
this.destroy(e);
|
|
20685
|
+
return;
|
|
20686
|
+
}
|
|
20687
|
+
if (!this.push(chunk)) {
|
|
20688
|
+
this.source.pause();
|
|
20689
|
+
}
|
|
20690
|
+
};
|
|
20691
|
+
onSourceEnd = async () => {
|
|
20692
|
+
if (this.destroyed) {
|
|
20693
|
+
return;
|
|
21531
20694
|
}
|
|
21532
|
-
return callback();
|
|
21533
|
-
}
|
|
21534
|
-
async _final(callback) {
|
|
21535
20695
|
try {
|
|
21536
20696
|
const digest = await this.checksum.digest();
|
|
21537
20697
|
const received = this.base64Encoder(digest);
|
|
21538
20698
|
if (this.expectedChecksum !== received) {
|
|
21539
|
-
|
|
20699
|
+
this.destroy(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${received}" in response header "${this.checksumSourceLocation}".`));
|
|
20700
|
+
return;
|
|
21540
20701
|
}
|
|
21541
20702
|
} catch (e) {
|
|
21542
|
-
|
|
20703
|
+
this.destroy(e);
|
|
20704
|
+
return;
|
|
21543
20705
|
}
|
|
21544
20706
|
this.push(null);
|
|
21545
|
-
|
|
20707
|
+
};
|
|
20708
|
+
onSourceError = (error40) => {
|
|
20709
|
+
this.destroy(error40);
|
|
20710
|
+
};
|
|
20711
|
+
onSourceClose = () => {
|
|
20712
|
+
if (!this.destroyed && !this.source.readableEnded) {
|
|
20713
|
+
this.destroy(new Error("Connection lost or stream closed before all data was received."));
|
|
20714
|
+
}
|
|
20715
|
+
};
|
|
20716
|
+
_read(_size2) {
|
|
20717
|
+
this.source.resume();
|
|
20718
|
+
}
|
|
20719
|
+
_destroy(error40, callback) {
|
|
20720
|
+
this.source?.removeListener("data", this.onSourceData);
|
|
20721
|
+
this.source?.removeListener("end", this.onSourceEnd);
|
|
20722
|
+
this.source?.removeListener("error", this.onSourceError);
|
|
20723
|
+
this.source?.removeListener("close", this.onSourceClose);
|
|
20724
|
+
this.source?.destroy();
|
|
20725
|
+
callback(error40);
|
|
21546
20726
|
}
|
|
21547
20727
|
};
|
|
21548
20728
|
}
|
|
@@ -22010,6 +21190,7 @@ var import_node_stream4, headStream2, Collector;
|
|
|
22010
21190
|
var init_headStream = __esm({
|
|
22011
21191
|
"node_modules/@smithy/core/dist-es/submodules/serde/util-stream/headStream.js"() {
|
|
22012
21192
|
import_node_stream4 = require("node:stream");
|
|
21193
|
+
init_concatBytes();
|
|
22013
21194
|
init_headStream_browser();
|
|
22014
21195
|
init_stream_type_check();
|
|
22015
21196
|
headStream2 = (stream2, bytes) => {
|
|
@@ -22026,7 +21207,7 @@ var init_headStream = __esm({
|
|
|
22026
21207
|
});
|
|
22027
21208
|
collector.on("error", reject2);
|
|
22028
21209
|
collector.on("finish", function() {
|
|
22029
|
-
const bytes2 =
|
|
21210
|
+
const bytes2 = concatBytes(this.buffers);
|
|
22030
21211
|
resolve9(bytes2);
|
|
22031
21212
|
});
|
|
22032
21213
|
});
|
|
@@ -22066,103 +21247,36 @@ var init_toUtf8_browser = __esm({
|
|
|
22066
21247
|
}
|
|
22067
21248
|
});
|
|
22068
21249
|
|
|
22069
|
-
// node_modules/@smithy/core/dist-es/submodules/serde/util-base64/fromBase64.browser.js
|
|
22070
|
-
var fromBase642;
|
|
22071
|
-
var init_fromBase64_browser = __esm({
|
|
22072
|
-
"node_modules/@smithy/core/dist-es/submodules/serde/util-base64/fromBase64.browser.js"() {
|
|
22073
|
-
init_constants_for_browser();
|
|
22074
|
-
fromBase642 = (input) => {
|
|
22075
|
-
let totalByteLength = input.length / 4 * 3;
|
|
22076
|
-
if (input.slice(-2) === "==") {
|
|
22077
|
-
totalByteLength -= 2;
|
|
22078
|
-
} else if (input.slice(-1) === "=") {
|
|
22079
|
-
totalByteLength--;
|
|
22080
|
-
}
|
|
22081
|
-
const out = new ArrayBuffer(totalByteLength);
|
|
22082
|
-
const dataView = new DataView(out);
|
|
22083
|
-
for (let i = 0; i < input.length; i += 4) {
|
|
22084
|
-
let bits = 0;
|
|
22085
|
-
let bitLength = 0;
|
|
22086
|
-
for (let j = i, limit = i + 3; j <= limit; j++) {
|
|
22087
|
-
if (input[j] !== "=") {
|
|
22088
|
-
if (!(input[j] in alphabetByEncoding)) {
|
|
22089
|
-
throw new TypeError(`Invalid character ${input[j]} in base64 string.`);
|
|
22090
|
-
}
|
|
22091
|
-
bits |= alphabetByEncoding[input[j]] << (limit - j) * bitsPerLetter;
|
|
22092
|
-
bitLength += bitsPerLetter;
|
|
22093
|
-
} else {
|
|
22094
|
-
bits >>= bitsPerLetter;
|
|
22095
|
-
}
|
|
22096
|
-
}
|
|
22097
|
-
const chunkOffset = i / 4 * 3;
|
|
22098
|
-
bits >>= bitLength % bitsPerByte;
|
|
22099
|
-
const byteLength = Math.floor(bitLength / bitsPerByte);
|
|
22100
|
-
for (let k = 0; k < byteLength; k++) {
|
|
22101
|
-
const offset2 = (byteLength - k - 1) * bitsPerByte;
|
|
22102
|
-
dataView.setUint8(chunkOffset + k, (bits & 255 << offset2) >> offset2);
|
|
22103
|
-
}
|
|
22104
|
-
}
|
|
22105
|
-
return new Uint8Array(out);
|
|
22106
|
-
};
|
|
22107
|
-
}
|
|
22108
|
-
});
|
|
22109
|
-
|
|
22110
21250
|
// node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-collector.browser.js
|
|
22111
21251
|
async function collectBlob(blob) {
|
|
22112
|
-
|
|
22113
|
-
const arrayBuffer = fromBase642(base643);
|
|
22114
|
-
return new Uint8Array(arrayBuffer);
|
|
21252
|
+
return blob.arrayBuffer().then((ab) => new Uint8Array(ab));
|
|
22115
21253
|
}
|
|
22116
|
-
async function
|
|
21254
|
+
async function collectReadableStream(stream2) {
|
|
22117
21255
|
const chunks = [];
|
|
22118
21256
|
const reader = stream2.getReader();
|
|
22119
|
-
let isDone = false;
|
|
22120
21257
|
let length = 0;
|
|
22121
|
-
while (
|
|
21258
|
+
while (true) {
|
|
22122
21259
|
const { done, value } = await reader.read();
|
|
22123
21260
|
if (value) {
|
|
22124
21261
|
chunks.push(value);
|
|
22125
21262
|
length += value.length;
|
|
22126
21263
|
}
|
|
22127
|
-
|
|
22128
|
-
|
|
22129
|
-
|
|
22130
|
-
let offset2 = 0;
|
|
22131
|
-
for (const chunk of chunks) {
|
|
22132
|
-
collected.set(chunk, offset2);
|
|
22133
|
-
offset2 += chunk.length;
|
|
21264
|
+
if (done) {
|
|
21265
|
+
break;
|
|
21266
|
+
}
|
|
22134
21267
|
}
|
|
22135
|
-
return
|
|
22136
|
-
}
|
|
22137
|
-
function readToBase64(blob) {
|
|
22138
|
-
return new Promise((resolve9, reject2) => {
|
|
22139
|
-
const reader = new FileReader();
|
|
22140
|
-
reader.onloadend = () => {
|
|
22141
|
-
if (reader.readyState !== 2) {
|
|
22142
|
-
return reject2(new Error("Reader aborted too early"));
|
|
22143
|
-
}
|
|
22144
|
-
const result = reader.result ?? "";
|
|
22145
|
-
const commaIndex = result.indexOf(",");
|
|
22146
|
-
const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length;
|
|
22147
|
-
resolve9(result.substring(dataOffset));
|
|
22148
|
-
};
|
|
22149
|
-
reader.onabort = () => reject2(new Error("Read aborted"));
|
|
22150
|
-
reader.onerror = () => reject2(reader.error);
|
|
22151
|
-
reader.readAsDataURL(blob);
|
|
22152
|
-
});
|
|
21268
|
+
return concatBytes(chunks, length);
|
|
22153
21269
|
}
|
|
22154
21270
|
var streamCollector;
|
|
22155
21271
|
var init_stream_collector_browser = __esm({
|
|
22156
21272
|
"node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-collector.browser.js"() {
|
|
22157
|
-
|
|
21273
|
+
init_concatBytes();
|
|
21274
|
+
init_stream_type_check();
|
|
22158
21275
|
streamCollector = async (stream2) => {
|
|
22159
|
-
if (
|
|
22160
|
-
if (Blob.prototype.arrayBuffer !== void 0) {
|
|
22161
|
-
return new Uint8Array(await stream2.arrayBuffer());
|
|
22162
|
-
}
|
|
21276
|
+
if (isBlob(stream2)) {
|
|
22163
21277
|
return collectBlob(stream2);
|
|
22164
21278
|
}
|
|
22165
|
-
return
|
|
21279
|
+
return collectReadableStream(stream2);
|
|
22166
21280
|
};
|
|
22167
21281
|
}
|
|
22168
21282
|
});
|
|
@@ -22232,57 +21346,42 @@ var init_sdk_stream_mixin_browser = __esm({
|
|
|
22232
21346
|
});
|
|
22233
21347
|
|
|
22234
21348
|
// node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-collector.js
|
|
22235
|
-
|
|
22236
|
-
const chunks = [];
|
|
22237
|
-
const reader = stream2.getReader();
|
|
22238
|
-
let isDone = false;
|
|
22239
|
-
let length = 0;
|
|
22240
|
-
while (!isDone) {
|
|
22241
|
-
const { done, value } = await reader.read();
|
|
22242
|
-
if (value) {
|
|
22243
|
-
chunks.push(value);
|
|
22244
|
-
length += value.length;
|
|
22245
|
-
}
|
|
22246
|
-
isDone = done;
|
|
22247
|
-
}
|
|
22248
|
-
const collected = new Uint8Array(length);
|
|
22249
|
-
let offset2 = 0;
|
|
22250
|
-
for (const chunk of chunks) {
|
|
22251
|
-
collected.set(chunk, offset2);
|
|
22252
|
-
offset2 += chunk.length;
|
|
22253
|
-
}
|
|
22254
|
-
return collected;
|
|
22255
|
-
}
|
|
22256
|
-
var import_node_stream5, Collector2, isReadableStreamInstance, streamCollector2;
|
|
21349
|
+
var import_node_stream5, streamCollector2, Collector2;
|
|
22257
21350
|
var init_stream_collector = __esm({
|
|
22258
21351
|
"node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-collector.js"() {
|
|
22259
21352
|
import_node_stream5 = require("node:stream");
|
|
22260
|
-
|
|
22261
|
-
|
|
22262
|
-
|
|
22263
|
-
this.bufferedBytes.push(chunk);
|
|
22264
|
-
callback();
|
|
22265
|
-
}
|
|
22266
|
-
};
|
|
22267
|
-
isReadableStreamInstance = (stream2) => typeof ReadableStream === "function" && stream2 instanceof ReadableStream;
|
|
21353
|
+
init_concatBytes();
|
|
21354
|
+
init_stream_collector_browser();
|
|
21355
|
+
init_stream_type_check();
|
|
22268
21356
|
streamCollector2 = (stream2) => {
|
|
22269
|
-
if (
|
|
21357
|
+
if (isBlob(stream2)) {
|
|
21358
|
+
return collectBlob(stream2);
|
|
21359
|
+
}
|
|
21360
|
+
if (isReadableStream(stream2)) {
|
|
22270
21361
|
return collectReadableStream(stream2);
|
|
22271
21362
|
}
|
|
22272
21363
|
return new Promise((resolve9, reject2) => {
|
|
22273
21364
|
const collector = new Collector2();
|
|
22274
|
-
stream2
|
|
22275
|
-
|
|
21365
|
+
const nodeStream = stream2;
|
|
21366
|
+
nodeStream.pipe(collector);
|
|
21367
|
+
nodeStream.on("error", (err) => {
|
|
22276
21368
|
collector.end();
|
|
22277
21369
|
reject2(err);
|
|
22278
21370
|
});
|
|
22279
21371
|
collector.on("error", reject2);
|
|
22280
21372
|
collector.on("finish", function() {
|
|
22281
|
-
const bytes =
|
|
21373
|
+
const bytes = concatBytes(this.bufferedBytes);
|
|
22282
21374
|
resolve9(bytes);
|
|
22283
21375
|
});
|
|
22284
21376
|
});
|
|
22285
21377
|
};
|
|
21378
|
+
Collector2 = class extends import_node_stream5.Writable {
|
|
21379
|
+
bufferedBytes = [];
|
|
21380
|
+
_write(chunk, encoding, callback) {
|
|
21381
|
+
this.bufferedBytes.push(chunk);
|
|
21382
|
+
callback();
|
|
21383
|
+
}
|
|
21384
|
+
};
|
|
22286
21385
|
}
|
|
22287
21386
|
});
|
|
22288
21387
|
|
|
@@ -22299,7 +21398,7 @@ var init_sdk_stream_mixin = __esm({
|
|
|
22299
21398
|
if (!(stream2 instanceof import_node_stream6.Readable)) {
|
|
22300
21399
|
try {
|
|
22301
21400
|
return sdkStreamMixin(stream2);
|
|
22302
|
-
} catch (
|
|
21401
|
+
} catch (ignored) {
|
|
22303
21402
|
const name15 = stream2?.__proto__?.constructor?.name || stream2;
|
|
22304
21403
|
throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${name15}`);
|
|
22305
21404
|
}
|
|
@@ -22386,6 +21485,7 @@ __export(serde_exports, {
|
|
|
22386
21485
|
_parseRfc3339DateTimeWithOffset: () => _parseRfc3339DateTimeWithOffset,
|
|
22387
21486
|
_parseRfc7231DateTime: () => _parseRfc7231DateTime,
|
|
22388
21487
|
calculateBodyLength: () => calculateBodyLength,
|
|
21488
|
+
concatBytes: () => concatBytes,
|
|
22389
21489
|
copyDocumentWithTransform: () => copyDocumentWithTransform,
|
|
22390
21490
|
createBufferedReadable: () => createBufferedReadable,
|
|
22391
21491
|
createChecksumStream: () => createChecksumStream2,
|
|
@@ -22434,6 +21534,7 @@ __export(serde_exports, {
|
|
|
22434
21534
|
splitEvery: () => splitEvery,
|
|
22435
21535
|
splitHeader: () => splitHeader,
|
|
22436
21536
|
splitStream: () => splitStream2,
|
|
21537
|
+
streamCollector: () => streamCollector2,
|
|
22437
21538
|
strictParseByte: () => strictParseByte,
|
|
22438
21539
|
strictParseDouble: () => strictParseDouble,
|
|
22439
21540
|
strictParseFloat: () => strictParseFloat,
|
|
@@ -22470,6 +21571,7 @@ var init_serde = __esm({
|
|
|
22470
21571
|
init_hex_encoding();
|
|
22471
21572
|
init_calculateBodyLength();
|
|
22472
21573
|
init_toUint8Array();
|
|
21574
|
+
init_concatBytes();
|
|
22473
21575
|
init_buffer_from();
|
|
22474
21576
|
init_is_array_buffer();
|
|
22475
21577
|
init_deserializerMiddleware();
|
|
@@ -22484,6 +21586,7 @@ var init_serde = __esm({
|
|
|
22484
21586
|
init_sdk_stream_mixin();
|
|
22485
21587
|
init_splitStream();
|
|
22486
21588
|
init_stream_type_check();
|
|
21589
|
+
init_stream_collector();
|
|
22487
21590
|
Uint8ArrayBlobAdapter = class extends bindUint8ArrayBlobAdapter(toUtf8, fromUtf8, toBase64, fromBase64) {
|
|
22488
21591
|
};
|
|
22489
21592
|
_getRandomValues = import_node_crypto2.getRandomValues;
|
|
@@ -22492,6 +21595,81 @@ var init_serde = __esm({
|
|
|
22492
21595
|
}
|
|
22493
21596
|
});
|
|
22494
21597
|
|
|
21598
|
+
// node_modules/@smithy/core/dist-es/submodules/checksum/crc32/Crc32Js.js
|
|
21599
|
+
var CRC32_TABLE, ONES, Crc32Js;
|
|
21600
|
+
var init_Crc32Js = __esm({
|
|
21601
|
+
"node_modules/@smithy/core/dist-es/submodules/checksum/crc32/Crc32Js.js"() {
|
|
21602
|
+
CRC32_TABLE = new Uint32Array(256);
|
|
21603
|
+
for (let i = 0; i < 256; ++i) {
|
|
21604
|
+
let c = i;
|
|
21605
|
+
for (let j = 0; j < 8; ++j) {
|
|
21606
|
+
c = c & 1 ? 3988292384 ^ c >>> 1 : c >>> 1;
|
|
21607
|
+
}
|
|
21608
|
+
CRC32_TABLE[i] = c >>> 0;
|
|
21609
|
+
}
|
|
21610
|
+
ONES = 4294967295;
|
|
21611
|
+
Crc32Js = class {
|
|
21612
|
+
digestLength = 4;
|
|
21613
|
+
checksum = ONES;
|
|
21614
|
+
update(data2) {
|
|
21615
|
+
for (let i = 0; i < data2.length; ++i) {
|
|
21616
|
+
this.checksum = this.checksum >>> 8 ^ CRC32_TABLE[(this.checksum ^ data2[i]) & 255];
|
|
21617
|
+
}
|
|
21618
|
+
}
|
|
21619
|
+
digestSync() {
|
|
21620
|
+
return (this.checksum ^ ONES) >>> 0;
|
|
21621
|
+
}
|
|
21622
|
+
async digest() {
|
|
21623
|
+
const value = this.digestSync();
|
|
21624
|
+
const out = new Uint8Array(4);
|
|
21625
|
+
new DataView(out.buffer).setUint32(0, value, false);
|
|
21626
|
+
return out;
|
|
21627
|
+
}
|
|
21628
|
+
reset() {
|
|
21629
|
+
this.checksum = ONES;
|
|
21630
|
+
}
|
|
21631
|
+
};
|
|
21632
|
+
}
|
|
21633
|
+
});
|
|
21634
|
+
|
|
21635
|
+
// node_modules/@smithy/core/dist-es/submodules/checksum/crc32/Crc32Node.js
|
|
21636
|
+
function buildNativeClass(nativeCrc32) {
|
|
21637
|
+
return class Crc32Node {
|
|
21638
|
+
digestLength = 4;
|
|
21639
|
+
value = 0;
|
|
21640
|
+
update(data2) {
|
|
21641
|
+
this.value = nativeCrc32(data2, this.value);
|
|
21642
|
+
}
|
|
21643
|
+
digestSync() {
|
|
21644
|
+
return this.value >>> 0;
|
|
21645
|
+
}
|
|
21646
|
+
async digest() {
|
|
21647
|
+
const out = new Uint8Array(4);
|
|
21648
|
+
new DataView(out.buffer).setUint32(0, this.digestSync(), false);
|
|
21649
|
+
return out;
|
|
21650
|
+
}
|
|
21651
|
+
reset() {
|
|
21652
|
+
this.value = 0;
|
|
21653
|
+
}
|
|
21654
|
+
};
|
|
21655
|
+
}
|
|
21656
|
+
var zlib, zlibCrc32, Crc32Node;
|
|
21657
|
+
var init_Crc32Node = __esm({
|
|
21658
|
+
"node_modules/@smithy/core/dist-es/submodules/checksum/crc32/Crc32Node.js"() {
|
|
21659
|
+
zlib = __toESM(require("node:zlib"));
|
|
21660
|
+
init_Crc32Js();
|
|
21661
|
+
zlibCrc32 = typeof zlib.crc32 === "function" ? zlib.crc32 : void 0;
|
|
21662
|
+
Crc32Node = zlibCrc32 ? buildNativeClass(zlibCrc32) : Crc32Js;
|
|
21663
|
+
}
|
|
21664
|
+
});
|
|
21665
|
+
|
|
21666
|
+
// node_modules/@smithy/core/dist-es/submodules/checksum/index.js
|
|
21667
|
+
var init_checksum = __esm({
|
|
21668
|
+
"node_modules/@smithy/core/dist-es/submodules/checksum/index.js"() {
|
|
21669
|
+
init_Crc32Node();
|
|
21670
|
+
}
|
|
21671
|
+
});
|
|
21672
|
+
|
|
22495
21673
|
// node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/Int64.js
|
|
22496
21674
|
function negate(bytes) {
|
|
22497
21675
|
for (let i = 0; i < 8; i++) {
|
|
@@ -22573,27 +21751,27 @@ var init_HeaderMarshaller = __esm({
|
|
|
22573
21751
|
formatHeaderValue(header) {
|
|
22574
21752
|
switch (header.type) {
|
|
22575
21753
|
case "boolean":
|
|
22576
|
-
return Uint8Array.from([header.value ?
|
|
21754
|
+
return Uint8Array.from([header.value ? HEADER_VALUE_TYPE.boolTrue : HEADER_VALUE_TYPE.boolFalse]);
|
|
22577
21755
|
case "byte":
|
|
22578
|
-
return Uint8Array.from([
|
|
21756
|
+
return Uint8Array.from([HEADER_VALUE_TYPE.byte, header.value]);
|
|
22579
21757
|
case "short":
|
|
22580
21758
|
const shortView = new DataView(new ArrayBuffer(3));
|
|
22581
|
-
shortView.setUint8(0,
|
|
21759
|
+
shortView.setUint8(0, HEADER_VALUE_TYPE.short);
|
|
22582
21760
|
shortView.setInt16(1, header.value, false);
|
|
22583
21761
|
return new Uint8Array(shortView.buffer);
|
|
22584
21762
|
case "integer":
|
|
22585
21763
|
const intView = new DataView(new ArrayBuffer(5));
|
|
22586
|
-
intView.setUint8(0,
|
|
21764
|
+
intView.setUint8(0, HEADER_VALUE_TYPE.integer);
|
|
22587
21765
|
intView.setInt32(1, header.value, false);
|
|
22588
21766
|
return new Uint8Array(intView.buffer);
|
|
22589
21767
|
case "long":
|
|
22590
21768
|
const longBytes = new Uint8Array(9);
|
|
22591
|
-
longBytes[0] =
|
|
21769
|
+
longBytes[0] = HEADER_VALUE_TYPE.long;
|
|
22592
21770
|
longBytes.set(header.value.bytes, 1);
|
|
22593
21771
|
return longBytes;
|
|
22594
21772
|
case "binary":
|
|
22595
21773
|
const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength));
|
|
22596
|
-
binView.setUint8(0,
|
|
21774
|
+
binView.setUint8(0, HEADER_VALUE_TYPE.byteArray);
|
|
22597
21775
|
binView.setUint16(1, header.value.byteLength, false);
|
|
22598
21776
|
const binBytes = new Uint8Array(binView.buffer);
|
|
22599
21777
|
binBytes.set(header.value, 3);
|
|
@@ -22601,14 +21779,14 @@ var init_HeaderMarshaller = __esm({
|
|
|
22601
21779
|
case "string":
|
|
22602
21780
|
const utf8Bytes = this.fromUtf8(header.value);
|
|
22603
21781
|
const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));
|
|
22604
|
-
strView.setUint8(0,
|
|
21782
|
+
strView.setUint8(0, HEADER_VALUE_TYPE.string);
|
|
22605
21783
|
strView.setUint16(1, utf8Bytes.byteLength, false);
|
|
22606
21784
|
const strBytes = new Uint8Array(strView.buffer);
|
|
22607
21785
|
strBytes.set(utf8Bytes, 3);
|
|
22608
21786
|
return strBytes;
|
|
22609
21787
|
case "timestamp":
|
|
22610
21788
|
const tsBytes = new Uint8Array(9);
|
|
22611
|
-
tsBytes[0] =
|
|
21789
|
+
tsBytes[0] = HEADER_VALUE_TYPE.timestamp;
|
|
22612
21790
|
tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1);
|
|
22613
21791
|
return tsBytes;
|
|
22614
21792
|
case "uuid":
|
|
@@ -22616,8 +21794,8 @@ var init_HeaderMarshaller = __esm({
|
|
|
22616
21794
|
throw new Error(`Invalid UUID received: ${header.value}`);
|
|
22617
21795
|
}
|
|
22618
21796
|
const uuidBytes = new Uint8Array(17);
|
|
22619
|
-
uuidBytes[0] =
|
|
22620
|
-
uuidBytes.set(fromHex(header.value.replace(
|
|
21797
|
+
uuidBytes[0] = HEADER_VALUE_TYPE.uuid;
|
|
21798
|
+
uuidBytes.set(fromHex(header.value.replace(/-/g, "")), 1);
|
|
22621
21799
|
return uuidBytes;
|
|
22622
21800
|
}
|
|
22623
21801
|
}
|
|
@@ -22629,46 +21807,46 @@ var init_HeaderMarshaller = __esm({
|
|
|
22629
21807
|
const name15 = this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, nameLength));
|
|
22630
21808
|
position += nameLength;
|
|
22631
21809
|
switch (headers.getUint8(position++)) {
|
|
22632
|
-
case
|
|
21810
|
+
case HEADER_VALUE_TYPE.boolTrue:
|
|
22633
21811
|
out[name15] = {
|
|
22634
21812
|
type: BOOLEAN_TAG,
|
|
22635
21813
|
value: true
|
|
22636
21814
|
};
|
|
22637
21815
|
break;
|
|
22638
|
-
case
|
|
21816
|
+
case HEADER_VALUE_TYPE.boolFalse:
|
|
22639
21817
|
out[name15] = {
|
|
22640
21818
|
type: BOOLEAN_TAG,
|
|
22641
21819
|
value: false
|
|
22642
21820
|
};
|
|
22643
21821
|
break;
|
|
22644
|
-
case
|
|
21822
|
+
case HEADER_VALUE_TYPE.byte:
|
|
22645
21823
|
out[name15] = {
|
|
22646
21824
|
type: BYTE_TAG,
|
|
22647
21825
|
value: headers.getInt8(position++)
|
|
22648
21826
|
};
|
|
22649
21827
|
break;
|
|
22650
|
-
case
|
|
21828
|
+
case HEADER_VALUE_TYPE.short:
|
|
22651
21829
|
out[name15] = {
|
|
22652
21830
|
type: SHORT_TAG,
|
|
22653
21831
|
value: headers.getInt16(position, false)
|
|
22654
21832
|
};
|
|
22655
21833
|
position += 2;
|
|
22656
21834
|
break;
|
|
22657
|
-
case
|
|
21835
|
+
case HEADER_VALUE_TYPE.integer:
|
|
22658
21836
|
out[name15] = {
|
|
22659
21837
|
type: INT_TAG,
|
|
22660
21838
|
value: headers.getInt32(position, false)
|
|
22661
21839
|
};
|
|
22662
21840
|
position += 4;
|
|
22663
21841
|
break;
|
|
22664
|
-
case
|
|
21842
|
+
case HEADER_VALUE_TYPE.long:
|
|
22665
21843
|
out[name15] = {
|
|
22666
21844
|
type: LONG_TAG,
|
|
22667
21845
|
value: new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8))
|
|
22668
21846
|
};
|
|
22669
21847
|
position += 8;
|
|
22670
21848
|
break;
|
|
22671
|
-
case
|
|
21849
|
+
case HEADER_VALUE_TYPE.byteArray:
|
|
22672
21850
|
const binaryLength = headers.getUint16(position, false);
|
|
22673
21851
|
position += 2;
|
|
22674
21852
|
out[name15] = {
|
|
@@ -22677,7 +21855,7 @@ var init_HeaderMarshaller = __esm({
|
|
|
22677
21855
|
};
|
|
22678
21856
|
position += binaryLength;
|
|
22679
21857
|
break;
|
|
22680
|
-
case
|
|
21858
|
+
case HEADER_VALUE_TYPE.string:
|
|
22681
21859
|
const stringLength = headers.getUint16(position, false);
|
|
22682
21860
|
position += 2;
|
|
22683
21861
|
out[name15] = {
|
|
@@ -22686,14 +21864,14 @@ var init_HeaderMarshaller = __esm({
|
|
|
22686
21864
|
};
|
|
22687
21865
|
position += stringLength;
|
|
22688
21866
|
break;
|
|
22689
|
-
case
|
|
21867
|
+
case HEADER_VALUE_TYPE.timestamp:
|
|
22690
21868
|
out[name15] = {
|
|
22691
21869
|
type: TIMESTAMP_TAG,
|
|
22692
21870
|
value: new Date(new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)).valueOf())
|
|
22693
21871
|
};
|
|
22694
21872
|
position += 8;
|
|
22695
21873
|
break;
|
|
22696
|
-
case
|
|
21874
|
+
case HEADER_VALUE_TYPE.uuid:
|
|
22697
21875
|
const uuidBytes = new Uint8Array(headers.buffer, headers.byteOffset + position, 16);
|
|
22698
21876
|
position += 16;
|
|
22699
21877
|
out[name15] = {
|
|
@@ -22746,23 +21924,24 @@ function splitMessage({ byteLength, byteOffset, buffer }) {
|
|
|
22746
21924
|
const headerLength = view.getUint32(PRELUDE_MEMBER_LENGTH, false);
|
|
22747
21925
|
const expectedPreludeChecksum = view.getUint32(PRELUDE_LENGTH, false);
|
|
22748
21926
|
const expectedMessageChecksum = view.getUint32(byteLength - CHECKSUM_LENGTH, false);
|
|
22749
|
-
const checksummer = new
|
|
22750
|
-
|
|
22751
|
-
|
|
21927
|
+
const checksummer = new Crc32Node();
|
|
21928
|
+
checksummer.update(new Uint8Array(buffer, byteOffset, PRELUDE_LENGTH));
|
|
21929
|
+
if (expectedPreludeChecksum !== checksummer.digestSync()) {
|
|
21930
|
+
throw new Error(`The prelude checksum specified in the message (${expectedPreludeChecksum}) does not match the calculated CRC32 checksum (${checksummer.digestSync()})`);
|
|
22752
21931
|
}
|
|
22753
21932
|
checksummer.update(new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH, byteLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH)));
|
|
22754
|
-
if (expectedMessageChecksum !== checksummer.
|
|
22755
|
-
throw new Error(`The message checksum (${checksummer.
|
|
21933
|
+
if (expectedMessageChecksum !== checksummer.digestSync()) {
|
|
21934
|
+
throw new Error(`The message checksum (${checksummer.digestSync()}) did not match the expected value of ${expectedMessageChecksum}`);
|
|
22756
21935
|
}
|
|
22757
21936
|
return {
|
|
22758
21937
|
headers: new DataView(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH, headerLength),
|
|
22759
21938
|
body: new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH + headerLength, messageLength - headerLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH + CHECKSUM_LENGTH))
|
|
22760
21939
|
};
|
|
22761
21940
|
}
|
|
22762
|
-
var
|
|
21941
|
+
var PRELUDE_MEMBER_LENGTH, PRELUDE_LENGTH, CHECKSUM_LENGTH, MINIMUM_MESSAGE_LENGTH;
|
|
22763
21942
|
var init_splitMessage = __esm({
|
|
22764
21943
|
"node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/splitMessage.js"() {
|
|
22765
|
-
|
|
21944
|
+
init_checksum();
|
|
22766
21945
|
PRELUDE_MEMBER_LENGTH = 4;
|
|
22767
21946
|
PRELUDE_LENGTH = PRELUDE_MEMBER_LENGTH * 2;
|
|
22768
21947
|
CHECKSUM_LENGTH = 4;
|
|
@@ -22771,10 +21950,10 @@ var init_splitMessage = __esm({
|
|
|
22771
21950
|
});
|
|
22772
21951
|
|
|
22773
21952
|
// node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/EventStreamCodec.js
|
|
22774
|
-
var
|
|
21953
|
+
var EventStreamCodec;
|
|
22775
21954
|
var init_EventStreamCodec = __esm({
|
|
22776
21955
|
"node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/EventStreamCodec.js"() {
|
|
22777
|
-
|
|
21956
|
+
init_checksum();
|
|
22778
21957
|
init_HeaderMarshaller();
|
|
22779
21958
|
init_splitMessage();
|
|
22780
21959
|
EventStreamCodec = class {
|
|
@@ -22822,13 +22001,15 @@ var init_EventStreamCodec = __esm({
|
|
|
22822
22001
|
const length = headers.byteLength + body.byteLength + 16;
|
|
22823
22002
|
const out = new Uint8Array(length);
|
|
22824
22003
|
const view = new DataView(out.buffer, out.byteOffset, out.byteLength);
|
|
22825
|
-
const checksum = new
|
|
22004
|
+
const checksum = new Crc32Node();
|
|
22826
22005
|
view.setUint32(0, length, false);
|
|
22827
22006
|
view.setUint32(4, headers.byteLength, false);
|
|
22828
|
-
|
|
22007
|
+
checksum.update(out.subarray(0, 8));
|
|
22008
|
+
view.setUint32(8, checksum.digestSync(), false);
|
|
22829
22009
|
out.set(headers, 12);
|
|
22830
22010
|
out.set(body, headers.byteLength + 12);
|
|
22831
|
-
|
|
22011
|
+
checksum.update(out.subarray(8, length - 4));
|
|
22012
|
+
view.setUint32(length - 4, checksum.digestSync(), false);
|
|
22832
22013
|
return out;
|
|
22833
22014
|
}
|
|
22834
22015
|
decode(message) {
|
|
@@ -23192,6 +22373,7 @@ var init_EventStreamSerdeConfig = __esm({
|
|
|
23192
22373
|
var EventStreamSerde;
|
|
23193
22374
|
var init_EventStreamSerde = __esm({
|
|
23194
22375
|
"node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js"() {
|
|
22376
|
+
init_schema();
|
|
23195
22377
|
init_serde();
|
|
23196
22378
|
EventStreamSerde = class {
|
|
23197
22379
|
marshaller;
|
|
@@ -23199,12 +22381,14 @@ var init_EventStreamSerde = __esm({
|
|
|
23199
22381
|
deserializer;
|
|
23200
22382
|
serdeContext;
|
|
23201
22383
|
defaultContentType;
|
|
23202
|
-
|
|
22384
|
+
compositeErrorRegistry;
|
|
22385
|
+
constructor({ marshaller, serializer, deserializer, serdeContext, defaultContentType, compositeErrorRegistry }) {
|
|
23203
22386
|
this.marshaller = marshaller;
|
|
23204
22387
|
this.serializer = serializer;
|
|
23205
22388
|
this.deserializer = deserializer;
|
|
23206
22389
|
this.serdeContext = serdeContext;
|
|
23207
22390
|
this.defaultContentType = defaultContentType;
|
|
22391
|
+
this.compositeErrorRegistry = compositeErrorRegistry;
|
|
23208
22392
|
}
|
|
23209
22393
|
async serializeEventStream({ eventStream, requestSchema, initialRequest }) {
|
|
23210
22394
|
const marshaller = this.marshaller;
|
|
@@ -23314,16 +22498,9 @@ var init_EventStreamSerde = __esm({
|
|
|
23314
22498
|
}
|
|
23315
22499
|
}
|
|
23316
22500
|
}
|
|
23317
|
-
|
|
23318
|
-
|
|
23319
|
-
|
|
23320
|
-
};
|
|
23321
|
-
}
|
|
23322
|
-
if (body.byteLength === 0) {
|
|
23323
|
-
return {
|
|
23324
|
-
[unionMember]: {}
|
|
23325
|
-
};
|
|
23326
|
-
}
|
|
22501
|
+
return {
|
|
22502
|
+
[unionMember]: await this.readEventMember(eventStreamSchema, body, hasBindings, out)
|
|
22503
|
+
};
|
|
23327
22504
|
}
|
|
23328
22505
|
return {
|
|
23329
22506
|
[unionMember]: await this.deserializer.read(eventStreamSchema, body)
|
|
@@ -23362,6 +22539,29 @@ var init_EventStreamSerde = __esm({
|
|
|
23362
22539
|
}
|
|
23363
22540
|
};
|
|
23364
22541
|
}
|
|
22542
|
+
async readEventMember(eventStreamSchema, body, hasBindings, out) {
|
|
22543
|
+
let ErrCtor;
|
|
22544
|
+
const staticStructuralSchema = eventStreamSchema.getSchema();
|
|
22545
|
+
if (Array.isArray(staticStructuralSchema) && staticStructuralSchema[0] === -3) {
|
|
22546
|
+
const namespace = staticStructuralSchema[1];
|
|
22547
|
+
const nsRegistry = TypeRegistry.for(namespace);
|
|
22548
|
+
this.compositeErrorRegistry?.copyFrom(nsRegistry);
|
|
22549
|
+
ErrCtor = (this.compositeErrorRegistry ?? nsRegistry)?.getErrorCtor(staticStructuralSchema);
|
|
22550
|
+
}
|
|
22551
|
+
const dataObject = hasBindings ? out : body.byteLength === 0 ? {} : await this.deserializer.read(eventStreamSchema, body);
|
|
22552
|
+
if (ErrCtor) {
|
|
22553
|
+
const message = dataObject.message ?? dataObject.Message ?? "Unknown";
|
|
22554
|
+
const metadata = {};
|
|
22555
|
+
const $fault = eventStreamSchema.getMergedTraits().error;
|
|
22556
|
+
if ($fault) {
|
|
22557
|
+
metadata.$fault = $fault;
|
|
22558
|
+
}
|
|
22559
|
+
return Object.assign(new ErrCtor({}), metadata, {
|
|
22560
|
+
message
|
|
22561
|
+
}, dataObject);
|
|
22562
|
+
}
|
|
22563
|
+
return dataObject;
|
|
22564
|
+
}
|
|
23365
22565
|
writeEventBody(unionMember, unionSchema, event) {
|
|
23366
22566
|
const serializer = this.serializer;
|
|
23367
22567
|
let eventType = unionMember;
|
|
@@ -23480,7 +22680,7 @@ var init_event_streams = __esm({
|
|
|
23480
22680
|
});
|
|
23481
22681
|
|
|
23482
22682
|
// node_modules/@smithy/eventstream-codec/dist-cjs/index.js
|
|
23483
|
-
var
|
|
22683
|
+
var require_dist_cjs2 = __commonJS({
|
|
23484
22684
|
"node_modules/@smithy/eventstream-codec/dist-cjs/index.js"(exports2) {
|
|
23485
22685
|
"use strict";
|
|
23486
22686
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -23511,7 +22711,7 @@ var require_dist_cjs5 = __commonJS({
|
|
|
23511
22711
|
});
|
|
23512
22712
|
|
|
23513
22713
|
// node_modules/@smithy/util-utf8/dist-cjs/index.js
|
|
23514
|
-
var
|
|
22714
|
+
var require_dist_cjs3 = __commonJS({
|
|
23515
22715
|
"node_modules/@smithy/util-utf8/dist-cjs/index.js"(exports2) {
|
|
23516
22716
|
"use strict";
|
|
23517
22717
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -23765,10 +22965,21 @@ var init_aws4fetch_esm = __esm({
|
|
|
23765
22965
|
});
|
|
23766
22966
|
|
|
23767
22967
|
// node_modules/@ai-sdk/amazon-bedrock/dist/index.mjs
|
|
22968
|
+
function supportsStrictTools(modelId) {
|
|
22969
|
+
return !rejectsNewerSchemaFields(modelId);
|
|
22970
|
+
}
|
|
22971
|
+
function supportsNativeStructuredOutput(modelId) {
|
|
22972
|
+
return !rejectsNewerSchemaFields(modelId);
|
|
22973
|
+
}
|
|
22974
|
+
function rejectsNewerSchemaFields(modelId) {
|
|
22975
|
+
return MODELS_REJECTING_NEWER_SCHEMA_FIELDS.some(
|
|
22976
|
+
(model) => modelId.includes(model)
|
|
22977
|
+
);
|
|
22978
|
+
}
|
|
23768
22979
|
function createBedrockEventStreamDecoder(body, processEvent) {
|
|
23769
22980
|
const codec = new import_eventstream_codec.EventStreamCodec(import_util_utf8.toUtf8, import_util_utf8.fromUtf8);
|
|
23770
22981
|
let buffer = new Uint8Array(0);
|
|
23771
|
-
const
|
|
22982
|
+
const textDecoder3 = new TextDecoder();
|
|
23772
22983
|
return body.pipeThrough(
|
|
23773
22984
|
new TransformStream({
|
|
23774
22985
|
async transform(chunk, controller) {
|
|
@@ -23792,7 +23003,7 @@ function createBedrockEventStreamDecoder(body, processEvent) {
|
|
|
23792
23003
|
buffer = buffer.slice(totalLength);
|
|
23793
23004
|
const messageType = (_a17 = decoded.headers[":message-type"]) == null ? void 0 : _a17.value;
|
|
23794
23005
|
const eventType = (_b16 = decoded.headers[":event-type"]) == null ? void 0 : _b16.value;
|
|
23795
|
-
const data2 =
|
|
23006
|
+
const data2 = textDecoder3.decode(decoded.body);
|
|
23796
23007
|
await processEvent({ messageType, eventType, data: data2 }, controller);
|
|
23797
23008
|
} catch (e) {
|
|
23798
23009
|
break;
|
|
@@ -23848,7 +23059,7 @@ async function prepareTools({
|
|
|
23848
23059
|
toolChoice: preparedAnthropicToolChoice,
|
|
23849
23060
|
toolWarnings: anthropicToolWarnings,
|
|
23850
23061
|
betas: anthropicBetas
|
|
23851
|
-
} = await (0,
|
|
23062
|
+
} = await (0, import_internal3.prepareTools)({
|
|
23852
23063
|
tools: ProviderTools,
|
|
23853
23064
|
toolChoice,
|
|
23854
23065
|
supportsStructuredOutput: false,
|
|
@@ -23862,7 +23073,7 @@ async function prepareTools({
|
|
|
23862
23073
|
};
|
|
23863
23074
|
}
|
|
23864
23075
|
for (const tool6 of ProviderTools) {
|
|
23865
|
-
const toolFactory = Object.values(
|
|
23076
|
+
const toolFactory = Object.values(import_internal3.anthropicTools).find((factory) => {
|
|
23866
23077
|
const instance = factory({});
|
|
23867
23078
|
return instance.id === tool6.id;
|
|
23868
23079
|
});
|
|
@@ -23886,12 +23097,20 @@ async function prepareTools({
|
|
|
23886
23097
|
}
|
|
23887
23098
|
}
|
|
23888
23099
|
const filteredFunctionTools = (toolChoice == null ? void 0 : toolChoice.type) === "tool" ? functionTools.filter((t) => t.name === toolChoice.toolName) : functionTools;
|
|
23100
|
+
const supportsStrictOnTools = supportsStrictTools(modelId);
|
|
23889
23101
|
for (const tool6 of filteredFunctionTools) {
|
|
23102
|
+
if (!supportsStrictOnTools && tool6.strict != null) {
|
|
23103
|
+
toolWarnings.push({
|
|
23104
|
+
type: "unsupported",
|
|
23105
|
+
feature: "strict",
|
|
23106
|
+
details: `Tool '${tool6.name}' has strict: ${tool6.strict}, but strict mode is not supported by this model on Amazon Bedrock. The strict property will be ignored.`
|
|
23107
|
+
});
|
|
23108
|
+
}
|
|
23890
23109
|
bedrockTools.push({
|
|
23891
23110
|
toolSpec: {
|
|
23892
23111
|
name: tool6.name,
|
|
23893
23112
|
...((_a17 = tool6.description) == null ? void 0 : _a17.trim()) !== "" ? { description: tool6.description } : {},
|
|
23894
|
-
...tool6.strict != null ? { strict: tool6.strict } : {},
|
|
23113
|
+
...tool6.strict != null && supportsStrictOnTools ? { strict: tool6.strict } : {},
|
|
23895
23114
|
inputSchema: {
|
|
23896
23115
|
json: tool6.inputSchema
|
|
23897
23116
|
}
|
|
@@ -23992,6 +23211,32 @@ function pushCachePoint(content, providerMetadata) {
|
|
|
23992
23211
|
content.push(cachePoint);
|
|
23993
23212
|
}
|
|
23994
23213
|
}
|
|
23214
|
+
function sanitizeToolName(toolName) {
|
|
23215
|
+
return toolName.replace(/[^a-zA-Z0-9_-]/g, "") || "_";
|
|
23216
|
+
}
|
|
23217
|
+
function getBedrockImageSource({
|
|
23218
|
+
data: data2,
|
|
23219
|
+
functionality
|
|
23220
|
+
}) {
|
|
23221
|
+
if (data2 instanceof URL) {
|
|
23222
|
+
if (data2.protocol !== "s3:") {
|
|
23223
|
+
throw new UnsupportedFunctionalityError({ functionality });
|
|
23224
|
+
}
|
|
23225
|
+
return {
|
|
23226
|
+
s3Location: {
|
|
23227
|
+
uri: data2.toString()
|
|
23228
|
+
}
|
|
23229
|
+
};
|
|
23230
|
+
}
|
|
23231
|
+
return { bytes: convertToBase64(data2) };
|
|
23232
|
+
}
|
|
23233
|
+
function getBedrockImageFormatFromUrl(url2) {
|
|
23234
|
+
var _a17;
|
|
23235
|
+
const extension = (_a17 = url2.pathname.split(".").pop()) == null ? void 0 : _a17.toLowerCase();
|
|
23236
|
+
return getBedrockImageFormat(
|
|
23237
|
+
`image/${extension === "jpg" ? "jpeg" : extension}`
|
|
23238
|
+
);
|
|
23239
|
+
}
|
|
23995
23240
|
async function shouldEnableCitations(providerMetadata) {
|
|
23996
23241
|
var _a17, _b16;
|
|
23997
23242
|
const bedrockOptions = await parseProviderOptions({
|
|
@@ -24044,19 +23289,22 @@ async function convertToBedrockChatMessages(prompt, isMistral = false) {
|
|
|
24044
23289
|
break;
|
|
24045
23290
|
}
|
|
24046
23291
|
case "file": {
|
|
24047
|
-
if (part.data instanceof URL) {
|
|
24048
|
-
throw new UnsupportedFunctionalityError({
|
|
24049
|
-
functionality: "File URL data"
|
|
24050
|
-
});
|
|
24051
|
-
}
|
|
24052
23292
|
if (part.mediaType.startsWith("image/")) {
|
|
24053
23293
|
bedrockContent.push({
|
|
24054
23294
|
image: {
|
|
24055
23295
|
format: getBedrockImageFormat(part.mediaType),
|
|
24056
|
-
source: {
|
|
23296
|
+
source: getBedrockImageSource({
|
|
23297
|
+
data: part.data,
|
|
23298
|
+
functionality: "File URL data"
|
|
23299
|
+
})
|
|
24057
23300
|
}
|
|
24058
23301
|
});
|
|
24059
23302
|
} else {
|
|
23303
|
+
if (part.data instanceof URL) {
|
|
23304
|
+
throw new UnsupportedFunctionalityError({
|
|
23305
|
+
functionality: "File URL data"
|
|
23306
|
+
});
|
|
23307
|
+
}
|
|
24060
23308
|
if (!part.mediaType) {
|
|
24061
23309
|
throw new UnsupportedFunctionalityError({
|
|
24062
23310
|
functionality: "file without mime type",
|
|
@@ -24110,6 +23358,18 @@ async function convertToBedrockChatMessages(prompt, isMistral = false) {
|
|
|
24110
23358
|
}
|
|
24111
23359
|
};
|
|
24112
23360
|
}
|
|
23361
|
+
case "image-url": {
|
|
23362
|
+
const url2 = new URL(contentPart.url);
|
|
23363
|
+
return {
|
|
23364
|
+
image: {
|
|
23365
|
+
format: getBedrockImageFormatFromUrl(url2),
|
|
23366
|
+
source: getBedrockImageSource({
|
|
23367
|
+
data: url2,
|
|
23368
|
+
functionality: `tool result image URL "${contentPart.url}"`
|
|
23369
|
+
})
|
|
23370
|
+
}
|
|
23371
|
+
};
|
|
23372
|
+
}
|
|
24113
23373
|
case "file-data": {
|
|
24114
23374
|
if (!contentPart.mediaType.startsWith("image/")) {
|
|
24115
23375
|
const enableCitations = await shouldEnableCitations(
|
|
@@ -24157,7 +23417,7 @@ async function convertToBedrockChatMessages(prompt, isMistral = false) {
|
|
|
24157
23417
|
break;
|
|
24158
23418
|
case "execution-denied":
|
|
24159
23419
|
toolResultContent = [
|
|
24160
|
-
{ text: (_a17 = output.reason) != null ? _a17 : "Tool execution denied." }
|
|
23420
|
+
{ text: (_a17 = output.reason) != null ? _a17 : "Tool call execution denied." }
|
|
24161
23421
|
];
|
|
24162
23422
|
break;
|
|
24163
23423
|
case "json":
|
|
@@ -24250,7 +23510,7 @@ async function convertToBedrockChatMessages(prompt, isMistral = false) {
|
|
|
24250
23510
|
bedrockContent.push({
|
|
24251
23511
|
toolUse: {
|
|
24252
23512
|
toolUseId: normalizeToolCallId(part.toolCallId, isMistral),
|
|
24253
|
-
name: part.toolName,
|
|
23513
|
+
name: sanitizeToolName(part.toolName),
|
|
24254
23514
|
input: part.input
|
|
24255
23515
|
}
|
|
24256
23516
|
});
|
|
@@ -24363,6 +23623,12 @@ function mapBedrockFinishReason(finishReason, isJsonResponseFromTool) {
|
|
|
24363
23623
|
return "other";
|
|
24364
23624
|
}
|
|
24365
23625
|
}
|
|
23626
|
+
function isCohereEmbeddingModel(modelId) {
|
|
23627
|
+
return modelId.includes("cohere.embed-");
|
|
23628
|
+
}
|
|
23629
|
+
function isNovaEmbeddingModel(modelId) {
|
|
23630
|
+
return modelId.startsWith("amazon.nova-") && modelId.includes("embed");
|
|
23631
|
+
}
|
|
24366
23632
|
function getBase64Data(file2) {
|
|
24367
23633
|
if (file2.type === "url") {
|
|
24368
23634
|
throw new Error(
|
|
@@ -24597,22 +23863,23 @@ Original error: ${errorMessage}`
|
|
|
24597
23863
|
provider.tools = import_internal.anthropicTools;
|
|
24598
23864
|
return provider;
|
|
24599
23865
|
}
|
|
24600
|
-
var import_internal, import_eventstream_codec, import_util_utf8,
|
|
23866
|
+
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, MODELS_REJECTING_NEWER_SCHEMA_FIELDS, BedrockErrorSchema, createBedrockEventStreamResponseHandler, bedrockReasoningMetadataSchema, BedrockChatLanguageModel, JsonObjectTextExtractor, BedrockStopReasonSchema, BedrockAdditionalModelResponseFieldsSchema, BedrockToolUseSchema, BedrockReasoningTextSchema, BedrockRedactedReasoningSchema, BedrockResponseSchema, BedrockStreamSchema, amazonBedrockEmbeddingModelOptionsSchema, BedrockEmbeddingModel, BedrockEmbeddingResponseSchema, modelMaxImagesPerCall, BedrockImageModel, bedrockImageResponseSchema, VERSION2, bedrockRerankingResponseSchema, amazonBedrockRerankingModelOptionsSchema, BedrockRerankingModel, bedrock;
|
|
24601
23867
|
var init_dist3 = __esm({
|
|
24602
23868
|
"node_modules/@ai-sdk/amazon-bedrock/dist/index.mjs"() {
|
|
24603
23869
|
import_internal = require("@ai-sdk/anthropic/internal");
|
|
24604
23870
|
init_dist2();
|
|
24605
23871
|
init_dist2();
|
|
23872
|
+
import_internal2 = require("@ai-sdk/anthropic/internal");
|
|
24606
23873
|
init_v4();
|
|
24607
23874
|
init_v4();
|
|
24608
23875
|
init_v4();
|
|
24609
23876
|
init_dist();
|
|
24610
23877
|
init_dist2();
|
|
24611
|
-
import_eventstream_codec = __toESM(
|
|
24612
|
-
import_util_utf8 = __toESM(
|
|
23878
|
+
import_eventstream_codec = __toESM(require_dist_cjs2(), 1);
|
|
23879
|
+
import_util_utf8 = __toESM(require_dist_cjs3(), 1);
|
|
24613
23880
|
init_dist();
|
|
24614
23881
|
init_dist2();
|
|
24615
|
-
|
|
23882
|
+
import_internal3 = require("@ai-sdk/anthropic/internal");
|
|
24616
23883
|
init_dist();
|
|
24617
23884
|
init_dist2();
|
|
24618
23885
|
init_v4();
|
|
@@ -24702,6 +23969,13 @@ var init_dist3 = __esm({
|
|
|
24702
23969
|
*/
|
|
24703
23970
|
serviceTier: external_exports.enum(["reserved", "priority", "default", "flex"]).optional()
|
|
24704
23971
|
});
|
|
23972
|
+
MODELS_REJECTING_NEWER_SCHEMA_FIELDS = [
|
|
23973
|
+
"claude-opus-4-7",
|
|
23974
|
+
"claude-opus-4-8",
|
|
23975
|
+
"claude-opus-5",
|
|
23976
|
+
"claude-fable-5",
|
|
23977
|
+
"claude-sonnet-5"
|
|
23978
|
+
];
|
|
24705
23979
|
BedrockErrorSchema = external_exports.object({
|
|
24706
23980
|
message: external_exports.string(),
|
|
24707
23981
|
type: external_exports.string().nullish()
|
|
@@ -24755,7 +24029,7 @@ var init_dist3 = __esm({
|
|
|
24755
24029
|
this.specificationVersion = "v3";
|
|
24756
24030
|
this.provider = "amazon-bedrock";
|
|
24757
24031
|
this.supportedUrls = {
|
|
24758
|
-
|
|
24032
|
+
"image/*": [/^s3:\/\//]
|
|
24759
24033
|
};
|
|
24760
24034
|
}
|
|
24761
24035
|
async getArgs({
|
|
@@ -24822,8 +24096,10 @@ var init_dist3 = __esm({
|
|
|
24822
24096
|
}
|
|
24823
24097
|
const isAnthropicModel = this.modelId.includes("anthropic");
|
|
24824
24098
|
const isThinkingEnabled = ((_b16 = bedrockOptions.reasoningConfig) == null ? void 0 : _b16.type) === "enabled" || ((_c = bedrockOptions.reasoningConfig) == null ? void 0 : _c.type) === "adaptive";
|
|
24825
|
-
const
|
|
24826
|
-
const
|
|
24099
|
+
const { supportsStructuredOutput: modelSupportsStructuredOutput } = (0, import_internal2.getModelCapabilities)(this.modelId);
|
|
24100
|
+
const useNativeStructuredOutput = isAnthropicModel && supportsNativeStructuredOutput(this.modelId) && (modelSupportsStructuredOutput || isThinkingEnabled) && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null;
|
|
24101
|
+
const useJsonInstructionForStructuredOutput = isAnthropicModel && !supportsStrictTools(this.modelId) && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null && tools2 != null && tools2.length > 0;
|
|
24102
|
+
const jsonResponseTool = (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null && !useNativeStructuredOutput && !useJsonInstructionForStructuredOutput ? {
|
|
24827
24103
|
type: "function",
|
|
24828
24104
|
name: "json",
|
|
24829
24105
|
description: "Respond with a JSON object.",
|
|
@@ -24933,7 +24209,7 @@ var init_dist3 = __esm({
|
|
|
24933
24209
|
...(_k = bedrockOptions.additionalModelRequestFields) == null ? void 0 : _k.output_config,
|
|
24934
24210
|
format: {
|
|
24935
24211
|
type: "json_schema",
|
|
24936
|
-
schema: responseFormat.schema
|
|
24212
|
+
schema: (0, import_internal2.sanitizeJsonSchema)(responseFormat.schema)
|
|
24937
24213
|
}
|
|
24938
24214
|
}
|
|
24939
24215
|
};
|
|
@@ -24988,6 +24264,13 @@ var init_dist3 = __esm({
|
|
|
24988
24264
|
});
|
|
24989
24265
|
}
|
|
24990
24266
|
}
|
|
24267
|
+
if (useJsonInstructionForStructuredOutput) {
|
|
24268
|
+
filteredPrompt = injectJsonInstructionIntoMessages({
|
|
24269
|
+
messages: filteredPrompt,
|
|
24270
|
+
schema: responseFormat.schema,
|
|
24271
|
+
schemaSuffix: "You MUST answer with only a JSON object that matches the JSON schema above. Do not wrap it in markdown fences or include any other text."
|
|
24272
|
+
});
|
|
24273
|
+
}
|
|
24991
24274
|
const isMistral = isMistralModel(this.modelId);
|
|
24992
24275
|
const { system, messages } = await convertToBedrockChatMessages(
|
|
24993
24276
|
filteredPrompt,
|
|
@@ -25020,6 +24303,7 @@ var init_dist3 = __esm({
|
|
|
25020
24303
|
...toolConfig.tools !== void 0 && toolConfig.tools.length > 0 ? { toolConfig } : {}
|
|
25021
24304
|
},
|
|
25022
24305
|
warnings,
|
|
24306
|
+
usesJsonInstruction: useJsonInstructionForStructuredOutput,
|
|
25023
24307
|
usesJsonResponseTool: jsonResponseTool != null,
|
|
25024
24308
|
betas
|
|
25025
24309
|
};
|
|
@@ -25030,10 +24314,11 @@ var init_dist3 = __esm({
|
|
|
25030
24314
|
return combineHeaders(await resolve(this.config.headers), headers);
|
|
25031
24315
|
}
|
|
25032
24316
|
async doGenerate(options) {
|
|
25033
|
-
var _a17, _b16, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
24317
|
+
var _a17, _b16, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
|
25034
24318
|
const {
|
|
25035
24319
|
command: args,
|
|
25036
24320
|
warnings,
|
|
24321
|
+
usesJsonInstruction,
|
|
25037
24322
|
usesJsonResponseTool
|
|
25038
24323
|
} = await this.getArgs(options);
|
|
25039
24324
|
const url2 = `${this.getUrl(this.modelId)}/converse`;
|
|
@@ -25056,9 +24341,13 @@ var init_dist3 = __esm({
|
|
|
25056
24341
|
});
|
|
25057
24342
|
const content = [];
|
|
25058
24343
|
let isJsonResponseFromTool = false;
|
|
24344
|
+
const jsonObjectTextExtractor = usesJsonInstruction ? new JsonObjectTextExtractor() : void 0;
|
|
25059
24345
|
for (const part of response.output.message.content) {
|
|
25060
24346
|
if (part.text != null) {
|
|
25061
|
-
content.push({
|
|
24347
|
+
content.push({
|
|
24348
|
+
type: "text",
|
|
24349
|
+
text: (_a17 = jsonObjectTextExtractor == null ? void 0 : jsonObjectTextExtractor.process(part.text)) != null ? _a17 : part.text
|
|
24350
|
+
});
|
|
25062
24351
|
}
|
|
25063
24352
|
if (part.reasoningContent) {
|
|
25064
24353
|
if ("reasoningText" in part.reasoningContent) {
|
|
@@ -25080,7 +24369,7 @@ var init_dist3 = __esm({
|
|
|
25080
24369
|
text: "",
|
|
25081
24370
|
providerMetadata: {
|
|
25082
24371
|
bedrock: {
|
|
25083
|
-
redactedData: (
|
|
24372
|
+
redactedData: (_b16 = part.reasoningContent.redactedReasoning.data) != null ? _b16 : ""
|
|
25084
24373
|
}
|
|
25085
24374
|
}
|
|
25086
24375
|
});
|
|
@@ -25096,17 +24385,17 @@ var init_dist3 = __esm({
|
|
|
25096
24385
|
});
|
|
25097
24386
|
} else {
|
|
25098
24387
|
const isMistral = isMistralModel(this.modelId);
|
|
25099
|
-
const rawToolCallId = (
|
|
24388
|
+
const rawToolCallId = (_d = (_c = part.toolUse) == null ? void 0 : _c.toolUseId) != null ? _d : this.config.generateId();
|
|
25100
24389
|
content.push({
|
|
25101
24390
|
type: "tool-call",
|
|
25102
24391
|
toolCallId: normalizeToolCallId(rawToolCallId, isMistral),
|
|
25103
|
-
toolName: (
|
|
25104
|
-
input: JSON.stringify((
|
|
24392
|
+
toolName: (_f = (_e = part.toolUse) == null ? void 0 : _e.name) != null ? _f : `tool-${this.config.generateId()}`,
|
|
24393
|
+
input: JSON.stringify((_h = (_g = part.toolUse) == null ? void 0 : _g.input) != null ? _h : {})
|
|
25105
24394
|
});
|
|
25106
24395
|
}
|
|
25107
24396
|
}
|
|
25108
24397
|
}
|
|
25109
|
-
const stopSequence = (
|
|
24398
|
+
const stopSequence = (_k = (_j = (_i = response.additionalModelResponseFields) == null ? void 0 : _i.delta) == null ? void 0 : _j.stop_sequence) != null ? _k : null;
|
|
25110
24399
|
const providerMetadata = response.trace || response.usage || response.performanceConfig || response.serviceTier || isJsonResponseFromTool || stopSequence ? {
|
|
25111
24400
|
bedrock: {
|
|
25112
24401
|
...response.trace && typeof response.trace === "object" ? { trace: response.trace } : {},
|
|
@@ -25116,7 +24405,7 @@ var init_dist3 = __esm({
|
|
|
25116
24405
|
...response.serviceTier && {
|
|
25117
24406
|
serviceTier: response.serviceTier
|
|
25118
24407
|
},
|
|
25119
|
-
...(((
|
|
24408
|
+
...(((_l = response.usage) == null ? void 0 : _l.cacheWriteInputTokens) != null || ((_m = response.usage) == null ? void 0 : _m.cacheDetails) != null) && {
|
|
25120
24409
|
usage: {
|
|
25121
24410
|
...response.usage.cacheWriteInputTokens != null && {
|
|
25122
24411
|
cacheWriteInputTokens: response.usage.cacheWriteInputTokens
|
|
@@ -25137,16 +24426,17 @@ var init_dist3 = __esm({
|
|
|
25137
24426
|
response.stopReason,
|
|
25138
24427
|
isJsonResponseFromTool
|
|
25139
24428
|
),
|
|
25140
|
-
raw: (
|
|
24429
|
+
raw: (_n = response.stopReason) != null ? _n : void 0
|
|
25141
24430
|
},
|
|
25142
24431
|
usage: convertBedrockUsage(response.usage),
|
|
25143
24432
|
response: {
|
|
25144
|
-
id: (
|
|
24433
|
+
id: (_o = responseHeaders == null ? void 0 : responseHeaders["x-amzn-requestid"]) != null ? _o : void 0,
|
|
25145
24434
|
timestamp: (responseHeaders == null ? void 0 : responseHeaders["date"]) != null ? new Date(responseHeaders["date"]) : void 0,
|
|
25146
24435
|
modelId: this.modelId,
|
|
25147
24436
|
headers: responseHeaders
|
|
25148
24437
|
},
|
|
25149
24438
|
warnings,
|
|
24439
|
+
request: { body: args },
|
|
25150
24440
|
...providerMetadata && { providerMetadata }
|
|
25151
24441
|
};
|
|
25152
24442
|
}
|
|
@@ -25154,6 +24444,7 @@ var init_dist3 = __esm({
|
|
|
25154
24444
|
const {
|
|
25155
24445
|
command: args,
|
|
25156
24446
|
warnings,
|
|
24447
|
+
usesJsonInstruction,
|
|
25157
24448
|
usesJsonResponseTool
|
|
25158
24449
|
} = await this.getArgs(options);
|
|
25159
24450
|
const modelId = this.modelId;
|
|
@@ -25179,6 +24470,7 @@ var init_dist3 = __esm({
|
|
|
25179
24470
|
let providerMetadata = void 0;
|
|
25180
24471
|
let isJsonResponseFromTool = false;
|
|
25181
24472
|
let stopSequence = null;
|
|
24473
|
+
const jsonObjectTextExtractor = usesJsonInstruction ? new JsonObjectTextExtractor() : void 0;
|
|
25182
24474
|
const contentBlocks = {};
|
|
25183
24475
|
return {
|
|
25184
24476
|
stream: response.pipeThrough(
|
|
@@ -25194,7 +24486,7 @@ var init_dist3 = __esm({
|
|
|
25194
24486
|
});
|
|
25195
24487
|
},
|
|
25196
24488
|
transform(chunk, controller) {
|
|
25197
|
-
var _a17, _b16, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
|
|
24489
|
+
var _a17, _b16, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
|
|
25198
24490
|
function enqueueError(bedrockError) {
|
|
25199
24491
|
finishReason = { unified: "error", raw: void 0 };
|
|
25200
24492
|
controller.enqueue({ type: "error", error: bedrockError });
|
|
@@ -25282,13 +24574,18 @@ var init_dist3 = __esm({
|
|
|
25282
24574
|
id: String(blockIndex)
|
|
25283
24575
|
});
|
|
25284
24576
|
}
|
|
25285
|
-
|
|
25286
|
-
|
|
25287
|
-
|
|
25288
|
-
|
|
25289
|
-
|
|
24577
|
+
const textDelta = (_m = jsonObjectTextExtractor == null ? void 0 : jsonObjectTextExtractor.process(
|
|
24578
|
+
value.contentBlockDelta.delta.text
|
|
24579
|
+
)) != null ? _m : value.contentBlockDelta.delta.text;
|
|
24580
|
+
if (textDelta.length > 0) {
|
|
24581
|
+
controller.enqueue({
|
|
24582
|
+
type: "text-delta",
|
|
24583
|
+
id: String(blockIndex),
|
|
24584
|
+
delta: textDelta
|
|
24585
|
+
});
|
|
24586
|
+
}
|
|
25290
24587
|
}
|
|
25291
|
-
if (((
|
|
24588
|
+
if (((_n = value.contentBlockStop) == null ? void 0 : _n.contentBlockIndex) != null) {
|
|
25292
24589
|
const blockIndex = value.contentBlockStop.contentBlockIndex;
|
|
25293
24590
|
const contentBlock = contentBlocks[blockIndex];
|
|
25294
24591
|
if (contentBlock != null) {
|
|
@@ -25334,7 +24631,7 @@ var init_dist3 = __esm({
|
|
|
25334
24631
|
delete contentBlocks[blockIndex];
|
|
25335
24632
|
}
|
|
25336
24633
|
}
|
|
25337
|
-
if (((
|
|
24634
|
+
if (((_o = value.contentBlockDelta) == null ? void 0 : _o.delta) && "reasoningContent" in value.contentBlockDelta.delta && value.contentBlockDelta.delta.reasoningContent) {
|
|
25338
24635
|
const blockIndex = value.contentBlockDelta.contentBlockIndex || 0;
|
|
25339
24636
|
const reasoningContent = value.contentBlockDelta.delta.reasoningContent;
|
|
25340
24637
|
if ("text" in reasoningContent && reasoningContent.text) {
|
|
@@ -25389,7 +24686,7 @@ var init_dist3 = __esm({
|
|
|
25389
24686
|
}
|
|
25390
24687
|
}
|
|
25391
24688
|
const contentBlockStart = value.contentBlockStart;
|
|
25392
|
-
if (((
|
|
24689
|
+
if (((_p = contentBlockStart == null ? void 0 : contentBlockStart.start) == null ? void 0 : _p.toolUse) != null) {
|
|
25393
24690
|
const toolUse = contentBlockStart.start.toolUse;
|
|
25394
24691
|
const blockIndex = contentBlockStart.contentBlockIndex;
|
|
25395
24692
|
const isJsonResponseTool = usesJsonResponseTool && toolUse.name === "json";
|
|
@@ -25417,7 +24714,7 @@ var init_dist3 = __esm({
|
|
|
25417
24714
|
const blockIndex = contentBlockDelta.contentBlockIndex;
|
|
25418
24715
|
const contentBlock = contentBlocks[blockIndex];
|
|
25419
24716
|
if ((contentBlock == null ? void 0 : contentBlock.type) === "tool-call") {
|
|
25420
|
-
const delta = (
|
|
24717
|
+
const delta = (_q = contentBlockDelta.delta.toolUse.input) != null ? _q : "";
|
|
25421
24718
|
if (!contentBlock.isJsonResponseTool) {
|
|
25422
24719
|
controller.enqueue({
|
|
25423
24720
|
type: "tool-input-delta",
|
|
@@ -25459,13 +24756,63 @@ var init_dist3 = __esm({
|
|
|
25459
24756
|
}
|
|
25460
24757
|
})
|
|
25461
24758
|
),
|
|
25462
|
-
|
|
24759
|
+
request: { body: args },
|
|
25463
24760
|
response: { headers: responseHeaders }
|
|
25464
24761
|
};
|
|
25465
24762
|
}
|
|
25466
24763
|
getUrl(modelId) {
|
|
25467
|
-
|
|
25468
|
-
|
|
24764
|
+
return `${this.config.baseUrl()}/model/${encodeURIComponent(modelId)}`;
|
|
24765
|
+
}
|
|
24766
|
+
};
|
|
24767
|
+
JsonObjectTextExtractor = class {
|
|
24768
|
+
constructor() {
|
|
24769
|
+
this.started = false;
|
|
24770
|
+
this.completed = false;
|
|
24771
|
+
this.depth = 0;
|
|
24772
|
+
this.inString = false;
|
|
24773
|
+
this.escaped = false;
|
|
24774
|
+
}
|
|
24775
|
+
process(text) {
|
|
24776
|
+
let result = "";
|
|
24777
|
+
for (const character of text) {
|
|
24778
|
+
if (this.completed) {
|
|
24779
|
+
break;
|
|
24780
|
+
}
|
|
24781
|
+
if (!this.started) {
|
|
24782
|
+
if (character !== "{") {
|
|
24783
|
+
continue;
|
|
24784
|
+
}
|
|
24785
|
+
this.started = true;
|
|
24786
|
+
this.depth = 1;
|
|
24787
|
+
result += character;
|
|
24788
|
+
continue;
|
|
24789
|
+
}
|
|
24790
|
+
result += character;
|
|
24791
|
+
if (this.escaped) {
|
|
24792
|
+
this.escaped = false;
|
|
24793
|
+
continue;
|
|
24794
|
+
}
|
|
24795
|
+
if (character === "\\" && this.inString) {
|
|
24796
|
+
this.escaped = true;
|
|
24797
|
+
continue;
|
|
24798
|
+
}
|
|
24799
|
+
if (character === '"') {
|
|
24800
|
+
this.inString = !this.inString;
|
|
24801
|
+
continue;
|
|
24802
|
+
}
|
|
24803
|
+
if (this.inString) {
|
|
24804
|
+
continue;
|
|
24805
|
+
}
|
|
24806
|
+
if (character === "{") {
|
|
24807
|
+
this.depth++;
|
|
24808
|
+
} else if (character === "}") {
|
|
24809
|
+
this.depth--;
|
|
24810
|
+
if (this.depth === 0) {
|
|
24811
|
+
this.completed = true;
|
|
24812
|
+
}
|
|
24813
|
+
}
|
|
24814
|
+
}
|
|
24815
|
+
return result;
|
|
25469
24816
|
}
|
|
25470
24817
|
};
|
|
25471
24818
|
BedrockStopReasonSchema = external_exports.union([
|
|
@@ -25630,9 +24977,11 @@ var init_dist3 = __esm({
|
|
|
25630
24977
|
this.config = config2;
|
|
25631
24978
|
this.specificationVersion = "v3";
|
|
25632
24979
|
this.provider = "amazon-bedrock";
|
|
25633
|
-
this.maxEmbeddingsPerCall = 1;
|
|
25634
24980
|
this.supportsParallelCalls = true;
|
|
25635
24981
|
}
|
|
24982
|
+
get maxEmbeddingsPerCall() {
|
|
24983
|
+
return isCohereEmbeddingModel(this.modelId) ? 96 : 1;
|
|
24984
|
+
}
|
|
25636
24985
|
getUrl(modelId) {
|
|
25637
24986
|
const encodedModelId = encodeURIComponent(modelId);
|
|
25638
24987
|
return `${this.config.baseUrl()}/model/${encodedModelId}/invoke`;
|
|
@@ -25657,8 +25006,8 @@ var init_dist3 = __esm({
|
|
|
25657
25006
|
providerOptions,
|
|
25658
25007
|
schema: amazonBedrockEmbeddingModelOptionsSchema
|
|
25659
25008
|
})) != null ? _a17 : {};
|
|
25660
|
-
const isNovaModel =
|
|
25661
|
-
const isCohereModel = this.modelId
|
|
25009
|
+
const isNovaModel = isNovaEmbeddingModel(this.modelId);
|
|
25010
|
+
const isCohereModel = isCohereEmbeddingModel(this.modelId);
|
|
25662
25011
|
const args = isNovaModel ? {
|
|
25663
25012
|
taskType: "SINGLE_EMBEDDING",
|
|
25664
25013
|
singleEmbeddingParams: {
|
|
@@ -25673,7 +25022,7 @@ var init_dist3 = __esm({
|
|
|
25673
25022
|
// Cohere embedding models on Bedrock require `input_type`.
|
|
25674
25023
|
// Without it, the service attempts other schema branches and rejects the request.
|
|
25675
25024
|
input_type: (_e = bedrockOptions.inputType) != null ? _e : "search_query",
|
|
25676
|
-
texts:
|
|
25025
|
+
texts: values2,
|
|
25677
25026
|
truncate: bedrockOptions.truncate,
|
|
25678
25027
|
output_dimension: bedrockOptions.outputDimension
|
|
25679
25028
|
} : {
|
|
@@ -25698,25 +25047,25 @@ var init_dist3 = __esm({
|
|
|
25698
25047
|
fetch: this.config.fetch,
|
|
25699
25048
|
abortSignal
|
|
25700
25049
|
});
|
|
25701
|
-
let
|
|
25050
|
+
let embeddings;
|
|
25702
25051
|
if ("embedding" in response) {
|
|
25703
|
-
|
|
25052
|
+
embeddings = [response.embedding];
|
|
25704
25053
|
} else if (Array.isArray(response.embeddings)) {
|
|
25705
25054
|
const firstEmbedding = response.embeddings[0];
|
|
25706
25055
|
if (typeof firstEmbedding === "object" && firstEmbedding !== null && "embeddingType" in firstEmbedding) {
|
|
25707
|
-
|
|
25056
|
+
embeddings = [firstEmbedding.embedding];
|
|
25708
25057
|
} else {
|
|
25709
|
-
|
|
25058
|
+
embeddings = response.embeddings;
|
|
25710
25059
|
}
|
|
25711
25060
|
} else {
|
|
25712
|
-
|
|
25061
|
+
embeddings = response.embeddings.float;
|
|
25713
25062
|
}
|
|
25714
25063
|
const headerTokenCount = Number(
|
|
25715
25064
|
responseHeaders == null ? void 0 : responseHeaders["x-amzn-bedrock-input-token-count"]
|
|
25716
25065
|
);
|
|
25717
25066
|
const tokens = "inputTextTokenCount" in response ? response.inputTextTokenCount : "inputTokenCount" in response ? (_f = response.inputTokenCount) != null ? _f : 0 : headerTokenCount;
|
|
25718
25067
|
return {
|
|
25719
|
-
embeddings
|
|
25068
|
+
embeddings,
|
|
25720
25069
|
usage: { tokens },
|
|
25721
25070
|
warnings: []
|
|
25722
25071
|
};
|
|
@@ -25937,7 +25286,7 @@ var init_dist3 = __esm({
|
|
|
25937
25286
|
details: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
25938
25287
|
preview: external_exports.unknown().optional()
|
|
25939
25288
|
});
|
|
25940
|
-
VERSION2 = true ? "4.0.
|
|
25289
|
+
VERSION2 = true ? "4.0.145" : "0.0.0-test";
|
|
25941
25290
|
bedrockRerankingResponseSchema = lazySchema(
|
|
25942
25291
|
() => zodSchema(
|
|
25943
25292
|
external_exports.object({
|
|
@@ -26242,7 +25591,7 @@ function tryConvertToString(arr) {
|
|
|
26242
25591
|
if (!isValidUTF8(arr)) {
|
|
26243
25592
|
return void 0;
|
|
26244
25593
|
}
|
|
26245
|
-
return
|
|
25594
|
+
return textDecoder2.decode(arr);
|
|
26246
25595
|
}
|
|
26247
25596
|
function compareUint8Arrays(a, b) {
|
|
26248
25597
|
const len = Math.min(a.length, b.length);
|
|
@@ -26253,13 +25602,13 @@ function compareUint8Arrays(a, b) {
|
|
|
26253
25602
|
}
|
|
26254
25603
|
return a.length - b.length;
|
|
26255
25604
|
}
|
|
26256
|
-
var isAscii, HIGH_SURROGATE_START, HIGH_SURROGATE_END,
|
|
25605
|
+
var isAscii, HIGH_SURROGATE_START, HIGH_SURROGATE_END, textDecoder2;
|
|
26257
25606
|
var init_utfUtil = __esm({
|
|
26258
25607
|
"node_modules/gpt-tokenizer/esm/utfUtil.js"() {
|
|
26259
25608
|
isAscii = (codePoint) => codePoint <= 127;
|
|
26260
25609
|
HIGH_SURROGATE_START = 55296;
|
|
26261
25610
|
HIGH_SURROGATE_END = 56319;
|
|
26262
|
-
|
|
25611
|
+
textDecoder2 = new TextDecoder("utf8", { fatal: false });
|
|
26263
25612
|
}
|
|
26264
25613
|
});
|
|
26265
25614
|
|
|
@@ -37095,16 +36444,38 @@ var require_executor = __commonJS({
|
|
|
37095
36444
|
});
|
|
37096
36445
|
addOps(39, (exec6, done, ticks, a, b, obj, context, scope, bobj, inLoopOrSwitch) => {
|
|
37097
36446
|
const [exception, catchBody, finallyBody] = b;
|
|
37098
|
-
executeTreeWithDone(exec6, (
|
|
37099
|
-
|
|
37100
|
-
|
|
37101
|
-
|
|
37102
|
-
|
|
37103
|
-
|
|
36447
|
+
executeTreeWithDone(exec6, (tryErr, tryRes) => {
|
|
36448
|
+
const afterTryCatch = (resultErr, resultRes) => {
|
|
36449
|
+
executeTreeWithDone(exec6, (finallyErr) => {
|
|
36450
|
+
if (finallyErr)
|
|
36451
|
+
done(finallyErr);
|
|
36452
|
+
else if (resultErr)
|
|
36453
|
+
done(resultErr);
|
|
36454
|
+
else if (resultRes instanceof ExecReturn && (resultRes.returned || resultRes.breakLoop || resultRes.continueLoop)) {
|
|
36455
|
+
done(void 0, resultRes);
|
|
36456
|
+
} else {
|
|
36457
|
+
done();
|
|
36458
|
+
}
|
|
36459
|
+
}, ticks, context, finallyBody, [new utils.Scope(scope, {})]);
|
|
36460
|
+
};
|
|
36461
|
+
if (tryErr) {
|
|
36462
|
+
if (catchBody) {
|
|
36463
|
+
const sc = {};
|
|
36464
|
+
if (exception)
|
|
36465
|
+
sc[exception] = tryErr;
|
|
36466
|
+
executeTreeWithDone(exec6, (catchErr, catchRes) => {
|
|
36467
|
+
if (catchErr) {
|
|
36468
|
+
afterTryCatch(catchErr, void 0);
|
|
36469
|
+
} else {
|
|
36470
|
+
afterTryCatch(void 0, catchRes);
|
|
36471
|
+
}
|
|
36472
|
+
}, ticks, context, catchBody, [new utils.Scope(scope, sc)], inLoopOrSwitch);
|
|
37104
36473
|
} else {
|
|
37105
|
-
|
|
36474
|
+
afterTryCatch(tryErr, void 0);
|
|
37106
36475
|
}
|
|
37107
|
-
}
|
|
36476
|
+
} else {
|
|
36477
|
+
afterTryCatch(void 0, tryRes);
|
|
36478
|
+
}
|
|
37108
36479
|
}, ticks, context, a, [new utils.Scope(scope)], inLoopOrSwitch);
|
|
37109
36480
|
});
|
|
37110
36481
|
addOps(88, (exec6, done) => {
|
|
@@ -38493,7 +37864,7 @@ var require_parser = __commonJS({
|
|
|
38493
37864
|
let offset2 = 0;
|
|
38494
37865
|
if (catchRes[1].startsWith("catch")) {
|
|
38495
37866
|
catchRes = catchReg.exec(part.substring(res[0].length + body.length + 1).toString());
|
|
38496
|
-
exception = catchRes[
|
|
37867
|
+
exception = catchRes[3] || "";
|
|
38497
37868
|
catchBody = restOfExp(constants, part.substring(res[0].length + body.length + 1 + catchRes[0].length), [], "{");
|
|
38498
37869
|
offset2 = res[0].length + body.length + 1 + catchRes[0].length + catchBody.length + 1;
|
|
38499
37870
|
if ((catchRes = catchReg.exec(part.substring(offset2).toString())) && catchRes[1].startsWith("finally")) {
|
|
@@ -38504,7 +37875,7 @@ var require_parser = __commonJS({
|
|
|
38504
37875
|
}
|
|
38505
37876
|
const b = [
|
|
38506
37877
|
exception,
|
|
38507
|
-
lispifyBlock(insertSemicolons(constants, catchBody || emptyString), constants),
|
|
37878
|
+
catchBody !== void 0 ? lispifyBlock(insertSemicolons(constants, catchBody || emptyString), constants) : null,
|
|
38508
37879
|
lispifyBlock(insertSemicolons(constants, finallyBody || emptyString), constants)
|
|
38509
37880
|
];
|
|
38510
37881
|
ctx.lispTree = createLisp({
|
|
@@ -39726,6 +39097,11 @@ var init_acorn = __esm({
|
|
|
39726
39097
|
// line being 1-based and column 0-based) will be attached to the
|
|
39727
39098
|
// nodes.
|
|
39728
39099
|
locations: false,
|
|
39100
|
+
// Pass an optional `{line, column}` object to use for the start of
|
|
39101
|
+
// the parse. This is mostly useful when using `parseExpressionAt`
|
|
39102
|
+
// with `locations: true`, to prevent the parser from having to
|
|
39103
|
+
// determine the line position at the start position.
|
|
39104
|
+
startLocation: null,
|
|
39729
39105
|
// A function can be passed as `onToken` option, which will
|
|
39730
39106
|
// cause Acorn to call that function with object in the same
|
|
39731
39107
|
// format as tokens returned from `tokenizer().getToken()`. Note
|
|
@@ -39806,13 +39182,18 @@ var init_acorn = __esm({
|
|
|
39806
39182
|
this.reservedWordsStrictBind = wordsRegexp(reservedStrict + " " + reservedWords.strictBind);
|
|
39807
39183
|
this.input = String(input);
|
|
39808
39184
|
this.containsEsc = false;
|
|
39809
|
-
|
|
39810
|
-
|
|
39185
|
+
this.pos = startPos || 0;
|
|
39186
|
+
this.curLine = 1;
|
|
39187
|
+
if (options.startLocation) {
|
|
39188
|
+
this.lineStart = this.pos - options.startLocation.column;
|
|
39189
|
+
this.curLine = options.startLocation.line;
|
|
39190
|
+
} else if (startPos) {
|
|
39811
39191
|
this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1;
|
|
39812
|
-
|
|
39192
|
+
if (this.options.locations) {
|
|
39193
|
+
this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length;
|
|
39194
|
+
}
|
|
39813
39195
|
} else {
|
|
39814
|
-
this.
|
|
39815
|
-
this.curLine = 1;
|
|
39196
|
+
this.lineStart = 0;
|
|
39816
39197
|
}
|
|
39817
39198
|
this.type = types$1.eof;
|
|
39818
39199
|
this.value = null;
|
|
@@ -41831,7 +41212,7 @@ var init_acorn = __esm({
|
|
|
41831
41212
|
expr = this.finishNode(node$1, "UpdateExpression");
|
|
41832
41213
|
}
|
|
41833
41214
|
}
|
|
41834
|
-
if (!incDec && this.eat(types$1.starstar)) {
|
|
41215
|
+
if (!incDec && !(expr.type === "ArrowFunctionExpression" && expr.start === startPos) && this.eat(types$1.starstar)) {
|
|
41835
41216
|
if (sawUnary) {
|
|
41836
41217
|
this.unexpected(this.lastTokStart);
|
|
41837
41218
|
} else {
|
|
@@ -44884,7 +44265,7 @@ var init_acorn = __esm({
|
|
|
44884
44265
|
}
|
|
44885
44266
|
return this.finishToken(type, word);
|
|
44886
44267
|
};
|
|
44887
|
-
version2 = "8.
|
|
44268
|
+
version2 = "8.18.0";
|
|
44888
44269
|
Parser.acorn = {
|
|
44889
44270
|
Parser,
|
|
44890
44271
|
version: version2,
|
|
@@ -46122,6 +45503,8 @@ var require_brace_expansion = __commonJS({
|
|
|
46122
45503
|
var escClose = "\0CLOSE" + Math.random() + "\0";
|
|
46123
45504
|
var escComma = "\0COMMA" + Math.random() + "\0";
|
|
46124
45505
|
var escPeriod = "\0PERIOD" + Math.random() + "\0";
|
|
45506
|
+
var EXPANSION_MAX = 1e5;
|
|
45507
|
+
var EXPANSION_MAX_LENGTH = 4e6;
|
|
46125
45508
|
function numeric(str) {
|
|
46126
45509
|
return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
|
|
46127
45510
|
}
|
|
@@ -46155,11 +45538,12 @@ var require_brace_expansion = __commonJS({
|
|
|
46155
45538
|
if (!str)
|
|
46156
45539
|
return [];
|
|
46157
45540
|
options = options || {};
|
|
46158
|
-
var max = options.max == null ?
|
|
45541
|
+
var max = options.max == null ? EXPANSION_MAX : options.max;
|
|
45542
|
+
var maxLength = options.maxLength == null ? EXPANSION_MAX_LENGTH : options.maxLength;
|
|
46159
45543
|
if (str.substr(0, 2) === "{}") {
|
|
46160
45544
|
str = "\\{\\}" + str.substr(2);
|
|
46161
45545
|
}
|
|
46162
|
-
return expand2(escapeBraces(str), max, true).map(unescapeBraces);
|
|
45546
|
+
return expand2(escapeBraces(str), max, maxLength, true).map(unescapeBraces);
|
|
46163
45547
|
}
|
|
46164
45548
|
function embrace(str) {
|
|
46165
45549
|
return "{" + str + "}";
|
|
@@ -46173,18 +45557,90 @@ var require_brace_expansion = __commonJS({
|
|
|
46173
45557
|
function gte(i, y) {
|
|
46174
45558
|
return i >= y;
|
|
46175
45559
|
}
|
|
46176
|
-
function
|
|
46177
|
-
var
|
|
46178
|
-
var
|
|
46179
|
-
|
|
46180
|
-
|
|
46181
|
-
|
|
46182
|
-
|
|
46183
|
-
|
|
46184
|
-
|
|
46185
|
-
|
|
45560
|
+
function combine(acc, pre, values2, max, maxLength, dropEmpties) {
|
|
45561
|
+
var out = [];
|
|
45562
|
+
var length = 0;
|
|
45563
|
+
for (var a = 0; a < acc.length; a++) {
|
|
45564
|
+
for (var v = 0; v < values2.length; v++) {
|
|
45565
|
+
if (out.length >= max) return out;
|
|
45566
|
+
var expansion = acc[a] + pre + values2[v];
|
|
45567
|
+
if (dropEmpties && !expansion) continue;
|
|
45568
|
+
if (length + expansion.length > maxLength) return out;
|
|
45569
|
+
out.push(expansion);
|
|
45570
|
+
length += expansion.length;
|
|
45571
|
+
}
|
|
45572
|
+
}
|
|
45573
|
+
return out;
|
|
45574
|
+
}
|
|
45575
|
+
function expandSequence(body, isAlphaSequence, max, maxLength) {
|
|
45576
|
+
var n = body.split(/\.\./);
|
|
45577
|
+
var N = [];
|
|
45578
|
+
if (n[0] === void 0 || n[1] === void 0) {
|
|
45579
|
+
return N;
|
|
45580
|
+
}
|
|
45581
|
+
var x = numeric(n[0]);
|
|
45582
|
+
var y = numeric(n[1]);
|
|
45583
|
+
var width = Math.max(n[0].length, n[1].length);
|
|
45584
|
+
var incr = n.length === 3 && n[2] !== void 0 ? Math.max(Math.abs(numeric(n[2])), 1) : 1;
|
|
45585
|
+
var test = lte;
|
|
45586
|
+
var reverse = y < x;
|
|
45587
|
+
if (reverse) {
|
|
45588
|
+
incr *= -1;
|
|
45589
|
+
test = gte;
|
|
45590
|
+
}
|
|
45591
|
+
var pad = n.some(isPadded);
|
|
45592
|
+
var length = 0;
|
|
45593
|
+
for (var i = x; test(i, y) && N.length < max; i += incr) {
|
|
45594
|
+
var c;
|
|
45595
|
+
if (isAlphaSequence) {
|
|
45596
|
+
c = String.fromCharCode(i);
|
|
45597
|
+
if (c === "\\") {
|
|
45598
|
+
c = "";
|
|
45599
|
+
}
|
|
45600
|
+
} else {
|
|
45601
|
+
c = String(i);
|
|
45602
|
+
if (pad) {
|
|
45603
|
+
var need = width - c.length;
|
|
45604
|
+
if (need > 0) {
|
|
45605
|
+
var z = new Array(need + 1).join("0");
|
|
45606
|
+
if (i < 0) {
|
|
45607
|
+
c = "-" + z + c.slice(1);
|
|
45608
|
+
} else {
|
|
45609
|
+
c = z + c;
|
|
45610
|
+
}
|
|
45611
|
+
}
|
|
45612
|
+
}
|
|
45613
|
+
}
|
|
45614
|
+
if (length + c.length > maxLength) break;
|
|
45615
|
+
N.push(c);
|
|
45616
|
+
length += c.length;
|
|
45617
|
+
}
|
|
45618
|
+
return N;
|
|
45619
|
+
}
|
|
45620
|
+
function expand2(str, max, maxLength, isTop) {
|
|
45621
|
+
var acc = [""];
|
|
45622
|
+
var dropEmpties = false;
|
|
45623
|
+
var firstGroup = true;
|
|
45624
|
+
for (; ; ) {
|
|
45625
|
+
const m = balanced("{", "}", str);
|
|
45626
|
+
if (!m) {
|
|
45627
|
+
return combine(acc, str, [""], max, maxLength, dropEmpties);
|
|
45628
|
+
}
|
|
45629
|
+
const pre = m.pre;
|
|
45630
|
+
if (/\$$/.test(pre)) {
|
|
45631
|
+
acc = combine(
|
|
45632
|
+
acc,
|
|
45633
|
+
pre + "{" + m.body + "}",
|
|
45634
|
+
[""],
|
|
45635
|
+
max,
|
|
45636
|
+
maxLength,
|
|
45637
|
+
dropEmpties && !m.post.length
|
|
45638
|
+
);
|
|
45639
|
+
firstGroup = false;
|
|
45640
|
+
if (!m.post.length) break;
|
|
45641
|
+
str = m.post;
|
|
45642
|
+
continue;
|
|
46186
45643
|
}
|
|
46187
|
-
} else {
|
|
46188
45644
|
var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
|
|
46189
45645
|
var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
|
|
46190
45646
|
var isSequence = isNumericSequence || isAlphaSequence;
|
|
@@ -46192,74 +45648,69 @@ var require_brace_expansion = __commonJS({
|
|
|
46192
45648
|
if (!isSequence && !isOptions) {
|
|
46193
45649
|
if (m.post.match(/,(?!,).*\}/)) {
|
|
46194
45650
|
str = m.pre + "{" + m.body + escClose + m.post;
|
|
46195
|
-
|
|
45651
|
+
isTop = true;
|
|
45652
|
+
continue;
|
|
46196
45653
|
}
|
|
46197
|
-
return
|
|
45654
|
+
return combine(
|
|
45655
|
+
acc,
|
|
45656
|
+
pre + "{" + m.body + "}" + m.post,
|
|
45657
|
+
[""],
|
|
45658
|
+
max,
|
|
45659
|
+
maxLength,
|
|
45660
|
+
dropEmpties
|
|
45661
|
+
);
|
|
46198
45662
|
}
|
|
46199
|
-
|
|
45663
|
+
if (firstGroup) {
|
|
45664
|
+
dropEmpties = isTop && !isSequence;
|
|
45665
|
+
firstGroup = false;
|
|
45666
|
+
}
|
|
45667
|
+
var values2;
|
|
46200
45668
|
if (isSequence) {
|
|
46201
|
-
|
|
45669
|
+
values2 = expandSequence(m.body, isAlphaSequence, max, maxLength);
|
|
46202
45670
|
} else {
|
|
46203
|
-
n = parseCommaParts(m.body);
|
|
46204
|
-
if (n.length === 1) {
|
|
46205
|
-
n = expand2(n[0], max, false).map(embrace);
|
|
45671
|
+
var n = parseCommaParts(m.body);
|
|
45672
|
+
if (n.length === 1 && n[0] !== void 0) {
|
|
45673
|
+
n = expand2(n[0], max, maxLength, false).map(embrace);
|
|
46206
45674
|
if (n.length === 1) {
|
|
46207
|
-
|
|
46208
|
-
|
|
46209
|
-
|
|
45675
|
+
acc = combine(
|
|
45676
|
+
acc,
|
|
45677
|
+
pre + n[0],
|
|
45678
|
+
[""],
|
|
45679
|
+
max,
|
|
45680
|
+
maxLength,
|
|
45681
|
+
dropEmpties && !m.post.length
|
|
45682
|
+
);
|
|
45683
|
+
if (!m.post.length) break;
|
|
45684
|
+
str = m.post;
|
|
45685
|
+
continue;
|
|
46210
45686
|
}
|
|
46211
45687
|
}
|
|
46212
|
-
|
|
46213
|
-
|
|
46214
|
-
|
|
46215
|
-
|
|
46216
|
-
var y = numeric(n[1]);
|
|
46217
|
-
var width = Math.max(n[0].length, n[1].length);
|
|
46218
|
-
var incr = n.length == 3 ? Math.max(Math.abs(numeric(n[2])), 1) : 1;
|
|
46219
|
-
var test = lte;
|
|
46220
|
-
var reverse = y < x;
|
|
46221
|
-
if (reverse) {
|
|
46222
|
-
incr *= -1;
|
|
46223
|
-
test = gte;
|
|
46224
|
-
}
|
|
46225
|
-
var pad = n.some(isPadded);
|
|
46226
|
-
N = [];
|
|
46227
|
-
for (var i = x; test(i, y) && N.length < max; i += incr) {
|
|
46228
|
-
var c;
|
|
46229
|
-
if (isAlphaSequence) {
|
|
46230
|
-
c = String.fromCharCode(i);
|
|
46231
|
-
if (c === "\\")
|
|
46232
|
-
c = "";
|
|
46233
|
-
} else {
|
|
46234
|
-
c = String(i);
|
|
46235
|
-
if (pad) {
|
|
46236
|
-
var need = width - c.length;
|
|
46237
|
-
if (need > 0) {
|
|
46238
|
-
var z = new Array(need + 1).join("0");
|
|
46239
|
-
if (i < 0)
|
|
46240
|
-
c = "-" + z + c.slice(1);
|
|
46241
|
-
else
|
|
46242
|
-
c = z + c;
|
|
46243
|
-
}
|
|
46244
|
-
}
|
|
45688
|
+
var dropsEmpties = dropEmpties && !m.post.length && !pre;
|
|
45689
|
+
for (var d = 0; dropsEmpties && d < acc.length; d++) {
|
|
45690
|
+
if (acc[d]) {
|
|
45691
|
+
dropsEmpties = false;
|
|
46245
45692
|
}
|
|
46246
|
-
N.push(c);
|
|
46247
|
-
}
|
|
46248
|
-
} else {
|
|
46249
|
-
N = [];
|
|
46250
|
-
for (var j = 0; j < n.length; j++) {
|
|
46251
|
-
N.push.apply(N, expand2(n[j], max, false));
|
|
46252
45693
|
}
|
|
46253
|
-
|
|
46254
|
-
|
|
46255
|
-
for (var
|
|
46256
|
-
var
|
|
46257
|
-
|
|
46258
|
-
|
|
45694
|
+
values2 = [];
|
|
45695
|
+
var valuesLength = 0;
|
|
45696
|
+
outer: for (var j = 0; j < n.length; j++) {
|
|
45697
|
+
var expanded = expand2(n[j], max, maxLength, false);
|
|
45698
|
+
for (var k = 0; k < expanded.length; k++) {
|
|
45699
|
+
var v = expanded[k];
|
|
45700
|
+
if (dropsEmpties && !v) continue;
|
|
45701
|
+
if (values2.length >= max || valuesLength + v.length > maxLength) {
|
|
45702
|
+
break outer;
|
|
45703
|
+
}
|
|
45704
|
+
values2.push(v);
|
|
45705
|
+
valuesLength += v.length;
|
|
45706
|
+
}
|
|
46259
45707
|
}
|
|
46260
45708
|
}
|
|
45709
|
+
acc = combine(acc, pre, values2, max, maxLength, dropEmpties && !m.post.length);
|
|
45710
|
+
if (!m.post.length) break;
|
|
45711
|
+
str = m.post;
|
|
46261
45712
|
}
|
|
46262
|
-
return
|
|
45713
|
+
return acc;
|
|
46263
45714
|
}
|
|
46264
45715
|
}
|
|
46265
45716
|
});
|
|
@@ -89727,6 +89178,7 @@ var require_fast_uri = __commonJS({
|
|
|
89727
89178
|
return uriTokens.join("");
|
|
89728
89179
|
}
|
|
89729
89180
|
var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
|
|
89181
|
+
var AUTHORITY_PREFIX = /^(?:[^#/:?]+:)?\/\/([^/?#]*)/;
|
|
89730
89182
|
function getParseError(parsed, matches) {
|
|
89731
89183
|
if (matches[2] !== void 0 && parsed.path && parsed.path[0] !== "/") {
|
|
89732
89184
|
return 'URI path must start with "/" when authority is present.';
|
|
@@ -89756,6 +89208,11 @@ var require_fast_uri = __commonJS({
|
|
|
89756
89208
|
uri = "//" + uri;
|
|
89757
89209
|
}
|
|
89758
89210
|
}
|
|
89211
|
+
const authorityMatch = uri.match(AUTHORITY_PREFIX);
|
|
89212
|
+
if (authorityMatch !== null && authorityMatch[1].indexOf("\\") !== -1) {
|
|
89213
|
+
parsed.error = "URI authority must not contain a literal backslash.";
|
|
89214
|
+
malformedAuthorityOrPort = true;
|
|
89215
|
+
}
|
|
89759
89216
|
const matches = uri.match(URI_PARSE);
|
|
89760
89217
|
if (matches) {
|
|
89761
89218
|
parsed.scheme = matches[1];
|
|
@@ -89799,7 +89256,7 @@ var require_fast_uri = __commonJS({
|
|
|
89799
89256
|
if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
|
|
89800
89257
|
if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
|
|
89801
89258
|
try {
|
|
89802
|
-
parsed.host = URL
|
|
89259
|
+
parsed.host = new URL("http://" + parsed.host).hostname;
|
|
89803
89260
|
} catch (e) {
|
|
89804
89261
|
parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
|
|
89805
89262
|
}
|
|
@@ -94525,11 +93982,11 @@ function createHttpTransport(url2) {
|
|
|
94525
93982
|
}
|
|
94526
93983
|
};
|
|
94527
93984
|
}
|
|
94528
|
-
var
|
|
94529
|
-
var
|
|
93985
|
+
var import_client, import_stdio, import_sse, import_websocket, MCPClientManager;
|
|
93986
|
+
var init_client = __esm({
|
|
94530
93987
|
"src/agent/mcp/client.js"() {
|
|
94531
93988
|
"use strict";
|
|
94532
|
-
|
|
93989
|
+
import_client = require("@modelcontextprotocol/sdk/client/index.js");
|
|
94533
93990
|
import_stdio = require("@modelcontextprotocol/sdk/client/stdio.js");
|
|
94534
93991
|
import_sse = require("@modelcontextprotocol/sdk/client/sse.js");
|
|
94535
93992
|
import_websocket = require("@modelcontextprotocol/sdk/client/websocket.js");
|
|
@@ -94640,7 +94097,7 @@ var init_client2 = __esm({
|
|
|
94640
94097
|
console.error(`[MCP DEBUG] Connecting to ${name15} via ${serverConfig.transport}...`);
|
|
94641
94098
|
}
|
|
94642
94099
|
const transport = createTransport(serverConfig);
|
|
94643
|
-
const client = new
|
|
94100
|
+
const client = new import_client.Client(
|
|
94644
94101
|
{
|
|
94645
94102
|
name: `probe-client-${name15}`,
|
|
94646
94103
|
version: "1.0.0"
|
|
@@ -95023,7 +94480,7 @@ var MCPXmlBridge;
|
|
|
95023
94480
|
var init_xmlBridge = __esm({
|
|
95024
94481
|
"src/agent/mcp/xmlBridge.js"() {
|
|
95025
94482
|
"use strict";
|
|
95026
|
-
|
|
94483
|
+
init_client();
|
|
95027
94484
|
init_config2();
|
|
95028
94485
|
MCPXmlBridge = class {
|
|
95029
94486
|
constructor(options = {}) {
|
|
@@ -95150,10 +94607,10 @@ var init_xmlBridge = __esm({
|
|
|
95150
94607
|
var init_mcp = __esm({
|
|
95151
94608
|
"src/agent/mcp/index.js"() {
|
|
95152
94609
|
"use strict";
|
|
95153
|
-
|
|
94610
|
+
init_client();
|
|
95154
94611
|
init_config2();
|
|
95155
94612
|
init_xmlBridge();
|
|
95156
|
-
|
|
94613
|
+
init_client();
|
|
95157
94614
|
init_config2();
|
|
95158
94615
|
init_xmlBridge();
|
|
95159
94616
|
}
|
|
@@ -103709,7 +103166,7 @@ var init_outputTruncator = __esm({
|
|
|
103709
103166
|
});
|
|
103710
103167
|
|
|
103711
103168
|
// src/agent/mcp/built-in-server.js
|
|
103712
|
-
var import_http, import_events2, import_crypto6, import_server, import_sse2, import_streamableHttp,
|
|
103169
|
+
var import_http, import_events2, import_crypto6, import_server, import_sse2, import_streamableHttp, import_types5, InMemoryEventStore, BuiltInMCPServer;
|
|
103713
103170
|
var init_built_in_server = __esm({
|
|
103714
103171
|
"src/agent/mcp/built-in-server.js"() {
|
|
103715
103172
|
"use strict";
|
|
@@ -103719,7 +103176,7 @@ var init_built_in_server = __esm({
|
|
|
103719
103176
|
import_server = require("@modelcontextprotocol/sdk/server/index.js");
|
|
103720
103177
|
import_sse2 = require("@modelcontextprotocol/sdk/server/sse.js");
|
|
103721
103178
|
import_streamableHttp = require("@modelcontextprotocol/sdk/server/streamableHttp.js");
|
|
103722
|
-
|
|
103179
|
+
import_types5 = require("@modelcontextprotocol/sdk/types.js");
|
|
103723
103180
|
InMemoryEventStore = class {
|
|
103724
103181
|
constructor() {
|
|
103725
103182
|
this.events = /* @__PURE__ */ new Map();
|
|
@@ -103953,7 +103410,7 @@ var init_built_in_server = __esm({
|
|
|
103953
103410
|
if (this.debug) {
|
|
103954
103411
|
console.log(`[MCP] Reusing existing transport for session: ${sessionId}`);
|
|
103955
103412
|
}
|
|
103956
|
-
} else if (!sessionId && method === "POST" && body && (0,
|
|
103413
|
+
} else if (!sessionId && method === "POST" && body && (0, import_types5.isInitializeRequest)(body)) {
|
|
103957
103414
|
if (this.debug) {
|
|
103958
103415
|
console.log("[MCP] Creating new Streamable HTTP transport for initialization");
|
|
103959
103416
|
}
|
|
@@ -104165,10 +103622,10 @@ var init_built_in_server = __esm({
|
|
|
104165
103622
|
* Register MCP protocol handlers
|
|
104166
103623
|
*/
|
|
104167
103624
|
registerHandlers() {
|
|
104168
|
-
this.mcpServer.setRequestHandler(
|
|
103625
|
+
this.mcpServer.setRequestHandler(import_types5.ListToolsRequestSchema, async () => {
|
|
104169
103626
|
return this.handleListTools();
|
|
104170
103627
|
});
|
|
104171
|
-
this.mcpServer.setRequestHandler(
|
|
103628
|
+
this.mcpServer.setRequestHandler(import_types5.CallToolRequestSchema, async (request) => {
|
|
104172
103629
|
return this.handleCallTool(request.params);
|
|
104173
103630
|
});
|
|
104174
103631
|
}
|