text: define(["exports","./index.js"],function(_exports,_index){let isUrlAvailable,urlDocument,urlBase,urlAnchor;Object.defineProperty(_exports,"__esModule",{value:!0}),Object.defineProperty(_exports,"Router",{enumerable:!0,get:function(){return _index.Router}}),Object.defineProperty(_exports,"Resolver",{enumerable:!0,get:function(){return _index.Resolver}}),_index.Resolver.__ensureUrlAvailableOrPolyfilled=()=>{if(void 0===isUrlAvailable){try{const url=new URL("b","http://a");url.pathname="c",isUrlAvailable="http://a/c"===url.href}catch(e){isUrlAvailable=!1}isUrlAvailable||(urlDocument=document.implementation.createHTMLDocument("url"),urlBase=urlDocument.createElement("base"),urlDocument.head.appendChild(urlBase),(urlAnchor=urlDocument.createElement("a")).origin||(Object.defineProperty(urlAnchor,"origin",{get:()=>{const protocol=urlAnchor.protocol,port=urlAnchor.port;return`${protocol}//${"http:"===protocol&&"80"===port||"https:"===protocol&&"443"===port?urlAnchor.hostname:urlAnchor.host}`}}),Object.defineProperty(urlAnchor,"pathname",{get:()=>urlAnchor.href.slice(urlAnchor.origin.length)})))}},_index.Resolver.__createUrl=(path,base)=>(_index.Resolver.__ensureUrlAvailableOrPolyfilled(),isUrlAvailable?new URL(path,base):(urlBase.href=base,urlAnchor.href=path.replace(/ /g,"%20"),urlAnchor.href=urlAnchor.href,urlAnchor))});