function a(t){const e=t.split("?")[1];return e?Object.fromEntries(e.split("&").map(r=>{const[n,o]=r.split("=");return[n,decodeURIComponent(o||"")]})):{}}function s(t){try{let e;if(t.startsWith("/"))e=t.split("?")[0];else try{e=new URL(t).pathname}catch{e=t.split("?")[0]}return e.split("/").filter(n=>n.length>0)}catch{return[]}}function i(t){return s(t).pop()||""}function u(t){return s(t)[1]||""}export{i as a,s as b,a as g,u as r};