@larkup/cli 0.2.25 → 0.2.26

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.
Files changed (45) hide show
  1. package/README.md +8 -0
  2. package/dist/{analytics-store-KI3NXDYV.js → analytics-store-4NYU7DMO.js} +2 -2
  3. package/dist/api-X4PHQJTH.js +6943 -0
  4. package/dist/bowser-GZLEN3PD.js +2821 -0
  5. package/dist/{chroma-BCASZNMJ.js → chroma-RJVBZZMP.js} +2 -11
  6. package/dist/chunk-3EBUYTA7.js +136 -0
  7. package/dist/chunk-4XN2IRCG.js +46 -0
  8. package/dist/{chunk-FM6HYXZ5.js → chunk-5UWKP64Q.js} +24 -72
  9. package/dist/chunk-65EVYGDT.js +2904 -0
  10. package/dist/chunk-A7HMSODH.js +126 -0
  11. package/dist/chunk-BDMLJQRN.js +534 -0
  12. package/dist/chunk-FUTLPXFR.js +921 -0
  13. package/dist/chunk-HAABLEPO.js +1570 -0
  14. package/dist/chunk-HOPZALAP.js +449 -0
  15. package/dist/{chunk-L34L3RDQ.js → chunk-JZ3UCEGF.js} +157 -197
  16. package/dist/chunk-MACWQEJS.js +2091 -0
  17. package/dist/chunk-MYOADNR2.js +515 -0
  18. package/dist/chunk-N6IF5QLH.js +1850 -0
  19. package/dist/chunk-ODWAFTDP.js +1711 -0
  20. package/dist/chunk-QGM4M3NI.js +37 -0
  21. package/dist/chunk-S5DCG3CZ.js +41 -0
  22. package/dist/{chunk-I6JJWCUQ.js → chunk-V3VNCOZ6.js} +118 -29
  23. package/dist/dist-es-5DTOPEBY.js +322 -0
  24. package/dist/dist-es-BM4STLL5.js +70 -0
  25. package/dist/dist-es-DS5SFRTK.js +377 -0
  26. package/dist/dist-es-F6WXDZQY.js +88 -0
  27. package/dist/dist-es-KMHWFNXI.js +295 -0
  28. package/dist/dist-es-LRDDK5LI.js +11761 -0
  29. package/dist/dist-es-LWW2DNRF.js +139 -0
  30. package/dist/dist-es-NEADJWQM.js +176 -0
  31. package/dist/dist-es-S5FAFKBD.js +23 -0
  32. package/dist/dist-es-YD724GH3.js +221 -0
  33. package/dist/event-streams-NPIZBVLJ.js +43 -0
  34. package/dist/index.js +2074 -1768
  35. package/dist/{lancedb-UB2EPDCN.js → lancedb-TCUZKSHN.js} +1 -1
  36. package/dist/lexer-DQCqS3nf-CGRGK47I.js +62 -0
  37. package/dist/loadSso-HXXA5UNF.js +584 -0
  38. package/dist/{pinecone-OHOY4YYM.js → pinecone-ME3YOCQJ.js} +3 -21
  39. package/dist/signin-7FUGJFG3.js +822 -0
  40. package/dist/sso-oidc-EPMF7LMF.js +838 -0
  41. package/dist/sts-RBEOIBEJ.js +1118 -0
  42. package/dist/{tool-loader-KKODIWEV.js → tool-loader-PEQZZWTB.js} +3 -3
  43. package/dist/{tool-registry-CXCFMOWA.js → tool-registry-VJYLRXKJ.js} +2 -2
  44. package/package.json +20 -16
  45. package/dist/chunk-3RG5ZIWI.js +0 -10
