UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

7,149 lines • 238 kB
import { n as __esmMin, r as __exportAll, t as __commonJSMin } from "./rolldown-runtime-C_OpTf0N.mjs";
import { ReadStream, createReadStream, fstatSync, lstatSync } from "node:fs";
import { join, sep } from "node:path";
import { createHash, createHmac, getRandomValues } from "node:crypto";
import { readFile as readFile$1 } from "node:fs/promises";
import { homedir } from "node:os";
import * as zlib$1 from "node:zlib";
import { PassThrough, Readable, Writable } from "node:stream";
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/client/middleware-stack/MiddlewareStack.js
var getAllAliases, getMiddlewareNameWithAliases, constructStack, stepWeights, priorityWeights;
var init_MiddlewareStack = __esmMin((() => {
	getAllAliases = (e, t) => {
		const n = [];
		if (e) n.push(e);
		if (t) for (const e of t) n.push(e);
		return n;
	};
	getMiddlewareNameWithAliases = (e, t) => {
		return `${e || "anonymous"}${t && t.length > 0 ? ` (a.k.a. ${t.join(",")})` : ""}`;
	};
	constructStack = () => {
		let e = [];
		let t = [];
		let n = false;
		const r = /* @__PURE__ */ new Set();
		const sort = (e) => e.sort((e, t) => stepWeights[t.step] - stepWeights[e.step] || priorityWeights[t.priority || "normal"] - priorityWeights[e.priority || "normal"]);
		const removeByName = (n) => {
			let i = false;
			const filterCb = (e) => {
				const t = getAllAliases(e.name, e.aliases);
				if (t.includes(n)) {
					i = true;
					for (const e of t) r.delete(e);
					return false;
				}
				return true;
			};
			e = e.filter(filterCb);
			t = t.filter(filterCb);
			return i;
		};
		const removeByReference = (n) => {
			let i = false;
			const filterCb = (e) => {
				if (e.middleware === n) {
					i = true;
					for (const t of getAllAliases(e.name, e.aliases)) r.delete(t);
					return false;
				}
				return true;
			};
			e = e.filter(filterCb);
			t = t.filter(filterCb);
			return i;
		};
		const cloneTo = (n) => {
			e.forEach((e) => {
				n.add(e.middleware, { ...e });
			});
			t.forEach((e) => {
				n.addRelativeTo(e.middleware, { ...e });
			});
			n.identifyOnResolve?.(i.identifyOnResolve());
			return n;
		};
		const expandRelativeMiddlewareList = (e) => {
			const t = [];
			e.before.forEach((e) => {
				if (e.before.length === 0 && e.after.length === 0) t.push(e);
				else t.push(...expandRelativeMiddlewareList(e));
			});
			t.push(e);
			e.after.reverse().forEach((e) => {
				if (e.before.length === 0 && e.after.length === 0) t.push(e);
				else t.push(...expandRelativeMiddlewareList(e));
			});
			return t;
		};
		const getMiddlewareList = (n = false) => {
			const r = [];
			const i = [];
			const a = {};
			e.forEach((e) => {
				const t = {
					...e,
					before: [],
					after: []
				};
				for (const e of getAllAliases(t.name, t.aliases)) a[e] = t;
				r.push(t);
			});
			t.forEach((e) => {
				const t = {
					...e,
					before: [],
					after: []
				};
				for (const e of getAllAliases(t.name, t.aliases)) a[e] = t;
				i.push(t);
			});
			i.forEach((e) => {
				if (e.toMiddleware) {
					const t = a[e.toMiddleware];
					if (t === void 0) {
						if (n) return;
						throw new Error(`${e.toMiddleware} is not found when adding ${getMiddlewareNameWithAliases(e.name, e.aliases)} middleware ${e.relation} ${e.toMiddleware}`);
					}
					if (e.relation === "after") t.after.push(e);
					if (e.relation === "before") t.before.push(e);
				}
			});
			return sort(r).map(expandRelativeMiddlewareList).reduce((e, t) => {
				e.push(...t);
				return e;
			}, []);
		};
		const i = {
			add: (t, n = {}) => {
				const { name: i, override: a, aliases: o } = n;
				const s = {
					step: "initialize",
					priority: "normal",
					middleware: t,
					...n
				};
				const c = getAllAliases(i, o);
				if (c.length > 0) {
					if (c.some((e) => r.has(e))) {
						if (!a) throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(i, o)}'`);
						for (const t of c) {
							const n = e.findIndex((e) => e.name === t || e.aliases?.some((e) => e === t));
							if (n === -1) continue;
							const r = e[n];
							if (r.step !== s.step || s.priority !== r.priority) throw new Error(`"${getMiddlewareNameWithAliases(r.name, r.aliases)}" middleware with ${r.priority} priority in ${r.step} step cannot be overridden by "${getMiddlewareNameWithAliases(i, o)}" middleware with ${s.priority} priority in ${s.step} step.`);
							e.splice(n, 1);
						}
					}
					for (const e of c) r.add(e);
				}
				e.push(s);
			},
			addRelativeTo: (e, n) => {
				const { name: i, override: a, aliases: o } = n;
				const s = {
					middleware: e,
					...n
				};
				const c = getAllAliases(i, o);
				if (c.length > 0) {
					if (c.some((e) => r.has(e))) {
						if (!a) throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(i, o)}'`);
						for (const e of c) {
							const n = t.findIndex((t) => t.name === e || t.aliases?.some((t) => t === e));
							if (n === -1) continue;
							const r = t[n];
							if (r.toMiddleware !== s.toMiddleware || r.relation !== s.relation) throw new Error(`"${getMiddlewareNameWithAliases(r.name, r.aliases)}" middleware ${r.relation} "${r.toMiddleware}" middleware cannot be overridden by "${getMiddlewareNameWithAliases(i, o)}" middleware ${s.relation} "${s.toMiddleware}" middleware.`);
							t.splice(n, 1);
						}
					}
					for (const e of c) r.add(e);
				}
				t.push(s);
			},
			clone: () => cloneTo(constructStack()),
			use: (e) => {
				e.applyToStack(i);
			},
			remove: (e) => {
				if (typeof e === "string") return removeByName(e);
				else return removeByReference(e);
			},
			removeByTag: (n) => {
				let i = false;
				const filterCb = (e) => {
					const { tags: t, name: a, aliases: o } = e;
					if (t && t.includes(n)) {
						const e = getAllAliases(a, o);
						for (const t of e) r.delete(t);
						i = true;
						return false;
					}
					return true;
				};
				e = e.filter(filterCb);
				t = t.filter(filterCb);
				return i;
			},
			concat: (e) => {
				const t = cloneTo(constructStack());
				t.use(e);
				t.identifyOnResolve(n || t.identifyOnResolve() || (e.identifyOnResolve?.() ?? false));
				return t;
			},
			applyToStack: cloneTo,
			identify: () => {
				return getMiddlewareList(true).map((e) => {
					const t = e.step ?? e.relation + " " + e.toMiddleware;
					return getMiddlewareNameWithAliases(e.name, e.aliases) + " - " + t;
				});
			},
			identifyOnResolve(e) {
				if (typeof e === "boolean") n = e;
				return n;
			},
			resolve: (e, t) => {
				for (const n of getMiddlewareList().map((e) => e.middleware).reverse()) e = n(e, t);
				if (n) console.log(i.identify());
				return e;
			}
		};
		return i;
	};
	stepWeights = {
		initialize: 5,
		serialize: 4,
		build: 3,
		finalizeRequest: 2,
		deserialize: 1
	};
	priorityWeights = {
		high: 3,
		normal: 2,
		low: 1
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+types@4.19.0/node_modules/@smithy/types/dist-cjs/index.js
var require_dist_cjs = /* @__PURE__ */ __commonJSMin(((e) => {
	var t;
	(function(e) {
		e["HEADER"] = "header";
		e["QUERY"] = "query";
	})(t || (t = {}));
	var n;
	(function(e) {
		e["HEADER"] = "header";
		e["QUERY"] = "query";
	})(n || (n = {}));
	var r;
	(function(e) {
		e["HTTP"] = "http";
		e["HTTPS"] = "https";
	})(r || (r = {}));
	var i;
	(function(e) {
		e["MD5"] = "md5";
		e["CRC32"] = "crc32";
		e["CRC32C"] = "crc32c";
		e["SHA1"] = "sha1";
		e["SHA256"] = "sha256";
	})(i || (i = {}));
	var a;
	(function(e) {
		e[e["HEADER"] = 0] = "HEADER";
		e[e["TRAILER"] = 1] = "TRAILER";
	})(a || (a = {}));
	const o = "__smithy_context";
	var s;
	(function(e) {
		e["PROFILE"] = "profile";
		e["SSO_SESSION"] = "sso-session";
		e["SERVICES"] = "services";
	})(s || (s = {}));
	var c;
	(function(e) {
		e["HTTP_0_9"] = "http/0.9";
		e["HTTP_1_0"] = "http/1.0";
		e["TDS_8_0"] = "tds/8.0";
	})(c || (c = {}));
	e.AlgorithmId = i;
	e.EndpointURLScheme = r;
	e.FieldPosition = a;
	e.HttpApiKeyAuthLocation = n;
	e.IniSectionType = s;
	e.SMITHY_CONTEXT_KEY = o;
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/transport/getSmithyContext.js
var import_dist_cjs$6, getSmithyContext;
var init_getSmithyContext = __esmMin((() => {
	import_dist_cjs$6 = require_dist_cjs();
	getSmithyContext = (e) => e[import_dist_cjs$6.SMITHY_CONTEXT_KEY] || (e[import_dist_cjs$6.SMITHY_CONTEXT_KEY] = {});
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/transport/hasOwn.js
function hasOwn(e, t) {
	return Object.prototype.hasOwnProperty.call(e, t);
}
var init_hasOwn = __esmMin((() => {}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/transport/httpRequest.js
function cloneQuery(e) {
	return Object.keys(e).reduce((t, n) => {
		const r = e[n];
		return {
			...t,
			[n]: Array.isArray(r) ? [...r] : r
		};
	}, {});
}
var HttpRequest;
var init_httpRequest = __esmMin((() => {
	HttpRequest = class HttpRequest {
		method;
		protocol;
		hostname;
		port;
		path;
		query;
		headers;
		username;
		password;
		fragment;
		body;
		constructor(e) {
			this.method = e.method || "GET";
			this.hostname = e.hostname || "localhost";
			this.port = e.port;
			this.query = e.query || {};
			this.headers = e.headers || {};
			this.body = e.body;
			this.protocol = e.protocol ? e.protocol.slice(-1) !== ":" ? `${e.protocol}:` : e.protocol : "https:";
			this.path = e.path ? e.path.charAt(0) !== "/" ? `/${e.path}` : e.path : "/";
			this.username = e.username;
			this.password = e.password;
			this.fragment = e.fragment;
		}
		static clone(e) {
			const t = new HttpRequest({
				...e,
				headers: { ...e.headers }
			});
			if (t.query) t.query = cloneQuery(t.query);
			return t;
		}
		static isInstance(e) {
			if (!e) return false;
			const t = e;
			return "method" in t && "protocol" in t && "hostname" in t && "path" in t && typeof t["query"] === "object" && typeof t["headers"] === "object";
		}
		clone() {
			return HttpRequest.clone(this);
		}
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/transport/httpResponse.js
var HttpResponse;
var init_httpResponse = __esmMin((() => {
	HttpResponse = class {
		statusCode;
		reason;
		headers;
		body;
		constructor(e) {
			this.statusCode = e.statusCode;
			this.reason = e.reason;
			this.headers = e.headers || {};
			this.body = e.body;
		}
		static isInstance(e) {
			if (!e) return false;
			const t = e;
			return typeof t.statusCode === "number" && typeof t.headers === "object";
		}
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/transport/isValidHostLabel.js
var VALID_HOST_LABEL_REGEX, isValidHostLabel;
var init_isValidHostLabel = __esmMin((() => {
	VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`);
	isValidHostLabel = (e, t = false) => {
		if (!t) return VALID_HOST_LABEL_REGEX.test(e);
		const n = e.split(".");
		for (const e of n) if (!isValidHostLabel(e)) return false;
		return true;
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/transport/isValidHostname.js
function isValidHostname(e) {
	return /^[a-z0-9][a-z0-9.-]*[a-z0-9]$/.test(e);
}
var init_isValidHostname = __esmMin((() => {}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/transport/normalizeProvider.js
var normalizeProvider;
var init_normalizeProvider = __esmMin((() => {
	normalizeProvider = (e) => {
		if (typeof e === "function") return e;
		const t = Promise.resolve(e);
		return () => t;
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/transport/parseQueryString.js
function parseQueryString(e) {
	const t = {};
	e = e.replace(/^\?/, "");
	if (e) for (const n of e.split("&")) {
		let [e, r = null] = n.split("=");
		e = decodeURIComponent(e);
		if (r) r = decodeURIComponent(r);
		if (!(e in t)) t[e] = r;
		else if (Array.isArray(t[e])) t[e].push(r);
		else t[e] = [t[e], r];
	}
	return t;
}
var init_parseQueryString = __esmMin((() => {}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/transport/parseUrl.js
var parseUrl;
var init_parseUrl = __esmMin((() => {
	init_parseQueryString();
	parseUrl = (e) => {
		if (typeof e === "string") return parseUrl(new URL(e));
		const { hostname: t, pathname: n, port: r, protocol: i, search: a } = e;
		let o;
		if (a) o = parseQueryString(a);
		return {
			hostname: t,
			port: r ? parseInt(r) : void 0,
			protocol: i,
			path: n,
			query: o
		};
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/transport/toEndpointV1.js
var toEndpointV1;
var init_toEndpointV1$1 = __esmMin((() => {
	init_hasOwn();
	init_parseUrl();
	toEndpointV1 = (e) => {
		if (typeof e === "object") {
			if ("url" in e) {
				const t = parseUrl(e.url);
				if (e.headers) {
					t.headers = {};
					for (const n in e.headers) {
						if (!hasOwn(e.headers, n)) continue;
						t.headers[n.toLowerCase()] = e.headers[n].join(", ");
					}
				}
				return t;
			}
			return e;
		}
		return parseUrl(e);
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/transport/index.js
var init_transport = __esmMin((() => {
	init_getSmithyContext();
	init_hasOwn();
	init_httpRequest();
	init_httpResponse();
	init_isValidHostLabel();
	init_isValidHostname();
	init_normalizeProvider();
	init_parseQueryString();
	init_parseUrl();
	init_toEndpointV1$1();
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/client/invalid-dependency/invalidFunction.js
var invalidFunction;
var init_invalidFunction = __esmMin((() => {
	invalidFunction = (e) => () => {
		throw new Error(e);
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/client/invalid-dependency/invalidProvider.js
var invalidProvider;
var init_invalidProvider = __esmMin((() => {
	invalidProvider = (e) => () => Promise.reject(e);
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/client/util-waiter/circularReplacer.js
var getCircularReplacer;
var init_circularReplacer = __esmMin((() => {
	getCircularReplacer = () => {
		const e = /* @__PURE__ */ new WeakSet();
		return (t, n) => {
			if (typeof n === "object" && n !== null) {
				if (e.has(n)) return "[Circular]";
				e.add(n);
			}
			return n;
		};
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/client/util-waiter/utils/sleep.js
var sleep;
var init_sleep = __esmMin((() => {
	sleep = (e) => {
		return new Promise((t) => setTimeout(t, e * 1e3));
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/client/util-waiter/waiter.js
var waiterServiceDefaults, WaiterState, checkExceptions;
var init_waiter = __esmMin((() => {
	init_circularReplacer();
	waiterServiceDefaults = {
		minDelay: 2,
		maxDelay: 120
	};
	;
	(function(e) {
		e["ABORTED"] = "ABORTED";
		e["FAILURE"] = "FAILURE";
		e["SUCCESS"] = "SUCCESS";
		e["RETRY"] = "RETRY";
		e["TIMEOUT"] = "TIMEOUT";
	})(WaiterState || (WaiterState = {}));
	checkExceptions = (e) => {
		if (e.state === WaiterState.ABORTED) {
			const t = /* @__PURE__ */ new Error(`${JSON.stringify({
				...e,
				reason: "Request was aborted"
			}, getCircularReplacer())}`);
			t.name = "AbortError";
			throw t;
		} else if (e.state === WaiterState.TIMEOUT) {
			const t = /* @__PURE__ */ new Error(`${JSON.stringify({
				...e,
				reason: "Waiter has timed out"
			}, getCircularReplacer())}`);
			t.name = "TimeoutError";
			throw t;
		} else if (e.state !== WaiterState.SUCCESS) throw new Error(`${JSON.stringify(e, getCircularReplacer())}`);
		return e;
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/client/util-waiter/poller.js
var runPolling, checkWarn403, createMessageFromResponse, exponentialBackoffWithJitter, randomInRange;
var init_poller = __esmMin((() => {
	init_circularReplacer();
	init_sleep();
	init_waiter();
	runPolling = async ({ minDelay: e, maxDelay: t, maxWaitTime: n, abortController: r, client: i, abortSignal: a }, o, s) => {
		const c = {};
		const [l, u] = [e * 1e3, t * 1e3];
		let d = 0;
		const f = Date.now() + n * 1e3;
		const p = Date.now() + 6e4;
		let m = false;
		while (true) {
			if (d > 0) {
				const e = exponentialBackoffWithJitter(l, u, d, f);
				if (r?.signal?.aborted || a?.aborted) {
					const e = "AbortController signal aborted.";
					c[e] |= 0;
					c[e] += 1;
					return {
						state: WaiterState.ABORTED,
						observedResponses: c
					};
				}
				if (Date.now() + e > f) return {
					state: WaiterState.TIMEOUT,
					observedResponses: c
				};
				await sleep(e / 1e3);
			}
			const { state: e, reason: t } = await s(i, o);
			if (t) {
				const e = createMessageFromResponse(t);
				c[e] |= 0;
				c[e] += 1;
			}
			if (e !== WaiterState.RETRY) return {
				state: e,
				reason: t,
				final: t,
				observedResponses: c
			};
			d += 1;
			if (!m && Date.now() >= p) {
				checkWarn403(c, i);
				m = true;
			}
		}
	};
	checkWarn403 = (e = {}, t) => {
		const n = Object.keys(e);
		let r = 0;
		let i = 0;
		for (const t of n) {
			const n = e[t] | 0;
			r = Math.max(n, r);
			if (t.startsWith("403:")) i += n;
		}
		const a = t?.config?.logger;
		const o = typeof a?.warn === "function" && !a.constructor?.name?.includes?.("NoOpLogger") ? a : console;
		if (i >= 3 || n[n.length - 1]?.startsWith("403:")) o.warn(`@smithy/util-waiter WARN - 403 status code encountered during waiter polling.`);
	};
	createMessageFromResponse = (e) => {
		const t = e?.$response?.statusCode ?? e?.$metadata?.httpStatusCode;
		if (e?.$responseBodyText) return `${t ? t + ": " : ""}Deserialization error for body: ${e.$responseBodyText}`;
		if (t) {
			if (e?.$response || e?.message) return `${t ?? "Unknown"}: ${e?.message}`;
			return `${t}: OK`;
		}
		return String(e?.message ?? JSON.stringify(e, getCircularReplacer()) ?? "Unknown");
	};
	exponentialBackoffWithJitter = (e, t, n, r) => {
		if (n > Math.log(t / e) / Math.log(2) + 1) return t;
		const i = e * 2 ** (n - 1);
		const a = randomInRange(e, Math.min(i, t));
		if (Date.now() + a > r) {
			const e = r - Date.now();
			return Math.max(0, e - 500);
		}
		return a;
	};
	randomInRange = (e, t) => e + Math.random() * (t - e);
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/client/util-waiter/utils/validate.js
var validateWaiterOptions;
var init_validate = __esmMin((() => {
	validateWaiterOptions = (e) => {
		if (e.maxWaitTime <= 0) throw new Error(`WaiterConfiguration.maxWaitTime must be greater than 0`);
		else if (e.minDelay <= 0) throw new Error(`WaiterConfiguration.minDelay must be greater than 0`);
		else if (e.maxDelay <= 0) throw new Error(`WaiterConfiguration.maxDelay must be greater than 0`);
		else if (e.maxWaitTime <= e.minDelay) throw new Error(`WaiterConfiguration.maxWaitTime [${e.maxWaitTime}] must be greater than WaiterConfiguration.minDelay [${e.minDelay}] for this waiter`);
		else if (e.maxDelay < e.minDelay) throw new Error(`WaiterConfiguration.maxDelay [${e.maxDelay}] must be greater than WaiterConfiguration.minDelay [${e.minDelay}] for this waiter`);
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/client/util-waiter/createWaiter.js
var abortTimeout, createWaiter;
var init_createWaiter = __esmMin((() => {
	init_poller();
	init_validate();
	init_waiter();
	abortTimeout = (e) => {
		let onAbort;
		return {
			clearListener() {
				if (typeof e.removeEventListener === "function") e.removeEventListener("abort", onAbort);
			},
			aborted: new Promise((t) => {
				onAbort = () => t({ state: WaiterState.ABORTED });
				if (typeof e.addEventListener === "function") e.addEventListener("abort", onAbort);
				else e.onabort = onAbort;
			})
		};
	};
	createWaiter = async (e, t, n) => {
		const r = {
			...waiterServiceDefaults,
			...e
		};
		validateWaiterOptions(r);
		const i = [runPolling(r, t, n)];
		const a = [];
		if (e.abortSignal) {
			const { aborted: t, clearListener: n } = abortTimeout(e.abortSignal);
			a.push(n);
			i.push(t);
		}
		if (e.abortController?.signal) {
			const { aborted: t, clearListener: n } = abortTimeout(e.abortController.signal);
			a.push(n);
			i.push(t);
		}
		return Promise.race(i).then((e) => {
			for (const e of a) e();
			return e;
		});
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/client.js
var Client;
var init_client$1 = __esmMin((() => {
	init_MiddlewareStack();
	Client = class {
		config;
		middlewareStack = constructStack();
		initConfig;
		handlers;
		constructor(e) {
			this.config = e;
			const { protocol: t, protocolSettings: n } = e;
			if (n) {
				if (typeof t === "function") e.protocol = new t(n);
			}
		}
		send(e, t, n) {
			const r = typeof t !== "function" ? t : void 0;
			const i = typeof t === "function" ? t : n;
			const a = r === void 0 && this.config.cacheMiddleware === true;
			let o;
			if (a) {
				if (!this.handlers) this.handlers = /* @__PURE__ */ new WeakMap();
				const t = this.handlers;
				if (t.has(e.constructor)) o = t.get(e.constructor);
				else {
					o = e.resolveMiddleware(this.middlewareStack, this.config, r);
					t.set(e.constructor, o);
				}
			} else {
				delete this.handlers;
				o = e.resolveMiddleware(this.middlewareStack, this.config, r);
			}
			if (i) o(e).then((e) => i(null, e.output), (e) => i(e)).catch(() => {});
			else return o(e).then((e) => e.output);
		}
		destroy() {
			this.config?.requestHandler?.destroy?.();
			delete this.handlers;
		}
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/schema/deref.js
var deref;
var init_deref = __esmMin((() => {
	deref = (e) => {
		if (typeof e === "function") return e();
		return e;
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/schema/schemas/operation.js
var operation;
var init_operation = __esmMin((() => {
	operation = (e, t, n, r, i) => ({
		name: t,
		namespace: e,
		traits: n,
		input: r,
		output: i
	});
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js
var schemaDeserializationMiddleware, findHeader$1;
var init_schemaDeserializationMiddleware = __esmMin((() => {
	init_transport();
	init_operation();
	schemaDeserializationMiddleware = (e) => (t, n) => async (r) => {
		const { response: i } = await t(r);
		const { operationSchema: a } = getSmithyContext(n);
		const [, o, s, c, l, u] = a ?? [];
		try {
			return {
				response: i,
				output: await e.protocol.deserializeResponse(operation(o, s, c, l, u), {
					...e,
					...n
				}, i)
			};
		} catch (e) {
			Object.defineProperty(e, "$response", {
				value: i,
				enumerable: false,
				writable: false,
				configurable: false
			});
			if (!("$metadata" in e)) {
				const t = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`;
				try {
					e.message += "\n  " + t;
				} catch (e) {
					if (!n.logger || n.logger?.constructor?.name === "NoOpLogger") console.warn(t);
					else n.logger?.warn?.(t);
				}
				if (typeof e.$responseBodyText !== "undefined") {
					if (e.$response) e.$response.body = e.$responseBodyText;
				}
				try {
					if (HttpResponse.isInstance(i)) {
						const { headers: t = {}, statusCode: n } = i;
						const r = Object.entries(t);
						e.$metadata = {
							httpStatusCode: n,
							requestId: findHeader$1(/^x-[\w-]+-request-?id$/, r),
							extendedRequestId: findHeader$1(/^x-[\w-]+-id-2$/, r),
							cfId: findHeader$1(/^x-[\w-]+-cf-id$/, r)
						};
					}
				} catch (e) {}
			}
			throw e;
		}
	};
	findHeader$1 = (e, t) => {
		return (t.find(([t]) => {
			return t.match(e);
		}) || [void 0, void 0])[1];
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js
var schemaSerializationMiddleware;
var init_schemaSerializationMiddleware = __esmMin((() => {
	init_transport();
	init_operation();
	schemaSerializationMiddleware = (e) => (t, n) => async (r) => {
		const { operationSchema: i } = getSmithyContext(n);
		const [, a, o, s, c, l] = i ?? [];
		const u = n.endpointV2 ? async () => toEndpointV1(n.endpointV2) : e.endpoint;
		const d = await e.protocol.serializeRequest(operation(a, o, s, c, l), r.input, {
			...e,
			...n,
			endpoint: u
		});
		return t({
			...r,
			request: d
		});
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/schema/middleware/getSchemaSerdePlugin.js
function getSchemaSerdePlugin(e) {
	return { applyToStack: (t) => {
		t.add(schemaSerializationMiddleware(e), serializerMiddlewareOption$2);
		t.add(schemaDeserializationMiddleware(e), deserializerMiddlewareOption$1);
		e.protocol.setSerdeContext(e);
	} };
}
var deserializerMiddlewareOption$1, serializerMiddlewareOption$2;
var init_getSchemaSerdePlugin = __esmMin((() => {
	init_schemaDeserializationMiddleware();
	init_schemaSerializationMiddleware();
	deserializerMiddlewareOption$1 = {
		name: "deserializerMiddleware",
		step: "deserialize",
		tags: ["DESERIALIZER"],
		override: true
	};
	serializerMiddlewareOption$2 = {
		name: "serializerMiddleware",
		step: "serialize",
		tags: ["SERIALIZER"],
		override: true
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/schema/schemas/Schema.js
var Schema;
var init_Schema = __esmMin((() => {
	Schema = class {
		name;
		namespace;
		traits;
		static assign(e, t) {
			return Object.assign(e, t);
		}
		static [Symbol.hasInstance](e) {
			const t = this.prototype.isPrototypeOf(e);
			if (!t && typeof e === "object" && e !== null) return e.symbol === this.symbol;
			return t;
		}
		getName() {
			return this.namespace + "#" + this.name;
		}
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/schema/schemas/ListSchema.js
var ListSchema, list;
var init_ListSchema = __esmMin((() => {
	init_Schema();
	ListSchema = class ListSchema extends Schema {
		static symbol = Symbol.for("@smithy/lis");
		valueSchema;
		symbol = ListSchema.symbol;
	};
	list = (e, t, n, r) => Schema.assign(new ListSchema(), {
		name: t,
		namespace: e,
		traits: n,
		valueSchema: r
	});
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/schema/schemas/MapSchema.js
var MapSchema, map$1;
var init_MapSchema = __esmMin((() => {
	init_Schema();
	MapSchema = class MapSchema extends Schema {
		static symbol = Symbol.for("@smithy/map");
		keySchema;
		valueSchema;
		symbol = MapSchema.symbol;
	};
	map$1 = (e, t, n, r, i) => Schema.assign(new MapSchema(), {
		name: t,
		namespace: e,
		traits: n,
		keySchema: r,
		valueSchema: i
	});
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/schema/schemas/OperationSchema.js
var OperationSchema, op;
var init_OperationSchema = __esmMin((() => {
	init_Schema();
	OperationSchema = class OperationSchema extends Schema {
		static symbol = Symbol.for("@smithy/ope");
		input;
		output;
		symbol = OperationSchema.symbol;
	};
	op = (e, t, n, r, i) => Schema.assign(new OperationSchema(), {
		name: t,
		namespace: e,
		traits: n,
		input: r,
		output: i
	});
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/schema/schemas/StructureSchema.js
var StructureSchema, struct;
var init_StructureSchema = __esmMin((() => {
	init_Schema();
	StructureSchema = class StructureSchema extends Schema {
		static symbol = Symbol.for("@smithy/str");
		memberNames;
		memberList;
		symbol = StructureSchema.symbol;
	};
	struct = (e, t, n, r, i) => Schema.assign(new StructureSchema(), {
		name: t,
		namespace: e,
		traits: n,
		memberNames: r,
		memberList: i
	});
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/schema/schemas/ErrorSchema.js
var ErrorSchema, error;
var init_ErrorSchema = __esmMin((() => {
	init_Schema();
	init_StructureSchema();
	ErrorSchema = class ErrorSchema extends StructureSchema {
		static symbol = Symbol.for("@smithy/err");
		ctor;
		symbol = ErrorSchema.symbol;
	};
	error = (e, t, n, r, i, a) => Schema.assign(new ErrorSchema(), {
		name: t,
		namespace: e,
		traits: n,
		memberNames: r,
		memberList: i,
		ctor: null
	});
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js
function translateTraits(e) {
	if (typeof e === "object") return e;
	e = e | 0;
	if (traitsCache[e]) return traitsCache[e];
	const t = {};
	let n = 0;
	for (const r of [
		"httpLabel",
		"idempotent",
		"idempotencyToken",
		"sensitive",
		"httpPayload",
		"httpResponseCode",
		"httpQueryParams"
	]) if ((e >> n++ & 1) === 1) t[r] = 1;
	return traitsCache[e] = t;
}
var traitsCache;
var init_translateTraits = __esmMin((() => {
	traitsCache = [];
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js
function member(e, t) {
	if (e instanceof NormalizedSchema) return Object.assign(e, {
		memberName: t,
		_isMemberSchema: true
	});
	return new NormalizedSchema(e, t);
}
var anno, simpleSchemaCacheN, simpleSchemaCacheS, NormalizedSchema, isMemberSchema, isStaticSchema;
var init_NormalizedSchema = __esmMin((() => {
	init_deref();
	init_translateTraits();
	anno = {
		it: Symbol.for("@smithy/nor-struct-it"),
		ns: Symbol.for("@smithy/ns")
	};
	simpleSchemaCacheN = [];
	simpleSchemaCacheS = {};
	NormalizedSchema = class NormalizedSchema {
		ref;
		memberName;
		static symbol = Symbol.for("@smithy/nor");
		symbol = NormalizedSchema.symbol;
		name;
		schema;
		_isMemberSchema;
		traits;
		memberTraits;
		normalizedTraits;
		constructor(e, t) {
			this.ref = e;
			this.memberName = t;
			const n = [];
			let r = e;
			let i = e;
			this._isMemberSchema = false;
			while (isMemberSchema(r)) {
				n.push(r[1]);
				r = r[0];
				i = deref(r);
				this._isMemberSchema = true;
			}
			if (n.length > 0) {
				this.memberTraits = {};
				for (let e = n.length - 1; e >= 0; --e) {
					const t = n[e];
					Object.assign(this.memberTraits, translateTraits(t));
				}
			} else this.memberTraits = 0;
			if (i instanceof NormalizedSchema) {
				const e = this.memberTraits;
				Object.assign(this, i);
				this.memberTraits = Object.assign({}, e, i.getMemberTraits(), this.getMemberTraits());
				this.normalizedTraits = void 0;
				this.memberName = t ?? i.memberName;
				return;
			}
			this.schema = deref(i);
			if (isStaticSchema(this.schema)) {
				this.name = `${this.schema[1]}#${this.schema[2]}`;
				this.traits = this.schema[3];
			} else {
				this.name = this.memberName ?? String(i);
				this.traits = 0;
			}
			if (this._isMemberSchema && !t) throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(true)} missing member name.`);
		}
		static [Symbol.hasInstance](e) {
			const t = this.prototype.isPrototypeOf(e);
			if (!t && typeof e === "object" && e !== null) return e.symbol === this.symbol;
			return t;
		}
		static of(e) {
			const t = typeof e === "function" || typeof e === "object" && e !== null;
			if (typeof e === "number") {
				if (simpleSchemaCacheN[e]) return simpleSchemaCacheN[e];
			} else if (typeof e === "string") {
				if (simpleSchemaCacheS[e]) return simpleSchemaCacheS[e];
			} else if (t) {
				if (e[anno.ns]) return e[anno.ns];
			}
			const n = deref(e);
			if (n instanceof NormalizedSchema) return n;
			if (isMemberSchema(n)) {
				const [t, r] = n;
				if (t instanceof NormalizedSchema) {
					Object.assign(t.getMergedTraits(), translateTraits(r));
					return t;
				}
				throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(e, null, 2)}.`);
			}
			const r = new NormalizedSchema(n);
			if (t) return e[anno.ns] = r;
			if (typeof n === "string") return simpleSchemaCacheS[n] = r;
			if (typeof n === "number") return simpleSchemaCacheN[n] = r;
			return r;
		}
		getSchema() {
			const e = this.schema;
			if (Array.isArray(e) && e[0] === 0) return e[4];
			return e;
		}
		getName(e = false) {
			const { name: t } = this;
			return !e && t && t.includes("#") ? t.split("#")[1] : t || void 0;
		}
		getMemberName() {
			return this.memberName;
		}
		isMemberSchema() {
			return this._isMemberSchema;
		}
		isListSchema() {
			const e = this.getSchema();
			return typeof e === "number" ? e >= 64 && e < 128 : e[0] === 1;
		}
		isMapSchema() {
			const e = this.getSchema();
			return typeof e === "number" ? e >= 128 && e <= 255 : e[0] === 2;
		}
		isStructSchema() {
			const e = this.getSchema();
			if (typeof e !== "object") return false;
			const t = e[0];
			return t === 3 || t === -3 || t === 4;
		}
		isUnionSchema() {
			const e = this.getSchema();
			if (typeof e !== "object") return false;
			return e[0] === 4;
		}
		isBlobSchema() {
			const e = this.getSchema();
			return e === 21 || e === 42;
		}
		isTimestampSchema() {
			const e = this.getSchema();
			return typeof e === "number" && e >= 4 && e <= 7;
		}
		isUnitSchema() {
			return this.getSchema() === "unit";
		}
		isDocumentSchema() {
			return this.getSchema() === 15;
		}
		isStringSchema() {
			return this.getSchema() === 0;
		}
		isBooleanSchema() {
			return this.getSchema() === 2;
		}
		isNumericSchema() {
			return this.getSchema() === 1;
		}
		isBigIntegerSchema() {
			return this.getSchema() === 17;
		}
		isBigDecimalSchema() {
			return this.getSchema() === 19;
		}
		isStreaming() {
			const { streaming: e } = this.getMergedTraits();
			return !!e || this.getSchema() === 42;
		}
		isIdempotencyToken() {
			return !!this.getMergedTraits().idempotencyToken;
		}
		getMergedTraits() {
			return this.normalizedTraits ?? (this.normalizedTraits = {
				...this.getOwnTraits(),
				...this.getMemberTraits()
			});
		}
		getMemberTraits() {
			return translateTraits(this.memberTraits);
		}
		getOwnTraits() {
			return translateTraits(this.traits);
		}
		getKeySchema() {
			const [e, t] = [this.isDocumentSchema(), this.isMapSchema()];
			if (!e && !t) throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(true)}`);
			const n = this.getSchema();
			return member([e ? 15 : n[4] ?? 0, 0], "key");
		}
		getValueSchema() {
			const e = this.getSchema();
			const [t, n, r] = [
				this.isDocumentSchema(),
				this.isMapSchema(),
				this.isListSchema()
			];
			const i = typeof e === "number" ? 63 & e : e && typeof e === "object" && (n || r) ? e[3 + e[0]] : t ? 15 : void 0;
			if (i != null) return member([i, 0], n ? "value" : "member");
			throw new Error(`@smithy/core/schema - ${this.getName(true)} has no value member.`);
		}
		getMemberSchema(e) {
			const t = this.getSchema();
			if (this.isStructSchema() && t[4].includes(e)) {
				const n = t[4].indexOf(e);
				const r = t[5][n];
				return member(isMemberSchema(r) ? r : [r, 0], e);
			}
			if (this.isDocumentSchema()) return member([15, 0], e);
			throw new Error(`@smithy/core/schema - ${this.getName(true)} has no member=${e}.`);
		}
		getMemberSchemas() {
			const e = {};
			try {
				for (const [t, n] of this.structIterator()) e[t] = n;
			} catch (e) {}
			return e;
		}
		getEventStreamMember() {
			if (this.isStructSchema()) {
				for (const [e, t] of this.structIterator()) if (t.isStreaming() && t.isStructSchema()) return e;
			}
			return "";
		}
		*structIterator() {
			if (this.isUnitSchema()) return;
			if (!this.isStructSchema()) throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");
			const e = this.getSchema();
			const t = e[4].length;
			let n = e[anno.it];
			if (n && t === n.length) {
				yield* n;
				return;
			}
			n = Array(t);
			for (let r = 0; r < t; ++r) {
				const t = e[4][r];
				const i = member([e[5][r], 0], t);
				yield n[r] = [t, i];
			}
			e[anno.it] = n;
		}
	};
	isMemberSchema = (e) => Array.isArray(e) && e.length === 2;
	isStaticSchema = (e) => Array.isArray(e) && e.length >= 5;
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/schema/schemas/SimpleSchema.js
var SimpleSchema, sim, simAdapter;
var init_SimpleSchema = __esmMin((() => {
	init_Schema();
	SimpleSchema = class SimpleSchema extends Schema {
		static symbol = Symbol.for("@smithy/sim");
		schemaRef;
		symbol = SimpleSchema.symbol;
	};
	sim = (e, t, n, r) => Schema.assign(new SimpleSchema(), {
		name: t,
		namespace: e,
		traits: r,
		schemaRef: n
	});
	simAdapter = (e, t, n, r) => Schema.assign(new SimpleSchema(), {
		name: t,
		namespace: e,
		traits: n,
		schemaRef: r
	});
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/schema/schemas/sentinels.js
var SCHEMA;
var init_sentinels = __esmMin((() => {
	SCHEMA = {
		BLOB: 21,
		STREAMING_BLOB: 42,
		BOOLEAN: 2,
		STRING: 0,
		NUMERIC: 1,
		BIG_INTEGER: 17,
		BIG_DECIMAL: 19,
		DOCUMENT: 15,
		TIMESTAMP_DEFAULT: 4,
		TIMESTAMP_DATE_TIME: 5,
		TIMESTAMP_HTTP_DATE: 6,
		TIMESTAMP_EPOCH_SECONDS: 7,
		LIST_MODIFIER: 64,
		MAP_MODIFIER: 128
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js
var TypeRegistry;
var init_TypeRegistry = __esmMin((() => {
	TypeRegistry = class TypeRegistry {
		namespace;
		schemas;
		exceptions;
		static registries = /* @__PURE__ */ new Map();
		constructor(e, t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map()) {
			this.namespace = e;
			this.schemas = t;
			this.exceptions = n;
			if (!TypeRegistry.registries.has(e)) TypeRegistry.registries.set(e, this);
		}
		static for(e) {
			return TypeRegistry.registries.get(e) ?? new TypeRegistry(e);
		}
		copyFrom(e) {
			const { schemas: t, exceptions: n } = this;
			for (const [n, r] of e.schemas) if (!t.has(n)) t.set(n, r);
			for (const [t, r] of e.exceptions) if (!n.has(t)) n.set(t, r);
		}
		register(e, t) {
			const n = this.normalizeShapeId(e);
			for (const e of [this, TypeRegistry.for(n.split("#")[0])]) if (!e.schemas.has(n)) e.schemas.set(n, t);
		}
		getSchema(e) {
			const t = this.normalizeShapeId(e);
			if (!this.schemas.has(t)) {
				if (!e.includes("#")) {
					const t = "#" + e;
					const n = [];
					for (const [e, r] of this.schemas.entries()) if (e.endsWith(t)) n.push(r);
					if (n.length === 1) return n[0];
				}
				throw new Error(`@smithy/core/schema - schema not found for ${t}`);
			}
			return this.schemas.get(t);
		}
		registerError(e, t) {
			const n = e;
			const r = n[1];
			const i = r + "#" + n[2];
			if (!t.hasOwnProperty?.("shapeId")) t.shapeId = i;
			for (const e of [this, TypeRegistry.for(r)]) if (!e.schemas.has(i) && !e.exceptions.has(n)) {
				e.schemas.set(i, n);
				e.exceptions.set(n, t);
			}
		}
		getErrorCtor(e) {
			const t = e;
			if (this.exceptions.has(t)) return this.exceptions.get(t);
			return TypeRegistry.for(t[1]).exceptions.get(t);
		}
		getBaseException() {
			for (const e of this.exceptions.keys()) if (Array.isArray(e)) {
				const [, t, n] = e;
				const r = t + "#" + n;
				if (r.startsWith("smithy.ts.sdk.synthetic.") && r.endsWith("ServiceException")) return e;
			}
		}
		find(e) {
			for (const t of this.schemas.values()) if (e(t)) return t;
		}
		clear() {
			this.schemas.clear();
			this.exceptions.clear();
		}
		normalizeShapeId(e) {
			if (e.includes("#")) return e;
			return this.namespace + "#" + e;
		}
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/schema/index.js
var schema_exports = /* @__PURE__ */ __exportAll({
	ErrorSchema: () => ErrorSchema,
	ListSchema: () => ListSchema,
	MapSchema: () => MapSchema,
	NormalizedSchema: () => NormalizedSchema,
	OperationSchema: () => OperationSchema,
	SCHEMA: () => SCHEMA,
	Schema: () => Schema,
	SimpleSchema: () => SimpleSchema,
	StructureSchema: () => StructureSchema,
	TypeRegistry: () => TypeRegistry,
	deref: () => deref,
	deserializerMiddlewareOption: () => deserializerMiddlewareOption$1,
	error: () => error,
	getSchemaSerdePlugin: () => getSchemaSerdePlugin,
	isStaticSchema: () => isStaticSchema,
	list: () => list,
	map: () => map$1,
	op: () => op,
	operation: () => operation,
	serializerMiddlewareOption: () => serializerMiddlewareOption$2,
	sim: () => sim,
	simAdapter: () => simAdapter,
	simpleSchemaCacheN: () => simpleSchemaCacheN,
	simpleSchemaCacheS: () => simpleSchemaCacheS,
	struct: () => struct,
	traitsCache: () => traitsCache,
	translateTraits: () => translateTraits
});
var init_schema = __esmMin((() => {
	init_deref();
	init_getSchemaSerdePlugin();
	init_ListSchema();
	init_MapSchema();
	init_OperationSchema();
	init_operation();
	init_ErrorSchema();
	init_NormalizedSchema();
	init_Schema();
	init_SimpleSchema();
	init_StructureSchema();
	init_sentinels();
	init_translateTraits();
	init_TypeRegistry();
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/schemaLogFilter.js
function schemaLogFilter(e, t) {
	if (t == null) return t;
	const n = NormalizedSchema.of(e);
	if (n.getMergedTraits().sensitive) return SENSITIVE_STRING$1;
	if (n.isListSchema()) {
		if (!!n.getValueSchema().getMergedTraits().sensitive) return SENSITIVE_STRING$1;
	} else if (n.isMapSchema()) {
		if (!!n.getKeySchema().getMergedTraits().sensitive || !!n.getValueSchema().getMergedTraits().sensitive) return SENSITIVE_STRING$1;
	} else if (n.isStructSchema() && typeof t === "object") {
		const e = t;
		const r = {};
		for (const [t, i] of n.structIterator()) if (e[t] != null) r[t] = schemaLogFilter(i, e[t]);
		return r;
	}
	return t;
}
var SENSITIVE_STRING$1;
var init_schemaLogFilter = __esmMin((() => {
	init_schema();
	SENSITIVE_STRING$1 = "***SensitiveInformation***";
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/command.js
var import_dist_cjs$5, Command, ClassBuilder;
var init_command = __esmMin((() => {
	import_dist_cjs$5 = require_dist_cjs();
	init_MiddlewareStack();
	init_schemaLogFilter();
	Command = class {
		middlewareStack = constructStack();
		schema;
		static classBuilder() {
			return new ClassBuilder();
		}
		resolveMiddlewareWithContext(e, t, n, { middlewareFn: r, clientName: i, commandName: a, inputFilterSensitiveLog: o, outputFilterSensitiveLog: s, smithyContext: c, additionalContext: l, CommandCtor: u }) {
			for (const i of r.bind(this)(u, e, t, n)) this.middlewareStack.use(i);
			const d = e.concat(this.middlewareStack);
			const { logger: f } = t;
			const p = l[import_dist_cjs$5.SMITHY_CONTEXT_KEY];
			const m = {
				logger: f,
				clientName: i,
				commandName: a,
				inputFilterSensitiveLog: o,
				outputFilterSensitiveLog: s,
				...l,
				[import_dist_cjs$5.SMITHY_CONTEXT_KEY]: {
					...p,
					commandInstance: this,
					...c,
					...n?.metricsRecorder === void 0 ? {} : { metricsRecorder: n.metricsRecorder }
				}
			};
			const { requestHandler: h } = t;
			let g = n ?? {};
			if (g.metricsRecorder) {
				g = { ...g };
				delete g.metricsRecorder;
			}
			if (c.eventStream) g = {
				isEventStream: true,
				...g
			};
			return d.resolve((e) => h.handle(e.request, g), m);
		}
	};
	ClassBuilder = class {
		_init = () => {};
		_ep = {};
		_middlewareFn = () => [];
		_commandName = "";
		_clientName = "";
		_additionalContext = {};
		_smithyContext = {};
		_inputFilterSensitiveLog = void 0;
		_outputFilterSensitiveLog = void 0;
		_serializer = null;
		_deserializer = null;
		_operationSchema;
		init(e) {
			this._init = e;
		}
		ep(e) {
			this._ep = e;
			return this;
		}
		m(e) {
			this._middlewareFn = e;
			return this;
		}
		s(e, t, n = {}) {
			this._smithyContext = {
				service: e,
				operation: t,
				...n
			};
			return this;
		}
		c(e = {}) {
			this._additionalContext = e;
			return this;
		}
		n(e, t) {
			this._clientName = e;
			this._commandName = t;
			return this;
		}
		f(e = (e) => e, t = (e) => e) {
			this._inputFilterSensitiveLog = e;
			this._outputFilterSensitiveLog = t;
			return this;
		}
		ser(e) {
			this._serializer = e;
			return this;
		}
		de(e) {
			this._deserializer = e;
			return this;
		}
		sc(e) {
			this._operationSchema = e;
			this._smithyContext.operationSchema = e;
			return this;
		}
		build() {
			const e = this;
			let CommandRef;
			return CommandRef = class extends Command {
				input;
				static getEndpointParameterInstructions() {
					return e._ep;
				}
				constructor(...[t]) {
					super();
					this.input = t ?? {};
					e._init(this);
					this.schema = e._operationSchema;
				}
				resolveMiddleware(t, n, r) {
					const i = e._operationSchema;
					const a = i?.[4] ?? i?.input;
					const o = i?.[5] ?? i?.output;
					return this.resolveMiddlewareWithContext(t, n, r, {
						CommandCtor: CommandRef,
						middlewareFn: e._middlewareFn,
						clientName: e._clientName,
						commandName: e._commandName,
						inputFilterSensitiveLog: e._inputFilterSensitiveLog ?? (i ? schemaLogFilter.bind(null, a) : (e) => e),
						outputFilterSensitiveLog: e._outputFilterSensitiveLog ?? (i ? schemaLogFilter.bind(null, o) : (e) => e),
						smithyContext: e._smithyContext,
						additionalContext: e._additionalContext
					});
				}
				serialize = e._serializer;
				deserialize = e._deserializer;
			};
		}
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/constants.js
var SENSITIVE_STRING;
var init_constants$2 = __esmMin((() => {
	SENSITIVE_STRING = "***SensitiveInformation***";
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/create-aggregated-client.js
var createAggregatedClient;
var init_create_aggregated_client = __esmMin((() => {
	createAggregatedClient = (e, t, n) => {
		for (const [n, r] of Object.entries(e)) {
			const methodImpl = async function(e, t, n) {
				const i = new r(e);
				if (typeof t === "function") this.send(i, t);
				else if (typeof n === "function") {
					if (typeof t !== "object") throw new Error(`Expected http options but got ${typeof t}`);
					this.send(i, t || {}, n);
				} else return this.send(i, t);
			};
			const e = (n[0].toLowerCase() + n.slice(1)).replace(/Command$/, "");
			t.prototype[e] = methodImpl;
		}
		const { paginators: r = {}, waiters: i = {} } = n ?? {};
		for (const [e, n] of Object.entries(r)) if (t.prototype[e] === void 0) t.prototype[e] = function(e = {}, t, ...r) {
			return n({
				...t,
				client: this
			}, e, ...r);
		};
		for (const [e, n] of Object.entries(i)) if (t.prototype[e] === void 0) t.prototype[e] = async function(e = {}, t, ...r) {
			let i = t;
			if (typeof t === "number") i = { maxWaitTime: t };
			return n({
				...i,
				client: this
			}, e, ...r);
		};
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/exceptions.js
var ServiceException, decorateServiceException;
var init_exceptions = __esmMin((() => {
	ServiceException = class ServiceException extends Error {
		static shapeId = "smithy.ts.sdk.synthetic.nonamespace.client#ServiceException";
		$fault;
		$response;
		$retryable;
		$metadata;
		constructor(e) {
			super(e.message);
			Object.setPrototypeOf(this, Object.getPrototypeOf(this).constructor.prototype);
			this.name = e.name;
			this.$fault = e.$fault;
			this.$metadata = e.$metadata;
		}
		static isInstance(e) {
			if (!e) return false;
			const t = e;
			return ServiceException.prototype.isPrototypeOf(t) || Boolean(t.$fault) && Boolean(t.$metadata) && (t.$fault === "client" || t.$fault === "server");
		}
		static [Symbol.hasInstance](e) {
			if (!e) return false;
			const t = e;
			if (this === ServiceException) return ServiceException.isInstance(e);
			if (ServiceException.isInstance(e)) {
				if (this.prototype.isPrototypeOf(e)) return true;
				const n = Object.prototype.hasOwnProperty.call(this, "shapeId") ? this.shapeId : void 0;
				let r = false;
				if (n) {
					let e = Object.getPrototypeOf(t);
					while (e && e !== Object.prototype) {
						const t = e.constructor;
						const i = t !== ServiceException && Object.prototype.hasOwnProperty.call(t, "shapeId") ? t?.shapeId : void 0;
						if (i) {
							r = true;
							if (i === n) return true;
						}
						e = Object.getPrototypeOf(e);
					}
				}
				if (n && r) return false;
				const i = this.name;
				if (i && i.length >= 6) {
					if (t.name === i) return true;
					let e = Object.getPrototypeOf(t);
					while (e && e !== Object.prototype) {
						const t = e.constructor?.name;
						if (t && t !== "Error" && t === i) return true;
						e = Object.getPrototypeOf(e);
					}
				}
			}
			return false;
		}
	};
	decorateServiceException = (e, t = {}) => {
		Object.entries(t).filter(([, e]) => e !== void 0).forEach(([t, n]) => {
			if (e[t] == void 0 || e[t] === "") e[t] = n;
		});
		e.message = e.message || e.Message || "UnknownError";
		delete e.Message;
		return e;
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/default-error-handler.js
var throwDefaultError, withBaseException, deserializeMetadata;
var init_default_error_handler = __esmMin((() => {
	init_exceptions();
	throwDefaultError = ({ output: e, parsedBody: t, exceptionCtor: n, errorCode: r }) => {
		const i = deserializeMetadata(e);
		const a = i.httpStatusCode ? i.httpStatusCode + "" : void 0;
		const o = new n({
			name: t?.code || t?.Code || r || a || "UnknownError",
			$fault: "client",
			$metadata: i
		});
		throw decorateServiceException(o, t);
	};
	withBaseException = (e) => {
		return ({ output: t, parsedBody: n, errorCode: r }) => {
			throwDefaultError({
				output: t,
				parsedBody: n,
				exceptionCtor: e,
				errorCode: r
			});
		};
	};
	deserializeMetadata = (e) => ({
		httpStatusCode: e.statusCode,
		requestId: e.headers["x-amzn-requestid"] ?? e.headers["x-amzn-request-id"] ?? e.headers["x-amz-request-id"],
		extendedRequestId: e.headers["x-amz-id-2"],
		cfId: e.headers["x-amz-cf-id"]
	});
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/defaults-mode.js
var loadConfigsForDefaultMode;
var init_defaults_mode = __esmMin((() => {
	loadConfigsForDefaultMode = (e) => {
		switch (e) {
			case "standard": return {
				retryMode: "standard",
				connectionTimeout: 3100
			};
			case "in-region": return {
				retryMode: "standard",
				connectionTimeout: 1100
			};
			case "cross-region": return {
				retryMode: "standard",
				connectionTimeout: 3100
			};
			case "mobile": return {
				retryMode: "standard",
				connectionTimeout: 3e4
			};
			default: return {};
		}
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/emitWarningIfUnsupportedVersion.js
var warningEmitted, emitWarningIfUnsupportedVersion;
var init_emitWarningIfUnsupportedVersion = __esmMin((() => {
	warningEmitted = false;
	emitWarningIfUnsupportedVersion = (e) => {
		if (e && !warningEmitted && parseInt(e.substring(1, e.indexOf("."))) < 16) warningEmitted = true;
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/checksum.js
var import_dist_cjs$4, knownAlgorithms, getChecksumConfiguration, resolveChecksumRuntimeConfig;
var init_checksum$1 = __esmMin((() => {
	init_transport();
	import_dist_cjs$4 = require_dist_cjs();
	knownAlgorithms = Object.values(import_dist_cjs$4.AlgorithmId);
	getChecksumConfiguration = (e) => {
		const t = [];
		for (const n in import_dist_cjs$4.AlgorithmId) {
			if (!hasOwn(import_dist_cjs$4.AlgorithmId, n)) continue;
			const r = import_dist_cjs$4.AlgorithmId[n];
			if (e[r] === void 0) continue;
			t.push({
				algorithmId: () => r,
				checksumConstructor: () => e[r]
			});
		}
		for (const [n, r] of Object.entries(e.checksumAlgorithms ?? {})) t.push({
			algorithmId: () => n,
			checksumConstructor: () => r
		});
		return {
			addChecksumAlgorithm(n) {
				e.checksumAlgorithms = e.checksumAlgorithms ?? {};
				const r = n.algorithmId();
				const i = n.checksumConstructor();
				if (knownAlgorithms.includes(r)) e.checksumAlgorithms[r.toUpperCase()] = i;
				else e.checksumAlgorithms[r] = i;
				t.push(n);
			},
			checksumAlgorithms() {
				return t;
			}
		};
	};
	resolveChecksumRuntimeConfig = (e) => {
		const t = {};
		e.checksumAlgorithms().forEach((e) => {
			const n = e.algorithmId();
			if (knownAlgorithms.includes(n)) t[n] = e.checksumConstructor();
		});
		return t;
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/retry.js
var getRetryConfiguration, resolveRetryRuntimeConfig;
var init_retry = __esmMin((() => {
	getRetryConfiguration = (e) => {
		return {
			setRetryStrategy(t) {
				e.retryStrategy = t;
			},
			retryStrategy() {
				return e.retryStrategy;
			}
		};
	};
	resolveRetryRuntimeConfig = (e) => {
		const t = {};
		t.retryStrategy = e.retryStrategy();
		return t;
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/defaultExtensionConfiguration.js
var getDefaultExtensionConfiguration, getDefaultClientConfiguration, resolveDefaultRuntimeConfig;
var init_defaultExtensionConfiguration = __esmMin((() => {
	init_checksum$1();
	init_retry();
	getDefaultExtensionConfiguration = (e) => {
		return Object.assign(getChecksumConfiguration(e), getRetryConfiguration(e));
	};
	getDefaultClientConfiguration = getDefaultExtensionConfiguration;
	resolveDefaultRuntimeConfig = (e) => {
		return Object.assign(resolveChecksumRuntimeConfig(e), resolveRetryRuntimeConfig(e));
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-array-if-single-item.js
var getArrayIfSingleItem;
var init_get_array_if_single_item = __esmMin((() => {
	getArrayIfSingleItem = (e) => Array.isArray(e) ? e : [e];
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-value-from-text-node.js
var getValueFromTextNode;
var init_get_value_from_text_node = __esmMin((() => {
	init_transport();
	getValueFromTextNode = (e) => {
		const t = "#text";
		for (const n in e) {
			if (!hasOwn(e, n)) continue;
			if (e[n][t] !== void 0) e[n] = e[n][t];
			else if (typeof e[n] === "object" && e[n] !== null) e[n] = getValueFromTextNode(e[n]);
		}
		return e;
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/is-serializable-header-value.js
var isSerializableHeaderValue;
var init_is_serializable_header_value = __esmMin((() => {
	isSerializableHeaderValue = (e) => {
		return e != null;
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/NoOpLogger.js
var NoOpLogger;
var init_NoOpLogger = __esmMin((() => {
	NoOpLogger = class {
		trace() {}
		debug() {}
		info() {}
		warn() {}
		error() {}
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/object-mapping.js
function map(e, t, n) {
	let r;
	let i;
	let a;
	if (typeof t === "undefined" && typeof n === "undefined") {
		r = {};
		a = e;
	} else {
		r = e;
		if (typeof t === "function") {
			i = t;
			a = n;
			return mapWithFilter(r, i, a);
		} else a = t;
	}
	for (const e in a) {
		if (!hasOwn(a, e)) continue;
		if (!Array.isArray(a[e])) {
			r[e] = a[e];
			continue;
		}
		applyInstruction(r, null, a, e);
	}
	return r;
}
var convertMap, take, mapWithFilter, applyInstruction, nonNullish, pass;
var init_object_mapping = __esmMin((() => {
	init_transport();
	convertMap = (e) => {
		const t = {};
		for (const [n, r] of Object.entries(e || {})) t[n] = [, r];
		return t;
	};
	take = (e, t) => {
		const n = {};
		for (const r in t) {
			if (!hasOwn(t, r)) continue;
			applyInstruction(n, e, t, r);
		}
		return n;
	};
	mapWithFilter = (e, t, n) => {
		return map(e, Object.entries(n).reduce((e, [n, r]) => {
			if (Array.isArray(r)) e[n] = r;
			else if (typeof r === "function") e[n] = [t, r()];
			else e[n] = [t, r];
			return e;
		}, {}));
	};
	applyInstruction = (e, t, n, r) => {
		if (t !== null) {
			let i = n[r];
			if (typeof i === "function") i = [, i];
			const [a = nonNullish, o = pass, s = r] = i;
			if (typeof a === "function" && a(t[s]) || typeof a !== "function" && !!a) e[r] = o(t[s]);
			return;
		}
		let [i, a] = n[r];
		if (typeof a === "function") {
			let t;
			const n = i === void 0 && (t = a()) != null;
			const o = typeof i === "function" && !!i(void 0) || typeof i !== "function" && !!i;
			if (n) e[r] = t;
			else if (o) e[r] = a();
		} else {
			const t = i === void 0 && a != null;
			const n = typeof i === "function" && !!i(a) || typeof i !== "function" && !!i;
			if (t || n) e[r] = a;
		}
	};
	nonNullish = (e) => e != null;
	pass = (e) => e;
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/ser-utils.js
var serializeFloat, serializeDateTime;
var init_ser_utils = __esmMin((() => {
	serializeFloat = (e) => {
		if (e !== e) return "NaN";
		switch (e) {
			case Infinity: return "Infinity";
			case -Infinity: return "-Infinity";
			default: return e;
		}
	};
	serializeDateTime = (e) => e.toISOString().replace(".000Z", "Z");
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/serde-json.js
var _json;
var init_serde_json = __esmMin((() => {
	init_transport();
	_json = (e) => {
		if (e == null) return {};
		if (Array.isArray(e)) return e.filter((e) => e != null).map(_json);
		if (typeof e === "object") {
			const t = {};
			for (const n in e) {
				if (!hasOwn(e, n)) continue;
				if (e[n] == null) continue;
				t[n] = _json(e[n]);
			}
			return t;
		}
		return e;
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/client-command-builder.js
function makeBuilder(e, t, n, r) {
	return function makeCommand(i, a, o, s, c = {}) {
		const l = Object.assign({}, e, i);
		return Command.classBuilder().ep(l).m(function(e, t, n, i) {
			const o = a.call(this, e, t, n, i);
			o.unshift(r(n, e.getEndpointParameterInstructions()));
			return o;
		}).s(t, o, c).n(n, o.charAt(0).toUpperCase() + o.slice(1) + "Command").sc(s).build();
	};
}
var init_client_command_builder = __esmMin((() => {
	init_command();
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/client/index.js
var client_exports = /* @__PURE__ */ __exportAll({
	AlgorithmId: () => import_dist_cjs$4.AlgorithmId,
	Client: () => Client,
	Command: () => Command,
	NoOpLogger: () => NoOpLogger,
	SENSITIVE_STRING: () => SENSITIVE_STRING,
	ServiceException: () => ServiceException,
	WaiterState: () => WaiterState,
	_json: () => _json,
	checkExceptions: () => checkExceptions,
	constructStack: () => constructStack,
	convertMap: () => convertMap,
	createAggregatedClient: () => createAggregatedClient,
	createWaiter: () => createWaiter,
	decorateServiceException: () => decorateServiceException,
	emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion,
	getArrayIfSingleItem: () => getArrayIfSingleItem,
	getChecksumConfiguration: () => getChecksumConfiguration,
	getDefaultClientConfiguration: () => getDefaultClientConfiguration,
	getDefaultExtensionConfiguration: () => getDefaultExtensionConfiguration,
	getRetryConfiguration: () => getRetryConfiguration,
	getSmithyContext: () => getSmithyContext,
	getValueFromTextNode: () => getValueFromTextNode,
	invalidFunction: () => invalidFunction,
	invalidProvider: () => invalidProvider,
	isSerializableHeaderValue: () => isSerializableHeaderValue,
	loadConfigsForDefaultMode: () => loadConfigsForDefaultMode,
	makeBuilder: () => makeBuilder,
	map: () => map,
	normalizeProvider: () => normalizeProvider,
	resolveChecksumRuntimeConfig: () => resolveChecksumRuntimeConfig,
	resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig,
	resolveRetryRuntimeConfig: () => resolveRetryRuntimeConfig,
	schemaLogFilter: () => schemaLogFilter,
	serializeDateTime: () => serializeDateTime,
	serializeFloat: () => serializeFloat,
	take: () => take,
	throwDefaultError: () => throwDefaultError,
	waiterServiceDefaults: () => waiterServiceDefaults,
	withBaseException: () => withBaseException
});
var init_client = __esmMin((() => {
	init_MiddlewareStack();
	init_transport();
	init_invalidFunction();
	init_invalidProvider();
	init_createWaiter();
	init_waiter();
	init_client$1();
	init_command();
	init_constants$2();
	init_create_aggregated_client();
	init_default_error_handler();
	init_defaults_mode();
	init_emitWarningIfUnsupportedVersion();
	init_exceptions();
	init_defaultExtensionConfiguration();
	init_checksum$1();
	init_retry();
	init_get_array_if_single_item();
	init_get_value_from_text_node();
	init_is_serializable_header_value();
	init_NoOpLogger();
	init_object_mapping();
	init_schemaLogFilter();
	init_ser_utils();
	init_serde_json();
	init_client_command_builder();
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/is-array-buffer/is-array-buffer.js
var isArrayBuffer;
var init_is_array_buffer = __esmMin((() => {
	isArrayBuffer = (e) => typeof ArrayBuffer === "function" && e instanceof ArrayBuffer || Object.prototype.toString.call(e) === "[object ArrayBuffer]";
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/util-buffer-from/buffer-from.js
var fromArrayBuffer, fromString;
var init_buffer_from = __esmMin((() => {
	init_is_array_buffer();
	fromArrayBuffer = (e, t = 0, n = e.byteLength - t) => {
		if (!isArrayBuffer(e)) throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof e} (${e})`);
		return Buffer.from(e, t, n);
	};
	fromString = (e, t) => {
		if (typeof e !== "string") throw new TypeError(`The "input" argument must be of type string. Received type ${typeof e} (${e})`);
		return t ? Buffer.from(e, t) : Buffer.from(e);
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/util-base64/fromBase64.js
var BASE64_REGEX, fromBase64;
var init_fromBase64 = __esmMin((() => {
	init_buffer_from();
	BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/;
	fromBase64 = (e) => {
		if (e.length * 3 % 4 !== 0) throw new TypeError(`Incorrect padding on base64 string.`);
		if (!BASE64_REGEX.exec(e)) throw new TypeError(`Invalid base64 string.`);
		const t = fromString(e, "base64");
		return new Uint8Array(t.buffer, t.byteOffset, t.byteLength);
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/fromUtf8.js
var fromUtf8$1;
var init_fromUtf8 = __esmMin((() => {
	init_buffer_from();
	fromUtf8$1 = (e) => {
		const t = fromString(e, "utf8");
		return new Uint8Array(t.buffer, t.byteOffset, t.byteLength / Uint8Array.BYTES_PER_ELEMENT);
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/util-base64/toBase64.js
var toBase64$1;
var init_toBase64 = __esmMin((() => {
	init_buffer_from();
	init_fromUtf8();
	toBase64$1 = (e) => {
		let t;
		if (typeof e === "string") t = fromUtf8$1(e);
		else t = e;
		if (typeof t !== "object" || typeof t.byteOffset !== "number" || typeof t.byteLength !== "number") throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");
		return fromArrayBuffer(t.buffer, t.byteOffset, t.byteLength).toString("base64");
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/blob/Uint8ArrayBlobAdapter.js
function bindUint8ArrayBlobAdapter(e, t, n, r) {
	return class Uint8ArrayBlobAdapter extends Uint8Array {
		static fromString(e, n = "utf-8") {
			if (typeof e === "string") {
				if (n === "base64") return Uint8ArrayBlobAdapter.mutate(r(e));
				return Uint8ArrayBlobAdapter.mutate(t(e));
			}
			throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`);
		}
		static mutate(e) {
			Object.setPrototypeOf(e, Uint8ArrayBlobAdapter.prototype);
			return e;
		}
		transformToString(t = "utf-8") {
			if (t === "base64") return n(this);
			return e(this);
		}
	};
}
var init_Uint8ArrayBlobAdapter = __esmMin((() => {}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/toUtf8.js
var toUtf8$1;
var init_toUtf8 = __esmMin((() => {
	init_buffer_from();
	toUtf8$1 = (e) => {
		if (typeof e === "string") return e;
		if (typeof e !== "object" || typeof e.byteOffset !== "number" || typeof e.byteLength !== "number") throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");
		return fromArrayBuffer(e.buffer, e.byteOffset, e.byteLength).toString("utf8");
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/uuid/v4.js
function bindV4(e) {
	if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") return () => crypto.randomUUID();
	return () => {
		const t = /* @__PURE__ */ new Uint8Array(16);
		e(t);
		t[6] = t[6] & 15 | 64;
		t[8] = t[8] & 63 | 128;
		return decimalToHex[t[0]] + decimalToHex[t[1]] + decimalToHex[t[2]] + decimalToHex[t[3]] + "-" + decimalToHex[t[4]] + decimalToHex[t[5]] + "-" + decimalToHex[t[6]] + decimalToHex[t[7]] + "-" + decimalToHex[t[8]] + decimalToHex[t[9]] + "-" + decimalToHex[t[10]] + decimalToHex[t[11]] + decimalToHex[t[12]] + decimalToHex[t[13]] + decimalToHex[t[14]] + decimalToHex[t[15]];
	};
}
var decimalToHex;
var init_v4 = __esmMin((() => {
	decimalToHex = Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/copyDocumentWithTransform.js
var copyDocumentWithTransform;
var init_copyDocumentWithTransform = __esmMin((() => {
	copyDocumentWithTransform = (e, t, n = (e) => e) => e;
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js
var parseBoolean, expectBoolean, expectNumber, MAX_FLOAT, expectFloat32, expectLong, expectInt, expectInt32, expectShort, expectByte, expectSizedInt, castInt, expectNonNull, expectObject, expectString, expectUnion, strictParseDouble, strictParseFloat, strictParseFloat32, NUMBER_REGEX, parseNumber, limitedParseDouble, handleFloat, limitedParseFloat, limitedParseFloat32, parseFloatString, strictParseLong, strictParseInt, strictParseInt32, strictParseShort, strictParseByte, stackTraceWarning, logger;
var init_parse_utils = __esmMin((() => {
	init_transport();
	parseBoolean = (e) => {
		switch (e) {
			case "true": return true;
			case "false": return false;
			default: throw new Error(`Unable to parse boolean value "${e}"`);
		}
	};
	expectBoolean = (e) => {
		if (e === null || e === void 0) return;
		if (typeof e === "number") {
			if (e === 0 || e === 1) logger.warn(stackTraceWarning(`Expected boolean, got ${typeof e}: ${e}`));
			if (e === 0) return false;
			if (e === 1) return true;
		}
		if (typeof e === "string") {
			const t = e.toLowerCase();
			if (t === "false" || t === "true") logger.warn(stackTraceWarning(`Expected boolean, got ${typeof e}: ${e}`));
			if (t === "false") return false;
			if (t === "true") return true;
		}
		if (typeof e === "boolean") return e;
		throw new TypeError(`Expected boolean, got ${typeof e}: ${e}`);
	};
	expectNumber = (e) => {
		if (e === null || e === void 0) return;
		if (typeof e === "string") {
			const t = parseFloat(e);
			if (!Number.isNaN(t)) {
				if (String(t) !== String(e)) logger.warn(stackTraceWarning(`Expected number but observed string: ${e}`));
				return t;
			}
		}
		if (typeof e === "number") return e;
		throw new TypeError(`Expected number, got ${typeof e}: ${e}`);
	};
	MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23));
	expectFloat32 = (e) => {
		const t = expectNumber(e);
		if (t !== void 0 && !Number.isNaN(t) && t !== Infinity && t !== -Infinity) {
			if (Math.abs(t) > MAX_FLOAT) throw new TypeError(`Expected 32-bit float, got ${e}`);
		}
		return t;
	};
	expectLong = (e) => {
		if (e === null || e === void 0) return;
		if (Number.isInteger(e) && !Number.isNaN(e)) return e;
		throw new TypeError(`Expected integer, got ${typeof e}: ${e}`);
	};
	expectInt = expectLong;
	expectInt32 = (e) => expectSizedInt(e, 32);
	expectShort = (e) => expectSizedInt(e, 16);
	expectByte = (e) => expectSizedInt(e, 8);
	expectSizedInt = (e, t) => {
		const n = expectLong(e);
		if (n !== void 0 && castInt(n, t) !== n) throw new TypeError(`Expected ${t}-bit integer, got ${e}`);
		return n;
	};
	castInt = (e, t) => {
		switch (t) {
			case 32: return Int32Array.of(e)[0];
			case 16: return Int16Array.of(e)[0];
			case 8: return Int8Array.of(e)[0];
		}
	};
	expectNonNull = (e, t) => {
		if (e === null || e === void 0) {
			if (t) throw new TypeError(`Expected a non-null value for ${t}`);
			throw new TypeError("Expected a non-null value");
		}
		return e;
	};
	expectObject = (e) => {
		if (e === null || e === void 0) return;
		if (typeof e === "object" && !Array.isArray(e)) return e;
		throw new TypeError(`Expected object, got ${Array.isArray(e) ? "array" : typeof e}: ${e}`);
	};
	expectString = (e) => {
		if (e === null || e === void 0) return;
		if (typeof e === "string") return e;
		if ([
			"boolean",
			"number",
			"bigint"
		].includes(typeof e)) {
			logger.warn(stackTraceWarning(`Expected string, got ${typeof e}: ${e}`));
			return String(e);
		}
		throw new TypeError(`Expected string, got ${typeof e}: ${e}`);
	};
	expectUnion = (e) => {
		if (e === null || e === void 0) return;
		const t = expectObject(e);
		const n = [];
		for (const e in t) {
			if (!hasOwn(t, e)) continue;
			if (t[e] != null) n.push(e);
		}
		if (n.length === 0) throw new TypeError(`Unions must have exactly one non-null member. None were found.`);
		if (n.length > 1) throw new TypeError(`Unions must have exactly one non-null member. Keys ${n} were not null.`);
		return t;
	};
	strictParseDouble = (e) => {
		if (typeof e == "string") return expectNumber(parseNumber(e));
		return expectNumber(e);
	};
	strictParseFloat = strictParseDouble;
	strictParseFloat32 = (e) => {
		if (typeof e == "string") return expectFloat32(parseNumber(e));
		return expectFloat32(e);
	};
	NUMBER_REGEX = /(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g;
	parseNumber = (e) => {
		const t = e.match(NUMBER_REGEX);
		if (t === null || t[0].length !== e.length) throw new TypeError(`Expected real number, got implicit NaN`);
		return parseFloat(e);
	};
	limitedParseDouble = (e) => {
		if (typeof e == "string") return parseFloatString(e);
		return expectNumber(e);
	};
	handleFloat = limitedParseDouble;
	limitedParseFloat = limitedParseDouble;
	limitedParseFloat32 = (e) => {
		if (typeof e == "string") return parseFloatString(e);
		return expectFloat32(e);
	};
	parseFloatString = (e) => {
		switch (e) {
			case "NaN": return NaN;
			case "Infinity": return Infinity;
			case "-Infinity": return -Infinity;
			default: throw new Error(`Unable to parse float value: ${e}`);
		}
	};
	strictParseLong = (e) => {
		if (typeof e === "string") return expectLong(parseNumber(e));
		return expectLong(e);
	};
	strictParseInt = strictParseLong;
	strictParseInt32 = (e) => {
		if (typeof e === "string") return expectInt32(parseNumber(e));
		return expectInt32(e);
	};
	strictParseShort = (e) => {
		if (typeof e === "string") return expectShort(parseNumber(e));
		return expectShort(e);
	};
	strictParseByte = (e) => {
		if (typeof e === "string") return expectByte(parseNumber(e));
		return expectByte(e);
	};
	stackTraceWarning = (e) => {
		return String(new TypeError(e).stack || e).split("\n").slice(0, 5).filter((e) => !e.includes("stackTraceWarning")).join("\n");
	};
	logger = { warn: console.warn };
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/date-utils.js
function dateToUtcString(e) {
	const t = e.getUTCFullYear();
	const n = e.getUTCMonth();
	const r = e.getUTCDay();
	const i = e.getUTCDate();
	const a = e.getUTCHours();
	const o = e.getUTCMinutes();
	const s = e.getUTCSeconds();
	const c = i < 10 ? `0${i}` : `${i}`;
	const l = a < 10 ? `0${a}` : `${a}`;
	const u = o < 10 ? `0${o}` : `${o}`;
	const d = s < 10 ? `0${s}` : `${s}`;
	return `${DAYS[r]}, ${c} ${MONTHS[n]} ${t} ${l}:${u}:${d} GMT`;
}
var DAYS, MONTHS, RFC3339, parseRfc3339DateTime, RFC3339_WITH_OFFSET$1, parseRfc3339DateTimeWithOffset, IMF_FIXDATE$1, RFC_850_DATE$1, ASC_TIME$1, parseRfc7231DateTime, parseEpochTimestamp, buildDate, parseTwoDigitYear, FIFTY_YEARS_IN_MILLIS, adjustRfc850Year, parseMonthByShortName, DAYS_IN_MONTH, validateDayOfMonth, isLeapYear, parseDateValue, parseMilliseconds, parseOffsetToMilliseconds, stripLeadingZeroes;
var init_date_utils = __esmMin((() => {
	init_parse_utils();
	DAYS = [
		"Sun",
		"Mon",
		"Tue",
		"Wed",
		"Thu",
		"Fri",
		"Sat"
	];
	MONTHS = [
		"Jan",
		"Feb",
		"Mar",
		"Apr",
		"May",
		"Jun",
		"Jul",
		"Aug",
		"Sep",
		"Oct",
		"Nov",
		"Dec"
	];
	RFC3339 = /* @__PURE__ */ new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/);
	parseRfc3339DateTime = (e) => {
		if (e === null || e === void 0) return;
		if (typeof e !== "string") throw new TypeError("RFC-3339 date-times must be expressed as strings");
		const t = RFC3339.exec(e);
		if (!t) throw new TypeError("Invalid RFC-3339 date-time value");
		const [n, r, i, a, o, s, c, l] = t;
		const u = strictParseShort(stripLeadingZeroes(r));
		const d = parseDateValue(i, "month", 1, 12);
		const f = parseDateValue(a, "day", 1, 31);
		return buildDate(u, d, f, {
			hours: o,
			minutes: s,
			seconds: c,
			fractionalMilliseconds: l
		});
	};
	RFC3339_WITH_OFFSET$1 = /* @__PURE__ */ new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}:\d{2})|[zZ])$/);
	parseRfc3339DateTimeWithOffset = (e) => {
		if (e === null || e === void 0) return;
		if (typeof e !== "string") throw new TypeError("RFC-3339 date-times must be expressed as strings");
		const t = RFC3339_WITH_OFFSET$1.exec(e);
		if (!t) throw new TypeError("Invalid RFC-3339 date-time value");
		const [n, r, i, a, o, s, c, l, u] = t;
		const d = strictParseShort(stripLeadingZeroes(r));
		const f = parseDateValue(i, "month", 1, 12);
		const p = parseDateValue(a, "day", 1, 31);
		const m = buildDate(d, f, p, {
			hours: o,
			minutes: s,
			seconds: c,
			fractionalMilliseconds: l
		});
		if (u.toUpperCase() != "Z") m.setTime(m.getTime() - parseOffsetToMilliseconds(u));
		return m;
	};
	IMF_FIXDATE$1 = /* @__PURE__ */ 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$/);
	RFC_850_DATE$1 = /* @__PURE__ */ 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$/);
	ASC_TIME$1 = /* @__PURE__ */ 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})$/);
	parseRfc7231DateTime = (e) => {
		if (e === null || e === void 0) return;
		if (typeof e !== "string") throw new TypeError("RFC-7231 date-times must be expressed as strings");
		let t = IMF_FIXDATE$1.exec(e);
		if (t) {
			const [e, n, r, i, a, o, s, c] = t;
			return buildDate(strictParseShort(stripLeadingZeroes(i)), parseMonthByShortName(r), parseDateValue(n, "day", 1, 31), {
				hours: a,
				minutes: o,
				seconds: s,
				fractionalMilliseconds: c
			});
		}
		t = RFC_850_DATE$1.exec(e);
		if (t) {
			const [e, n, r, i, a, o, s, c] = t;
			return adjustRfc850Year(buildDate(parseTwoDigitYear(i), parseMonthByShortName(r), parseDateValue(n, "day", 1, 31), {
				hours: a,
				minutes: o,
				seconds: s,
				fractionalMilliseconds: c
			}));
		}
		t = ASC_TIME$1.exec(e);
		if (t) {
			const [e, n, r, i, a, o, s, c] = t;
			return buildDate(strictParseShort(stripLeadingZeroes(c)), parseMonthByShortName(n), parseDateValue(r.trimLeft(), "day", 1, 31), {
				hours: i,
				minutes: a,
				seconds: o,
				fractionalMilliseconds: s
			});
		}
		throw new TypeError("Invalid RFC-7231 date-time value");
	};
	parseEpochTimestamp = (e) => {
		if (e === null || e === void 0) return;
		let t;
		if (typeof e === "number") t = e;
		else if (typeof e === "string") t = strictParseDouble(e);
		else if (typeof e === "object" && e.tag === 1) t = e.value;
		else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");
		if (Number.isNaN(t) || t === Infinity || t === -Infinity) throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");
		return new Date(Math.round(t * 1e3));
	};
	buildDate = (e, t, n, r) => {
		const i = t - 1;
		validateDayOfMonth(e, i, n);
		return new Date(Date.UTC(e, i, n, parseDateValue(r.hours, "hour", 0, 23), parseDateValue(r.minutes, "minute", 0, 59), parseDateValue(r.seconds, "seconds", 0, 60), parseMilliseconds(r.fractionalMilliseconds)));
	};
	parseTwoDigitYear = (e) => {
		const t = (/* @__PURE__ */ new Date()).getUTCFullYear();
		const n = Math.floor(t / 100) * 100 + strictParseShort(stripLeadingZeroes(e));
		if (n < t) return n + 100;
		return n;
	};
	FIFTY_YEARS_IN_MILLIS = 15768e8;
	adjustRfc850Year = (e) => {
		if (e.getTime() - (/* @__PURE__ */ new Date()).getTime() > FIFTY_YEARS_IN_MILLIS) return new Date(Date.UTC(e.getUTCFullYear() - 100, e.getUTCMonth(), e.getUTCDate(), e.getUTCHours(), e.getUTCMinutes(), e.getUTCSeconds(), e.getUTCMilliseconds()));
		return e;
	};
	parseMonthByShortName = (e) => {
		const t = MONTHS.indexOf(e);
		if (t < 0) throw new TypeError(`Invalid month: ${e}`);
		return t + 1;
	};
	DAYS_IN_MONTH = [
		31,
		28,
		31,
		30,
		31,
		30,
		31,
		31,
		30,
		31,
		30,
		31
	];
	validateDayOfMonth = (e, t, n) => {
		let r = DAYS_IN_MONTH[t];
		if (t === 1 && isLeapYear(e)) r = 29;
		if (n > r) throw new TypeError(`Invalid day for ${MONTHS[t]} in ${e}: ${n}`);
	};
	isLeapYear = (e) => {
		return e % 4 === 0 && (e % 100 !== 0 || e % 400 === 0);
	};
	parseDateValue = (e, t, n, r) => {
		const i = strictParseByte(stripLeadingZeroes(e));
		if (i < n || i > r) throw new TypeError(`${t} must be between ${n} and ${r}, inclusive`);
		return i;
	};
	parseMilliseconds = (e) => {
		if (e === null || e === void 0) return 0;
		return strictParseFloat32("0." + e) * 1e3;
	};
	parseOffsetToMilliseconds = (e) => {
		const t = e[0];
		let n = 1;
		if (t == "+") n = 1;
		else if (t == "-") n = -1;
		else throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);
		const r = Number(e.substring(1, 3));
		const i = Number(e.substring(4, 6));
		return n * (r * 60 + i) * 60 * 1e3;
	};
	stripLeadingZeroes = (e) => {
		let t = 0;
		while (t < e.length - 1 && e.charAt(t) === "0") t++;
		if (t === 0) return e;
		return e.slice(t);
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/lazy-json.js
var LazyJsonString;
var init_lazy_json = __esmMin((() => {
	LazyJsonString = function LazyJsonString(e) {
		return Object.assign(new String(e), {
			deserializeJSON() {
				return JSON.parse(String(e));
			},
			toString() {
				return String(e);
			},
			toJSON() {
				return String(e);
			}
		});
	};
	LazyJsonString.from = (e) => {
		if (e && typeof e === "object" && (e instanceof LazyJsonString || "deserializeJSON" in e)) return e;
		else if (typeof e === "string" || Object.getPrototypeOf(e) === String.prototype) return LazyJsonString(String(e));
		return LazyJsonString(JSON.stringify(e));
	};
	LazyJsonString.fromObject = LazyJsonString.from;
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/quote-header.js
function quoteHeader(e) {
	if (e.includes(",") || e.includes("\"")) e = `"${e.replace(/"/g, "\\\"")}"`;
	return e;
}
var init_quote_header = __esmMin((() => {}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/schema-serde-lib/schema-date-utils.js
function range(e, t, n) {
	const r = Number(e);
	if (r < t || r > n) throw new Error(`Value ${r} out of range [${t}, ${n}]`);
}
var ddd, mmm, time, date, year, RFC3339_WITH_OFFSET, IMF_FIXDATE, RFC_850_DATE, ASC_TIME, months, _parseEpochTimestamp, _parseRfc3339DateTimeWithOffset, _parseRfc7231DateTime;
var init_schema_date_utils = __esmMin((() => {
	ddd = `(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?`;
	mmm = `(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)`;
	time = `(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?`;
	date = `(\\d?\\d)`;
	year = `(\\d{4})`;
	RFC3339_WITH_OFFSET = /* @__PURE__ */ new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/);
	IMF_FIXDATE = new RegExp(`^${ddd}, ${date} ${mmm} ${year} ${time} GMT$`);
	RFC_850_DATE = new RegExp(`^${ddd}, ${date}-${mmm}-(\\d\\d) ${time} GMT$`);
	ASC_TIME = new RegExp(`^${ddd} ${mmm} ( [1-9]|\\d\\d) ${time} ${year}$`);
	months = [
		"Jan",
		"Feb",
		"Mar",
		"Apr",
		"May",
		"Jun",
		"Jul",
		"Aug",
		"Sep",
		"Oct",
		"Nov",
		"Dec"
	];
	_parseEpochTimestamp = (e) => {
		if (e == null) return;
		let t = NaN;
		if (typeof e === "number") t = e;
		else if (typeof e === "string") {
			if (!/^-?\d*\.?\d+$/.test(e)) throw new TypeError(`parseEpochTimestamp - numeric string invalid.`);
			t = Number.parseFloat(e);
		} else if (typeof e === "object" && e.tag === 1) t = e.value;
		if (isNaN(t) || Math.abs(t) === Infinity) throw new TypeError("Epoch timestamps must be valid finite numbers.");
		return new Date(Math.round(t * 1e3));
	};
	_parseRfc3339DateTimeWithOffset = (e) => {
		if (e == null) return;
		if (typeof e !== "string") throw new TypeError("RFC3339 timestamps must be strings");
		const t = RFC3339_WITH_OFFSET.exec(e);
		if (!t) throw new TypeError(`Invalid RFC3339 timestamp format ${e}`);
		const [, n, r, i, a, o, s, , c, l] = t;
		range(r, 1, 12);
		range(i, 1, 31);
		range(a, 0, 23);
		range(o, 0, 59);
		range(s, 0, 60);
		const u = new Date(Date.UTC(Number(n), Number(r) - 1, Number(i), Number(a), Number(o), Number(s), Number(c) ? Math.round(parseFloat(`0.${c}`) * 1e3) : 0));
		u.setUTCFullYear(Number(n));
		if (l.toUpperCase() != "Z") {
			const [, e, t, n] = /([+-])(\d\d):(\d\d)/.exec(l) || [
				void 0,
				"+",
				0,
				0
			];
			const r = e === "-" ? 1 : -1;
			u.setTime(u.getTime() + r * (Number(t) * 60 * 60 * 1e3 + Number(n) * 60 * 1e3));
		}
		return u;
	};
	_parseRfc7231DateTime = (e) => {
		if (e == null) return;
		if (typeof e !== "string") throw new TypeError("RFC7231 timestamps must be strings.");
		let t;
		let n;
		let r;
		let i;
		let a;
		let o;
		let s;
		let c;
		if (c = IMF_FIXDATE.exec(e)) [, t, n, r, i, a, o, s] = c;
		else if (c = RFC_850_DATE.exec(e)) {
			[, t, n, r, i, a, o, s] = c;
			r = (Number(r) + 1900).toString();
		} else if (c = ASC_TIME.exec(e)) [, n, t, i, a, o, s, r] = c;
		if (r && o) {
			const e = Date.UTC(Number(r), months.indexOf(n), Number(t), Number(i), Number(a), Number(o), s ? Math.round(parseFloat(`0.${s}`) * 1e3) : 0);
			range(t, 1, 31);
			range(i, 0, 23);
			range(a, 0, 59);
			range(o, 0, 60);
			const c = new Date(e);
			c.setUTCFullYear(Number(r));
			return c;
		}
		throw new TypeError(`Invalid RFC7231 date-time value ${e}.`);
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/split-every.js
function splitEvery(e, t, n) {
	if (n <= 0 || !Number.isInteger(n)) throw new Error("Invalid number of delimiters (" + n + ") for splitEvery.");
	const r = e.split(t);
	if (n === 1) return r;
	const i = [];
	let a = "";
	for (let e = 0; e < r.length; e++) {
		if (a === "") a = r[e];
		else a += t + r[e];
		if ((e + 1) % n === 0) {
			i.push(a);
			a = "";
		}
	}
	if (a !== "") i.push(a);
	return i;
}
var init_split_every = __esmMin((() => {}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/split-header.js
var splitHeader;
var init_split_header = __esmMin((() => {
	splitHeader = (e) => {
		const t = e.length;
		const n = [];
		let r = false;
		let i = void 0;
		let a = 0;
		for (let o = 0; o < t; ++o) {
			const t = e[o];
			switch (t) {
				case `"`:
					if (i !== "\\") r = !r;
					break;
				case ",": if (!r) {
					n.push(e.slice(a, o));
					a = o + 1;
				}
			}
			i = t;
		}
		n.push(e.slice(a));
		return n.map((e) => {
			e = e.trim();
			const t = e.length;
			if (t < 2) return e;
			if (e[0] === `"` && e[t - 1] === `"`) e = e.slice(1, t - 1);
			return e.replace(/\\"/g, "\"");
		});
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js
function nv(e) {
	return new NumericValue(String(e), "bigDecimal");
}
var format, NumericValue;
var init_NumericValue = __esmMin((() => {
	format = /^-?((0|[1-9]\d*)(\.\d+)?|\.\d+)([eE][+-]?\d+)?$/;
	NumericValue = class NumericValue {
		string;
		type;
		constructor(e, t) {
			this.string = e;
			this.type = t;
			if (!format.test(e)) throw new Error(`@smithy/core/serde - NumericValue string must conform to the Smithy bigDecimal format. Received: "${e}"`);
		}
		toString() {
			return this.string;
		}
		static [Symbol.hasInstance](e) {
			if (!e || typeof e !== "object") return false;
			const t = e;
			return NumericValue.prototype.isPrototypeOf(e) || t.type === "bigDecimal" && format.test(t.string);
		}
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/util-hex-encoding/hex-encoding.js
function fromHex(e) {
	if (e.length % 2 !== 0) throw new Error("Hex encoded strings must have an even number length");
	const t = new Uint8Array(e.length / 2);
	for (let n = 0; n < e.length; n += 2) {
		const r = e.slice(n, n + 2).toLowerCase();
		if (r in HEX_TO_SHORT) t[n / 2] = HEX_TO_SHORT[r];
		else throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`);
	}
	return t;
}
function toHex(e) {
	let t = "";
	for (let n = 0; n < e.byteLength; n++) t += SHORT_TO_HEX[e[n]];
	return t;
}
var SHORT_TO_HEX, HEX_TO_SHORT;
var init_hex_encoding = __esmMin((() => {
	SHORT_TO_HEX = {};
	HEX_TO_SHORT = {};
	for (let e = 0; e < 256; e++) {
		let t = e.toString(16).toLowerCase();
		if (t.length === 1) t = `0${t}`;
		SHORT_TO_HEX[e] = t;
		HEX_TO_SHORT[t] = e;
	}
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/util-body-length/calculateBodyLength.js
var calculateBodyLength;
var init_calculateBodyLength = __esmMin((() => {
	calculateBodyLength = (e) => {
		if (!e) return 0;
		if (typeof e === "string") return Buffer.byteLength(e);
		else if (typeof e.byteLength === "number") return e.byteLength;
		else if (typeof e.size === "number") return e.size;
		else if (typeof e.start === "number" && typeof e.end === "number") return e.end + 1 - e.start;
		else if (e instanceof ReadStream) {
			if (e.path != null) return lstatSync(e.path).size;
			else if (typeof e.fd === "number") return fstatSync(e.fd).size;
		}
		throw new Error(`Body Length computation failed for ${e}`);
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/toUint8Array.js
var toUint8Array;
var init_toUint8Array = __esmMin((() => {
	init_fromUtf8();
	toUint8Array = (e) => {
		if (e instanceof Uint8Array) return e;
		if (typeof e === "string") return fromUtf8$1(e);
		if (ArrayBuffer.isView(e)) return new Uint8Array(e.buffer, e.byteOffset, e.byteLength / Uint8Array.BYTES_PER_ELEMENT);
		return new Uint8Array(e);
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/concatBytes.js
function concatBytes(e, t) {
	if (t === void 0) {
		t = 0;
		for (const n of e) t += n.byteLength;
	}
	const n = new Uint8Array(t);
	let r = 0;
	for (const t of e) {
		n.set(t, r);
		r += t.byteLength;
	}
	return n;
}
var init_concatBytes = __esmMin((() => {}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/middleware-serde/deserializerMiddleware.js
var deserializerMiddleware, findHeader;
var init_deserializerMiddleware = __esmMin((() => {
	init_transport();
	deserializerMiddleware = (e, t) => (n, r) => async (i) => {
		const { response: a } = await n(i);
		try {
			return {
				response: a,
				output: await t(a, e)
			};
		} catch (e) {
			Object.defineProperty(e, "$response", {
				value: a,
				enumerable: false,
				writable: false,
				configurable: false
			});
			if (!("$metadata" in e)) {
				const t = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`;
				try {
					e.message += "\n  " + t;
				} catch (e) {
					if (!r.logger || r.logger?.constructor?.name === "NoOpLogger") console.warn(t);
					else r.logger?.warn?.(t);
				}
				if (typeof e.$responseBodyText !== "undefined") {
					if (e.$response) e.$response.body = e.$responseBodyText;
				}
				try {
					if (HttpResponse.isInstance(a)) {
						const { headers: t = {} } = a;
						const n = Object.entries(t);
						e.$metadata = {
							httpStatusCode: a.statusCode,
							requestId: findHeader(/^x-[\w-]+-request-?id$/, n),
							extendedRequestId: findHeader(/^x-[\w-]+-id-2$/, n),
							cfId: findHeader(/^x-[\w-]+-cf-id$/, n)
						};
					}
				} catch (e) {}
			}
			throw e;
		}
	};
	findHeader = (e, t) => {
		return (t.find(([t]) => {
			return t.match(e);
		}) || [void 0, void 0])[1];
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/property-provider/ProviderError.js
var ProviderError;
var init_ProviderError = __esmMin((() => {
	ProviderError = class ProviderError extends Error {
		name = "ProviderError";
		tryNextLink;
		constructor(e, t = true) {
			let n;
			let r = true;
			if (typeof t === "boolean") {
				n = void 0;
				r = t;
			} else if (t != null && typeof t === "object") {
				n = t.logger;
				r = t.tryNextLink ?? true;
			}
			super(e);
			this.tryNextLink = r;
			Object.setPrototypeOf(this, ProviderError.prototype);
			n?.debug?.(`@smithy/property-provider ${r ? "->" : "(!)"} ${e}`);
		}
		static from(e, t = true) {
			return Object.assign(new this(e.message, t), e);
		}
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/property-provider/CredentialsProviderError.js
var CredentialsProviderError;
var init_CredentialsProviderError = __esmMin((() => {
	init_ProviderError();
	CredentialsProviderError = class CredentialsProviderError extends ProviderError {
		name = "CredentialsProviderError";
		constructor(e, t = true) {
			super(e, t);
			Object.setPrototypeOf(this, CredentialsProviderError.prototype);
		}
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/property-provider/TokenProviderError.js
var TokenProviderError;
var init_TokenProviderError = __esmMin((() => {
	init_ProviderError();
	TokenProviderError = class TokenProviderError extends ProviderError {
		name = "TokenProviderError";
		constructor(e, t = true) {
			super(e, t);
			Object.setPrototypeOf(this, TokenProviderError.prototype);
		}
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/property-provider/chain.js
var chain;
var init_chain = __esmMin((() => {
	init_ProviderError();
	chain = (...e) => async () => {
		if (e.length === 0) throw new ProviderError("No providers in chain");
		let t;
		for (const n of e) try {
			return await n();
		} catch (e) {
			t = e;
			if (e?.tryNextLink) continue;
			throw e;
		}
		throw t;
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/property-provider/fromValue.js
var fromValue;
var init_fromValue = __esmMin((() => {
	fromValue = (e) => () => Promise.resolve(e);
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/property-provider/memoize.js
var memoize;
var init_memoize = __esmMin((() => {
	memoize = (e, t, n) => {
		let r;
		let i;
		let a;
		let o = false;
		const coalesceProvider = async () => {
			if (!i) i = e();
			try {
				r = await i;
				a = true;
				o = false;
			} finally {
				i = void 0;
			}
			return r;
		};
		if (t === void 0) return async (e) => {
			if (!a || e?.forceRefresh) r = await coalesceProvider();
			return r;
		};
		return async (e) => {
			if (!a || e?.forceRefresh) r = await coalesceProvider();
			if (o) return r;
			if (n && !n(r)) {
				o = true;
				return r;
			}
			if (t(r)) {
				await coalesceProvider();
				return r;
			}
			return r;
		};
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/booleanSelector.js
var booleanSelector;
var init_booleanSelector = __esmMin((() => {
	booleanSelector = (e, t, n) => {
		if (!(t in e)) return void 0;
		if (e[t] === "true") return true;
		if (e[t] === "false") return false;
		throw new Error(`Cannot load ${n} "${t}". Expected "true" or "false", got ${e[t]}.`);
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/numberSelector.js
var numberSelector;
var init_numberSelector = __esmMin((() => {
	numberSelector = (e, t, n) => {
		if (!(t in e)) return void 0;
		const r = parseInt(e[t], 10);
		if (Number.isNaN(r)) throw new TypeError(`Cannot load ${n} '${t}'. Expected number, got '${e[t]}'.`);
		return r;
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/types.js
var SelectorType;
var init_types$1 = __esmMin((() => {
	;
	(function(e) {
		e["ENV"] = "env";
		e["CONFIG"] = "shared config entry";
	})(SelectorType || (SelectorType = {}));
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getHomeDir.js
var homeDirCache, getHomeDirCacheKey, getHomeDir;
var init_getHomeDir = __esmMin((() => {
	homeDirCache = {};
	getHomeDirCacheKey = () => {
		if (process && process.geteuid) return `${process.geteuid()}`;
		return "DEFAULT";
	};
	getHomeDir = () => {
		const { HOME: e, USERPROFILE: t, HOMEPATH: n, HOMEDRIVE: r = `C:${sep}` } = process.env;
		if (e) return e;
		if (t) return t;
		if (n) return `${r}${n}`;
		const i = getHomeDirCacheKey();
		if (!homeDirCache[i]) homeDirCache[i] = homedir();
		return homeDirCache[i];
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getProfileName.js
var ENV_PROFILE, DEFAULT_PROFILE, getProfileName;
var init_getProfileName = __esmMin((() => {
	ENV_PROFILE = "AWS_PROFILE";
	DEFAULT_PROFILE = "default";
	getProfileName = (e) => e.profile || process.env["AWS_PROFILE"] || "default";
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getSSOTokenFilepath.js
var getSSOTokenFilepath;
var init_getSSOTokenFilepath = __esmMin((() => {
	init_getHomeDir();
	getSSOTokenFilepath = (e) => {
		const t = createHash("sha1").update(e).digest("hex");
		return join(getHomeDir(), ".aws", "sso", "cache", `${t}.json`);
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getSSOTokenFromFile.js
var tokenIntercept, getSSOTokenFromFile;
var init_getSSOTokenFromFile = __esmMin((() => {
	init_getSSOTokenFilepath();
	tokenIntercept = {};
	getSSOTokenFromFile = async (e) => {
		if (tokenIntercept[e]) return tokenIntercept[e];
		const t = getSSOTokenFilepath(e);
		const n = await readFile$1(t, "utf8");
		return JSON.parse(n);
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/constants.js
var init_constants$1 = __esmMin((() => {}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getConfigData.js
var import_dist_cjs$3, getConfigData;
var init_getConfigData = __esmMin((() => {
	import_dist_cjs$3 = require_dist_cjs();
	init_constants$1();
	getConfigData = (e) => Object.entries(e).filter(([e]) => {
		const t = e.indexOf(".");
		if (t === -1) return false;
		return Object.values(import_dist_cjs$3.IniSectionType).includes(e.substring(0, t));
	}).reduce((e, [t, n]) => {
		const r = t.indexOf(".");
		const i = t.substring(0, r) === import_dist_cjs$3.IniSectionType.PROFILE ? t.substring(r + 1) : t;
		e[i] = n;
		return e;
	}, { ...e.default && { default: e.default } });
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getConfigFilepath.js
var ENV_CONFIG_PATH, getConfigFilepath;
var init_getConfigFilepath = __esmMin((() => {
	init_getHomeDir();
	ENV_CONFIG_PATH = "AWS_CONFIG_FILE";
	getConfigFilepath = () => process.env["AWS_CONFIG_FILE"] || join(getHomeDir(), ".aws", "config");
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getCredentialsFilepath.js
var ENV_CREDENTIALS_PATH, getCredentialsFilepath;
var init_getCredentialsFilepath = __esmMin((() => {
	init_getHomeDir();
	ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE";
	getCredentialsFilepath = () => process.env["AWS_SHARED_CREDENTIALS_FILE"] || join(getHomeDir(), ".aws", "credentials");
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/parseIni.js
var import_dist_cjs$2, prefixKeyRegex, profileNameBlockList, parseIni;
var init_parseIni = __esmMin((() => {
	import_dist_cjs$2 = require_dist_cjs();
	init_constants$1();
	prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@+.%:/]+)\2$/;
	profileNameBlockList = ["__proto__", "profile __proto__"];
	parseIni = (e) => {
		const t = {};
		let n;
		let r;
		for (const i of e.split(/\r?\n/)) {
			const e = i.split(/(^|\s)[;#]/)[0].trim();
			if (e[0] === "[" && e[e.length - 1] === "]") {
				n = void 0;
				r = void 0;
				const t = e.substring(1, e.length - 1);
				const i = prefixKeyRegex.exec(t);
				if (i) {
					const [, e, , t] = i;
					if (Object.values(import_dist_cjs$2.IniSectionType).includes(e)) n = [e, t].join(".");
				} else n = t;
				if (profileNameBlockList.includes(t)) throw new Error(`Found invalid profile name "${t}"`);
			} else if (n) {
				const a = e.indexOf("=");
				if (![0, -1].includes(a)) {
					const [o, s] = [e.substring(0, a).trim(), e.substring(a + 1).trim()];
					if (s === "") r = o;
					else {
						if (r && i.trimStart() === i) r = void 0;
						t[n] = t[n] || {};
						const e = r ? [r, o].join(".") : o;
						t[n][e] = s;
					}
				}
			}
		}
		return t;
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/readFile.js
var filePromises, fileIntercept, readFile$2;
var init_readFile = __esmMin((() => {
	filePromises = {};
	fileIntercept = {};
	readFile$2 = (e, t) => {
		if (fileIntercept[e] !== void 0) return fileIntercept[e];
		if (!filePromises[e] || t?.ignoreCache) filePromises[e] = readFile$1(e, "utf8");
		return filePromises[e];
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/loadSharedConfigFiles.js
var swallowError$1, loadSharedConfigFiles;
var init_loadSharedConfigFiles = __esmMin((() => {
	init_getConfigData();
	init_getConfigFilepath();
	init_getCredentialsFilepath();
	init_getHomeDir();
	init_parseIni();
	init_readFile();
	init_constants$1();
	swallowError$1 = () => ({});
	loadSharedConfigFiles = async (e = {}) => {
		const { filepath: t = getCredentialsFilepath(), configFilepath: n = getConfigFilepath() } = e;
		const r = getHomeDir();
		const i = "~/";
		let a = t;
		if (t.startsWith(i)) a = join(r, t.slice(2));
		let o = n;
		if (n.startsWith(i)) o = join(r, n.slice(2));
		const s = await Promise.all([readFile$2(o, { ignoreCache: e.ignoreCache }).then(parseIni).then(getConfigData).catch(swallowError$1), readFile$2(a, { ignoreCache: e.ignoreCache }).then(parseIni).catch(swallowError$1)]);
		return {
			configFile: s[0],
			credentialsFile: s[1]
		};
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getSsoSessionData.js
var import_dist_cjs$1, getSsoSessionData;
var init_getSsoSessionData = __esmMin((() => {
	import_dist_cjs$1 = require_dist_cjs();
	init_loadSharedConfigFiles();
	getSsoSessionData = (e) => Object.entries(e).filter(([e]) => e.startsWith(import_dist_cjs$1.IniSectionType.SSO_SESSION + ".")).reduce((e, [t, n]) => ({
		...e,
		[t.substring(t.indexOf(".") + 1)]: n
	}), {});
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/loadSsoSessionData.js
var swallowError, loadSsoSessionData;
var init_loadSsoSessionData = __esmMin((() => {
	init_getConfigFilepath();
	init_getSsoSessionData();
	init_parseIni();
	init_readFile();
	swallowError = () => ({});
	loadSsoSessionData = async (e = {}) => readFile$2(e.configFilepath ?? getConfigFilepath()).then(parseIni).then(getSsoSessionData).catch(swallowError);
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/mergeConfigFiles.js
var mergeConfigFiles;
var init_mergeConfigFiles = __esmMin((() => {
	mergeConfigFiles = (...e) => {
		const t = {};
		for (const n of e) for (const [e, r] of Object.entries(n)) if (t[e] !== void 0) Object.assign(t[e], r);
		else t[e] = r;
		return t;
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/parseKnownFiles.js
var parseKnownFiles;
var init_parseKnownFiles = __esmMin((() => {
	init_loadSharedConfigFiles();
	init_mergeConfigFiles();
	parseKnownFiles = async (e) => {
		const t = await loadSharedConfigFiles(e);
		return mergeConfigFiles(t.configFile, t.credentialsFile);
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/externalDataInterceptor.js
var externalDataInterceptor;
var init_externalDataInterceptor = __esmMin((() => {
	init_getSSOTokenFromFile();
	init_readFile();
	externalDataInterceptor = {
		getFileRecord() {
			return fileIntercept;
		},
		interceptFile(e, t) {
			fileIntercept[e] = Promise.resolve(t);
		},
		getTokenRecord() {
			return tokenIntercept;
		},
		interceptToken(e, t) {
			tokenIntercept[e] = t;
		}
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/getSelectorName.js
function getSelectorName(e) {
	try {
		const t = new Set(Array.from(e.match(/([A-Z_]){3,}/g) ?? []));
		t.delete("CONFIG");
		t.delete("CONFIG_PREFIX_SEPARATOR");
		t.delete("ENV");
		return [...t].join(", ");
	} catch (t) {
		return e;
	}
}
var init_getSelectorName = __esmMin((() => {}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/fromEnv.js
var fromEnv;
var init_fromEnv = __esmMin((() => {
	init_CredentialsProviderError();
	init_getSelectorName();
	fromEnv = (e, t) => async () => {
		try {
			const n = e(process.env, t);
			if (n === void 0) throw new Error();
			return n;
		} catch (n) {
			throw new CredentialsProviderError(n.message || `Not found in ENV: ${getSelectorName(e.toString())}`, { logger: t?.logger });
		}
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/fromSharedConfigFiles.js
var fromSharedConfigFiles;
var init_fromSharedConfigFiles = __esmMin((() => {
	init_CredentialsProviderError();
	init_getProfileName();
	init_loadSharedConfigFiles();
	init_getSelectorName();
	fromSharedConfigFiles = (e, { preferredFile: t = "config", ...n } = {}) => async () => {
		const r = getProfileName(n);
		const { configFile: i, credentialsFile: a } = await loadSharedConfigFiles(n);
		const o = a[r] || {};
		const s = i[r] || {};
		const c = t === "config" ? {
			...o,
			...s
		} : {
			...s,
			...o
		};
		try {
			const n = e(c, t === "config" ? i : a);
			if (n === void 0) throw new Error();
			return n;
		} catch (t) {
			throw new CredentialsProviderError(t.message || `Not found in config files w/ profile [${r}]: ${getSelectorName(e.toString())}`, { logger: n.logger });
		}
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/fromStatic.js
var isFunction, fromStatic;
var init_fromStatic = __esmMin((() => {
	init_fromValue();
	isFunction = (e) => typeof e === "function";
	fromStatic = (e) => isFunction(e) ? async () => await e() : fromValue(e);
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/configLoader.js
var loadConfig;
var init_configLoader = __esmMin((() => {
	init_chain();
	init_memoize();
	init_fromEnv();
	init_fromSharedConfigFiles();
	init_fromStatic();
	loadConfig = ({ environmentVariableSelector: e, configFileSelector: t, default: n }, r = {}) => {
		const { signingName: i, logger: a } = r;
		return memoize(chain(fromEnv(e, {
			signingName: i,
			logger: a
		}), fromSharedConfigFiles(t, r), fromStatic(n)));
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/endpointsConfig/NodeUseDualstackEndpointConfigOptions.js
var ENV_USE_DUALSTACK_ENDPOINT, CONFIG_USE_DUALSTACK_ENDPOINT, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, nodeDualstackConfigSelectors;
var init_NodeUseDualstackEndpointConfigOptions = __esmMin((() => {
	init_booleanSelector();
	init_types$1();
	ENV_USE_DUALSTACK_ENDPOINT = "AWS_USE_DUALSTACK_ENDPOINT";
	CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint";
	NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = {
		environmentVariableSelector: (e) => booleanSelector(e, ENV_USE_DUALSTACK_ENDPOINT, SelectorType.ENV),
		configFileSelector: (e) => booleanSelector(e, CONFIG_USE_DUALSTACK_ENDPOINT, SelectorType.CONFIG),
		default: false
	};
	nodeDualstackConfigSelectors = {
		environmentVariableSelector: (e) => booleanSelector(e, ENV_USE_DUALSTACK_ENDPOINT, SelectorType.ENV),
		configFileSelector: (e) => booleanSelector(e, CONFIG_USE_DUALSTACK_ENDPOINT, SelectorType.CONFIG),
		default: void 0
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/endpointsConfig/NodeUseFipsEndpointConfigOptions.js
var ENV_USE_FIPS_ENDPOINT, CONFIG_USE_FIPS_ENDPOINT, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, nodeFipsConfigSelectors;
var init_NodeUseFipsEndpointConfigOptions = __esmMin((() => {
	init_booleanSelector();
	init_types$1();
	ENV_USE_FIPS_ENDPOINT = "AWS_USE_FIPS_ENDPOINT";
	CONFIG_USE_FIPS_ENDPOINT = "use_fips_endpoint";
	NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = {
		environmentVariableSelector: (e) => booleanSelector(e, ENV_USE_FIPS_ENDPOINT, SelectorType.ENV),
		configFileSelector: (e) => booleanSelector(e, CONFIG_USE_FIPS_ENDPOINT, SelectorType.CONFIG),
		default: false
	};
	nodeFipsConfigSelectors = {
		environmentVariableSelector: (e) => booleanSelector(e, ENV_USE_FIPS_ENDPOINT, SelectorType.ENV),
		configFileSelector: (e) => booleanSelector(e, CONFIG_USE_FIPS_ENDPOINT, SelectorType.CONFIG),
		default: void 0
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/endpointsConfig/resolveCustomEndpointsConfig.js
var resolveCustomEndpointsConfig;
var init_resolveCustomEndpointsConfig = __esmMin((() => {
	init_client();
	resolveCustomEndpointsConfig = (e) => {
		const { tls: t, endpoint: n, urlParser: r, useDualstackEndpoint: i } = e;
		return Object.assign(e, {
			tls: t ?? true,
			endpoint: normalizeProvider(typeof n === "string" ? r(n) : n),
			isCustomEndpoint: true,
			useDualstackEndpoint: normalizeProvider(i ?? false)
		});
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/endpointsConfig/utils/getEndpointFromRegion.js
var getEndpointFromRegion;
var init_getEndpointFromRegion = __esmMin((() => {
	getEndpointFromRegion = async (e) => {
		const { tls: t = true } = e;
		const n = await e.region();
		if (!(/* @__PURE__ */ new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/)).test(n)) throw new Error("Invalid region in client config");
		const r = await e.useDualstackEndpoint();
		const i = await e.useFipsEndpoint();
		const { hostname: a } = await e.regionInfoProvider(n, {
			useDualstackEndpoint: r,
			useFipsEndpoint: i
		}) ?? {};
		if (!a) throw new Error("Cannot resolve hostname from client config");
		return e.urlParser(`${t ? "https:" : "http:"}//${a}`);
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/endpointsConfig/resolveEndpointsConfig.js
var resolveEndpointsConfig;
var init_resolveEndpointsConfig = __esmMin((() => {
	init_client();
	init_getEndpointFromRegion();
	resolveEndpointsConfig = (e) => {
		const t = normalizeProvider(e.useDualstackEndpoint ?? false);
		const { endpoint: n, useFipsEndpoint: r, urlParser: i, tls: a } = e;
		return Object.assign(e, {
			tls: a ?? true,
			endpoint: n ? normalizeProvider(typeof n === "string" ? i(n) : n) : () => getEndpointFromRegion({
				...e,
				useDualstackEndpoint: t,
				useFipsEndpoint: r
			}),
			isCustomEndpoint: !!n,
			useDualstackEndpoint: t
		});
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/defaults-mode/constants.js
var AWS_EXECUTION_ENV, AWS_REGION_ENV, AWS_DEFAULT_REGION_ENV, ENV_IMDS_DISABLED, DEFAULTS_MODE_OPTIONS, IMDS_REGION_PATH, IMDS_TOKEN_PATH, X_AWS_EC2_METADATA_TOKEN, X_AWS_EC2_METADATA_TOKEN_TTL;
var init_constants = __esmMin((() => {
	AWS_EXECUTION_ENV = "AWS_EXECUTION_ENV";
	AWS_REGION_ENV = "AWS_REGION";
	AWS_DEFAULT_REGION_ENV = "AWS_DEFAULT_REGION";
	ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED";
	DEFAULTS_MODE_OPTIONS = [
		"in-region",
		"cross-region",
		"mobile",
		"standard",
		"legacy"
	];
	IMDS_REGION_PATH = "/latest/meta-data/placement/region";
	IMDS_TOKEN_PATH = "/latest/api/token";
	X_AWS_EC2_METADATA_TOKEN = "x-aws-ec2-metadata-token";
	X_AWS_EC2_METADATA_TOKEN_TTL = "x-aws-ec2-metadata-token-ttl-seconds";
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/getInstanceMetadataRegion.js
var TIMEOUT_MS, NEG_CACHE_TTL_MS, negativeCacheUntil, getInstanceMetadataRegion, cacheNegativeAndReturnUndefined, resolveImdsEndpoint, imdsRequest;
var init_getInstanceMetadataRegion = __esmMin((() => {
	init_constants();
	TIMEOUT_MS = 1e3;
	NEG_CACHE_TTL_MS = 6e4;
	negativeCacheUntil = 0;
	getInstanceMetadataRegion = async () => {
		if (process.env["AWS_EC2_METADATA_DISABLED"]) return;
		if (Date.now() < negativeCacheUntil) return;
		try {
			const e = resolveImdsEndpoint();
			const t = (await imdsRequest({
				...e,
				path: IMDS_TOKEN_PATH,
				method: "PUT",
				headers: { [X_AWS_EC2_METADATA_TOKEN_TTL]: "21600" }
			})).toString();
			return (await imdsRequest({
				...e,
				path: "/latest/meta-data/placement/region",
				method: "GET",
				headers: { ["x-aws-ec2-metadata-token"]: t }
			})).toString().trim() || cacheNegativeAndReturnUndefined();
		} catch {
			return cacheNegativeAndReturnUndefined();
		}
	};
	cacheNegativeAndReturnUndefined = () => {
		negativeCacheUntil = Date.now() + NEG_CACHE_TTL_MS;
	};
	resolveImdsEndpoint = () => {
		const e = process.env.AWS_EC2_METADATA_SERVICE_ENDPOINT;
		if (e) {
			const t = new URL(e);
			return {
				hostname: t.hostname.replace(/^\[(.+)]$/, "$1"),
				port: t.port ? Number(t.port) : void 0
			};
		}
		if (process.env.AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE === "IPv6") return { hostname: "fd00:ec2::254" };
		return { hostname: "169.254.169.254" };
	};
	imdsRequest = async (e) => {
		const { request: t } = await import("node:http");
		return new Promise((n, r) => {
			const i = t({
				hostname: e.hostname,
				port: e.port,
				path: e.path,
				method: e.method,
				headers: e.headers,
				timeout: TIMEOUT_MS,
				signal: AbortSignal.timeout(TIMEOUT_MS)
			});
			i.on("error", (e) => {
				r(e);
				i.destroy();
			});
			i.on("timeout", () => {
				r(/* @__PURE__ */ new Error("TimeoutError from instance metadata service"));
				i.destroy();
			});
			i.on("response", (e) => {
				const { statusCode: t = 400 } = e;
				if (t < 200 || t >= 300) {
					r(Object.assign(/* @__PURE__ */ new Error("Error response received from instance metadata service"), { statusCode: t }));
					i.destroy();
					return;
				}
				const a = [];
				e.on("data", (e) => a.push(e));
				e.on("end", () => {
					n(Buffer.concat(a));
					i.destroy();
				});
			});
			i.end();
		});
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/config.js
var REGION_ENV_NAME, REGION_INI_NAME, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS;
var init_config$1 = __esmMin((() => {
	init_getInstanceMetadataRegion();
	REGION_ENV_NAME = "AWS_REGION";
	REGION_INI_NAME = "region";
	NODE_REGION_CONFIG_OPTIONS = {
		environmentVariableSelector: (e) => e[REGION_ENV_NAME],
		configFileSelector: (e) => e[REGION_INI_NAME],
		default: async () => {
			const e = await getInstanceMetadataRegion();
			if (e) return e;
			throw new Error("Region is missing");
		}
	};
	NODE_REGION_CONFIG_FILE_OPTIONS = { preferredFile: "credentials" };
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/checkRegion.js
var validRegions, checkRegion;
var init_checkRegion = __esmMin((() => {
	init_transport();
	validRegions = /* @__PURE__ */ new Set();
	checkRegion = (e, t = isValidHostLabel) => {
		if (!validRegions.has(e) && !t(e)) {
			if (e === "*") console.warn(`@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.`);
			else throw new Error(`Region not accepted: region="${e}" is not a valid hostname component.`);
		} else validRegions.add(e);
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/isFipsRegion.js
var isFipsRegion;
var init_isFipsRegion = __esmMin((() => {
	isFipsRegion = (e) => typeof e === "string" && (e.startsWith("fips-") || e.endsWith("-fips"));
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/getRealRegion.js
var getRealRegion;
var init_getRealRegion = __esmMin((() => {
	init_isFipsRegion();
	getRealRegion = (e) => isFipsRegion(e) ? ["fips-aws-global", "aws-fips"].includes(e) ? "us-east-1" : e.replace(/fips-(dkr-|prod-)?|-fips/, "") : e;
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/resolveRegionConfig.js
var resolveRegionConfig;
var init_resolveRegionConfig = __esmMin((() => {
	init_checkRegion();
	init_getRealRegion();
	init_isFipsRegion();
	resolveRegionConfig = (e) => {
		const { region: t, useFipsEndpoint: n } = e;
		if (!t) throw new Error("Region is missing");
		return Object.assign(e, {
			region: async () => {
				const e = typeof t === "function" ? await t() : t;
				const n = getRealRegion(e);
				checkRegion(n);
				return n;
			},
			useFipsEndpoint: async () => {
				const e = typeof t === "string" ? t : await t();
				if (isFipsRegion(e)) return true;
				return typeof n !== "function" ? Promise.resolve(!!n) : n();
			}
		});
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionInfo/getHostnameFromVariants.js
var getHostnameFromVariants;
var init_getHostnameFromVariants = __esmMin((() => {
	getHostnameFromVariants = (e = [], { useFipsEndpoint: t, useDualstackEndpoint: n }) => e.find(({ tags: e }) => t === e.includes("fips") && n === e.includes("dualstack"))?.hostname;
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionInfo/getResolvedHostname.js
var getResolvedHostname;
var init_getResolvedHostname = __esmMin((() => {
	getResolvedHostname = (e, { regionHostname: t, partitionHostname: n }) => t ? t : n ? n.replace("{region}", e) : void 0;
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionInfo/getResolvedPartition.js
var getResolvedPartition;
var init_getResolvedPartition = __esmMin((() => {
	getResolvedPartition = (e, { partitionHash: t }) => Object.keys(t || {}).find((n) => t[n].regions.includes(e)) ?? "aws";
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionInfo/getResolvedSigningRegion.js
var getResolvedSigningRegion;
var init_getResolvedSigningRegion = __esmMin((() => {
	getResolvedSigningRegion = (e, { signingRegion: t, regionRegex: n, useFipsEndpoint: r }) => {
		if (t) return t;
		else if (r) {
			const t = n.replace("\\\\", "\\").replace(/^\^/g, "\\.").replace(/\$$/g, "\\.");
			const r = e.match(t);
			if (r) return r[0].slice(1, -1);
		}
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionInfo/getRegionInfo.js
var getRegionInfo;
var init_getRegionInfo = __esmMin((() => {
	init_getHostnameFromVariants();
	init_getResolvedHostname();
	init_getResolvedPartition();
	init_getResolvedSigningRegion();
	getRegionInfo = (e, { useFipsEndpoint: t = false, useDualstackEndpoint: n = false, signingService: r, regionHash: i, partitionHash: a }) => {
		const o = getResolvedPartition(e, { partitionHash: a });
		const s = e in i ? e : a[o]?.endpoint ?? e;
		const c = {
			useFipsEndpoint: t,
			useDualstackEndpoint: n
		};
		const l = getHostnameFromVariants(i[s]?.variants, c);
		const u = getHostnameFromVariants(a[o]?.variants, c);
		const d = getResolvedHostname(s, {
			regionHostname: l,
			partitionHostname: u
		});
		if (d === void 0) throw new Error(`Endpoint resolution failed for: [object Object]`);
		const f = getResolvedSigningRegion(d, {
			signingRegion: i[s]?.signingRegion,
			regionRegex: a[o].regionRegex,
			useFipsEndpoint: t
		});
		return {
			partition: o,
			signingService: r,
			hostname: d,
			...f && { signingRegion: f },
			...i[s]?.signingService && { signingService: i[s].signingService }
		};
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/defaults-mode/defaultsModeConfig.js
var AWS_DEFAULTS_MODE_ENV, AWS_DEFAULTS_MODE_CONFIG, NODE_DEFAULTS_MODE_CONFIG_OPTIONS;
var init_defaultsModeConfig = __esmMin((() => {
	AWS_DEFAULTS_MODE_ENV = "AWS_DEFAULTS_MODE";
	AWS_DEFAULTS_MODE_CONFIG = "defaults_mode";
	NODE_DEFAULTS_MODE_CONFIG_OPTIONS = {
		environmentVariableSelector: (e) => {
			return e[AWS_DEFAULTS_MODE_ENV];
		},
		configFileSelector: (e) => {
			return e[AWS_DEFAULTS_MODE_CONFIG];
		},
		default: "legacy"
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/defaults-mode/resolveDefaultsModeConfig.js
var resolveDefaultsModeConfig, resolveNodeDefaultsModeAuto, inferPhysicalRegion;
var init_resolveDefaultsModeConfig = __esmMin((() => {
	init_config$1();
	init_getInstanceMetadataRegion();
	init_configLoader();
	init_memoize();
	init_constants();
	init_defaultsModeConfig();
	resolveDefaultsModeConfig = ({ region: e = loadConfig(NODE_REGION_CONFIG_OPTIONS), defaultsMode: t = loadConfig(NODE_DEFAULTS_MODE_CONFIG_OPTIONS) } = {}) => memoize(async () => {
		const n = typeof t === "function" ? await t() : t;
		switch (n?.toLowerCase()) {
			case "auto": return resolveNodeDefaultsModeAuto(e);
			case "in-region":
			case "cross-region":
			case "mobile":
			case "standard":
			case "legacy": return Promise.resolve(n?.toLocaleLowerCase());
			case void 0: return Promise.resolve("legacy");
			default: throw new Error(`Invalid parameter for "defaultsMode", expect ${DEFAULTS_MODE_OPTIONS.join(", ")}, got ${n}`);
		}
	});
	resolveNodeDefaultsModeAuto = async (e) => {
		if (e) {
			const t = typeof e === "function" ? await e() : e;
			const n = await inferPhysicalRegion();
			if (!n) return "standard";
			if (t === n) return "in-region";
			else return "cross-region";
		}
		return "standard";
	};
	inferPhysicalRegion = async () => {
		if (process.env["AWS_EXECUTION_ENV"] && (process.env["AWS_REGION"] || process.env["AWS_DEFAULT_REGION"])) return process.env["AWS_REGION"] ?? process.env["AWS_DEFAULT_REGION"];
		return getInstanceMetadataRegion();
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/config/index.js
var config_exports = /* @__PURE__ */ __exportAll({
	CONFIG_PREFIX_SEPARATOR: () => ".",
	CONFIG_USE_DUALSTACK_ENDPOINT: () => CONFIG_USE_DUALSTACK_ENDPOINT,
	CONFIG_USE_FIPS_ENDPOINT: () => CONFIG_USE_FIPS_ENDPOINT,
	CredentialsProviderError: () => CredentialsProviderError,
	DEFAULT_PROFILE: () => DEFAULT_PROFILE,
	DEFAULT_USE_DUALSTACK_ENDPOINT: () => false,
	DEFAULT_USE_FIPS_ENDPOINT: () => false,
	ENV_PROFILE: () => ENV_PROFILE,
	ENV_USE_DUALSTACK_ENDPOINT: () => ENV_USE_DUALSTACK_ENDPOINT,
	ENV_USE_FIPS_ENDPOINT: () => ENV_USE_FIPS_ENDPOINT,
	NODE_REGION_CONFIG_FILE_OPTIONS: () => NODE_REGION_CONFIG_FILE_OPTIONS,
	NODE_REGION_CONFIG_OPTIONS: () => NODE_REGION_CONFIG_OPTIONS,
	NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS: () => NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,
	NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS: () => NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,
	ProviderError: () => ProviderError,
	REGION_ENV_NAME: () => REGION_ENV_NAME,
	REGION_INI_NAME: () => REGION_INI_NAME,
	SelectorType: () => SelectorType,
	TokenProviderError: () => TokenProviderError,
	booleanSelector: () => booleanSelector,
	chain: () => chain,
	externalDataInterceptor: () => externalDataInterceptor,
	fromStatic: () => fromStatic,
	fromValue: () => fromValue,
	getHomeDir: () => getHomeDir,
	getProfileName: () => getProfileName,
	getRegionInfo: () => getRegionInfo,
	getSSOTokenFilepath: () => getSSOTokenFilepath,
	getSSOTokenFromFile: () => getSSOTokenFromFile,
	loadConfig: () => loadConfig,
	loadSharedConfigFiles: () => loadSharedConfigFiles,
	loadSsoSessionData: () => loadSsoSessionData,
	memoize: () => memoize,
	nodeDualstackConfigSelectors: () => nodeDualstackConfigSelectors,
	nodeFipsConfigSelectors: () => nodeFipsConfigSelectors,
	numberSelector: () => numberSelector,
	parseKnownFiles: () => parseKnownFiles,
	readFile: () => readFile$2,
	resolveCustomEndpointsConfig: () => resolveCustomEndpointsConfig,
	resolveDefaultsModeConfig: () => resolveDefaultsModeConfig,
	resolveEndpointsConfig: () => resolveEndpointsConfig,
	resolveRegionConfig: () => resolveRegionConfig
});
var init_config = __esmMin((() => {
	init_ProviderError();
	init_CredentialsProviderError();
	init_TokenProviderError();
	init_chain();
	init_fromValue();
	init_memoize();
	init_booleanSelector();
	init_numberSelector();
	init_types$1();
	init_getHomeDir();
	init_getProfileName();
	init_getSSOTokenFilepath();
	init_getSSOTokenFromFile();
	init_constants$1();
	init_loadSharedConfigFiles();
	init_loadSsoSessionData();
	init_parseKnownFiles();
	init_externalDataInterceptor();
	init_readFile();
	init_configLoader();
	init_fromStatic();
	init_NodeUseDualstackEndpointConfigOptions();
	init_NodeUseFipsEndpointConfigOptions();
	init_resolveCustomEndpointsConfig();
	init_resolveEndpointsConfig();
	init_config$1();
	init_resolveRegionConfig();
	init_getRegionInfo();
	init_resolveDefaultsModeConfig();
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getEndpointUrlConfig.js
var ENV_ENDPOINT_URL, CONFIG_ENDPOINT_URL, getEndpointUrlConfig;
var init_getEndpointUrlConfig = __esmMin((() => {
	init_config();
	ENV_ENDPOINT_URL = "AWS_ENDPOINT_URL";
	CONFIG_ENDPOINT_URL = "endpoint_url";
	getEndpointUrlConfig = (e) => ({
		environmentVariableSelector: (t) => {
			const n = e.split(" ").map((e) => e.toUpperCase());
			const r = t[[ENV_ENDPOINT_URL, ...n].join("_")];
			if (r) return r;
			const i = t[ENV_ENDPOINT_URL];
			if (i) return i;
		},
		configFileSelector: (t, n) => {
			if (t.services) {
				const r = ["services", t.services].join(".");
				if (!n || !n[r]) throw new Error(`The services section "${t.services}" specified in the profile is not present in the shared configuration file.`);
				const i = n[r][[e.split(" ").map((e) => e.toLowerCase()).join("_"), CONFIG_ENDPOINT_URL].join(".")];
				if (i) return i;
			}
			const r = t[CONFIG_ENDPOINT_URL];
			if (r) return r;
		},
		default: void 0
	});
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getIgnoreConfiguredEndpointUrls.js
var ENV_IGNORE_CONFIGURED_ENDPOINT_URLS, CONFIG_IGNORE_CONFIGURED_ENDPOINT_URLS, ignoreConfiguredEndpointUrlsConfigSelectors;
var init_getIgnoreConfiguredEndpointUrls = __esmMin((() => {
	init_config();
	ENV_IGNORE_CONFIGURED_ENDPOINT_URLS = "AWS_IGNORE_CONFIGURED_ENDPOINT_URLS";
	CONFIG_IGNORE_CONFIGURED_ENDPOINT_URLS = "ignore_configured_endpoint_urls";
	ignoreConfiguredEndpointUrlsConfigSelectors = {
		environmentVariableSelector: (e) => booleanSelector(e, ENV_IGNORE_CONFIGURED_ENDPOINT_URLS, SelectorType.ENV),
		configFileSelector: (e) => booleanSelector(e, CONFIG_IGNORE_CONFIGURED_ENDPOINT_URLS, SelectorType.CONFIG),
		default: false
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getEndpointFromConfig.js
var getEndpointFromConfig;
var init_getEndpointFromConfig = __esmMin((() => {
	init_config();
	init_getEndpointUrlConfig();
	init_getIgnoreConfiguredEndpointUrls();
	getEndpointFromConfig = async (e) => {
		if (await loadConfig(ignoreConfiguredEndpointUrlsConfigSelectors)()) return;
		return loadConfig(getEndpointUrlConfig(e ?? ""))();
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/service-customizations/s3.js
var resolveParamsForS3, DOMAIN_PATTERN, IP_ADDRESS_PATTERN, DOTS_PATTERN, isDnsCompatibleBucketName, isArnBucketName;
var init_s3 = __esmMin((() => {
	resolveParamsForS3 = async (e) => {
		const t = e?.Bucket || "";
		if (typeof e.Bucket === "string") e.Bucket = t.replace(/#/g, encodeURIComponent("#")).replace(/\?/g, encodeURIComponent("?"));
		if (isArnBucketName(t)) {
			if (e.ForcePathStyle === true) throw new Error("Path-style addressing cannot be used with ARN buckets");
		} else if (!isDnsCompatibleBucketName(t) || t.indexOf(".") !== -1 && !String(e.Endpoint).startsWith("http:") || t.toLowerCase() !== t || t.length < 3) e.ForcePathStyle = true;
		if (e.DisableMultiRegionAccessPoints) {
			e.disableMultiRegionAccessPoints = true;
			e.DisableMRAP = true;
		}
		return e;
	};
	DOMAIN_PATTERN = /^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$/;
	IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/;
	DOTS_PATTERN = /\.\./;
	isDnsCompatibleBucketName = (e) => DOMAIN_PATTERN.test(e) && !IP_ADDRESS_PATTERN.test(e) && !DOTS_PATTERN.test(e);
	isArnBucketName = (e) => {
		const [t, n, r, , , i] = e.split(":");
		const a = t === "arn" && e.split(":").length >= 6;
		const o = Boolean(a && n && r && i);
		if (a && !o) throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);
		return o;
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/service-customizations/index.js
var init_service_customizations = __esmMin((() => {
	init_s3();
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/createConfigValueProvider.js
var createConfigValueProvider;
var init_createConfigValueProvider = __esmMin((() => {
	createConfigValueProvider = (e, t, n, r = false) => {
		const configProvider = async () => {
			let i;
			if (r) i = n.clientContextParams?.[e] ?? n[e] ?? n[t];
			else i = n[e] ?? n[t];
			if (typeof i === "function") return i();
			return i;
		};
		if (e === "credentialScope" || t === "CredentialScope") return async () => {
			const e = typeof n.credentials === "function" ? await n.credentials() : n.credentials;
			return e?.credentialScope ?? e?.CredentialScope;
		};
		if (e === "accountId" || t === "AccountId") return async () => {
			const e = typeof n.credentials === "function" ? await n.credentials() : n.credentials;
			return e?.accountId ?? e?.AccountId;
		};
		if (e === "endpoint" || t === "endpoint") return async () => {
			if (n.isCustomEndpoint === false) return;
			const e = await configProvider();
			if (e && typeof e === "object") {
				if ("url" in e) return e.url.href;
				if ("hostname" in e) {
					const { protocol: t, hostname: n, port: r, path: i } = e;
					return `${t}//${n}${r ? ":" + r : ""}${i}`;
				}
			}
			return e;
		};
		return configProvider;
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/toEndpointV1.js
var init_toEndpointV1 = __esmMin((() => {
	init_transport();
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getEndpointFromInstructions.js
function bindGetEndpointFromInstructions(e) {
	return async (t, n, r, i) => {
		if (!r.isCustomEndpoint && !r.ignoreConfiguredEndpointUrls) {
			let t;
			if (r.serviceConfiguredEndpoint) t = await r.serviceConfiguredEndpoint();
			else t = await e(r.serviceId);
			if (t) {
				r.endpoint = () => Promise.resolve(toEndpointV1(t));
				r.isCustomEndpoint = true;
				i?.logger?.debug?.(`@smithy/core/endpoints - resolved endpoint from config: ${t}`);
			}
		}
		const a = await resolveParams(t, n, r);
		if (typeof r.endpointProvider !== "function") throw new Error("config.endpointProvider is not set.");
		const o = r.endpointProvider(a, i);
		if (r.isCustomEndpoint && r.endpoint) {
			const e = await r.endpoint();
			if (e?.headers) {
				o.headers ??= {};
				for (const [t, n] of Object.entries(e.headers)) o.headers[t] = Array.isArray(n) ? n : [n];
			}
		}
		return o;
	};
}
var resolveParams;
var init_getEndpointFromInstructions = __esmMin((() => {
	init_service_customizations();
	init_createConfigValueProvider();
	init_toEndpointV1();
	resolveParams = async (e, t, n) => {
		const r = {};
		const i = t?.getEndpointParameterInstructions?.() || {};
		for (const [t, a] of Object.entries(i)) switch (a.type) {
			case "staticContextParams":
				r[t] = a.value;
				break;
			case "contextParams":
				r[t] = e[a.name];
				break;
			case "clientContextParams":
			case "builtInParams":
				r[t] = await createConfigValueProvider(a.name, t, n, a.type !== "builtInParams")();
				break;
			case "operationContextParams":
				r[t] = a.get(e);
				break;
			default: throw new Error("Unrecognized endpoint parameter instruction: " + JSON.stringify(a));
		}
		if (Object.keys(i).length === 0) Object.assign(r, n);
		if (String(n.serviceId).toLowerCase() === "s3") await resolveParamsForS3(r);
		return r;
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/endpointMiddleware.js
function setFeature(e, t, n) {
	if (!e.__smithy_context) e.__smithy_context = { features: {} };
	else if (!e.__smithy_context.features) e.__smithy_context.features = {};
	e.__smithy_context.features[t] = n;
}
function bindEndpointMiddleware(e) {
	const t = bindGetEndpointFromInstructions(e);
	return ({ config: e, instructions: n }) => {
		return (r, i) => async (a) => {
			if (e.isCustomEndpoint) setFeature(i, "ENDPOINT_OVERRIDE", "N");
			const o = await t(a.input, { getEndpointParameterInstructions() {
				return n;
			} }, { ...e }, i);
			i.endpointV2 = o;
			i.authSchemes = o.properties?.authSchemes;
			const s = i.authSchemes?.[0];
			if (s) {
				i["signing_region"] = s.signingRegion;
				i["signing_service"] = s.signingName;
				const e = getSmithyContext(i)?.selectedHttpAuthScheme?.httpAuthOption;
				if (e) e.signingProperties = Object.assign(e.signingProperties || {}, {
					signing_region: s.signingRegion,
					signingRegion: s.signingRegion,
					signing_service: s.signingName,
					signingName: s.signingName,
					signingRegionSet: s.signingRegionSet
				}, s.properties);
			}
			return r({ ...a });
		};
	};
}
var init_endpointMiddleware = __esmMin((() => {
	init_transport();
	init_getEndpointFromInstructions();
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/getEndpointPlugin.js
function bindGetEndpointPlugin(e) {
	const t = bindEndpointMiddleware(e);
	return (e, n) => ({ applyToStack: (r) => {
		r.addRelativeTo(t({
			config: e,
			instructions: n
		}), endpointMiddlewareOptions);
	} });
}
var serializerMiddlewareOption$1, endpointMiddlewareOptions;
var init_getEndpointPlugin = __esmMin((() => {
	init_endpointMiddleware();
	serializerMiddlewareOption$1 = {
		name: "serializerMiddleware",
		step: "serialize",
		tags: ["SERIALIZER"],
		override: true
	};
	endpointMiddlewareOptions = {
		step: "serialize",
		tags: [
			"ENDPOINT_PARAMETERS",
			"ENDPOINT_V2",
			"ENDPOINT"
		],
		name: "endpointV2Middleware",
		override: true,
		relation: "before",
		toMiddleware: serializerMiddlewareOption$1.name
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/resolveEndpointConfig.js
function bindResolveEndpointConfig(e) {
	return (t) => {
		const n = t.tls ?? true;
		const { endpoint: r, useDualstackEndpoint: i, useFipsEndpoint: a } = t;
		const o = Object.assign(t, {
			endpoint: r != null ? async () => toEndpointV1(await normalizeProvider(r)()) : void 0,
			tls: n,
			isCustomEndpoint: !!r,
			useDualstackEndpoint: normalizeProvider(i ?? false),
			useFipsEndpoint: normalizeProvider(a ?? false),
			ignoreConfiguredEndpointUrls: !!t.ignoreConfiguredEndpointUrls
		});
		let s = void 0;
		o.serviceConfiguredEndpoint = async () => {
			if (t.serviceId && !s) s = e(t.serviceId);
			return s;
		};
		return o;
	};
}
var init_resolveEndpointConfig = __esmMin((() => {
	init_transport();
	init_toEndpointV1();
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/bdd/BinaryDecisionDiagram.js
var BinaryDecisionDiagram;
var init_BinaryDecisionDiagram = __esmMin((() => {
	BinaryDecisionDiagram = class BinaryDecisionDiagram {
		nodes;
		root;
		conditions;
		results;
		constructor(e, t, n, r) {
			this.nodes = e;
			this.root = t;
			this.conditions = n;
			this.results = r;
		}
		static from(e, t, n, r) {
			return new BinaryDecisionDiagram(e, t, n, r);
		}
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/cache/EndpointCache.js
var EndpointCache;
var init_EndpointCache = __esmMin((() => {
	EndpointCache = class {
		capacity;
		data = /* @__PURE__ */ new Map();
		parameters = [];
		constructor({ size: e, params: t }) {
			this.capacity = e ?? 50;
			if (t) this.parameters = t;
		}
		get(e, t) {
			const n = this.hash(e);
			if (n === false) return t();
			if (!this.data.has(n)) {
				if (this.data.size > this.capacity + 10) {
					const e = this.data.keys();
					let t = 0;
					while (true) {
						const { value: n, done: r } = e.next();
						this.data.delete(n);
						if (r || ++t > 10) break;
					}
				}
				this.data.set(n, t());
			}
			return this.data.get(n);
		}
		size() {
			return this.data.size;
		}
		hash(e) {
			let t = "";
			const { parameters: n } = this;
			if (n.length === 0) return false;
			for (const r of n) {
				const n = e[r];
				const i = n == null ? "\0" : String(n);
				if (i.includes("|;")) return false;
				t += i + "|;";
			}
			return t;
		}
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/EndpointError.js
var EndpointError;
var init_EndpointError = __esmMin((() => {
	EndpointError = class extends Error {
		constructor(e) {
			super(e);
			this.name = "EndpointError";
		}
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/index.js
var init_types = __esmMin((() => {
	init_EndpointError();
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/debug/debugId.js
var debugId;
var init_debugId = __esmMin((() => {
	debugId = "endpoints";
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/debug/toDebugString.js
function toDebugString(e) {
	if (typeof e !== "object" || e == null) return e;
	if ("ref" in e) return `$${toDebugString(e.ref)}`;
	if ("fn" in e) return `${e.fn}(${(e.argv || []).map(toDebugString).join(", ")})`;
	return JSON.stringify(e, null, 2);
}
var init_toDebugString = __esmMin((() => {}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/debug/index.js
var init_debug = __esmMin((() => {
	init_debugId();
	init_toDebugString();
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/customEndpointFunctions.js
var customEndpointFunctions;
var init_customEndpointFunctions = __esmMin((() => {
	customEndpointFunctions = {};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/booleanEquals.js
var booleanEquals;
var init_booleanEquals = __esmMin((() => {
	booleanEquals = (e, t) => e === t;
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/coalesce.js
function coalesce(...e) {
	for (const t of e) if (t != null) return t;
}
var init_coalesce = __esmMin((() => {}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/getAttrPathList.js
var getAttrPathList;
var init_getAttrPathList = __esmMin((() => {
	init_types();
	getAttrPathList = (e) => {
		const t = e.split(".");
		const n = [];
		for (const r of t) {
			const t = r.indexOf("[");
			if (t !== -1) {
				if (r.indexOf("]") !== r.length - 1) throw new EndpointError(`Path: '${e}' does not end with ']'`);
				const i = r.slice(t + 1, -1);
				if (Number.isNaN(parseInt(i))) throw new EndpointError(`Invalid array index: '${i}' in path: '${e}'`);
				if (t !== 0) n.push(r.slice(0, t));
				n.push(i);
			} else n.push(r);
		}
		return n;
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/getAttr.js
var getAttr;
var init_getAttr = __esmMin((() => {
	init_types();
	init_getAttrPathList();
	getAttr = (e, t) => getAttrPathList(t).reduce((n, r) => {
		if (typeof n !== "object") throw new EndpointError(`Index '${r}' in '${t}' not found in '${JSON.stringify(e)}'`);
		else if (Array.isArray(n)) {
			const e = parseInt(r);
			return n[e < 0 ? n.length + e : e];
		}
		return n[r];
	}, e);
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/isSet.js
var isSet;
var init_isSet = __esmMin((() => {
	isSet = (e) => e != null;
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/ite.js
function ite(e, t, n) {
	return e ? t : n;
}
var init_ite = __esmMin((() => {}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/not.js
var not;
var init_not = __esmMin((() => {
	not = (e) => !e;
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/isIpAddress.js
var IP_V4_REGEX, isIpAddress;
var init_isIpAddress = __esmMin((() => {
	IP_V4_REGEX = new RegExp(`^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$`);
	isIpAddress = (e) => IP_V4_REGEX.test(e) || e.startsWith("[") && e.endsWith("]");
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/parseURL.js
var import_dist_cjs, DEFAULT_PORTS, parseURL;
var init_parseURL = __esmMin((() => {
	import_dist_cjs = require_dist_cjs();
	init_isIpAddress();
	DEFAULT_PORTS = {
		[import_dist_cjs.EndpointURLScheme.HTTP]: 80,
		[import_dist_cjs.EndpointURLScheme.HTTPS]: 443
	};
	parseURL = (e) => {
		const t = (() => {
			try {
				if (e instanceof URL) return e;
				if (typeof e === "object" && "hostname" in e) {
					const { hostname: t, port: n, protocol: r = "", path: i = "", query: a = {} } = e;
					const o = new URL(`${r}//${t}${n ? `:${n}` : ""}${i}`);
					o.search = Object.entries(a).map(([e, t]) => `${e}=${t}`).join("&");
					return o;
				}
				return new URL(e);
			} catch (e) {
				return null;
			}
		})();
		if (!t) {
			console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`);
			return null;
		}
		const n = t.href;
		const { host: r, hostname: i, pathname: a, protocol: o, search: s } = t;
		if (s) return null;
		const c = o.slice(0, -1);
		if (!Object.values(import_dist_cjs.EndpointURLScheme).includes(c)) return null;
		const l = isIpAddress(i);
		return {
			scheme: c,
			authority: `${r}${n.includes(`${r}:${DEFAULT_PORTS[c]}`) || typeof e === "string" && e.includes(`${r}:${DEFAULT_PORTS[c]}`) ? `:${DEFAULT_PORTS[c]}` : ``}`,
			path: a,
			normalizedPath: a.endsWith("/") ? a : `${a}/`,
			isIp: l
		};
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/split.js
function split(e, t, n) {
	if (n === 1) return [e];
	if (e === "") return [""];
	const r = e.split(t);
	if (n === 0) return r;
	return r.slice(0, n - 1).concat(r.slice(1).join(t));
}
var init_split = __esmMin((() => {}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/stringEquals.js
var stringEquals;
var init_stringEquals = __esmMin((() => {
	stringEquals = (e, t) => e === t;
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/substring.js
var substring;
var init_substring = __esmMin((() => {
	substring = (e, t, n, r) => {
		if (e == null || t >= n || e.length < n || /[^\u0000-\u007f]/.test(e)) return null;
		if (!r) return e.substring(t, n);
		return e.substring(e.length - n, e.length - t);
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/uriEncode.js
var uriEncode;
var init_uriEncode = __esmMin((() => {
	uriEncode = (e) => encodeURIComponent(e).replace(/[!*'()]/g, (e) => `%${e.charCodeAt(0).toString(16).toUpperCase()}`);
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/index.js
var init_lib = __esmMin((() => {
	init_booleanEquals();
	init_coalesce();
	init_getAttr();
	init_isSet();
	init_transport();
	init_ite();
	init_not();
	init_parseURL();
	init_split();
	init_stringEquals();
	init_substring();
	init_uriEncode();
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/endpointFunctions.js
var endpointFunctions;
var init_endpointFunctions = __esmMin((() => {
	init_lib();
	endpointFunctions = {
		booleanEquals,
		coalesce,
		getAttr,
		isSet,
		isValidHostLabel,
		ite,
		not,
		parseURL,
		split,
		stringEquals,
		substring,
		uriEncode
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateTemplate.js
var evaluateTemplate;
var init_evaluateTemplate = __esmMin((() => {
	init_lib();
	evaluateTemplate = (e, t) => {
		const n = [];
		const { referenceRecord: r, endpointParams: i } = t;
		let a = 0;
		while (a < e.length) {
			const t = e.indexOf("{", a);
			if (t === -1) {
				n.push(e.slice(a));
				break;
			}
			n.push(e.slice(a, t));
			const o = e.indexOf("}", t);
			if (o === -1) {
				n.push(e.slice(t));
				break;
			}
			if (e[t + 1] === "{" && e[o + 1] === "}") {
				n.push(e.slice(t + 1, o));
				a = o + 2;
			}
			const s = e.substring(t + 1, o);
			if (s.includes("#")) {
				const [e, t] = s.split("#");
				n.push(getAttr(r[e] ?? i[e], t));
			} else n.push(r[s] ?? i[s]);
			a = o + 1;
		}
		return n.join("");
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/getReferenceValue.js
var getReferenceValue;
var init_getReferenceValue = __esmMin((() => {
	getReferenceValue = ({ ref: e }, t) => {
		return t.referenceRecord[e] ?? t.endpointParams[e];
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateExpression.js
var evaluateExpression, callFunction, group$2;
var init_evaluateExpression = __esmMin((() => {
	init_types();
	init_customEndpointFunctions();
	init_endpointFunctions();
	init_evaluateTemplate();
	init_getReferenceValue();
	evaluateExpression = (e, t, n) => {
		if (typeof e === "string") return evaluateTemplate(e, n);
		else if (e["fn"]) return group$2.callFunction(e, n);
		else if (e["ref"]) return getReferenceValue(e, n);
		throw new EndpointError(`'${t}': ${String(e)} is not a string, function or reference.`);
	};
	callFunction = ({ fn: e, argv: t }, n) => {
		const r = Array(t.length);
		for (let e = 0; e < r.length; ++e) {
			const i = t[e];
			if (typeof i === "boolean" || typeof i === "number") r[e] = i;
			else r[e] = group$2.evaluateExpression(i, "arg", n);
		}
		const i = e.indexOf(".");
		if (i !== -1) {
			const t = customEndpointFunctions[e.slice(0, i)]?.[e.slice(i + 1)];
			if (typeof t === "function") return t(...r);
		}
		const a = endpointFunctions[e];
		if (typeof a === "function") return a(...r);
		throw new Error(`function ${e} not loaded in endpointFunctions.`);
	};
	group$2 = {
		evaluateExpression,
		callFunction
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/callFunction.js
var init_callFunction = __esmMin((() => {
	init_evaluateExpression();
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateCondition.js
var evaluateCondition;
var init_evaluateCondition = __esmMin((() => {
	init_debug();
	init_types();
	init_callFunction();
	evaluateCondition = (e, t) => {
		const { assign: n } = e;
		if (n && n in t.referenceRecord) throw new EndpointError(`'${n}' is already defined in Reference Record.`);
		const r = callFunction(e, t);
		t.logger?.debug?.(`${debugId} evaluateCondition: ${toDebugString(e)} = ${toDebugString(r)}`);
		const i = r === "" ? true : !!r;
		if (n != null) return {
			result: i,
			toAssign: {
				name: n,
				value: r
			}
		};
		return { result: i };
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/getEndpointHeaders.js
var getEndpointHeaders;
var init_getEndpointHeaders = __esmMin((() => {
	init_types();
	init_evaluateExpression();
	getEndpointHeaders = (e, t) => Object.entries(e ?? {}).reduce((e, [n, r]) => {
		e[n] = r.map((e) => {
			const r = evaluateExpression(e, "Header value entry", t);
			if (typeof r !== "string") throw new EndpointError(`Header '${n}' value '${r}' is not a string`);
			return r;
		});
		return e;
	}, {});
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/getEndpointProperties.js
var getEndpointProperties, getEndpointProperty, group$1;
var init_getEndpointProperties = __esmMin((() => {
	init_types();
	init_evaluateTemplate();
	getEndpointProperties = (e, t) => Object.entries(e).reduce((e, [n, r]) => {
		e[n] = group$1.getEndpointProperty(r, t);
		return e;
	}, {});
	getEndpointProperty = (e, t) => {
		if (Array.isArray(e)) return e.map((e) => getEndpointProperty(e, t));
		switch (typeof e) {
			case "string": return evaluateTemplate(e, t);
			case "object":
				if (e === null) throw new EndpointError(`Unexpected endpoint property: ${e}`);
				return group$1.getEndpointProperties(e, t);
			case "boolean": return e;
			default: throw new EndpointError(`Unexpected endpoint property type: ${typeof e}`);
		}
	};
	group$1 = {
		getEndpointProperty,
		getEndpointProperties
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/getEndpointUrl.js
var getEndpointUrl;
var init_getEndpointUrl = __esmMin((() => {
	init_types();
	init_evaluateExpression();
	getEndpointUrl = (e, t) => {
		const n = evaluateExpression(e, "Endpoint URL", t);
		if (typeof n === "string") try {
			return new URL(n);
		} catch (e) {
			console.error(`Failed to construct URL with ${n}`, e);
			throw e;
		}
		throw new EndpointError(`Endpoint URL must be a string, got ${typeof n}`);
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/decideEndpoint.js
var RESULT, decideEndpoint;
var init_decideEndpoint = __esmMin((() => {
	init_types();
	init_evaluateCondition();
	init_evaluateExpression();
	init_getEndpointHeaders();
	init_getEndpointProperties();
	init_getEndpointUrl();
	RESULT = 1e8;
	decideEndpoint = (e, t) => {
		const { nodes: n, root: r, results: i, conditions: a } = e;
		let o = r;
		const s = {};
		const c = {
			referenceRecord: s,
			endpointParams: t.endpointParams,
			logger: t.logger
		};
		while (o !== 1 && o !== -1 && o < RESULT) {
			const e = 3 * (Math.abs(o) - 1);
			const [t, r, i] = [
				n[e],
				n[e + 1],
				n[e + 2]
			];
			const [l, u, d] = a[t];
			const f = evaluateCondition({
				fn: l,
				assign: d,
				argv: u
			}, c);
			if (f.toAssign) {
				const { name: e, value: t } = f.toAssign;
				s[e] = t;
			}
			o = o >= 0 === f.result ? r : i;
		}
		if (o >= RESULT) {
			const e = i[o - RESULT];
			if (e[0] === -1) {
				const [, t] = e;
				throw new EndpointError(evaluateExpression(t, "Error", c));
			}
			const [t, n, r] = e;
			return {
				url: getEndpointUrl(t, c),
				properties: getEndpointProperties(n, c),
				headers: getEndpointHeaders(r ?? {}, c)
			};
		}
		throw new EndpointError(`No matching endpoint.`);
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateConditions.js
var evaluateConditions;
var init_evaluateConditions = __esmMin((() => {
	init_debug();
	init_evaluateCondition();
	evaluateConditions = (e = [], t) => {
		const n = {};
		const r = {
			...t,
			referenceRecord: { ...t.referenceRecord }
		};
		let i = false;
		for (const a of e) {
			const { result: e, toAssign: o } = evaluateCondition(a, r);
			if (!e) return { result: e };
			if (o) {
				i = true;
				n[o.name] = o.value;
				r.referenceRecord[o.name] = o.value;
				t.logger?.debug?.(`${debugId} assign: ${o.name} := ${toDebugString(o.value)}`);
			}
		}
		if (i) return {
			result: true,
			referenceRecord: n
		};
		return { result: true };
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateEndpointRule.js
var evaluateEndpointRule;
var init_evaluateEndpointRule = __esmMin((() => {
	init_debug();
	init_evaluateConditions();
	init_getEndpointHeaders();
	init_getEndpointProperties();
	init_getEndpointUrl();
	evaluateEndpointRule = (e, t) => {
		const { conditions: n, endpoint: r } = e;
		const { result: i, referenceRecord: a } = evaluateConditions(n, t);
		if (!i) return;
		const o = a ? {
			...t,
			referenceRecord: {
				...t.referenceRecord,
				...a
			}
		} : t;
		const { url: s, properties: c, headers: l } = r;
		t.logger?.debug?.(`${debugId} Resolving endpoint from template: ${toDebugString(r)}`);
		const u = { url: getEndpointUrl(s, o) };
		if (l != null) u.headers = getEndpointHeaders(l, o);
		if (c != null) u.properties = getEndpointProperties(c, o);
		return u;
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateErrorRule.js
var evaluateErrorRule;
var init_evaluateErrorRule = __esmMin((() => {
	init_types();
	init_evaluateConditions();
	init_evaluateExpression();
	evaluateErrorRule = (e, t) => {
		const { conditions: n, error: r } = e;
		const { result: i, referenceRecord: a } = evaluateConditions(n, t);
		if (!i) return;
		const o = a ? {
			...t,
			referenceRecord: {
				...t.referenceRecord,
				...a
			}
		} : t;
		throw new EndpointError(evaluateExpression(r, "Error", o));
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateRules.js
var evaluateRules, evaluateTreeRule, group;
var init_evaluateRules = __esmMin((() => {
	init_types();
	init_evaluateConditions();
	init_evaluateEndpointRule();
	init_evaluateErrorRule();
	evaluateRules = (e, t) => {
		for (const n of e) if (n.type === "endpoint") {
			const e = evaluateEndpointRule(n, t);
			if (e) return e;
		} else if (n.type === "error") evaluateErrorRule(n, t);
		else if (n.type === "tree") {
			const e = group.evaluateTreeRule(n, t);
			if (e) return e;
		} else throw new EndpointError(`Unknown endpoint rule: ${n}`);
		throw new EndpointError(`Rules evaluation failed`);
	};
	evaluateTreeRule = (e, t) => {
		const { conditions: n, rules: r } = e;
		const { result: i, referenceRecord: a } = evaluateConditions(n, t);
		if (!i) return;
		const o = a ? {
			...t,
			referenceRecord: {
				...t.referenceRecord,
				...a
			}
		} : t;
		return group.evaluateRules(r, o);
	};
	group = {
		evaluateRules,
		evaluateTreeRule
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/index.js
var init_utils$1 = __esmMin((() => {
	init_customEndpointFunctions();
	init_evaluateRules();
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/resolveEndpoint.js
var resolveEndpoint;
var init_resolveEndpoint = __esmMin((() => {
	init_transport();
	init_debug();
	init_types();
	init_utils$1();
	resolveEndpoint = (e, t) => {
		const { endpointParams: n, logger: r } = t;
		const { parameters: i, rules: a } = e;
		t.logger?.debug?.(`${debugId} Initial EndpointParams: ${toDebugString(n)}`);
		for (const e in i) {
			if (!hasOwn(i, e)) continue;
			const t = i[e];
			const r = n[e];
			if (r == null && t.default != null) {
				n[e] = t.default;
				continue;
			}
			if (t.required && r == null) throw new EndpointError(`Missing required parameter: '${e}'`);
		}
		const o = evaluateRules(a, {
			endpointParams: n,
			logger: r,
			referenceRecord: {}
		});
		t.logger?.debug?.(`${debugId} Resolved endpoint: ${toDebugString(o)}`);
		return o;
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/resolveEndpointRequiredConfig.js
var resolveEndpointRequiredConfig;
var init_resolveEndpointRequiredConfig = __esmMin((() => {
	resolveEndpointRequiredConfig = (e) => {
		const { endpoint: t } = e;
		if (t === void 0) e.endpoint = async () => {
			throw new Error("@smithy/middleware-endpoint: (default endpointRuleSet) endpoint is not set - you must configure an endpoint.");
		};
		return e;
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/endpoints/index.js
var endpoints_exports = /* @__PURE__ */ __exportAll({
	BinaryDecisionDiagram: () => BinaryDecisionDiagram,
	EndpointCache: () => EndpointCache,
	EndpointError: () => EndpointError,
	customEndpointFunctions: () => customEndpointFunctions,
	decideEndpoint: () => decideEndpoint,
	endpointMiddleware: () => endpointMiddleware,
	endpointMiddlewareOptions: () => endpointMiddlewareOptions,
	getEndpointFromInstructions: () => getEndpointFromInstructions,
	getEndpointPlugin: () => getEndpointPlugin,
	isIpAddress: () => isIpAddress,
	isValidHostLabel: () => isValidHostLabel,
	middlewareEndpointToEndpointV1: () => toEndpointV1,
	resolveEndpoint: () => resolveEndpoint,
	resolveEndpointConfig: () => resolveEndpointConfig,
	resolveEndpointRequiredConfig: () => resolveEndpointRequiredConfig,
	resolveParams: () => resolveParams,
	toEndpointV1: () => toEndpointV1
});
var getEndpointFromInstructions, resolveEndpointConfig, endpointMiddleware, getEndpointPlugin;
var init_endpoints = __esmMin((() => {
	init_getEndpointFromConfig();
	init_getEndpointFromInstructions();
	init_endpointMiddleware();
	init_getEndpointPlugin();
	init_resolveEndpointConfig();
	init_transport();
	init_BinaryDecisionDiagram();
	init_EndpointCache();
	init_decideEndpoint();
	init_isIpAddress();
	init_customEndpointFunctions();
	init_resolveEndpoint();
	init_types();
	init_toEndpointV1();
	init_resolveEndpointRequiredConfig();
	getEndpointFromInstructions = bindGetEndpointFromInstructions(getEndpointFromConfig);
	resolveEndpointConfig = bindResolveEndpointConfig(getEndpointFromConfig);
	endpointMiddleware = bindEndpointMiddleware(getEndpointFromConfig);
	getEndpointPlugin = bindGetEndpointPlugin(getEndpointFromConfig);
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/middleware-serde/serializerMiddleware.js
var serializerMiddleware;
var init_serializerMiddleware = __esmMin((() => {
	init_endpoints();
	serializerMiddleware = (e, t) => (n, r) => async (i) => {
		const a = e;
		const o = r.endpointV2 ? async () => toEndpointV1(r.endpointV2) : a.endpoint;
		if (!o) throw new Error("No valid endpoint provider available.");
		const s = await t(i.input, {
			...e,
			endpoint: o
		});
		return n({
			...i,
			request: s
		});
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/middleware-serde/serdePlugin.js
function getSerdePlugin(e, t, n) {
	return { applyToStack: (r) => {
		r.add(deserializerMiddleware(e, n), deserializerMiddlewareOption);
		r.add(serializerMiddleware(e, t), serializerMiddlewareOption);
	} };
}
var deserializerMiddlewareOption, serializerMiddlewareOption;
var init_serdePlugin = __esmMin((() => {
	init_deserializerMiddleware();
	init_serializerMiddleware();
	deserializerMiddlewareOption = {
		name: "deserializerMiddleware",
		step: "deserialize",
		tags: ["DESERIALIZER"],
		override: true
	};
	serializerMiddlewareOption = {
		name: "serializerMiddleware",
		step: "serialize",
		tags: ["SERIALIZER"],
		override: true
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/hash-node/hash-node.js
function castSourceData(e, t) {
	if (Buffer.isBuffer(e)) return e;
	if (typeof e === "string") return fromString(e, t);
	if (ArrayBuffer.isView(e)) return fromArrayBuffer(e.buffer, e.byteOffset, e.byteLength);
	return fromArrayBuffer(e);
}
var Hash;
var init_hash_node = __esmMin((() => {
	init_buffer_from();
	init_toUint8Array();
	Hash = class {
		algorithmIdentifier;
		secret;
		hash;
		constructor(e, t) {
			this.algorithmIdentifier = e;
			this.secret = t;
			this.reset();
		}
		update(e, t) {
			this.hash.update(toUint8Array(castSourceData(e, t)));
		}
		digest() {
			return Promise.resolve(this.hash.digest());
		}
		reset() {
			this.hash = this.secret ? createHmac(this.algorithmIdentifier, castSourceData(this.secret)) : createHash(this.algorithmIdentifier);
		}
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/checksum/ChecksumStream.js
var ChecksumStream$1;
var init_ChecksumStream = __esmMin((() => {
	init_toBase64();
	ChecksumStream$1 = class extends Readable {
		expectedChecksum;
		checksumSourceLocation;
		checksum;
		source;
		base64Encoder;
		constructor({ expectedChecksum: e, checksum: t, source: n, checksumSourceLocation: r, base64Encoder: i }) {
			super();
			if (typeof n.pipe !== "function") throw new Error(`@smithy/util-stream: unsupported source type ${n?.constructor?.name ?? n} in ChecksumStream.`);
			this.source = n;
			this.base64Encoder = i ?? toBase64$1;
			this.expectedChecksum = e;
			this.checksum = t;
			this.checksumSourceLocation = r;
			this.source.on("data", this.onSourceData);
			this.source.on("end", this.onSourceEnd);
			this.source.on("error", this.onSourceError);
			this.source.on("close", this.onSourceClose);
			this.source.pause();
		}
		onSourceData = (e) => {
			if (this.destroyed) return;
			try {
				this.checksum.update(e);
			} catch (e) {
				this.destroy(e);
				return;
			}
			if (!this.push(e)) this.source.pause();
		};
		onSourceEnd = async () => {
			if (this.destroyed) return;
			try {
				const e = await this.checksum.digest();
				const t = this.base64Encoder(e);
				if (this.expectedChecksum !== t) {
					this.destroy(/* @__PURE__ */ new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${t}" in response header "${this.checksumSourceLocation}".`));
					return;
				}
			} catch (e) {
				this.destroy(e);
				return;
			}
			this.push(null);
		};
		onSourceError = (e) => {
			this.destroy(e);
		};
		onSourceClose = () => {
			if (!this.destroyed && !this.source.readableEnded) this.destroy(/* @__PURE__ */ new Error("Connection lost or stream closed before all data was received."));
		};
		_read(e) {
			this.source.resume();
		}
		_destroy(e, t) {
			this.source?.removeListener("data", this.onSourceData);
			this.source?.removeListener("end", this.onSourceEnd);
			this.source?.removeListener("error", this.onSourceError);
			this.source?.removeListener("close", this.onSourceClose);
			this.source?.destroy();
			t(e);
		}
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-type-check.js
var isReadableStream, isBlob;
var init_stream_type_check = __esmMin((() => {
	isReadableStream = (e) => typeof ReadableStream === "function" && (e?.constructor?.name === ReadableStream.name || e instanceof ReadableStream);
	isBlob = (e) => {
		return typeof Blob === "function" && (e?.constructor?.name === Blob.name || e instanceof Blob);
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/fromUtf8.browser.js
var fromUtf8;
var init_fromUtf8_browser = __esmMin((() => {
	fromUtf8 = (e) => new TextEncoder().encode(e);
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/util-base64/constants-for-browser.js
var chars, alphabetByEncoding, alphabetByValue;
var init_constants_for_browser = __esmMin((() => {
	chars = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`;
	alphabetByEncoding = Object.entries(chars).reduce((e, [t, n]) => {
		e[n] = Number(t);
		return e;
	}, {});
	alphabetByValue = chars.split("");
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/util-base64/toBase64.browser.js
function toBase64(e) {
	let t;
	if (typeof e === "string") t = fromUtf8(e);
	else t = e;
	const n = typeof t === "object" && typeof t.length === "number";
	const r = typeof t === "object" && typeof t.byteOffset === "number" && typeof t.byteLength === "number";
	if (!n && !r) throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");
	let i = "";
	for (let e = 0; e < t.length; e += 3) {
		let n = 0;
		let r = 0;
		for (let i = e, a = Math.min(e + 3, t.length); i < a; i++) {
			n |= t[i] << (a - i - 1) * 8;
			r += 8;
		}
		const a = Math.ceil(r / 6);
		n <<= a * 6 - r;
		for (let e = 1; e <= a; e++) {
			const t = (a - e) * 6;
			i += alphabetByValue[(n & 63 << t) >> t];
		}
		i += "==".slice(0, 4 - a);
	}
	return i;
}
var init_toBase64_browser = __esmMin((() => {
	init_fromUtf8_browser();
	init_constants_for_browser();
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/checksum/ChecksumStream.browser.js
var ReadableStreamRef, ChecksumStream;
var init_ChecksumStream_browser = __esmMin((() => {
	ReadableStreamRef = typeof ReadableStream === "function" ? ReadableStream : function() {};
	ChecksumStream = class extends ReadableStreamRef {};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/checksum/createChecksumStream.browser.js
var createChecksumStream$1;
var init_createChecksumStream_browser = __esmMin((() => {
	init_toBase64_browser();
	init_stream_type_check();
	init_ChecksumStream_browser();
	createChecksumStream$1 = ({ expectedChecksum: e, checksum: t, source: n, checksumSourceLocation: r, base64Encoder: i }) => {
		if (!isReadableStream(n)) throw new Error(`@smithy/util-stream: unsupported source type ${n?.constructor?.name ?? n} in ChecksumStream.`);
		const a = i ?? toBase64;
		if (typeof TransformStream !== "function") throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");
		const o = new TransformStream({
			start() {},
			async transform(e, n) {
				t.update(e);
				n.enqueue(e);
			},
			async flush(n) {
				const i = await t.digest();
				const o = a(i);
				if (e !== o) {
					const t = /* @__PURE__ */ new Error(`Checksum mismatch: expected "${e}" but received "${o}" in response header "${r}".`);
					n.error(t);
				} else n.terminate();
			}
		});
		n.pipeThrough(o);
		const s = o.readable;
		Object.setPrototypeOf(s, ChecksumStream.prototype);
		return s;
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/checksum/createChecksumStream.js
function createChecksumStream(e) {
	if (typeof ReadableStream === "function" && isReadableStream(e.source)) return createChecksumStream$1(e);
	return new ChecksumStream$1(e);
}
var init_createChecksumStream = __esmMin((() => {
	init_stream_type_check();
	init_ChecksumStream();
	init_createChecksumStream_browser();
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/ByteArrayCollector.js
var ByteArrayCollector;
var init_ByteArrayCollector = __esmMin((() => {
	ByteArrayCollector = class {
		allocByteArray;
		byteLength = 0;
		byteArrays = [];
		constructor(e) {
			this.allocByteArray = e;
		}
		push(e) {
			this.byteArrays.push(e);
			this.byteLength += e.byteLength;
		}
		flush() {
			if (this.byteArrays.length === 1) {
				const e = this.byteArrays[0];
				this.reset();
				return e;
			}
			const e = this.allocByteArray(this.byteLength);
			let t = 0;
			for (let n = 0; n < this.byteArrays.length; ++n) {
				const r = this.byteArrays[n];
				e.set(r, t);
				t += r.byteLength;
			}
			this.reset();
			return e;
		}
		reset() {
			this.byteArrays = [];
			this.byteLength = 0;
		}
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/createBufferedReadable.browser.js
function createBufferedReadableStream(e, t, n) {
	const r = e.getReader();
	let i = false;
	let a = 0;
	const o = ["", new ByteArrayCollector((e) => new Uint8Array(e))];
	let s = -1;
	const pull = async (e) => {
		const { value: c, done: l } = await r.read();
		const u = c;
		if (l) {
			if (s !== -1) {
				const t = flush(o, s);
				if (sizeOf(t) > 0) e.enqueue(t);
			}
			e.close();
		} else {
			const r = modeOf(u, false);
			if (s !== r) {
				if (s >= 0) e.enqueue(flush(o, s));
				s = r;
			}
			if (s === -1) {
				e.enqueue(u);
				return;
			}
			const c = sizeOf(u);
			a += c;
			const l = sizeOf(o[s]);
			if (c >= t && l === 0) e.enqueue(u);
			else {
				const r = merge(o, s, u);
				if (!i && a > t * 2) {
					i = true;
					n?.warn(`@smithy/util-stream - stream chunk size ${c} is below threshold of ${t}, automatically buffering.`);
				}
				if (r >= t) e.enqueue(flush(o, s));
				else await pull(e);
			}
		}
	};
	return new ReadableStream({ pull });
}
function merge(e, t, n) {
	switch (t) {
		case 0:
			e[0] += n;
			return sizeOf(e[0]);
		case 1:
		case 2:
			e[t].push(n);
			return sizeOf(e[t]);
	}
}
function flush(e, t) {
	switch (t) {
		case 0:
			const n = e[0];
			e[0] = "";
			return n;
		case 1:
		case 2: return e[t].flush();
	}
	throw new Error(`@smithy/util-stream - invalid index ${t} given to flush()`);
}
function sizeOf(e) {
	return e?.byteLength ?? e?.length ?? 0;
}
function modeOf(e, t = true) {
	if (t && typeof Buffer !== "undefined" && e instanceof Buffer) return 2;
	if (e instanceof Uint8Array) return 1;
	if (typeof e === "string") return 0;
	return -1;
}
var init_createBufferedReadable_browser = __esmMin((() => {
	init_ByteArrayCollector();
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/createBufferedReadable.js
function createBufferedReadable(e, t, n) {
	if (isReadableStream(e)) return createBufferedReadableStream(e, t, n);
	const r = new Readable({ read() {} });
	let i = false;
	let a = 0;
	const o = [
		"",
		new ByteArrayCollector((e) => new Uint8Array(e)),
		new ByteArrayCollector((e) => Buffer.from(new Uint8Array(e)))
	];
	let s = -1;
	e.on("data", (e) => {
		const c = modeOf(e, true);
		if (s !== c) {
			if (s >= 0) r.push(flush(o, s));
			s = c;
		}
		if (s === -1) {
			r.push(e);
			return;
		}
		const l = sizeOf(e);
		a += l;
		const u = sizeOf(o[s]);
		if (l >= t && u === 0) r.push(e);
		else {
			const c = merge(o, s, e);
			if (!i && a > t * 2) {
				i = true;
				n?.warn(`@smithy/util-stream - stream chunk size ${l} is below threshold of ${t}, automatically buffering.`);
			}
			if (c >= t) r.push(flush(o, s));
		}
	});
	e.on("end", () => {
		if (s !== -1) {
			const e = flush(o, s);
			if (sizeOf(e) > 0) r.push(e);
		}
		r.push(null);
	});
	return r;
}
var init_createBufferedReadable = __esmMin((() => {
	init_ByteArrayCollector();
	init_createBufferedReadable_browser();
	init_stream_type_check();
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/getAwsChunkedEncodingStream.browser.js
var getAwsChunkedEncodingStream$1;
var init_getAwsChunkedEncodingStream_browser = __esmMin((() => {
	getAwsChunkedEncodingStream$1 = (e, t) => {
		const { base64Encoder: n, bodyLengthChecker: r, checksumAlgorithmFn: i, checksumLocationName: a, streamHasher: o } = t;
		const s = n !== void 0 && r !== void 0 && i !== void 0 && a !== void 0 && o !== void 0;
		const c = s ? o(i, e) : void 0;
		Promise.resolve(c).catch(() => {});
		const l = e.getReader();
		return new ReadableStream({ async pull(e) {
			const { value: t, done: i } = await l.read();
			if (i) {
				e.enqueue(`0\r\n`);
				if (s) {
					const t = n(await c);
					e.enqueue(`${a}:${t}\r\n`);
					e.enqueue(`\r\n`);
				}
				e.close();
			} else e.enqueue(`${(r(t) || 0).toString(16)}\r\n${t}\r\n`);
		} });
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/getAwsChunkedEncodingStream.js
function getAwsChunkedEncodingStream(e, t) {
	const n = e;
	const r = e;
	if (isReadableStream(r)) return getAwsChunkedEncodingStream$1(r, t);
	const { base64Encoder: i, bodyLengthChecker: a, checksumAlgorithmFn: o, checksumLocationName: s, streamHasher: c } = t;
	const l = i !== void 0 && o !== void 0 && s !== void 0 && c !== void 0;
	const u = l ? c(o, n) : void 0;
	Promise.resolve(u).catch(() => {});
	const d = new Readable({ read() {
		n.resume();
	} });
	n.on("data", (e) => {
		const t = a(e) || 0;
		if (t === 0) return;
		d.push(`${t.toString(16)}\r\n`);
		d.push(e);
		if (!d.push("\r\n")) n.pause();
	});
	n.on("error", (e) => {
		d.destroy(e);
	});
	n.pause();
	n.on("end", async () => {
		try {
			d.push(`0\r\n`);
			if (l) {
				const e = i(await u);
				d.push(`${s}:${e}\r\n`);
				d.push(`\r\n`);
			}
			d.push(null);
		} catch (e) {
			d.destroy(e);
		}
	});
	return d;
}
var init_getAwsChunkedEncodingStream = __esmMin((() => {
	init_getAwsChunkedEncodingStream_browser();
	init_stream_type_check();
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/headStream.browser.js
async function headStream$1(e, t) {
	let n = 0;
	const r = [];
	const i = e.getReader();
	let a = false;
	while (!a) {
		const { done: e, value: o } = await i.read();
		if (o) {
			r.push(o);
			n += o?.byteLength ?? 0;
		}
		if (n >= t) break;
		a = e;
	}
	i.releaseLock();
	const o = new Uint8Array(Math.min(t, n));
	let s = 0;
	for (const e of r) {
		if (e.byteLength > o.byteLength - s) {
			o.set(e.subarray(0, o.byteLength - s), s);
			break;
		} else o.set(e, s);
		s += e.length;
	}
	return o;
}
var init_headStream_browser = __esmMin((() => {}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/headStream.js
var headStream, Collector$1;
var init_headStream = __esmMin((() => {
	init_concatBytes();
	init_headStream_browser();
	init_stream_type_check();
	headStream = (e, t) => {
		if (isReadableStream(e)) return headStream$1(e, t);
		return new Promise((n, r) => {
			const i = new Collector$1();
			i.limit = t;
			e.pipe(i);
			e.on("error", (e) => {
				i.end();
				r(e);
			});
			i.on("error", r);
			i.on("finish", function() {
				n(concatBytes(this.buffers));
			});
		});
	};
	Collector$1 = class extends Writable {
		buffers = [];
		limit = Infinity;
		bytesBuffered = 0;
		_write(e, t, n) {
			this.buffers.push(e);
			this.bytesBuffered += e.byteLength ?? 0;
			if (this.bytesBuffered >= this.limit) {
				const e = this.bytesBuffered - this.limit;
				const t = this.buffers[this.buffers.length - 1];
				this.buffers[this.buffers.length - 1] = t.subarray(0, t.byteLength - e);
				this.emit("finish");
			}
			n();
		}
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/toUtf8.browser.js
var toUtf8;
var init_toUtf8_browser = __esmMin((() => {
	toUtf8 = (e) => {
		if (typeof e === "string") return e;
		if (typeof e !== "object" || typeof e.byteOffset !== "number" || typeof e.byteLength !== "number") throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");
		return new TextDecoder("utf-8").decode(e);
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-collector.browser.js
async function collectBlob(e) {
	return e.arrayBuffer().then((e) => new Uint8Array(e));
}
async function collectReadableStream(e) {
	const t = [];
	const n = e.getReader();
	let r = 0;
	while (true) {
		const { done: e, value: i } = await n.read();
		if (i) {
			t.push(i);
			r += i.length;
		}
		if (e) break;
	}
	return concatBytes(t, r);
}
var streamCollector$1;
var init_stream_collector_browser = __esmMin((() => {
	init_concatBytes();
	init_stream_type_check();
	streamCollector$1 = async (e) => {
		if (isBlob(e)) return collectBlob(e);
		return collectReadableStream(e);
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/sdk-stream-mixin.browser.js
var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED$1, sdkStreamMixin$1, isBlobInstance;
var init_sdk_stream_mixin_browser = __esmMin((() => {
	init_toBase64_browser();
	init_hex_encoding();
	init_toUtf8_browser();
	init_stream_collector_browser();
	init_stream_type_check();
	ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED$1 = "The stream has already been transformed.";
	sdkStreamMixin$1 = (e) => {
		if (!isBlobInstance(e) && !isReadableStream(e)) {
			const t = e?.__proto__?.constructor?.name || e;
			throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${t}`);
		}
		let t = false;
		const transformToByteArray = async () => {
			if (t) throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED$1);
			t = true;
			return await streamCollector$1(e);
		};
		const blobToWebStream = (e) => {
			if (typeof e.stream !== "function") 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");
			return e.stream();
		};
		return Object.assign(e, {
			transformToByteArray,
			transformToString: async (e) => {
				const t = await transformToByteArray();
				if (e === "base64") return toBase64(t);
				else if (e === "hex") return toHex(t);
				else if (e === void 0 || e === "utf8" || e === "utf-8") return toUtf8(t);
				else if (typeof TextDecoder === "function") return new TextDecoder(e).decode(t);
				else throw new Error("TextDecoder is not available, please make sure polyfill is provided.");
			},
			transformToWebStream: () => {
				if (t) throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED$1);
				t = true;
				if (isBlobInstance(e)) return blobToWebStream(e);
				else if (isReadableStream(e)) return e;
				else throw new Error(`Cannot transform payload to web stream, got ${e}`);
			}
		});
	};
	isBlobInstance = (e) => typeof Blob === "function" && e instanceof Blob;
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-collector.js
var streamCollector, Collector;
var init_stream_collector = __esmMin((() => {
	init_concatBytes();
	init_stream_collector_browser();
	init_stream_type_check();
	streamCollector = (e) => {
		if (isBlob(e)) return collectBlob(e);
		if (isReadableStream(e)) return collectReadableStream(e);
		return new Promise((t, n) => {
			const r = new Collector();
			const i = e;
			i.pipe(r);
			i.on("error", (e) => {
				r.end();
				n(e);
			});
			r.on("error", n);
			r.on("finish", function() {
				t(concatBytes(this.bufferedBytes));
			});
		});
	};
	Collector = class extends Writable {
		bufferedBytes = [];
		_write(e, t, n) {
			this.bufferedBytes.push(e);
			n();
		}
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/sdk-stream-mixin.js
var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED, sdkStreamMixin;
var init_sdk_stream_mixin = __esmMin((() => {
	init_buffer_from();
	init_sdk_stream_mixin_browser();
	init_stream_collector();
	ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed.";
	sdkStreamMixin = (e) => {
		if (!(e instanceof Readable)) try {
			return sdkStreamMixin$1(e);
		} catch (t) {
			const n = e?.__proto__?.constructor?.name || e;
			throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${n}`);
		}
		let t = false;
		const transformToByteArray = async () => {
			if (t) throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);
			t = true;
			return await streamCollector(e);
		};
		return Object.assign(e, {
			transformToByteArray,
			transformToString: async (e) => {
				const t = await transformToByteArray();
				if (e === void 0 || Buffer.isEncoding(e)) return fromArrayBuffer(t.buffer, t.byteOffset, t.byteLength).toString(e);
				else return new TextDecoder(e).decode(t);
			},
			transformToWebStream: () => {
				if (t) throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);
				if (e.readableFlowing !== null) throw new Error("The stream has been consumed by other callbacks.");
				if (typeof Readable.toWeb !== "function") throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.");
				t = true;
				return Readable.toWeb(e);
			}
		});
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/splitStream.browser.js
async function splitStream$1(e) {
	if (typeof e.stream === "function") e = e.stream();
	return e.tee();
}
var init_splitStream_browser = __esmMin((() => {}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/splitStream.js
async function splitStream(e) {
	if (isReadableStream(e) || isBlob(e)) return splitStream$1(e);
	const t = new PassThrough();
	const n = new PassThrough();
	e.pipe(t);
	e.pipe(n);
	return [t, n];
}
var init_splitStream = __esmMin((() => {
	init_splitStream_browser();
	init_stream_type_check();
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/serde/index.js
var serde_exports = /* @__PURE__ */ __exportAll({
	ChecksumStream: () => ChecksumStream$1,
	Hash: () => Hash,
	LazyJsonString: () => LazyJsonString,
	NumericValue: () => NumericValue,
	Uint8ArrayBlobAdapter: () => Uint8ArrayBlobAdapter,
	_parseEpochTimestamp: () => _parseEpochTimestamp,
	_parseRfc3339DateTimeWithOffset: () => _parseRfc3339DateTimeWithOffset,
	_parseRfc7231DateTime: () => _parseRfc7231DateTime,
	calculateBodyLength: () => calculateBodyLength,
	concatBytes: () => concatBytes,
	copyDocumentWithTransform: () => copyDocumentWithTransform,
	createBufferedReadable: () => createBufferedReadable,
	createChecksumStream: () => createChecksumStream,
	dateToUtcString: () => dateToUtcString,
	deserializerMiddleware: () => deserializerMiddleware,
	deserializerMiddlewareOption: () => deserializerMiddlewareOption,
	expectBoolean: () => expectBoolean,
	expectByte: () => expectByte,
	expectFloat32: () => expectFloat32,
	expectInt: () => expectInt,
	expectInt32: () => expectInt32,
	expectLong: () => expectLong,
	expectNonNull: () => expectNonNull,
	expectNumber: () => expectNumber,
	expectObject: () => expectObject,
	expectShort: () => expectShort,
	expectString: () => expectString,
	expectUnion: () => expectUnion,
	fromArrayBuffer: () => fromArrayBuffer,
	fromBase64: () => fromBase64,
	fromHex: () => fromHex,
	fromString: () => fromString,
	fromUtf8: () => fromUtf8$1,
	generateIdempotencyToken: () => generateIdempotencyToken,
	getAwsChunkedEncodingStream: () => getAwsChunkedEncodingStream,
	getSerdePlugin: () => getSerdePlugin,
	handleFloat: () => handleFloat,
	hasOwn: () => hasOwn,
	headStream: () => headStream,
	isArrayBuffer: () => isArrayBuffer,
	isBlob: () => isBlob,
	isReadableStream: () => isReadableStream,
	limitedParseDouble: () => limitedParseDouble,
	limitedParseFloat: () => limitedParseFloat,
	limitedParseFloat32: () => limitedParseFloat32,
	logger: () => logger,
	nv: () => nv,
	parseBoolean: () => parseBoolean,
	parseEpochTimestamp: () => parseEpochTimestamp,
	parseRfc3339DateTime: () => parseRfc3339DateTime,
	parseRfc3339DateTimeWithOffset: () => parseRfc3339DateTimeWithOffset,
	parseRfc7231DateTime: () => parseRfc7231DateTime,
	quoteHeader: () => quoteHeader,
	sdkStreamMixin: () => sdkStreamMixin,
	serializerMiddleware: () => serializerMiddleware,
	serializerMiddlewareOption: () => serializerMiddlewareOption,
	splitEvery: () => splitEvery,
	splitHeader: () => splitHeader,
	splitStream: () => splitStream,
	streamCollector: () => streamCollector,
	strictParseByte: () => strictParseByte,
	strictParseDouble: () => strictParseDouble,
	strictParseFloat: () => strictParseFloat,
	strictParseFloat32: () => strictParseFloat32,
	strictParseInt: () => strictParseInt,
	strictParseInt32: () => strictParseInt32,
	strictParseLong: () => strictParseLong,
	strictParseShort: () => strictParseShort,
	toBase64: () => toBase64$1,
	toHex: () => toHex,
	toUint8Array: () => toUint8Array,
	toUtf8: () => toUtf8$1,
	v4: () => v4
});
var Uint8ArrayBlobAdapter, _getRandomValues, v4, generateIdempotencyToken;
var init_serde = __esmMin((() => {
	init_fromBase64();
	init_toBase64();
	init_Uint8ArrayBlobAdapter();
	init_fromUtf8();
	init_toUtf8();
	init_v4();
	init_copyDocumentWithTransform();
	init_date_utils();
	init_lazy_json();
	init_parse_utils();
	init_quote_header();
	init_schema_date_utils();
	init_split_every();
	init_split_header();
	init_NumericValue();
	init_hex_encoding();
	init_calculateBodyLength();
	init_toUint8Array();
	init_concatBytes();
	init_buffer_from();
	init_is_array_buffer();
	init_deserializerMiddleware();
	init_serdePlugin();
	init_serializerMiddleware();
	init_hash_node();
	init_ChecksumStream();
	init_createChecksumStream();
	init_createBufferedReadable();
	init_getAwsChunkedEncodingStream();
	init_headStream();
	init_sdk_stream_mixin();
	init_splitStream();
	init_stream_type_check();
	init_stream_collector();
	init_transport();
	Uint8ArrayBlobAdapter = class extends bindUint8ArrayBlobAdapter(toUtf8$1, fromUtf8$1, toBase64$1, fromBase64) {};
	_getRandomValues = getRandomValues;
	v4 = bindV4(_getRandomValues);
	generateIdempotencyToken = v4;
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/checksum/chunked-blob-reader/chunked-blob-reader.js
async function blobReader(e, t, n = 1048576) {
	const r = e.size;
	let i = 0;
	while (i < r) {
		const a = e.slice(i, Math.min(r, i + n));
		t(new Uint8Array(await a.arrayBuffer()));
		i += a.size;
	}
}
var init_chunked_blob_reader = __esmMin((() => {}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/checksum/hash-blob-browser/blobHasher.js
var blobHasher;
var init_blobHasher = __esmMin((() => {
	init_chunked_blob_reader();
	blobHasher = async function blobHasher(e, t) {
		const n = new e();
		await blobReader(t, (e) => {
			n.update(e);
		});
		return n.digest();
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/checksum/hash-stream-node/HashCalculator.js
var HashCalculator;
var init_HashCalculator = __esmMin((() => {
	init_serde();
	HashCalculator = class extends Writable {
		hash;
		constructor(e, t) {
			super(t);
			this.hash = e;
		}
		_write(e, t, n) {
			try {
				this.hash.update(toUint8Array(e));
			} catch (e) {
				return n(e);
			}
			n();
		}
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/checksum/hash-stream-node/fileStreamHasher.js
var fileStreamHasher, isReadStream;
var init_fileStreamHasher = __esmMin((() => {
	init_HashCalculator();
	fileStreamHasher = (e, t) => new Promise((n, r) => {
		if (!isReadStream(t)) {
			r(/* @__PURE__ */ new Error("Unable to calculate hash for non-file streams."));
			return;
		}
		const i = createReadStream(t.path, {
			start: t.start,
			end: t.end
		});
		const a = new e();
		const o = new HashCalculator(a);
		i.pipe(o);
		i.on("error", (e) => {
			o.end();
			r(e);
		});
		o.on("error", r);
		o.on("finish", function() {
			a.digest().then(n).catch(r);
		});
	});
	isReadStream = (e) => typeof e.path === "string";
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/checksum/hash-stream-node/readableStreamHasher.js
var readableStreamHasher;
var init_readableStreamHasher = __esmMin((() => {
	init_HashCalculator();
	readableStreamHasher = (e, t) => {
		if (t.readableFlowing !== null) throw new Error("Unable to calculate hash for flowing readable stream");
		const n = new e();
		const r = new HashCalculator(n);
		t.pipe(r);
		return new Promise((e, i) => {
			t.on("error", (e) => {
				r.end();
				i(e);
			});
			r.on("error", i);
			r.on("finish", () => {
				n.digest().then(e).catch(i);
			});
		});
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/checksum/md5/Md5Js.js
function compress(e, t) {
	let n = e[0], r = e[1], i = e[2], a = e[3];
	for (let e = 0; e < 64; ++e) {
		let o, s;
		if (e < 16) {
			o = r & i | ~r & a;
			s = e;
		} else if (e < 32) {
			o = a & r | i & ~a;
			s = (5 * e + 1) % 16;
		} else if (e < 48) {
			o = r ^ i ^ a;
			s = (3 * e + 5) % 16;
		} else {
			o = i ^ (r | ~a);
			s = 7 * e % 16;
		}
		const c = t.getUint32(s * 4, true);
		const l = a;
		a = i;
		i = r;
		const u = S[(e >> 4) * 4 + (e & 3)];
		const d = (n + o & M) + (c + T[e] & M) & M;
		r = r + ((d << u | d >>> 32 - u) >>> 0) & M;
		n = l;
	}
	e[0] = e[0] + n & M;
	e[1] = e[1] + r & M;
	e[2] = e[2] + i & M;
	e[3] = e[3] + a & M;
}
var Md5Js, INIT$1, M, S, T;
var init_Md5Js = __esmMin((() => {
	init_serde();
	Md5Js = class {
		digestLength = 16;
		state = Uint32Array.from(INIT$1);
		writeBuffer = /* @__PURE__ */ new DataView(/* @__PURE__ */ new ArrayBuffer(64));
		bufferLength = 0;
		bytesHashed = 0;
		update(e) {
			const t = toUint8Array(e);
			let n = 0;
			let r = t.byteLength;
			this.bytesHashed += r;
			while (r > 0) {
				this.writeBuffer.setUint8(this.bufferLength++, t[n++]);
				--r;
				if (this.bufferLength === 64) {
					compress(this.state, this.writeBuffer);
					this.bufferLength = 0;
				}
			}
		}
		async digest() {
			const e = Uint32Array.from(this.state);
			const t = new DataView(this.writeBuffer.buffer.slice(0));
			let n = this.bufferLength;
			const r = this.bytesHashed * 8;
			t.setUint8(n++, 128);
			if (this.bufferLength % 64 >= 56) {
				for (let e = n; e < 64; ++e) t.setUint8(e, 0);
				compress(e, t);
				n = 0;
			}
			for (let e = n; e < 56; ++e) t.setUint8(e, 0);
			t.setUint32(56, r >>> 0, true);
			t.setUint32(60, Math.floor(r / 2 ** 32), true);
			compress(e, t);
			const i = /* @__PURE__ */ new Uint8Array(16);
			const a = new DataView(i.buffer);
			for (let t = 0; t < 4; ++t) a.setUint32(t * 4, e[t], true);
			return i;
		}
		reset() {
			this.state.set(INIT$1);
			this.writeBuffer = /* @__PURE__ */ new DataView(/* @__PURE__ */ new ArrayBuffer(64));
			this.bufferLength = 0;
			this.bytesHashed = 0;
		}
	};
	INIT$1 = [
		1732584193,
		4023233417,
		2562383102,
		271733878
	];
	M = 4294967295;
	S = Uint8Array.of(7, 12, 17, 22, 5, 9, 14, 20, 4, 11, 16, 23, 6, 10, 15, 21);
	T = Array.from({ length: 64 }, (e, t) => Math.abs(Math.sin(t + 1)) * 2 ** 32 >>> 0);
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/checksum/md5/Md5Node.js
function buildNativeClass$2() {
	return class Md5Node {
		digestLength = 16;
		hash = createHash("md5");
		update(e) {
			this.hash.update(toUint8Array(e));
		}
		async digest() {
			const e = this.hash.copy().digest();
			return new Uint8Array(e.buffer, e.byteOffset, e.byteLength);
		}
		reset() {
			this.hash = createHash("md5");
		}
	};
}
var hasNativeCrypto$1, Md5Node;
var init_Md5Node = __esmMin((() => {
	init_serde();
	init_Md5Js();
	hasNativeCrypto$1 = (() => {
		try {
			createHash("md5");
			return true;
		} catch {
			return false;
		}
	})();
	Md5Node = hasNativeCrypto$1 ? buildNativeClass$2() : Md5Js;
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/checksum/crc32/Crc32Js.js
var CRC32_TABLE, ONES, Crc32Js;
var init_Crc32Js = __esmMin((() => {
	CRC32_TABLE = /* @__PURE__ */ new Uint32Array(256);
	for (let e = 0; e < 256; ++e) {
		let t = e;
		for (let e = 0; e < 8; ++e) t = t & 1 ? 3988292384 ^ t >>> 1 : t >>> 1;
		CRC32_TABLE[e] = t >>> 0;
	}
	ONES = 4294967295;
	Crc32Js = class {
		digestLength = 4;
		checksum = ONES;
		update(e) {
			for (let t = 0; t < e.length; ++t) this.checksum = this.checksum >>> 8 ^ CRC32_TABLE[(this.checksum ^ e[t]) & 255];
		}
		digestSync() {
			return (this.checksum ^ ONES) >>> 0;
		}
		async digest() {
			const e = this.digestSync();
			const t = /* @__PURE__ */ new Uint8Array(4);
			new DataView(t.buffer).setUint32(0, e, false);
			return t;
		}
		reset() {
			this.checksum = ONES;
		}
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/checksum/crc32/Crc32Node.js
function buildNativeClass$1(e) {
	return class Crc32Node {
		digestLength = 4;
		value = 0;
		update(t) {
			this.value = e(t, this.value);
		}
		digestSync() {
			return this.value >>> 0;
		}
		async digest() {
			const e = /* @__PURE__ */ new Uint8Array(4);
			new DataView(e.buffer).setUint32(0, this.digestSync(), false);
			return e;
		}
		reset() {
			this.value = 0;
		}
	};
}
var zlibCrc32, Crc32Node;
var init_Crc32Node = __esmMin((() => {
	init_Crc32Js();
	zlibCrc32 = typeof zlib$1.crc32 === "function" ? zlib$1.crc32 : void 0;
	Crc32Node = zlibCrc32 ? buildNativeClass$1(zlibCrc32) : Crc32Js;
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/checksum/sha256/Sha256Js.js
var BLOCK, DIGEST_LENGTH, MAX_HASHABLE_LENGTH, Sha256Js, INIT, K;
var init_Sha256Js = __esmMin((() => {
	init_serde();
	BLOCK = 64;
	DIGEST_LENGTH = 32;
	MAX_HASHABLE_LENGTH = 2 ** 53 - 1;
	Sha256Js = class Sha256Js {
		digestLength = DIGEST_LENGTH;
		state = Int32Array.from(INIT);
		w;
		buffer = /* @__PURE__ */ new Uint8Array(64);
		bufferLength = 0;
		bytesHashed = 0;
		finished = false;
		inner;
		outer;
		constructor(e) {
			if (e) {
				const t = Sha256Js.normalizeKey(e);
				this.inner = new Sha256Js();
				this.outer = new Sha256Js();
				const { inner: n, outer: r } = this;
				const i = /* @__PURE__ */ new Uint8Array(128);
				for (let e = 0; e < BLOCK; ++e) {
					i[e] = 54 ^ t[e];
					i[e + BLOCK] = 92 ^ t[e];
				}
				n.update(i.subarray(0, BLOCK));
				r.update(i.subarray(BLOCK));
			}
		}
		update(e) {
			if (this.finished) throw new Error("Attempted to update an already finished HMAC.");
			if (this.inner) {
				this.inner.update(e);
				return;
			}
			const t = toUint8Array(e);
			let n = 0;
			let { byteLength: r } = t;
			this.bytesHashed += r;
			if (this.bytesHashed * 8 > MAX_HASHABLE_LENGTH) throw new Error("Cannot hash more than 2^53 - 1 bits");
			while (r > 0) {
				this.buffer[this.bufferLength++] = t[n++];
				r--;
				if (this.bufferLength === BLOCK) {
					this.hashBuffer();
					this.bufferLength = 0;
				}
			}
		}
		async digest() {
			const { inner: e, outer: t } = this;
			if (e && t) {
				if (this.finished) throw new Error("Attempted to digest an already finished HMAC.");
				this.finished = true;
				const n = e.digestSync();
				t.update(n);
				return t.digestSync();
			}
			return this.digestSync();
		}
		reset() {
			this.state = Int32Array.from(INIT);
			this.buffer = /* @__PURE__ */ new Uint8Array(64);
			this.bufferLength = 0;
			this.bytesHashed = 0;
		}
		digestSync() {
			const e = this.state.slice();
			const t = this.buffer.slice();
			let n = this.bufferLength;
			const r = this.bytesHashed * 8;
			const i = new DataView(t.buffer, t.byteOffset, t.byteLength);
			i.setUint8(n++, 128);
			if ((n - 1) % BLOCK >= 56) {
				for (let e = n; e < BLOCK; ++e) i.setUint8(e, 0);
				this.hashBufferWith(e, t);
				n = 0;
			}
			for (let e = n; e < 56; ++e) i.setUint8(e, 0);
			i.setUint32(56, Math.floor(r / 4294967296), false);
			i.setUint32(60, r, false);
			this.hashBufferWith(e, t);
			const a = new Uint8Array(DIGEST_LENGTH);
			for (let t = 0; t < 8; ++t) {
				a[t * 4] = e[t] >>> 24 & 255;
				a[t * 4 + 1] = e[t] >>> 16 & 255;
				a[t * 4 + 2] = e[t] >>> 8 & 255;
				a[t * 4 + 3] = e[t] >>> 0 & 255;
			}
			return a;
		}
		static normalizeKey(e) {
			const t = toUint8Array(e);
			if (t.byteLength > BLOCK) {
				const e = new Sha256Js();
				e.update(t);
				const n = e.digestSync();
				const r = new Uint8Array(BLOCK);
				r.set(n);
				return r;
			}
			if (t.byteLength < BLOCK) {
				const e = new Uint8Array(BLOCK);
				e.set(t);
				return e;
			}
			return t;
		}
		hashBuffer() {
			this.hashBufferWith(this.state, this.buffer);
		}
		hashBufferWith(e, t) {
			const n = this.w ??= /* @__PURE__ */ new Int32Array(64);
			let r = e[0], i = e[1], a = e[2], o = e[3], s = e[4], c = e[5], l = e[6], u = e[7];
			for (let e = 0; e < BLOCK; ++e) {
				if (e < 16) n[e] = (t[e * 4] & 255) << 24 | (t[e * 4 + 1] & 255) << 16 | (t[e * 4 + 2] & 255) << 8 | t[e * 4 + 3] & 255;
				else {
					let t = n[e - 2];
					const r = (t >>> 17 | t << 15) ^ (t >>> 19 | t << 13) ^ t >>> 10;
					t = n[e - 15];
					const i = (t >>> 7 | t << 25) ^ (t >>> 18 | t << 14) ^ t >>> 3;
					n[e] = (r + n[e - 7] | 0) + (i + n[e - 16] | 0);
				}
				const d = (((s >>> 6 | s << 26) ^ (s >>> 11 | s << 21) ^ (s >>> 25 | s << 7)) + (s & c ^ ~s & l) | 0) + (u + (K[e] + n[e] | 0) | 0) | 0;
				const f = ((r >>> 2 | r << 30) ^ (r >>> 13 | r << 19) ^ (r >>> 22 | r << 10)) + (r & i ^ r & a ^ i & a) | 0;
				u = l;
				l = c;
				c = s;
				s = o + d | 0;
				o = a;
				a = i;
				i = r;
				r = d + f | 0;
			}
			e[0] += r;
			e[1] += i;
			e[2] += a;
			e[3] += o;
			e[4] += s;
			e[5] += c;
			e[6] += l;
			e[7] += u;
		}
	};
	INIT = new Int32Array([
		1779033703,
		3144134277,
		1013904242,
		2773480762,
		1359893119,
		2600822924,
		528734635,
		1541459225
	]);
	K = new Int32Array([
		1116352408,
		1899447441,
		3049323471,
		3921009573,
		961987163,
		1508970993,
		2453635748,
		2870763221,
		3624381080,
		310598401,
		607225278,
		1426881987,
		1925078388,
		2162078206,
		2614888103,
		3248222580,
		3835390401,
		4022224774,
		264347078,
		604807628,
		770255983,
		1249150122,
		1555081692,
		1996064986,
		2554220882,
		2821834349,
		2952996808,
		3210313671,
		3336571891,
		3584528711,
		113926993,
		338241895,
		666307205,
		773529912,
		1294757372,
		1396182291,
		1695183700,
		1986661051,
		2177026350,
		2456956037,
		2730485921,
		2820302411,
		3259730800,
		3345764771,
		3516065817,
		3600352804,
		4094571909,
		275423344,
		430227734,
		506948616,
		659060556,
		883997877,
		958139571,
		1322822218,
		1537002063,
		1747873779,
		1955562222,
		2024104815,
		2227730452,
		2361852424,
		2428436474,
		2756734187,
		3204031479,
		3329325298
	]);
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/checksum/sha256/Sha256Node.js
function buildNativeClass() {
	return class Sha256Node {
		digestLength = 32;
		secret;
		hash;
		isHmac;
		finished = false;
		constructor(e) {
			this.secret = e;
			this.isHmac = !!e;
			this.hash = this.createHash();
		}
		update(e) {
			if (this.finished) throw new Error("Attempted to update an already finished hash.");
			this.hash.update(e);
		}
		async digest() {
			let e;
			if (this.isHmac) {
				this.finished = true;
				e = this.hash.digest();
			} else e = this.hash.copy().digest();
			return new Uint8Array(e.buffer, e.byteOffset, e.byteLength);
		}
		reset() {
			this.hash = this.createHash();
			this.finished = false;
		}
		createHash() {
			return this.secret ? createHmac("sha256", toBuffer(this.secret)) : createHash("sha256");
		}
	};
}
function toBuffer(e) {
	if (typeof e === "string") return e;
	if (ArrayBuffer.isView(e)) return Buffer.from(e.buffer, e.byteOffset, e.byteLength);
	return Buffer.from(e);
}
var hasNativeCrypto, Sha256Node;
var init_Sha256Node = __esmMin((() => {
	init_Sha256Js();
	hasNativeCrypto = (() => {
		try {
			createHash("sha256");
			return true;
		} catch {
			return false;
		}
	})();
	Sha256Node = hasNativeCrypto ? buildNativeClass() : Sha256Js;
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/checksum/sha256/Sha256WebCrypto.js
var digest, sign$1, importKey, subtle, MAX_PENDING_BYTES, Sha256WebCrypto;
var init_Sha256WebCrypto = __esmMin((() => {
	init_serde();
	init_Sha256Js();
	({digest, sign: sign$1, importKey} = globalThis?.crypto?.subtle ?? {});
	subtle = typeof digest === "function" && typeof sign$1 === "function" && typeof importKey === "function" ? globalThis.crypto.subtle : void 0;
	MAX_PENDING_BYTES = 8388608;
	Sha256WebCrypto = class {
		digestLength = 32;
		secret;
		pending = [];
		pendingBytes = 0;
		fallback;
		finished = false;
		constructor(e) {
			if (e) this.secret = toUint8Array(e);
		}
		update(e) {
			if (this.finished) throw new Error("Attempted to update an already finished HMAC.");
			if (this.fallback) {
				this.fallback.update(e);
				return;
			}
			this.pending.push(e.slice());
			this.pendingBytes += e.byteLength;
			if (this.pendingBytes >= MAX_PENDING_BYTES) this.switchToFallback();
		}
		async digest() {
			if (this.fallback) return this.fallback.digest();
			if (this.secret && this.finished) throw new Error("Attempted to digest an already finished HMAC.");
			const e = concatBytes(this.pending);
			if (subtle) {
				if (this.secret) {
					this.finished = true;
					const t = await subtle.importKey("raw", this.secret, {
						name: "HMAC",
						hash: "SHA-256"
					}, false, ["sign"]);
					const n = await subtle.sign("HMAC", t, e);
					return new Uint8Array(n);
				}
				const t = await subtle.digest("SHA-256", e);
				return new Uint8Array(t);
			}
			const t = new Sha256Js(this.secret);
			t.update(e);
			return t.digest();
		}
		reset() {
			this.pending = [];
			this.pendingBytes = 0;
			this.fallback = void 0;
			this.finished = false;
		}
		switchToFallback() {
			const e = new Sha256Js(this.secret);
			for (const t of this.pending) e.update(t);
			this.fallback = e;
			this.pending = [];
			this.pendingBytes = 0;
		}
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/checksum/index.js
var checksum_exports = /* @__PURE__ */ __exportAll({
	Crc32: () => Crc32Node,
	Crc32Js: () => Crc32Js,
	Crc32Node: () => Crc32Node,
	Md5: () => Md5Node,
	Md5Js: () => Md5Js,
	Md5Node: () => Md5Node,
	Sha256: () => Sha256Node,
	Sha256Js: () => Sha256Js,
	Sha256Node: () => Sha256Node,
	Sha256WebCrypto: () => Sha256WebCrypto,
	blobHasher: () => blobHasher,
	blobReader: () => blobReader,
	fileStreamHasher: () => fileStreamHasher,
	readableStreamHasher: () => readableStreamHasher
});
var init_checksum = __esmMin((() => {
	init_blobHasher();
	init_fileStreamHasher();
	init_readableStreamHasher();
	init_Md5Js();
	init_Md5Node();
	init_Crc32Js();
	init_Crc32Node();
	init_Sha256Js();
	init_Sha256Node();
	init_Sha256WebCrypto();
	init_chunked_blob_reader();
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/Int64.js
function negate(e) {
	for (let t = 0; t < 8; t++) e[t] ^= 255;
	for (let t = 7; t > -1; t--) {
		e[t]++;
		if (e[t] !== 0) break;
	}
}
var Int64;
var init_Int64 = __esmMin((() => {
	init_serde();
	Int64 = class Int64 {
		bytes;
		constructor(e) {
			this.bytes = e;
			if (e.byteLength !== 8) throw new Error("Int64 buffers must be exactly 8 bytes");
		}
		static fromNumber(e) {
			if (e > 0x8000000000000000 || e < -0x8000000000000000) throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);
			const t = /* @__PURE__ */ new Uint8Array(8);
			for (let n = 7, r = Math.abs(Math.round(e)); n > -1 && r > 0; n--, r /= 256) t[n] = r;
			if (e < 0) negate(t);
			return new Int64(t);
		}
		valueOf() {
			const e = this.bytes.slice(0);
			const t = e[0] & 128;
			if (t) negate(e);
			return parseInt(toHex(e), 16) * (t ? -1 : 1);
		}
		toString() {
			return String(this.valueOf());
		}
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/HeaderMarshaller.js
var HeaderMarshaller, HEADER_VALUE_TYPE, BOOLEAN_TAG, BYTE_TAG, SHORT_TAG, INT_TAG, LONG_TAG, BINARY_TAG, STRING_TAG, TIMESTAMP_TAG, UUID_TAG, UUID_PATTERN;
var init_HeaderMarshaller = __esmMin((() => {
	init_transport();
	init_serde();
	init_Int64();
	HeaderMarshaller = class {
		toUtf8;
		fromUtf8;
		constructor(e, t) {
			this.toUtf8 = e;
			this.fromUtf8 = t;
		}
		format(e) {
			const t = [];
			for (const n in e) {
				if (!hasOwn(e, n)) continue;
				const r = this.fromUtf8(n);
				t.push(Uint8Array.from([r.byteLength]), r, this.formatHeaderValue(e[n]));
			}
			const n = new Uint8Array(t.reduce((e, t) => e + t.byteLength, 0));
			let r = 0;
			for (const e of t) {
				n.set(e, r);
				r += e.byteLength;
			}
			return n;
		}
		formatHeaderValue(e) {
			switch (e.type) {
				case "boolean": return Uint8Array.from([e.value ? 0 : 1]);
				case "byte": return Uint8Array.from([2, e.value]);
				case "short":
					const t = /* @__PURE__ */ new DataView(/* @__PURE__ */ new ArrayBuffer(3));
					t.setUint8(0, 3);
					t.setInt16(1, e.value, false);
					return new Uint8Array(t.buffer);
				case "integer":
					const n = /* @__PURE__ */ new DataView(/* @__PURE__ */ new ArrayBuffer(5));
					n.setUint8(0, 4);
					n.setInt32(1, e.value, false);
					return new Uint8Array(n.buffer);
				case "long":
					const r = /* @__PURE__ */ new Uint8Array(9);
					r[0] = 5;
					r.set(e.value.bytes, 1);
					return r;
				case "binary":
					const i = new DataView(new ArrayBuffer(3 + e.value.byteLength));
					i.setUint8(0, 6);
					i.setUint16(1, e.value.byteLength, false);
					const a = new Uint8Array(i.buffer);
					a.set(e.value, 3);
					return a;
				case "string":
					const o = this.fromUtf8(e.value);
					const s = new DataView(new ArrayBuffer(3 + o.byteLength));
					s.setUint8(0, 7);
					s.setUint16(1, o.byteLength, false);
					const c = new Uint8Array(s.buffer);
					c.set(o, 3);
					return c;
				case "timestamp":
					const l = /* @__PURE__ */ new Uint8Array(9);
					l[0] = 8;
					l.set(Int64.fromNumber(e.value.valueOf()).bytes, 1);
					return l;
				case "uuid":
					if (!UUID_PATTERN.test(e.value)) throw new Error(`Invalid UUID received: ${e.value}`);
					const u = /* @__PURE__ */ new Uint8Array(17);
					u[0] = 9;
					u.set(fromHex(e.value.replace(/-/g, "")), 1);
					return u;
			}
		}
		parse(e) {
			const t = {};
			let n = 0;
			while (n < e.byteLength) {
				const r = e.getUint8(n++);
				const i = this.toUtf8(new Uint8Array(e.buffer, e.byteOffset + n, r));
				n += r;
				switch (e.getUint8(n++)) {
					case 0:
						t[i] = {
							type: BOOLEAN_TAG,
							value: true
						};
						break;
					case 1:
						t[i] = {
							type: BOOLEAN_TAG,
							value: false
						};
						break;
					case 2:
						t[i] = {
							type: BYTE_TAG,
							value: e.getInt8(n++)
						};
						break;
					case 3:
						t[i] = {
							type: SHORT_TAG,
							value: e.getInt16(n, false)
						};
						n += 2;
						break;
					case 4:
						t[i] = {
							type: INT_TAG,
							value: e.getInt32(n, false)
						};
						n += 4;
						break;
					case 5:
						t[i] = {
							type: LONG_TAG,
							value: new Int64(new Uint8Array(e.buffer, e.byteOffset + n, 8))
						};
						n += 8;
						break;
					case 6:
						const r = e.getUint16(n, false);
						n += 2;
						t[i] = {
							type: BINARY_TAG,
							value: new Uint8Array(e.buffer, e.byteOffset + n, r)
						};
						n += r;
						break;
					case 7:
						const a = e.getUint16(n, false);
						n += 2;
						t[i] = {
							type: STRING_TAG,
							value: this.toUtf8(new Uint8Array(e.buffer, e.byteOffset + n, a))
						};
						n += a;
						break;
					case 8:
						t[i] = {
							type: TIMESTAMP_TAG,
							value: new Date(new Int64(new Uint8Array(e.buffer, e.byteOffset + n, 8)).valueOf())
						};
						n += 8;
						break;
					case 9:
						const o = new Uint8Array(e.buffer, e.byteOffset + n, 16);
						n += 16;
						t[i] = {
							type: UUID_TAG,
							value: `${toHex(o.subarray(0, 4))}-${toHex(o.subarray(4, 6))}-${toHex(o.subarray(6, 8))}-${toHex(o.subarray(8, 10))}-${toHex(o.subarray(10))}`
						};
						break;
					default: throw new Error(`Unrecognized header type tag`);
				}
			}
			return t;
		}
	};
	;
	(function(e) {
		e[e["boolTrue"] = 0] = "boolTrue";
		e[e["boolFalse"] = 1] = "boolFalse";
		e[e["byte"] = 2] = "byte";
		e[e["short"] = 3] = "short";
		e[e["integer"] = 4] = "integer";
		e[e["long"] = 5] = "long";
		e[e["byteArray"] = 6] = "byteArray";
		e[e["string"] = 7] = "string";
		e[e["timestamp"] = 8] = "timestamp";
		e[e["uuid"] = 9] = "uuid";
	})(HEADER_VALUE_TYPE || (HEADER_VALUE_TYPE = {}));
	BOOLEAN_TAG = "boolean";
	BYTE_TAG = "byte";
	SHORT_TAG = "short";
	INT_TAG = "integer";
	LONG_TAG = "long";
	BINARY_TAG = "binary";
	STRING_TAG = "string";
	TIMESTAMP_TAG = "timestamp";
	UUID_TAG = "uuid";
	UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/splitMessage.js
function splitMessage({ byteLength: e, byteOffset: t, buffer: n }) {
	if (e < MINIMUM_MESSAGE_LENGTH) throw new Error("Provided message too short to accommodate event stream message overhead");
	const r = new DataView(n, t, e);
	const i = r.getUint32(0, false);
	if (e !== i) throw new Error("Reported message length does not match received message length");
	const a = r.getUint32(PRELUDE_MEMBER_LENGTH, false);
	const o = r.getUint32(PRELUDE_LENGTH, false);
	const s = r.getUint32(e - CHECKSUM_LENGTH, false);
	const c = new Crc32Node();
	c.update(new Uint8Array(n, t, PRELUDE_LENGTH));
	if (o !== c.digestSync()) throw new Error(`The prelude checksum specified in the message (${o}) does not match the calculated CRC32 checksum (${c.digestSync()})`);
	c.update(new Uint8Array(n, t + PRELUDE_LENGTH, e - 12));
	if (s !== c.digestSync()) throw new Error(`The message checksum (${c.digestSync()}) did not match the expected value of ${s}`);
	return {
		headers: new DataView(n, t + PRELUDE_LENGTH + CHECKSUM_LENGTH, a),
		body: new Uint8Array(n, t + PRELUDE_LENGTH + CHECKSUM_LENGTH + a, i - a - 16)
	};
}
var PRELUDE_MEMBER_LENGTH, PRELUDE_LENGTH, CHECKSUM_LENGTH, MINIMUM_MESSAGE_LENGTH;
var init_splitMessage = __esmMin((() => {
	init_checksum();
	PRELUDE_MEMBER_LENGTH = 4;
	PRELUDE_LENGTH = 8;
	CHECKSUM_LENGTH = 4;
	MINIMUM_MESSAGE_LENGTH = 16;
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/EventStreamCodec.js
var EventStreamCodec;
var init_EventStreamCodec = __esmMin((() => {
	init_checksum();
	init_HeaderMarshaller();
	init_splitMessage();
	EventStreamCodec = class {
		headerMarshaller;
		messageBuffer;
		isEndOfStream;
		constructor(e, t) {
			this.headerMarshaller = new HeaderMarshaller(e, t);
			this.messageBuffer = [];
			this.isEndOfStream = false;
		}
		feed(e) {
			this.messageBuffer.push(this.decode(e));
		}
		endOfStream() {
			this.isEndOfStream = true;
		}
		getMessage() {
			const e = this.messageBuffer.pop();
			const t = this.isEndOfStream;
			return {
				getMessage() {
					return e;
				},
				isEndOfStream() {
					return t;
				}
			};
		}
		getAvailableMessages() {
			const e = this.messageBuffer;
			this.messageBuffer = [];
			const t = this.isEndOfStream;
			return {
				getMessages() {
					return e;
				},
				isEndOfStream() {
					return t;
				}
			};
		}
		encode({ headers: e, body: t }) {
			const n = this.headerMarshaller.format(e);
			const r = n.byteLength + t.byteLength + 16;
			const i = new Uint8Array(r);
			const a = new DataView(i.buffer, i.byteOffset, i.byteLength);
			const o = new Crc32Node();
			a.setUint32(0, r, false);
			a.setUint32(4, n.byteLength, false);
			o.update(i.subarray(0, 8));
			a.setUint32(8, o.digestSync(), false);
			i.set(n, 12);
			i.set(t, n.byteLength + 12);
			o.update(i.subarray(8, r - 4));
			a.setUint32(r - 4, o.digestSync(), false);
			return i;
		}
		decode(e) {
			const { headers: t, body: n } = splitMessage(e);
			return {
				headers: this.headerMarshaller.parse(t),
				body: n
			};
		}
		formatHeaders(e) {
			return this.headerMarshaller.format(e);
		}
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/MessageDecoderStream.js
var MessageDecoderStream;
var init_MessageDecoderStream = __esmMin((() => {
	MessageDecoderStream = class {
		options;
		constructor(e) {
			this.options = e;
		}
		[Symbol.asyncIterator]() {
			return this.asyncIterator();
		}
		async *asyncIterator() {
			for await (const e of this.options.inputStream) yield this.options.decoder.decode(e);
		}
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/MessageEncoderStream.js
var MessageEncoderStream;
var init_MessageEncoderStream = __esmMin((() => {
	MessageEncoderStream = class {
		options;
		constructor(e) {
			this.options = e;
		}
		[Symbol.asyncIterator]() {
			return this.asyncIterator();
		}
		async *asyncIterator() {
			for await (const e of this.options.messageStream) yield this.options.encoder.encode(e);
			if (this.options.includeEndFrame) yield /* @__PURE__ */ new Uint8Array(0);
		}
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/SmithyMessageDecoderStream.js
var SmithyMessageDecoderStream;
var init_SmithyMessageDecoderStream = __esmMin((() => {
	SmithyMessageDecoderStream = class {
		options;
		constructor(e) {
			this.options = e;
		}
		[Symbol.asyncIterator]() {
			return this.asyncIterator();
		}
		async *asyncIterator() {
			for await (const e of this.options.messageStream) {
				const t = await this.options.deserializer(e);
				if (t === void 0) continue;
				yield t;
			}
		}
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/SmithyMessageEncoderStream.js
var SmithyMessageEncoderStream;
var init_SmithyMessageEncoderStream = __esmMin((() => {
	SmithyMessageEncoderStream = class {
		options;
		constructor(e) {
			this.options = e;
		}
		[Symbol.asyncIterator]() {
			return this.asyncIterator();
		}
		async *asyncIterator() {
			for await (const e of this.options.inputStream) yield this.options.serializer(e);
		}
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/getChunkedStream.js
function getChunkedStream(e) {
	let t = 0;
	let n = 0;
	let r = null;
	let i = null;
	const allocateMessage = (e) => {
		if (typeof e !== "number") throw new Error("Attempted to allocate an event message where size was not a number: " + e);
		t = e;
		n = 4;
		r = new Uint8Array(e);
		new DataView(r.buffer).setUint32(0, e, false);
	};
	const iterator = async function* () {
		const a = e[Symbol.asyncIterator]();
		while (true) {
			const { value: e, done: o } = await a.next();
			if (o) {
				if (!t) return;
				else if (t === n) yield r;
				else throw new Error("Truncated event message received.");
				return;
			}
			const s = e.length;
			let c = 0;
			while (c < s) {
				if (!r) {
					const t = s - c;
					if (!i) i = /* @__PURE__ */ new Uint8Array(4);
					const r = Math.min(4 - n, t);
					i.set(e.slice(c, c + r), n);
					n += r;
					c += r;
					if (n < 4) break;
					allocateMessage(new DataView(i.buffer).getUint32(0, false));
					i = null;
				}
				const a = Math.min(t - n, s - c);
				r.set(e.slice(c, c + a), n);
				n += a;
				c += a;
				if (t && t === n) {
					yield r;
					r = null;
					t = 0;
					n = 0;
				}
			}
		}
	};
	return { [Symbol.asyncIterator]: iterator };
}
var init_getChunkedStream = __esmMin((() => {}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/getUnmarshalledStream.js
function getUnmarshalledStream(e, t) {
	const n = getMessageUnmarshaller(t.deserializer, t.toUtf8);
	return { [Symbol.asyncIterator]: async function* () {
		for await (const r of e) {
			const e = t.eventStreamCodec.decode(r);
			const i = await n(e);
			if (i === void 0) continue;
			yield i;
		}
	} };
}
function getMessageUnmarshaller(e, t) {
	return async function(n) {
		const { value: r } = n.headers[":message-type"];
		if (r === "error") {
			const e = new Error(n.headers[":error-message"].value || "UnknownError");
			e.name = n.headers[":error-code"].value;
			throw e;
		} else if (r === "exception") {
			const r = n.headers[":exception-type"].value;
			const i = await e({ [r]: n });
			if (i.$unknown) {
				const e = new Error(t(n.body));
				e.name = r;
				throw e;
			}
			throw i[r];
		} else if (r === "event") {
			const t = await e({ [n.headers[":event-type"].value]: n });
			if (t.$unknown) return;
			return t;
		} else throw Error(`Unrecognizable event type: ${n.headers[":event-type"].value}`);
	};
}
var init_getUnmarshalledStream = __esmMin((() => {}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/EventStreamMarshaller.js
var EventStreamMarshaller$1, eventStreamSerdeProvider$1;
var init_EventStreamMarshaller$1 = __esmMin((() => {
	init_EventStreamCodec();
	init_MessageDecoderStream();
	init_MessageEncoderStream();
	init_SmithyMessageDecoderStream();
	init_SmithyMessageEncoderStream();
	init_getChunkedStream();
	init_getUnmarshalledStream();
	EventStreamMarshaller$1 = class {
		eventStreamCodec;
		utfEncoder;
		constructor({ utf8Encoder: e, utf8Decoder: t }) {
			this.eventStreamCodec = new EventStreamCodec(e, t);
			this.utfEncoder = e;
		}
		deserialize(e, t) {
			const n = getChunkedStream(e);
			return new SmithyMessageDecoderStream({
				messageStream: new MessageDecoderStream({
					inputStream: n,
					decoder: this.eventStreamCodec
				}),
				deserializer: getMessageUnmarshaller(t, this.utfEncoder)
			});
		}
		serialize(e, t) {
			return new MessageEncoderStream({
				messageStream: new SmithyMessageEncoderStream({
					inputStream: e,
					serializer: t
				}),
				encoder: this.eventStreamCodec,
				includeEndFrame: true
			});
		}
	};
	eventStreamSerdeProvider$1 = (e) => new EventStreamMarshaller$1(e);
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde/EventStreamMarshaller.js
async function* readableToIterable(e) {
	let t = false;
	let n = false;
	const r = new Array();
	e.on("error", (e) => {
		if (!t) t = true;
		if (e) throw e;
	});
	e.on("data", (e) => {
		r.push(e);
	});
	e.on("end", () => {
		t = true;
	});
	while (!n) {
		const e = await new Promise((e) => setTimeout(() => e(r.shift()), 0));
		if (e) yield e;
		n = t && r.length === 0;
	}
}
var EventStreamMarshaller, eventStreamSerdeProvider;
var init_EventStreamMarshaller = __esmMin((() => {
	init_EventStreamMarshaller$1();
	EventStreamMarshaller = class {
		universalMarshaller;
		constructor({ utf8Encoder: e, utf8Decoder: t }) {
			this.universalMarshaller = new EventStreamMarshaller$1({
				utf8Decoder: t,
				utf8Encoder: e
			});
		}
		deserialize(e, t) {
			const n = typeof e[Symbol.asyncIterator] === "function" ? e : readableToIterable(e);
			return this.universalMarshaller.deserialize(n, t);
		}
		serialize(e, t) {
			return Readable.from(this.universalMarshaller.serialize(e, t));
		}
	};
	eventStreamSerdeProvider = (e) => new EventStreamMarshaller(e);
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde/utils.js
var readableStreamToIterable, iterableToReadableStream;
var init_utils = __esmMin((() => {
	readableStreamToIterable = (e) => ({ [Symbol.asyncIterator]: async function* () {
		const t = e.getReader();
		try {
			while (true) {
				const { done: e, value: n } = await t.read();
				if (e) return;
				yield n;
			}
		} finally {
			t.releaseLock();
		}
	} });
	iterableToReadableStream = (e) => {
		const t = e[Symbol.asyncIterator]();
		return new ReadableStream({ async pull(e) {
			const { done: n, value: r } = await t.next();
			if (n) return e.close();
			e.enqueue(r);
		} });
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-config-resolver/EventStreamSerdeConfig.js
var resolveEventStreamSerdeConfig;
var init_EventStreamSerdeConfig = __esmMin((() => {
	resolveEventStreamSerdeConfig = (e) => Object.assign(e, { eventStreamMarshaller: e.eventStreamSerdeProvider(e) });
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js
var EventStreamSerde;
var init_EventStreamSerde = __esmMin((() => {
	init_transport();
	init_schema();
	init_serde();
	EventStreamSerde = class {
		marshaller;
		serializer;
		deserializer;
		serdeContext;
		defaultContentType;
		compositeErrorRegistry;
		constructor({ marshaller: e, serializer: t, deserializer: n, serdeContext: r, defaultContentType: i, compositeErrorRegistry: a }) {
			this.marshaller = e;
			this.serializer = t;
			this.deserializer = n;
			this.serdeContext = r;
			this.defaultContentType = i;
			this.compositeErrorRegistry = a;
		}
		async serializeEventStream({ eventStream: e, requestSchema: t, initialRequest: n, initialMessageType: r }) {
			const i = this.marshaller;
			const a = t.getEventStreamMember();
			const o = t.getMemberSchema(a);
			const s = this.serializer;
			const c = this.defaultContentType;
			const l = Symbol("initialRequestMarker");
			const u = { async *[Symbol.asyncIterator]() {
				if (n) {
					const e = {
						":event-type": {
							type: "string",
							value: r ?? "initial-request"
						},
						":message-type": {
							type: "string",
							value: "event"
						},
						":content-type": {
							type: "string",
							value: c
						}
					};
					s.write(t, n);
					const i = s.flush();
					yield {
						[l]: true,
						headers: e,
						body: i
					};
				}
				for await (const t of e) yield t;
			} };
			return i.serialize(u, (e) => {
				if (e[l]) return {
					headers: e.headers,
					body: e.body
				};
				let t = "";
				for (const n in e) {
					if (!hasOwn(e, n)) continue;
					if (n !== "__type") {
						t = n;
						break;
					}
				}
				const { additionalHeaders: n, body: r, eventType: i, explicitPayloadContentType: a } = this.writeEventBody(t, o, e);
				return {
					headers: {
						":event-type": {
							type: "string",
							value: i
						},
						":message-type": {
							type: "string",
							value: "event"
						},
						":content-type": {
							type: "string",
							value: a ?? c
						},
						...n
					},
					body: r
				};
			});
		}
		async deserializeEventStream({ response: e, responseSchema: t, initialResponseContainer: n, initialMessageType: r }) {
			const i = this.marshaller;
			const a = t.getEventStreamMember();
			const o = t.getMemberSchema(a).getMemberSchemas();
			const s = Symbol("initialResponseMarker");
			const c = i.deserialize(e.body, async (e) => {
				let n = "";
				for (const t in e) {
					if (!hasOwn(e, t)) continue;
					if (t !== "__type") {
						n = t;
						break;
					}
				}
				const i = e[n].body;
				if (n === (r ?? "initial-response")) {
					const e = await this.deserializer.read(t, i);
					delete e[a];
					return {
						[s]: true,
						...e
					};
				} else if (n in o) {
					const t = o[n];
					if (t.isStructSchema()) {
						const r = {};
						let a = false;
						for (const [o, s] of t.structIterator()) {
							const { eventHeader: t, eventPayload: c } = s.getMergedTraits();
							a = a || Boolean(t || c);
							if (c) {
								if (s.isBlobSchema()) r[o] = i;
								else if (s.isStringSchema()) r[o] = (this.serdeContext?.utf8Encoder ?? toUtf8$1)(i);
								else if (s.isStructSchema()) r[o] = await this.deserializer.read(s, i);
							} else if (t) {
								const t = e[n].headers[o]?.value;
								if (t != null) {
									if (s.isNumericSchema()) {
										if (t && typeof t === "object" && "bytes" in t) r[o] = BigInt(t.toString());
										else r[o] = Number(t);
									} else r[o] = t;
								}
							}
						}
						return { [n]: await this.readEventMember(t, i, a, r) };
					}
					return { [n]: await this.deserializer.read(t, i) };
				} else return { $unknown: e };
			});
			const l = c[Symbol.asyncIterator]();
			const u = await l.next();
			if (u.done) return c;
			if (u.value?.[s]) {
				if (!t) throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");
				for (const e in u.value) {
					if (!hasOwn(u.value, e)) continue;
					n[e] = u.value[e];
				}
			}
			return { async *[Symbol.asyncIterator]() {
				if (!u?.value?.[s]) yield u.value;
				while (true) {
					const { done: e, value: t } = await l.next();
					if (e) break;
					yield t;
				}
			} };
		}
		async readEventMember(e, t, n, r) {
			let i;
			const a = e.getSchema();
			if (Array.isArray(a) && a[0] === -3) {
				const e = a[1];
				const t = TypeRegistry.for(e);
				this.compositeErrorRegistry?.copyFrom(t);
				i = (this.compositeErrorRegistry ?? t)?.getErrorCtor(a);
			}
			const o = n ? r : t.byteLength === 0 ? {} : await this.deserializer.read(e, t);
			if (i) {
				const t = o.message ?? o.Message ?? "Unknown";
				const n = {};
				const r = e.getMergedTraits().error;
				if (r) n.$fault = r;
				return Object.assign(new i({}), n, { message: t }, o);
			}
			return o;
		}
		writeEventBody(e, t, n) {
			const r = this.serializer;
			let i = e;
			let a = null;
			let o;
			const s = (() => {
				return t.getSchema()[4].includes(e);
			})();
			const c = {};
			if (!s) {
				const [t, a] = n[e];
				i = t;
				r.write(15, a);
			} else {
				const i = t.getMemberSchema(e);
				if (i.isStructSchema()) {
					for (const [t, r] of i.structIterator()) {
						const { eventHeader: i, eventPayload: o } = r.getMergedTraits();
						if (o) a = t;
						else if (i) {
							const i = n[e][t];
							let a = "binary";
							if (r.isNumericSchema()) {
								if ((-2) ** 31 <= i && i <= 2 ** 31 - 1) a = "integer";
								else a = "long";
							} else if (r.isTimestampSchema()) a = "timestamp";
							else if (r.isStringSchema()) a = "string";
							else if (r.isBooleanSchema()) a = "boolean";
							if (i != null) {
								c[t] = {
									type: a,
									value: i
								};
								delete n[e][t];
							}
						}
					}
					if (a !== null) {
						const t = i.getMemberSchema(a);
						if (t.isBlobSchema()) o = "application/octet-stream";
						else if (t.isStringSchema()) o = "text/plain";
						r.write(t, n[e][a]);
					} else r.write(i, n[e]);
				} else if (i.isUnitSchema()) r.write(i, {});
				else throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union.");
			}
			const l = r.flush() ?? /* @__PURE__ */ new Uint8Array();
			return {
				body: typeof l === "string" ? (this.serdeContext?.utf8Decoder ?? fromUtf8$1)(l) : l,
				eventType: i,
				explicitPayloadContentType: o,
				additionalHeaders: c
			};
		}
	};
}));
//#endregion
//#region node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/event-streams/index.js
var event_streams_exports = /* @__PURE__ */ __exportAll({
	EventStreamCodec: () => EventStreamCodec,
	EventStreamMarshaller: () => EventStreamMarshaller,
	EventStreamSerde: () => EventStreamSerde,
	HeaderMarshaller: () => HeaderMarshaller,
	Int64: () => Int64,
	MessageDecoderStream: () => MessageDecoderStream,
	MessageEncoderStream: () => MessageEncoderStream,
	SmithyMessageDecoderStream: () => SmithyMessageDecoderStream,
	SmithyMessageEncoderStream: () => SmithyMessageEncoderStream,
	UniversalEventStreamMarshaller: () => EventStreamMarshaller$1,
	eventStreamSerdeProvider: () => eventStreamSerdeProvider,
	getChunkedStream: () => getChunkedStream,
	getMessageUnmarshaller: () => getMessageUnmarshaller,
	getUnmarshalledStream: () => getUnmarshalledStream,
	iterableToReadableStream: () => iterableToReadableStream,
	readableStreamToIterable: () => readableStreamToIterable,
	resolveEventStreamSerdeConfig: () => resolveEventStreamSerdeConfig,
	universalEventStreamSerdeProvider: () => eventStreamSerdeProvider$1
});
var init_event_streams = __esmMin((() => {
	init_EventStreamCodec();
	init_HeaderMarshaller();
	init_Int64();
	init_MessageDecoderStream();
	init_MessageEncoderStream();
	init_SmithyMessageDecoderStream();
	init_SmithyMessageEncoderStream();
	init_EventStreamMarshaller();
	init_utils();
	init_EventStreamMarshaller$1();
	init_getChunkedStream();
	init_getUnmarshalledStream();
	init_EventStreamSerdeConfig();
	init_EventStreamSerde();
}));
//#endregion
export { init_createChecksumStream as $, translateTraits as $n, init_split_every as $t, init_EventStreamCodec as A, getValueFromTextNode as An, init_config$1 as At, init_Sha256Js as B, decorateServiceException as Bn, init_booleanSelector as Bt, SmithyMessageDecoderStream as C, isArrayBuffer as Cn, getSmithyContext as Cr, resolveDefaultsModeConfig as Ct, MessageDecoderStream as D, makeBuilder as Dn, NODE_REGION_CONFIG_OPTIONS as Dt, init_MessageEncoderStream as E, init_client_command_builder as En, NODE_REGION_CONFIG_FILE_OPTIONS as Et, checksum_exports as F, emitWarningIfUnsupportedVersion as Fn, init_configLoader as Ft, init_serde as G, init_command as Gn, init_toUint8Array as Gt, init_Crc32Node as H, createAggregatedClient as Hn, init_ProviderError as Ht, init_checksum as I, init_emitWarningIfUnsupportedVersion as In, loadConfig as It, init_sdk_stream_mixin as J, TypeRegistry as Jn, init_calculateBodyLength as Jt, serde_exports as K, init_schema as Kn, toUint8Array as Kt, Sha256Node as L, init_defaults_mode as Ln, SelectorType as Lt, init_HeaderMarshaller as M, getDefaultExtensionConfiguration as Mn, init_NodeUseFipsEndpointConfigOptions as Mt, Int64 as N, init_defaultExtensionConfiguration as Nn, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS as Nt, init_MessageDecoderStream as O, NoOpLogger as On, REGION_ENV_NAME as Ot, init_Int64 as P, resolveDefaultRuntimeConfig as Pn, init_NodeUseDualstackEndpointConfigOptions as Pt, createChecksumStream as Q, init_translateTraits as Qn, splitHeader as Qt, init_Sha256Node as R, loadConfigsForDefaultMode as Rn, init_types$1 as Rt, init_SmithyMessageEncoderStream as S, init_is_array_buffer as Sn, init_hasOwn as Sr, init_resolveDefaultsModeConfig as St, MessageEncoderStream as T, init_client as Tn, require_dist_cjs as Tr, resolveRegionConfig as Tt, Uint8ArrayBlobAdapter as U, init_create_aggregated_client as Un, concatBytes as Ut, Crc32Node as V, init_exceptions as Vn, ProviderError as Vt, generateIdempotencyToken as W, Command as Wn, init_concatBytes as Wt, createBufferedReadable as X, NormalizedSchema as Xn, init_NumericValue as Xt, sdkStreamMixin as Y, init_TypeRegistry as Yn, NumericValue as Yt, init_createBufferedReadable as Z, init_NormalizedSchema as Zn, init_split_header as Zt, getUnmarshalledStream as _, toBase64$1 as _n, HttpResponse as _r, init_BinaryDecisionDiagram as _t, init_EventStreamSerdeConfig as a, init_quote_header as an, init_client$1 as ar, resolveEndpoint as at, init_getChunkedStream as b, fromBase64 as bn, init_httpRequest as br, config_exports as bt, iterableToReadableStream as c, init_lazy_json as cn, parseUrl as cr, init_isIpAddress as ct, eventStreamSerdeProvider as d, parseEpochTimestamp as dn, init_normalizeProvider as dr, init_customEndpointFunctions as dt, splitEvery as en, getSchemaSerdePlugin as er, endpoints_exports as et, init_EventStreamMarshaller as f, parseRfc3339DateTimeWithOffset as fn, normalizeProvider as fr, EndpointError as ft, getMessageUnmarshaller as g, init_toBase64 as gn, isValidHostLabel as gr, BinaryDecisionDiagram as gt, init_EventStreamMarshaller$1 as h, toUtf8$1 as hn, init_isValidHostLabel as hr, init_EndpointCache as ht, init_EventStreamSerde as i, init_schema_date_utils as in, Client as ir, init_resolveEndpoint as it, HeaderMarshaller as j, init_get_value_from_text_node as jn, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS as jt, EventStreamCodec as k, init_NoOpLogger as kn, REGION_INI_NAME as kt, readableStreamToIterable as l, dateToUtcString as ln, init_parseQueryString as lr, isIpAddress as lt, eventStreamSerdeProvider$1 as m, init_toUtf8 as mn, isValidHostname as mr, EndpointCache as mt, init_event_streams as n, _parseRfc3339DateTimeWithOffset as nn, deref as nr, init_endpoints as nt, resolveEventStreamSerdeConfig as o, quoteHeader as on, init_transport as or, decideEndpoint as ot, EventStreamMarshaller$1 as p, parseRfc7231DateTime as pn, init_isValidHostname as pr, init_EndpointError as pt, v4 as q, schema_exports as qn, calculateBodyLength as qt, EventStreamSerde as r, _parseRfc7231DateTime as rn, init_deref as rr, resolveEndpointConfig as rt, init_utils as s, LazyJsonString as sn, init_parseUrl as sr, init_decideEndpoint as st, event_streams_exports as t, _parseEpochTimestamp as tn, init_getSchemaSerdePlugin as tr, getEndpointPlugin as tt, EventStreamMarshaller as u, init_date_utils as un, parseQueryString as ur, customEndpointFunctions as ut, init_getUnmarshalledStream as v, fromUtf8$1 as vn, init_httpResponse as vr, init_getEndpointFromInstructions as vt, init_SmithyMessageDecoderStream as w, client_exports as wn, init_getSmithyContext as wr, init_resolveRegionConfig as wt, SmithyMessageEncoderStream as x, init_fromBase64 as xn, hasOwn as xr, init_config as xt, getChunkedStream as y, init_fromUtf8 as yn, HttpRequest as yr, resolveParams as yt, Sha256Js as z, ServiceException as zn, booleanSelector as zt };