import{B as g,h as R,A as h,a as P}from"./helpers.2304d5ee.js";import{b as c}from"./_baseIsEqual.fbe0f200.js";import{k as E}from"./_getTag.f48446e8.js";import{i as l,t as p,g as O,b as L}from"./_baseSet.a2dfaed5.js";import{h as M}from"./_basePickBy.a75ee359.js";var C=1,I=2;function b(n,r,t,e){var i=t.length,o=i;if(n==null)return!o;for(n=Object(n);i--;){var u=t[i];if(u[2]?u[1]!==n[u[0]]:!(u[0]in n))return!1}for(;++i<o;){u=t[i];var s=u[0],f=n[s],A=u[1];if(u[2]){if(f===void 0&&!(s in n))return!1}else{var y=new g,a;if(!(a===void 0?c(A,f,C|I,e,y):a))return!1}}return!0}function _(n){return n===n&&!R(n)}function d(n){for(var r=E(n),t=r.length;t--;){var e=r[t],i=n[e];r[t]=[e,i,_(i)]}return r}function m(n,r){return function(t){return t==null?!1:t[n]===r&&(r!==void 0||n in Object(t))}}function x(n){var r=d(n);return r.length==1&&r[0][2]?m(r[0][0],r[0][1]):function(t){return t===n||b(t,n,r)}}var D=1,G=2;function w(n,r){return l(n)&&_(r)?m(p(n),r):function(t){var e=O(t,n);return e===void 0&&e===r?M(t,n):c(r,e,D|G)}}function F(n){return function(r){return r==null?void 0:r[n]}}function S(n){return function(r){return L(r,n)}}function U(n){return l(n)?F(p(n)):S(n)}function B(n){return typeof n=="function"?n:n==null?h:typeof n=="object"?P(n)?w(n[0],n[1]):x(n):U(n)}export{B as b};
