const t=(t,e)=>{let r=t;return e.split(".").forEach((t=>{r&&(r=r[t])})),r},e=(e,r,n)=>{var o;return"name"!==r.id||e.name?(null==n?void 0:n.includes("."))?t(e,n):(null===(o=null==r?void 0:r.id)||void 0===o?void 0:o.includes("."))?t(e,r.id):r?e[r.id]:e[n]:`${e.user.firstName} ${e.user.lastName}`};function r(t,e){return t[e]}class n{static decode(t){return Object.assign(Object.create(n.prototype),t)}toObject(){return JSON.parse(JSON.stringify(this))}toDBRef(t){return{_ref:t,_id:this._id}}}n.decodeList=(t=[])=>t.map((t=>n.decode(t)));export{n as D,e as a,r as g}