import { z } from "zod";
import { C as CAL_URL, A as AVATAR_FALLBACK } from "./orgDomains-eTg-cjth.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
};
