function u(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)&&Array.isArray(t)){const r=e.length;if(r!==t.length)return!1;for(let n=r;n--!==0;)if(!u(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r]of e.entries())if(!t.has(r))return!1;for(const[r,n]of e.entries())if(!u(n,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e.entries())if(!t.has(r[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){const r=e,n=t,c=r.length;if(c!==n.length)return!1;for(let i=c;i--!==0;)if(r[i]!==n[i])return!1;return!0}if(e instanceof RegExp&&t instanceof RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const l=e,f=t,s=Object.keys(l),o=s.length;if(o!==Object.keys(f).length)return!1;for(let r=o;r--!==0;)if(!Object.prototype.hasOwnProperty.call(f,s[r]))return!1;for(let r=o;r--!==0;){const n=s[r];if(!u(l[n],f[n]))return!1}return!0}return e!==e&&t!==t}export{u as deepEqual};
