@streamlayer/react 1.7.0 → 1.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -827,7 +827,7 @@ function gl() {
827
827
  }
828
828
  };
829
829
  }
830
- const pe = gl();
830
+ const Te = gl();
831
831
  var h;
832
832
  (function(e) {
833
833
  e[e.DOUBLE = 1] = "DOUBLE", e[e.FLOAT = 2] = "FLOAT", e[e.INT64 = 3] = "INT64", e[e.UINT64 = 4] = "UINT64", e[e.INT32 = 5] = "INT32", e[e.FIXED64 = 6] = "FIXED64", e[e.FIXED32 = 7] = "FIXED32", e[e.BOOL = 8] = "BOOL", e[e.STRING = 9] = "STRING", e[e.BYTES = 12] = "BYTES", e[e.UINT32 = 13] = "UINT32", e[e.SFIXED32 = 15] = "SFIXED32", e[e.SFIXED64 = 16] = "SFIXED64", e[e.SINT32 = 17] = "SINT32", e[e.SINT64 = 18] = "SINT64";
@@ -866,7 +866,7 @@ function Pt(e, t) {
866
866
  case h.INT64:
867
867
  case h.SFIXED64:
868
868
  case h.SINT64:
869
- return t == 0 ? pe.zero : "0";
869
+ return t == 0 ? Te.zero : "0";
870
870
  case h.DOUBLE:
871
871
  case h.FLOAT:
872
872
  return 0;
@@ -1020,35 +1020,35 @@ class kl {
1020
1020
  * Write a `fixed64` value, a signed, fixed-length 64-bit integer.
1021
1021
  */
1022
1022
  sfixed64(t) {
1023
- let n = new Uint8Array(8), a = new DataView(n.buffer), s = pe.enc(t);
1023
+ let n = new Uint8Array(8), a = new DataView(n.buffer), s = Te.enc(t);
1024
1024
  return a.setInt32(0, s.lo, !0), a.setInt32(4, s.hi, !0), this.raw(n);
1025
1025
  }
1026
1026
  /**
1027
1027
  * Write a `fixed64` value, an unsigned, fixed-length 64 bit integer.
1028
1028
  */
1029
1029
  fixed64(t) {
1030
- let n = new Uint8Array(8), a = new DataView(n.buffer), s = pe.uEnc(t);
1030
+ let n = new Uint8Array(8), a = new DataView(n.buffer), s = Te.uEnc(t);
1031
1031
  return a.setInt32(0, s.lo, !0), a.setInt32(4, s.hi, !0), this.raw(n);
1032
1032
  }
1033
1033
  /**
1034
1034
  * Write a `int64` value, a signed 64-bit varint.
1035
1035
  */
1036
1036
  int64(t) {
1037
- let n = pe.enc(t);
1037
+ let n = Te.enc(t);
1038
1038
  return na(n.lo, n.hi, this.buf), this;
1039
1039
  }
1040
1040
  /**
1041
1041
  * Write a `sint64` value, a signed, zig-zag-encoded 64-bit varint.
1042
1042
  */
1043
1043
  sint64(t) {
1044
- let n = pe.enc(t), a = n.hi >> 31, s = n.lo << 1 ^ a, o = (n.hi << 1 | n.lo >>> 31) ^ a;
1044
+ let n = Te.enc(t), a = n.hi >> 31, s = n.lo << 1 ^ a, o = (n.hi << 1 | n.lo >>> 31) ^ a;
1045
1045
  return na(s, o, this.buf), this;
1046
1046
  }
1047
1047
  /**
1048
1048
  * Write a `uint64` value, an unsigned 64-bit varint.
1049
1049
  */
1050
1050
  uint64(t) {
1051
- let n = pe.uEnc(t);
1051
+ let n = Te.uEnc(t);
1052
1052
  return na(n.lo, n.hi, this.buf), this;
1053
1053
  }
1054
1054
  }
@@ -1127,20 +1127,20 @@ class hl {
1127
1127
  * Read a `int64` field, a signed 64-bit varint.
1128
1128
  */
1129
1129
  int64() {
1130
- return pe.dec(...this.varint64());
1130
+ return Te.dec(...this.varint64());
1131
1131
  }
1132
1132
  /**
1133
1133
  * Read a `uint64` field, an unsigned 64-bit varint.
1134
1134
  */
1135
1135
  uint64() {
1136
- return pe.uDec(...this.varint64());
1136
+ return Te.uDec(...this.varint64());
1137
1137
  }
1138
1138
  /**
1139
1139
  * Read a `sint64` field, a signed, zig-zag-encoded 64-bit varint.
1140
1140
  */
1141
1141
  sint64() {
1142
1142
  let [t, n] = this.varint64(), a = -(t & 1);
1143
- return t = (t >>> 1 | (n & 1) << 31) ^ a, n = n >>> 1 ^ a, pe.dec(t, n);
1143
+ return t = (t >>> 1 | (n & 1) << 31) ^ a, n = n >>> 1 ^ a, Te.dec(t, n);
1144
1144
  }
1145
1145
  /**
1146
1146
  * Read a `bool` field, a variant.
@@ -1165,13 +1165,13 @@ class hl {
1165
1165
  * Read a `fixed64` field, an unsigned, fixed-length 64 bit integer.
1166
1166
  */
1167
1167
  fixed64() {
1168
- return pe.uDec(this.sfixed32(), this.sfixed32());
1168
+ return Te.uDec(this.sfixed32(), this.sfixed32());
1169
1169
  }
1170
1170
  /**
1171
1171
  * Read a `fixed64` field, a signed, fixed-length 64-bit integer.
1172
1172
  */
1173
1173
  sfixed64() {
1174
- return pe.dec(this.sfixed32(), this.sfixed32());
1174
+ return Te.dec(this.sfixed32(), this.sfixed32());
1175
1175
  }
1176
1176
  /**
1177
1177
  * Read a `float` field, 32-bit floating point number.
@@ -1649,13 +1649,13 @@ function jt(e, t, n, a) {
1649
1649
  case h.SINT64:
1650
1650
  if (typeof t != "number" && typeof t != "string")
1651
1651
  break;
1652
- const r = pe.parse(t);
1652
+ const r = Te.parse(t);
1653
1653
  return n ? r.toString() : r;
1654
1654
  case h.FIXED64:
1655
1655
  case h.UINT64:
1656
1656
  if (typeof t != "number" && typeof t != "string")
1657
1657
  break;
1658
- const c = pe.uParse(t);
1658
+ const c = Te.uParse(t);
1659
1659
  return n ? c.toString() : c;
1660
1660
  case h.BOOL:
1661
1661
  if (typeof t != "boolean")
@@ -2395,7 +2395,7 @@ var ao;
2395
2395
  })(ao || (ao = {}));
2396
2396
  class ye extends en {
2397
2397
  constructor(t) {
2398
- super(), this.seconds = pe.zero, this.nanos = 0, i.util.initPartial(t, this);
2398
+ super(), this.seconds = Te.zero, this.nanos = 0, i.util.initPartial(t, this);
2399
2399
  }
2400
2400
  fromJson(t, n) {
2401
2401
  if (typeof t != "string")
@@ -2408,7 +2408,7 @@ class ye extends en {
2408
2408
  throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string");
2409
2409
  if (s < Date.parse("0001-01-01T00:00:00Z") || s > Date.parse("9999-12-31T23:59:59Z"))
2410
2410
  throw new Error("cannot decode message google.protobuf.Timestamp from JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive");
2411
- return this.seconds = pe.parse(s / 1e3), this.nanos = 0, a[7] && (this.nanos = parseInt("1" + a[7] + "0".repeat(9 - a[7].length)) - 1e9), this;
2411
+ return this.seconds = Te.parse(s / 1e3), this.nanos = 0, a[7] && (this.nanos = parseInt("1" + a[7] + "0".repeat(9 - a[7].length)) - 1e9), this;
2412
2412
  }
2413
2413
  toJson(t) {
2414
2414
  const n = Number(this.seconds) * 1e3;
@@ -2432,7 +2432,7 @@ class ye extends en {
2432
2432
  static fromDate(t) {
2433
2433
  const n = t.getTime();
2434
2434
  return new ye({
2435
- seconds: pe.parse(Math.floor(n / 1e3)),
2435
+ seconds: Te.parse(Math.floor(n / 1e3)),
2436
2436
  nanos: n % 1e3 * 1e6
2437
2437
  });
2438
2438
  }
@@ -2658,7 +2658,7 @@ const Kl = /* @__PURE__ */ i.makeEnum(
2658
2658
  { no: 1, name: "SCREEN_ORIENTATION_PORTRAIT", localName: "PORTRAIT" },
2659
2659
  { no: 2, name: "SCREEN_ORIENTATION_LANDSCAPE", localName: "LANDSCAPE" }
2660
2660
  ]
2661
- ), de = /* @__PURE__ */ i.makeEnum(
2661
+ ), pe = /* @__PURE__ */ i.makeEnum(
2662
2662
  "streamlayer.analytics.v1.common.TopicType",
2663
2663
  [
2664
2664
  { no: 0, name: "TOPIC_TYPE_UNSET", localName: "UNSET" },
@@ -12324,9 +12324,9 @@ const vo = 1, Ao = 2, wo = 3, ia = 4, Ro = (e, t) => {
12324
12324
  { no: 5, name: "session_id", kind: "scalar", T: 9, opt: !0 },
12325
12325
  { no: 6, name: "overlay_session_id", kind: "scalar", T: 9, opt: !0 },
12326
12326
  { no: 7, name: "topic_id", kind: "scalar", T: 9, opt: !0 },
12327
- { no: 8, name: "topic_type", kind: "enum", T: i.getEnumType(de), opt: !0 },
12327
+ { no: 8, name: "topic_type", kind: "enum", T: i.getEnumType(pe), opt: !0 },
12328
12328
  { no: 9, name: "parent_topic_id", kind: "scalar", T: 9, opt: !0 },
12329
- { no: 10, name: "parent_topic_type", kind: "enum", T: i.getEnumType(de), opt: !0 },
12329
+ { no: 10, name: "parent_topic_type", kind: "enum", T: i.getEnumType(pe), opt: !0 },
12330
12330
  { no: 11, name: "participants_count", kind: "scalar", T: 13, opt: !0 },
12331
12331
  { no: 12, name: "route_map", kind: "scalar", T: 9, opt: !0 },
12332
12332
  { no: 13, name: "track_timestamp", kind: "scalar", T: 4, opt: !0 },
@@ -12775,7 +12775,7 @@ class Ue extends $n {
12775
12775
  throw new Error("not implemented");
12776
12776
  }
12777
12777
  }
12778
- const Te = new $g();
12778
+ const de = new $g();
12779
12779
  async function* Jg(e, t) {
12780
12780
  for await (const n of t) {
12781
12781
  e.response.message = n, e.received_at = Date.now(), e.id = Yi++;
@@ -13543,11 +13543,20 @@ const Rk = (e) => {
13543
13543
  }, Lk = (e, t, n) => {
13544
13544
  let a = !1;
13545
13545
  const s = n.transport, o = We("advertisement"), r = new wk(), c = Ee({}), l = vk(e, s), m = () => {
13546
+ var N, E, b;
13546
13547
  c.setKey("hasNotification", !1);
13548
+ const T = c.get(), f = (N = T.data) == null ? void 0 : N.question.id, _ = (b = (E = T.data) == null ? void 0 : E.promotion) == null ? void 0 : b.type;
13549
+ f && de.emit("advertisement", {
13550
+ action: "notification-opened",
13551
+ payload: {
13552
+ id: f,
13553
+ type: _
13554
+ }
13555
+ });
13547
13556
  }, u = () => {
13548
13557
  var E, b, w, v;
13549
13558
  const T = c.get(), f = (E = T.data) == null ? void 0 : E.question.id, _ = (w = (b = T.data) == null ? void 0 : b.promotion) == null ? void 0 : w.type, N = (v = c.get()) == null ? void 0 : v.isOpened;
13550
- f && !N && (o.debug({ id: f }, "markAsViewed: %o"), r.setShowed(f), c.setKey("isOpened", !0), Te.emit("advertisement", {
13559
+ f && !N && (o.debug({ id: f }, "markAsViewed: %o"), r.setShowed(f), c.setKey("isOpened", !0), de.emit("advertisement", {
13551
13560
  action: "opened",
13552
13561
  payload: {
13553
13562
  id: f,
@@ -13581,7 +13590,7 @@ const Rk = (e) => {
13581
13590
  };
13582
13591
  c.subscribe((T, f) => {
13583
13592
  var _, N, E, b;
13584
- T.data && !T.isOpened && Te.emit("advertisement", {
13593
+ T.data && !T.isOpened && de.emit("advertisement", {
13585
13594
  action: "received",
13586
13595
  payload: {
13587
13596
  id: T.data.question.id,
@@ -13590,7 +13599,7 @@ const Rk = (e) => {
13590
13599
  isViewed: !!r.isViewed(T.data.question.id)
13591
13600
  },
13592
13601
  skipAnalytics: T.data.question.id === ((E = f == null ? void 0 : f.data) == null ? void 0 : E.question.id)
13593
- }), !(T != null && T.data) && (f != null && f.data) && Te.emit("advertisement", {
13602
+ }), !(T != null && T.data) && (f != null && f.data) && de.emit("advertisement", {
13594
13603
  action: "closed",
13595
13604
  payload: {
13596
13605
  id: f.data.question.id,
@@ -13795,7 +13804,7 @@ class Pk {
13795
13804
  this.logger.debug({ notificationId: t }, "active queue tick skipped, notification not exist");
13796
13805
  return;
13797
13806
  }
13798
- Te.emit("notification", {
13807
+ de.emit("notification", {
13799
13808
  action: "received",
13800
13809
  payload: {
13801
13810
  questionId: n.data.questionId,
@@ -13820,7 +13829,7 @@ class Pk {
13820
13829
  const r = new Map(this.notificationsList.get());
13821
13830
  r.delete(t), this.notificationsList.set(r);
13822
13831
  const c = this.timeouts.get(t);
13823
- c !== void 0 && (clearTimeout(c), this.timeouts.delete(t)), this.logger.debug({ notificationId: t }, "notification hidden"), s.hiding && Te.emit("notification", {
13832
+ c !== void 0 && (clearTimeout(c), this.timeouts.delete(t)), this.logger.debug({ notificationId: t }, "notification hidden"), s.hiding && de.emit("notification", {
13824
13833
  action: "closed",
13825
13834
  payload: {
13826
13835
  questionId: s.data.questionId,
@@ -13868,7 +13877,7 @@ class Ck {
13868
13877
  if (t.data && t.emitEvent) {
13869
13878
  const n = t.action;
13870
13879
  t.action = (...a) => {
13871
- n && n(...a), Te.emit("notification", {
13880
+ n && n(...a), de.emit("notification", {
13872
13881
  action: "opened",
13873
13882
  payload: {
13874
13883
  questionId: t.data.questionId,
@@ -14262,9 +14271,17 @@ const Ht = new It(), Wk = (e, t, n) => {
14262
14271
  e.ui.disableAppNotification();
14263
14272
  break;
14264
14273
  }
14265
- if (((m = c.slEventBus) == null ? void 0 : m.type) === "advertisement") {
14274
+ if (((m = c.slEventBus) == null ? void 0 : m.type) === "advertisement" && t.withAd) {
14266
14275
  const u = c.slEventBus, { hasNotification: d, id: y, isViewed: T } = u.payload;
14267
14276
  switch (u.action) {
14277
+ case "notification-opened":
14278
+ e.sdk.uiState.set({
14279
+ promotionBanner: !0,
14280
+ promotionNotification: !1,
14281
+ promotionOverlay: !0,
14282
+ promotionSidebar: !0
14283
+ });
14284
+ break;
14268
14285
  case "received":
14269
14286
  if (e.sdk.closeFeature(), a({
14270
14287
  stage: "activate",
@@ -14303,7 +14320,7 @@ const Ht = new It(), Wk = (e, t, n) => {
14303
14320
  break;
14304
14321
  }
14305
14322
  }
14306
- }, o = Te.listen(s), r = e.activeFeature.subscribe((c) => {
14323
+ }, o = de.listen(s), r = e.activeFeature.subscribe((c) => {
14307
14324
  c ? e.ui.enableApp() : e.ui.disableApp();
14308
14325
  });
14309
14326
  return () => {
@@ -14455,7 +14472,7 @@ const ah = (e, t, n, a) => {
14455
14472
  let s = !1;
14456
14473
  const o = new Wi(), r = re(ae.Unset);
14457
14474
  r.subscribe((l) => {
14458
- console.log("onboardingStatus", l), l !== ae.Unset && (l === ae.Optional || l === ae.Required ? s === !1 && (ah(e, t, a, o), s = !0) : e.onboardingProcessed.set(!0), l === ae.Completed && t.activeQuestionId.invalidate(), o.setOnboardingInstantOpen({
14475
+ l !== ae.Unset && (l === ae.Optional || l === ae.Required ? s === !1 && (ah(e, t, a, o), s = !0) : e.onboardingProcessed.set(!0), l === ae.Completed && t.activeQuestionId.invalidate(), o.setOnboardingInstantOpen({
14459
14476
  userId: t.userId.get() || "",
14460
14477
  organizationId: t.organizationId.get() || "",
14461
14478
  eventId: t.slStreamId.get() || ""
@@ -14475,7 +14492,7 @@ const ah = (e, t, n, a) => {
14475
14492
  organizationId: t.organizationId.get() || "",
14476
14493
  userId: t.userId.get() || "",
14477
14494
  eventId: l
14478
- }, ae.Completed), Te.emit("poll", {
14495
+ }, ae.Completed), de.emit("poll", {
14479
14496
  action: "onboardingPassed",
14480
14497
  payload: {}
14481
14498
  }), e.openFeature();
@@ -14558,7 +14575,7 @@ class ch extends Qi {
14558
14575
  });
14559
14576
  p(this, "connect", () => {
14560
14577
  this.onboardingProcessed.subscribe((n) => {
14561
- console.log("onboardingProcessed status", n), n && this.advertisement.connect();
14578
+ n && this.advertisement.connect();
14562
14579
  }), this.cancels.add(this.background.feedSubscription.addListener("feed-subscription-prediction-close", async (n) => {
14563
14580
  var m, u, d, y, T, f, _, N, E, b, w;
14564
14581
  if (!this.isInteractiveAllowed)
@@ -14662,7 +14679,7 @@ class ch extends Qi {
14662
14679
  }
14663
14680
  });
14664
14681
  }
14665
- o === -1 && (a.unshift(s), Te.emit("poll", {
14682
+ o === -1 && (a.unshift(s), de.emit("poll", {
14666
14683
  action: "received",
14667
14684
  payload: {
14668
14685
  questionId: s.id,
@@ -14685,7 +14702,7 @@ class ch extends Qi {
14685
14702
  return;
14686
14703
  const m = l.findIndex((T) => T.id === n), u = l[m], d = ((y = u == null ? void 0 : u.attributes) == null ? void 0 : y.attributes.case) === "question" && u.attributes.attributes.value;
14687
14704
  if (d) {
14688
- Te.emit("poll", {
14705
+ de.emit("poll", {
14689
14706
  action: "voted",
14690
14707
  payload: {
14691
14708
  questionId: n,
@@ -14728,7 +14745,7 @@ class ch extends Qi {
14728
14745
  animateHiding: !1
14729
14746
  });
14730
14747
  let s = (o = a == null ? void 0 : a.attributes) == null ? void 0 : o.type;
14731
- return s || (s = (l = (c = (((r = this.feedList.getStore().value) == null ? void 0 : r.data) || []).find((m) => m.id === n)) == null ? void 0 : c.attributes) == null ? void 0 : l.type), Te.emit("poll", {
14748
+ return s || (s = (l = (c = (((r = this.feedList.getStore().value) == null ? void 0 : r.data) || []).find((m) => m.id === n)) == null ? void 0 : c.attributes) == null ? void 0 : l.type), de.emit("poll", {
14732
14749
  action: "opened",
14733
14750
  payload: {
14734
14751
  questionId: n,
@@ -14993,7 +15010,7 @@ class ph {
14993
15010
  break;
14994
15011
  }
14995
15012
  };
14996
- return Te.listen(n);
15013
+ return de.listen(n);
14997
15014
  });
14998
15015
  }
14999
15016
  }
@@ -15031,7 +15048,7 @@ class Th {
15031
15048
  break;
15032
15049
  }
15033
15050
  };
15034
- return Te.listen(n);
15051
+ return de.listen(n);
15035
15052
  });
15036
15053
  }
15037
15054
  }
@@ -15053,7 +15070,7 @@ class fh {
15053
15070
  ...this.analytics.commonStore.getValues(),
15054
15071
  kind: oe.POLLS_RECEIVED,
15055
15072
  topicId: t,
15056
- topicType: de.POLLS_PROMOTION,
15073
+ topicType: pe.POLLS_PROMOTION,
15057
15074
  topicSubType: n
15058
15075
  },
15059
15076
  pollOpenedFrom: _e.UNSET
@@ -15065,7 +15082,7 @@ class fh {
15065
15082
  ...this.analytics.commonStore.getValues(),
15066
15083
  kind: oe.POLLS_OPENED,
15067
15084
  topicId: t,
15068
- topicType: de.POLLS_PROMOTION,
15085
+ topicType: pe.POLLS_PROMOTION,
15069
15086
  topicSubType: n
15070
15087
  },
15071
15088
  pollOpenedFrom: _e.UNSET
@@ -15128,18 +15145,18 @@ class fh {
15128
15145
  }
15129
15146
  }
15130
15147
  };
15131
- return Te.listen(n);
15148
+ return de.listen(n);
15132
15149
  });
15133
15150
  }
15134
15151
  }
15135
15152
  const Wt = {
15136
- [C.UNSET]: de.UNSET,
15137
- [C.FACTOID]: de.POLLS_INSIGHT,
15138
- [C.POLL]: de.POLLS_POLL,
15139
- [C.PREDICTION]: de.POLLS_PREDICTION,
15140
- [C.PROMOTION]: de.POLLS_PROMOTION,
15141
- [C.TRIVIA]: de.POLLS_TRIVIA,
15142
- [C.TWEET]: de.POLLS_TWITTER
15153
+ [C.UNSET]: pe.UNSET,
15154
+ [C.FACTOID]: pe.POLLS_INSIGHT,
15155
+ [C.POLL]: pe.POLLS_POLL,
15156
+ [C.PREDICTION]: pe.POLLS_PREDICTION,
15157
+ [C.PROMOTION]: pe.POLLS_PROMOTION,
15158
+ [C.TRIVIA]: pe.POLLS_TRIVIA,
15159
+ [C.TWEET]: pe.POLLS_TWITTER
15143
15160
  };
15144
15161
  C.UNSET + "", Le.UNSET, C.FACTOID + "", Le.POLLS, C.POLL + "", Le.POLLS, C.PREDICTION + "", Le.POLLS, C.PROMOTION + "", Le.POLLS, C.TRIVIA + "", Le.POLLS, C.TWEET + "", Le.POLLS;
15145
15162
  const gh = {
@@ -15171,7 +15188,7 @@ class kh {
15171
15188
  ...this.analytics.commonStore.getValues(),
15172
15189
  kind: oe.NOTIFICATION_RECEIVED,
15173
15190
  topicId: t,
15174
- topicType: n ? Wt[n] : de.UNSET
15191
+ topicType: n ? Wt[n] : pe.UNSET
15175
15192
  },
15176
15193
  notificationKind: Le.POLLS,
15177
15194
  notificationType: Ha.IN_APP
@@ -15183,7 +15200,7 @@ class kh {
15183
15200
  ...this.analytics.commonStore.getValues(),
15184
15201
  kind: oe.NOTIFICATION_OPENED,
15185
15202
  topicId: t,
15186
- topicType: n ? Wt[n] : de.UNSET
15203
+ topicType: n ? Wt[n] : pe.UNSET
15187
15204
  },
15188
15205
  notificationKind: Le.POLLS,
15189
15206
  notificationType: Ha.IN_APP
@@ -15202,7 +15219,7 @@ class kh {
15202
15219
  break;
15203
15220
  }
15204
15221
  };
15205
- return Te.listen(n);
15222
+ return de.listen(n);
15206
15223
  });
15207
15224
  }
15208
15225
  }
@@ -15216,7 +15233,7 @@ class hh {
15216
15233
  ...this.analytics.commonStore.getValues(),
15217
15234
  kind: oe.POLLS_RECEIVED,
15218
15235
  topicId: t,
15219
- topicType: n ? Wt[n] : de.UNSET
15236
+ topicType: n ? Wt[n] : pe.UNSET
15220
15237
  },
15221
15238
  pollOpenedFrom: _e.UNSET
15222
15239
  });
@@ -15228,7 +15245,7 @@ class hh {
15228
15245
  ...this.analytics.commonStore.getValues(),
15229
15246
  kind: oe.POLLS_OPENED,
15230
15247
  topicId: t,
15231
- topicType: n ? Wt[n] : de.UNSET
15248
+ topicType: n ? Wt[n] : pe.UNSET
15232
15249
  },
15233
15250
  pollOpenedFrom: a === "list" ? _e.PICK_HISTORY : _e.IN_APP
15234
15251
  });
@@ -15240,7 +15257,7 @@ class hh {
15240
15257
  ...this.analytics.commonStore.getValues(),
15241
15258
  kind: oe.POLLS_VOTE,
15242
15259
  topicId: t,
15243
- topicType: n ? Wt[n] : de.UNSET
15260
+ topicType: n ? Wt[n] : pe.UNSET
15244
15261
  },
15245
15262
  pollOpenedFrom: _e.UNSET
15246
15263
  });
@@ -15287,7 +15304,7 @@ class hh {
15287
15304
  break;
15288
15305
  }
15289
15306
  };
15290
- return Te.listen(n);
15307
+ return de.listen(n);
15291
15308
  });
15292
15309
  }
15293
15310
  }
@@ -17791,7 +17808,11 @@ const W_ = /* @__PURE__ */ bh(K_);
17791
17808
  })();
17792
17809
  function z_(e, t = !0, n = !0, a) {
17793
17810
  const s = t ? "https://grpc-sdk.streamlayer.io:443" : "https://grpc-sdk.next.streamlayer.io:443", o = t ? "https://grpc.streamlayer.io:443" : "https://grpc.next.streamlayer.io:443", r = W_(/* @__PURE__ */ Object.create({}), { autostart: !1 });
17794
- return r.use(Zk), r.use(jk, { onDeepLinkHandled: a == null ? void 0 : a.onDeepLinkHandled }), r.use(zk, { videoPlayerController: a == null ? void 0 : a.videoPlayerController }), r.use(Xk, { onContentActivate: a == null ? void 0 : a.onContentActivate, withAdNotification: a == null ? void 0 : a.withAdNotification }), r.use(dk, { sdkKey: e, host: s, analyticsHost: o, version: a == null ? void 0 : a.version }), r.use(gk), r.use(Wk), r.use(dh), r.use(Uk), r.use(Eh), r.after((c, l, m) => {
17811
+ return r.use(Zk), r.use(jk, { onDeepLinkHandled: a == null ? void 0 : a.onDeepLinkHandled }), r.use(zk, { videoPlayerController: a == null ? void 0 : a.videoPlayerController }), r.use(Xk, {
17812
+ onContentActivate: a == null ? void 0 : a.onContentActivate,
17813
+ withAd: a == null ? void 0 : a.withAd,
17814
+ withAdNotification: a == null ? void 0 : a.withAdNotification
17815
+ }), r.use(dk, { sdkKey: e, host: s, analyticsHost: o, version: a == null ? void 0 : a.version }), r.use(gk), r.use(Wk), r.use(dh), r.use(Uk), r.use(Eh), r.after((c, l, m) => {
17795
17816
  if (c)
17796
17817
  throw c;
17797
17818
  l.ready(), m();
@@ -17811,33 +17832,35 @@ const Z_ = ({
17811
17832
  onDeepLinkHandled: s,
17812
17833
  videoPlayerController: o,
17813
17834
  onContentActivate: r,
17814
- withAdNotification: c
17835
+ withAdNotification: c,
17836
+ withAd: l
17815
17837
  }) => {
17816
- const [l, m] = Dc(null);
17838
+ const [m, u] = Dc(null);
17817
17839
  return Cc(() => {
17818
- let u = !1;
17840
+ let d = !1;
17819
17841
  if (!e)
17820
- return console.error("streamlayer sdk key should be provided"), m((y) => (y !== null && typeof y.disableApp == "function" && y.disableApp(), null)), () => {
17821
- u = !0;
17842
+ return console.error("streamlayer sdk key should be provided"), u((T) => (T !== null && typeof T.disableApp == "function" && T.disableApp(), null)), () => {
17843
+ d = !0;
17822
17844
  };
17823
- const d = z_(e, n, a, {
17824
- version: "1.7.0",
17845
+ const y = z_(e, n, a, {
17846
+ version: "1.8.1",
17825
17847
  onDeepLinkHandled: s,
17826
17848
  videoPlayerController: o,
17827
17849
  onContentActivate: r,
17828
- withAdNotification: c
17850
+ withAdNotification: c,
17851
+ withAd: l
17829
17852
  });
17830
17853
  if (t)
17831
- for (const y of t)
17832
- d.use(y);
17833
- return d.ready().then((y) => {
17834
- u || (m(y.sdk), typeof window < "u");
17835
- }).catch((y) => console.log(y)), () => {
17836
- u = !0, d.close(function(y) {
17837
- if (y) throw y;
17854
+ for (const T of t)
17855
+ y.use(T);
17856
+ return y.ready().then((T) => {
17857
+ d || (u(T.sdk), typeof window < "u");
17858
+ }).catch((T) => console.log(T)), () => {
17859
+ d = !0, y.close(function(T) {
17860
+ if (T) throw T;
17838
17861
  });
17839
17862
  };
17840
- }, [e, n]), l;
17863
+ }, [e, n]), m;
17841
17864
  };
17842
17865
  export {
17843
17866
  ms as A,