UNPKG

@braze/web-sdk

Version:

Braze SDK for web sites and other JS platforms.

25 lines (24 loc) 560 B
import r from "../managers/braze-instance.js"; import sr from "./dust-provider-factory.js"; export function subscribeToDust() { const t = r.l(), n = r.nn(); if (!t || !n) return null; const o = sr.o(), s = () => { if (!o.Lt()) { o.ln(); const r = n.rn(() => { t.fn() && o.mn(); }); return r && o.$t(r), o.un() && o.en(), r; } return o.Lt(); }; return ( t.Tr(() => { r.ao() && (t.fn() ? (o.mn(), s()) : (o.sn(), o.un() && o.Ye())); }), t.fn() ? s() : null ); }