import{normalize as o,resolve as t,sep as r,join as n}from"node:path";import{lstatSync as e}from"node:fs";function f(f,i,s){const d=o(f),m=t(i,d);return f.endsWith(r)||e(m,{throwIfNoEntry:!1})?.isDirectory()?n(m,s):m}export{f as default};