@streamlayer/react 0.37.1 → 0.39.0

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,182 +1,175 @@
1
- var je = Object.defineProperty;
2
- var We = (e, t, s) => t in e ? je(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
3
- var ne = (e, t, s) => (We(e, typeof t != "symbol" ? t + "" : t, s), s);
4
- import { jsxs as p, jsx as n, Fragment as P } from "react/jsx-runtime";
5
- import { s as o, c as R, Q as f, o as ye, a as _, b as Be, d as F, e as $e, E as Q, w as ze, j as be, u as O, g as Fe, f as He, K as Ye, P as Z, h as Ze, p as Ge, C as Ke, n as we, m as Je, i as Xe, l as et, D as Te, Y as pe, k as tt } from "./masters.js";
6
- import W, { useState as q, useLayoutEffect as Re, useRef as V, useCallback as B, useEffect as Y, useMemo as x, PureComponent as st, Component as nt, useTransition as rt } from "react";
7
- const it = /* @__PURE__ */ o("div")({
1
+ var Me = Object.defineProperty;
2
+ var Ve = (e, t, s) => t in e ? Me(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
3
+ var ne = (e, t, s) => (Ve(e, typeof t != "symbol" ? t + "" : t, s), s);
4
+ import { jsxs as p, jsx as n, Fragment as x } from "react/jsx-runtime";
5
+ import { s as r, c as R, Q as f, o as Ie, I as Ce, a as ge, b as V, d as _e, e as z, f as Ae, E as Q, H as Qe, G as ye, u as q, g as je, F as Ue, h as We, P as Y, i as Be, p as Fe, C as ze, n as $e, m as He, j as Ye, l as Ze, k as Ge, q as Ke, r as Xe } from "./masters.js";
6
+ import W, { useState as P, useLayoutEffect as be, useRef as _, useCallback as B, useEffect as J, useMemo as M, PureComponent as Je, Component as et, useTransition as tt } from "react";
7
+ const st = /* @__PURE__ */ r("div")({
8
8
  name: "Container",
9
9
  class: "c1vwopgc",
10
10
  propsAsIs: !1
11
- }), ot = /* @__PURE__ */ o("div")({
11
+ }), nt = /* @__PURE__ */ r("div")({
12
12
  name: "QuestionTypeWrap",
13
13
  class: "qyktpt0",
14
14
  propsAsIs: !1
15
- }), at = () => R, lt = /* @__PURE__ */ o(at())({
15
+ }), ot = () => R, it = /* @__PURE__ */ r(ot())({
16
16
  name: "QuestionTypeIcon",
17
17
  class: "q951jdx",
18
18
  propsAsIs: !0
19
- }), ct = /* @__PURE__ */ o("span")({
19
+ }), rt = /* @__PURE__ */ r("span")({
20
20
  name: "QuestionTypeTitle",
21
21
  class: "qss5f0e",
22
22
  propsAsIs: !1
23
- }), dt = /* @__PURE__ */ o("div")({
23
+ }), at = /* @__PURE__ */ r("div")({
24
24
  name: "CloseIconWrap",
25
25
  class: "c1ao1jtv",
26
26
  propsAsIs: !1
27
- }), pt = () => R, ut = /* @__PURE__ */ o(pt())({
27
+ }), lt = () => R, ct = /* @__PURE__ */ r(lt())({
28
28
  name: "CloseIcon",
29
29
  class: "cvsl7l3",
30
30
  propsAsIs: !0
31
- }), Se = ({ type: e, close: t, label: s }) => {
32
- const r = e ? ye[e] : { label: s, iconName: void 0 };
33
- return /* @__PURE__ */ p(it, { children: [
34
- /* @__PURE__ */ p(ot, { children: [
35
- (r == null ? void 0 : r.iconName) && /* @__PURE__ */ n(
36
- lt,
31
+ }), we = ({ type: e, close: t, label: s }) => {
32
+ const o = e ? Ie[e] : { label: s, iconName: void 0 };
33
+ return /* @__PURE__ */ p(st, { children: [
34
+ /* @__PURE__ */ p(nt, { children: [
35
+ (o == null ? void 0 : o.iconName) && /* @__PURE__ */ n(
36
+ it,
37
37
  {
38
38
  "data-type-trivia": e === f.TRIVIA,
39
39
  "data-type-poll": e === f.POLL,
40
- name: r.iconName
40
+ name: o.iconName
41
41
  }
42
42
  ),
43
- (r == null ? void 0 : r.label) && /* @__PURE__ */ n(ct, { children: r.label })
43
+ (o == null ? void 0 : o.label) && /* @__PURE__ */ n(rt, { children: o.label })
44
44
  ] }),
45
- /* @__PURE__ */ n(dt, { onClick: t, children: /* @__PURE__ */ n(ut, { name: "icon-cross" }) })
45
+ /* @__PURE__ */ n(at, { onClick: t, children: /* @__PURE__ */ n(ct, { name: "icon-cross" }) })
46
46
  ] });
47
- }, ke = (e) => e.split(/\s+/).map((t) => t[0]).join("").toUpperCase(), Le = (e) => e ? e.toLocaleString("en-US") : "0", oe = (e) => e.toLocaleDateString("en-US", {
48
- weekday: "short",
49
- month: "short",
50
- day: "numeric"
51
- }), ae = (e) => e.toLocaleTimeString("en-US", {
52
- hour: "2-digit",
53
- minute: "2-digit"
54
- }), le = (e) => !isNaN(e.getTime()), ht = /* @__PURE__ */ o("div")({
47
+ }, dt = /* @__PURE__ */ r("div")({
55
48
  name: "Container",
56
49
  class: "c1zy8a",
57
50
  propsAsIs: !1
58
- }), mt = /* @__PURE__ */ o("div")({
51
+ }), pt = /* @__PURE__ */ r("div")({
59
52
  name: "Title",
60
53
  class: "t1vih9p5",
61
54
  propsAsIs: !1
62
- }), vt = /* @__PURE__ */ o("div")({
55
+ }), ut = /* @__PURE__ */ r("div")({
63
56
  name: "Indicator",
64
57
  class: "i1fbnvpb",
65
58
  propsAsIs: !1
66
- }), ue = ({ indicator: e, title: t }) => /* @__PURE__ */ p(ht, { children: [
67
- /* @__PURE__ */ n(mt, { children: t }),
68
- /* @__PURE__ */ n(vt, { children: e })
69
- ] }), ft = /* @__PURE__ */ o("div")({
59
+ }), le = ({ indicator: e, title: t }) => /* @__PURE__ */ p(dt, { children: [
60
+ /* @__PURE__ */ n(pt, { children: t }),
61
+ /* @__PURE__ */ n(ut, { children: e })
62
+ ] }), ht = /* @__PURE__ */ r("div")({
70
63
  name: "Container",
71
64
  class: "ctmhwyc",
72
65
  propsAsIs: !1
73
- }), It = /* @__PURE__ */ o("div")({
66
+ }), mt = /* @__PURE__ */ r("div")({
74
67
  name: "Indicator",
75
68
  class: "i1jri200",
76
69
  propsAsIs: !1
77
- }), Ct = /* @__PURE__ */ o("div")({
70
+ }), vt = /* @__PURE__ */ r("div")({
78
71
  name: "Title",
79
72
  class: "t8s05oq",
80
73
  propsAsIs: !1
81
- }), G = ({ indicator: e, title: t }) => /* @__PURE__ */ p(ft, { children: [
82
- /* @__PURE__ */ n(It, { children: e }),
83
- /* @__PURE__ */ n(Ct, { children: t })
84
- ] }), gt = /* @__PURE__ */ o("div")({
74
+ }), Z = ({ indicator: e, title: t }) => /* @__PURE__ */ p(ht, { children: [
75
+ /* @__PURE__ */ n(mt, { children: e }),
76
+ /* @__PURE__ */ n(vt, { children: t })
77
+ ] }), ft = /* @__PURE__ */ r("div")({
85
78
  name: "Container",
86
79
  class: "c1yrpn9o",
87
80
  propsAsIs: !1
88
- }), At = /* @__PURE__ */ o("div")({
81
+ }), It = /* @__PURE__ */ r("div")({
89
82
  name: "TopInfo",
90
83
  class: "t17fwahh",
91
84
  propsAsIs: !1
92
- }), yt = /* @__PURE__ */ o("div")({
85
+ }), Ct = /* @__PURE__ */ r("div")({
93
86
  name: "BottomInfo",
94
87
  class: "by6w7e9",
95
88
  propsAsIs: !1
96
- }), $t = /* @__PURE__ */ o("div")({
89
+ }), gt = /* @__PURE__ */ r("div")({
97
90
  name: "User",
98
91
  class: "u1g7arbm",
99
92
  propsAsIs: !1
100
- }), bt = /* @__PURE__ */ o("img")({
93
+ }), At = /* @__PURE__ */ r("img")({
101
94
  name: "Avatar",
102
95
  class: "a1ldeata",
103
96
  propsAsIs: !1
104
- }), wt = /* @__PURE__ */ o("div")({
97
+ }), yt = /* @__PURE__ */ r("div")({
105
98
  name: "UserInfo",
106
99
  class: "u10d4koz",
107
100
  propsAsIs: !1
108
- }), Tt = /* @__PURE__ */ o("div")({
101
+ }), $t = /* @__PURE__ */ r("div")({
109
102
  name: "UserName",
110
103
  class: "u1q6roj0",
111
104
  propsAsIs: !1
112
- }), Rt = /* @__PURE__ */ o("div")({
105
+ }), bt = /* @__PURE__ */ r("div")({
113
106
  name: "UserRating",
114
107
  class: "ui0m425",
115
108
  propsAsIs: !1
116
- }), St = /* @__PURE__ */ o("img")({
109
+ }), wt = /* @__PURE__ */ r("img")({
117
110
  name: "TrophyIcon",
118
111
  class: "t1el3mrn",
119
112
  propsAsIs: !1
120
- }), kt = /* @__PURE__ */ o("div")({
113
+ }), Tt = /* @__PURE__ */ r("div")({
121
114
  name: "Rts",
122
115
  class: "r2vgnxv",
123
116
  propsAsIs: !1
124
- }), Lt = /* @__PURE__ */ o("div")({
117
+ }), Rt = /* @__PURE__ */ r("div")({
125
118
  name: "RtsIndicator",
126
119
  class: "roqn06j",
127
120
  propsAsIs: !1
128
- }), Et = /* @__PURE__ */ o("div")({
121
+ }), kt = /* @__PURE__ */ r("div")({
129
122
  name: "RtsLabel",
130
123
  class: "r15adx7c",
131
124
  propsAsIs: !1
132
- }), xt = /* @__PURE__ */ o("div")({
125
+ }), St = /* @__PURE__ */ r("div")({
133
126
  name: "Divider",
134
127
  class: "dv59lta",
135
128
  propsAsIs: !1
136
- }), Pt = /* @__PURE__ */ o("div")({
129
+ }), Lt = /* @__PURE__ */ r("div")({
137
130
  name: "Ranks",
138
131
  class: "r55lotb",
139
132
  propsAsIs: !1
140
- }), qt = /* @__PURE__ */ o("div")({
133
+ }), Et = /* @__PURE__ */ r("div")({
141
134
  name: "Statistics",
142
135
  class: "s1knfgqt",
143
136
  propsAsIs: !1
144
- }), Nt = /* @__PURE__ */ o("div")({
137
+ }), xt = /* @__PURE__ */ r("div")({
145
138
  name: "AvatarPlaceholder",
146
139
  class: "a1mqo824",
147
140
  propsAsIs: !1
148
- }), Dt = /* @__PURE__ */ o("button")({
141
+ }), Pt = /* @__PURE__ */ r("button")({
149
142
  name: "UserAccountBtn",
150
143
  class: "uxareh6",
151
144
  propsAsIs: !1
152
- }), Ot = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Trophy'%3e%3cpath%20id='Combined%20Shape'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M3.69197%204.66662C3.69197%205.99705%203.92914%207.17787%204.4035%208.20912C3.49966%208.02451%202.74487%207.66486%202.1391%207.13014C1.53333%206.59542%201.23046%206.0798%201.23046%205.58328V4.66662H3.69197ZM14.7686%204.66662V5.58328C14.7686%206.0798%2014.4658%206.59542%2013.86%207.13014C13.2542%207.66486%2012.4994%208.02451%2011.5956%208.20912C12.0699%207.17787%2012.3071%205.99705%2012.3071%204.66662H14.7686ZM15.9998%205.58329V4.36108C15.9998%204.10645%2015.9101%203.89002%2015.7306%203.71178C15.5511%203.53354%2015.3332%203.44442%2015.0768%203.44442H12.3076V2.52776C12.3076%202.10763%2012.1569%201.74797%2011.8556%201.44878C11.5544%201.14959%2011.1922%201%2010.7691%201H5.23072C4.80764%201%204.44547%201.14959%204.14419%201.44878C3.84291%201.74797%203.69227%202.10763%203.69227%202.52776V3.44442H0.923068C0.666659%203.44442%200.448714%203.53354%200.269228%203.71178C0.0897418%203.89002%200%204.10645%200%204.36108V5.58329C0%206.03525%200.13301%206.49039%200.399034%206.94872C0.665059%207.40705%201.02403%207.82082%201.47595%208.19003C1.92787%208.55924%202.48234%208.86957%203.13939%209.12101C3.79644%209.37246%204.48713%209.51409%205.21149%209.54592C5.48071%209.88967%205.7852%2010.192%206.12494%2010.453C6.36853%2010.6695%206.53679%2010.9002%206.62974%2011.1453C6.72269%2011.3904%206.76916%2011.6752%206.76916%2011.9999C6.76916%2012.3436%206.67141%2012.6333%206.4759%2012.8688C6.28038%2013.1043%205.96789%2013.2221%205.53841%2013.2221C5.05764%2013.2221%204.62976%2013.3669%204.25476%2013.6566C3.87977%2013.9462%203.69227%2014.3106%203.69227%2014.7499V15.361C3.69227%2015.4501%203.72112%2015.5233%203.77881%2015.5806C3.8365%2015.6379%203.91022%2015.6665%203.99996%2015.6665H11.9999C12.0896%2015.6665%2012.1633%2015.6379%2012.221%2015.5806C12.2787%2015.5233%2012.3076%2015.4501%2012.3076%2015.361V14.7499C12.3076%2014.3106%2012.1201%2013.9462%2011.7451%2013.6566C11.3701%2013.3669%2010.9422%2013.2221%2010.4614%2013.2221C10.0319%2013.2221%209.71945%2013.1043%209.52394%2012.8688C9.32843%2012.6333%209.23068%2012.3436%209.23068%2011.9999C9.23068%2011.6752%209.27715%2011.3904%209.3701%2011.1453C9.46305%2010.9002%209.63131%2010.6695%209.8749%2010.453C10.2146%2010.192%2010.5191%209.88967%2010.7884%209.54592C11.5127%209.51409%2012.2034%209.37246%2012.8604%209.12101C13.5175%208.86957%2014.072%208.55924%2014.5239%208.19003C14.9758%207.82082%2015.3348%207.40705%2015.6008%206.94872C15.8668%206.49039%2015.9998%206.03525%2015.9998%205.58329ZM6.76047%207.1798L8.05109%206.49997L9.3417%207.1798L9.09521%205.73989L10.1393%204.72015L8.69639%204.51007L8.05109%203.2L7.40578%204.51007L5.96283%204.72015L7.00696%205.73989L6.76047%207.1798Z'%20fill='%23F2C94C'/%3e%3c/g%3e%3c/svg%3e", Ee = ({
145
+ }), qt = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Trophy'%3e%3cpath%20id='Combined%20Shape'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M3.69197%204.66662C3.69197%205.99705%203.92914%207.17787%204.4035%208.20912C3.49966%208.02451%202.74487%207.66486%202.1391%207.13014C1.53333%206.59542%201.23046%206.0798%201.23046%205.58328V4.66662H3.69197ZM14.7686%204.66662V5.58328C14.7686%206.0798%2014.4658%206.59542%2013.86%207.13014C13.2542%207.66486%2012.4994%208.02451%2011.5956%208.20912C12.0699%207.17787%2012.3071%205.99705%2012.3071%204.66662H14.7686ZM15.9998%205.58329V4.36108C15.9998%204.10645%2015.9101%203.89002%2015.7306%203.71178C15.5511%203.53354%2015.3332%203.44442%2015.0768%203.44442H12.3076V2.52776C12.3076%202.10763%2012.1569%201.74797%2011.8556%201.44878C11.5544%201.14959%2011.1922%201%2010.7691%201H5.23072C4.80764%201%204.44547%201.14959%204.14419%201.44878C3.84291%201.74797%203.69227%202.10763%203.69227%202.52776V3.44442H0.923068C0.666659%203.44442%200.448714%203.53354%200.269228%203.71178C0.0897418%203.89002%200%204.10645%200%204.36108V5.58329C0%206.03525%200.13301%206.49039%200.399034%206.94872C0.665059%207.40705%201.02403%207.82082%201.47595%208.19003C1.92787%208.55924%202.48234%208.86957%203.13939%209.12101C3.79644%209.37246%204.48713%209.51409%205.21149%209.54592C5.48071%209.88967%205.7852%2010.192%206.12494%2010.453C6.36853%2010.6695%206.53679%2010.9002%206.62974%2011.1453C6.72269%2011.3904%206.76916%2011.6752%206.76916%2011.9999C6.76916%2012.3436%206.67141%2012.6333%206.4759%2012.8688C6.28038%2013.1043%205.96789%2013.2221%205.53841%2013.2221C5.05764%2013.2221%204.62976%2013.3669%204.25476%2013.6566C3.87977%2013.9462%203.69227%2014.3106%203.69227%2014.7499V15.361C3.69227%2015.4501%203.72112%2015.5233%203.77881%2015.5806C3.8365%2015.6379%203.91022%2015.6665%203.99996%2015.6665H11.9999C12.0896%2015.6665%2012.1633%2015.6379%2012.221%2015.5806C12.2787%2015.5233%2012.3076%2015.4501%2012.3076%2015.361V14.7499C12.3076%2014.3106%2012.1201%2013.9462%2011.7451%2013.6566C11.3701%2013.3669%2010.9422%2013.2221%2010.4614%2013.2221C10.0319%2013.2221%209.71945%2013.1043%209.52394%2012.8688C9.32843%2012.6333%209.23068%2012.3436%209.23068%2011.9999C9.23068%2011.6752%209.27715%2011.3904%209.3701%2011.1453C9.46305%2010.9002%209.63131%2010.6695%209.8749%2010.453C10.2146%2010.192%2010.5191%209.88967%2010.7884%209.54592C11.5127%209.51409%2012.2034%209.37246%2012.8604%209.12101C13.5175%208.86957%2014.072%208.55924%2014.5239%208.19003C14.9758%207.82082%2015.3348%207.40705%2015.6008%206.94872C15.8668%206.49039%2015.9998%206.03525%2015.9998%205.58329ZM6.76047%207.1798L8.05109%206.49997L9.3417%207.1798L9.09521%205.73989L10.1393%204.72015L8.69639%204.51007L8.05109%203.2L7.40578%204.51007L5.96283%204.72015L7.00696%205.73989L6.76047%207.1798Z'%20fill='%23F2C94C'/%3e%3c/g%3e%3c/svg%3e", Te = ({
153
146
  avatar: e,
154
147
  name: t,
155
148
  points: s,
156
- friendsRank: r,
149
+ friendsRank: o,
157
150
  rank: i,
158
151
  streak: l,
159
152
  correct: a,
160
153
  incorrect: c,
161
154
  inTop: d,
162
155
  successRate: u
163
- }) => /* @__PURE__ */ p(gt, { children: [
164
- /* @__PURE__ */ n(At, { children: /* @__PURE__ */ p($t, { children: [
165
- /* @__PURE__ */ p(Dt, { children: [
166
- e && /* @__PURE__ */ n(bt, { alt: "avatar", src: e }),
167
- !e && /* @__PURE__ */ n(Nt, { children: ke(t || "") })
156
+ }) => /* @__PURE__ */ p(ft, { children: [
157
+ /* @__PURE__ */ n(It, { children: /* @__PURE__ */ p(gt, { children: [
158
+ /* @__PURE__ */ p(Pt, { children: [
159
+ e && /* @__PURE__ */ n(At, { alt: "avatar", src: e }),
160
+ !e && /* @__PURE__ */ n(xt, { children: Ce(t || "") })
168
161
  ] }),
169
- /* @__PURE__ */ p(wt, { children: [
170
- /* @__PURE__ */ n(Tt, { children: t }),
171
- /* @__PURE__ */ p(Rt, { children: [
172
- /* @__PURE__ */ p(kt, { children: [
173
- /* @__PURE__ */ n(St, { alt: "rank-icon", src: Ot }),
174
- /* @__PURE__ */ p(Lt, { children: [
175
- Le(s),
176
- /* @__PURE__ */ n(Et, { children: "PTS" })
162
+ /* @__PURE__ */ p(yt, { children: [
163
+ /* @__PURE__ */ n($t, { children: t }),
164
+ /* @__PURE__ */ p(bt, { children: [
165
+ /* @__PURE__ */ p(Tt, { children: [
166
+ /* @__PURE__ */ n(wt, { alt: "rank-icon", src: qt }),
167
+ /* @__PURE__ */ p(Rt, { children: [
168
+ ge(s),
169
+ /* @__PURE__ */ n(kt, { children: "PTS" })
177
170
  ] })
178
171
  ] }),
179
- /* @__PURE__ */ n(xt, {}),
172
+ /* @__PURE__ */ n(St, {}),
180
173
  /* @__PURE__ */ p("div", { children: [
181
174
  "TOP ",
182
175
  d || 0,
@@ -185,79 +178,79 @@ const it = /* @__PURE__ */ o("div")({
185
178
  ] })
186
179
  ] })
187
180
  ] }) }),
188
- /* @__PURE__ */ p(yt, { children: [
189
- /* @__PURE__ */ p(Pt, { children: [
190
- /* @__PURE__ */ n(ue, { indicator: r || 0, title: "Friends rank" }),
191
- /* @__PURE__ */ n(ue, { indicator: i || 0, title: "Global rank" })
181
+ /* @__PURE__ */ p(Ct, { children: [
182
+ /* @__PURE__ */ p(Lt, { children: [
183
+ /* @__PURE__ */ n(le, { indicator: o || 0, title: "Friends rank" }),
184
+ /* @__PURE__ */ n(le, { indicator: i || 0, title: "Global rank" })
192
185
  ] }),
193
- /* @__PURE__ */ p(qt, { children: [
194
- /* @__PURE__ */ n(G, { indicator: l || 0, title: "Win streak" }),
195
- /* @__PURE__ */ n(G, { indicator: a || 0, title: "Correct" }),
196
- /* @__PURE__ */ n(G, { indicator: c || 0, title: "Incorrect" }),
197
- /* @__PURE__ */ n(G, { indicator: `${u || 0}%`, title: "Succ. rate" })
186
+ /* @__PURE__ */ p(Et, { children: [
187
+ /* @__PURE__ */ n(Z, { indicator: l || 0, title: "Win streak" }),
188
+ /* @__PURE__ */ n(Z, { indicator: a || 0, title: "Correct" }),
189
+ /* @__PURE__ */ n(Z, { indicator: c || 0, title: "Incorrect" }),
190
+ /* @__PURE__ */ n(Z, { indicator: `${u || 0}%`, title: "Succ. rate" })
198
191
  ] })
199
192
  ] })
200
- ] }), Mt = /* @__PURE__ */ o("div")({
193
+ ] }), Nt = /* @__PURE__ */ r("div")({
201
194
  name: "SponsorLogoWrap",
202
195
  class: "s8p5v5z",
203
196
  propsAsIs: !1
204
- }), Vt = () => R, _t = /* @__PURE__ */ o(Vt())({
197
+ }), Dt = () => R, Ot = /* @__PURE__ */ r(Dt())({
205
198
  name: "SponsorLogo",
206
199
  class: "s755yti",
207
200
  propsAsIs: !0
208
- }), Qt = () => /* @__PURE__ */ n(Mt, {
209
- children: /* @__PURE__ */ n(_t, {
201
+ }), Mt = () => /* @__PURE__ */ n(Nt, {
202
+ children: /* @__PURE__ */ n(Ot, {
210
203
  name: "mastersLogo"
211
204
  })
212
- }), Ut = /* @__PURE__ */ o("div")({
205
+ }), Vt = /* @__PURE__ */ r("div")({
213
206
  name: "Container",
214
207
  class: "c38csyt",
215
208
  propsAsIs: !1
216
- }), jt = /* @__PURE__ */ o("div")({
209
+ }), _t = /* @__PURE__ */ r("div")({
217
210
  name: "Title",
218
211
  class: "ty221rx",
219
212
  propsAsIs: !1
220
- }), Wt = /* @__PURE__ */ o("div")({
213
+ }), Qt = /* @__PURE__ */ r("div")({
221
214
  name: "Description",
222
215
  class: "dlaj9xp",
223
216
  propsAsIs: !1
224
- }), Bt = ({ title: e, description: t }) => /* @__PURE__ */ p(Ut, { children: [
217
+ }), jt = ({ title: e, description: t }) => /* @__PURE__ */ p(Vt, { children: [
225
218
  /* @__PURE__ */ n(R, { name: "icon-check-circle" }),
226
- /* @__PURE__ */ n(jt, { children: e }),
227
- /* @__PURE__ */ n(Wt, { children: t })
228
- ] }), zt = /* @__PURE__ */ o("div")({
219
+ /* @__PURE__ */ n(_t, { children: e }),
220
+ /* @__PURE__ */ n(Qt, { children: t })
221
+ ] }), Ut = /* @__PURE__ */ r("div")({
229
222
  name: "Container",
230
223
  class: "c16sbdnm",
231
224
  propsAsIs: !1
232
- }), Ft = () => R, Ht = /* @__PURE__ */ o(Ft())({
225
+ }), Wt = () => R, Bt = /* @__PURE__ */ r(Wt())({
233
226
  name: "IconPrediction",
234
227
  class: "ibhorgl",
235
228
  propsAsIs: !0
236
- }), H = /* @__PURE__ */ o("div")({
229
+ }), H = /* @__PURE__ */ r("div")({
237
230
  name: "FeedbackIconWrap",
238
231
  class: "f1g20ja7",
239
232
  propsAsIs: !1
240
- }), K = /* @__PURE__ */ o("div")({
233
+ }), G = /* @__PURE__ */ r("div")({
241
234
  name: "FeedbackHeader",
242
235
  class: "f455ozj",
243
236
  propsAsIs: !1
244
- }), Yt = /* @__PURE__ */ o("span")({
237
+ }), Ft = /* @__PURE__ */ r("span")({
245
238
  name: "FeedbackTitle",
246
239
  class: "f1913njx",
247
240
  propsAsIs: !1
248
- }), j = /* @__PURE__ */ o("span")({
241
+ }), U = /* @__PURE__ */ r("span")({
249
242
  name: "FeedbackDescription",
250
243
  class: "fzfk69z",
251
244
  propsAsIs: !1
252
- }), re = /* @__PURE__ */ o("div")({
245
+ }), oe = /* @__PURE__ */ r("div")({
253
246
  name: "FeedbackText",
254
247
  class: "fx87qaj",
255
248
  propsAsIs: !1
256
- }), Zt = ({
249
+ }), zt = ({
257
250
  feedbackMessages: e,
258
251
  questionVotedCorrectly: t,
259
252
  questionVoted: s,
260
- questionType: r,
253
+ questionType: o,
261
254
  hasCorrectAnswer: i,
262
255
  questionStatus: l,
263
256
  showExpiredNotification: a,
@@ -267,148 +260,148 @@ const it = /* @__PURE__ */ o("div")({
267
260
  enteredAnActiveQuestion: h,
268
261
  marketClosed: v
269
262
  }) => {
270
- const m = s && (r === f.TRIVIA || r === f.PREDICTION) && d && l !== _.RESOLVED, I = r === f.PREDICTION && !i, w = v && r === f.PREDICTION && !s && !h || r === f.PREDICTION && u && d && h, C = m && I, y = m && i, g = r === f.PREDICTION && s && d && i, A = s && r === f.POLL && d;
271
- if (!a && !c && !C && !y && !w && !A && !g)
263
+ const m = s && (o === f.TRIVIA || o === f.PREDICTION) && d && l !== V.RESOLVED, I = o === f.PREDICTION && !i, $ = v && o === f.PREDICTION && !s && !h || o === f.PREDICTION && u && d && h, y = m && I, g = m && i, C = o === f.PREDICTION && s && d && i, w = s && o === f.POLL && d;
264
+ if (!a && !c && !y && !g && !$ && !w && !C)
272
265
  return null;
273
266
  const b = t ? "correct" : "incorrect", T = t ? e == null ? void 0 : e.correctFeedback : e == null ? void 0 : e.incorrectFeedback;
274
- return /* @__PURE__ */ p(zt, { "data-isPrediction": I, children: [
275
- a && /* @__PURE__ */ p(P, { children: [
267
+ return /* @__PURE__ */ p(Ut, { "data-isPrediction": I, children: [
268
+ a && /* @__PURE__ */ p(x, { children: [
276
269
  /* @__PURE__ */ n(H, { children: /* @__PURE__ */ n(R, { name: "questionExpired" }) }),
277
270
  /* @__PURE__ */ p("div", { children: [
278
- /* @__PURE__ */ n(K, { children: /* @__PURE__ */ n(j, { children: "Question Expired" }) }),
279
- /* @__PURE__ */ n(re, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
271
+ /* @__PURE__ */ n(G, { children: /* @__PURE__ */ n(U, { children: "Question Expired" }) }),
272
+ /* @__PURE__ */ n(oe, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
280
273
  ] })
281
274
  ] }),
282
- c && /* @__PURE__ */ p(P, { children: [
275
+ c && /* @__PURE__ */ p(x, { children: [
283
276
  /* @__PURE__ */ n(H, { children: /* @__PURE__ */ n(R, { name: "questionExpired" }) }),
284
277
  /* @__PURE__ */ p("div", { children: [
285
- /* @__PURE__ */ n(K, { children: /* @__PURE__ */ n(j, { children: "Question Closed" }) }),
286
- /* @__PURE__ */ n(re, { children: "This question was answered after the moderator closed the question. So the points for this answer won’t tally." })
278
+ /* @__PURE__ */ n(G, { children: /* @__PURE__ */ n(U, { children: "Question Closed" }) }),
279
+ /* @__PURE__ */ n(oe, { children: "This question was answered after the moderator closed the question. So the points for this answer won’t tally." })
287
280
  ] })
288
281
  ] }),
289
- w && /* @__PURE__ */ p(P, { children: [
282
+ $ && /* @__PURE__ */ p(x, { children: [
290
283
  /* @__PURE__ */ n(H, { children: /* @__PURE__ */ n(R, { name: "questionExpired" }) }),
291
284
  /* @__PURE__ */ p("div", { children: [
292
- /* @__PURE__ */ n(K, { children: /* @__PURE__ */ n(j, { children: "Question Closed" }) }),
293
- /* @__PURE__ */ n(re, { children: "This event has already taken place, so the ability to make a prediction on its outcome is no longer available." })
285
+ /* @__PURE__ */ n(G, { children: /* @__PURE__ */ n(U, { children: "Question Closed" }) }),
286
+ /* @__PURE__ */ n(oe, { children: "This event has already taken place, so the ability to make a prediction on its outcome is no longer available." })
294
287
  ] })
295
288
  ] }),
296
- C && /* @__PURE__ */ p(P, { children: [
297
- /* @__PURE__ */ n(Ht, { name: "icon-prediction" }),
298
- /* @__PURE__ */ n(j, { children: "Stay tuned to see if your prediction was correct." })
289
+ y && /* @__PURE__ */ p(x, { children: [
290
+ /* @__PURE__ */ n(Bt, { name: "icon-prediction" }),
291
+ /* @__PURE__ */ n(U, { children: "Stay tuned to see if your prediction was correct." })
299
292
  ] }),
300
- A && /* @__PURE__ */ p(P, { children: [
293
+ w && /* @__PURE__ */ p(x, { children: [
301
294
  /* @__PURE__ */ n(H, { "data-feedback-type": "correct", children: /* @__PURE__ */ n(R, { name: "correct" }) }),
302
- /* @__PURE__ */ n(j, { children: "That's for answering. Please stay tuned for the next question." })
295
+ /* @__PURE__ */ n(U, { children: "Thanks for answering. Please stay tuned for the next question." })
303
296
  ] }),
304
- (y || g) && /* @__PURE__ */ p(P, { children: [
297
+ (g || C) && /* @__PURE__ */ p(x, { children: [
305
298
  /* @__PURE__ */ n(H, { "data-feedback-type": b, children: /* @__PURE__ */ n(R, { name: b }) }),
306
- /* @__PURE__ */ n("div", { children: /* @__PURE__ */ p(K, { children: [
307
- /* @__PURE__ */ n(Yt, { "data-feedback-type": b, children: T == null ? void 0 : T.title }),
308
- /* @__PURE__ */ n(j, { children: T == null ? void 0 : T.description })
299
+ /* @__PURE__ */ n("div", { children: /* @__PURE__ */ p(G, { children: [
300
+ /* @__PURE__ */ n(Ft, { "data-feedback-type": b, children: T == null ? void 0 : T.title }),
301
+ /* @__PURE__ */ n(U, { children: T == null ? void 0 : T.description })
309
302
  ] }) })
310
303
  ] })
311
304
  ] });
312
- }, Gt = /* @__PURE__ */ o("div")({
305
+ }, Ht = /* @__PURE__ */ r("div")({
313
306
  name: "Container",
314
307
  class: "c14ielyq",
315
308
  propsAsIs: !1
316
- }), Kt = () => Be, Jt = /* @__PURE__ */ o(Kt())({
309
+ }), Yt = () => _e, Zt = /* @__PURE__ */ r(Yt())({
317
310
  name: "QuestionScrollContainer",
318
311
  class: "q1tlqx57",
319
312
  propsAsIs: !0
320
- }), Xt = /* @__PURE__ */ o("div")({
313
+ }), Gt = /* @__PURE__ */ r("div")({
321
314
  name: "Content",
322
315
  class: "c1hq58md",
323
316
  propsAsIs: !1
324
- }), es = /* @__PURE__ */ o("div")({
317
+ }), Kt = /* @__PURE__ */ r("div")({
325
318
  name: "Title",
326
319
  class: "t1c8nxcx",
327
320
  propsAsIs: !1
328
- }), ts = /* @__PURE__ */ o("div")({
321
+ }), Xt = /* @__PURE__ */ r("div")({
329
322
  name: "Options",
330
323
  class: "oiozuc3",
331
324
  propsAsIs: !1
332
- }), ss = /* @__PURE__ */ o("button")({
325
+ }), Jt = /* @__PURE__ */ r("button")({
333
326
  name: "ButtonContainer",
334
327
  class: "b1b6dl8t",
335
328
  propsAsIs: !1
336
- }), ns = /* @__PURE__ */ o("div")({
329
+ }), es = /* @__PURE__ */ r("div")({
337
330
  name: "ButtonPct",
338
331
  class: "b4iik8i",
339
332
  propsAsIs: !1
340
- }), rs = /* @__PURE__ */ o("span")({
333
+ }), ts = /* @__PURE__ */ r("span")({
341
334
  name: "ButtonBody",
342
335
  class: "b1gq1lnf",
343
336
  propsAsIs: !1
344
- }), is = /* @__PURE__ */ o("div")({
337
+ }), ss = /* @__PURE__ */ r("div")({
345
338
  name: "IconContainer",
346
339
  class: "i1j65z51",
347
340
  propsAsIs: !1
348
- }), os = /* @__PURE__ */ o("div")({
341
+ }), ns = /* @__PURE__ */ r("div")({
349
342
  name: "IconWrap",
350
343
  class: "i19tpfua",
351
344
  propsAsIs: !1
352
- }), xe = /* @__PURE__ */ o("img")({
345
+ }), Re = /* @__PURE__ */ r("img")({
353
346
  name: "Icon",
354
347
  class: "i1tubmma",
355
348
  propsAsIs: !1
356
- }), as = () => xe, ls = /* @__PURE__ */ o(as())({
349
+ }), os = () => Re, is = /* @__PURE__ */ r(os())({
357
350
  name: "IconDefault",
358
351
  class: "i1grrgwj",
359
352
  propsAsIs: !0
360
- }), cs = () => xe, ds = /* @__PURE__ */ o(cs())({
353
+ }), rs = () => Re, as = /* @__PURE__ */ r(rs())({
361
354
  name: "IconCircle",
362
355
  class: "ibemyq8",
363
356
  propsAsIs: !0
364
- }), ps = /* @__PURE__ */ o("span")({
357
+ }), ls = /* @__PURE__ */ r("span")({
365
358
  name: "Title",
366
359
  class: "t1dceht",
367
360
  propsAsIs: !1
368
- }), us = /* @__PURE__ */ o("span")({
361
+ }), cs = /* @__PURE__ */ r("span")({
369
362
  name: "Indicators",
370
363
  class: "i116q4vq",
371
364
  propsAsIs: !1
372
- }), hs = /* @__PURE__ */ o("span")({
365
+ }), ds = /* @__PURE__ */ r("span")({
373
366
  name: "Pts",
374
367
  class: "p17ajcu2",
375
368
  propsAsIs: !1
376
- }), ms = /* @__PURE__ */ o("span")({
369
+ }), ps = /* @__PURE__ */ r("span")({
377
370
  name: "Percentage",
378
371
  class: "pu9kmlb",
379
372
  propsAsIs: !1
380
- }), vs = () => R, fs = /* @__PURE__ */ o(vs())({
373
+ }), us = () => R, hs = /* @__PURE__ */ r(us())({
381
374
  name: "CheckIcon",
382
375
  class: "c1j2j0s0",
383
376
  propsAsIs: !0
384
- }), he = {
385
- [F.CENTERED]: (e) => /* @__PURE__ */ n(ls, { alt: "option-icon", src: e }),
386
- [F.TRANSPARENT]: (e) => /* @__PURE__ */ n(is, { children: /* @__PURE__ */ n(os, { style: { backgroundImage: `url(${e})` } }) }),
387
- [F.ROUNDED]: (e) => /* @__PURE__ */ n(ds, { alt: "option-icon", src: e }),
388
- [F.NONE]: () => null,
389
- [F.UNSET]: () => null
390
- }, Is = ({ questionType: e, hasCorrectAnswer: t, correct: s, youVoted: r, questionVoted: i }) => {
391
- if (e === f.POLL && r)
377
+ }), ce = {
378
+ [z.CENTERED]: (e) => /* @__PURE__ */ n(is, { alt: "option-icon", src: e }),
379
+ [z.TRANSPARENT]: (e) => /* @__PURE__ */ n(ss, { children: /* @__PURE__ */ n(ns, { style: { backgroundImage: `url(${e})` } }) }),
380
+ [z.ROUNDED]: (e) => /* @__PURE__ */ n(as, { alt: "option-icon", src: e }),
381
+ [z.NONE]: () => null,
382
+ [z.UNSET]: () => null
383
+ }, ms = ({ questionType: e, hasCorrectAnswer: t, correct: s, youVoted: o, questionVoted: i }) => {
384
+ if (e === f.POLL && o)
392
385
  return "correct";
393
386
  if (e === f.PREDICTION) {
394
387
  if (t && i)
395
- return r ? s ? "correct" : "incorrect" : "unset";
396
- if (r)
388
+ return o ? s ? "correct" : "incorrect" : "unset";
389
+ if (o)
397
390
  return "correct";
398
391
  }
399
- return e === f.TRIVIA && i && r ? s ? "correct" : "incorrect" : "unset";
400
- }, Cs = ({
392
+ return e === f.TRIVIA && i && o ? s ? "correct" : "incorrect" : "unset";
393
+ }, vs = ({
401
394
  questionType: e,
402
395
  questionVoted: t,
403
396
  correct: s,
404
- hasCorrectAnswer: r,
397
+ hasCorrectAnswer: o,
405
398
  questionStatus: i
406
- }) => e === f.TRIVIA ? t && s : e === f.PREDICTION ? t && s && r || i === _.RESOLVED && s : !1, gs = (e) => {
399
+ }) => e === f.TRIVIA ? t && s : e === f.PREDICTION ? t && s && o || i === V.RESOLVED && s : !1, fs = (e) => {
407
400
  var t;
408
401
  const {
409
402
  // option props
410
403
  id: s,
411
- icon: r,
404
+ icon: o,
412
405
  text: i,
413
406
  percentageDecimal: l,
414
407
  points: a,
@@ -420,482 +413,439 @@ const it = /* @__PURE__ */ o("div")({
420
413
  imageMode: v,
421
414
  answerTimeExpired: m,
422
415
  questionStatus: I,
423
- isLoading: w,
424
- questionType: C,
425
- correct: y,
426
- hasCorrectAnswer: g,
427
- votedAfterQuestionClosed: A,
416
+ isLoading: $,
417
+ questionType: y,
418
+ correct: g,
419
+ hasCorrectAnswer: C,
420
+ votedAfterQuestionClosed: w,
428
421
  enteredAnActiveQuestion: b,
429
422
  marketClosed: T
430
- } = e, [N, M] = q(l), D = Is(e), ee = Cs({ questionType: C, questionVoted: h, correct: y, hasCorrectAnswer: g, questionStatus: I }), $ = T && C === f.PREDICTION, S = h || $, k = C === f.PREDICTION && !h && !T, te = h && !u && D !== "incorrect";
431
- return Re(() => {
432
- l > 0 && (M(0), requestAnimationFrame(() => {
433
- M(l);
423
+ } = e, [N, O] = P(l), D = ms(e), ee = vs({ questionType: y, questionVoted: h, correct: g, hasCorrectAnswer: C, questionStatus: I }), A = T && y === f.PREDICTION, k = h || A, S = y === f.PREDICTION && !h && !T, te = h && !u && D !== "incorrect";
424
+ return be(() => {
425
+ l > 0 && (O(0), requestAnimationFrame(() => {
426
+ O(l);
434
427
  }));
435
428
  }, [l]), /* @__PURE__ */ p(
436
- ss,
429
+ Jt,
437
430
  {
438
431
  value: s,
439
432
  "data-selected": u,
440
433
  "data-answer-state": D,
441
- disabled: h || w || m || $ && !b || $ && b && A,
434
+ disabled: h || $ || m || A && !b || A && b && w,
442
435
  "data-is-not-checked": te,
443
436
  onClick: (se) => {
444
437
  d(
445
- C === f.PREDICTION ? T : I === _.RESOLVED
438
+ y === f.PREDICTION ? T : I === V.RESOLVED
446
439
  ), c(se);
447
440
  },
448
441
  children: [
449
- /* @__PURE__ */ n(ns, { "data-answer-state": D, style: { width: `${S ? N : 0}%` } }),
450
- /* @__PURE__ */ p(rs, { children: [
451
- r && v && ((t = he[v]) == null ? void 0 : t.call(he, r)),
452
- /* @__PURE__ */ n(ps, { children: i }),
453
- k && /* @__PURE__ */ p("div", { children: [
442
+ /* @__PURE__ */ n(es, { "data-answer-state": D, style: { width: `${k ? N : 0}%` } }),
443
+ /* @__PURE__ */ p(ts, { children: [
444
+ o && v && ((t = ce[v]) == null ? void 0 : t.call(ce, o)),
445
+ /* @__PURE__ */ n(ls, { children: i }),
446
+ S && /* @__PURE__ */ p("div", { children: [
454
447
  a,
455
- /* @__PURE__ */ n(hs, { children: "pts" })
448
+ /* @__PURE__ */ n(ds, { children: "pts" })
456
449
  ] }),
457
- S && /* @__PURE__ */ p(us, { children: [
458
- ee && /* @__PURE__ */ n(fs, { name: "selected" }),
459
- /* @__PURE__ */ n(ms, { children: /* @__PURE__ */ n($e, { value: l, suffix: "%" }) })
450
+ k && /* @__PURE__ */ p(cs, { children: [
451
+ ee && /* @__PURE__ */ n(hs, { name: "selected" }),
452
+ /* @__PURE__ */ n(ps, { children: /* @__PURE__ */ n(Ae, { value: l, suffix: "%" }) })
460
453
  ] })
461
454
  ] })
462
455
  ]
463
456
  }
464
457
  );
465
458
  };
466
- var me = typeof window > "u" ? Y : Re, As = ({ isPlaying: e, duration: t, startAt: s = 0, updateInterval: r = 0, onComplete: i, onUpdate: l }) => {
467
- let [a, c] = q(s), d = V(0), u = V(s), h = V(s * -1e3), v = V(null), m = V(null), I = V(null), w = (g) => {
468
- let A = g / 1e3;
459
+ var de = typeof window > "u" ? J : be, Is = ({ isPlaying: e, duration: t, startAt: s = 0, updateInterval: o = 0, onComplete: i, onUpdate: l }) => {
460
+ let [a, c] = P(s), d = _(0), u = _(s), h = _(s * -1e3), v = _(null), m = _(null), I = _(null), $ = (C) => {
461
+ let w = C / 1e3;
469
462
  if (m.current === null) {
470
- m.current = A, v.current = requestAnimationFrame(w);
463
+ m.current = w, v.current = requestAnimationFrame($);
471
464
  return;
472
465
  }
473
- let b = A - m.current, T = d.current + b;
474
- m.current = A, d.current = T;
475
- let N = u.current + (r === 0 ? T : (T / r | 0) * r), M = u.current + T, D = typeof t == "number" && M >= t;
476
- c(D ? t : N), D || (v.current = requestAnimationFrame(w));
477
- }, C = () => {
466
+ let b = w - m.current, T = d.current + b;
467
+ m.current = w, d.current = T;
468
+ let N = u.current + (o === 0 ? T : (T / o | 0) * o), O = u.current + T, D = typeof t == "number" && O >= t;
469
+ c(D ? t : N), D || (v.current = requestAnimationFrame($));
470
+ }, y = () => {
478
471
  v.current && cancelAnimationFrame(v.current), I.current && clearTimeout(I.current), m.current = null;
479
- }, y = B((g) => {
480
- C(), d.current = 0;
481
- let A = typeof g == "number" ? g : s;
482
- u.current = A, c(A), e && (v.current = requestAnimationFrame(w));
472
+ }, g = B((C) => {
473
+ y(), d.current = 0;
474
+ let w = typeof C == "number" ? C : s;
475
+ u.current = w, c(w), e && (v.current = requestAnimationFrame($));
483
476
  }, [e, s]);
484
- return me(() => {
477
+ return de(() => {
485
478
  if (l == null || l(a), t && a >= t) {
486
479
  h.current += t * 1e3;
487
- let { shouldRepeat: g = !1, delay: A = 0, newStartAt: b } = (i == null ? void 0 : i(h.current / 1e3)) || {};
488
- g && (I.current = setTimeout(() => y(b), A * 1e3));
480
+ let { shouldRepeat: C = !1, delay: w = 0, newStartAt: b } = (i == null ? void 0 : i(h.current / 1e3)) || {};
481
+ C && (I.current = setTimeout(() => g(b), w * 1e3));
489
482
  }
490
- }, [a, t]), me(() => (e && (v.current = requestAnimationFrame(w)), C), [e, t, r]), { elapsedTime: a, reset: y };
491
- }, ys = (e, t, s) => {
492
- let r = e / 2, i = t / 2, l = r - i, a = 2 * l, c = s === "clockwise" ? "1,0" : "0,1", d = 2 * Math.PI * l;
493
- return { path: `m ${r},${i} a ${l},${l} 0 ${c} 0,${a} a ${l},${l} 0 ${c} 0,-${a}`, pathLength: d };
494
- }, ve = (e, t) => e === 0 || e === t ? 0 : typeof t == "number" ? e - t : 0, $s = (e) => ({ position: "relative", width: e, height: e }), bs = { display: "flex", justifyContent: "center", alignItems: "center", position: "absolute", left: 0, top: 0, width: "100%", height: "100%" }, Pe = (e, t, s, r, i) => {
495
- if (r === 0)
483
+ }, [a, t]), de(() => (e && (v.current = requestAnimationFrame($)), y), [e, t, o]), { elapsedTime: a, reset: g };
484
+ }, Cs = (e, t, s) => {
485
+ let o = e / 2, i = t / 2, l = o - i, a = 2 * l, c = s === "clockwise" ? "1,0" : "0,1", d = 2 * Math.PI * l;
486
+ return { path: `m ${o},${i} a ${l},${l} 0 ${c} 0,${a} a ${l},${l} 0 ${c} 0,-${a}`, pathLength: d };
487
+ }, pe = (e, t) => e === 0 || e === t ? 0 : typeof t == "number" ? e - t : 0, gs = (e) => ({ position: "relative", width: e, height: e }), As = { display: "flex", justifyContent: "center", alignItems: "center", position: "absolute", left: 0, top: 0, width: "100%", height: "100%" }, ke = (e, t, s, o, i) => {
488
+ if (o === 0)
496
489
  return t;
497
- let l = (i ? r - e : e) / r;
490
+ let l = (i ? o - e : e) / o;
498
491
  return t + s * l;
499
- }, fe = (e) => {
492
+ }, ue = (e) => {
500
493
  var t, s;
501
- return (s = (t = e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (r, i, l, a) => `#${i}${i}${l}${l}${a}${a}`).substring(1).match(/.{2}/g)) == null ? void 0 : t.map((r) => parseInt(r, 16))) != null ? s : [];
502
- }, ws = (e, t) => {
494
+ return (s = (t = e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (o, i, l, a) => `#${i}${i}${l}${l}${a}${a}`).substring(1).match(/.{2}/g)) == null ? void 0 : t.map((o) => parseInt(o, 16))) != null ? s : [];
495
+ }, ys = (e, t) => {
503
496
  var s;
504
- let { colors: r, colorsTime: i, isSmoothColorTransition: l = !0 } = e;
505
- if (typeof r == "string")
506
- return r;
497
+ let { colors: o, colorsTime: i, isSmoothColorTransition: l = !0 } = e;
498
+ if (typeof o == "string")
499
+ return o;
507
500
  let a = (s = i == null ? void 0 : i.findIndex((m, I) => m >= t && t >= i[I + 1])) != null ? s : -1;
508
501
  if (!i || a === -1)
509
- return r[0];
502
+ return o[0];
510
503
  if (!l)
511
- return r[a];
512
- let c = i[a] - t, d = i[a] - i[a + 1], u = fe(r[a]), h = fe(r[a + 1]), v = !!e.isGrowing;
513
- return `rgb(${u.map((m, I) => Pe(c, m, h[I] - m, d, v) | 0).join(",")})`;
514
- }, Ts = (e) => {
515
- let { duration: t, initialRemainingTime: s, updateInterval: r, size: i = 180, strokeWidth: l = 12, trailStrokeWidth: a, isPlaying: c = !1, isGrowing: d = !1, rotation: u = "clockwise", onComplete: h, onUpdate: v } = e, m = V(), I = Math.max(l, a ?? 0), { path: w, pathLength: C } = ys(i, I, u), { elapsedTime: y } = As({ isPlaying: c, duration: t, startAt: ve(t, s), updateInterval: r, onUpdate: typeof v == "function" ? (A) => {
516
- let b = Math.ceil(t - A);
504
+ return o[a];
505
+ let c = i[a] - t, d = i[a] - i[a + 1], u = ue(o[a]), h = ue(o[a + 1]), v = !!e.isGrowing;
506
+ return `rgb(${u.map((m, I) => ke(c, m, h[I] - m, d, v) | 0).join(",")})`;
507
+ }, $s = (e) => {
508
+ let { duration: t, initialRemainingTime: s, updateInterval: o, size: i = 180, strokeWidth: l = 12, trailStrokeWidth: a, isPlaying: c = !1, isGrowing: d = !1, rotation: u = "clockwise", onComplete: h, onUpdate: v } = e, m = _(), I = Math.max(l, a ?? 0), { path: $, pathLength: y } = Cs(i, I, u), { elapsedTime: g } = Is({ isPlaying: c, duration: t, startAt: pe(t, s), updateInterval: o, onUpdate: typeof v == "function" ? (w) => {
509
+ let b = Math.ceil(t - w);
517
510
  b !== m.current && (m.current = b, v(b));
518
- } : void 0, onComplete: typeof h == "function" ? (A) => {
511
+ } : void 0, onComplete: typeof h == "function" ? (w) => {
519
512
  var b;
520
- let { shouldRepeat: T, delay: N, newInitialRemainingTime: M } = (b = h(A)) != null ? b : {};
513
+ let { shouldRepeat: T, delay: N, newInitialRemainingTime: O } = (b = h(w)) != null ? b : {};
521
514
  if (T)
522
- return { shouldRepeat: T, delay: N, newStartAt: ve(t, M) };
523
- } : void 0 }), g = t - y;
524
- return { elapsedTime: y, path: w, pathLength: C, remainingTime: Math.ceil(g), rotation: u, size: i, stroke: ws(e, g), strokeDashoffset: Pe(y, 0, C, t, d), strokeWidth: l };
525
- }, qe = (e) => {
526
- let { children: t, strokeLinecap: s, trailColor: r, trailStrokeWidth: i } = e, { path: l, pathLength: a, stroke: c, strokeDashoffset: d, remainingTime: u, elapsedTime: h, size: v, strokeWidth: m } = Ts(e);
527
- return W.createElement("div", { style: $s(v) }, W.createElement("svg", { viewBox: `0 0 ${v} ${v}`, width: v, height: v, xmlns: "http://www.w3.org/2000/svg" }, W.createElement("path", { d: l, fill: "none", stroke: r ?? "#d9d9d9", strokeWidth: i ?? m }), W.createElement("path", { d: l, fill: "none", stroke: c, strokeLinecap: s ?? "round", strokeWidth: m, strokeDasharray: a, strokeDashoffset: d })), typeof t == "function" && W.createElement("div", { style: bs }, t({ remainingTime: u, elapsedTime: h, color: c })));
515
+ return { shouldRepeat: T, delay: N, newStartAt: pe(t, O) };
516
+ } : void 0 }), C = t - g;
517
+ return { elapsedTime: g, path: $, pathLength: y, remainingTime: Math.ceil(C), rotation: u, size: i, stroke: ys(e, C), strokeDashoffset: ke(g, 0, y, t, d), strokeWidth: l };
518
+ }, Se = (e) => {
519
+ let { children: t, strokeLinecap: s, trailColor: o, trailStrokeWidth: i } = e, { path: l, pathLength: a, stroke: c, strokeDashoffset: d, remainingTime: u, elapsedTime: h, size: v, strokeWidth: m } = $s(e);
520
+ return W.createElement("div", { style: gs(v) }, W.createElement("svg", { viewBox: `0 0 ${v} ${v}`, width: v, height: v, xmlns: "http://www.w3.org/2000/svg" }, W.createElement("path", { d: l, fill: "none", stroke: o ?? "#d9d9d9", strokeWidth: i ?? m }), W.createElement("path", { d: l, fill: "none", stroke: c, strokeLinecap: s ?? "round", strokeWidth: m, strokeDasharray: a, strokeDashoffset: d })), typeof t == "function" && W.createElement("div", { style: As }, t({ remainingTime: u, elapsedTime: h, color: c })));
528
521
  };
529
- qe.displayName = "CountdownCircleTimer";
530
- const Rs = [Q.PRIMARY_GREEN1, Q.SECONDARY_RED1, Q.SECONDARY_RED1, Q.NEUTRALS_GRAY3], Ss = [10, 10, 1, 0], ks = /* @__PURE__ */ o("div")({
522
+ Se.displayName = "CountdownCircleTimer";
523
+ const bs = [Q.PRIMARY_GREEN1, Q.SECONDARY_RED1, Q.SECONDARY_RED1, Q.NEUTRALS_GRAY3], ws = [10, 10, 1, 0], Ts = /* @__PURE__ */ r("div")({
531
524
  name: "RemainingTime",
532
525
  class: "r165427",
533
526
  propsAsIs: !1
534
- }), Ls = Q.SECONDARY_GREEN6, Ie = Q.SECONDARY_RED3, Es = Q.NEUTRALS_GRAY3, xs = ({
527
+ }), Rs = Q.SECONDARY_GREEN6, he = Q.SECONDARY_RED3, ks = Q.NEUTRALS_GRAY3, Ss = ({
535
528
  isPlaying: e = !0,
536
529
  duration: t = 30,
537
530
  onTimerExpired: s
538
531
  }) => {
539
- const [r, i] = q(t > 10 ? Ls : Ie), l = ({
532
+ const [o, i] = P(t > 10 ? Rs : he), l = ({
540
533
  remainingTime: d
541
- }) => /* @__PURE__ */ n(ks, {
534
+ }) => /* @__PURE__ */ n(Ts, {
542
535
  children: d
543
536
  }), a = B(() => {
544
- s == null || s(), i(Es);
537
+ s == null || s(), i(ks);
545
538
  }, [s, i]), c = B((d) => {
546
- d === 10 && i(Ie);
539
+ d === 10 && i(he);
547
540
  }, [i]);
548
- return /* @__PURE__ */ n(qe, {
541
+ return /* @__PURE__ */ n(Se, {
549
542
  isPlaying: e,
550
543
  duration: t,
551
- colors: Rs,
552
- colorsTime: Ss,
544
+ colors: bs,
545
+ colorsTime: ws,
553
546
  size: 32,
554
547
  strokeWidth: 2,
555
548
  trailStrokeWidth: 2,
556
- trailColor: r,
549
+ trailColor: o,
557
550
  onComplete: a,
558
551
  onUpdate: c,
559
552
  children: l
560
553
  });
561
- }, Ps = /* @__PURE__ */ o("div")({
554
+ }, Ls = /* @__PURE__ */ r("div")({
562
555
  name: "WinBarContainer",
563
556
  class: "wie6cqo",
564
557
  propsAsIs: !1
565
- }), qs = /* @__PURE__ */ o("div")({
558
+ }), Es = /* @__PURE__ */ r("div")({
566
559
  name: "Content",
567
560
  class: "cgizw4u",
568
561
  propsAsIs: !1
569
- }), Ns = /* @__PURE__ */ o("div")({
562
+ }), xs = /* @__PURE__ */ r("div")({
570
563
  name: "Title",
571
564
  class: "t1l3ucjp",
572
565
  propsAsIs: !1
573
- }), Ds = () => R, Os = /* @__PURE__ */ o(Ds())({
566
+ }), Ps = () => R, qs = /* @__PURE__ */ r(Ps())({
574
567
  name: "WinIcon",
575
568
  class: "wx7j799",
576
569
  propsAsIs: !0
577
- }), Ms = /* @__PURE__ */ o("div")({
570
+ }), Ns = /* @__PURE__ */ r("div")({
578
571
  name: "Points",
579
572
  class: "p4lwuj0",
580
573
  propsAsIs: !1
581
- }), Vs = /* @__PURE__ */ o("span")({
574
+ }), Ds = /* @__PURE__ */ r("span")({
582
575
  name: "PointsCount",
583
576
  class: "po9i64o",
584
577
  propsAsIs: !1
585
- }), _s = /* @__PURE__ */ o("span")({
578
+ }), Os = /* @__PURE__ */ r("span")({
586
579
  name: "PointsUnits",
587
580
  class: "pe5g05h",
588
581
  propsAsIs: !1
589
- }), Qs = ({
582
+ }), Ms = ({
590
583
  title: e,
591
584
  points: t,
592
585
  isPlayingTimer: s,
593
- isTimer: r,
586
+ isTimer: o,
594
587
  animatePoints: i,
595
588
  questionType: l,
596
589
  timerDuration: a,
597
590
  onTimerExpired: c
598
- }) => /* @__PURE__ */ p(Ps, { style: { justifyContent: l === f.PREDICTION ? "center" : "space-between" }, children: [
599
- /* @__PURE__ */ p(qs, { children: [
600
- e && /* @__PURE__ */ n(Ns, { children: e }),
601
- t !== void 0 && l !== f.POLL && /* @__PURE__ */ p(P, { children: [
602
- /* @__PURE__ */ n(Os, { name: "icon-trophy" }),
603
- /* @__PURE__ */ p(Ms, { children: [
604
- /* @__PURE__ */ n(Vs, { children: i ? /* @__PURE__ */ n($e, { value: t, delay: 0.3 }) : t }),
605
- /* @__PURE__ */ n(_s, { children: "PTS" })
591
+ }) => /* @__PURE__ */ p(Ls, { style: { justifyContent: l === f.PREDICTION ? "center" : "space-between" }, children: [
592
+ /* @__PURE__ */ p(Es, { children: [
593
+ e && /* @__PURE__ */ n(xs, { children: e }),
594
+ t !== void 0 && l !== f.POLL && /* @__PURE__ */ p(x, { children: [
595
+ /* @__PURE__ */ n(qs, { name: "icon-trophy" }),
596
+ /* @__PURE__ */ p(Ns, { children: [
597
+ /* @__PURE__ */ n(Ds, { children: i ? /* @__PURE__ */ n(Ae, { value: t, delay: 0.3 }) : t }),
598
+ /* @__PURE__ */ n(Os, { children: "PTS" })
606
599
  ] })
607
600
  ] })
608
601
  ] }),
609
- r && l !== f.PREDICTION && /* @__PURE__ */ n(xs, { isPlaying: s, onTimerExpired: c, duration: a })
610
- ] }), Us = ({ openedQuestion: e, isLoading: t, vote: s, close: r }) => {
602
+ o && l !== f.PREDICTION && /* @__PURE__ */ n(Ss, { isPlaying: s, onTimerExpired: c, duration: a })
603
+ ] }), Vs = ({ openedQuestion: e, isLoading: t, vote: s, close: o }) => {
611
604
  var i, l;
612
- const a = e.subject, c = e.type, d = e.status, u = (i = e.options) == null ? void 0 : i.options, h = e.marketClosed, [v, m] = q(!1), [I, w] = q(!1), [C, y] = q(!0), [g, A] = q(!1), [b, T] = q(""), N = e == null ? void 0 : e.id;
613
- Y(() => {
614
- c === f.PREDICTION ? h && y(!1) : d === _.RESOLVED && y(!1);
605
+ const a = e.subject, c = e.type, d = e.status, u = (i = e.options) == null ? void 0 : i.options, h = e.marketClosed, [v, m] = P(!1), [I, $] = P(!1), [y, g] = P(!0), [C, w] = P(!1), [b, T] = P(""), N = e == null ? void 0 : e.id;
606
+ J(() => {
607
+ c === f.PREDICTION ? h && g(!1) : d === V.RESOLVED && g(!1);
615
608
  }, []);
616
- const M = B((L) => {
617
- w(L), m(!0);
609
+ const O = B((L) => {
610
+ $(L), m(!0);
618
611
  }, []), D = B(
619
612
  async (L) => {
620
613
  if (N) {
621
- const z = L.currentTarget.value;
622
- T(z), await s(N, z);
614
+ const F = L.currentTarget.value;
615
+ T(F), await s(N, F);
623
616
  }
624
617
  },
625
618
  [N, T, s]
626
619
  ), ee = B(() => {
627
- A(!0), setTimeout(r, 3e3);
628
- }, [r]), $ = x(
620
+ w(!0), setTimeout(o, 3e3);
621
+ }, [o]), A = M(
629
622
  () => e == null ? void 0 : e.answers.find((L) => L.youVoted === !0),
630
623
  [e]
631
- ), S = x(
624
+ ), k = M(
632
625
  () => !!(e != null && e.answers.find((L) => L.correct === !0)),
633
626
  [e]
634
- ), k = x(
627
+ ), S = M(
635
628
  () => e == null ? void 0 : e.answers.find((L) => L.correct === !0),
636
629
  [e]
637
- ), te = x(() => e ? e.answers.map((L) => {
638
- var z;
630
+ ), te = M(() => e ? e.answers.map((L) => {
631
+ var F;
639
632
  return {
640
633
  ...L,
641
- questionVoted: !!$,
634
+ questionVoted: !!A,
642
635
  youSelected: b === L.id,
643
636
  isLoading: t,
644
- hasCorrectAnswer: S,
637
+ hasCorrectAnswer: k,
645
638
  questionType: e.type,
646
- answerTimeExpired: g,
639
+ answerTimeExpired: C,
647
640
  questionStatus: d,
648
- imageMode: (z = e.appearance) == null ? void 0 : z.images,
641
+ imageMode: (F = e.appearance) == null ? void 0 : F.images,
649
642
  onVote: D
650
643
  };
651
644
  }) : [], [
652
- S,
653
- g,
645
+ k,
646
+ C,
654
647
  t,
655
648
  e,
656
- $,
649
+ A,
657
650
  d,
658
651
  D,
659
652
  b
660
- ]), se = u && (u.case === "trivia" || u.case === "prediction") ? u.value : void 0, U = d === _.RESOLVED && c === f.TRIVIA && !$ && !C, ce = c === f.TRIVIA && I && v && C, de = x(() => c === f.PREDICTION ? !!($ && !S || $ && S && k != null && k.youVoted) : !0, [c, $, S, k]), Ve = x(() => {
661
- if (c === f.PREDICTION && $ && (!S || S && k != null && k.youVoted))
662
- return $.points;
663
- if (!(U || g))
664
- return d === _.RESOLVED ? 0 : $ ? $.correct ? $.points : 0 : k == null ? void 0 : k.points;
653
+ ]), se = u && (u.case === "trivia" || u.case === "prediction") ? u.value : void 0, j = d === V.RESOLVED && c === f.TRIVIA && !A && !y, re = c === f.TRIVIA && I && v && y, ae = M(() => c === f.PREDICTION ? !!(A && !k || A && k && S != null && S.youVoted) : !0, [c, A, k, S]), qe = M(() => {
654
+ if (c === f.PREDICTION && A && (!k || k && S != null && S.youVoted))
655
+ return A.points;
656
+ if (!(j || C))
657
+ return d === V.RESOLVED ? 0 : A ? A.correct ? A.points : 0 : S == null ? void 0 : S.points;
665
658
  }, [
666
- g,
667
- $,
668
- k,
659
+ C,
660
+ A,
661
+ S,
669
662
  d,
670
- U,
663
+ j,
671
664
  c,
672
- S
673
- ]), _e = x(() => c === f.PREDICTION && $ ? S ? S && k != null && k.youVoted ? "You won" : "" : "To win" : U || g ? "Time expired" : c === f.POLL ? "Time remaining" : $ ? "You won" : "To win", [g, c, $, U, S, k]), Qe = (c === f.TRIVIA || c === f.PREDICTION) && $ && S && (k == null ? void 0 : k.youVoted), Ue = $ || U || ce || c === f.TRIVIA && d === _.RESOLVED && C;
674
- return /* @__PURE__ */ n(Jt, { children: /* @__PURE__ */ n(Gt, { children: /* @__PURE__ */ p(Xt, { children: [
665
+ k
666
+ ]), Ne = M(() => c === f.PREDICTION && A ? k ? k && S != null && S.youVoted ? "You won" : "" : "To win" : j || C ? "Time expired" : c === f.POLL ? "Time remaining" : A ? "You won" : "To win", [C, c, A, j, k, S]), De = (c === f.TRIVIA || c === f.PREDICTION) && A && k && (S == null ? void 0 : S.youVoted), Oe = A || j || re || c === f.TRIVIA && d === V.RESOLVED && y;
667
+ return /* @__PURE__ */ n(Zt, { children: /* @__PURE__ */ n(Ht, { children: /* @__PURE__ */ p(Gt, { children: [
675
668
  /* @__PURE__ */ n(
676
- Zt,
669
+ zt,
677
670
  {
678
671
  feedbackMessages: se,
679
- questionVoted: !!$,
680
- questionVotedCorrectly: $ == null ? void 0 : $.correct,
672
+ questionVoted: !!A,
673
+ questionVotedCorrectly: A == null ? void 0 : A.correct,
681
674
  questionType: c,
682
- hasCorrectAnswer: S,
675
+ hasCorrectAnswer: k,
683
676
  questionStatus: d,
684
- showExpiredNotification: U,
685
- showClosedNotificationTrivia: ce,
677
+ showExpiredNotification: j,
678
+ showClosedNotificationTrivia: re,
686
679
  votedInCurrentRender: v,
687
680
  votedAfterQuestionClosed: I,
688
- enteredAnActiveQuestion: C,
681
+ enteredAnActiveQuestion: y,
689
682
  marketClosed: h
690
683
  }
691
684
  ),
692
- de && /* @__PURE__ */ n(
693
- Qs,
685
+ ae && /* @__PURE__ */ n(
686
+ Ms,
694
687
  {
695
- title: _e,
696
- points: Ve,
688
+ title: Ne,
689
+ points: qe,
697
690
  onTimerExpired: ee,
698
691
  questionType: e.type,
699
692
  isTimer: !t,
700
- isPlayingTimer: !$,
701
- animatePoints: Qe,
702
- timerDuration: Ue ? 0 : Number(((l = e == null ? void 0 : e.appearance) == null ? void 0 : l.autoHideInterval) || "30")
693
+ isPlayingTimer: !A,
694
+ animatePoints: De,
695
+ timerDuration: Oe ? 0 : Number(((l = e == null ? void 0 : e.appearance) == null ? void 0 : l.autoHideInterval) || "30")
703
696
  }
704
697
  ),
705
- g ? /* @__PURE__ */ n(
706
- Bt,
698
+ C ? /* @__PURE__ */ n(
699
+ jt,
707
700
  {
708
701
  title: "More to come...",
709
702
  description: "Watch for additional enhanced stream interactive experience."
710
703
  }
711
- ) : /* @__PURE__ */ p(P, { children: [
712
- /* @__PURE__ */ n(es, { style: de ? {} : { marginTop: 0 }, children: a }),
713
- /* @__PURE__ */ n(ts, { children: te.map((L) => /* @__PURE__ */ n(
714
- gs,
704
+ ) : /* @__PURE__ */ p(x, { children: [
705
+ /* @__PURE__ */ n(Kt, { style: ae ? {} : { marginTop: 0 }, children: a }),
706
+ /* @__PURE__ */ n(Xt, { children: te.map((L) => /* @__PURE__ */ n(
707
+ fs,
715
708
  {
716
709
  ...L,
717
- markThatVoted: M,
710
+ markThatVoted: O,
718
711
  votedAfterQuestionClosed: I,
719
- enteredAnActiveQuestion: C,
712
+ enteredAnActiveQuestion: y,
720
713
  marketClosed: h
721
714
  },
722
715
  L.id
723
716
  )) })
724
717
  ] })
725
718
  ] }) }) });
726
- }, js = /* @__PURE__ */ o("div")({
719
+ }, _s = /* @__PURE__ */ r("div")({
727
720
  name: "Container",
728
721
  class: "cgn5uen",
729
722
  propsAsIs: !1
730
- }), Ws = /* @__PURE__ */ o("div")({
723
+ }), Qs = /* @__PURE__ */ r("div")({
731
724
  name: "Content",
732
725
  class: "c1px8nt6",
733
726
  propsAsIs: !1
734
- }), Bs = /* @__PURE__ */ o("h3")({
727
+ }), js = /* @__PURE__ */ r("h3")({
735
728
  name: "Title",
736
729
  class: "t5et2jt",
737
730
  propsAsIs: !1
738
- }), zs = /* @__PURE__ */ o("div")({
731
+ }), Us = /* @__PURE__ */ r("div")({
739
732
  name: "Description",
740
733
  class: "d1i2kpk2",
741
734
  propsAsIs: !1
742
- }), Fs = /* @__PURE__ */ o("div")({
743
- name: "DateWrap",
744
- class: "dd3lh3p",
745
- propsAsIs: !1
746
- }), Hs = /* @__PURE__ */ o("img")({
735
+ }), Ws = /* @__PURE__ */ r("img")({
747
736
  name: "Image",
748
- class: "i1gfjeu5",
749
- propsAsIs: !1
750
- }), Ne = ({ created: e, instantView: t, isDetail: s, notification: r }) => {
751
- const i = x(() => {
752
- if (e) {
753
- const h = new Date(e);
754
- if (le(h))
755
- return {
756
- date: oe(h),
757
- time: ae(h)
758
- };
759
- }
760
- return null;
761
- }, [e]), l = t == null ? void 0 : t.heading, a = t == null ? void 0 : t.body, c = l || a, d = r == null ? void 0 : r.title, u = r == null ? void 0 : r.body;
762
- return /* @__PURE__ */ p(js, { children: [
763
- i && /* @__PURE__ */ p(Fs, { children: [
764
- i.date,
765
- " · ",
766
- i.time
767
- ] }),
768
- (t == null ? void 0 : t.video) && /* @__PURE__ */ n(ze, { source: t.video.url, poster: t.video.thumbnailUrl }),
769
- (t == null ? void 0 : t.image) && !(t != null && t.video) && /* @__PURE__ */ n(Hs, { src: t == null ? void 0 : t.image }),
770
- /* @__PURE__ */ p(Ws, { children: [
771
- /* @__PURE__ */ n(Bs, { children: s && c ? l : d }),
772
- /* @__PURE__ */ n(zs, { children: s && c ? a : u })
737
+ class: "id3lh3p",
738
+ propsAsIs: !1
739
+ }), Le = ({ instantView: e, isDetail: t, notification: s }) => {
740
+ const o = e == null ? void 0 : e.heading, i = e == null ? void 0 : e.body, l = o || i, a = s == null ? void 0 : s.title, c = s == null ? void 0 : s.body;
741
+ return /* @__PURE__ */ p(_s, { children: [
742
+ (e == null ? void 0 : e.video) && /* @__PURE__ */ n(Qe, { source: e.video.url, poster: e.video.thumbnailUrl }),
743
+ (e == null ? void 0 : e.image) && !(e != null && e.video) && /* @__PURE__ */ n(Ws, { src: e == null ? void 0 : e.image }),
744
+ /* @__PURE__ */ p(Qs, { children: [
745
+ /* @__PURE__ */ n(js, { children: t && l ? o : a }),
746
+ /* @__PURE__ */ n(Us, { children: t && l ? i : c })
773
747
  ] })
774
748
  ] });
775
- }, Ys = /* @__PURE__ */ o("div")({
749
+ }, Bs = /* @__PURE__ */ r("div")({
776
750
  name: "Container",
777
751
  class: "c1euiow",
778
752
  propsAsIs: !1
779
- }), Zs = /* @__PURE__ */ o("a")({
753
+ }), Fs = /* @__PURE__ */ r("a")({
780
754
  name: "WebLinkBtn",
781
755
  class: "w19zie3h",
782
756
  propsAsIs: !1
783
- }), Gs = ({ instantView: e, ...t }) => /* @__PURE__ */ p(Ys, { children: [
784
- /* @__PURE__ */ n(Ne, { instantView: e, ...t, isDetail: !0 }),
785
- (e == null ? void 0 : e.webLink) && /* @__PURE__ */ p(Zs, { href: e == null ? void 0 : e.webLink.url, target: "_blank", children: [
757
+ }), zs = ({ instantView: e, ...t }) => /* @__PURE__ */ p(Bs, { children: [
758
+ /* @__PURE__ */ n(Le, { instantView: e, ...t, isDetail: !0 }),
759
+ (e == null ? void 0 : e.webLink) && /* @__PURE__ */ p(Fs, { href: e == null ? void 0 : e.webLink.url, target: "_blank", children: [
786
760
  e == null ? void 0 : e.webLink.label,
787
761
  /* @__PURE__ */ n(R, { name: "icon-external-link" })
788
762
  ] })
789
- ] }), Ks = /* @__PURE__ */ o("div")({
763
+ ] }), Hs = /* @__PURE__ */ r("div")({
790
764
  name: "Container",
791
765
  class: "c1dcxmvf",
792
766
  propsAsIs: !1
793
- }), Js = /* @__PURE__ */ o("div")({
794
- name: "DateTime",
795
- class: "db4q22c",
796
- propsAsIs: !1
797
- }), Xs = /* @__PURE__ */ o("blockquote")({
767
+ }), Ys = /* @__PURE__ */ r("blockquote")({
798
768
  name: "Quote",
799
- class: "q111mmic",
800
- propsAsIs: !1
801
- }), en = ({ created: e, ...t }) => {
802
- const s = x(() => {
803
- if (e) {
804
- const r = new Date(e);
805
- if (le(r))
806
- return {
807
- date: oe(r),
808
- time: ae(r)
809
- };
810
- }
811
- return null;
812
- }, [e]);
813
- return /* @__PURE__ */ p(Ks, { children: [
814
- s && /* @__PURE__ */ p(Js, { children: [
815
- s.date,
816
- " · ",
817
- s.time
818
- ] }),
819
- t.title && /* @__PURE__ */ n(Xs, { children: t.title }),
820
- /* @__PURE__ */ n(be, { ...t })
821
- ] });
822
- }, tn = /* @__PURE__ */ o("div")({
769
+ class: "qb4q22c",
770
+ propsAsIs: !1
771
+ }), Zs = (e) => /* @__PURE__ */ p(Hs, { children: [
772
+ e.title && /* @__PURE__ */ n(Ys, { children: e.title }),
773
+ /* @__PURE__ */ n(ye, { ...e, isDetail: !0 })
774
+ ] }), Gs = /* @__PURE__ */ r("div")({
823
775
  name: "QuestionContainer",
824
776
  class: "qdri6g3",
825
777
  propsAsIs: !1
826
- }), sn = ({
778
+ }), Ks = ({
827
779
  openedQuestion: e
828
780
  }) => {
829
781
  var t, s;
830
- return ((t = e == null ? void 0 : e.attributes) == null ? void 0 : t.attributes.case) === "insight" ? /* @__PURE__ */ n(Gs, {
831
- created: e.attributes.created,
782
+ return ((t = e == null ? void 0 : e.attributes) == null ? void 0 : t.attributes.case) === "insight" ? /* @__PURE__ */ n(zs, {
832
783
  ...e.attributes.attributes.value
833
- }) : ((s = e == null ? void 0 : e.attributes) == null ? void 0 : s.attributes.case) === "tweet" ? /* @__PURE__ */ n(en, {
834
- created: e.attributes.created,
784
+ }) : ((s = e == null ? void 0 : e.attributes) == null ? void 0 : s.attributes.case) === "tweet" ? /* @__PURE__ */ n(Zs, {
835
785
  ...e.attributes.attributes.value
836
786
  }) : null;
837
- }, nn = ({
787
+ }, Xs = ({
838
788
  extendedQuestion: e,
839
789
  vote: t,
840
790
  close: s
841
791
  }) => {
842
792
  const {
843
- loading: r,
793
+ loading: o,
844
794
  data: i
845
795
  } = e;
846
- return i ? /* @__PURE__ */ n(Us, {
796
+ return i ? /* @__PURE__ */ n(Vs, {
847
797
  vote: t,
848
798
  close: s,
849
799
  openedQuestion: i,
850
- isLoading: !!r
800
+ isLoading: !!o
851
801
  }) : null;
852
- }, rn = ({
802
+ }, Js = ({
853
803
  gamification: e
854
804
  }) => {
855
805
  var t;
856
- const s = O(e.openedQuestion.$store), r = O(e.openedQuestion.$extendedStore);
806
+ const s = q(e.openedQuestion.$store), o = q(e.openedQuestion.$extendedStore);
857
807
  if (!s)
858
808
  return null;
859
809
  const i = s.type;
860
- return /* @__PURE__ */ p(tn, {
861
- children: [/* @__PURE__ */ n(Se, {
810
+ return /* @__PURE__ */ p(Gs, {
811
+ children: [/* @__PURE__ */ n(we, {
862
812
  close: e.closeQuestion,
863
813
  type: ((t = s.attributes) == null ? void 0 : t.type) || f.UNSET
864
- }), i === "question" && /* @__PURE__ */ n(nn, {
814
+ }), i === "question" && /* @__PURE__ */ n(Xs, {
865
815
  vote: e.submitAnswer,
866
816
  close: e.closeQuestion,
867
- extendedQuestion: r
868
- }), i !== "question" && /* @__PURE__ */ n(sn, {
817
+ extendedQuestion: o
818
+ }), i !== "question" && /* @__PURE__ */ n(Ks, {
869
819
  openedQuestion: s
870
- }), /* @__PURE__ */ n(Qt, {
820
+ }), /* @__PURE__ */ n(Mt, {
871
821
  sponsorLogo: ""
872
822
  })]
873
823
  });
874
- }, on = /* @__PURE__ */ o("div")({
824
+ }, en = /* @__PURE__ */ r("div")({
875
825
  name: "Container",
876
826
  class: "c115qtkr",
877
827
  propsAsIs: !1
878
- }), an = /* @__PURE__ */ o("div")({
828
+ }), tn = /* @__PURE__ */ r("div")({
879
829
  name: "STabs",
880
830
  class: "sxnslc8",
881
831
  propsAsIs: !1
882
- }), ln = /* @__PURE__ */ o("button")({
832
+ }), sn = /* @__PURE__ */ r("button")({
883
833
  name: "Button",
884
834
  class: "b1umzux0",
885
835
  propsAsIs: !1
886
- }), cn = /* @__PURE__ */ o("span")({
836
+ }), nn = /* @__PURE__ */ r("span")({
887
837
  name: "Title",
888
838
  class: "tspsaas",
889
839
  propsAsIs: !1
890
840
  });
891
841
  var X = /* @__PURE__ */ ((e) => (e.HOME = "home", e.LEADERBOARD = "leaderboard", e))(X || {});
892
- const Ce = ({ title: e, active: t, onClick: s }) => /* @__PURE__ */ n(ln, { onClick: s, "data-selected": t, children: /* @__PURE__ */ n(cn, { children: e }) }), dn = ({ activePage: e = "home", toggleActivePage: t }) => /* @__PURE__ */ n(on, { children: /* @__PURE__ */ p(an, { "data-position": e === "home" ? "left" : "right", children: [
893
- /* @__PURE__ */ n(Ce, { title: "Home", active: e === "home", onClick: () => t(
842
+ const me = ({ title: e, active: t, onClick: s }) => /* @__PURE__ */ n(sn, { onClick: s, "data-selected": t, children: /* @__PURE__ */ n(nn, { children: e }) }), on = ({ activePage: e = "home", toggleActivePage: t }) => /* @__PURE__ */ n(en, { children: /* @__PURE__ */ p(tn, { "data-position": e === "home" ? "left" : "right", children: [
843
+ /* @__PURE__ */ n(me, { title: "Home", active: e === "home", onClick: () => t(
894
844
  "home"
895
845
  /* HOME */
896
846
  ) }),
897
847
  /* @__PURE__ */ n(
898
- Ce,
848
+ me,
899
849
  {
900
850
  title: "Friends",
901
851
  active: e === "leaderboard",
@@ -905,54 +855,54 @@ const Ce = ({ title: e, active: t, onClick: s }) => /* @__PURE__ */ n(ln, { onCl
905
855
  )
906
856
  }
907
857
  )
908
- ] }) }), pn = /* @__PURE__ */ o("div")({
858
+ ] }) }), rn = /* @__PURE__ */ r("div")({
909
859
  name: "Container",
910
860
  class: "c1ux29ft",
911
861
  propsAsIs: !1
912
- }), un = /* @__PURE__ */ o("img")({
862
+ }), an = /* @__PURE__ */ r("img")({
913
863
  name: "FriendsIcon",
914
864
  class: "f10ncfg2",
915
865
  propsAsIs: !1
916
- }), hn = /* @__PURE__ */ o("div")({
866
+ }), ln = /* @__PURE__ */ r("div")({
917
867
  name: "Content",
918
868
  class: "c1yc07bd",
919
869
  propsAsIs: !1
920
- }), mn = /* @__PURE__ */ o("div")({
870
+ }), cn = /* @__PURE__ */ r("div")({
921
871
  name: "Title",
922
872
  class: "tj6cq7w",
923
873
  propsAsIs: !1
924
- }), vn = /* @__PURE__ */ o("div")({
874
+ }), dn = /* @__PURE__ */ r("div")({
925
875
  name: "Description",
926
876
  class: "d1ag78xo",
927
877
  propsAsIs: !1
928
- }), fn = () => R, In = /* @__PURE__ */ o(fn())({
878
+ }), pn = () => R, un = /* @__PURE__ */ r(pn())({
929
879
  name: "ArrowInviteIcon",
930
880
  class: "awohrz6",
931
881
  propsAsIs: !0
932
- }), Cn = "data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='32'%20height='32'%20rx='16'%20fill='white'/%3e%3cpath%20d='M10.4615%2012.6875C9.44231%2012.6875%208.61538%2013.4665%208.61538%2014.4266C8.61538%2015.3868%209.44231%2016.1658%2010.4615%2016.1658C11.4808%2016.1658%2012.3077%2015.3868%2012.3077%2014.4266C12.3077%2013.4665%2011.4808%2012.6875%2010.4615%2012.6875ZM10.4615%2016.1658C9.10817%2016.1658%208%2017.2097%208%2018.4846V19.7527C8%2019.7527%208.61538%2020.2237%2010.4615%2020.2237C12.3077%2020.2237%2012.9231%2019.7527%2012.9231%2019.7527V18.4846C12.9231%2017.2097%2011.8149%2016.1658%2010.4615%2016.1658ZM21.5385%2012.6875C20.5192%2012.6875%2019.6923%2013.4665%2019.6923%2014.4266C19.6923%2015.3868%2020.5192%2016.1658%2021.5385%2016.1658C22.5577%2016.1658%2023.3846%2015.3868%2023.3846%2014.4266C23.3846%2013.4665%2022.5577%2012.6875%2021.5385%2012.6875ZM21.5385%2016.1658C20.1851%2016.1658%2019.0769%2017.2097%2019.0769%2018.4846V19.7527C19.0769%2019.7527%2019.6923%2020.2237%2021.5385%2020.2237C23.3846%2020.2237%2024%2019.7527%2024%2019.7527V18.4846C24%2017.2097%2022.8918%2016.1658%2021.5385%2016.1658ZM16%2015.0063C14.9808%2015.0063%2014.1538%2015.7853%2014.1538%2016.7455C14.1538%2017.7056%2014.9808%2018.4846%2016%2018.4846C17.0192%2018.4846%2017.8462%2017.7056%2017.8462%2016.7455C17.8462%2015.7853%2017.0192%2015.0063%2016%2015.0063ZM16%2018.4846C14.6466%2018.4846%2013.5385%2019.5285%2013.5385%2020.8034V22.0715C13.5385%2022.0715%2014.1538%2022.5425%2016%2022.5425C17.8462%2022.5425%2018.4615%2022.0715%2018.4615%2022.0715V20.8034C18.4615%2019.5285%2017.3534%2018.4846%2016%2018.4846Z'%20fill='%23107D57'/%3e%3cpath%20opacity='0.5'%20d='M13.3908%209C12.3103%209%2011.4336%209.82584%2011.4336%2010.8437C11.4336%2011.8616%2012.3103%2012.6875%2013.3908%2012.6875C14.4713%2012.6875%2015.348%2011.8616%2015.348%2010.8437C15.348%209.82584%2014.4713%209%2013.3908%209ZM13.3908%2012.6875C13.1946%2012.6875%2012.9958%2012.6827%2012.7996%2012.7451C13.192%2013.2372%2013.3908%2013.8542%2013.3908%2014.5312C13.3908%2014.7761%2013.3296%2015.0161%2013.3296%2015.261C13.8521%2014.524%2014.6956%2014.0391%2015.6742%2013.9166C15.218%2013.1796%2014.3694%2012.6875%2013.3908%2012.6875ZM18.61%209C17.5295%209%2016.6528%209.82584%2016.6528%2010.8437C16.6528%2011.8616%2017.5295%2012.6875%2018.61%2012.6875C19.6905%2012.6875%2020.5672%2011.8616%2020.5672%2010.8437C20.5672%209.82584%2019.6905%209%2018.61%209ZM18.61%2012.6875C17.6314%2012.6875%2016.7828%2013.1796%2016.3266%2013.9166C17.3052%2014.0391%2018.1487%2014.524%2018.6712%2015.261C18.6712%2015.0161%2018.61%2014.7761%2018.61%2014.5312C18.61%2013.8542%2018.8088%2013.2372%2019.2012%2012.7451C19.005%2012.6827%2018.8062%2012.6875%2018.61%2012.6875Z'%20fill='%23107D57'/%3e%3c/svg%3e", gn = ({ title: e, description: t, onClick: s, className: r }) => /* @__PURE__ */ p(pn, { onClick: s, className: r, children: [
933
- /* @__PURE__ */ n(un, { alt: "friends-icon", src: Cn }),
934
- /* @__PURE__ */ p(hn, { children: [
935
- /* @__PURE__ */ n(mn, { children: e }),
936
- /* @__PURE__ */ n(vn, { children: t })
882
+ }), hn = "data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='32'%20height='32'%20rx='16'%20fill='white'/%3e%3cpath%20d='M10.4615%2012.6875C9.44231%2012.6875%208.61538%2013.4665%208.61538%2014.4266C8.61538%2015.3868%209.44231%2016.1658%2010.4615%2016.1658C11.4808%2016.1658%2012.3077%2015.3868%2012.3077%2014.4266C12.3077%2013.4665%2011.4808%2012.6875%2010.4615%2012.6875ZM10.4615%2016.1658C9.10817%2016.1658%208%2017.2097%208%2018.4846V19.7527C8%2019.7527%208.61538%2020.2237%2010.4615%2020.2237C12.3077%2020.2237%2012.9231%2019.7527%2012.9231%2019.7527V18.4846C12.9231%2017.2097%2011.8149%2016.1658%2010.4615%2016.1658ZM21.5385%2012.6875C20.5192%2012.6875%2019.6923%2013.4665%2019.6923%2014.4266C19.6923%2015.3868%2020.5192%2016.1658%2021.5385%2016.1658C22.5577%2016.1658%2023.3846%2015.3868%2023.3846%2014.4266C23.3846%2013.4665%2022.5577%2012.6875%2021.5385%2012.6875ZM21.5385%2016.1658C20.1851%2016.1658%2019.0769%2017.2097%2019.0769%2018.4846V19.7527C19.0769%2019.7527%2019.6923%2020.2237%2021.5385%2020.2237C23.3846%2020.2237%2024%2019.7527%2024%2019.7527V18.4846C24%2017.2097%2022.8918%2016.1658%2021.5385%2016.1658ZM16%2015.0063C14.9808%2015.0063%2014.1538%2015.7853%2014.1538%2016.7455C14.1538%2017.7056%2014.9808%2018.4846%2016%2018.4846C17.0192%2018.4846%2017.8462%2017.7056%2017.8462%2016.7455C17.8462%2015.7853%2017.0192%2015.0063%2016%2015.0063ZM16%2018.4846C14.6466%2018.4846%2013.5385%2019.5285%2013.5385%2020.8034V22.0715C13.5385%2022.0715%2014.1538%2022.5425%2016%2022.5425C17.8462%2022.5425%2018.4615%2022.0715%2018.4615%2022.0715V20.8034C18.4615%2019.5285%2017.3534%2018.4846%2016%2018.4846Z'%20fill='%23107D57'/%3e%3cpath%20opacity='0.5'%20d='M13.3908%209C12.3103%209%2011.4336%209.82584%2011.4336%2010.8437C11.4336%2011.8616%2012.3103%2012.6875%2013.3908%2012.6875C14.4713%2012.6875%2015.348%2011.8616%2015.348%2010.8437C15.348%209.82584%2014.4713%209%2013.3908%209ZM13.3908%2012.6875C13.1946%2012.6875%2012.9958%2012.6827%2012.7996%2012.7451C13.192%2013.2372%2013.3908%2013.8542%2013.3908%2014.5312C13.3908%2014.7761%2013.3296%2015.0161%2013.3296%2015.261C13.8521%2014.524%2014.6956%2014.0391%2015.6742%2013.9166C15.218%2013.1796%2014.3694%2012.6875%2013.3908%2012.6875ZM18.61%209C17.5295%209%2016.6528%209.82584%2016.6528%2010.8437C16.6528%2011.8616%2017.5295%2012.6875%2018.61%2012.6875C19.6905%2012.6875%2020.5672%2011.8616%2020.5672%2010.8437C20.5672%209.82584%2019.6905%209%2018.61%209ZM18.61%2012.6875C17.6314%2012.6875%2016.7828%2013.1796%2016.3266%2013.9166C17.3052%2014.0391%2018.1487%2014.524%2018.6712%2015.261C18.6712%2015.0161%2018.61%2014.7761%2018.61%2014.5312C18.61%2013.8542%2018.8088%2013.2372%2019.2012%2012.7451C19.005%2012.6827%2018.8062%2012.6875%2018.61%2012.6875Z'%20fill='%23107D57'/%3e%3c/svg%3e", mn = ({ title: e, description: t, onClick: s, className: o }) => /* @__PURE__ */ p(rn, { onClick: s, className: o, children: [
883
+ /* @__PURE__ */ n(an, { alt: "friends-icon", src: hn }),
884
+ /* @__PURE__ */ p(ln, { children: [
885
+ /* @__PURE__ */ n(cn, { children: e }),
886
+ /* @__PURE__ */ n(dn, { children: t })
937
887
  ] }),
938
- /* @__PURE__ */ n(In, { name: "icon-copy" })
888
+ /* @__PURE__ */ n(un, { name: "icon-copy" })
939
889
  ] });
940
- function An(e) {
941
- var t = e.lastRenderedStartIndex, s = e.lastRenderedStopIndex, r = e.startIndex, i = e.stopIndex;
942
- return !(r > s || i < t);
890
+ function vn(e) {
891
+ var t = e.lastRenderedStartIndex, s = e.lastRenderedStopIndex, o = e.startIndex, i = e.stopIndex;
892
+ return !(o > s || i < t);
943
893
  }
944
- function yn(e) {
945
- for (var t = e.isItemLoaded, s = e.itemCount, r = e.minimumBatchSize, i = e.startIndex, l = e.stopIndex, a = [], c = null, d = null, u = i; u <= l; u++) {
894
+ function fn(e) {
895
+ for (var t = e.isItemLoaded, s = e.itemCount, o = e.minimumBatchSize, i = e.startIndex, l = e.stopIndex, a = [], c = null, d = null, u = i; u <= l; u++) {
946
896
  var h = t(u);
947
897
  h ? d !== null && (a.push(c, d), c = d = null) : (d = u, c === null && (c = u));
948
898
  }
949
899
  if (d !== null) {
950
- for (var v = Math.min(Math.max(d, c + r - 1), s - 1), m = d + 1; m <= v && !t(m); m++)
900
+ for (var v = Math.min(Math.max(d, c + o - 1), s - 1), m = d + 1; m <= v && !t(m); m++)
951
901
  d = m;
952
902
  a.push(c, d);
953
903
  }
954
904
  if (a.length)
955
- for (; a[1] - a[0] + 1 < r && a[0] > 0; ) {
905
+ for (; a[1] - a[0] + 1 < o && a[0] > 0; ) {
956
906
  var I = a[0] - 1;
957
907
  if (!t(I))
958
908
  a[0] = I;
@@ -961,20 +911,20 @@ function yn(e) {
961
911
  }
962
912
  return a;
963
913
  }
964
- var $n = function(e, t) {
914
+ var In = function(e, t) {
965
915
  if (!(e instanceof t))
966
916
  throw new TypeError("Cannot call a class as a function");
967
- }, bn = /* @__PURE__ */ function() {
917
+ }, Cn = /* @__PURE__ */ function() {
968
918
  function e(t, s) {
969
- for (var r = 0; r < s.length; r++) {
970
- var i = s[r];
919
+ for (var o = 0; o < s.length; o++) {
920
+ var i = s[o];
971
921
  i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i);
972
922
  }
973
923
  }
974
- return function(t, s, r) {
975
- return s && e(t.prototype, s), r && e(t, r), t;
924
+ return function(t, s, o) {
925
+ return s && e(t.prototype, s), o && e(t, o), t;
976
926
  };
977
- }(), wn = function(e, t) {
927
+ }(), gn = function(e, t) {
978
928
  if (typeof t != "function" && t !== null)
979
929
  throw new TypeError("Super expression must either be null or a function, not " + typeof t);
980
930
  e.prototype = Object.create(t && t.prototype, {
@@ -985,30 +935,30 @@ var $n = function(e, t) {
985
935
  configurable: !0
986
936
  }
987
937
  }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
988
- }, ge = function(e, t) {
938
+ }, ve = function(e, t) {
989
939
  if (!e)
990
940
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
991
941
  return t && (typeof t == "object" || typeof t == "function") ? t : e;
992
942
  };
993
943
  (function(e) {
994
- wn(t, e);
944
+ gn(t, e);
995
945
  function t() {
996
- var s, r, i, l;
997
- $n(this, t);
946
+ var s, o, i, l;
947
+ In(this, t);
998
948
  for (var a = arguments.length, c = Array(a), d = 0; d < a; d++)
999
949
  c[d] = arguments[d];
1000
- return l = (r = (i = ge(this, (s = t.__proto__ || Object.getPrototypeOf(t)).call.apply(s, [this].concat(c))), i), i._lastRenderedStartIndex = -1, i._lastRenderedStopIndex = -1, i._memoizedUnloadedRanges = [], i._onItemsRendered = function(u) {
950
+ return l = (o = (i = ve(this, (s = t.__proto__ || Object.getPrototypeOf(t)).call.apply(s, [this].concat(c))), i), i._lastRenderedStartIndex = -1, i._lastRenderedStopIndex = -1, i._memoizedUnloadedRanges = [], i._onItemsRendered = function(u) {
1001
951
  var h = u.visibleStartIndex, v = u.visibleStopIndex;
1002
952
  i._lastRenderedStartIndex = h, i._lastRenderedStopIndex = v, i._ensureRowsLoaded(h, v);
1003
953
  }, i._setRef = function(u) {
1004
954
  i._listRef = u;
1005
- }, r), ge(i, l);
955
+ }, o), ve(i, l);
1006
956
  }
1007
- return bn(t, [{
957
+ return Cn(t, [{
1008
958
  key: "resetloadMoreItemsCache",
1009
959
  value: function() {
1010
- var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
1011
- this._memoizedUnloadedRanges = [], r && this._ensureRowsLoaded(this._lastRenderedStartIndex, this._lastRenderedStopIndex);
960
+ var o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
961
+ this._memoizedUnloadedRanges = [], o && this._ensureRowsLoaded(this._lastRenderedStartIndex, this._lastRenderedStopIndex);
1012
962
  }
1013
963
  }, {
1014
964
  key: "componentDidMount",
@@ -1017,33 +967,33 @@ var $n = function(e, t) {
1017
967
  }, {
1018
968
  key: "render",
1019
969
  value: function() {
1020
- var r = this.props.children;
1021
- return r({
970
+ var o = this.props.children;
971
+ return o({
1022
972
  onItemsRendered: this._onItemsRendered,
1023
973
  ref: this._setRef
1024
974
  });
1025
975
  }
1026
976
  }, {
1027
977
  key: "_ensureRowsLoaded",
1028
- value: function(r, i) {
1029
- var l = this.props, a = l.isItemLoaded, c = l.itemCount, d = l.minimumBatchSize, u = d === void 0 ? 10 : d, h = l.threshold, v = h === void 0 ? 15 : h, m = yn({
978
+ value: function(o, i) {
979
+ var l = this.props, a = l.isItemLoaded, c = l.itemCount, d = l.minimumBatchSize, u = d === void 0 ? 10 : d, h = l.threshold, v = h === void 0 ? 15 : h, m = fn({
1030
980
  isItemLoaded: a,
1031
981
  itemCount: c,
1032
982
  minimumBatchSize: u,
1033
- startIndex: Math.max(0, r - v),
983
+ startIndex: Math.max(0, o - v),
1034
984
  stopIndex: Math.min(c - 1, i + v)
1035
985
  });
1036
- (this._memoizedUnloadedRanges.length !== m.length || this._memoizedUnloadedRanges.some(function(I, w) {
1037
- return m[w] !== I;
986
+ (this._memoizedUnloadedRanges.length !== m.length || this._memoizedUnloadedRanges.some(function(I, $) {
987
+ return m[$] !== I;
1038
988
  })) && (this._memoizedUnloadedRanges = m, this._loadUnloadedRanges(m));
1039
989
  }
1040
990
  }, {
1041
991
  key: "_loadUnloadedRanges",
1042
- value: function(r) {
992
+ value: function(o) {
1043
993
  for (var i = this, l = this.props.loadMoreItems || this.props.loadMoreRows, a = function(u) {
1044
- var h = r[u], v = r[u + 1], m = l(h, v);
994
+ var h = o[u], v = o[u + 1], m = l(h, v);
1045
995
  m != null && m.then(function() {
1046
- if (An({
996
+ if (vn({
1047
997
  lastRenderedStartIndex: i._lastRenderedStartIndex,
1048
998
  lastRenderedStopIndex: i._lastRenderedStopIndex,
1049
999
  startIndex: h,
@@ -1054,53 +1004,53 @@ var $n = function(e, t) {
1054
1004
  typeof i._listRef.resetAfterIndex == "function" ? i._listRef.resetAfterIndex(h, !0) : (typeof i._listRef._getItemStyleCache == "function" && i._listRef._getItemStyleCache(-1), i._listRef.forceUpdate());
1055
1005
  }
1056
1006
  });
1057
- }, c = 0; c < r.length; c += 2)
1007
+ }, c = 0; c < o.length; c += 2)
1058
1008
  a(c);
1059
1009
  }
1060
1010
  }]), t;
1061
- })(st);
1062
- const Tn = /* @__PURE__ */ o("div")({
1011
+ })(Je);
1012
+ const An = /* @__PURE__ */ r("div")({
1063
1013
  name: "Container",
1064
1014
  class: "culdu4a",
1065
1015
  propsAsIs: !1
1066
- }), Rn = /* @__PURE__ */ o("div")({
1016
+ }), yn = /* @__PURE__ */ r("div")({
1067
1017
  name: "Position",
1068
1018
  class: "pwf8e69",
1069
1019
  propsAsIs: !1
1070
- }), Sn = /* @__PURE__ */ o("img")({
1020
+ }), $n = /* @__PURE__ */ r("img")({
1071
1021
  name: "Avatar",
1072
1022
  class: "atf4yh4",
1073
1023
  propsAsIs: !1
1074
- }), kn = /* @__PURE__ */ o("div")({
1024
+ }), bn = /* @__PURE__ */ r("div")({
1075
1025
  name: "AvatarPlaceholder",
1076
1026
  class: "a1dg29ja",
1077
1027
  propsAsIs: !1
1078
- }), Ln = /* @__PURE__ */ o("div")({
1028
+ }), wn = /* @__PURE__ */ r("div")({
1079
1029
  name: "Content",
1080
1030
  class: "c10a68rc",
1081
1031
  propsAsIs: !1
1082
- }), En = /* @__PURE__ */ o("div")({
1032
+ }), Tn = /* @__PURE__ */ r("div")({
1083
1033
  name: "NameContainer",
1084
1034
  class: "nc4kck5",
1085
1035
  propsAsIs: !1
1086
- }), xn = /* @__PURE__ */ o("span")({
1036
+ }), Rn = /* @__PURE__ */ r("span")({
1087
1037
  name: "Name",
1088
1038
  class: "njsrqgr",
1089
1039
  propsAsIs: !1
1090
- }), Pn = () => R, qn = /* @__PURE__ */ o(Pn())({
1040
+ }), kn = () => R, Sn = /* @__PURE__ */ r(kn())({
1091
1041
  name: "CurrentUserBadge",
1092
1042
  class: "c17uc4zr",
1093
1043
  propsAsIs: !0
1094
1044
  });
1095
- var De = { exports: {} }, Nn = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED", Dn = Nn, On = Dn;
1096
- function Oe() {
1045
+ var Ee = { exports: {} }, Ln = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED", En = Ln, xn = En;
1046
+ function xe() {
1097
1047
  }
1098
- function Me() {
1048
+ function Pe() {
1099
1049
  }
1100
- Me.resetWarningCache = Oe;
1101
- var Mn = function() {
1102
- function e(r, i, l, a, c, d) {
1103
- if (d !== On) {
1050
+ Pe.resetWarningCache = xe;
1051
+ var Pn = function() {
1052
+ function e(o, i, l, a, c, d) {
1053
+ if (d !== xn) {
1104
1054
  var u = new Error(
1105
1055
  "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
1106
1056
  );
@@ -1131,15 +1081,15 @@ var Mn = function() {
1131
1081
  oneOfType: t,
1132
1082
  shape: t,
1133
1083
  exact: t,
1134
- checkPropTypes: Me,
1135
- resetWarningCache: Oe
1084
+ checkPropTypes: Pe,
1085
+ resetWarningCache: xe
1136
1086
  };
1137
1087
  return s.PropTypes = s, s;
1138
1088
  };
1139
- De.exports = Mn();
1140
- var Vn = De.exports;
1141
- const E = /* @__PURE__ */ Fe(Vn);
1142
- class ie extends nt {
1089
+ Ee.exports = Pn();
1090
+ var qn = Ee.exports;
1091
+ const E = /* @__PURE__ */ je(qn);
1092
+ class ie extends et {
1143
1093
  constructor(t) {
1144
1094
  super(t), this.scrollListener = this.scrollListener.bind(this), this.eventListenerOptions = this.eventListenerOptions.bind(this), this.mousewheelListener = this.mousewheelListener.bind(this);
1145
1095
  }
@@ -1232,14 +1182,14 @@ class ie extends nt {
1232
1182
  t.deltaY === 1 && !this.isPassiveSupported() && t.preventDefault();
1233
1183
  }
1234
1184
  scrollListener() {
1235
- const t = this.scrollComponent, s = window, r = this.getParentElement(t);
1185
+ const t = this.scrollComponent, s = window, o = this.getParentElement(t);
1236
1186
  let i;
1237
1187
  if (this.props.useWindow) {
1238
1188
  const l = document.documentElement || document.body.parentNode || document.body, a = s.pageYOffset !== void 0 ? s.pageYOffset : l.scrollTop;
1239
1189
  this.props.isReverse ? i = a : i = this.calculateOffset(t, a);
1240
1190
  } else
1241
- this.props.isReverse ? i = r.scrollTop : i = t.scrollHeight - r.scrollTop - r.clientHeight;
1242
- i < Number(this.props.threshold) && t && t.offsetParent !== null && (this.detachScrollListener(), this.beforeScrollHeight = r.scrollHeight, this.beforeScrollTop = r.scrollTop, typeof this.props.loadMore == "function" && (this.props.loadMore(this.pageLoaded += 1), this.loadMore = !0));
1191
+ this.props.isReverse ? i = o.scrollTop : i = t.scrollHeight - o.scrollTop - o.clientHeight;
1192
+ i < Number(this.props.threshold) && t && t.offsetParent !== null && (this.detachScrollListener(), this.beforeScrollHeight = o.scrollHeight, this.beforeScrollTop = o.scrollTop, typeof this.props.loadMore == "function" && (this.props.loadMore(this.pageLoaded += 1), this.loadMore = !0));
1243
1193
  }
1244
1194
  calculateOffset(t, s) {
1245
1195
  return t ? this.calculateTopPosition(t) + (t.offsetHeight - s - window.innerHeight) : 0;
@@ -1250,7 +1200,7 @@ class ie extends nt {
1250
1200
  render() {
1251
1201
  const t = this.filterProps(this.props), {
1252
1202
  children: s,
1253
- element: r,
1203
+ element: o,
1254
1204
  hasMore: i,
1255
1205
  initialLoad: l,
1256
1206
  isReverse: a,
@@ -1261,14 +1211,14 @@ class ie extends nt {
1261
1211
  threshold: v,
1262
1212
  useCapture: m,
1263
1213
  useWindow: I,
1264
- getScrollParent: w,
1265
- ...C
1214
+ getScrollParent: $,
1215
+ ...y
1266
1216
  } = t;
1267
- C.ref = (g) => {
1268
- this.scrollComponent = g, h && h(g);
1217
+ y.ref = (C) => {
1218
+ this.scrollComponent = C, h && h(C);
1269
1219
  };
1270
- const y = [s];
1271
- return i && (c ? a ? y.unshift(c) : y.push(c) : this.defaultLoader && (a ? y.unshift(this.defaultLoader) : y.push(this.defaultLoader))), W.createElement(r, C, y);
1220
+ const g = [s];
1221
+ return i && (c ? a ? g.unshift(c) : g.push(c) : this.defaultLoader && (a ? g.unshift(this.defaultLoader) : g.push(this.defaultLoader))), W.createElement(o, y, g);
1272
1222
  }
1273
1223
  }
1274
1224
  ne(ie, "propTypes", {
@@ -1298,50 +1248,50 @@ ne(ie, "propTypes", {
1298
1248
  loader: null,
1299
1249
  getScrollParent: null
1300
1250
  });
1301
- const _n = ({
1251
+ const Nn = ({
1302
1252
  rank: e,
1303
1253
  avatar: t,
1304
1254
  name: s,
1305
- points: r,
1255
+ points: o,
1306
1256
  isCurrentUser: i,
1307
1257
  openItemDetail: l,
1308
1258
  style: a
1309
- }) => /* @__PURE__ */ p(Tn, { onClick: l, style: a, children: [
1310
- /* @__PURE__ */ n(Rn, { children: e || 0 }),
1311
- /* @__PURE__ */ p(Ln, { children: [
1312
- t ? /* @__PURE__ */ n(Sn, { alt: "leaderboard-item-avatar", src: t }) : /* @__PURE__ */ n(kn, { children: ke(s || "") }),
1313
- /* @__PURE__ */ p(En, { children: [
1314
- /* @__PURE__ */ n(xn, { children: s || "" }),
1315
- i && /* @__PURE__ */ n(qn, { name: "icon-star" })
1259
+ }) => /* @__PURE__ */ p(An, { onClick: l, style: a, children: [
1260
+ /* @__PURE__ */ n(yn, { children: e || 0 }),
1261
+ /* @__PURE__ */ p(wn, { children: [
1262
+ t ? /* @__PURE__ */ n($n, { alt: "leaderboard-item-avatar", src: t }) : /* @__PURE__ */ n(bn, { children: Ce(s || "") }),
1263
+ /* @__PURE__ */ p(Tn, { children: [
1264
+ /* @__PURE__ */ n(Rn, { children: s || "" }),
1265
+ i && /* @__PURE__ */ n(Sn, { name: "icon-star" })
1316
1266
  ] })
1317
1267
  ] }),
1318
- /* @__PURE__ */ n("div", { children: Le(r) })
1319
- ] }), Qn = /* @__PURE__ */ o("div")({
1268
+ /* @__PURE__ */ n("div", { children: ge(o) })
1269
+ ] }), Dn = /* @__PURE__ */ r("div")({
1320
1270
  name: "Container",
1321
1271
  class: "c16btbfp",
1322
1272
  propsAsIs: !1
1323
- }), Un = ({
1273
+ }), On = ({
1324
1274
  items: e,
1325
1275
  currentUserId: t,
1326
1276
  openItemDetail: s,
1327
- fetchMore: r,
1277
+ fetchMore: o,
1328
1278
  scrollNode: i,
1329
1279
  hasMore: l
1330
1280
  }) => /* @__PURE__ */ n(ie, {
1331
- loadMore: r,
1281
+ loadMore: o,
1332
1282
  initialLoad: !1,
1333
1283
  hasMore: l,
1334
1284
  useWindow: !1,
1335
1285
  getScrollParent: () => i.current,
1336
- children: /* @__PURE__ */ n(Qn, {
1337
- children: e.map((a) => /* @__PURE__ */ n(_n, {
1286
+ children: /* @__PURE__ */ n(Dn, {
1287
+ children: e.map((a) => /* @__PURE__ */ n(Nn, {
1338
1288
  ...a,
1339
1289
  openItemDetail: () => s(a.userId),
1340
1290
  isCurrentUser: !!t && t === a.userId
1341
1291
  }, a.userId))
1342
1292
  })
1343
- }), jn = ({ renderClipBoardNode: e, deepLink: t }) => /* @__PURE__ */ n(
1344
- He,
1293
+ }), Mn = ({ renderClipBoardNode: e, deepLink: t }) => /* @__PURE__ */ n(
1294
+ Ue,
1345
1295
  {
1346
1296
  renderToNode: e,
1347
1297
  inviteLink: t,
@@ -1360,29 +1310,29 @@ const _n = ({
1360
1310
  inviteCardTitle: "It’s More Fun With Friends",
1361
1311
  inviteCardSubtext: "Invite and compete against your friends for the top spot on the leaderboard."
1362
1312
  }
1363
- ), Wn = /* @__PURE__ */ o("div")({
1313
+ ), Vn = /* @__PURE__ */ r("div")({
1364
1314
  name: "InviteLinkContainer",
1365
1315
  class: "i1chxfpe",
1366
1316
  propsAsIs: !1
1367
- }), Bn = ({
1317
+ }), _n = ({
1368
1318
  gamification: e,
1369
1319
  scrollNode: t,
1370
1320
  scrollStore: s,
1371
- renderClipBoardNode: r
1321
+ renderClipBoardNode: o
1372
1322
  }) => {
1373
1323
  const {
1374
1324
  data: i,
1375
1325
  hasMore: l,
1376
1326
  loading: a,
1377
1327
  key: c
1378
- } = O(e.leaderboardList.$store), {
1328
+ } = q(e.leaderboardList.$store), {
1379
1329
  data: d
1380
- } = O(e.deepLink.$store), [u, h] = Ye(r);
1381
- return !i.length && !a ? /* @__PURE__ */ n(jn, {
1382
- renderClipBoardNode: r,
1330
+ } = q(e.deepLink.$store), [u, h] = We(o);
1331
+ return !i.length && !a ? /* @__PURE__ */ n(Mn, {
1332
+ renderClipBoardNode: o,
1383
1333
  deepLink: d
1384
- }) : /* @__PURE__ */ p(P, {
1385
- children: [/* @__PURE__ */ n(Un, {
1334
+ }) : /* @__PURE__ */ p(x, {
1335
+ children: [/* @__PURE__ */ n(On, {
1386
1336
  items: i,
1387
1337
  scrollNode: t,
1388
1338
  scrollStore: s,
@@ -1390,306 +1340,263 @@ const _n = ({
1390
1340
  hasMore: l,
1391
1341
  openItemDetail: e.openUser,
1392
1342
  currentUserId: e.currentUserId.get()
1393
- }, c), d && /* @__PURE__ */ n(Wn, {
1394
- children: /* @__PURE__ */ n(gn, {
1343
+ }, c), d && /* @__PURE__ */ n(Vn, {
1344
+ children: /* @__PURE__ */ n(mn, {
1395
1345
  onClick: () => u(d),
1396
1346
  title: "Invite Friends",
1397
1347
  description: "Challenge them now!"
1398
1348
  })
1399
1349
  }), h]
1400
1350
  });
1401
- }, zn = /* @__PURE__ */ o("div")({
1351
+ }, Qn = /* @__PURE__ */ r("div")({
1402
1352
  name: "QuestionItem",
1403
1353
  class: "q1w97g3p",
1404
1354
  propsAsIs: !1
1405
- }), Fn = /* @__PURE__ */ o("div")({
1355
+ }), jn = /* @__PURE__ */ r("div")({
1406
1356
  name: "QuestionCaption",
1407
1357
  class: "q2sl39u",
1408
1358
  propsAsIs: !1
1409
- }), Hn = /* @__PURE__ */ o("div")({
1359
+ }), Un = /* @__PURE__ */ r("div")({
1410
1360
  name: "QuestionBody",
1411
1361
  class: "qd5h0uc",
1412
1362
  propsAsIs: !1
1413
- }), Yn = /* @__PURE__ */ o("div")({
1363
+ }), Wn = /* @__PURE__ */ r("div")({
1414
1364
  name: "QuestionAction",
1415
1365
  class: "q105uluy",
1416
1366
  propsAsIs: !1
1417
- }), Zn = () => R, J = /* @__PURE__ */ o(Zn())({
1367
+ }), Bn = () => R, K = /* @__PURE__ */ r(Bn())({
1418
1368
  name: "QuestionActionIcon",
1419
1369
  class: "q1fa0b9h",
1420
1370
  propsAsIs: !0
1421
- }), Gn = () => R, Kn = /* @__PURE__ */ o(Gn())({
1371
+ }), Fn = () => R, zn = /* @__PURE__ */ r(Fn())({
1422
1372
  name: "QuestionTypeIcon",
1423
1373
  class: "qxlt78s",
1424
1374
  propsAsIs: !0
1425
- }), Jn = /* @__PURE__ */ o("div")({
1375
+ }), Hn = /* @__PURE__ */ r("div")({
1426
1376
  name: "QuestionTypeLabel",
1427
1377
  class: "qmg0vkx",
1428
1378
  propsAsIs: !1
1429
- }), Xn = /* @__PURE__ */ o("div")({
1379
+ }), Yn = /* @__PURE__ */ r("div")({
1430
1380
  name: "QuestionContent",
1431
1381
  class: "q1uz5j1g",
1432
1382
  propsAsIs: !1
1433
- }), er = /* @__PURE__ */ o("button")({
1383
+ }), Zn = /* @__PURE__ */ r("button")({
1434
1384
  name: "PlayButton",
1435
1385
  class: "p1pba9p1",
1436
1386
  propsAsIs: !1
1437
- }), tr = {
1438
- [Z.LOST]: /* @__PURE__ */ n(J, { name: "incorrectVoted" }),
1439
- [Z.WON]: /* @__PURE__ */ n(J, { name: "icon-check" }),
1440
- [Z.UNSET]: /* @__PURE__ */ n(J, { name: "icon-arrow" }),
1441
- [Z.DNP]: /* @__PURE__ */ n(J, { name: "icon-arrow" })
1442
- }, sr = ({
1387
+ }), Gn = {
1388
+ [Y.LOST]: /* @__PURE__ */ n(K, { name: "incorrectVoted" }),
1389
+ [Y.WON]: /* @__PURE__ */ n(K, { name: "icon-check" }),
1390
+ [Y.UNSET]: /* @__PURE__ */ n(K, { name: "icon-arrow" }),
1391
+ [Y.DNP]: /* @__PURE__ */ n(K, { name: "icon-arrow" })
1392
+ }, Kn = ({
1443
1393
  questionId: e,
1444
1394
  questionType: t,
1445
1395
  questionStatus: s,
1446
- subject: r,
1396
+ subject: o,
1447
1397
  openForVoting: i,
1448
1398
  openQuestion: l,
1449
1399
  status: a
1450
1400
  }) => {
1451
- const c = ye[t], d = tr[a];
1452
- return c ? /* @__PURE__ */ p(zn, { onClick: () => l == null ? void 0 : l(e), children: [
1453
- /* @__PURE__ */ p(Xn, { children: [
1454
- /* @__PURE__ */ p(Fn, { children: [
1401
+ const c = Ie[t], d = Gn[a];
1402
+ return c ? /* @__PURE__ */ p(Qn, { onClick: () => l == null ? void 0 : l(e), children: [
1403
+ /* @__PURE__ */ p(Yn, { children: [
1404
+ /* @__PURE__ */ p(jn, { children: [
1455
1405
  /* @__PURE__ */ n(
1456
- Kn,
1406
+ zn,
1457
1407
  {
1458
1408
  "data-type-trivia": t === f.TRIVIA,
1459
1409
  "data-type-poll": t === f.POLL,
1460
1410
  name: c.iconName
1461
1411
  }
1462
1412
  ),
1463
- /* @__PURE__ */ p(Jn, { children: [
1413
+ /* @__PURE__ */ p(Hn, { children: [
1464
1414
  c.label,
1465
- t === f.TRIVIA && s === _.RESOLVED && " • Expired"
1415
+ t === f.TRIVIA && s === V.RESOLVED && " • Expired"
1466
1416
  ] })
1467
1417
  ] }),
1468
- /* @__PURE__ */ n(Hn, { children: r || "" })
1418
+ /* @__PURE__ */ n(Un, { children: o || "" })
1469
1419
  ] }),
1470
- /* @__PURE__ */ n(Yn, { children: i ? /* @__PURE__ */ n(er, { children: "Play" }) : d })
1420
+ /* @__PURE__ */ n(Wn, { children: i ? /* @__PURE__ */ n(Zn, { children: "Play" }) : d })
1471
1421
  ] }) : null;
1472
- }, nr = /* @__PURE__ */ o("div")({
1422
+ }, Xn = /* @__PURE__ */ r("div")({
1473
1423
  name: "Container",
1474
1424
  class: "cll3md7",
1475
1425
  propsAsIs: !1
1476
- }), rr = /* @__PURE__ */ o("button")({
1426
+ }), Jn = /* @__PURE__ */ r("button")({
1477
1427
  name: "ActionBtn",
1478
1428
  class: "a10g1iik",
1479
1429
  propsAsIs: !1
1480
- }), ir = ({
1430
+ }), eo = ({
1481
1431
  openInsight: e,
1482
1432
  questionId: t,
1483
1433
  ...s
1484
- }) => /* @__PURE__ */ p(nr, { children: [
1485
- /* @__PURE__ */ n(Ne, { questionId: t, ...s }),
1486
- e && /* @__PURE__ */ n(rr, { onClick: () => e(t), children: "View Insight" })
1487
- ] }), or = /* @__PURE__ */ o("div")({
1434
+ }) => /* @__PURE__ */ p(Xn, { children: [
1435
+ /* @__PURE__ */ n(Le, { questionId: t, ...s }),
1436
+ e && /* @__PURE__ */ n(Jn, { onClick: () => e(t), children: "View Insight" })
1437
+ ] }), to = /* @__PURE__ */ r("div")({
1488
1438
  name: "Container",
1489
1439
  class: "cl56x6b",
1490
1440
  propsAsIs: !1
1491
- }), ar = () => Ze, lr = /* @__PURE__ */ o(ar())({
1441
+ }), so = () => Be, no = /* @__PURE__ */ r(so())({
1492
1442
  name: "ActionButton",
1493
1443
  class: "a11pzf92",
1494
1444
  propsAsIs: !0
1495
- }), cr = /* @__PURE__ */ o("div")({
1496
- name: "DateTime",
1497
- class: "d1hbaleq",
1498
- propsAsIs: !1
1499
- }), dr = /* @__PURE__ */ o("blockquote")({
1445
+ }), oo = /* @__PURE__ */ r("blockquote")({
1500
1446
  name: "Quote",
1501
- class: "qvvgqjm",
1447
+ class: "q1hbaleq",
1502
1448
  propsAsIs: !1
1503
- }), pr = ({
1449
+ }), io = ({
1504
1450
  openTweet: e,
1505
- created: t,
1506
- ...s
1507
- }) => {
1508
- const r = x(() => {
1509
- if (t) {
1510
- const i = new Date(t);
1511
- if (le(i))
1512
- return {
1513
- date: oe(i),
1514
- time: ae(i)
1515
- };
1516
- }
1517
- return null;
1518
- }, [t]);
1519
- return /* @__PURE__ */ p(or, { children: [
1520
- r && /* @__PURE__ */ p(cr, { children: [
1521
- r.date,
1522
- " · ",
1523
- r.time
1524
- ] }),
1525
- s.title && /* @__PURE__ */ n(dr, { children: s.title }),
1526
- /* @__PURE__ */ n(be, { ...s }),
1527
- e && /* @__PURE__ */ n(lr, { onClick: () => e(s.tweetId), children: "View Insight" })
1528
- ] });
1529
- }, ur = /* @__PURE__ */ o("div")({
1451
+ ...t
1452
+ }) => /* @__PURE__ */ p(to, { children: [
1453
+ t.title && /* @__PURE__ */ n(oo, { children: t.title }),
1454
+ /* @__PURE__ */ n(ye, { ...t }),
1455
+ e && /* @__PURE__ */ n(no, { onClick: () => e(t.tweetId), children: "View Insight" })
1456
+ ] }), ro = /* @__PURE__ */ r("div")({
1530
1457
  name: "QuestionsContainer",
1531
1458
  class: "qvghv3l",
1532
1459
  propsAsIs: !1
1533
- }), hr = ({ questions: e, openQuestion: t }) => /* @__PURE__ */ n(ur, { children: e == null ? void 0 : e.map((s) => {
1534
- var r, i, l;
1535
- if (s.type === "question" && ((r = s.attributes) == null ? void 0 : r.attributes.case) === "question") {
1460
+ }), ao = ({ questions: e, openQuestion: t }) => /* @__PURE__ */ n(ro, { children: e == null ? void 0 : e.map((s) => {
1461
+ var o, i, l;
1462
+ if (s.type === "question" && ((o = s.attributes) == null ? void 0 : o.attributes.case) === "question") {
1536
1463
  const a = s.attributes.attributes.value;
1537
- return /* @__PURE__ */ n(sr, { openQuestion: t, ...a }, a.questionId);
1464
+ return /* @__PURE__ */ n(Kn, { openQuestion: t, ...a }, a.questionId);
1538
1465
  }
1539
1466
  if (s.type === "insight" && ((i = s.attributes) == null ? void 0 : i.attributes.case) === "insight") {
1540
- const a = s.attributes.attributes.value, c = s.attributes.created;
1541
- return /* @__PURE__ */ n(ir, { openInsight: t, ...a, created: c }, a.questionId);
1467
+ const a = s.attributes.attributes.value;
1468
+ return /* @__PURE__ */ n(eo, { openInsight: t, ...a }, a.questionId);
1542
1469
  }
1543
1470
  if (s.type === "tweet" && ((l = s.attributes) == null ? void 0 : l.attributes.case) === "tweet") {
1544
- const a = s.attributes.attributes.value, c = s.attributes.id, d = s.attributes.created;
1545
- return /* @__PURE__ */ n(pr, { openTweet: t, ...a, tweetId: c, created: d }, c);
1471
+ const a = s.attributes.attributes.value, c = s.attributes.id;
1472
+ return /* @__PURE__ */ n(io, { openTweet: t, ...a, tweetId: c }, c);
1546
1473
  }
1547
1474
  return null;
1548
- }) }), mr = ({ store: e, openQuestion: t }) => {
1549
- const s = O(e);
1550
- return s != null && s.data ? /* @__PURE__ */ n(hr, { openQuestion: t, questions: s.data }) : /* @__PURE__ */ n("div", { children: "wait questions..." });
1551
- }, vr = ({ userSummary: e }) => {
1475
+ }) }), lo = ({ store: e, openQuestion: t }) => {
1476
+ const s = q(e);
1477
+ return s != null && s.data ? /* @__PURE__ */ n(ao, { openQuestion: t, questions: s.data }) : /* @__PURE__ */ n("div", { children: "wait questions..." });
1478
+ }, co = ({ userSummary: e }) => {
1552
1479
  var t;
1553
- const [s, r] = q(void 0);
1554
- return Y(() => {
1480
+ const [s, o] = P(void 0);
1481
+ return J(() => {
1555
1482
  const i = e.subscribe((l) => {
1556
- l != null && l.data && r(l.data);
1483
+ l != null && l.data && o(l.data);
1557
1484
  });
1558
1485
  return () => {
1559
1486
  i();
1560
1487
  };
1561
- }, [e]), s != null && s.summary ? /* @__PURE__ */ n(Ee, { ...s.summary, successRate: (t = s.percentage) == null ? void 0 : t.correct }) : /* @__PURE__ */ n("div", { children: "wait user..." });
1562
- }, fr = ({ gamification: e, className: t, scrollStore: s, scrollNode: r, appNode: i, style: l, responsiveStore: a, headerNode: c }) => {
1563
- const [d, u] = q(!1), [h, v] = q(X.HOME), [, m] = rt(), { sdkInScrollView: I } = O(a, { keys: ["sdkInScrollView"] }), w = (A) => {
1564
- m(() => {
1565
- var b;
1566
- v(A), I === !1 && (((b = i.current) == null ? void 0 : b.getBoundingClientRect().y) || 0) < 0 && Te(i, { behavior: "instant" });
1488
+ }, [e]), s != null && s.summary ? /* @__PURE__ */ n(Te, { ...s.summary, successRate: (t = s.percentage) == null ? void 0 : t.correct }) : /* @__PURE__ */ n("div", { children: "wait user..." });
1489
+ }, po = ({ gamification: e, className: t, scrollStore: s, scrollNode: o, appNode: i, style: l, responsiveStore: a, headerNode: c }) => {
1490
+ const { tabsShown: d } = q(s, { keys: ["tabsShown"] }), [u, h] = P(X.HOME), [, v] = tt(), { sdkInDesktopView: m } = q(a, { keys: ["sdkInDesktopView"] }), I = (g) => {
1491
+ v(() => {
1492
+ var C;
1493
+ h(g), m === !1 && (((C = i.current) == null ? void 0 : C.getBoundingClientRect().y) || 0) < 0 && Ge(i, { behavior: "instant" });
1567
1494
  });
1568
- }, C = (A) => {
1569
- m(() => u(A));
1570
1495
  };
1571
- Y(() => s.listen((A) => {
1572
- if (A.scrollPosition === 0) {
1573
- C(!1), s.setKey("tabsShown", !1);
1496
+ J(() => s.listen((g) => {
1497
+ if (g.scrollPosition === 0) {
1498
+ s.setKey("tabsShown", !0);
1574
1499
  return;
1575
1500
  }
1576
- C(A.scrollDirection === "forward"), s.setKey("tabsShown", A.scrollDirection !== "forward");
1577
- }), [s]);
1578
- let y = "0px";
1579
- I ? y = d ? "calc(8px - var(--header-height) - var(--header-offset))" : "0px" : y = d ? "calc(var(--header-height) + var(--header-offset))" : "0px";
1580
- const g = I ? i : c;
1581
- return /* @__PURE__ */ p(Ge, { className: t, style: l, children: [
1501
+ a.get().sdkInDesktopView ? s.setKey("tabsShown", g.scrollDirection === "backward") : s.setKey("tabsShown", g.scrollDirection === "forward");
1502
+ }), [s, a]);
1503
+ let $ = "0px";
1504
+ m ? $ = d ? "0px" : "calc(8px - var(--header-height) - var(--header-offset))" : $ = d ? "calc(var(--header-height) + var(--header-offset) - 2px)" : "0px";
1505
+ const y = m ? i : c;
1506
+ return /* @__PURE__ */ p(Fe, { className: t, style: l, children: [
1582
1507
  /* @__PURE__ */ n(
1583
- Ke,
1508
+ ze,
1584
1509
  {
1585
1510
  style: {
1586
- top: y
1511
+ top: $
1587
1512
  },
1588
- children: /* @__PURE__ */ n(dn, { activePage: h, toggleActivePage: w })
1513
+ children: /* @__PURE__ */ n(on, { activePage: u, toggleActivePage: I })
1589
1514
  }
1590
1515
  ),
1591
- h === X.HOME && /* @__PURE__ */ p(P, { children: [
1592
- /* @__PURE__ */ n(we, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ n(Je, { children: /* @__PURE__ */ n(vr, { userSummary: e.userSummary }) }) }),
1593
- /* @__PURE__ */ n(Xe, { style: { flex: 1 }, children: /* @__PURE__ */ n(mr, { openQuestion: e.openQuestion, store: e.feedList.getStore() }) })
1516
+ u === X.HOME && /* @__PURE__ */ p(x, { children: [
1517
+ /* @__PURE__ */ n($e, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ n(He, { children: /* @__PURE__ */ n(co, { userSummary: e.userSummary }) }) }),
1518
+ /* @__PURE__ */ n(Ye, { style: { flex: 1 }, children: /* @__PURE__ */ n(lo, { openQuestion: e.openQuestion, store: e.feedList.getStore() }) })
1594
1519
  ] }),
1595
- h === X.LEADERBOARD && /* @__PURE__ */ n(et, { children: /* @__PURE__ */ n(
1596
- Bn,
1520
+ u === X.LEADERBOARD && /* @__PURE__ */ n(Ze, { children: /* @__PURE__ */ n(
1521
+ _n,
1597
1522
  {
1598
- renderClipBoardNode: g,
1523
+ renderClipBoardNode: y,
1599
1524
  scrollStore: s,
1600
- scrollNode: r,
1525
+ scrollNode: o,
1601
1526
  gamification: e
1602
1527
  }
1603
1528
  ) })
1604
1529
  ] });
1605
- }, Ir = () => tt, Ae = /* @__PURE__ */ o(Ir())({
1530
+ }, uo = () => Xe, fe = /* @__PURE__ */ r(uo())({
1606
1531
  name: "OpenedContainer",
1607
1532
  class: "oar61gl",
1608
1533
  propsAsIs: !0
1609
- }), Cr = /* @__PURE__ */ o("div")({
1534
+ }), ho = /* @__PURE__ */ r("div")({
1610
1535
  name: "UserContainer",
1611
1536
  class: "u14zaal4",
1612
1537
  propsAsIs: !1
1613
- }), gr = ({
1538
+ }), mo = ({
1614
1539
  correct: e,
1615
1540
  incorrect: t
1616
1541
  }) => {
1617
1542
  const s = e + t;
1618
1543
  return s === 0 ? 0 : Math.round(e / s * 100);
1619
- }, Ar = `
1620
- body {
1621
- overflow: hidden
1622
- }
1623
- `, Tr = ({
1544
+ }, go = ({
1624
1545
  gamification: e,
1625
1546
  scrollStore: t,
1626
1547
  className: s,
1627
- appNode: r,
1548
+ appNode: o,
1628
1549
  scrollNode: i,
1629
1550
  headerNode: l,
1630
1551
  responsiveStore: a
1631
1552
  }) => {
1632
- const c = O(e.openedQuestion.$store), d = O(e.openedUser), {
1633
- sdkInScrollView: u
1634
- } = O(a, {
1635
- keys: ["sdkInScrollView"]
1636
- }), h = V(0), [v, m] = x(() => {
1637
- var I;
1638
- const w = u ? r : l, C = (((I = r.current) == null ? void 0 : I.getBoundingClientRect().y) || 0) < 0;
1639
- if ((c || d) && w.current) {
1640
- C && (h.current = window.scrollY);
1641
- const y = () => (Y(() => {
1642
- const g = setTimeout(() => {
1643
- Te(r, {
1644
- behavior: "instant"
1645
- });
1646
- }, 1e3);
1647
- return () => {
1648
- clearTimeout(g), h.current !== 0 && (window.scroll({
1649
- top: h.current
1650
- }), h.current = 0);
1651
- };
1652
- }, []), /* @__PURE__ */ n("style", {
1653
- children: Ar
1654
- }));
1655
- return [C, c ? pe.createPortal(/* @__PURE__ */ p(Ae, {
1656
- className: s,
1657
- children: [/* @__PURE__ */ n(rn, {
1658
- gamification: e
1659
- }), C && !u && /* @__PURE__ */ n(y, {})]
1660
- }), w.current) : d ? pe.createPortal(/* @__PURE__ */ n(Ae, {
1661
- className: s,
1662
- children: /* @__PURE__ */ p(Cr, {
1663
- children: [/* @__PURE__ */ n(Se, {
1664
- label: "Friend's Rank",
1665
- close: e.closeUser
1666
- }), /* @__PURE__ */ n(we, {
1667
- children: /* @__PURE__ */ n(Ee, {
1668
- ...d,
1669
- successRate: gr(d)
1670
- })
1671
- })]
1672
- })
1673
- }), w.current) : null];
1674
- }
1675
- return [C, null];
1676
- }, [r, s, e, l, c, d, u]);
1677
- return /* @__PURE__ */ p(P, {
1678
- children: [m, /* @__PURE__ */ n(fr, {
1679
- appNode: r,
1553
+ const c = q(e.openedQuestion.$store), d = q(e.openedUser), {
1554
+ sdkInDesktopView: u
1555
+ } = q(a, {
1556
+ keys: ["sdkInDesktopView"]
1557
+ }), h = M(() => {
1558
+ var v;
1559
+ const m = (((v = o.current) == null ? void 0 : v.getBoundingClientRect().y) || 0) < 0;
1560
+ if (!o.current || !c && !d)
1561
+ return null;
1562
+ const I = c ? /* @__PURE__ */ n(fe, {
1563
+ className: s,
1564
+ children: /* @__PURE__ */ n(Js, {
1565
+ gamification: e
1566
+ })
1567
+ }) : d ? /* @__PURE__ */ n(fe, {
1568
+ className: s,
1569
+ children: /* @__PURE__ */ p(ho, {
1570
+ children: [/* @__PURE__ */ n(we, {
1571
+ label: "Friend's Rank",
1572
+ close: e.closeUser
1573
+ }), /* @__PURE__ */ n($e, {
1574
+ children: /* @__PURE__ */ n(Te, {
1575
+ ...d,
1576
+ successRate: mo(d)
1577
+ })
1578
+ })]
1579
+ })
1580
+ }) : null;
1581
+ return Ke({
1582
+ Modal: I,
1583
+ container: o,
1584
+ useContainer: !u,
1585
+ fixedView: m
1586
+ });
1587
+ }, [o, s, e, c, d, u]);
1588
+ return /* @__PURE__ */ p(x, {
1589
+ children: [h, /* @__PURE__ */ n(po, {
1590
+ appNode: o,
1680
1591
  headerNode: l,
1681
1592
  scrollStore: t,
1682
1593
  scrollNode: i,
1683
1594
  className: s,
1684
1595
  gamification: e,
1685
- responsiveStore: a,
1686
- style: !u && !v && m !== null ? {
1687
- height: "0",
1688
- overflow: "hidden"
1689
- } : {}
1596
+ responsiveStore: a
1690
1597
  })]
1691
1598
  });
1692
1599
  };
1693
1600
  export {
1694
- Tr as default
1601
+ go as default
1695
1602
  };