import{isString as n}from"../../../../../utils/string/is-string.js";import{removePii as e}from"./remove-pii.js";function m(r){if(!n(r))return r;try{const t=new URL(r,"http://example.com");for(const[i,s]of t.searchParams.entries()){const a=String(e(s));t.searchParams.set(i,a)}return r.startsWith("http://")||r.startsWith("https://")?t.toString():t.pathname+t.search+t.hash}catch{return String(e(r))}}export{m as removePiiFromUrl};
