const t=t=>{let n;try{n=new URL(t)}catch(t){return!1}return"http:"===n.protocol||"https:"===n.protocol},n=t=>{const n=window.location.search;return new URLSearchParams(n).get(t)},r=(t,n,r)=>(t||[]).sort(((t,l)=>-1===r.indexOf(null==t?void 0:t[n])?1:-1===r.indexOf(null==l?void 0:l[n])?-1:r.indexOf(null==t?void 0:t[n])-r.indexOf(null==l?void 0:l[n])));export{n as g,t as i,r as s}