{"version":3,"names":["getCookie","cookieName","cookie","document","split","forEach","el","key","value","trim","setCookie","cookieValue","expirationDays","expiryDate","date","Date","setTime","getTime","toUTCString"],"sources":["./web-components/services/cookies/cookies.ts"],"sourcesContent":["export function getCookie(cookieName: string) {\r\n\tconst cookie = {};\r\n\tdocument.cookie.split(';').forEach((el) => {\r\n\t\tconst [key, value] = el.split('=');\r\n\t\tcookie[key.trim()] = value;\r\n\t});\r\n\treturn cookie[cookieName];\r\n}\r\n\r\nexport function setCookie(cookieName: string, cookieValue: string, expirationDays: number) {\r\n\tlet expiryDate = '';\r\n\tif (expirationDays) {\r\n\t\tconst date = new Date();\r\n\t\tdate.setTime(date.getTime() + expirationDays * 24 * 60 * 60 * 1000);\r\n\t\texpiryDate = `; expires= \"${date.toUTCString()}`;\r\n\t}\r\n\r\n\tdocument.cookie = `${cookieName}=${cookieValue}${expiryDate}; path=/ `;\r\n}\r\n"],"mappings":"SAAgBA,UAAUC;EACzB,MAAMC,IAAS;EACfC,SAASD,OAAOE,MAAM,KAAKC,SAASC;IACnC,OAAOC,GAAKC,KAASF,EAAGF,MAAM;IAC9BF,EAAOK,EAAIE,UAAUD;AAAK;EAE3B,OAAON,EAAOD;AACf;;SAEgBS,UAAUT,GAAoBU,GAAqBC;EAClE,IAAIC,IAAa;EACjB,IAAID,GAAgB;IACnB,MAAME,IAAO,IAAIC;IACjBD,EAAKE,QAAQF,EAAKG,YAAYL,IAAiB,KAAK,KAAK,KAAK;IAC9DC,IAAa,eAAeC,EAAKI;;EAGlCf,SAASD,SAAS,GAAGD,KAAcU,IAAcE;AAClD"}