@@ -0,0 +1,2091 @@
1
+ // ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-es/extensions/checksum.js
2
+ var AlgorithmId;
3
+ (function(AlgorithmId2) {
4
+ AlgorithmId2["MD5"] = "md5";
5
+ AlgorithmId2["CRC32"] = "crc32";
6
+ AlgorithmId2["CRC32C"] = "crc32c";
7
+ AlgorithmId2["SHA1"] = "sha1";
8
+ AlgorithmId2["SHA256"] = "sha256";
9
+ })(AlgorithmId || (AlgorithmId = {}));
10
+
11
+ // ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-es/middleware.js
12
+ var SMITHY_CONTEXT_KEY = "__smithy_context";
13
+
14
+ // ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-es/endpoint.js
15
+ var EndpointURLScheme;
16
+ (function(EndpointURLScheme2) {
17
+ EndpointURLScheme2["HTTP"] = "http";
18
+ EndpointURLScheme2["HTTPS"] = "https";
19
+ })(EndpointURLScheme || (EndpointURLScheme = {}));
20
+
21
+ // ../../node_modules/.pnpm/@smithy+types@4.17.2/node_modules/@smithy/types/dist-es/profile.js
22
+ var IniSectionType;
23
+ (function(IniSectionType2) {
24
+ IniSectionType2["PROFILE"] = "profile";
25
+ IniSectionType2["SSO_SESSION"] = "sso-session";
26
+ IniSectionType2["SERVICES"] = "services";
27
+ })(IniSectionType || (IniSectionType = {}));
28
+
29
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/transport/getSmithyContext.js
30
+ var getSmithyContext = (context) => context[SMITHY_CONTEXT_KEY] || (context[SMITHY_CONTEXT_KEY] = {});
31
+
32
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/transport/hasOwn.js
33
+ function hasOwn(o, k) {
34
+ return Object.prototype.hasOwnProperty.call(o, k);
35
+ }
36
+
37
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/transport/httpRequest.js
38
+ var HttpRequest = class _HttpRequest {
39
+ method;
40
+ protocol;
41
+ hostname;
42
+ port;
43
+ path;
44
+ query;
45
+ headers;
46
+ username;
47
+ password;
48
+ fragment;
49
+ body;
50
+ constructor(options) {
51
+ this.method = options.method || "GET";
52
+ this.hostname = options.hostname || "localhost";
53
+ this.port = options.port;
54
+ this.query = options.query || {};
55
+ this.headers = options.headers || {};
56
+ this.body = options.body;
57
+ this.protocol = options.protocol ? options.protocol.slice(-1) !== ":" ? `${options.protocol}:` : options.protocol : "https:";
58
+ this.path = options.path ? options.path.charAt(0) !== "/" ? `/${options.path}` : options.path : "/";
59
+ this.username = options.username;
60
+ this.password = options.password;
61
+ this.fragment = options.fragment;
62
+ }
63
+ static clone(request) {
64
+ const cloned = new _HttpRequest({
65
+ ...request,
66
+ headers: { ...request.headers }
67
+ });
68
+ if (cloned.query) {
69
+ cloned.query = cloneQuery(cloned.query);
70
+ }
71
+ return cloned;
72
+ }
73
+ static isInstance(request) {
74
+ if (!request) {
75
+ return false;
76
+ }
77
+ const req = request;
78
+ return "method" in req && "protocol" in req && "hostname" in req && "path" in req && typeof req["query"] === "object" && typeof req["headers"] === "object";
79
+ }
80
+ clone() {
81
+ return _HttpRequest.clone(this);
82
+ }
83
+ };
84
+ function cloneQuery(query) {
85
+ return Object.keys(query).reduce((carry, paramName) => {
86
+ const param = query[paramName];
87
+ return {
88
+ ...carry,
89
+ [paramName]: Array.isArray(param) ? [...param] : param
90
+ };
91
+ }, {});
92
+ }
93
+
94
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/transport/normalizeProvider.js
95
+ var normalizeProvider = (input) => {
96
+ if (typeof input === "function")
97
+ return input;
98
+ const promisified = Promise.resolve(input);
99
+ return () => promisified;
100
+ };
101
+
102
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/transport/parseQueryString.js
103
+ function parseQueryString(querystring) {
104
+ const query = {};
105
+ querystring = querystring.replace(/^\?/, "");
106
+ if (querystring) {
107
+ for (const pair of querystring.split("&")) {
108
+ let [key, value = null] = pair.split("=");
109
+ key = decodeURIComponent(key);
110
+ if (value) {
111
+ value = decodeURIComponent(value);
112
+ }
113
+ if (!(key in query)) {
114
+ query[key] = value;
115
+ } else if (Array.isArray(query[key])) {
116
+ query[key].push(value);
117
+ } else {
118
+ query[key] = [query[key], value];
119
+ }
120
+ }
121
+ }
122
+ return query;
123
+ }
124
+
125
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/transport/parseUrl.js
126
+ var parseUrl = (url) => {
127
+ if (typeof url === "string") {
128
+ return parseUrl(new URL(url));
129
+ }
130
+ const { hostname, pathname, port, protocol, search } = url;
131
+ let query;
132
+ if (search) {
133
+ query = parseQueryString(search);
134
+ }
135
+ return {
136
+ hostname,
137
+ port: port ? parseInt(port) : void 0,
138
+ protocol,
139
+ path: pathname,
140
+ query
141
+ };
142
+ };
143
+
144
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/transport/httpResponse.js
145
+ var HttpResponse = class {
146
+ statusCode;
147
+ reason;
148
+ headers;
149
+ body;
150
+ constructor(options) {
151
+ this.statusCode = options.statusCode;
152
+ this.reason = options.reason;
153
+ this.headers = options.headers || {};
154
+ this.body = options.body;
155
+ }
156
+ static isInstance(response) {
157
+ if (!response)
158
+ return false;
159
+ const resp = response;
160
+ return typeof resp.statusCode === "number" && typeof resp.headers === "object";
161
+ }
162
+ };
163
+
164
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/transport/isValidHostLabel.js
165
+ var VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`);
166
+ var isValidHostLabel = (value, allowSubDomains = false) => {
167
+ if (!allowSubDomains) {
168
+ return VALID_HOST_LABEL_REGEX.test(value);
169
+ }
170
+ const labels = value.split(".");
171
+ for (const label of labels) {
172
+ if (!isValidHostLabel(label)) {
173
+ return false;
174
+ }
175
+ }
176
+ return true;
177
+ };
178
+
179
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/transport/isValidHostname.js
180
+ function isValidHostname(hostname) {
181
+ const hostPattern = /^[a-z0-9][a-z0-9.-]*[a-z0-9]$/;
182
+ return hostPattern.test(hostname);
183
+ }
184
+
185
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/transport/toEndpointV1.js
186
+ var toEndpointV1 = (endpoint) => {
187
+ if (typeof endpoint === "object") {
188
+ if ("url" in endpoint) {
189
+ const v1Endpoint = parseUrl(endpoint.url);
190
+ if (endpoint.headers) {
191
+ v1Endpoint.headers = {};
192
+ for (const name in endpoint.headers) {
193
+ if (!hasOwn(endpoint.headers, name))
194
+ continue;
195
+ v1Endpoint.headers[name.toLowerCase()] = endpoint.headers[name].join(", ");
196
+ }
197
+ }
198
+ return v1Endpoint;
199
+ }
200
+ return endpoint;
201
+ }
202
+ return parseUrl(endpoint);
203
+ };
204
+
205
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/schema/schemas/operation.js
206
+ var operation = (namespace, name, traits, input, output) => ({
207
+ name,
208
+ namespace,
209
+ traits,
210
+ input,
211
+ output
212
+ });
213
+
214
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js
215
+ var schemaDeserializationMiddleware = (config) => (next, context) => async (args) => {
216
+ const { response } = await next(args);
217
+ const { operationSchema } = getSmithyContext(context);
218
+ const [, ns, n, t, i, o] = operationSchema ?? [];
219
+ try {
220
+ const parsed = await config.protocol.deserializeResponse(operation(ns, n, t, i, o), {
221
+ ...config,
222
+ ...context
223
+ }, response);
224
+ return {
225
+ response,
226
+ output: parsed
227
+ };
228
+ } catch (error) {
229
+ Object.defineProperty(error, "$response", {
230
+ value: response,
231
+ enumerable: false,
232
+ writable: false,
233
+ configurable: false
234
+ });
235
+ if (!("$metadata" in error)) {
236
+ const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`;
237
+ try {
238
+ error.message += "\n " + hint;
239
+ } catch (ignored) {
240
+ if (!context.logger || context.logger?.constructor?.name === "NoOpLogger") {
241
+ console.warn(hint);
242
+ } else {
243
+ context.logger?.warn?.(hint);
244
+ }
245
+ }
246
+ if (typeof error.$responseBodyText !== "undefined") {
247
+ if (error.$response) {
248
+ error.$response.body = error.$responseBodyText;
249
+ }
250
+ }
251
+ try {
252
+ if (HttpResponse.isInstance(response)) {
253
+ const { headers = {}, statusCode } = response;
254
+ const headerEntries = Object.entries(headers);
255
+ error.$metadata = {
256
+ httpStatusCode: statusCode,
257
+ requestId: findHeader(/^x-[\w-]+-request-?id$/, headerEntries),
258
+ extendedRequestId: findHeader(/^x-[\w-]+-id-2$/, headerEntries),
259
+ cfId: findHeader(/^x-[\w-]+-cf-id$/, headerEntries)
260
+ };
261
+ }
262
+ } catch (ignored) {
263
+ }
264
+ }
265
+ throw error;
266
+ }
267
+ };
268
+ var findHeader = (pattern, headers) => {
269
+ return (headers.find(([k]) => {
270
+ return k.match(pattern);
271
+ }) || [void 0, void 0])[1];
272
+ };
273
+
274
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js
275
+ var schemaSerializationMiddleware = (config) => (next, context) => async (args) => {
276
+ const { operationSchema } = getSmithyContext(context);
277
+ const [, ns, n, t, i, o] = operationSchema ?? [];
278
+ const endpoint = context.endpointV2 ? async () => toEndpointV1(context.endpointV2) : config.endpoint;
279
+ const request = await config.protocol.serializeRequest(operation(ns, n, t, i, o), args.input, {
280
+ ...config,
281
+ ...context,
282
+ endpoint
283
+ });
284
+ return next({
285
+ ...args,
286
+ request
287
+ });
288
+ };
289
+
290
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/schema/middleware/getSchemaSerdePlugin.js
291
+ var deserializerMiddlewareOption = {
292
+ name: "deserializerMiddleware",
293
+ step: "deserialize",
294
+ tags: ["DESERIALIZER"],
295
+ override: true
296
+ };
297
+ var serializerMiddlewareOption = {
298
+ name: "serializerMiddleware",
299
+ step: "serialize",
300
+ tags: ["SERIALIZER"],
301
+ override: true
302
+ };
303
+ function getSchemaSerdePlugin(config) {
304
+ return {
305
+ applyToStack: (commandStack) => {
306
+ commandStack.add(schemaSerializationMiddleware(config), serializerMiddlewareOption);
307
+ commandStack.add(schemaDeserializationMiddleware(config), deserializerMiddlewareOption);
308
+ config.protocol.setSerdeContext(config);
309
+ }
310
+ };
311
+ }
312
+
313
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js
314
+ var TypeRegistry = class _TypeRegistry {
315
+ namespace;
316
+ schemas;
317
+ exceptions;
318
+ static registries = /* @__PURE__ */ new Map();
319
+ constructor(namespace, schemas = /* @__PURE__ */ new Map(), exceptions = /* @__PURE__ */ new Map()) {
320
+ this.namespace = namespace;
321
+ this.schemas = schemas;
322
+ this.exceptions = exceptions;
323
+ }
324
+ static for(namespace) {
325
+ if (!_TypeRegistry.registries.has(namespace)) {
326
+ _TypeRegistry.registries.set(namespace, new _TypeRegistry(namespace));
327
+ }
328
+ return _TypeRegistry.registries.get(namespace);
329
+ }
330
+ copyFrom(other) {
331
+ const { schemas, exceptions } = this;
332
+ for (const [k, v] of other.schemas) {
333
+ if (!schemas.has(k)) {
334
+ schemas.set(k, v);
335
+ }
336
+ }
337
+ for (const [k, v] of other.exceptions) {
338
+ if (!exceptions.has(k)) {
339
+ exceptions.set(k, v);
340
+ }
341
+ }
342
+ }
343
+ register(shapeId, schema) {
344
+ const qualifiedName = this.normalizeShapeId(shapeId);
345
+ for (const r of [this, _TypeRegistry.for(qualifiedName.split("#")[0])]) {
346
+ r.schemas.set(qualifiedName, schema);
347
+ }
348
+ }
349
+ getSchema(shapeId) {
350
+ const id = this.normalizeShapeId(shapeId);
351
+ if (!this.schemas.has(id)) {
352
+ if (!shapeId.includes("#")) {
353
+ const suffix = "#" + shapeId;
354
+ const candidates = [];
355
+ for (const [shapeId2, schema] of this.schemas.entries()) {
356
+ if (shapeId2.endsWith(suffix)) {
357
+ candidates.push(schema);
358
+ }
359
+ }
360
+ if (candidates.length === 1) {
361
+ return candidates[0];
362
+ }
363
+ }
364
+ throw new Error(`@smithy/core/schema - schema not found for ${id}`);
365
+ }
366
+ return this.schemas.get(id);
367
+ }
368
+ registerError(es, ctor) {
369
+ const $error = es;
370
+ const ns = $error[1];
371
+ for (const r of [this, _TypeRegistry.for(ns)]) {
372
+ r.schemas.set(ns + "#" + $error[2], $error);
373
+ r.exceptions.set($error, ctor);
374
+ }
375
+ }
376
+ getErrorCtor(es) {
377
+ const $error = es;
378
+ if (this.exceptions.has($error)) {
379
+ return this.exceptions.get($error);
380
+ }
381
+ const registry = _TypeRegistry.for($error[1]);
382
+ return registry.exceptions.get($error);
383
+ }
384
+ getBaseException() {
385
+ for (const exceptionKey of this.exceptions.keys()) {
386
+ if (Array.isArray(exceptionKey)) {
387
+ const [, ns, name] = exceptionKey;
388
+ const id = ns + "#" + name;
389
+ if (id.startsWith("smithy.ts.sdk.synthetic.") && id.endsWith("ServiceException")) {
390
+ return exceptionKey;
391
+ }
392
+ }
393
+ }
394
+ return void 0;
395
+ }
396
+ find(predicate) {
397
+ for (const schema of this.schemas.values()) {
398
+ if (predicate(schema)) {
399
+ return schema;
400
+ }
401
+ }
402
+ return void 0;
403
+ }
404
+ clear() {
405
+ this.schemas.clear();
406
+ this.exceptions.clear();
407
+ }
408
+ normalizeShapeId(shapeId) {
409
+ if (shapeId.includes("#")) {
410
+ return shapeId;
411
+ }
412
+ return this.namespace + "#" + shapeId;
413
+ }
414
+ };
415
+
416
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/schema/deref.js
417
+ var deref = (schemaRef) => {
418
+ if (typeof schemaRef === "function") {
419
+ return schemaRef();
420
+ }
421
+ return schemaRef;
422
+ };
423
+
424
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js
425
+ var traitsCache = [];
426
+ function translateTraits(indicator) {
427
+ if (typeof indicator === "object") {
428
+ return indicator;
429
+ }
430
+ indicator = indicator | 0;
431
+ if (traitsCache[indicator]) {
432
+ return traitsCache[indicator];
433
+ }
434
+ const traits = {};
435
+ let i = 0;
436
+ for (const trait of [
437
+ "httpLabel",
438
+ "idempotent",
439
+ "idempotencyToken",
440
+ "sensitive",
441
+ "httpPayload",
442
+ "httpResponseCode",
443
+ "httpQueryParams"
444
+ ]) {
445
+ if ((indicator >> i++ & 1) === 1) {
446
+ traits[trait] = 1;
447
+ }
448
+ }
449
+ return traitsCache[indicator] = traits;
450
+ }
451
+
452
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js
453
+ var anno = {
454
+ it: Symbol.for("@smithy/nor-struct-it"),
455
+ ns: Symbol.for("@smithy/ns")
456
+ };
457
+ var simpleSchemaCacheN = [];
458
+ var simpleSchemaCacheS = {};
459
+ var NormalizedSchema = class _NormalizedSchema {
460
+ ref;
461
+ memberName;
462
+ static symbol = Symbol.for("@smithy/nor");
463
+ symbol = _NormalizedSchema.symbol;
464
+ name;
465
+ schema;
466
+ _isMemberSchema;
467
+ traits;
468
+ memberTraits;
469
+ normalizedTraits;
470
+ constructor(ref, memberName) {
471
+ this.ref = ref;
472
+ this.memberName = memberName;
473
+ const traitStack = [];
474
+ let _ref = ref;
475
+ let schema = ref;
476
+ this._isMemberSchema = false;
477
+ while (isMemberSchema(_ref)) {
478
+ traitStack.push(_ref[1]);
479
+ _ref = _ref[0];
480
+ schema = deref(_ref);
481
+ this._isMemberSchema = true;
482
+ }
483
+ if (traitStack.length > 0) {
484
+ this.memberTraits = {};
485
+ for (let i = traitStack.length - 1; i >= 0; --i) {
486
+ const traitSet = traitStack[i];
487
+ Object.assign(this.memberTraits, translateTraits(traitSet));
488
+ }
489
+ } else {
490
+ this.memberTraits = 0;
491
+ }
492
+ if (schema instanceof _NormalizedSchema) {
493
+ const computedMemberTraits = this.memberTraits;
494
+ Object.assign(this, schema);
495
+ this.memberTraits = Object.assign({}, computedMemberTraits, schema.getMemberTraits(), this.getMemberTraits());
496
+ this.normalizedTraits = void 0;
497
+ this.memberName = memberName ?? schema.memberName;
498
+ return;
499
+ }
500
+ this.schema = deref(schema);
501
+ if (isStaticSchema(this.schema)) {
502
+ this.name = `${this.schema[1]}#${this.schema[2]}`;
503
+ this.traits = this.schema[3];
504
+ } else {
505
+ this.name = this.memberName ?? String(schema);
506
+ this.traits = 0;
507
+ }
508
+ if (this._isMemberSchema && !memberName) {
509
+ throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(true)} missing member name.`);
510
+ }
511
+ }
512
+ static [Symbol.hasInstance](lhs) {
513
+ const isPrototype = this.prototype.isPrototypeOf(lhs);
514
+ if (!isPrototype && typeof lhs === "object" && lhs !== null) {
515
+ const ns = lhs;
516
+ return ns.symbol === this.symbol;
517
+ }
518
+ return isPrototype;
519
+ }
520
+ static of(ref) {
521
+ const keyAble = typeof ref === "function" || typeof ref === "object" && ref !== null;
522
+ if (typeof ref === "number") {
523
+ if (simpleSchemaCacheN[ref]) {
524
+ return simpleSchemaCacheN[ref];
525
+ }
526
+ } else if (typeof ref === "string") {
527
+ if (simpleSchemaCacheS[ref]) {
528
+ return simpleSchemaCacheS[ref];
529
+ }
530
+ } else if (keyAble) {
531
+ if (ref[anno.ns]) {
532
+ return ref[anno.ns];
533
+ }
534
+ }
535
+ const sc = deref(ref);
536
+ if (sc instanceof _NormalizedSchema) {
537
+ return sc;
538
+ }
539
+ if (isMemberSchema(sc)) {
540
+ const [ns2, traits] = sc;
541
+ if (ns2 instanceof _NormalizedSchema) {
542
+ Object.assign(ns2.getMergedTraits(), translateTraits(traits));
543
+ return ns2;
544
+ }
545
+ throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(ref, null, 2)}.`);
546
+ }
547
+ const ns = new _NormalizedSchema(sc);
548
+ if (keyAble) {
549
+ return ref[anno.ns] = ns;
550
+ }
551
+ if (typeof sc === "string") {
552
+ return simpleSchemaCacheS[sc] = ns;
553
+ }
554
+ if (typeof sc === "number") {
555
+ return simpleSchemaCacheN[sc] = ns;
556
+ }
557
+ return ns;
558
+ }
559
+ getSchema() {
560
+ const sc = this.schema;
561
+ if (Array.isArray(sc) && sc[0] === 0) {
562
+ return sc[4];
563
+ }
564
+ return sc;
565
+ }
566
+ getName(withNamespace = false) {
567
+ const { name } = this;
568
+ const short = !withNamespace && name && name.includes("#");
569
+ return short ? name.split("#")[1] : name || void 0;
570
+ }
571
+ getMemberName() {
572
+ return this.memberName;
573
+ }
574
+ isMemberSchema() {
575
+ return this._isMemberSchema;
576
+ }
577
+ isListSchema() {
578
+ const sc = this.getSchema();
579
+ return typeof sc === "number" ? sc >= 64 && sc < 128 : sc[0] === 1;
580
+ }
581
+ isMapSchema() {
582
+ const sc = this.getSchema();
583
+ return typeof sc === "number" ? sc >= 128 && sc <= 255 : sc[0] === 2;
584
+ }
585
+ isStructSchema() {
586
+ const sc = this.getSchema();
587
+ if (typeof sc !== "object") {
588
+ return false;
589
+ }
590
+ const id = sc[0];
591
+ return id === 3 || id === -3 || id === 4;
592
+ }
593
+ isUnionSchema() {
594
+ const sc = this.getSchema();
595
+ if (typeof sc !== "object") {
596
+ return false;
597
+ }
598
+ return sc[0] === 4;
599
+ }
600
+ isBlobSchema() {
601
+ const sc = this.getSchema();
602
+ return sc === 21 || sc === 42;
603
+ }
604
+ isTimestampSchema() {
605
+ const sc = this.getSchema();
606
+ return typeof sc === "number" && sc >= 4 && sc <= 7;
607
+ }
608
+ isUnitSchema() {
609
+ return this.getSchema() === "unit";
610
+ }
611
+ isDocumentSchema() {
612
+ return this.getSchema() === 15;
613
+ }
614
+ isStringSchema() {
615
+ return this.getSchema() === 0;
616
+ }
617
+ isBooleanSchema() {
618
+ return this.getSchema() === 2;
619
+ }
620
+ isNumericSchema() {
621
+ return this.getSchema() === 1;
622
+ }
623
+ isBigIntegerSchema() {
624
+ return this.getSchema() === 17;
625
+ }
626
+ isBigDecimalSchema() {
627
+ return this.getSchema() === 19;
628
+ }
629
+ isStreaming() {
630
+ const { streaming } = this.getMergedTraits();
631
+ return !!streaming || this.getSchema() === 42;
632
+ }
633
+ isIdempotencyToken() {
634
+ return !!this.getMergedTraits().idempotencyToken;
635
+ }
636
+ getMergedTraits() {
637
+ return this.normalizedTraits ?? (this.normalizedTraits = {
638
+ ...this.getOwnTraits(),
639
+ ...this.getMemberTraits()
640
+ });
641
+ }
642
+ getMemberTraits() {
643
+ return translateTraits(this.memberTraits);
644
+ }
645
+ getOwnTraits() {
646
+ return translateTraits(this.traits);
647
+ }
648
+ getKeySchema() {
649
+ const [isDoc, isMap] = [this.isDocumentSchema(), this.isMapSchema()];
650
+ if (!isDoc && !isMap) {
651
+ throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(true)}`);
652
+ }
653
+ const schema = this.getSchema();
654
+ const memberSchema = isDoc ? 15 : schema[4] ?? 0;
655
+ return member([memberSchema, 0], "key");
656
+ }
657
+ getValueSchema() {
658
+ const sc = this.getSchema();
659
+ const [isDoc, isMap, isList] = [this.isDocumentSchema(), this.isMapSchema(), this.isListSchema()];
660
+ const memberSchema = typeof sc === "number" ? 63 & sc : sc && typeof sc === "object" && (isMap || isList) ? sc[3 + sc[0]] : isDoc ? 15 : void 0;
661
+ if (memberSchema != null) {
662
+ return member([memberSchema, 0], isMap ? "value" : "member");
663
+ }
664
+ throw new Error(`@smithy/core/schema - ${this.getName(true)} has no value member.`);
665
+ }
666
+ getMemberSchema(memberName) {
667
+ const struct = this.getSchema();
668
+ if (this.isStructSchema() && struct[4].includes(memberName)) {
669
+ const i = struct[4].indexOf(memberName);
670
+ const memberSchema = struct[5][i];
671
+ return member(isMemberSchema(memberSchema) ? memberSchema : [memberSchema, 0], memberName);
672
+ }
673
+ if (this.isDocumentSchema()) {
674
+ return member([15, 0], memberName);
675
+ }
676
+ throw new Error(`@smithy/core/schema - ${this.getName(true)} has no member=${memberName}.`);
677
+ }
678
+ getMemberSchemas() {
679
+ const buffer = {};
680
+ try {
681
+ for (const [k, v] of this.structIterator()) {
682
+ buffer[k] = v;
683
+ }
684
+ } catch (ignored) {
685
+ }
686
+ return buffer;
687
+ }
688
+ getEventStreamMember() {
689
+ if (this.isStructSchema()) {
690
+ for (const [memberName, memberSchema] of this.structIterator()) {
691
+ if (memberSchema.isStreaming() && memberSchema.isStructSchema()) {
692
+ return memberName;
693
+ }
694
+ }
695
+ }
696
+ return "";
697
+ }
698
+ *structIterator() {
699
+ if (this.isUnitSchema()) {
700
+ return;
701
+ }
702
+ if (!this.isStructSchema()) {
703
+ throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");
704
+ }
705
+ const struct = this.getSchema();
706
+ const z = struct[4].length;
707
+ let it = struct[anno.it];
708
+ if (it && z === it.length) {
709
+ yield* it;
710
+ return;
711
+ }
712
+ it = Array(z);
713
+ for (let i = 0; i < z; ++i) {
714
+ const k = struct[4][i];
715
+ const v = member([struct[5][i], 0], k);
716
+ yield it[i] = [k, v];
717
+ }
718
+ struct[anno.it] = it;
719
+ }
720
+ };
721
+ function member(memberSchema, memberName) {
722
+ if (memberSchema instanceof NormalizedSchema) {
723
+ return Object.assign(memberSchema, {
724
+ memberName,
725
+ _isMemberSchema: true
726
+ });
727
+ }
728
+ const internalCtorAccess = NormalizedSchema;
729
+ return new internalCtorAccess(memberSchema, memberName);
730
+ }
731
+ var isMemberSchema = (sc) => Array.isArray(sc) && sc.length === 2;
732
+ var isStaticSchema = (sc) => Array.isArray(sc) && sc.length >= 5;
733
+
734
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/is-array-buffer/is-array-buffer.js
735
+ var isArrayBuffer = (arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]";
736
+
737
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/util-buffer-from/buffer-from.js
738
+ var fromArrayBuffer = (input, offset = 0, length = input.byteLength - offset) => {
739
+ if (!isArrayBuffer(input)) {
740
+ throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`);
741
+ }
742
+ return Buffer.from(input, offset, length);
743
+ };
744
+ var fromString = (input, encoding) => {
745
+ if (typeof input !== "string") {
746
+ throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`);
747
+ }
748
+ return encoding ? Buffer.from(input, encoding) : Buffer.from(input);
749
+ };
750
+
751
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/fromUtf8.js
752
+ var fromUtf8 = (input) => {
753
+ const buf = fromString(input, "utf8");
754
+ return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT);
755
+ };
756
+
757
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/toUtf8.js
758
+ var toUtf8 = (input) => {
759
+ if (typeof input === "string") {
760
+ return input;
761
+ }
762
+ if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") {
763
+ throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");
764
+ }
765
+ return fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("utf8");
766
+ };
767
+
768
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/util-hex-encoding/hex-encoding.js
769
+ var SHORT_TO_HEX = {};
770
+ var HEX_TO_SHORT = {};
771
+ for (let i = 0; i < 256; i++) {
772
+ let encodedByte = i.toString(16).toLowerCase();
773
+ if (encodedByte.length === 1) {
774
+ encodedByte = `0${encodedByte}`;
775
+ }
776
+ SHORT_TO_HEX[i] = encodedByte;
777
+ HEX_TO_SHORT[encodedByte] = i;
778
+ }
779
+ function fromHex(encoded) {
780
+ if (encoded.length % 2 !== 0) {
781
+ throw new Error("Hex encoded strings must have an even number length");
782
+ }
783
+ const out = new Uint8Array(encoded.length / 2);
784
+ for (let i = 0; i < encoded.length; i += 2) {
785
+ const encodedByte = encoded.slice(i, i + 2).toLowerCase();
786
+ if (encodedByte in HEX_TO_SHORT) {
787
+ out[i / 2] = HEX_TO_SHORT[encodedByte];
788
+ } else {
789
+ throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`);
790
+ }
791
+ }
792
+ return out;
793
+ }
794
+ function toHex(bytes) {
795
+ let out = "";
796
+ for (let i = 0; i < bytes.byteLength; i++) {
797
+ out += SHORT_TO_HEX[bytes[i]];
798
+ }
799
+ return out;
800
+ }
801
+
802
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/index.js
803
+ import { getRandomValues } from "crypto";
804
+
805
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/util-base64/fromBase64.js
806
+ var BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/;
807
+ var fromBase64 = (input) => {
808
+ if (input.length * 3 % 4 !== 0) {
809
+ throw new TypeError(`Incorrect padding on base64 string.`);
810
+ }
811
+ if (!BASE64_REGEX.exec(input)) {
812
+ throw new TypeError(`Invalid base64 string.`);
813
+ }
814
+ const buffer = fromString(input, "base64");
815
+ return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);
816
+ };
817
+
818
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/util-base64/toBase64.js
819
+ var toBase64 = (_input) => {
820
+ let input;
821
+ if (typeof _input === "string") {
822
+ input = fromUtf8(_input);
823
+ } else {
824
+ input = _input;
825
+ }
826
+ if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") {
827
+ throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");
828
+ }
829
+ return fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("base64");
830
+ };
831
+
832
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/blob/Uint8ArrayBlobAdapter.js
833
+ function bindUint8ArrayBlobAdapter(toUtf83, fromUtf83, toBase643, fromBase642) {
834
+ return class Uint8ArrayBlobAdapter2 extends Uint8Array {
835
+ static fromString(source, encoding = "utf-8") {
836
+ if (typeof source === "string") {
837
+ if (encoding === "base64") {
838
+ return Uint8ArrayBlobAdapter2.mutate(fromBase642(source));
839
+ }
840
+ return Uint8ArrayBlobAdapter2.mutate(fromUtf83(source));
841
+ }
842
+ throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`);
843
+ }
844
+ static mutate(source) {
845
+ Object.setPrototypeOf(source, Uint8ArrayBlobAdapter2.prototype);
846
+ return source;
847
+ }
848
+ transformToString(encoding = "utf-8") {
849
+ if (encoding === "base64") {
850
+ return toBase643(this);
851
+ }
852
+ return toUtf83(this);
853
+ }
854
+ };
855
+ }
856
+
857
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/uuid/v4.js
858
+ var decimalToHex = Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, "0"));
859
+ function bindV4(getRandomValues2) {
860
+ if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") {
861
+ return () => crypto.randomUUID();
862
+ }
863
+ return () => {
864
+ const rnds = new Uint8Array(16);
865
+ getRandomValues2(rnds);
866
+ rnds[6] = rnds[6] & 15 | 64;
867
+ rnds[8] = rnds[8] & 63 | 128;
868
+ return decimalToHex[rnds[0]] + decimalToHex[rnds[1]] + decimalToHex[rnds[2]] + decimalToHex[rnds[3]] + "-" + decimalToHex[rnds[4]] + decimalToHex[rnds[5]] + "-" + decimalToHex[rnds[6]] + decimalToHex[rnds[7]] + "-" + decimalToHex[rnds[8]] + decimalToHex[rnds[9]] + "-" + decimalToHex[rnds[10]] + decimalToHex[rnds[11]] + decimalToHex[rnds[12]] + decimalToHex[rnds[13]] + decimalToHex[rnds[14]] + decimalToHex[rnds[15]];
869
+ };
870
+ }
871
+
872
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js
873
+ var expectNumber = (value) => {
874
+ if (value === null || value === void 0) {
875
+ return void 0;
876
+ }
877
+ if (typeof value === "string") {
878
+ const parsed = parseFloat(value);
879
+ if (!Number.isNaN(parsed)) {
880
+ if (String(parsed) !== String(value)) {
881
+ logger.warn(stackTraceWarning(`Expected number but observed string: ${value}`));
882
+ }
883
+ return parsed;
884
+ }
885
+ }
886
+ if (typeof value === "number") {
887
+ return value;
888
+ }
889
+ throw new TypeError(`Expected number, got ${typeof value}: ${value}`);
890
+ };
891
+ var MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23));
892
+ var expectFloat32 = (value) => {
893
+ const expected = expectNumber(value);
894
+ if (expected !== void 0 && !Number.isNaN(expected) && expected !== Infinity && expected !== -Infinity) {
895
+ if (Math.abs(expected) > MAX_FLOAT) {
896
+ throw new TypeError(`Expected 32-bit float, got ${value}`);
897
+ }
898
+ }
899
+ return expected;
900
+ };
901
+ var expectLong = (value) => {
902
+ if (value === null || value === void 0) {
903
+ return void 0;
904
+ }
905
+ if (Number.isInteger(value) && !Number.isNaN(value)) {
906
+ return value;
907
+ }
908
+ throw new TypeError(`Expected integer, got ${typeof value}: ${value}`);
909
+ };
910
+ var expectShort = (value) => expectSizedInt(value, 16);
911
+ var expectByte = (value) => expectSizedInt(value, 8);
912
+ var expectSizedInt = (value, size) => {
913
+ const expected = expectLong(value);
914
+ if (expected !== void 0 && castInt(expected, size) !== expected) {
915
+ throw new TypeError(`Expected ${size}-bit integer, got ${value}`);
916
+ }
917
+ return expected;
918
+ };
919
+ var castInt = (value, size) => {
920
+ switch (size) {
921
+ case 32:
922
+ return Int32Array.of(value)[0];
923
+ case 16:
924
+ return Int16Array.of(value)[0];
925
+ case 8:
926
+ return Int8Array.of(value)[0];
927
+ }
928
+ };
929
+ var strictParseDouble = (value) => {
930
+ if (typeof value == "string") {
931
+ return expectNumber(parseNumber(value));
932
+ }
933
+ return expectNumber(value);
934
+ };
935
+ var strictParseFloat32 = (value) => {
936
+ if (typeof value == "string") {
937
+ return expectFloat32(parseNumber(value));
938
+ }
939
+ return expectFloat32(value);
940
+ };
941
+ var NUMBER_REGEX = /(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g;
942
+ var parseNumber = (value) => {
943
+ const matches = value.match(NUMBER_REGEX);
944
+ if (matches === null || matches[0].length !== value.length) {
945
+ throw new TypeError(`Expected real number, got implicit NaN`);
946
+ }
947
+ return parseFloat(value);
948
+ };
949
+ var strictParseShort = (value) => {
950
+ if (typeof value === "string") {
951
+ return expectShort(parseNumber(value));
952
+ }
953
+ return expectShort(value);
954
+ };
955
+ var strictParseByte = (value) => {
956
+ if (typeof value === "string") {
957
+ return expectByte(parseNumber(value));
958
+ }
959
+ return expectByte(value);
960
+ };
961
+ var stackTraceWarning = (message) => {
962
+ return String(new TypeError(message).stack || message).split("\n").slice(0, 5).filter((s) => !s.includes("stackTraceWarning")).join("\n");
963
+ };
964
+ var logger = {
965
+ warn: console.warn
966
+ };
967
+
968
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/date-utils.js
969
+ var DAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
970
+ var MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
971
+ function dateToUtcString(date2) {
972
+ const year2 = date2.getUTCFullYear();
973
+ const month = date2.getUTCMonth();
974
+ const dayOfWeek = date2.getUTCDay();
975
+ const dayOfMonthInt = date2.getUTCDate();
976
+ const hoursInt = date2.getUTCHours();
977
+ const minutesInt = date2.getUTCMinutes();
978
+ const secondsInt = date2.getUTCSeconds();
979
+ const dayOfMonthString = dayOfMonthInt < 10 ? `0${dayOfMonthInt}` : `${dayOfMonthInt}`;
980
+ const hoursString = hoursInt < 10 ? `0${hoursInt}` : `${hoursInt}`;
981
+ const minutesString = minutesInt < 10 ? `0${minutesInt}` : `${minutesInt}`;
982
+ const secondsString = secondsInt < 10 ? `0${secondsInt}` : `${secondsInt}`;
983
+ return `${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year2} ${hoursString}:${minutesString}:${secondsString} GMT`;
984
+ }
985
+ var RFC3339 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/);
986
+ var parseRfc3339DateTime = (value) => {
987
+ if (value === null || value === void 0) {
988
+ return void 0;
989
+ }
990
+ if (typeof value !== "string") {
991
+ throw new TypeError("RFC-3339 date-times must be expressed as strings");
992
+ }
993
+ const match = RFC3339.exec(value);
994
+ if (!match) {
995
+ throw new TypeError("Invalid RFC-3339 date-time value");
996
+ }
997
+ const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds] = match;
998
+ const year2 = strictParseShort(stripLeadingZeroes(yearStr));
999
+ const month = parseDateValue(monthStr, "month", 1, 12);
1000
+ const day = parseDateValue(dayStr, "day", 1, 31);
1001
+ return buildDate(year2, month, day, { hours, minutes, seconds, fractionalMilliseconds });
1002
+ };
1003
+ var RFC3339_WITH_OFFSET = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}:\d{2})|[zZ])$/);
1004
+ var parseRfc3339DateTimeWithOffset = (value) => {
1005
+ if (value === null || value === void 0) {
1006
+ return void 0;
1007
+ }
1008
+ if (typeof value !== "string") {
1009
+ throw new TypeError("RFC-3339 date-times must be expressed as strings");
1010
+ }
1011
+ const match = RFC3339_WITH_OFFSET.exec(value);
1012
+ if (!match) {
1013
+ throw new TypeError("Invalid RFC-3339 date-time value");
1014
+ }
1015
+ const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, offsetStr] = match;
1016
+ const year2 = strictParseShort(stripLeadingZeroes(yearStr));
1017
+ const month = parseDateValue(monthStr, "month", 1, 12);
1018
+ const day = parseDateValue(dayStr, "day", 1, 31);
1019
+ const date2 = buildDate(year2, month, day, { hours, minutes, seconds, fractionalMilliseconds });
1020
+ if (offsetStr.toUpperCase() != "Z") {
1021
+ date2.setTime(date2.getTime() - parseOffsetToMilliseconds(offsetStr));
1022
+ }
1023
+ return date2;
1024
+ };
1025
+ var IMF_FIXDATE = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/);
1026
+ var RFC_850_DATE = new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/);
1027
+ var ASC_TIME = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/);
1028
+ var parseRfc7231DateTime = (value) => {
1029
+ if (value === null || value === void 0) {
1030
+ return void 0;
1031
+ }
1032
+ if (typeof value !== "string") {
1033
+ throw new TypeError("RFC-7231 date-times must be expressed as strings");
1034
+ }
1035
+ let match = IMF_FIXDATE.exec(value);
1036
+ if (match) {
1037
+ const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;
1038
+ return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), { hours, minutes, seconds, fractionalMilliseconds });
1039
+ }
1040
+ match = RFC_850_DATE.exec(value);
1041
+ if (match) {
1042
+ const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;
1043
+ return adjustRfc850Year(buildDate(parseTwoDigitYear(yearStr), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), {
1044
+ hours,
1045
+ minutes,
1046
+ seconds,
1047
+ fractionalMilliseconds
1048
+ }));
1049
+ }
1050
+ match = ASC_TIME.exec(value);
1051
+ if (match) {
1052
+ const [_, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, yearStr] = match;
1053
+ return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr.trimLeft(), "day", 1, 31), { hours, minutes, seconds, fractionalMilliseconds });
1054
+ }
1055
+ throw new TypeError("Invalid RFC-7231 date-time value");
1056
+ };
1057
+ var parseEpochTimestamp = (value) => {
1058
+ if (value === null || value === void 0) {
1059
+ return void 0;
1060
+ }
1061
+ let valueAsDouble;
1062
+ if (typeof value === "number") {
1063
+ valueAsDouble = value;
1064
+ } else if (typeof value === "string") {
1065
+ valueAsDouble = strictParseDouble(value);
1066
+ } else if (typeof value === "object" && value.tag === 1) {
1067
+ valueAsDouble = value.value;
1068
+ } else {
1069
+ throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");
1070
+ }
1071
+ if (Number.isNaN(valueAsDouble) || valueAsDouble === Infinity || valueAsDouble === -Infinity) {
1072
+ throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");
1073
+ }
1074
+ return new Date(Math.round(valueAsDouble * 1e3));
1075
+ };
1076
+ var buildDate = (year2, month, day, time2) => {
1077
+ const adjustedMonth = month - 1;
1078
+ validateDayOfMonth(year2, adjustedMonth, day);
1079
+ return new Date(Date.UTC(year2, adjustedMonth, day, parseDateValue(time2.hours, "hour", 0, 23), parseDateValue(time2.minutes, "minute", 0, 59), parseDateValue(time2.seconds, "seconds", 0, 60), parseMilliseconds(time2.fractionalMilliseconds)));
1080
+ };
1081
+ var parseTwoDigitYear = (value) => {
1082
+ const thisYear = (/* @__PURE__ */ new Date()).getUTCFullYear();
1083
+ const valueInThisCentury = Math.floor(thisYear / 100) * 100 + strictParseShort(stripLeadingZeroes(value));
1084
+ if (valueInThisCentury < thisYear) {
1085
+ return valueInThisCentury + 100;
1086
+ }
1087
+ return valueInThisCentury;
1088
+ };
1089
+ var FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1e3;
1090
+ var adjustRfc850Year = (input) => {
1091
+ if (input.getTime() - (/* @__PURE__ */ new Date()).getTime() > FIFTY_YEARS_IN_MILLIS) {
1092
+ return new Date(Date.UTC(input.getUTCFullYear() - 100, input.getUTCMonth(), input.getUTCDate(), input.getUTCHours(), input.getUTCMinutes(), input.getUTCSeconds(), input.getUTCMilliseconds()));
1093
+ }
1094
+ return input;
1095
+ };
1096
+ var parseMonthByShortName = (value) => {
1097
+ const monthIdx = MONTHS.indexOf(value);
1098
+ if (monthIdx < 0) {
1099
+ throw new TypeError(`Invalid month: ${value}`);
1100
+ }
1101
+ return monthIdx + 1;
1102
+ };
1103
+ var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
1104
+ var validateDayOfMonth = (year2, month, day) => {
1105
+ let maxDays = DAYS_IN_MONTH[month];
1106
+ if (month === 1 && isLeapYear(year2)) {
1107
+ maxDays = 29;
1108
+ }
1109
+ if (day > maxDays) {
1110
+ throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year2}: ${day}`);
1111
+ }
1112
+ };
1113
+ var isLeapYear = (year2) => {
1114
+ return year2 % 4 === 0 && (year2 % 100 !== 0 || year2 % 400 === 0);
1115
+ };
1116
+ var parseDateValue = (value, type, lower, upper) => {
1117
+ const dateVal = strictParseByte(stripLeadingZeroes(value));
1118
+ if (dateVal < lower || dateVal > upper) {
1119
+ throw new TypeError(`${type} must be between ${lower} and ${upper}, inclusive`);
1120
+ }
1121
+ return dateVal;
1122
+ };
1123
+ var parseMilliseconds = (value) => {
1124
+ if (value === null || value === void 0) {
1125
+ return 0;
1126
+ }
1127
+ return strictParseFloat32("0." + value) * 1e3;
1128
+ };
1129
+ var parseOffsetToMilliseconds = (value) => {
1130
+ const directionStr = value[0];
1131
+ let direction = 1;
1132
+ if (directionStr == "+") {
1133
+ direction = 1;
1134
+ } else if (directionStr == "-") {
1135
+ direction = -1;
1136
+ } else {
1137
+ throw new TypeError(`Offset direction, ${directionStr}, must be "+" or "-"`);
1138
+ }
1139
+ const hour = Number(value.substring(1, 3));
1140
+ const minute = Number(value.substring(4, 6));
1141
+ return direction * (hour * 60 + minute) * 60 * 1e3;
1142
+ };
1143
+ var stripLeadingZeroes = (value) => {
1144
+ let idx = 0;
1145
+ while (idx < value.length - 1 && value.charAt(idx) === "0") {
1146
+ idx++;
1147
+ }
1148
+ if (idx === 0) {
1149
+ return value;
1150
+ }
1151
+ return value.slice(idx);
1152
+ };
1153
+
1154
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/lazy-json.js
1155
+ var LazyJsonString = function LazyJsonString2(val) {
1156
+ const str = Object.assign(new String(val), {
1157
+ deserializeJSON() {
1158
+ return JSON.parse(String(val));
1159
+ },
1160
+ toString() {
1161
+ return String(val);
1162
+ },
1163
+ toJSON() {
1164
+ return String(val);
1165
+ }
1166
+ });
1167
+ return str;
1168
+ };
1169
+ LazyJsonString.from = (object) => {
1170
+ if (object && typeof object === "object" && (object instanceof LazyJsonString || "deserializeJSON" in object)) {
1171
+ return object;
1172
+ } else if (typeof object === "string" || Object.getPrototypeOf(object) === String.prototype) {
1173
+ return LazyJsonString(String(object));
1174
+ }
1175
+ return LazyJsonString(JSON.stringify(object));
1176
+ };
1177
+ LazyJsonString.fromObject = LazyJsonString.from;
1178
+
1179
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/quote-header.js
1180
+ function quoteHeader(part) {
1181
+ if (part.includes(",") || part.includes('"')) {
1182
+ part = `"${part.replace(/"/g, '\\"')}"`;
1183
+ }
1184
+ return part;
1185
+ }
1186
+
1187
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/schema-serde-lib/schema-date-utils.js
1188
+ var ddd = `(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?`;
1189
+ var mmm = `(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)`;
1190
+ var time = `(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?`;
1191
+ var date = `(\\d?\\d)`;
1192
+ var year = `(\\d{4})`;
1193
+ var RFC3339_WITH_OFFSET2 = new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/);
1194
+ var IMF_FIXDATE2 = new RegExp(`^${ddd}, ${date} ${mmm} ${year} ${time} GMT$`);
1195
+ var RFC_850_DATE2 = new RegExp(`^${ddd}, ${date}-${mmm}-(\\d\\d) ${time} GMT$`);
1196
+ var ASC_TIME2 = new RegExp(`^${ddd} ${mmm} ( [1-9]|\\d\\d) ${time} ${year}$`);
1197
+ var months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
1198
+ var _parseEpochTimestamp = (value) => {
1199
+ if (value == null) {
1200
+ return void 0;
1201
+ }
1202
+ let num = NaN;
1203
+ if (typeof value === "number") {
1204
+ num = value;
1205
+ } else if (typeof value === "string") {
1206
+ if (!/^-?\d*\.?\d+$/.test(value)) {
1207
+ throw new TypeError(`parseEpochTimestamp - numeric string invalid.`);
1208
+ }
1209
+ num = Number.parseFloat(value);
1210
+ } else if (typeof value === "object" && value.tag === 1) {
1211
+ num = value.value;
1212
+ }
1213
+ if (isNaN(num) || Math.abs(num) === Infinity) {
1214
+ throw new TypeError("Epoch timestamps must be valid finite numbers.");
1215
+ }
1216
+ return new Date(Math.round(num * 1e3));
1217
+ };
1218
+ var _parseRfc3339DateTimeWithOffset = (value) => {
1219
+ if (value == null) {
1220
+ return void 0;
1221
+ }
1222
+ if (typeof value !== "string") {
1223
+ throw new TypeError("RFC3339 timestamps must be strings");
1224
+ }
1225
+ const matches = RFC3339_WITH_OFFSET2.exec(value);
1226
+ if (!matches) {
1227
+ throw new TypeError(`Invalid RFC3339 timestamp format ${value}`);
1228
+ }
1229
+ const [, yearStr, monthStr, dayStr, hours, minutes, seconds, , ms, offsetStr] = matches;
1230
+ range(monthStr, 1, 12);
1231
+ range(dayStr, 1, 31);
1232
+ range(hours, 0, 23);
1233
+ range(minutes, 0, 59);
1234
+ range(seconds, 0, 60);
1235
+ const date2 = new Date(Date.UTC(Number(yearStr), Number(monthStr) - 1, Number(dayStr), Number(hours), Number(minutes), Number(seconds), Number(ms) ? Math.round(parseFloat(`0.${ms}`) * 1e3) : 0));
1236
+ date2.setUTCFullYear(Number(yearStr));
1237
+ if (offsetStr.toUpperCase() != "Z") {
1238
+ const [, sign, offsetH, offsetM] = /([+-])(\d\d):(\d\d)/.exec(offsetStr) || [void 0, "+", 0, 0];
1239
+ const scalar = sign === "-" ? 1 : -1;
1240
+ date2.setTime(date2.getTime() + scalar * (Number(offsetH) * 60 * 60 * 1e3 + Number(offsetM) * 60 * 1e3));
1241
+ }
1242
+ return date2;
1243
+ };
1244
+ var _parseRfc7231DateTime = (value) => {
1245
+ if (value == null) {
1246
+ return void 0;
1247
+ }
1248
+ if (typeof value !== "string") {
1249
+ throw new TypeError("RFC7231 timestamps must be strings.");
1250
+ }
1251
+ let day;
1252
+ let month;
1253
+ let year2;
1254
+ let hour;
1255
+ let minute;
1256
+ let second;
1257
+ let fraction;
1258
+ let matches;
1259
+ if (matches = IMF_FIXDATE2.exec(value)) {
1260
+ [, day, month, year2, hour, minute, second, fraction] = matches;
1261
+ } else if (matches = RFC_850_DATE2.exec(value)) {
1262
+ [, day, month, year2, hour, minute, second, fraction] = matches;
1263
+ year2 = (Number(year2) + 1900).toString();
1264
+ } else if (matches = ASC_TIME2.exec(value)) {
1265
+ [, month, day, hour, minute, second, fraction, year2] = matches;
1266
+ }
1267
+ if (year2 && second) {
1268
+ const timestamp = Date.UTC(Number(year2), months.indexOf(month), Number(day), Number(hour), Number(minute), Number(second), fraction ? Math.round(parseFloat(`0.${fraction}`) * 1e3) : 0);
1269
+ range(day, 1, 31);
1270
+ range(hour, 0, 23);
1271
+ range(minute, 0, 59);
1272
+ range(second, 0, 60);
1273
+ const date2 = new Date(timestamp);
1274
+ date2.setUTCFullYear(Number(year2));
1275
+ return date2;
1276
+ }
1277
+ throw new TypeError(`Invalid RFC7231 date-time value ${value}.`);
1278
+ };
1279
+ function range(v, min, max) {
1280
+ const _v = Number(v);
1281
+ if (_v < min || _v > max) {
1282
+ throw new Error(`Value ${_v} out of range [${min}, ${max}]`);
1283
+ }
1284
+ }
1285
+
1286
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/split-every.js
1287
+ function splitEvery(value, delimiter, numDelimiters) {
1288
+ if (numDelimiters <= 0 || !Number.isInteger(numDelimiters)) {
1289
+ throw new Error("Invalid number of delimiters (" + numDelimiters + ") for splitEvery.");
1290
+ }
1291
+ const segments = value.split(delimiter);
1292
+ if (numDelimiters === 1) {
1293
+ return segments;
1294
+ }
1295
+ const compoundSegments = [];
1296
+ let currentSegment = "";
1297
+ for (let i = 0; i < segments.length; i++) {
1298
+ if (currentSegment === "") {
1299
+ currentSegment = segments[i];
1300
+ } else {
1301
+ currentSegment += delimiter + segments[i];
1302
+ }
1303
+ if ((i + 1) % numDelimiters === 0) {
1304
+ compoundSegments.push(currentSegment);
1305
+ currentSegment = "";
1306
+ }
1307
+ }
1308
+ if (currentSegment !== "") {
1309
+ compoundSegments.push(currentSegment);
1310
+ }
1311
+ return compoundSegments;
1312
+ }
1313
+
1314
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/split-header.js
1315
+ var splitHeader = (value) => {
1316
+ const z = value.length;
1317
+ const values = [];
1318
+ let withinQuotes = false;
1319
+ let prevChar = void 0;
1320
+ let anchor = 0;
1321
+ for (let i = 0; i < z; ++i) {
1322
+ const char = value[i];
1323
+ switch (char) {
1324
+ case `"`:
1325
+ if (prevChar !== "\\") {
1326
+ withinQuotes = !withinQuotes;
1327
+ }
1328
+ break;
1329
+ case ",":
1330
+ if (!withinQuotes) {
1331
+ values.push(value.slice(anchor, i));
1332
+ anchor = i + 1;
1333
+ }
1334
+ break;
1335
+ default:
1336
+ }
1337
+ prevChar = char;
1338
+ }
1339
+ values.push(value.slice(anchor));
1340
+ return values.map((v) => {
1341
+ v = v.trim();
1342
+ const z2 = v.length;
1343
+ if (z2 < 2) {
1344
+ return v;
1345
+ }
1346
+ if (v[0] === `"` && v[z2 - 1] === `"`) {
1347
+ v = v.slice(1, z2 - 1);
1348
+ }
1349
+ return v.replace(/\\"/g, '"');
1350
+ });
1351
+ };
1352
+
1353
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js
1354
+ var format = /^-?((0|[1-9]\d*)(\.\d+)?|\.\d+)([eE][+-]?\d+)?$/;
1355
+ var NumericValue = class _NumericValue {
1356
+ string;
1357
+ type;
1358
+ constructor(string, type) {
1359
+ this.string = string;
1360
+ this.type = type;
1361
+ if (!format.test(string)) {
1362
+ throw new Error(`@smithy/core/serde - NumericValue string must conform to the Smithy bigDecimal format. Received: "${string}"`);
1363
+ }
1364
+ }
1365
+ toString() {
1366
+ return this.string;
1367
+ }
1368
+ static [Symbol.hasInstance](object) {
1369
+ if (!object || typeof object !== "object") {
1370
+ return false;
1371
+ }
1372
+ const _nv = object;
1373
+ return _NumericValue.prototype.isPrototypeOf(object) || _nv.type === "bigDecimal" && format.test(_nv.string);
1374
+ }
1375
+ };
1376
+
1377
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/util-body-length/calculateBodyLength.js
1378
+ import { ReadStream, fstatSync, lstatSync } from "fs";
1379
+ var calculateBodyLength = (body) => {
1380
+ if (!body) {
1381
+ return 0;
1382
+ }
1383
+ if (typeof body === "string") {
1384
+ return Buffer.byteLength(body);
1385
+ } else if (typeof body.byteLength === "number") {
1386
+ return body.byteLength;
1387
+ } else if (typeof body.size === "number") {
1388
+ return body.size;
1389
+ } else if (typeof body.start === "number" && typeof body.end === "number") {
1390
+ return body.end + 1 - body.start;
1391
+ } else if (body instanceof ReadStream) {
1392
+ if (body.path != null) {
1393
+ return lstatSync(body.path).size;
1394
+ } else if (typeof body.fd === "number") {
1395
+ return fstatSync(body.fd).size;
1396
+ }
1397
+ }
1398
+ throw new Error(`Body Length computation failed for ${body}`);
1399
+ };
1400
+
1401
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/toUint8Array.js
1402
+ var toUint8Array = (data) => {
1403
+ if (data instanceof Uint8Array) {
1404
+ return data;
1405
+ }
1406
+ if (typeof data === "string") {
1407
+ return fromUtf8(data);
1408
+ }
1409
+ if (ArrayBuffer.isView(data)) {
1410
+ return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);
1411
+ }
1412
+ return new Uint8Array(data);
1413
+ };
1414
+
1415
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/concatBytes.js
1416
+ function concatBytes(arrays, length) {
1417
+ if (length === void 0) {
1418
+ length = 0;
1419
+ for (const bytes of arrays) {
1420
+ length += bytes.byteLength;
1421
+ }
1422
+ }
1423
+ const result = new Uint8Array(length);
1424
+ let offset = 0;
1425
+ for (const buf of arrays) {
1426
+ result.set(buf, offset);
1427
+ offset += buf.byteLength;
1428
+ }
1429
+ return result;
1430
+ }
1431
+
1432
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/checksum/ChecksumStream.js
1433
+ import { Readable } from "stream";
1434
+ var ChecksumStream = class extends Readable {
1435
+ expectedChecksum;
1436
+ checksumSourceLocation;
1437
+ checksum;
1438
+ source;
1439
+ base64Encoder;
1440
+ constructor({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder }) {
1441
+ super();
1442
+ if (typeof source.pipe !== "function") {
1443
+ throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`);
1444
+ }
1445
+ this.source = source;
1446
+ this.base64Encoder = base64Encoder ?? toBase64;
1447
+ this.expectedChecksum = expectedChecksum;
1448
+ this.checksum = checksum;
1449
+ this.checksumSourceLocation = checksumSourceLocation;
1450
+ this.source.on("data", this.onSourceData);
1451
+ this.source.on("end", this.onSourceEnd);
1452
+ this.source.on("error", this.onSourceError);
1453
+ this.source.on("close", this.onSourceClose);
1454
+ this.source.pause();
1455
+ }
1456
+ onSourceData = (chunk) => {
1457
+ if (this.destroyed) {
1458
+ return;
1459
+ }
1460
+ try {
1461
+ this.checksum.update(chunk);
1462
+ } catch (e) {
1463
+ this.destroy(e);
1464
+ return;
1465
+ }
1466
+ if (!this.push(chunk)) {
1467
+ this.source.pause();
1468
+ }
1469
+ };
1470
+ onSourceEnd = async () => {
1471
+ if (this.destroyed) {
1472
+ return;
1473
+ }
1474
+ try {
1475
+ const digest = await this.checksum.digest();
1476
+ const received = this.base64Encoder(digest);
1477
+ if (this.expectedChecksum !== received) {
1478
+ this.destroy(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${received}" in response header "${this.checksumSourceLocation}".`));
1479
+ return;
1480
+ }
1481
+ } catch (e) {
1482
+ this.destroy(e);
1483
+ return;
1484
+ }
1485
+ this.push(null);
1486
+ };
1487
+ onSourceError = (error) => {
1488
+ this.destroy(error);
1489
+ };
1490
+ onSourceClose = () => {
1491
+ if (!this.destroyed && !this.source.readableEnded) {
1492
+ this.destroy(new Error("Connection lost or stream closed before all data was received."));
1493
+ }
1494
+ };
1495
+ _read(_size) {
1496
+ this.source.resume();
1497
+ }
1498
+ _destroy(error, callback) {
1499
+ this.source?.removeListener("data", this.onSourceData);
1500
+ this.source?.removeListener("end", this.onSourceEnd);
1501
+ this.source?.removeListener("error", this.onSourceError);
1502
+ this.source?.removeListener("close", this.onSourceClose);
1503
+ this.source?.destroy();
1504
+ callback(error);
1505
+ }
1506
+ };
1507
+
1508
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-type-check.js
1509
+ var isReadableStream = (stream) => typeof ReadableStream === "function" && (stream?.constructor?.name === ReadableStream.name || stream instanceof ReadableStream);
1510
+ var isBlob = (blob) => {
1511
+ return typeof Blob === "function" && (blob?.constructor?.name === Blob.name || blob instanceof Blob);
1512
+ };
1513
+
1514
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/fromUtf8.browser.js
1515
+ var fromUtf82 = (input) => new TextEncoder().encode(input);
1516
+
1517
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/util-base64/constants-for-browser.js
1518
+ var chars = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`;
1519
+ var alphabetByEncoding = Object.entries(chars).reduce((acc, [i, c]) => {
1520
+ acc[c] = Number(i);
1521
+ return acc;
1522
+ }, {});
1523
+ var alphabetByValue = chars.split("");
1524
+ var bitsPerLetter = 6;
1525
+ var bitsPerByte = 8;
1526
+ var maxLetterValue = 63;
1527
+
1528
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/util-base64/toBase64.browser.js
1529
+ function toBase642(_input) {
1530
+ let input;
1531
+ if (typeof _input === "string") {
1532
+ input = fromUtf82(_input);
1533
+ } else {
1534
+ input = _input;
1535
+ }
1536
+ const isArrayLike = typeof input === "object" && typeof input.length === "number";
1537
+ const isUint8Array = typeof input === "object" && typeof input.byteOffset === "number" && typeof input.byteLength === "number";
1538
+ if (!isArrayLike && !isUint8Array) {
1539
+ throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");
1540
+ }
1541
+ let str = "";
1542
+ for (let i = 0; i < input.length; i += 3) {
1543
+ let bits = 0;
1544
+ let bitLength = 0;
1545
+ for (let j = i, limit = Math.min(i + 3, input.length); j < limit; j++) {
1546
+ bits |= input[j] << (limit - j - 1) * bitsPerByte;
1547
+ bitLength += bitsPerByte;
1548
+ }
1549
+ const bitClusterCount = Math.ceil(bitLength / bitsPerLetter);
1550
+ bits <<= bitClusterCount * bitsPerLetter - bitLength;
1551
+ for (let k = 1; k <= bitClusterCount; k++) {
1552
+ const offset = (bitClusterCount - k) * bitsPerLetter;
1553
+ str += alphabetByValue[(bits & maxLetterValue << offset) >> offset];
1554
+ }
1555
+ str += "==".slice(0, 4 - bitClusterCount);
1556
+ }
1557
+ return str;
1558
+ }
1559
+
1560
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/checksum/ChecksumStream.browser.js
1561
+ var ReadableStreamRef = typeof ReadableStream === "function" ? ReadableStream : function() {
1562
+ };
1563
+ var ChecksumStream2 = class extends ReadableStreamRef {
1564
+ };
1565
+
1566
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/checksum/createChecksumStream.browser.js
1567
+ var createChecksumStream = ({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder }) => {
1568
+ if (!isReadableStream(source)) {
1569
+ throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`);
1570
+ }
1571
+ const encoder = base64Encoder ?? toBase642;
1572
+ if (typeof TransformStream !== "function") {
1573
+ throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");
1574
+ }
1575
+ const transform = new TransformStream({
1576
+ start() {
1577
+ },
1578
+ async transform(chunk, controller) {
1579
+ checksum.update(chunk);
1580
+ controller.enqueue(chunk);
1581
+ },
1582
+ async flush(controller) {
1583
+ const digest = await checksum.digest();
1584
+ const received = encoder(digest);
1585
+ if (expectedChecksum !== received) {
1586
+ const error = new Error(`Checksum mismatch: expected "${expectedChecksum}" but received "${received}" in response header "${checksumSourceLocation}".`);
1587
+ controller.error(error);
1588
+ } else {
1589
+ controller.terminate();
1590
+ }
1591
+ }
1592
+ });
1593
+ source.pipeThrough(transform);
1594
+ const readable = transform.readable;
1595
+ Object.setPrototypeOf(readable, ChecksumStream2.prototype);
1596
+ return readable;
1597
+ };
1598
+
1599
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/checksum/createChecksumStream.js
1600
+ function createChecksumStream2(init) {
1601
+ if (typeof ReadableStream === "function" && isReadableStream(init.source)) {
1602
+ return createChecksumStream(init);
1603
+ }
1604
+ return new ChecksumStream(init);
1605
+ }
1606
+
1607
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/createBufferedReadable.js
1608
+ import { Readable as Readable2 } from "stream";
1609
+
1610
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/ByteArrayCollector.js
1611
+ var ByteArrayCollector = class {
1612
+ allocByteArray;
1613
+ byteLength = 0;
1614
+ byteArrays = [];
1615
+ constructor(allocByteArray) {
1616
+ this.allocByteArray = allocByteArray;
1617
+ }
1618
+ push(byteArray) {
1619
+ this.byteArrays.push(byteArray);
1620
+ this.byteLength += byteArray.byteLength;
1621
+ }
1622
+ flush() {
1623
+ if (this.byteArrays.length === 1) {
1624
+ const bytes = this.byteArrays[0];
1625
+ this.reset();
1626
+ return bytes;
1627
+ }
1628
+ const aggregation = this.allocByteArray(this.byteLength);
1629
+ let cursor = 0;
1630
+ for (let i = 0; i < this.byteArrays.length; ++i) {
1631
+ const bytes = this.byteArrays[i];
1632
+ aggregation.set(bytes, cursor);
1633
+ cursor += bytes.byteLength;
1634
+ }
1635
+ this.reset();
1636
+ return aggregation;
1637
+ }
1638
+ reset() {
1639
+ this.byteArrays = [];
1640
+ this.byteLength = 0;
1641
+ }
1642
+ };
1643
+
1644
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/createBufferedReadable.browser.js
1645
+ function createBufferedReadableStream(upstream, size, logger2) {
1646
+ const reader = upstream.getReader();
1647
+ let streamBufferingLoggedWarning = false;
1648
+ let bytesSeen = 0;
1649
+ const buffers = ["", new ByteArrayCollector((size2) => new Uint8Array(size2))];
1650
+ let mode = -1;
1651
+ const pull = async (controller) => {
1652
+ const { value, done } = await reader.read();
1653
+ const chunk = value;
1654
+ if (done) {
1655
+ if (mode !== -1) {
1656
+ const remainder = flush(buffers, mode);
1657
+ if (sizeOf(remainder) > 0) {
1658
+ controller.enqueue(remainder);
1659
+ }
1660
+ }
1661
+ controller.close();
1662
+ } else {
1663
+ const chunkMode = modeOf(chunk, false);
1664
+ if (mode !== chunkMode) {
1665
+ if (mode >= 0) {
1666
+ controller.enqueue(flush(buffers, mode));
1667
+ }
1668
+ mode = chunkMode;
1669
+ }
1670
+ if (mode === -1) {
1671
+ controller.enqueue(chunk);
1672
+ return;
1673
+ }
1674
+ const chunkSize = sizeOf(chunk);
1675
+ bytesSeen += chunkSize;
1676
+ const bufferSize = sizeOf(buffers[mode]);
1677
+ if (chunkSize >= size && bufferSize === 0) {
1678
+ controller.enqueue(chunk);
1679
+ } else {
1680
+ const newSize = merge(buffers, mode, chunk);
1681
+ if (!streamBufferingLoggedWarning && bytesSeen > size * 2) {
1682
+ streamBufferingLoggedWarning = true;
1683
+ logger2?.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`);
1684
+ }
1685
+ if (newSize >= size) {
1686
+ controller.enqueue(flush(buffers, mode));
1687
+ } else {
1688
+ await pull(controller);
1689
+ }
1690
+ }
1691
+ }
1692
+ };
1693
+ return new ReadableStream({
1694
+ pull
1695
+ });
1696
+ }
1697
+ function merge(buffers, mode, chunk) {
1698
+ switch (mode) {
1699
+ case 0:
1700
+ buffers[0] += chunk;
1701
+ return sizeOf(buffers[0]);
1702
+ case 1:
1703
+ case 2:
1704
+ buffers[mode].push(chunk);
1705
+ return sizeOf(buffers[mode]);
1706
+ }
1707
+ }
1708
+ function flush(buffers, mode) {
1709
+ switch (mode) {
1710
+ case 0:
1711
+ const s = buffers[0];
1712
+ buffers[0] = "";
1713
+ return s;
1714
+ case 1:
1715
+ case 2:
1716
+ return buffers[mode].flush();
1717
+ }
1718
+ throw new Error(`@smithy/util-stream - invalid index ${mode} given to flush()`);
1719
+ }
1720
+ function sizeOf(chunk) {
1721
+ return chunk?.byteLength ?? chunk?.length ?? 0;
1722
+ }
1723
+ function modeOf(chunk, allowBuffer = true) {
1724
+ if (allowBuffer && typeof Buffer !== "undefined" && chunk instanceof Buffer) {
1725
+ return 2;
1726
+ }
1727
+ if (chunk instanceof Uint8Array) {
1728
+ return 1;
1729
+ }
1730
+ if (typeof chunk === "string") {
1731
+ return 0;
1732
+ }
1733
+ return -1;
1734
+ }
1735
+
1736
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/createBufferedReadable.js
1737
+ function createBufferedReadable(upstream, size, logger2) {
1738
+ if (isReadableStream(upstream)) {
1739
+ return createBufferedReadableStream(upstream, size, logger2);
1740
+ }
1741
+ const downstream = new Readable2({ read() {
1742
+ } });
1743
+ let streamBufferingLoggedWarning = false;
1744
+ let bytesSeen = 0;
1745
+ const buffers = [
1746
+ "",
1747
+ new ByteArrayCollector((size2) => new Uint8Array(size2)),
1748
+ new ByteArrayCollector((size2) => Buffer.from(new Uint8Array(size2)))
1749
+ ];
1750
+ let mode = -1;
1751
+ upstream.on("data", (chunk) => {
1752
+ const chunkMode = modeOf(chunk, true);
1753
+ if (mode !== chunkMode) {
1754
+ if (mode >= 0) {
1755
+ downstream.push(flush(buffers, mode));
1756
+ }
1757
+ mode = chunkMode;
1758
+ }
1759
+ if (mode === -1) {
1760
+ downstream.push(chunk);
1761
+ return;
1762
+ }
1763
+ const chunkSize = sizeOf(chunk);
1764
+ bytesSeen += chunkSize;
1765
+ const bufferSize = sizeOf(buffers[mode]);
1766
+ if (chunkSize >= size && bufferSize === 0) {
1767
+ downstream.push(chunk);
1768
+ } else {
1769
+ const newSize = merge(buffers, mode, chunk);
1770
+ if (!streamBufferingLoggedWarning && bytesSeen > size * 2) {
1771
+ streamBufferingLoggedWarning = true;
1772
+ logger2?.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`);
1773
+ }
1774
+ if (newSize >= size) {
1775
+ downstream.push(flush(buffers, mode));
1776
+ }
1777
+ }
1778
+ });
1779
+ upstream.on("end", () => {
1780
+ if (mode !== -1) {
1781
+ const remainder = flush(buffers, mode);
1782
+ if (sizeOf(remainder) > 0) {
1783
+ downstream.push(remainder);
1784
+ }
1785
+ }
1786
+ downstream.push(null);
1787
+ });
1788
+ return downstream;
1789
+ }
1790
+
1791
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/getAwsChunkedEncodingStream.js
1792
+ import { Readable as Readable3 } from "stream";
1793
+
1794
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/getAwsChunkedEncodingStream.browser.js
1795
+ var getAwsChunkedEncodingStream = (readableStream, options) => {
1796
+ const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options;
1797
+ const checksumRequired = base64Encoder !== void 0 && bodyLengthChecker !== void 0 && checksumAlgorithmFn !== void 0 && checksumLocationName !== void 0 && streamHasher !== void 0;
1798
+ const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : void 0;
1799
+ const reader = readableStream.getReader();
1800
+ return new ReadableStream({
1801
+ async pull(controller) {
1802
+ const { value, done } = await reader.read();
1803
+ if (done) {
1804
+ controller.enqueue(`0\r
1805
+ `);
1806
+ if (checksumRequired) {
1807
+ const checksum = base64Encoder(await digest);
1808
+ controller.enqueue(`${checksumLocationName}:${checksum}\r
1809
+ `);
1810
+ controller.enqueue(`\r
1811
+ `);
1812
+ }
1813
+ controller.close();
1814
+ } else {
1815
+ controller.enqueue(`${(bodyLengthChecker(value) || 0).toString(16)}\r
1816
+ ${value}\r
1817
+ `);
1818
+ }
1819
+ }
1820
+ });
1821
+ };
1822
+
1823
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/getAwsChunkedEncodingStream.js
1824
+ function getAwsChunkedEncodingStream2(stream, options) {
1825
+ const readable = stream;
1826
+ const readableStream = stream;
1827
+ if (isReadableStream(readableStream)) {
1828
+ return getAwsChunkedEncodingStream(readableStream, options);
1829
+ }
1830
+ const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options;
1831
+ const checksumRequired = base64Encoder !== void 0 && checksumAlgorithmFn !== void 0 && checksumLocationName !== void 0 && streamHasher !== void 0;
1832
+ const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readable) : void 0;
1833
+ const awsChunkedEncodingStream = new Readable3({
1834
+ read: () => {
1835
+ }
1836
+ });
1837
+ readable.on("data", (data) => {
1838
+ const length = bodyLengthChecker(data) || 0;
1839
+ if (length === 0) {
1840
+ return;
1841
+ }
1842
+ awsChunkedEncodingStream.push(`${length.toString(16)}\r
1843
+ `);
1844
+ awsChunkedEncodingStream.push(data);
1845
+ awsChunkedEncodingStream.push("\r\n");
1846
+ });
1847
+ readable.on("end", async () => {
1848
+ awsChunkedEncodingStream.push(`0\r
1849
+ `);
1850
+ if (checksumRequired) {
1851
+ const checksum = base64Encoder(await digest);
1852
+ awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\r
1853
+ `);
1854
+ awsChunkedEncodingStream.push(`\r
1855
+ `);
1856
+ }
1857
+ awsChunkedEncodingStream.push(null);
1858
+ });
1859
+ return awsChunkedEncodingStream;
1860
+ }
1861
+
1862
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/sdk-stream-mixin.js
1863
+ import { Readable as Readable4 } from "stream";
1864
+
1865
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/toUtf8.browser.js
1866
+ var toUtf82 = (input) => {
1867
+ if (typeof input === "string") {
1868
+ return input;
1869
+ }
1870
+ if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") {
1871
+ throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");
1872
+ }
1873
+ return new TextDecoder("utf-8").decode(input);
1874
+ };
1875
+
1876
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-collector.browser.js
1877
+ var streamCollector = async (stream) => {
1878
+ if (isBlob(stream)) {
1879
+ return collectBlob(stream);
1880
+ }
1881
+ return collectReadableStream(stream);
1882
+ };
1883
+ async function collectBlob(blob) {
1884
+ return blob.arrayBuffer().then((ab) => new Uint8Array(ab));
1885
+ }
1886
+ async function collectReadableStream(stream) {
1887
+ const chunks = [];
1888
+ const reader = stream.getReader();
1889
+ let length = 0;
1890
+ while (true) {
1891
+ const { done, value } = await reader.read();
1892
+ if (value) {
1893
+ chunks.push(value);
1894
+ length += value.length;
1895
+ }
1896
+ if (done) {
1897
+ break;
1898
+ }
1899
+ }
1900
+ return concatBytes(chunks, length);
1901
+ }
1902
+
1903
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/sdk-stream-mixin.browser.js
1904
+ var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed.";
1905
+ var sdkStreamMixin = (stream) => {
1906
+ if (!isBlobInstance(stream) && !isReadableStream(stream)) {
1907
+ const name = stream?.__proto__?.constructor?.name || stream;
1908
+ throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${name}`);
1909
+ }
1910
+ let transformed = false;
1911
+ const transformToByteArray = async () => {
1912
+ if (transformed) {
1913
+ throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);
1914
+ }
1915
+ transformed = true;
1916
+ return await streamCollector(stream);
1917
+ };
1918
+ const blobToWebStream = (blob) => {
1919
+ if (typeof blob.stream !== "function") {
1920
+ throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");
1921
+ }
1922
+ return blob.stream();
1923
+ };
1924
+ return Object.assign(stream, {
1925
+ transformToByteArray,
1926
+ transformToString: async (encoding) => {
1927
+ const buf = await transformToByteArray();
1928
+ if (encoding === "base64") {
1929
+ return toBase642(buf);
1930
+ } else if (encoding === "hex") {
1931
+ return toHex(buf);
1932
+ } else if (encoding === void 0 || encoding === "utf8" || encoding === "utf-8") {
1933
+ return toUtf82(buf);
1934
+ } else if (typeof TextDecoder === "function") {
1935
+ return new TextDecoder(encoding).decode(buf);
1936
+ } else {
1937
+ throw new Error("TextDecoder is not available, please make sure polyfill is provided.");
1938
+ }
1939
+ },
1940
+ transformToWebStream: () => {
1941
+ if (transformed) {
1942
+ throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);
1943
+ }
1944
+ transformed = true;
1945
+ if (isBlobInstance(stream)) {
1946
+ return blobToWebStream(stream);
1947
+ } else if (isReadableStream(stream)) {
1948
+ return stream;
1949
+ } else {
1950
+ throw new Error(`Cannot transform payload to web stream, got ${stream}`);
1951
+ }
1952
+ }
1953
+ });
1954
+ };
1955
+ var isBlobInstance = (stream) => typeof Blob === "function" && stream instanceof Blob;
1956
+
1957
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-collector.js
1958
+ import { Writable } from "stream";
1959
+ var streamCollector2 = (stream) => {
1960
+ if (isBlob(stream)) {
1961
+ return collectBlob(stream);
1962
+ }
1963
+ if (isReadableStream(stream)) {
1964
+ return collectReadableStream(stream);
1965
+ }
1966
+ return new Promise((resolve, reject) => {
1967
+ const collector = new Collector();
1968
+ const nodeStream = stream;
1969
+ nodeStream.pipe(collector);
1970
+ nodeStream.on("error", (err) => {
1971
+ collector.end();
1972
+ reject(err);
1973
+ });
1974
+ collector.on("error", reject);
1975
+ collector.on("finish", function() {
1976
+ const bytes = concatBytes(this.bufferedBytes);
1977
+ resolve(bytes);
1978
+ });
1979
+ });
1980
+ };
1981
+ var Collector = class extends Writable {
1982
+ bufferedBytes = [];
1983
+ _write(chunk, encoding, callback) {
1984
+ this.bufferedBytes.push(chunk);
1985
+ callback();
1986
+ }
1987
+ };
1988
+
1989
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/sdk-stream-mixin.js
1990
+ var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED2 = "The stream has already been transformed.";
1991
+ var sdkStreamMixin2 = (stream) => {
1992
+ if (!(stream instanceof Readable4)) {
1993
+ try {
1994
+ return sdkStreamMixin(stream);
1995
+ } catch (ignored) {
1996
+ const name = stream?.__proto__?.constructor?.name || stream;
1997
+ throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${name}`);
1998
+ }
1999
+ }
2000
+ let transformed = false;
2001
+ const transformToByteArray = async () => {
2002
+ if (transformed) {
2003
+ throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED2);
2004
+ }
2005
+ transformed = true;
2006
+ return await streamCollector2(stream);
2007
+ };
2008
+ return Object.assign(stream, {
2009
+ transformToByteArray,
2010
+ transformToString: async (encoding) => {
2011
+ const buf = await transformToByteArray();
2012
+ if (encoding === void 0 || Buffer.isEncoding(encoding)) {
2013
+ return fromArrayBuffer(buf.buffer, buf.byteOffset, buf.byteLength).toString(encoding);
2014
+ } else {
2015
+ const decoder = new TextDecoder(encoding);
2016
+ return decoder.decode(buf);
2017
+ }
2018
+ },
2019
+ transformToWebStream: () => {
2020
+ if (transformed) {
2021
+ throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED2);
2022
+ }
2023
+ if (stream.readableFlowing !== null) {
2024
+ throw new Error("The stream has been consumed by other callbacks.");
2025
+ }
2026
+ if (typeof Readable4.toWeb !== "function") {
2027
+ throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.");
2028
+ }
2029
+ transformed = true;
2030
+ return Readable4.toWeb(stream);
2031
+ }
2032
+ });
2033
+ };
2034
+
2035
+ // ../../node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/serde/index.js
2036
+ var Uint8ArrayBlobAdapter = class extends bindUint8ArrayBlobAdapter(toUtf8, fromUtf8, toBase64, fromBase64) {
2037
+ };
2038
+ var _getRandomValues = getRandomValues;
2039
+ var v4 = bindV4(_getRandomValues);
2040
+ var generateIdempotencyToken = v4;
2041
+
2042
+ export {
2043
+ EndpointURLScheme,
2044
+ AlgorithmId,
2045
+ SMITHY_CONTEXT_KEY,
2046
+ IniSectionType,
2047
+ getSmithyContext,
2048
+ hasOwn,
2049
+ HttpRequest,
2050
+ HttpResponse,
2051
+ isValidHostLabel,
2052
+ isValidHostname,
2053
+ normalizeProvider,
2054
+ parseUrl,
2055
+ toEndpointV1,
2056
+ deref,
2057
+ getSchemaSerdePlugin,
2058
+ translateTraits,
2059
+ NormalizedSchema,
2060
+ TypeRegistry,
2061
+ isArrayBuffer,
2062
+ fromBase64,
2063
+ fromUtf8,
2064
+ toBase64,
2065
+ toUtf8,
2066
+ dateToUtcString,
2067
+ parseRfc3339DateTime,
2068
+ parseRfc3339DateTimeWithOffset,
2069
+ parseRfc7231DateTime,
2070
+ parseEpochTimestamp,
2071
+ LazyJsonString,
2072
+ quoteHeader,
2073
+ _parseEpochTimestamp,
2074
+ _parseRfc3339DateTimeWithOffset,
2075
+ _parseRfc7231DateTime,
2076
+ splitEvery,
2077
+ splitHeader,
2078
+ NumericValue,
2079
+ fromHex,
2080
+ toHex,
2081
+ calculateBodyLength,
2082
+ toUint8Array,
2083
+ createChecksumStream2 as createChecksumStream,
2084
+ createBufferedReadable,
2085
+ getAwsChunkedEncodingStream2 as getAwsChunkedEncodingStream,
2086
+ streamCollector2 as streamCollector,
2087
+ sdkStreamMixin2 as sdkStreamMixin,
2088
+ Uint8ArrayBlobAdapter,
2089
+ v4,
2090
+ generateIdempotencyToken
2091
+ };