params.597cd0f5.js
500 Bytes
const i=o=>(o||document.location.search).replace(/(^\?)/,"").split("&").map(function(n){return n=n.split("="),this[n[0]]=n[1],this}.bind({}))[0],u=(o,n)=>{n=n||document.location.href;const s=n.split("#"),r=s[0].split("?");if(2>r.length)return n;const a=encodeURIComponent(o)+"=",t=r[1].split(/[&;]/g);for(let e=t.length;0<e--;)t[e].lastIndexOf(a,0)!==-1&&t.splice(e,1);const c=s[1]?"#"+s[1]:"",l=r[0]+(0<t.length?"?"+t.join("&"):"")+c;window.history.replaceState(null,null,l)};export{i as g,u as r};