import { z } from "zod";
import { F as CAL_URL, G as AVATAR_FALLBACK } from "./user--mpkKOwW.js";
const getUserAvatarUrl = (user) => {
  if (user?.avatarUrl) {
    const isAbsoluteUrl = z.string().url().safeParse(user.avatarUrl).success;
    if (isAbsoluteUrl) {
      return user.avatarUrl;
    } else {
      return CAL_URL + user.avatarUrl;
    }
  }
  return CAL_URL + AVATAR_FALLBACK;
};
export {
  getUserAvatarUrl as g
};
