import{d as s,M as c}from"./helpers.BYd0a-KO.js";import{i as f,t as p}from"./toString.CPCYjjV1.js";var l=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,m=/^\w*$/;function y(n,r){if(s(n))return!1;var t=typeof n;return t=="number"||t=="symbol"||t=="boolean"||n==null||f(n)?!0:m.test(n)||!l.test(n)||r!=null&&n in Object(r)}var h="Expected a function";function o(n,r){if(typeof n!="function"||r!=null&&typeof r!="function")throw new TypeError(h);var t=function(){var e=arguments,i=r?r.apply(this,e):e[0],a=t.cache;if(a.has(i))return a.get(i);var u=n.apply(this,e);return t.cache=a.set(i,u)||a,u};return t.cache=new(o.Cache||c),t}o.Cache=c;var _=500;function g(n){var r=o(n,function(e){return t.size===_&&t.clear(),e}),t=r.cache;return r}var d=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,E=/\\(\\)?/g,C=g(function(n){var r=[];return n.charCodeAt(0)===46&&r.push(""),n.replace(d,function(t,e,i,a){r.push(i?a.replace(E,"$1"):e||t)}),r});function I(n,r){return s(n)?n:y(n,r)?[n]:C(p(n))}var P=1/0;function x(n){if(typeof n=="string"||f(n))return n;var r=n+"";return r=="0"&&1/n==-P?"-0":r}function A(n,r){r=I(r,n);for(var t=0,e=r.length;n!=null&&t<e;)n=n[x(r[t++])];return t&&t==e?n:void 0}function T(n,r,t){var e=n==null?void 0:A(n,r);return e===void 0?t:e}export{A as b,I as c,T as g,y as i,o as m,x as t};
