import{i as e,r as t,t as n}from"./isObject-BNleAbAq.js";import{C as r,E as i,M as a,P as o,T as s,h as c,i as l,n as u,t as d,v as f,x as p,y as m}from"./isArrayLikeObject-CpNOZLZH.js";import{a as h,i as g,l as _,n as v,o as y,s as b,t as x,u as S}from"./_initCloneObject-BuQ4-jhh.js";function C(e,t,r){if(!n(r))return!1;var a=typeof t;return(a==`number`?p(r)&&i(t,r.length):a==`string`&&t in r)?s(r[t],e):!1}function w(e){return r(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a==`function`?(i--,a):void 0,o&&C(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}var T=`[object Object]`,E=Function.prototype,D=Object.prototype,O=E.toString,k=D.hasOwnProperty,A=O.call(Object);function j(n){if(!t(n)||e(n)!=T)return!1;var r=h(n);if(r===null)return!0;var i=k.call(r,`constructor`)&&r.constructor;return typeof i==`function`&&i instanceof i&&O.call(i)==A}function M(e,t,n){(n!==void 0&&!s(e[t],n)||n===void 0&&!(t in e))&&_(e,t,n)}function N(e,t){if(!(t===`constructor`&&typeof e[t]==`function`)&&t!=`__proto__`)return e[t]}function P(e){return b(e,y(e))}function F(e,t,r,i,s,l,u){var p=N(e,r),h=N(t,r),_=u.get(h);if(_){M(e,r,_);return}var y=l?l(p,h,r+``,e,t,u):void 0,b=y===void 0;if(b){var C=o(h),w=!C&&f(h),T=!C&&!w&&c(h);y=h,C||w||T?o(p)?y=p:d(p)?y=S(p):w?(b=!1,y=g(h,!0)):T?(b=!1,y=v(h,!0)):y=[]:j(h)||m(h)?(y=p,m(p)?y=P(p):(!n(p)||a(p))&&(y=x(h))):b=!1}b&&(u.set(h,y),s(y,h,i,l,u),u.delete(h)),M(e,r,y)}function I(e,t,r,i,a){e!==t&&u(t,function(o,s){if(a||=new l,n(o))F(e,t,s,r,I,i,a);else{var c=i?i(N(e,s),o,s+``,e,t,a):void 0;c===void 0&&(c=o),M(e,s,c)}},y)}var L=w(function(e,t,n){I(e,t,n)});export{C as i,I as n,w as r,L as t};