import { n as fetchWithSsrFGuard } from "./fetch-guard-CbyoCqGG.js";
import "./ssrf-runtime-D3mHp4kB.js";
import { s as DEFAULT_FETCH_TIMEOUT_MS } from "./oauth.shared-DIKXkW_l.js";
//#region extensions/google/oauth.http.ts
async function fetchWithTimeout(url, init, timeoutMs = DEFAULT_FETCH_TIMEOUT_MS) {
	const { response, release } = await fetchWithSsrFGuard({
		url,
		init,
		timeoutMs
	});
	try {
		const body = await response.arrayBuffer();
		return new Response(body, {
			status: response.status,
			statusText: response.statusText,
			headers: response.headers
		});
	} finally {
		await release();
	}
}
//#endregion
export { fetchWithTimeout as t };
