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