// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0-or-later // @source: https://gitlab.com/soapbox-pub/ditto/-/tree/f0a3877c function e(e){if(e)try{let t=new URL(e);if(t.protocol===`https:`)return t.href}catch{}}function t(t){let n=e(t);if(n){try{if(new URL(n).host===window.location.host)return}catch{return}return n}}function n(e){try{return new URL(e).hostname.replace(/^www\./,``)}catch{return e}}export{t as n,e as r,n as t}; // @license-end