@streamlayer/react-ui 1.31.5 → 1.31.7

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.
@@ -1,45 +1,45 @@
1
1
  import { jsxs as w, Fragment as b, jsx as u } from "react/jsx-runtime";
2
- import { cx as V } from "@linaria/core";
2
+ import { cx as D } from "@linaria/core";
3
3
  import { useAppContext as O } from "../useAppContext.js";
4
4
  import { scrollIntoAppView as T } from "../../useSdkScroll.js";
5
- import { useState as k, useMemo as D, useEffect as h, useRef as E, useCallback as I } from "react";
6
- import { r as q } from "../../../index-DALxy-8N.js";
5
+ import { useState as k, useMemo as V, useEffect as h, useRef as q, useCallback as I } from "react";
6
+ import { createPortal as E } from "react-dom";
7
7
  import { useStore as y } from "@streamlayer/react-polyfills";
8
8
  import { eventBus as R } from "@streamlayer/sdk-web-interfaces";
9
9
  import { NotificationType as p } from "@streamlayer/sdk-web-notifications";
10
10
  import { QuestionTypeData as A } from "../../../ui/gamification/constants.js";
11
11
  import { Notification as N } from "../../../ui/gamification/question/notification/index.js";
12
12
  import { PredictionResult as C } from "../../../ui/gamification/question/notification/prediction-result/index.js";
