function createDevelopmentServerBaseUrl(e){let t=new URL(e);return t.hash=``,t.search=``,t.pathname.endsWith(`/`)||(t.pathname=`${t.pathname}/`),t}function resolveDevelopmentServerResourceUrl(e){let t=e.resource.trim();try{return new URL(t)}catch{return new URL(t.replace(/^\/+/,``),createDevelopmentServerBaseUrl(e.serverUrl))}}export{resolveDevelopmentServerResourceUrl};