const e=require("./warning.js");function t(t,n,r=!1){let i=new Set;function a(t,n,o=1){let s=i.has(t);if(e.default(!s,`Warning: There may be circular references`),s)return!1;if(t===n)return!0;if(r&&o>1)return!1;i.add(t);let c=o+1;if(Array.isArray(t)){if(!Array.isArray(n)||t.length!==n.length)return!1;for(let e=0;e<t.length;e++)if(!a(t[e],n[e],c))return!1;return!0}if(t&&n&&typeof t==`object`&&typeof n==`object`){let e=Object.keys(t);return e.length===Object.keys(n).length&&e.every(e=>a(t[e],n[e],c))}return!1}return a(t,n)}exports.default=t;