import{C as A}from"./vendor-utils-cJEl_UEd.js";import{r as _}from"./base32-MTP_2iYY.js";import{c as r}from"./index-sNHCLgAE.js";var n=_();function d(e,i,s,o=!1){if(e&&e.startsWith(r.USER_AVATAR_URL_PREFIX)){const R=window.env.apiPrefix||"/";if(s){if(o&&window.blocklet?.serverDid){const t=`https://${n.encode(window.blocklet?.serverDid)}.${r.DEFAULT_DID_DOMAIN}`;return`${A(t,r.USER_AVATAR_PATH_PREFIX,i,e.replace(r.USER_AVATAR_URL_PREFIX,""))}?imageFilter=resize&w=64&h=64`}return`${A(R,r.USER_AVATAR_PATH_PREFIX,e.replace(r.USER_AVATAR_URL_PREFIX,""))}?imageFilter=resize&w=64&h=64`}return`${A(R,r.USER_AVATAR_PATH_PREFIX,i,e.replace(r.USER_AVATAR_URL_PREFIX,""))}?imageFilter=resize&w=64&h=64`}return e}const l=(e,i)=>e.nodeOwner&&e.nodeOwner.did===i,w=(e,i)=>e&&e.did===i;export{w as a,l as i,d as p};
