async function installBrowser(opts) {
  const { runWarmup } = await import("../../warmup.js");
  const flags = ["--reranker", "--embeddings"];
  if (opts.browser === "firefox") flags.push("--firefox");
  let error;
  let failed = false;
  const wrappedReporter = {
    ...opts.reporter,
    fail(id, err) {
      failed = true;
      error = err;
      opts.reporter.fail(id, err);
    }
  };
  try {
    await runWarmup(flags, wrappedReporter);
  } catch (err) {
    failed = true;
    error = err instanceof Error ? err.message : String(err);
  }
  return {
    result: failed ? { id: "browser-install", label: "Browser install", status: "failed", error } : { id: "browser-install", label: "Browser install", status: "ok" }
  };
}
export {
  installBrowser
};
//# sourceMappingURL=install-browser.js.map