@larkup/cli 0.3.1 → 0.3.3

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 (43) hide show
  1. package/dist/{chunk-ODWAFTDP.js → chunk-2IVYLF4F.js} +1 -1
  2. package/dist/chunk-3GL3SZFJ.js +212 -0
  3. package/dist/chunk-5BX2UVG2.js +2352 -0
  4. package/dist/chunk-5RGEHTEF.js +646 -0
  5. package/dist/{chunk-65EVYGDT.js → chunk-7KURHXYU.js} +38 -38
  6. package/dist/chunk-A2PXF6Y7.js +1426 -0
  7. package/dist/{chunk-3EBUYTA7.js → chunk-ERDDY5EQ.js} +1 -1
  8. package/dist/{chunk-N6IF5QLH.js → chunk-HQPSE5ZU.js} +28 -36
  9. package/dist/chunk-IPKRK5UI.js +73 -0
  10. package/dist/{chunk-HAABLEPO.js → chunk-QAJSSODU.js} +1 -12
  11. package/dist/{chunk-BDMLJQRN.js → chunk-QKPH65NY.js} +1 -1
  12. package/dist/{chunk-S5DCG3CZ.js → chunk-RN25NOBI.js} +3 -3
  13. package/dist/{chunk-WVF2A44B.js → chunk-SAQHMCEF.js} +3 -3
  14. package/dist/{chunk-77BPWBHR.js → chunk-SLNKM4UO.js} +1 -1
  15. package/dist/{chunk-HOPZALAP.js → chunk-TJPYJ5TS.js} +1 -1
  16. package/dist/{chunk-4XN2IRCG.js → chunk-ZBGNJVTC.js} +3 -3
  17. package/dist/chunk-ZYHZIBTH.js +1272 -0
  18. package/dist/{dist-es-S5FAFKBD.js → dist-es-3L6W7F7P.js} +4 -4
  19. package/dist/{dist-es-YD724GH3.js → dist-es-6MPMKRLG.js} +21 -21
  20. package/dist/{dist-es-F6WXDZQY.js → dist-es-7LQAPSS6.js} +7 -7
  21. package/dist/{dist-es-NEADJWQM.js → dist-es-CVOBCRJ5.js} +9 -9
  22. package/dist/{dist-es-5DTOPEBY.js → dist-es-DAE2AYZV.js} +30 -23
  23. package/dist/{dist-es-BM4STLL5.js → dist-es-G4H4NZOY.js} +7 -7
  24. package/dist/{dist-es-LH5Y4P7D.js → dist-es-HV6ZWB2M.js} +8 -8
  25. package/dist/{dist-es-KMHWFNXI.js → dist-es-PQXH3VYE.js} +12 -9
  26. package/dist/{dist-es-3QFDPX44.js → dist-es-RGSF6JKX.js} +255 -231
  27. package/dist/{dist-es-DS5SFRTK.js → dist-es-UWL5EGDP.js} +1 -1
  28. package/dist/{chunk-FUTLPXFR.js → event-streams-NVY5IGD3.js} +31 -31
  29. package/dist/{event-streams-NPIZBVLJ.js → event-streams-RZ2JU5EF.js} +1 -2
  30. package/dist/index.js +33 -10
  31. package/dist/{loadSso-HXXA5UNF.js → loadSso-DEHYSFO4.js} +66 -62
  32. package/dist/{signin-7FUGJFG3.js → signin-CTAMN4QW.js} +70 -66
  33. package/dist/{sso-oidc-EPMF7LMF.js → sso-oidc-ZYLSPNAE.js} +69 -65
  34. package/dist/{sts-RBEOIBEJ.js → sts-EQDDSBAR.js} +75 -71
  35. package/dist/{tool-loader-2WHU3H77.js → tool-loader-V7TWBSTT.js} +2 -2
  36. package/dist/{tool-registry-BNRTSH77.js → tool-registry-5RFLM6AW.js} +1 -1
  37. package/package.json +3 -3
  38. package/dist/chunk-A7HMSODH.js +0 -126
  39. package/dist/chunk-FY7KWENQ.js +0 -598
  40. package/dist/chunk-MYOADNR2.js +0 -515
  41. package/dist/chunk-YUC4VMEE.js +0 -776
  42. package/dist/tool-loader-UCLZNPMP.js +0 -14
  43. package/dist/tool-registry-JS5NUNN6.js +0 -21