13
- import { Onboarding as x } from "./Onboarding/index.js";
14
- import { HiddenContainer as P, Container as z, InnerContainer as B, NotificationRefreshing as H, Pill as S } from "./styles.js";
15
- const v = (n) => {
16
- const [e, d] = k(0), i = E(null), l = D(() => new ResizeObserver((r) => {
13
+ import { Onboarding as P } from "./Onboarding/index.js";
14
+ import { HiddenContainer as x, Container as z, InnerContainer as B, NotificationRefreshing as H, Pill as S } from "./styles.js";
15
+ const v = (r) => {
16
+ const [e, d] = k(0), i = q(null), l = V(() => new ResizeObserver((n) => {
17
17
  window.requestAnimationFrame(() => {
18
18
  var f;
19
- if (Array.isArray(r)) {
20
- for (const c of r)
19
+ if (Array.isArray(n)) {
20
+ for (const c of n)
21
21
  if (c.contentBoxSize) {
22
22
  const o = (f = i.current) == null ? void 0 : f.getBoundingClientRect();
23
23
  o && d(o.height);
24
24
  }
25
25
  }
26
26
  });
27
- }), []), s = I((r) => {
28
- i.current = r;
29
- }, []), a = I((r) => {
30
- d(r);
27
+ }), []), s = I((n) => {
28
+ i.current = n;
29
+ }, []), a = I((n) => {
30
+ d(n);
31
31
  }, []);
32
32
  return h(() => {
33
- const r = i.current;
34
- return r ? (l.observe(r), () => {
35
- l.unobserve(r);
33
+ const n = i.current;
34
+ return n ? (l.observe(n), () => {
35
+ l.unobserve(n);
36
36
  }) : () => {
37
37
  };
38
- }, [n]), h(() => () => {
38
+ }, [r]), h(() => () => {
39
39
  l.disconnect();
40
40
  }), [s, e, a];
41
41
  }, Q = ({
42
- sdk: n,
42
+ sdk: r,
43
43
  notification: e,
44
44
  appNode: d,
45
45
  responsiveStore: i,
@@ -52,11 +52,11 @@ const v = (n) => {
52
52
  keys: ["sdkInDesktopView"]
53
53
  }), {
54
54
  sdk: a
55
- } = O(), [r, f, c] = v(e.id);
55
+ } = O(), [n, f, c] = v(e.id);
56
56
  let o = f;
57
57
  return l || (o = "auto"), e.type === p.QUESTION ? /* @__PURE__ */ w(b, {
58
- children: [/* @__PURE__ */ u(P, {
59
- ref: r,
58
+ children: [/* @__PURE__ */ u(x, {
59
+ ref: n,
60
60
  children: /* @__PURE__ */ u(N, {
61
61
  ...e
62
62
  })
@@ -83,19 +83,19 @@ const v = (n) => {
83
83
  close: e.close,
84
84
  hiding: e.hiding,
85
85
  ...e.data.question
86
- }) : e.type === p.ONBOARDING ? /* @__PURE__ */ u(x, {
86
+ }) : e.type === p.ONBOARDING ? /* @__PURE__ */ u(P, {
87
87
  style: {
88
88
  height: e.hiding ? 0 : o
89
89
  },
90
90
  saveHeight: c,
91
- sdk: n,
91
+ sdk: r,
92
92
  notification: e,
93
93
  sdkInDesktopView: s,
94
94
  appNode: d,
95
95
  responsiveStore: i
96
96
  }) : null;
97
97
  }, F = "p7vfi6t", U = ({
98
- pill: n,
98
+ pill: r,
99
99
  setPill: e,
100
100
  appNode: d,
101
101
  headerNode: i,
@@ -105,7 +105,7 @@ const v = (n) => {
105
105
  }) => {
106
106
  var t, m;
107
107
  const {
108
- screen: r
108
+ screen: n
109
109
  } = y(s, {
110
110
  keys: ["screen"]
111
111
  }), {
@@ -118,22 +118,22 @@ const v = (n) => {
118
118
  s.get().sdkInDesktopView ? c < 50 && e(null) : c > -50 && e(null);
119
119
  }, [c, s, e]);
120
120
  const o = s.get().sdkInDesktopView ? d : i;
121
- return !n || !o.current ? null : q.createPortal(/* @__PURE__ */ u(S, {
122
- title: n.type === p.QUESTION_RESOLVED ? "Prediction result" : `New ${((m = A[(t = n.data) == null ? void 0 : t.questionType]) == null ? void 0 : m.label) || "notification"}`,
121
+ return !r || !o.current ? null : E(/* @__PURE__ */ u(S, {
122
+ title: r.type === p.QUESTION_RESOLVED ? "Prediction result" : `New ${((m = A[(t = r.data) == null ? void 0 : t.questionType]) == null ? void 0 : m.label) || "notification"}`,
123
123
  "data-a": "intr",
124
124
  onClick: () => {
125
125
  var g;
126
126
  s.get().sdkInDesktopView ? (g = l.current) == null || g.scrollTo({
127
127
  top: 0,
128
128
  behavior: "smooth"
129
- }) : T(d, r.size, {
129
+ }) : T(d, n.size, {
130
130
  behavior: "smooth"
131
131
  }), e(null);
132
132
  },
133
- className: V(f && F, "sl-pill-button")
133
+ className: D(f && F, "sl-pill-button")
134
134
  }), o.current);
135
- }, re = ({
136
- sdk: n,
135
+ }, ne = ({
136
+ sdk: r,
137
137
  headerNode: e,
138
138
  scrollNode: d,
139
139
  responsiveStore: i,
@@ -141,7 +141,7 @@ const v = (n) => {
141
141
  scrollStore: s,
142
142
  hasActiveFeature: a
143
143
  }) => {
144
- const [r] = k(n.getNotificationsStore()), f = y(r), [c, o] = k(null), t = D(() => n.getActiveNotification(), [n, f]);
144
+ const [n] = k(r.getNotificationsStore()), f = y(n), [c, o] = k(null), t = V(() => r.getActiveNotification(), [r, f]);
145
145
  return h(() => {
146
146
  t && R.emit("notification", {
147
147
  action: "rendered",
@@ -163,7 +163,7 @@ const v = (n) => {
163
163
  }, [t]), /* @__PURE__ */ w(b, {
164
164
  children: [!c && t && /* @__PURE__ */ u(Q, {
165
165
  appNode: l,
166
- sdk: n,
166
+ sdk: r,
167
167
  hasActiveFeature: a,
168
168
  notification: t,
169
169
  responsiveStore: i
@@ -180,5 +180,5 @@ const v = (n) => {
180
180
  });
181
181
  };
182
182
  export {
183
- re as SDKNotifications
183
+ ne as SDKNotifications
184
184
  };
@@ -1,32 +1,32 @@
1
1
  import { jsxs as f, Fragment as D, jsx as l } from "react/jsx-runtime";
2
2
  import { cx as T } from "@linaria/core";
3
3
  import { useMastersContext as q } from "../useMastersContext.js";
4
- import { scrollIntoAppView as E } from "../useSdkScroll.js";
5
- import { useState as p, useMemo as O, useEffect as a, useRef as b, useCallback as N } from "react";
6
- import { r as R } from "../../../index-DALxy-8N.js";
4
+ import { scrollIntoAppView as O } from "../useSdkScroll.js";
5
+ import { useState as p, useMemo as b, useEffect as g, useRef as E, useCallback as N } from "react";
6
+ import { createPortal as R } from "react-dom";
7
7
  import { useStore as y } from "@streamlayer/react-polyfills";
8
8
  import { eventBus as C } from "@streamlayer/sdk-web-interfaces";
9
- import { NotificationType as g } from "@streamlayer/sdk-web-notifications";
9
+ import { NotificationType as a } from "@streamlayer/sdk-web-notifications";
10
10
  import { QuestionTypeData as P } from "../../../ui/gamification/constants.js";
11
11
  import { Notification as V } from "../../../ui/gamification/question/notification/index.js";
12
12
  import { PredictionResult as x } from "../../../ui/gamification/question/notification/prediction-result/index.js";
13
13
  import { Onboarding as A } from "./Onboarding/index.js";
14
14
  import { HiddenContainer as B, Container as H, InnerContainer as Q, NotificationRefreshing as U, Pill as j } from "./styles.js";
15
- const z = (n) => {
16
- const [t, c] = p(0), u = b(null), e = N((o) => {
17
- u.current = o;
15
+ const z = (o) => {
16
+ const [t, c] = p(0), u = E(null), e = N((n) => {
17
+ u.current = n;
18
18
  }, []);
19
- a(() => {
19
+ g(() => {
20
20
  var s;
21
- const o = (s = u.current) == null ? void 0 : s.getBoundingClientRect();
22
- o && c(o.height);
23
- }, [n]);
24
- const r = N((o) => {
25
- c(o);
21
+ const n = (s = u.current) == null ? void 0 : s.getBoundingClientRect();
22
+ n && c(n.height);
23
+ }, [o]);
24
+ const r = N((n) => {
25
+ c(n);
26
26
  }, []);
27
27
  return [e, t, r];
28
28
  }, F = ({
29
- sdk: n,
29
+ sdk: o,
30
30
  notification: t,
31
31
  appNode: c,
32
32
  responsiveStore: u
@@ -34,8 +34,8 @@ const z = (n) => {
34
34
  var h, d;
35
35
  const {
36
36
  sdk: e
37
- } = q(), [r, o, s] = z(t.id);
38
- return t.type === g.QUESTION ? /* @__PURE__ */ f(D, {
37
+ } = q(), [r, n, s] = z(t.id);
38
+ return t.type === a.QUESTION ? /* @__PURE__ */ f(D, {
39
39
  children: [/* @__PURE__ */ l(B, {
40
40
  ref: r,
41
41
  children: /* @__PURE__ */ l(V, {
@@ -43,7 +43,7 @@ const z = (n) => {
43
43
  })
44
44
  }), /* @__PURE__ */ f(H, {
45
45
  style: {
46
- height: t.hiding ? 0 : o
46
+ height: t.hiding ? 0 : n
47
47
  },
48
48
  hiding: t.hiding,
49
49
  children: [/* @__PURE__ */ l(Q, {
@@ -56,33 +56,33 @@ const z = (n) => {
56
56
  })
57
57
  }), /* @__PURE__ */ l(U, {}, t.id)]
58
58
  })]
59
- }) : t.type === g.QUESTION_RESOLVED && ((d = (h = t.data) == null ? void 0 : h.question) != null && d.predictionResult) ? /* @__PURE__ */ l(x, {
59
+ }) : t.type === a.QUESTION_RESOLVED && ((d = (h = t.data) == null ? void 0 : h.question) != null && d.predictionResult) ? /* @__PURE__ */ l(x, {
60
60
  style: {
61
- height: t.hiding ? 0 : o
61
+ height: t.hiding ? 0 : n
62
62
  },
63
63
  saveHeight: s,
64
64
  close: t.close,
65
65
  hiding: t.hiding,
66
66
  ...t.data.question,
67
67
  mastersApp: !0
68
- }) : t.type === g.ONBOARDING ? /* @__PURE__ */ l(A, {
68
+ }) : t.type === a.ONBOARDING ? /* @__PURE__ */ l(A, {
69
69
  style: {
70
- height: t.hiding ? 0 : o
70
+ height: t.hiding ? 0 : n
71
71
  },
72
72
  saveHeight: s,
73
- sdk: n,
73
+ sdk: o,
74
74
  notification: t,
75
75
  appNode: c,
76
76
  responsiveStore: u
77
77
  }) : null;
78
78
  }, L = "p1co32q0", M = ({
79
- pill: n,
79
+ pill: o,
80
80
  setPill: t,
81
81
  appNode: c,
82
82
  headerNode: u,
83
83
  scrollNode: e,
84
84
  responsiveStore: r,
85
- scrollStore: o,
85
+ scrollStore: n,
86
86
  useContainer: s
87
87
  }) => {
88
88
  var I, k;
@@ -93,37 +93,37 @@ const z = (n) => {
93
93
  }), {
94
94
  tabsShown: d,
95
95
  scrollPosition: m
96
- } = y(o, {
96
+ } = y(n, {
97
97
  keys: ["tabsShown", "scrollPosition"]
98
98
  });
99
- a(() => {
99
+ g(() => {
100
100
  r.get().sdkInDesktopView || s ? m < 50 && t(null) : m > -50 && t(null);
101
101
  }, [m, r, t, s]);
102
102
  const i = r.get().sdkInDesktopView ? c : u;
103
- return !n || !i.current ? null : R.createPortal(/* @__PURE__ */ l(j, {
104
- title: n.type === g.QUESTION_RESOLVED ? "Prediction result" : `New ${((k = P[(I = n.data) == null ? void 0 : I.questionType]) == null ? void 0 : k.label) || "notification"}`,
103
+ return !o || !i.current ? null : R(/* @__PURE__ */ l(j, {
104
+ title: o.type === a.QUESTION_RESOLVED ? "Prediction result" : `New ${((k = P[(I = o.data) == null ? void 0 : I.questionType]) == null ? void 0 : k.label) || "notification"}`,
105
105
  onClick: () => {
106
106
  var w;
107
107
  r.get().sdkInDesktopView ? (w = e.current) == null || w.scrollTo({
108
108
  top: 0,
109
109
  behavior: "smooth"
110
- }) : E(e, h.size, {
110
+ }) : O(e, h.size, {
111
111
  behavior: "smooth"
112
112
  }), t(null);
113
113
  },
114
114
  className: T(d && L, "sl-pill-button")
115
115
  }), i.current);
116
- }, ot = ({
117
- sdk: n,
116
+ }, nt = ({
117
+ sdk: o,
118
118
  headerNode: t,
119
119
  scrollNode: c,
120
120
  useContainer: u,
121
121
  responsiveStore: e,
122
122
  appNode: r,
123
- scrollStore: o
123
+ scrollStore: n
124
124
  }) => {
125
- const [s] = p(n.getNotificationsStore()), h = y(s), [d, m] = p(null), i = O(() => n.getActiveNotification(), [n, h]);
126
- return a(() => {
125
+ const [s] = p(o.getNotificationsStore()), h = y(s), [d, m] = p(null), i = b(() => o.getActiveNotification(), [o, h]);
126
+ return g(() => {
127
127
  i && C.emit("notification", {
128
128
  action: "rendered",
129
129
  payload: {
@@ -131,17 +131,17 @@ const z = (n) => {
131
131
  questionType: i.data.questionType
132
132
  }
133
133
  });
134
- }, [i]), a(() => {
134
+ }, [i]), g(() => {
135
135
  i && (e.get().sdkInDesktopView || e.get().sdkInView) && (!e.get().sdkInDesktopView && e.get().sdkInView && m(i), e.get().sdkInDesktopView && window.requestAnimationFrame(() => {
136
- o.get().scrollPosition !== 0 && m(i);
136
+ n.get().scrollPosition !== 0 && m(i);
137
137
  }));
138
- }, [i]), a(() => {
138
+ }, [i]), g(() => {
139
139
  i || m(null);
140
140
  }, [i]), /* @__PURE__ */ f(D, {
141
141
  children: [!d && i && /* @__PURE__ */ l(F, {
142
142
  headerNode: t,
143
143
  appNode: r,
144
- sdk: n,
144
+ sdk: o,
145
145
  notification: i,
146
146
  responsiveStore: e
147
147
  }), d && /* @__PURE__ */ l(M, {
@@ -151,12 +151,12 @@ const z = (n) => {
151
151
  notification: i,
152
152
  headerNode: t,
153
153
  scrollNode: c,
154
- scrollStore: o,
154
+ scrollStore: n,
155
155
  useContainer: u,
156
156
  responsiveStore: e
157
157
  })]
158
158
  });
159
159
  };
160
160
  export {
161
- ot as SDKNotifications
161
+ nt as SDKNotifications
162
162
  };
@@ -1,15 +1,15 @@
1
1
  import { jsx as u } from "react/jsx-runtime";
2
- import { useRef as l, useState as s, useCallback as p, useEffect as f } from "react";
3
- import { r as m } from "../index-DALxy-8N.js";
2
+ import { useRef as l, useState as s, useCallback as f, useEffect as p } from "react";
3
+ import { createPortal as m } from "react-dom";
4
4
  import { CopyNotification as b } from "../ui/gamification/copyNotification/index.js";
5
5
  const T = (r) => {
6
- const t = l(), [i, o] = s(null), a = p(
6
+ const t = l(), [c, o] = s(null), a = f(
7
7
  async (e) => {
8
- var c;
9
- if (e && ((c = navigator == null ? void 0 : navigator.clipboard) != null && c.writeText)) {
8
+ var i;
9
+ if (e && ((i = navigator == null ? void 0 : navigator.clipboard) != null && i.writeText)) {
10
10
  t.current && (clearTimeout(t.current), o(null));
11
11
  try {
12
- await navigator.clipboard.writeText(e), r.current && (o(m.createPortal(/* @__PURE__ */ u(b, {}), r.current)), t.current = setTimeout(() => {
12
+ await navigator.clipboard.writeText(e), r.current && (o(m(/* @__PURE__ */ u(b, {}), r.current)), t.current = setTimeout(() => {
13
13
  o(null);
14
14
  }, 1e3));
15
15
  } catch (n) {
@@ -19,9 +19,9 @@ const T = (r) => {
19
19
  },
20
20
  [r]
21
21
  );
22
- return f(() => () => {
22
+ return p(() => () => {
23
23
  clearTimeout(t.current);
24
- }, []), [a, i];
24
+ }, []), [a, c];
25
25
  };
26
26
  export {
27
27
  T as useClipboardCopy
@@ -1,66 +1,65 @@
1
1
  import { jsx as e, jsxs as g } from "react/jsx-runtime";
2
- import { cx as L } from "@linaria/core";
3
- import { useFocusable as D } from "@noriginmedia/norigin-spatial-navigation";
2
+ import { cx as D } from "@linaria/core";
3
+ import { useFocusable as L } from "@noriginmedia/norigin-spatial-navigation";
4
4
  import { useState as x, useRef as k, useEffect as h } from "react";
5
5
  import { useStore as G } from "@streamlayer/react-polyfills";
6
6
  import { eventBus as S } from "@streamlayer/sdk-web-interfaces";
7
7
  import { useLoadGAMStatic as B } from "../../../ui/advertisement/overlay/externalAd/vast-player/useGAMStatic.js";
8
- import { PauseAdOverlay as M, PauseAdContent as F, PauseAdGradientLeft as I, PauseAdGradientRight as j, PauseAdGradientBottom as K, PauseAdTopLeft as N, PauseAdTitle as $, PauseAdCaption as O, PauseAdBottomLeft as V, PauseAdPlayButton as _, PauseAdSidebar as q, ExternalAdContainer as b } from "./styles.js";
8
+ import { PauseAdOverlay as M, PauseAdContent as F, PauseAdGradientRight as I, PauseAdGradientBottom as j, PauseAdTopLeft as K, PauseAdTitle as N, PauseAdCaption as $, PauseAdBottomLeft as O, PauseAdPlayButton as V, PauseAdSidebar as _, PauseAdTitleDescription as q, ExternalAdContainer as b } from "./styles.js";
9
9
  const z = ({ vastUrl: t }) => {
10
- var n;
10
+ var s;
11
11
  const [, d] = B(), u = G(d, { keys: [t] });
12
- return (n = u == null ? void 0 : u[t]) != null && n.imageSrc ? u[t].adUrl ? /* @__PURE__ */ e("a", { href: u[t].adUrl, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ e(b, { src: u[t].imageSrc }) }) : /* @__PURE__ */ e(b, { src: u[t].imageSrc }) : null;
13
- }, H = ({ isClosing: t, title: d, caption: u, onPlay: n, onClose: o, vastUrl: a, options: r }) => {
14
- const f = (r == null ? void 0 : r.showPauseButton) ?? !0, { ref: s, focusSelf: m } = D({
12
+ return (s = u == null ? void 0 : u[t]) != null && s.imageSrc ? u[t].adUrl ? /* @__PURE__ */ e("a", { href: u[t].adUrl, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ e(b, { src: u[t].imageSrc }) }) : /* @__PURE__ */ e(b, { src: u[t].imageSrc }) : null;
13
+ }, H = ({ isClosing: t, title: d, caption: u, onPlay: s, onClose: f, vastUrl: a, options: r }) => {
14
+ const m = (r == null ? void 0 : r.showPauseButton) ?? !0, { ref: n, focusSelf: l } = L({
15
15
  focusKey: "sl-pause-ad-play",
16
- onEnterRelease: n,
16
+ onEnterRelease: s,
17
17
  isFocusBoundary: !0,
18
18
  forceFocus: !0
19
19
  });
20
20
  return h(() => {
21
- s.current && m();
22
- }, [s, m]), h(() => {
23
- const P = (l) => {
24
- const p = l.keyCode;
25
- if (p === 461 || p === 10009 || p === 27) {
26
- l.preventDefault(), l.stopPropagation(), l.stopImmediatePropagation(), o == null || o();
21
+ n.current && l();
22
+ }, [n, l]), h(() => {
23
+ const P = (p) => {
24
+ const o = p.keyCode;
25
+ if (o === 461 || o === 10009 || o === 27 || o === 8) {
26
+ p.preventDefault(), p.stopPropagation(), p.stopImmediatePropagation(), f == null || f();
27
27
  return;
28
28
  }
29
29
  };
30
30
  return window.addEventListener("keydown", P, { capture: !0 }), () => window.removeEventListener("keydown", P, { capture: !0 });
31
- }, [o]), /* @__PURE__ */ e(M, { className: L(t && "pause-ad-closing"), children: /* @__PURE__ */ g(F, { children: [
31
+ }, [f]), /* @__PURE__ */ e(M, { className: D(t && "pause-ad-closing"), children: /* @__PURE__ */ g(F, { children: [
32
32
  /* @__PURE__ */ e(I, {}),
33
33
  /* @__PURE__ */ e(j, {}),
34
- /* @__PURE__ */ e(K, {}),
35
- /* @__PURE__ */ g(N, { children: [
36
- /* @__PURE__ */ e($, { children: d }),
37
- /* @__PURE__ */ e(O, { children: u })
34
+ /* @__PURE__ */ g(K, { children: [
35
+ /* @__PURE__ */ e(N, { children: d }),
36
+ /* @__PURE__ */ e($, { children: u })
38
37
  ] }),
39
- f && /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(
40
- _,
38
+ m && /* @__PURE__ */ e(O, { children: /* @__PURE__ */ e(
39
+ V,
41
40
  {
42
- ref: s,
43
- onClick: n,
44
- onMouseEnter: () => s.current.focus(),
41
+ ref: n,
42
+ onClick: s,
43
+ onMouseEnter: () => n.current.focus(),
45
44
  "aria-label": "Resume playback"
46
45
  }
47
46
  ) }),
48
- /* @__PURE__ */ g(q, { children: [
47
+ /* @__PURE__ */ g(_, { children: [
49
48
  a && /* @__PURE__ */ e(z, { vastUrl: a }),
50
- /* @__PURE__ */ e("span", { children: "ADVERTISEMENT" })
49
+ /* @__PURE__ */ e(q, { children: "ADVERTISEMENT" })
51
50
  ] })
52
51
  ] }) });
53
52
  }, U = ({
54
53
  showPauseAd: t,
55
54
  vastUrls: d,
56
55
  title: u,
57
- caption: n,
58
- onPlay: o,
56
+ caption: s,
57
+ onPlay: f,
59
58
  onClose: a,
60
59
  onRender: r,
61
- options: f
60
+ options: m
62
61
  }) => {
63
- const s = (f == null ? void 0 : f.pauseAdDelay) ?? 5e3, [m, P] = x(!1), [l, p] = x(!1), c = k(), i = d == null ? void 0 : d[0].url, y = k(i);
62
+ const n = (m == null ? void 0 : m.pauseAdDelay) ?? 5e3, [l, P] = x(!1), [p, o] = x(!1), c = k(), i = d == null ? void 0 : d[0].url, y = k(i);
64
63
  y.current = i;
65
64
  const [T, E] = B();
66
65
  return h(() => {
@@ -75,7 +74,7 @@ const z = ({ vastUrl: t }) => {
75
74
  });
76
75
  const w = () => {
77
76
  var A;
78
- (A = E.get()[y.current]) != null && A.imageSrc ? (clearTimeout(c.current), p(!1), P(!0), S.emit("exposedPauseAd", {
77
+ (A = E.get()[y.current]) != null && A.imageSrc ? (clearTimeout(c.current), o(!1), P(!0), S.emit("exposedPauseAd", {
79
78
  action: "rendered",
80
79
  payload: {}
81
80
  })) : c.current = setTimeout(() => {
@@ -84,31 +83,31 @@ const z = ({ vastUrl: t }) => {
84
83
  };
85
84
  c.current = setTimeout(() => {
86
85
  w();
87
- }, s);
86
+ }, n);
88
87
  } else
89
88
  S.emit("exposedPauseAd", {
90
89
  action: "disabled",
91
90
  payload: {}
92
- }), p(!0), c.current = setTimeout(() => {
91
+ }), o(!0), c.current = setTimeout(() => {
93
92
  P(!1);
94
93
  }, 400);
95
94
  return () => {
96
95
  c.current && clearTimeout(c.current);
97
96
  };
98
- }, [E, T, a, s, t, i]), h(() => {
99
- r == null || r({ rendered: m });
100
- }, [m, r]), h(() => () => {
97
+ }, [E, T, a, n, t, i]), h(() => {
98
+ r == null || r({ rendered: l });
99
+ }, [l, r]), h(() => () => {
101
100
  r == null || r({ rendered: !1 });
102
- }, [r]), m ? /* @__PURE__ */ e(
101
+ }, [r]), l ? /* @__PURE__ */ e(
103
102
  H,
104
103
  {
105
104
  onClose: a,
106
- isClosing: l,
105
+ isClosing: p,
107
106
  title: u,
108
- caption: n,
109
- onPlay: o,
107
+ caption: s,
108
+ onPlay: f,
110
109
  vastUrl: i,
111
- options: f
110
+ options: m
112
111
  }
113
112
  ) : null;
114
113
  };
@@ -1,6 +1,5 @@
1
1
  export declare const PauseAdOverlay: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
2
2
  export declare const PauseAdContent: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
3
- export declare const PauseAdGradientLeft: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
4
3
  export declare const PauseAdGradientRight: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
5
4
  export declare const PauseAdGradientBottom: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
6
5
  export declare const PauseAdTopLeft: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
@@ -9,4 +8,5 @@ export declare const PauseAdCaption: import('@linaria/react').StyledComponent<im
9
8
  export declare const PauseAdBottomLeft: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
10
9
  export declare const PauseAdPlayButton: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLButtonElement> & import('react').ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
11
10
  export declare const PauseAdSidebar: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
11
+ export declare const PauseAdTitleDescription: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLSpanElement> & import('react').HTMLAttributes<HTMLSpanElement> & Record<never, unknown>>;
12
12
  export declare const ExternalAdContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLImageElement> & import('react').ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
@@ -8,39 +8,39 @@ const e = /* @__PURE__ */ s("div")({
8
8
  class: "p8lpomy",
9
9
  propsAsIs: !1
10
10
  }), o = /* @__PURE__ */ s("div")({
11
- name: "PauseAdGradientLeft",
12
- class: "pv7u167",
13
- propsAsIs: !1
14
- }), n = /* @__PURE__ */ s("div")({
15
11
  name: "PauseAdGradientRight",
16
- class: "p1kh2yb0",
12
+ class: "pv7u167",
17
13
  propsAsIs: !1
18
14
  }), p = /* @__PURE__ */ s("div")({
19
15
  name: "PauseAdGradientBottom",
20
- class: "pl8f94x",
16
+ class: "p1kh2yb0",
21
17
  propsAsIs: !1
22
- }), d = /* @__PURE__ */ s("div")({
18
+ }), n = /* @__PURE__ */ s("div")({
23
19
  name: "PauseAdTopLeft",
24
- class: "p1m6zmrt",
20
+ class: "pl8f94x",
25
21
  propsAsIs: !1
26
- }), l = /* @__PURE__ */ s("h2")({
22
+ }), d = /* @__PURE__ */ s("h2")({
27
23
  name: "PauseAdTitle",
28
- class: "pm3vwfa",
24
+ class: "p1m6zmrt",
29
25
  propsAsIs: !1
30
- }), A = /* @__PURE__ */ s("p")({
26
+ }), l = /* @__PURE__ */ s("p")({
31
27
  name: "PauseAdCaption",
32
- class: "p1tibuhw",
28
+ class: "pm3vwfa",
33
29
  propsAsIs: !1
34
- }), r = /* @__PURE__ */ s("div")({
30
+ }), A = /* @__PURE__ */ s("div")({
35
31
  name: "PauseAdBottomLeft",
36
- class: "ptqqrqd",
32
+ class: "p1tibuhw",
37
33
  propsAsIs: !1
38
- }), i = /* @__PURE__ */ s("button")({
34
+ }), r = /* @__PURE__ */ s("button")({
39
35
  name: "PauseAdPlayButton",
40
- class: "p14estxv",
36
+ class: "ptqqrqd",
41
37
  propsAsIs: !1
42
- }), u = /* @__PURE__ */ s("div")({
38
+ }), i = /* @__PURE__ */ s("div")({
43
39
  name: "PauseAdSidebar",
40
+ class: "p14estxv",
41
+ propsAsIs: !1
42
+ }), u = /* @__PURE__ */ s("span")({
43
+ name: "PauseAdTitleDescription",
44
44
  class: "p1dpvfl1",
45
45
  propsAsIs: !1
46
46
  }), c = /* @__PURE__ */ s("img")({
@@ -50,15 +50,15 @@ const e = /* @__PURE__ */ s("div")({
50
50
  });
51
51
  export {
52
52
  c as ExternalAdContainer,
53
- r as PauseAdBottomLeft,
54
- A as PauseAdCaption,
53
+ A as PauseAdBottomLeft,
54
+ l as PauseAdCaption,
55
55
  t as PauseAdContent,
56
56
  p as PauseAdGradientBottom,
57
- o as PauseAdGradientLeft,
58
- n as PauseAdGradientRight,
57
+ o as PauseAdGradientRight,
59
58
  e as PauseAdOverlay,
60
- i as PauseAdPlayButton,
61
- u as PauseAdSidebar,
62
- l as PauseAdTitle,
63
- d as PauseAdTopLeft
59
+ r as PauseAdPlayButton,
60
+ i as PauseAdSidebar,
61
+ d as PauseAdTitle,
62
+ u as PauseAdTitleDescription,
63
+ n as PauseAdTopLeft
64
64
  };