import e from"./get.mjs";function t(e,n,r,i){if(!n.length)return r;let[a,...o]=n,s;return s=!e&&typeof a==`number`?[]:Array.isArray(e)?[...e]:{...e},i&&r===void 0&&o.length===1?delete s[a][o[0]]:s[a]=t(s[a],o,r,i),s}function n(n,r,i,a=!1){return r.length&&a&&i===void 0&&!e(n,r.slice(0,-1))?n:t(n,r,i,a)}export{n as default};