"use strict";
const z = require("zod");
const index = require("./user-v6mfWQ2d.cjs");
const getUserAvatarUrl = (user) => {
  if (user?.avatarUrl) {
    const isAbsoluteUrl = z.z.string().url().safeParse(user.avatarUrl).success;
    if (isAbsoluteUrl) {
      return user.avatarUrl;
    } else {
      return index.CAL_URL + user.avatarUrl;
    }
  }
  return index.CAL_URL + index.AVATAR_FALLBACK;
};
exports.getUserAvatarUrl = getUserAvatarUrl;
