import{S as E,a as m,k as p,c as I,i as M,d as _}from"./_baseIsEqual.8f3c5dea.js";import{a as C,i as P}from"./_MapCache.e1952f2e.js";import{g as L}from"./get.96cc1b46.js";import{c as w,d as A,e as O,b as y}from"./_baseGet.b8f437ea.js";import{i as D}from"./_baseAssignValue.46c694f0.js";var G=1,x=2;function F(n,r,i,e){var t=i.length,u=t,s=!e;if(n==null)return!u;for(n=Object(n);t--;){var f=i[t];if(s&&f[2]?f[1]!==n[f[0]]:!(f[0]in n))return!1}for(;++t<u;){f=i[t];var a=f[0],l=n[a],g=f[1];if(s&&f[2]){if(l===void 0&&!(a in n))return!1}else{var h=new E;if(e)var o=e(l,g,a,n,r,h);if(!(o===void 0?m(g,l,G|x,e,h):o))return!1}}return!0}function R(n){return n===n&&!C(n)}function S(n){for(var r=p(n),i=r.length;i--;){var e=r[i],t=n[e];r[i]=[e,t,R(t)]}return r}function d(n,r){return function(i){return i==null?!1:i[n]===r&&(r!==void 0||n in Object(i))}}function v(n){var r=S(n);return r.length==1&&r[0][2]?d(r[0][0],r[0][1]):function(i){return i===n||F(i,n,r)}}function K(n,r){return n!=null&&r in Object(n)}function N(n,r,i){r=w(r,n);for(var e=-1,t=r.length,u=!1;++e<t;){var s=A(r[e]);if(!(u=n!=null&&i(n,s)))break;n=n[s]}return u||++e!=t?u:(t=n==null?0:n.length,!!t&&I(t)&&M(s,t)&&(P(n)||_(n)))}function T(n,r){return n!=null&&N(n,r,K)}var U=1,$=2;function q(n,r){return O(n)&&R(r)?d(A(n),r):function(i){var e=L(i,n);return e===void 0&&e===r?T(i,n):m(r,e,U|$)}}function H(n){return function(r){return r?.[n]}}function c(n){return function(r){return y(r,n)}}function B(n){return O(n)?H(A(n)):c(n)}function Z(n){return typeof n=="function"?n:n==null?D:typeof n=="object"?P(n)?q(n[0],n[1]):v(n):B(n)}export{Z as b};
