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