UNPKG

@adyen/adyen-platform-experience-web

Version:

![Platform Experience header](https://github.com/Adyen/adyen-platform-experience-web/assets/7926613/18094965-9e01-450e-8dc9-ea84e6b22c2b)

24 lines (23 loc) 621 B
import { uuid as r } from "../../../utils/random/uuid.js"; import { parseDate as a } from "../../../utils/datetime/main.js"; function s(t) { const n = Array.from(t, (e) => String.fromCodePoint(e)).join(""); return btoa(n); } const d = (t) => { try { const n = JSON.stringify(t), e = s(new TextEncoder().encode(n)), o = new URLSearchParams(); return o.set("data", e), o; } catch { return null; } }, m = () => r(), f = (t) => { const n = a(t) ?? Date.now(); return Math.floor(n / 1e3); }; export { s as bytesToBase64, d as encodeAnalyticsEvent, m as getEventInsertId, f as getEventTime };