function r(t){if(!t)return null;const n=typeof t=="string"?t:t.url;if(!n)return null;const u=n.match(/github\.com[/:]([^/]+)\/([^/]+?)(?:\.git)?\/?$/);return u?{owner:u[1]||"",repo:u[2]||""}:null}function a(t){const n=r(t);if(!n)return null;const u=`https://github.com/${n.owner}.png`;return`https://images.weserv.nl/?url=${encodeURIComponent(u)}&output=webp`}export{r as e,a as g};
