UNPKG

@braze/web-sdk

Version:

Braze SDK for web sites and other JS platforms.

26 lines (25 loc) 773 B
import r from "../managers/braze-instance.js"; import { logger as N, IndexedDBAdapter as et } from "../../shared-lib/index.js"; import ot from "../triggers/models/trigger-events.js"; import { TriggersProviderFactory as rt } from "../triggers/triggers-provider-factory.js"; export function openSession() { if (!r.rr()) return; const i = r.nn(); if (!i) return; i.openSession(); const t = et.Ds.Us, o = new et(t, N); o.jr(t.Ls.hr, (r, n) => { const e = n.lastClick, s = n.trackingString; N.info(`Firing push click trigger from ${s} push click at ${e}`); const c = i.br(e, s), g = function () { rt.m().Ce(ot.kr, [s], c); }; i.vr(g, g), o.ge(t.Ls.hr, r); }), o.As(t.Ls.$r, function (r) { i.wr(r); }); }