function getCookie(name:string) { return ('; '+document.cookie).split(`; ${name}=`).pop()?.split(';')[0] }