@@ -0,0 +1,1272 @@
1
+ import {
2
+ HttpResponse,
3
+ getSmithyContext,
4
+ toEndpointV1
5
+ } from "./chunk-3GL3SZFJ.js";
6
+
7
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/schema/schemas/operation.js
8
+ var operation = (namespace, name, traits, input, output) => ({
9
+ name,
10
+ namespace,
11
+ traits,
12
+ input,
13
+ output
14
+ });
15
+
16
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js
17
+ var schemaDeserializationMiddleware = (config) => (next, context) => async (args) => {
18
+ const { response } = await next(args);
19
+ const { operationSchema } = getSmithyContext(context);
20
+ const [, ns, n, t, i, o] = operationSchema ?? [];
21
+ try {
22
+ const parsed = await config.protocol.deserializeResponse(operation(ns, n, t, i, o), {
23
+ ...config,
24
+ ...context
25
+ }, response);
26
+ return {
27
+ response,
28
+ output: parsed
29
+ };
30
+ } catch (error) {
31
+ Object.defineProperty(error, "$response", {
32
+ value: response,
33
+ enumerable: false,
34
+ writable: false,
35
+ configurable: false
36
+ });
37
+ if (!("$metadata" in error)) {
38
+ const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`;
39
+ try {
40
+ error.message += "\n " + hint;
41
+ } catch (ignored) {
42
+ if (!context.logger || context.logger?.constructor?.name === "NoOpLogger") {
43
+ console.warn(hint);
44
+ } else {
45
+ context.logger?.warn?.(hint);
46
+ }
47
+ }
48
+ if (typeof error.$responseBodyText !== "undefined") {
49
+ if (error.$response) {
50
+ error.$response.body = error.$responseBodyText;
51
+ }
52
+ }
53
+ try {
54
+ if (HttpResponse.isInstance(response)) {
55
+ const { headers = {}, statusCode } = response;
56
+ const headerEntries = Object.entries(headers);
57
+ error.$metadata = {
58
+ httpStatusCode: statusCode,
59
+ requestId: findHeader(/^x-[\w-]+-request-?id$/, headerEntries),
60
+ extendedRequestId: findHeader(/^x-[\w-]+-id-2$/, headerEntries),
61
+ cfId: findHeader(/^x-[\w-]+-cf-id$/, headerEntries)
62
+ };
63
+ }
64
+ } catch (ignored) {
65
+ }
66
+ }
67
+ throw error;
68
+ }
69
+ };
70
+ var findHeader = (pattern, headers) => {
71
+ return (headers.find(([k]) => {
72
+ return k.match(pattern);
73
+ }) || [void 0, void 0])[1];
74
+ };
75
+
76
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js
77
+ var schemaSerializationMiddleware = (config) => (next, context) => async (args) => {
78
+ const { operationSchema } = getSmithyContext(context);
79
+ const [, ns, n, t, i, o] = operationSchema ?? [];
80
+ const endpoint = context.endpointV2 ? async () => toEndpointV1(context.endpointV2) : config.endpoint;
81
+ const request = await config.protocol.serializeRequest(operation(ns, n, t, i, o), args.input, {
82
+ ...config,
83
+ ...context,
84
+ endpoint
85
+ });
86
+ return next({
87
+ ...args,
88
+ request
89
+ });
90
+ };
91
+
92
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/schema/middleware/getSchemaSerdePlugin.js
93
+ var deserializerMiddlewareOption = {
94
+ name: "deserializerMiddleware",
95
+ step: "deserialize",
96
+ tags: ["DESERIALIZER"],
97
+ override: true
98
+ };
99
+ var serializerMiddlewareOption = {
100
+ name: "serializerMiddleware",
101
+ step: "serialize",
102
+ tags: ["SERIALIZER"],
103
+ override: true
104
+ };
105
+ function getSchemaSerdePlugin(config) {
106
+ return {
107
+ applyToStack: (commandStack) => {
108
+ commandStack.add(schemaSerializationMiddleware(config), serializerMiddlewareOption);
109
+ commandStack.add(schemaDeserializationMiddleware(config), deserializerMiddlewareOption);
110
+ config.protocol.setSerdeContext(config);
111
+ }
112
+ };
113
+ }
114
+
115
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js
116
+ var TypeRegistry = class _TypeRegistry {
117
+ namespace;
118
+ schemas;
119
+ exceptions;
120
+ static registries = /* @__PURE__ */ new Map();
121
+ constructor(namespace, schemas = /* @__PURE__ */ new Map(), exceptions = /* @__PURE__ */ new Map()) {
122
+ this.namespace = namespace;
123
+ this.schemas = schemas;
124
+ this.exceptions = exceptions;
125
+ }
126
+ static for(namespace) {
127
+ if (!_TypeRegistry.registries.has(namespace)) {
128
+ _TypeRegistry.registries.set(namespace, new _TypeRegistry(namespace));
129
+ }
130
+ return _TypeRegistry.registries.get(namespace);
131
+ }
132
+ copyFrom(other) {
133
+ const { schemas, exceptions } = this;
134
+ for (const [k, v] of other.schemas) {
135
+ if (!schemas.has(k)) {
136
+ schemas.set(k, v);
137
+ }
138
+ }
139
+ for (const [k, v] of other.exceptions) {
140
+ if (!exceptions.has(k)) {
141
+ exceptions.set(k, v);
142
+ }
143
+ }
144
+ }
145
+ register(shapeId, schema) {
146
+ const qualifiedName = this.normalizeShapeId(shapeId);
147
+ for (const r of [this, _TypeRegistry.for(qualifiedName.split("#")[0])]) {
148
+ r.schemas.set(qualifiedName, schema);
149
+ }
150
+ }
151
+ getSchema(shapeId) {
152
+ const id = this.normalizeShapeId(shapeId);
153
+ if (!this.schemas.has(id)) {
154
+ if (!shapeId.includes("#")) {
155
+ const suffix = "#" + shapeId;
156
+ const candidates = [];
157
+ for (const [shapeId2, schema] of this.schemas.entries()) {
158
+ if (shapeId2.endsWith(suffix)) {
159
+ candidates.push(schema);
160
+ }
161
+ }
162
+ if (candidates.length === 1) {
163
+ return candidates[0];
164
+ }
165
+ }
166
+ throw new Error(`@smithy/core/schema - schema not found for ${id}`);
167
+ }
168
+ return this.schemas.get(id);
169
+ }
170
+ registerError(es, ctor) {
171
+ const $error = es;
172
+ const ns = $error[1];
173
+ for (const r of [this, _TypeRegistry.for(ns)]) {
174
+ r.schemas.set(ns + "#" + $error[2], $error);
175
+ r.exceptions.set($error, ctor);
176
+ }
177
+ }
178
+ getErrorCtor(es) {
179
+ const $error = es;
180
+ if (this.exceptions.has($error)) {
181
+ return this.exceptions.get($error);
182
+ }
183
+ const registry = _TypeRegistry.for($error[1]);
184
+ return registry.exceptions.get($error);
185
+ }
186
+ getBaseException() {
187
+ for (const exceptionKey of this.exceptions.keys()) {
188
+ if (Array.isArray(exceptionKey)) {
189
+ const [, ns, name] = exceptionKey;
190
+ const id = ns + "#" + name;
191
+ if (id.startsWith("smithy.ts.sdk.synthetic.") && id.endsWith("ServiceException")) {
192
+ return exceptionKey;
193
+ }
194
+ }
195
+ }
196
+ return void 0;
197
+ }
198
+ find(predicate) {
199
+ for (const schema of this.schemas.values()) {
200
+ if (predicate(schema)) {
201
+ return schema;
202
+ }
203
+ }
204
+ return void 0;
205
+ }
206
+ clear() {
207
+ this.schemas.clear();
208
+ this.exceptions.clear();
209
+ }
210
+ normalizeShapeId(shapeId) {
211
+ if (shapeId.includes("#")) {
212
+ return shapeId;
213
+ }
214
+ return this.namespace + "#" + shapeId;
215
+ }
216
+ };
217
+
218
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/schema/deref.js
219
+ var deref = (schemaRef) => {
220
+ if (typeof schemaRef === "function") {
221
+ return schemaRef();
222
+ }
223
+ return schemaRef;
224
+ };
225
+
226
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js
227
+ var traitsCache = [];
228
+ function translateTraits(indicator) {
229
+ if (typeof indicator === "object") {
230
+ return indicator;
231
+ }
232
+ indicator = indicator | 0;
233
+ if (traitsCache[indicator]) {
234
+ return traitsCache[indicator];
235
+ }
236
+ const traits = {};
237
+ let i = 0;
238
+ for (const trait of [
239
+ "httpLabel",
240
+ "idempotent",
241
+ "idempotencyToken",
242
+ "sensitive",
243
+ "httpPayload",
244
+ "httpResponseCode",
245
+ "httpQueryParams"
246
+ ]) {
247
+ if ((indicator >> i++ & 1) === 1) {
248
+ traits[trait] = 1;
249
+ }
250
+ }
251
+ return traitsCache[indicator] = traits;
252
+ }
253
+
254
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js
255
+ var anno = {
256
+ it: Symbol.for("@smithy/nor-struct-it"),
257
+ ns: Symbol.for("@smithy/ns")
258
+ };
259
+ var simpleSchemaCacheN = [];
260
+ var simpleSchemaCacheS = {};
261
+ var NormalizedSchema = class _NormalizedSchema {
262
+ ref;
263
+ memberName;
264
+ static symbol = Symbol.for("@smithy/nor");
265
+ symbol = _NormalizedSchema.symbol;
266
+ name;
267
+ schema;
268
+ _isMemberSchema;
269
+ traits;
270
+ memberTraits;
271
+ normalizedTraits;
272
+ constructor(ref, memberName) {
273
+ this.ref = ref;
274
+ this.memberName = memberName;
275
+ const traitStack = [];
276
+ let _ref = ref;
277
+ let schema = ref;
278
+ this._isMemberSchema = false;
279
+ while (isMemberSchema(_ref)) {
280
+ traitStack.push(_ref[1]);
281
+ _ref = _ref[0];
282
+ schema = deref(_ref);
283
+ this._isMemberSchema = true;
284
+ }
285
+ if (traitStack.length > 0) {
286
+ this.memberTraits = {};
287
+ for (let i = traitStack.length - 1; i >= 0; --i) {
288
+ const traitSet = traitStack[i];
289
+ Object.assign(this.memberTraits, translateTraits(traitSet));
290
+ }
291
+ } else {
292
+ this.memberTraits = 0;
293
+ }
294
+ if (schema instanceof _NormalizedSchema) {
295
+ const computedMemberTraits = this.memberTraits;
296
+ Object.assign(this, schema);
297
+ this.memberTraits = Object.assign({}, computedMemberTraits, schema.getMemberTraits(), this.getMemberTraits());
298
+ this.normalizedTraits = void 0;
299
+ this.memberName = memberName ?? schema.memberName;
300
+ return;
301
+ }
302
+ this.schema = deref(schema);
303
+ if (isStaticSchema(this.schema)) {
304
+ this.name = `${this.schema[1]}#${this.schema[2]}`;
305
+ this.traits = this.schema[3];
306
+ } else {
307
+ this.name = this.memberName ?? String(schema);
308
+ this.traits = 0;
309
+ }
310
+ if (this._isMemberSchema && !memberName) {
311
+ throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(true)} missing member name.`);
312
+ }
313
+ }
314
+ static [Symbol.hasInstance](lhs) {
315
+ const isPrototype = this.prototype.isPrototypeOf(lhs);
316
+ if (!isPrototype && typeof lhs === "object" && lhs !== null) {
317
+ const ns = lhs;
318
+ return ns.symbol === this.symbol;
319
+ }
320
+ return isPrototype;
321
+ }
322
+ static of(ref) {
323
+ const keyAble = typeof ref === "function" || typeof ref === "object" && ref !== null;
324
+ if (typeof ref === "number") {
325
+ if (simpleSchemaCacheN[ref]) {
326
+ return simpleSchemaCacheN[ref];
327
+ }
328
+ } else if (typeof ref === "string") {
329
+ if (simpleSchemaCacheS[ref]) {
330
+ return simpleSchemaCacheS[ref];
331
+ }
332
+ } else if (keyAble) {
333
+ if (ref[anno.ns]) {
334
+ return ref[anno.ns];
335
+ }
336
+ }
337
+ const sc = deref(ref);
338
+ if (sc instanceof _NormalizedSchema) {
339
+ return sc;
340
+ }
341
+ if (isMemberSchema(sc)) {
342
+ const [ns2, traits] = sc;
343
+ if (ns2 instanceof _NormalizedSchema) {
344
+ Object.assign(ns2.getMergedTraits(), translateTraits(traits));
345
+ return ns2;
346
+ }
347
+ throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(ref, null, 2)}.`);
348
+ }
349
+ const ns = new _NormalizedSchema(sc);
350
+ if (keyAble) {
351
+ return ref[anno.ns] = ns;
352
+ }
353
+ if (typeof sc === "string") {
354
+ return simpleSchemaCacheS[sc] = ns;
355
+ }
356
+ if (typeof sc === "number") {
357
+ return simpleSchemaCacheN[sc] = ns;
358
+ }
359
+ return ns;
360
+ }
361
+ getSchema() {
362
+ const sc = this.schema;
363
+ if (Array.isArray(sc) && sc[0] === 0) {
364
+ return sc[4];
365
+ }
366
+ return sc;
367
+ }
368
+ getName(withNamespace = false) {
369
+ const { name } = this;
370
+ const short = !withNamespace && name && name.includes("#");
371
+ return short ? name.split("#")[1] : name || void 0;
372
+ }
373
+ getMemberName() {
374
+ return this.memberName;
375
+ }
376
+ isMemberSchema() {
377
+ return this._isMemberSchema;
378
+ }
379
+ isListSchema() {
380
+ const sc = this.getSchema();
381
+ return typeof sc === "number" ? sc >= 64 && sc < 128 : sc[0] === 1;
382
+ }
383
+ isMapSchema() {
384
+ const sc = this.getSchema();
385
+ return typeof sc === "number" ? sc >= 128 && sc <= 255 : sc[0] === 2;
386
+ }
387
+ isStructSchema() {
388
+ const sc = this.getSchema();
389
+ if (typeof sc !== "object") {
390
+ return false;
391
+ }
392
+ const id = sc[0];
393
+ return id === 3 || id === -3 || id === 4;
394
+ }
395
+ isUnionSchema() {
396
+ const sc = this.getSchema();
397
+ if (typeof sc !== "object") {
398
+ return false;
399
+ }
400
+ return sc[0] === 4;
401
+ }
402
+ isBlobSchema() {
403
+ const sc = this.getSchema();
404
+ return sc === 21 || sc === 42;
405
+ }
406
+ isTimestampSchema() {
407
+ const sc = this.getSchema();
408
+ return typeof sc === "number" && sc >= 4 && sc <= 7;
409
+ }
410
+ isUnitSchema() {
411
+ return this.getSchema() === "unit";
412
+ }
413
+ isDocumentSchema() {
414
+ return this.getSchema() === 15;
415
+ }
416
+ isStringSchema() {
417
+ return this.getSchema() === 0;
418
+ }
419
+ isBooleanSchema() {
420
+ return this.getSchema() === 2;
421
+ }
422
+ isNumericSchema() {
423
+ return this.getSchema() === 1;
424
+ }
425
+ isBigIntegerSchema() {
426
+ return this.getSchema() === 17;
427
+ }
428
+ isBigDecimalSchema() {
429
+ return this.getSchema() === 19;
430
+ }
431
+ isStreaming() {
432
+ const { streaming } = this.getMergedTraits();
433
+ return !!streaming || this.getSchema() === 42;
434
+ }
435
+ isIdempotencyToken() {
436
+ return !!this.getMergedTraits().idempotencyToken;
437
+ }
438
+ getMergedTraits() {
439
+ return this.normalizedTraits ?? (this.normalizedTraits = {
440
+ ...this.getOwnTraits(),
441
+ ...this.getMemberTraits()
442
+ });
443
+ }
444
+ getMemberTraits() {
445
+ return translateTraits(this.memberTraits);
446
+ }
447
+ getOwnTraits() {
448
+ return translateTraits(this.traits);
449
+ }
450
+ getKeySchema() {
451
+ const [isDoc, isMap] = [this.isDocumentSchema(), this.isMapSchema()];
452
+ if (!isDoc && !isMap) {
453
+ throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(true)}`);
454
+ }
455
+ const schema = this.getSchema();
456
+ const memberSchema = isDoc ? 15 : schema[4] ?? 0;
457
+ return member([memberSchema, 0], "key");
458
+ }
459
+ getValueSchema() {
460
+ const sc = this.getSchema();
461
+ const [isDoc, isMap, isList] = [this.isDocumentSchema(), this.isMapSchema(), this.isListSchema()];
462
+ const memberSchema = typeof sc === "number" ? 63 & sc : sc && typeof sc === "object" && (isMap || isList) ? sc[3 + sc[0]] : isDoc ? 15 : void 0;
463
+ if (memberSchema != null) {
464
+ return member([memberSchema, 0], isMap ? "value" : "member");
465
+ }
466
+ throw new Error(`@smithy/core/schema - ${this.getName(true)} has no value member.`);
467
+ }
468
+ getMemberSchema(memberName) {
469
+ const struct = this.getSchema();
470
+ if (this.isStructSchema() && struct[4].includes(memberName)) {
471
+ const i = struct[4].indexOf(memberName);
472
+ const memberSchema = struct[5][i];
473
+ return member(isMemberSchema(memberSchema) ? memberSchema : [memberSchema, 0], memberName);
474
+ }
475
+ if (this.isDocumentSchema()) {
476
+ return member([15, 0], memberName);
477
+ }
478
+ throw new Error(`@smithy/core/schema - ${this.getName(true)} has no member=${memberName}.`);
479
+ }
480
+ getMemberSchemas() {
481
+ const buffer = {};
482
+ try {
483
+ for (const [k, v] of this.structIterator()) {
484
+ buffer[k] = v;
485
+ }
486
+ } catch (ignored) {
487
+ }
488
+ return buffer;
489
+ }
490
+ getEventStreamMember() {
491
+ if (this.isStructSchema()) {
492
+ for (const [memberName, memberSchema] of this.structIterator()) {
493
+ if (memberSchema.isStreaming() && memberSchema.isStructSchema()) {
494
+ return memberName;
495
+ }
496
+ }
497
+ }
498
+ return "";
499
+ }
500
+ *structIterator() {
501
+ if (this.isUnitSchema()) {
502
+ return;
503
+ }
504
+ if (!this.isStructSchema()) {
505
+ throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");
506
+ }
507
+ const struct = this.getSchema();
508
+ const z = struct[4].length;
509
+ let it = struct[anno.it];
510
+ if (it && z === it.length) {
511
+ yield* it;
512
+ return;
513
+ }
514
+ it = Array(z);
515
+ for (let i = 0; i < z; ++i) {
516
+ const k = struct[4][i];
517
+ const v = member([struct[5][i], 0], k);
518
+ yield it[i] = [k, v];
519
+ }
520
+ struct[anno.it] = it;
521
+ }
522
+ };
523
+ function member(memberSchema, memberName) {
524
+ if (memberSchema instanceof NormalizedSchema) {
525
+ return Object.assign(memberSchema, {
526
+ memberName,
527
+ _isMemberSchema: true
528
+ });
529
+ }
530
+ const internalCtorAccess = NormalizedSchema;
531
+ return new internalCtorAccess(memberSchema, memberName);
532
+ }
533
+ var isMemberSchema = (sc) => Array.isArray(sc) && sc.length === 2;
534
+ var isStaticSchema = (sc) => Array.isArray(sc) && sc.length >= 5;
535
+
536
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/serde/is-array-buffer/is-array-buffer.js
537
+ var isArrayBuffer = (arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]";
538
+
539
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/serde/util-buffer-from/buffer-from.js
540
+ var fromArrayBuffer = (input, offset = 0, length = input.byteLength - offset) => {
541
+ if (!isArrayBuffer(input)) {
542
+ throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`);
543
+ }
544
+ return Buffer.from(input, offset, length);
545
+ };
546
+ var fromString = (input, encoding) => {
547
+ if (typeof input !== "string") {
548
+ throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`);
549
+ }
550
+ return encoding ? Buffer.from(input, encoding) : Buffer.from(input);
551
+ };
552
+
553
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/fromUtf8.js
554
+ var fromUtf8 = (input) => {
555
+ const buf = fromString(input, "utf8");
556
+ return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT);
557
+ };
558
+
559
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/toUtf8.js
560
+ var toUtf8 = (input) => {
561
+ if (typeof input === "string") {
562
+ return input;
563
+ }
564
+ if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") {
565
+ throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");
566
+ }
567
+ return fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("utf8");
568
+ };
569
+
570
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/serde/util-hex-encoding/hex-encoding.js
571
+ var SHORT_TO_HEX = {};
572
+ var HEX_TO_SHORT = {};
573
+ for (let i = 0; i < 256; i++) {
574
+ let encodedByte = i.toString(16).toLowerCase();
575
+ if (encodedByte.length === 1) {
576
+ encodedByte = `0${encodedByte}`;
577
+ }
578
+ SHORT_TO_HEX[i] = encodedByte;
579
+ HEX_TO_SHORT[encodedByte] = i;
580
+ }
581
+ function fromHex(encoded) {
582
+ if (encoded.length % 2 !== 0) {
583
+ throw new Error("Hex encoded strings must have an even number length");
584
+ }
585
+ const out = new Uint8Array(encoded.length / 2);
586
+ for (let i = 0; i < encoded.length; i += 2) {
587
+ const encodedByte = encoded.slice(i, i + 2).toLowerCase();
588
+ if (encodedByte in HEX_TO_SHORT) {
589
+ out[i / 2] = HEX_TO_SHORT[encodedByte];
590
+ } else {
591
+ throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`);
592
+ }
593
+ }
594
+ return out;
595
+ }
596
+ function toHex(bytes) {
597
+ let out = "";
598
+ for (let i = 0; i < bytes.byteLength; i++) {
599
+ out += SHORT_TO_HEX[bytes[i]];
600
+ }
601
+ return out;
602
+ }
603
+
604
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/serde/index.js
605
+ import { getRandomValues } from "crypto";
606
+
607
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/serde/util-base64/fromBase64.js
608
+ var BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/;
609
+ var fromBase64 = (input) => {
610
+ if (input.length * 3 % 4 !== 0) {
611
+ throw new TypeError(`Incorrect padding on base64 string.`);
612
+ }
613
+ if (!BASE64_REGEX.exec(input)) {
614
+ throw new TypeError(`Invalid base64 string.`);
615
+ }
616
+ const buffer = fromString(input, "base64");
617
+ return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);
618
+ };
619
+
620
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/serde/util-base64/toBase64.js
621
+ var toBase64 = (_input) => {
622
+ let input;
623
+ if (typeof _input === "string") {
624
+ input = fromUtf8(_input);
625
+ } else {
626
+ input = _input;
627
+ }
628
+ if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") {
629
+ throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");
630
+ }
631
+ return fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("base64");
632
+ };
633
+
634
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/blob/Uint8ArrayBlobAdapter.js
635
+ function bindUint8ArrayBlobAdapter(toUtf82, fromUtf82, toBase642, fromBase642) {
636
+ return class Uint8ArrayBlobAdapter2 extends Uint8Array {
637
+ static fromString(source, encoding = "utf-8") {
638
+ if (typeof source === "string") {
639
+ if (encoding === "base64") {
640
+ return Uint8ArrayBlobAdapter2.mutate(fromBase642(source));
641
+ }
642
+ return Uint8ArrayBlobAdapter2.mutate(fromUtf82(source));
643
+ }
644
+ throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`);
645
+ }
646
+ static mutate(source) {
647
+ Object.setPrototypeOf(source, Uint8ArrayBlobAdapter2.prototype);
648
+ return source;
649
+ }
650
+ transformToString(encoding = "utf-8") {
651
+ if (encoding === "base64") {
652
+ return toBase642(this);
653
+ }
654
+ return toUtf82(this);
655
+ }
656
+ };
657
+ }
658
+
659
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/serde/uuid/v4.js
660
+ var decimalToHex = Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, "0"));
661
+ function bindV4(getRandomValues2) {
662
+ if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") {
663
+ return () => crypto.randomUUID();
664
+ }
665
+ return () => {
666
+ const rnds = new Uint8Array(16);
667
+ getRandomValues2(rnds);
668
+ rnds[6] = rnds[6] & 15 | 64;
669
+ rnds[8] = rnds[8] & 63 | 128;
670
+ 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]];
671
+ };
672
+ }
673
+
674
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js
675
+ var expectNumber = (value) => {
676
+ if (value === null || value === void 0) {
677
+ return void 0;
678
+ }
679
+ if (typeof value === "string") {
680
+ const parsed = parseFloat(value);
681
+ if (!Number.isNaN(parsed)) {
682
+ if (String(parsed) !== String(value)) {
683
+ logger.warn(stackTraceWarning(`Expected number but observed string: ${value}`));
684
+ }
685
+ return parsed;
686
+ }
687
+ }
688
+ if (typeof value === "number") {
689
+ return value;
690
+ }
691
+ throw new TypeError(`Expected number, got ${typeof value}: ${value}`);
692
+ };
693
+ var MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23));
694
+ var expectFloat32 = (value) => {
695
+ const expected = expectNumber(value);
696
+ if (expected !== void 0 && !Number.isNaN(expected) && expected !== Infinity && expected !== -Infinity) {
697
+ if (Math.abs(expected) > MAX_FLOAT) {
698
+ throw new TypeError(`Expected 32-bit float, got ${value}`);
699
+ }
700
+ }
701
+ return expected;
702
+ };
703
+ var expectLong = (value) => {
704
+ if (value === null || value === void 0) {
705
+ return void 0;
706
+ }
707
+ if (Number.isInteger(value) && !Number.isNaN(value)) {
708
+ return value;
709
+ }
710
+ throw new TypeError(`Expected integer, got ${typeof value}: ${value}`);
711
+ };
712
+ var expectShort = (value) => expectSizedInt(value, 16);
713
+ var expectByte = (value) => expectSizedInt(value, 8);
714
+ var expectSizedInt = (value, size) => {
715
+ const expected = expectLong(value);
716
+ if (expected !== void 0 && castInt(expected, size) !== expected) {
717
+ throw new TypeError(`Expected ${size}-bit integer, got ${value}`);
718
+ }
719
+ return expected;
720
+ };
721
+ var castInt = (value, size) => {
722
+ switch (size) {
723
+ case 32:
724
+ return Int32Array.of(value)[0];
725
+ case 16:
726
+ return Int16Array.of(value)[0];
727
+ case 8:
728
+ return Int8Array.of(value)[0];
729
+ }
730
+ };
731
+ var strictParseFloat32 = (value) => {
732
+ if (typeof value == "string") {
733
+ return expectFloat32(parseNumber(value));
734
+ }
735
+ return expectFloat32(value);
736
+ };
737
+ var NUMBER_REGEX = /(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g;
738
+ var parseNumber = (value) => {
739
+ const matches = value.match(NUMBER_REGEX);
740
+ if (matches === null || matches[0].length !== value.length) {
741
+ throw new TypeError(`Expected real number, got implicit NaN`);
742
+ }
743
+ return parseFloat(value);
744
+ };
745
+ var strictParseShort = (value) => {
746
+ if (typeof value === "string") {
747
+ return expectShort(parseNumber(value));
748
+ }
749
+ return expectShort(value);
750
+ };
751
+ var strictParseByte = (value) => {
752
+ if (typeof value === "string") {
753
+ return expectByte(parseNumber(value));
754
+ }
755
+ return expectByte(value);
756
+ };
757
+ var stackTraceWarning = (message) => {
758
+ return String(new TypeError(message).stack || message).split("\n").slice(0, 5).filter((s) => !s.includes("stackTraceWarning")).join("\n");
759
+ };
760
+ var logger = {
761
+ warn: console.warn
762
+ };
763
+
764
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/serde/date-utils.js
765
+ var MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
766
+ var RFC3339 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/);
767
+ 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])$/);
768
+ 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$/);
769
+ 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$/);
770
+ 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})$/);
771
+ var parseRfc7231DateTime = (value) => {
772
+ if (value === null || value === void 0) {
773
+ return void 0;
774
+ }
775
+ if (typeof value !== "string") {
776
+ throw new TypeError("RFC-7231 date-times must be expressed as strings");
777
+ }
778
+ let match = IMF_FIXDATE.exec(value);
779
+ if (match) {
780
+ const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;
781
+ return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), { hours, minutes, seconds, fractionalMilliseconds });
782
+ }
783
+ match = RFC_850_DATE.exec(value);
784
+ if (match) {
785
+ const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;
786
+ return adjustRfc850Year(buildDate(parseTwoDigitYear(yearStr), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), {
787
+ hours,
788
+ minutes,
789
+ seconds,
790
+ fractionalMilliseconds
791
+ }));
792
+ }
793
+ match = ASC_TIME.exec(value);
794
+ if (match) {
795
+ const [_, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, yearStr] = match;
796
+ return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr.trimLeft(), "day", 1, 31), { hours, minutes, seconds, fractionalMilliseconds });
797
+ }
798
+ throw new TypeError("Invalid RFC-7231 date-time value");
799
+ };
800
+ var buildDate = (year, month, day, time) => {
801
+ const adjustedMonth = month - 1;
802
+ validateDayOfMonth(year, adjustedMonth, day);
803
+ return new Date(Date.UTC(year, adjustedMonth, day, parseDateValue(time.hours, "hour", 0, 23), parseDateValue(time.minutes, "minute", 0, 59), parseDateValue(time.seconds, "seconds", 0, 60), parseMilliseconds(time.fractionalMilliseconds)));
804
+ };
805
+ var parseTwoDigitYear = (value) => {
806
+ const thisYear = (/* @__PURE__ */ new Date()).getUTCFullYear();
807
+ const valueInThisCentury = Math.floor(thisYear / 100) * 100 + strictParseShort(stripLeadingZeroes(value));
808
+ if (valueInThisCentury < thisYear) {
809
+ return valueInThisCentury + 100;
810
+ }
811
+ return valueInThisCentury;
812
+ };
813
+ var FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1e3;
814
+ var adjustRfc850Year = (input) => {
815
+ if (input.getTime() - (/* @__PURE__ */ new Date()).getTime() > FIFTY_YEARS_IN_MILLIS) {
816
+ return new Date(Date.UTC(input.getUTCFullYear() - 100, input.getUTCMonth(), input.getUTCDate(), input.getUTCHours(), input.getUTCMinutes(), input.getUTCSeconds(), input.getUTCMilliseconds()));
817
+ }
818
+ return input;
819
+ };
820
+ var parseMonthByShortName = (value) => {
821
+ const monthIdx = MONTHS.indexOf(value);
822
+ if (monthIdx < 0) {
823
+ throw new TypeError(`Invalid month: ${value}`);
824
+ }
825
+ return monthIdx + 1;
826
+ };
827
+ var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
828
+ var validateDayOfMonth = (year, month, day) => {
829
+ let maxDays = DAYS_IN_MONTH[month];
830
+ if (month === 1 && isLeapYear(year)) {
831
+ maxDays = 29;
832
+ }
833
+ if (day > maxDays) {
834
+ throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year}: ${day}`);
835
+ }
836
+ };
837
+ var isLeapYear = (year) => {
838
+ return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
839
+ };
840
+ var parseDateValue = (value, type, lower, upper) => {
841
+ const dateVal = strictParseByte(stripLeadingZeroes(value));
842
+ if (dateVal < lower || dateVal > upper) {
843
+ throw new TypeError(`${type} must be between ${lower} and ${upper}, inclusive`);
844
+ }
845
+ return dateVal;
846
+ };
847
+ var parseMilliseconds = (value) => {
848
+ if (value === null || value === void 0) {
849
+ return 0;
850
+ }
851
+ return strictParseFloat32("0." + value) * 1e3;
852
+ };
853
+ var stripLeadingZeroes = (value) => {
854
+ let idx = 0;
855
+ while (idx < value.length - 1 && value.charAt(idx) === "0") {
856
+ idx++;
857
+ }
858
+ if (idx === 0) {
859
+ return value;
860
+ }
861
+ return value.slice(idx);
862
+ };
863
+
864
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/serde/util-body-length/calculateBodyLength.js
865
+ import { ReadStream, fstatSync, lstatSync } from "fs";
866
+ var calculateBodyLength = (body) => {
867
+ if (!body) {
868
+ return 0;
869
+ }
870
+ if (typeof body === "string") {
871
+ return Buffer.byteLength(body);
872
+ } else if (typeof body.byteLength === "number") {
873
+ return body.byteLength;
874
+ } else if (typeof body.size === "number") {
875
+ return body.size;
876
+ } else if (typeof body.start === "number" && typeof body.end === "number") {
877
+ return body.end + 1 - body.start;
878
+ } else if (body instanceof ReadStream) {
879
+ if (body.path != null) {
880
+ return lstatSync(body.path).size;
881
+ } else if (typeof body.fd === "number") {
882
+ return fstatSync(body.fd).size;
883
+ }
884
+ }
885
+ throw new Error(`Body Length computation failed for ${body}`);
886
+ };
887
+
888
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/toUint8Array.js
889
+ var toUint8Array = (data) => {
890
+ if (data instanceof Uint8Array) {
891
+ return data;
892
+ }
893
+ if (typeof data === "string") {
894
+ return fromUtf8(data);
895
+ }
896
+ if (ArrayBuffer.isView(data)) {
897
+ return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);
898
+ }
899
+ return new Uint8Array(data);
900
+ };
901
+
902
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/serde/index.js
903
+ var Uint8ArrayBlobAdapter = class extends bindUint8ArrayBlobAdapter(toUtf8, fromUtf8, toBase64, fromBase64) {
904
+ };
905
+ var _getRandomValues = getRandomValues;
906
+ var v4 = bindV4(_getRandomValues);
907
+
908
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/checksum/crc32/Crc32Node.js
909
+ import * as zlib from "zlib";
910
+
911
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/checksum/crc32/Crc32Js.js
912
+ var CRC32_TABLE = new Uint32Array(256);
913
+ for (let i = 0; i < 256; ++i) {
914
+ let c = i;
915
+ for (let j = 0; j < 8; ++j) {
916
+ c = c & 1 ? 3988292384 ^ c >>> 1 : c >>> 1;
917
+ }
918
+ CRC32_TABLE[i] = c >>> 0;
919
+ }
920
+ var ONES = 4294967295;
921
+ var Crc32Js = class {
922
+ digestLength = 4;
923
+ checksum = ONES;
924
+ update(data) {
925
+ for (let i = 0; i < data.length; ++i) {
926
+ this.checksum = this.checksum >>> 8 ^ CRC32_TABLE[(this.checksum ^ data[i]) & 255];
927
+ }
928
+ }
929
+ digestSync() {
930
+ return (this.checksum ^ ONES) >>> 0;
931
+ }
932
+ async digest() {
933
+ const value = this.digestSync();
934
+ const out = new Uint8Array(4);
935
+ new DataView(out.buffer).setUint32(0, value, false);
936
+ return out;
937
+ }
938
+ reset() {
939
+ this.checksum = ONES;
940
+ }
941
+ };
942
+
943
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/checksum/crc32/Crc32Node.js
944
+ var zlibCrc32 = typeof zlib.crc32 === "function" ? zlib.crc32 : void 0;
945
+ var Crc32Node = zlibCrc32 ? buildNativeClass(zlibCrc32) : Crc32Js;
946
+ function buildNativeClass(nativeCrc32) {
947
+ return class Crc32Node {
948
+ digestLength = 4;
949
+ value = 0;
950
+ update(data) {
951
+ this.value = nativeCrc32(data, this.value);
952
+ }
953
+ digestSync() {
954
+ return this.value >>> 0;
955
+ }
956
+ async digest() {
957
+ const out = new Uint8Array(4);
958
+ new DataView(out.buffer).setUint32(0, this.digestSync(), false);
959
+ return out;
960
+ }
961
+ reset() {
962
+ this.value = 0;
963
+ }
964
+ };
965
+ }
966
+
967
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/checksum/sha256/Sha256Js.js
968
+ var BLOCK = 64;
969
+ var DIGEST_LENGTH = 32;
970
+ var MAX_HASHABLE_LENGTH = 2 ** 53 - 1;
971
+ var Sha256Js = class _Sha256Js {
972
+ digestLength = DIGEST_LENGTH;
973
+ state = Int32Array.from(INIT);
974
+ w;
975
+ buffer = new Uint8Array(64);
976
+ bufferLength = 0;
977
+ bytesHashed = 0;
978
+ finished = false;
979
+ inner;
980
+ outer;
981
+ constructor(secret) {
982
+ if (secret) {
983
+ const key = _Sha256Js.normalizeKey(secret);
984
+ this.inner = new _Sha256Js();
985
+ this.outer = new _Sha256Js();
986
+ const { inner, outer } = this;
987
+ const pad = new Uint8Array(BLOCK * 2);
988
+ for (let i = 0; i < BLOCK; ++i) {
989
+ pad[i] = 54 ^ key[i];
990
+ pad[i + BLOCK] = 92 ^ key[i];
991
+ }
992
+ inner.update(pad.subarray(0, BLOCK));
993
+ outer.update(pad.subarray(BLOCK));
994
+ }
995
+ }
996
+ update(data) {
997
+ if (this.finished) {
998
+ throw new Error("Attempted to update an already finished HMAC.");
999
+ }
1000
+ if (this.inner) {
1001
+ this.inner.update(data);
1002
+ return;
1003
+ }
1004
+ const chunk = toUint8Array(data);
1005
+ let position = 0;
1006
+ let { byteLength } = chunk;
1007
+ this.bytesHashed += byteLength;
1008
+ if (this.bytesHashed * 8 > MAX_HASHABLE_LENGTH) {
1009
+ throw new Error("Cannot hash more than 2^53 - 1 bits");
1010
+ }
1011
+ while (byteLength > 0) {
1012
+ this.buffer[this.bufferLength++] = chunk[position++];
1013
+ byteLength--;
1014
+ if (this.bufferLength === BLOCK) {
1015
+ this.hashBuffer();
1016
+ this.bufferLength = 0;
1017
+ }
1018
+ }
1019
+ }
1020
+ async digest() {
1021
+ const { inner, outer } = this;
1022
+ if (inner && outer) {
1023
+ if (this.finished) {
1024
+ throw new Error("Attempted to digest an already finished HMAC.");
1025
+ }
1026
+ this.finished = true;
1027
+ const innerDigest = inner.digestSync();
1028
+ outer.update(innerDigest);
1029
+ return outer.digestSync();
1030
+ }
1031
+ return this.digestSync();
1032
+ }
1033
+ reset() {
1034
+ this.state = Int32Array.from(INIT);
1035
+ this.buffer = new Uint8Array(64);
1036
+ this.bufferLength = 0;
1037
+ this.bytesHashed = 0;
1038
+ }
1039
+ digestSync() {
1040
+ const state = this.state.slice();
1041
+ const buffer = this.buffer.slice();
1042
+ let bufferLength = this.bufferLength;
1043
+ const bitsHashed = this.bytesHashed * 8;
1044
+ const bufferView = new DataView(buffer.buffer, buffer.byteOffset, buffer.byteLength);
1045
+ bufferView.setUint8(bufferLength++, 128);
1046
+ if ((bufferLength - 1) % BLOCK >= BLOCK - 8) {
1047
+ for (let i = bufferLength; i < BLOCK; ++i) {
1048
+ bufferView.setUint8(i, 0);
1049
+ }
1050
+ this.hashBufferWith(state, buffer);
1051
+ bufferLength = 0;
1052
+ }
1053
+ for (let i = bufferLength; i < BLOCK - 8; ++i) {
1054
+ bufferView.setUint8(i, 0);
1055
+ }
1056
+ bufferView.setUint32(BLOCK - 8, Math.floor(bitsHashed / 4294967296), false);
1057
+ bufferView.setUint32(BLOCK - 4, bitsHashed, false);
1058
+ this.hashBufferWith(state, buffer);
1059
+ const out = new Uint8Array(DIGEST_LENGTH);
1060
+ for (let i = 0; i < 8; ++i) {
1061
+ out[i * 4] = state[i] >>> 24 & 255;
1062
+ out[i * 4 + 1] = state[i] >>> 16 & 255;
1063
+ out[i * 4 + 2] = state[i] >>> 8 & 255;
1064
+ out[i * 4 + 3] = state[i] >>> 0 & 255;
1065
+ }
1066
+ return out;
1067
+ }
1068
+ static normalizeKey(secret) {
1069
+ const key = toUint8Array(secret);
1070
+ if (key.byteLength > BLOCK) {
1071
+ const h = new _Sha256Js();
1072
+ h.update(key);
1073
+ const out = h.digestSync();
1074
+ const padded = new Uint8Array(BLOCK);
1075
+ padded.set(out);
1076
+ return padded;
1077
+ }
1078
+ if (key.byteLength < BLOCK) {
1079
+ const padded = new Uint8Array(BLOCK);
1080
+ padded.set(key);
1081
+ return padded;
1082
+ }
1083
+ return key;
1084
+ }
1085
+ hashBuffer() {
1086
+ this.hashBufferWith(this.state, this.buffer);
1087
+ }
1088
+ hashBufferWith(state, buffer) {
1089
+ const w = this.w ??= new Int32Array(64);
1090
+ let s0 = state[0], s1 = state[1], s2 = state[2], s3 = state[3], s4 = state[4], s5 = state[5], s6 = state[6], s7 = state[7];
1091
+ for (let i = 0; i < BLOCK; ++i) {
1092
+ if (i < 16) {
1093
+ w[i] = (buffer[i * 4] & 255) << 24 | (buffer[i * 4 + 1] & 255) << 16 | (buffer[i * 4 + 2] & 255) << 8 | buffer[i * 4 + 3] & 255;
1094
+ } else {
1095
+ let u = w[i - 2];
1096
+ const t12 = (u >>> 17 | u << 15) ^ (u >>> 19 | u << 13) ^ u >>> 10;
1097
+ u = w[i - 15];
1098
+ const t22 = (u >>> 7 | u << 25) ^ (u >>> 18 | u << 14) ^ u >>> 3;
1099
+ w[i] = (t12 + w[i - 7] | 0) + (t22 + w[i - 16] | 0);
1100
+ }
1101
+ const t1 = (((s4 >>> 6 | s4 << 26) ^ (s4 >>> 11 | s4 << 21) ^ (s4 >>> 25 | s4 << 7)) + (s4 & s5 ^ ~s4 & s6) | 0) + (s7 + (K[i] + w[i] | 0) | 0) | 0;
1102
+ const t2 = ((s0 >>> 2 | s0 << 30) ^ (s0 >>> 13 | s0 << 19) ^ (s0 >>> 22 | s0 << 10)) + (s0 & s1 ^ s0 & s2 ^ s1 & s2) | 0;
1103
+ s7 = s6;
1104
+ s6 = s5;
1105
+ s5 = s4;
1106
+ s4 = s3 + t1 | 0;
1107
+ s3 = s2;
1108
+ s2 = s1;
1109
+ s1 = s0;
1110
+ s0 = t1 + t2 | 0;
1111
+ }
1112
+ state[0] += s0;
1113
+ state[1] += s1;
1114
+ state[2] += s2;
1115
+ state[3] += s3;
1116
+ state[4] += s4;
1117
+ state[5] += s5;
1118
+ state[6] += s6;
1119
+ state[7] += s7;
1120
+ }
1121
+ };
1122
+ var INIT = new Int32Array([
1123
+ 1779033703,
1124
+ 3144134277,
1125
+ 1013904242,
1126
+ 2773480762,
1127
+ 1359893119,
1128
+ 2600822924,
1129
+ 528734635,
1130
+ 1541459225
1131
+ ]);
1132
+ var K = new Int32Array([
1133
+ 1116352408,
1134
+ 1899447441,
1135
+ 3049323471,
1136
+ 3921009573,
1137
+ 961987163,
1138
+ 1508970993,
1139
+ 2453635748,
1140
+ 2870763221,
1141
+ 3624381080,
1142
+ 310598401,
1143
+ 607225278,
1144
+ 1426881987,
1145
+ 1925078388,
1146
+ 2162078206,
1147
+ 2614888103,
1148
+ 3248222580,
1149
+ 3835390401,
1150
+ 4022224774,
1151
+ 264347078,
1152
+ 604807628,
1153
+ 770255983,
1154
+ 1249150122,
1155
+ 1555081692,
1156
+ 1996064986,
1157
+ 2554220882,
1158
+ 2821834349,
1159
+ 2952996808,
1160
+ 3210313671,
1161
+ 3336571891,
1162
+ 3584528711,
1163
+ 113926993,
1164
+ 338241895,
1165
+ 666307205,
1166
+ 773529912,
1167
+ 1294757372,
1168
+ 1396182291,
1169
+ 1695183700,
1170
+ 1986661051,
1171
+ 2177026350,
1172
+ 2456956037,
1173
+ 2730485921,
1174
+ 2820302411,
1175
+ 3259730800,
1176
+ 3345764771,
1177
+ 3516065817,
1178
+ 3600352804,
1179
+ 4094571909,
1180
+ 275423344,
1181
+ 430227734,
1182
+ 506948616,
1183
+ 659060556,
1184
+ 883997877,
1185
+ 958139571,
1186
+ 1322822218,
1187
+ 1537002063,
1188
+ 1747873779,
1189
+ 1955562222,
1190
+ 2024104815,
1191
+ 2227730452,
1192
+ 2361852424,
1193
+ 2428436474,
1194
+ 2756734187,
1195
+ 3204031479,
1196
+ 3329325298
1197
+ ]);
1198
+
1199
+ // ../../node_modules/.pnpm/@smithy+core@3.34.1/node_modules/@smithy/core/dist-es/submodules/checksum/sha256/Sha256Node.js
1200
+ import { createHash, createHmac } from "crypto";
1201
+ var hasNativeCrypto = (() => {
1202
+ try {
1203
+ createHash("sha256");
1204
+ return true;
1205
+ } catch {
1206
+ return false;
1207
+ }
1208
+ })();
1209
+ var Sha256Node = hasNativeCrypto ? buildNativeClass2() : Sha256Js;
1210
+ function buildNativeClass2() {
1211
+ return class Sha256Node {
1212
+ digestLength = 32;
1213
+ secret;
1214
+ hash;
1215
+ isHmac;
1216
+ finished = false;
1217
+ constructor(secret) {
1218
+ this.secret = secret;
1219
+ this.isHmac = !!secret;
1220
+ this.hash = this.createHash();
1221
+ }
1222
+ update(data) {
1223
+ if (this.finished) {
1224
+ throw new Error("Attempted to update an already finished hash.");
1225
+ }
1226
+ this.hash.update(data);
1227
+ }
1228
+ async digest() {
1229
+ let buf;
1230
+ if (this.isHmac) {
1231
+ this.finished = true;
1232
+ buf = this.hash.digest();
1233
+ } else {
1234
+ buf = this.hash.copy().digest();
1235
+ }
1236
+ return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);
1237
+ }
1238
+ reset() {
1239
+ this.hash = this.createHash();
1240
+ this.finished = false;
1241
+ }
1242
+ createHash() {
1243
+ return this.secret ? createHmac("sha256", toBuffer(this.secret)) : createHash("sha256");
1244
+ }
1245
+ };
1246
+ }
1247
+ function toBuffer(data) {
1248
+ if (typeof data === "string") {
1249
+ return data;
1250
+ }
1251
+ if (ArrayBuffer.isView(data)) {
1252
+ return Buffer.from(data.buffer, data.byteOffset, data.byteLength);
1253
+ }
1254
+ return Buffer.from(data);
1255
+ }
1256
+
1257
+ export {
1258
+ getSchemaSerdePlugin,
1259
+ NormalizedSchema,
1260
+ TypeRegistry,
1261
+ fromBase64,
1262
+ fromUtf8,
1263
+ toBase64,
1264
+ toUtf8,
1265
+ parseRfc7231DateTime,
1266
+ fromHex,
1267
+ toHex,
1268
+ calculateBodyLength,
1269
+ v4,
1270
+ Crc32Node,
1271
+ Sha256Node
1272
+ };