import e from"node:fs";import t from"node:path";function n(e,n){let r=t.resolve(e),i=t.resolve(n),a=t.relative(r,i);return a===``||!a.startsWith(`..${t.sep}`)&&a!==`..`&&!t.isAbsolute(a)}function r(t){try{return e.realpathSync(t)}catch{return null}}function i(e,t,i){if(!n(e,t))return!1;let a=r(e),o=r(t);return!a||!o?i?.requireRealpath!==!0:n(a,o)}function a(e){return e.split(/[\\/]+/).filter(Boolean).some(e=>e===`node_modules`||e.startsWith(`.`)&&e!==`.`&&e!==`..`)}export{n,i as r,a as t};
