@streamlayer/react 1.22.2 → 1.23.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.
Files changed (112) hide show
  1. package/lib/cjs/Question.js +1 -1
  2. package/lib/cjs/advertisement.js +44 -40
  3. package/lib/cjs/analytics.js +1 -1
  4. package/lib/cjs/index-eShKGO10.js +5 -0
  5. package/lib/cjs/index.js +1 -1
  6. package/lib/cjs/index10.js +4 -1
  7. package/lib/cjs/index11.js +1 -4
  8. package/lib/cjs/index12.js +1 -1
  9. package/lib/cjs/index13.js +1 -1
  10. package/lib/cjs/index14.js +1 -1
  11. package/lib/cjs/index15.js +5 -1
  12. package/lib/cjs/index2.js +1 -1
  13. package/lib/cjs/index4.js +1 -1
  14. package/lib/cjs/index7.js +1 -5
  15. package/lib/cjs/index8.js +1 -1
  16. package/lib/cjs/index9.js +1 -1
  17. package/lib/cjs/insight.js +1 -1
  18. package/lib/cjs/masters2.js +5 -5
  19. package/lib/cjs/notification.js +1 -1
  20. package/lib/cjs/pause-ad.js +1 -1
  21. package/lib/cjs/points.js +1 -1
  22. package/lib/cjs/storage.js +1 -1
  23. package/lib/cjs/useStreamLayerApp2.js +17 -17
  24. package/lib/classic/cjs/Question.js +1 -1
  25. package/lib/classic/cjs/advertisement.js +44 -40
  26. package/lib/classic/cjs/analytics.js +1 -1
  27. package/lib/classic/cjs/bet-pack.js +1 -1
  28. package/lib/classic/cjs/index-eShKGO10.js +5 -0
  29. package/lib/classic/cjs/index.js +1 -1
  30. package/lib/classic/cjs/index10.js +1 -1
  31. package/lib/classic/cjs/index11.js +1 -1
  32. package/lib/classic/cjs/index12.js +4 -1
  33. package/lib/classic/cjs/index2.js +2 -2
  34. package/lib/classic/cjs/index3.js +1 -1
  35. package/lib/classic/cjs/index4.js +1 -1
  36. package/lib/classic/cjs/index5.js +1 -1
  37. package/lib/classic/cjs/index6.js +1 -5
  38. package/lib/classic/cjs/index7.js +1 -1
  39. package/lib/classic/cjs/index8.js +1 -1
  40. package/lib/classic/cjs/index9.js +1 -1
  41. package/lib/classic/cjs/insight.js +1 -1
  42. package/lib/classic/cjs/notification.js +1 -1
  43. package/lib/classic/cjs/notification2.js +1 -1
  44. package/lib/classic/cjs/pause-ad.js +1 -1
  45. package/lib/classic/cjs/points.js +1 -1
  46. package/lib/classic/cjs/useStreamLayerApp2.js +17 -17
  47. package/lib/classic/es/Question.js +53 -53
  48. package/lib/classic/es/advertisement.js +15547 -10742
  49. package/lib/classic/es/analytics.js +74 -18
  50. package/lib/classic/es/bet-pack.js +4 -4
  51. package/lib/classic/es/index-eShKGO10.js +3757 -0
  52. package/lib/classic/es/index.js +1 -1
  53. package/lib/classic/es/index10.js +2295 -82
  54. package/lib/classic/es/index11.js +179 -2357
  55. package/lib/classic/es/index12.js +822 -170
  56. package/lib/classic/es/index2.js +13 -14
  57. package/lib/classic/es/index3.js +16 -61
  58. package/lib/classic/es/index4.js +282 -16
  59. package/lib/classic/es/index5.js +5 -283
  60. package/lib/classic/es/index6.js +9 -3756
  61. package/lib/classic/es/index7.js +62 -5
  62. package/lib/classic/es/index8.js +315 -7
  63. package/lib/classic/es/index9.js +81 -313
  64. package/lib/classic/es/insight.js +1 -1
  65. package/lib/classic/es/notification.js +1 -1
  66. package/lib/classic/es/notification2.js +476 -452
  67. package/lib/classic/es/pause-ad.js +174 -208
  68. package/lib/classic/es/points.js +4 -4
  69. package/lib/classic/es/useStreamLayerApp2.js +5062 -4028
  70. package/lib/dist/cjs/index-eShKGO10.js +5 -0
  71. package/lib/dist/cjs/masters.js +35 -35
  72. package/lib/dist/es/index-eShKGO10.js +3757 -0
  73. package/lib/dist/es/masters.js +9267 -8240
  74. package/lib/dist/index.d.ts +13 -1
  75. package/lib/dist/style.css +1 -1
  76. package/lib/es/Question.js +4 -4
  77. package/lib/es/advertisement.js +15547 -10742
  78. package/lib/es/analytics.js +74 -18
  79. package/lib/es/index-eShKGO10.js +3757 -0
  80. package/lib/es/index.js +1 -1
  81. package/lib/es/index10.js +804 -236
  82. package/lib/es/index11.js +170 -822
  83. package/lib/es/index12.js +302 -166
  84. package/lib/es/index13.js +81 -313
  85. package/lib/es/index14.js +2350 -82
  86. package/lib/es/index15.js +1229 -2330
  87. package/lib/es/index2.js +10 -11
  88. package/lib/es/index4.js +2 -2
  89. package/lib/es/index7.js +5 -3756
  90. package/lib/es/index8.js +9 -5
  91. package/lib/es/index9.js +263 -7
  92. package/lib/es/insight.js +1 -1
  93. package/lib/es/masters2.js +15 -16
  94. package/lib/es/notification.js +449 -425
  95. package/lib/es/pause-ad.js +174 -208
  96. package/lib/es/points.js +1 -1
  97. package/lib/es/storage.js +2 -2
  98. package/lib/es/useStreamLayerApp2.js +5062 -4028
  99. package/lib/style.css +1 -1
  100. package/package.json +17 -16
  101. package/lib/cjs/index-DSi8Qgfs.js +0 -1
  102. package/lib/cjs/index16.js +0 -5
  103. package/lib/cjs/vast-client.min.js +0 -1
  104. package/lib/classic/cjs/index-DSi8Qgfs.js +0 -1
  105. package/lib/classic/cjs/index13.js +0 -4
  106. package/lib/classic/cjs/vast-client.min.js +0 -1
  107. package/lib/classic/es/index-DSi8Qgfs.js +0 -65
  108. package/lib/classic/es/index13.js +0 -835
  109. package/lib/classic/es/vast-client.min.js +0 -1060
  110. package/lib/es/index-DSi8Qgfs.js +0 -65
  111. package/lib/es/index16.js +0 -1254
  112. package/lib/es/vast-client.min.js +0 -1060
@@ -1 +1,4 @@
1
- "use strict";const t=require("./sl-types.js"),l=require("./useStreamLayerApp2.js"),e=require("react/jsx-runtime"),U=require("react"),S=require("./index9.js"),_=require("./index5.js"),O={[l.QuestionType.TWEET]:{label:"Insight",iconName:"icon-insight"},[l.QuestionType.PROMOTION]:{label:"Insight",iconName:"icon-insight"},[l.QuestionType.UNSET]:void 0,[l.QuestionType.FACTOID]:{label:"Insight",iconName:"icon-insight"},[l.QuestionType.POLL]:{label:"Poll",iconName:"icon-poll"},[l.QuestionType.TRIVIA]:{label:"Trivia",iconName:"icon-trivia"},[l.QuestionType.PREDICTION]:{label:"Prediction",iconName:"icon-prediction"}},b={[l.QuestionType.TWEET]:"Learn more",[l.QuestionType.FACTOID]:"Learn more",[l.QuestionType.POLL]:"Answer",[l.QuestionType.TRIVIA]:"Answer",[l.QuestionType.PREDICTION]:"Answer",[l.QuestionType.PROMOTION]:"",[l.QuestionType.UNSET]:""},E=i=>i.split(/\s+/).map(n=>n[0]).join("").toUpperCase(),q=i=>i?i.toLocaleString("en-US"):"0",C=i=>{const n=new Date(i);if(!n)return"";const d=new Date,a=Math.floor(d.getTime()-n.getTime());return a<6e4?`${Math.floor(a/1e3)}s`:a<36e5?`${Math.floor(a/6e4)}m`:a<864e5?`${Math.floor(a/36e5)}h`:n.getFullYear()===d.getFullYear()?`${n.toLocaleDateString("en-US",{month:"short",day:"numeric"})}`:`${n.toLocaleDateString("en-US",{month:"2-digit",day:"2-digit",year:"2-digit"})}`},R=t.styled_default("div")({name:"Container",class:"cjq447q",propsAsIs:!1}),P=t.styled_default("div")({name:"ImageContainer",class:"i14egogb",propsAsIs:!1}),M=t.styled_default("img")({name:"Image",class:"i2g9g4l",propsAsIs:!1}),F=()=>_.B1,V=t.styled_default(F())({name:"TwitterIcon",class:"t1c454nm",propsAsIs:!0}),z=t.styled_default("div")({name:"Details",class:"d11nigc3",propsAsIs:!1}),B=t.styled_default("div")({name:"Name",class:"nrxa4k8",propsAsIs:!1}),k=t.styled_default("div")({name:"UserNameAndDate",class:"u1p051g3",propsAsIs:!1}),w=({image:i,name:n,userName:d,verified:a,createdTweet:m})=>{const o=m&&C(m);return e.jsxs(R,{children:[i&&e.jsxs(P,{children:[e.jsx(M,{className:"SL_AccountImage",src:i}),e.jsx(V,{name:"twitter"})]}),e.jsxs(z,{children:[n&&e.jsxs(B,{className:"SL_TweetAccountName",children:[n," ",a&&e.jsx(_.B1,{name:"icon-twitter-verified"})]}),d&&e.jsxs(k,{className:"SL_TweetAccountUserName",children:["@",d," ",o&&`・ ${o}`]})]})]})},W=t.styled_default("div")({name:"Container",class:"c1kzqw87",propsAsIs:!1}),Y=t.styled_default("div")({name:"Details",class:"d9r1hf9",propsAsIs:!1}),G=t.styled_default("div")({name:"Body",class:"bezygt5",propsAsIs:!1}),c=t.styled_default("div")({name:"ImagesContainer",class:"i1y8f7ym",propsAsIs:!1}),g=t.styled_default("div")({name:"ImagesBlock",class:"i18gwonx",propsAsIs:!1}),D=t.styled_default("img")({name:"Image",class:"i3g0xjd",propsAsIs:!1}),J=()=>D,r=t.styled_default(J())({name:"ImageFullSize",class:"io8rt7p",propsAsIs:!0}),K=()=>D,v=t.styled_default(K())({name:"ImageHalfSize",class:"i4hn3ox",propsAsIs:!0}),X=new RegExp("\\s?https?://t.co[^\\s]+(\\s+)?$"),L=i=>i==null?void 0:i.replace(X,""),Z=U.memo(({image:i,body:n,muted:d,account:a,accountVerified:m,tweet:o,isDetail:y,controlVideo:H})=>{var I,x,h,T,j;const s=(x=(I=o==null?void 0:o.meta)==null?void 0:I.extendedEntities)==null?void 0:x.media,p=s==null?void 0:s.find(({type:u})=>u==="photo"),f=U.useMemo(()=>{var u,A,$,N;return(N=($=(A=(u=s==null?void 0:s[0])==null?void 0:u.videoInfo)==null?void 0:A.variants)==null?void 0:$.findLast(({contentType:Q})=>Q==="video/mp4"))==null?void 0:N.url},[s]);return e.jsxs(W,{children:[e.jsxs(Y,{children:[e.jsx(w,{image:i,name:(h=o==null?void 0:o.meta)==null?void 0:h.accountName,userName:a,verified:m,createdTweet:o==null?void 0:o.date}),e.jsx(G,{children:L(n)}),!y&&p&&e.jsx(c,{children:e.jsx(r,{src:s==null?void 0:s[0].mediaUrlHttps})}),y&&p&&e.jsxs(e.Fragment,{children:[(s==null?void 0:s.length)===1&&e.jsx(c,{children:e.jsx(r,{src:s[0].mediaUrlHttps})}),(s==null?void 0:s.length)===2&&e.jsxs(c,{children:[e.jsx(v,{src:s[0].mediaUrlHttps}),e.jsx(v,{src:s[1].mediaUrlHttps})]}),(s==null?void 0:s.length)===3&&e.jsxs(c,{children:[e.jsx(v,{src:s[0].mediaUrlHttps}),e.jsxs(g,{children:[e.jsx(r,{src:s[1].mediaUrlHttps}),e.jsx(r,{src:s[2].mediaUrlHttps})]})]}),(s==null?void 0:s.length)===4&&e.jsxs(c,{children:[e.jsxs(g,{children:[e.jsx(r,{src:s[0].mediaUrlHttps}),e.jsx(r,{src:s[1].mediaUrlHttps})]}),e.jsxs(g,{children:[e.jsx(r,{src:s[2].mediaUrlHttps}),e.jsx(r,{src:s[3].mediaUrlHttps})]})]})]})]}),!p&&(((T=s==null?void 0:s[0])==null?void 0:T.type)==="video"||((j=s==null?void 0:s[0])==null?void 0:j.type)==="animated_gif")&&f&&e.jsx(S.Et,{muted:d,source:f,poster:s[0].mediaUrlHttps,controlVideo:H})]})});exports.D=w;exports.D$1=L;exports.I=E;exports.b=Z;exports.e=O;exports.o=b;exports.s=q;
1
+ "use strict";const e=require("react/jsx-runtime"),a=require("react"),s=require("./sl-types.js"),te=require("./index6.js"),$=require("./index4.js"),n=require("./useStreamLayerApp2.js"),xe=require("./index9.js"),Ie=require("./index3.js"),Le=s.styled_default("div")({name:"SDKContainer",class:"sopqfe6",propsAsIs:!1}),je=s.styled_default("div")({name:"SDKScrollContainer",class:"s102vcph",propsAsIs:!1}),ie=s.styled_default("div")({name:"SDKContentContainer",class:"s1meqjjv",propsAsIs:!1}),Be=()=>ie,oe=s.styled_default(Be())({name:"SDKWhiteContainer",class:"s1burm22",propsAsIs:!0}),Fe=()=>oe,We=s.styled_default(Fe())({name:"SDKSummaryContainer",class:"sm5r3j5",propsAsIs:!0}),Me=s.styled_default("div")({name:"TabsContainer",class:"tysxwr6",propsAsIs:!1}),Ye=()=>ie,ze=s.styled_default(Ye())({name:"LeaderboardContainer",class:"l9er3b1",propsAsIs:!0}),Ue=()=>oe,Ke=s.styled_default(Ue())({name:"TabsNavContainer",class:"t19dtrb3",propsAsIs:!0}),He=s.styled_default("div")({name:"UserSummaryContainer",class:"u1552n3j",propsAsIs:!1});var Ge=Object.defineProperty,Je=(t,i,o)=>i in t?Ge(t,i,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[i]=o,Xe=(t,i,o)=>Je(t,i+"",o);let Ze=class{constructor(){Xe(this,"observers",new Set)}subscribe(i){this.observers.add(i)}unsubscribe(i){this.observers.delete(i)}notify(i){this.observers.forEach(o=>o(i))}};const z=new Ze,es={hiding:!1,finished:!1},ve=()=>{const[t,i]=a.useState(es),o=a.useRef(null);a.useEffect(()=>{const u=m=>{i(m)};return z.subscribe(u),()=>{z.unsubscribe(u)}},[]);const c=a.useCallback(u=>{const m={hiding:!0,finished:!1};o.current&&clearTimeout(o.current),u!=null&&u.delay?o.current=setTimeout(()=>{z.notify(m)},u==null?void 0:u.delay):z.notify(m)},[]),r=a.useCallback(()=>{t.hiding&&(o.current=null,z.notify({hiding:!1,finished:!0}))},[t.hiding]);return{...t,runAnimation:c,onAnimationEnd:r}},ss=s.styled_default("div")({name:"Container",class:"c1pgyo67",propsAsIs:!1}),ts="sx17qu6",ns="h1692c5m",re=({children:t,style:i,className:o,enabled:c=!0,hiding:r,onAnimationEnd:u})=>e.jsx(ss,{style:i,className:s.cx_default(o,c&&ts,c&&r&&ns),onAnimationEnd:u,children:t}),is=()=>re,os=s.styled_default(is())({name:"GrowingContainer",class:"gck55ev",propsAsIs:!0}),Te=({children:t,style:i,enabled:o,animate:c,...r})=>{const u=a.useRef(null);return e.jsx(os,{...r,enabled:o&&c,style:{...i,...(()=>{const m=u==null?void 0:u.current,j=m&&window.getComputedStyle(m),b=j==null?void 0:j.getPropertyValue("height");return o?{height:c?b:0}:{}})()},children:e.jsx("div",{ref:u,children:t})})},rs=s.styled_default("div")({name:"Container",class:"c1gcvmcj",propsAsIs:!1}),as=s.styled_default("div")({name:"Title",class:"tnr592a",propsAsIs:!1}),ds=s.styled_default("div")({name:"Description",class:"d1e8jqpv",propsAsIs:!1}),ls=()=>$.B1,cs=s.styled_default(ls())({name:"Icon",class:"i1vs651k",propsAsIs:!0}),us=({icon:t,title:i,description:o})=>e.jsxs(rs,{children:[e.jsx(cs,{name:t}),e.jsx(as,{children:i}),e.jsx(ds,{children:o})]}),ps=()=>Te,ys=s.styled_default(ps())({name:"ShowInContainer",class:"s16sbdnm",propsAsIs:!0}),L=s.styled_default("div")({name:"FeedbackContainer",class:"fbhorgl",propsAsIs:!1}),pe="s1g20ja7",ms=s.styled_default("div")({name:"Container",class:"c455ozj",propsAsIs:!1}),hs=()=>$.B1,ye=s.styled_default(hs())({name:"IconPrediction",class:"i1913njx",propsAsIs:!0}),U=s.styled_default("div")({name:"FeedbackIconWrap",class:"fzfk69z",propsAsIs:!1}),G=s.styled_default("div")({name:"FeedbackHeader",class:"fx87qaj",propsAsIs:!1}),fs=s.styled_default("span")({name:"FeedbackTitle",class:"fvek9ew",propsAsIs:!1}),B=s.styled_default("span")({name:"FeedbackDescription",class:"f1kbtp09",propsAsIs:!1}),xs=s.styled_default("div")({name:"FeedbackTitleWrap",class:"f4i8rro",propsAsIs:!1}),Is=s.styled_default("div")({name:"FeedbackResultDescriptionWrap",class:"fqyssr",propsAsIs:!1}),js=()=>B,vs=s.styled_default(js())({name:"FeedbackDynamicDescription",class:"fyv794i",propsAsIs:!0}),Ts=()=>B,As=s.styled_default(Ts())({name:"FeedbackResultDescription",class:"f1jkj9vx",propsAsIs:!0}),ne=s.styled_default("div")({name:"FeedbackText",class:"f1pxh3a6",propsAsIs:!1}),Cs=s.styled_default("span")({name:"DynamicWrap",class:"d1afvufn",propsAsIs:!1}),$s=s.styled_default("div")({name:"EarlyFeedbackDescription",class:"eq8u24d",propsAsIs:!1}),me=({feedbackMessages:t,questionVotedCorrectly:i,questionVoted:o,questionType:c,hasCorrectAnswer:r,showExpiredNotification:u,showClosedNotificationTrivia:m,votedInCurrentRender:j,votedAfterQuestionClosed:b,voteErrorMessage:h,enteredAnActiveQuestion:d,marketClosed:g,percentsAnimated:C,votedAnswer:I,isEarlyPrediction:y,correctAnswer:_,onAnimationEnd:P})=>{const E=o&&(c===n.QuestionType.TRIVIA||c===n.QuestionType.PREDICTION),T=c===n.QuestionType.PREDICTION&&!r,q=g&&c===n.QuestionType.PREDICTION&&!o||c===n.QuestionType.PREDICTION&&b&&j&&d,Q=E&&T,S=E&&r,w=c===n.QuestionType.PREDICTION&&o&&j&&r,R=o&&c===n.QuestionType.POLL&&j,f=i?"correct":"incorrect",k=i?t==null?void 0:t.correctFeedback:t==null?void 0:t.incorrectFeedback;return u||m||Q||S||q||R||w||h?e.jsx(ys,{enabled:j,animate:!h&&u?!0:C,onAnimationEnd:P,children:e.jsxs(ms,{"data-prediction":T,children:[h&&!q&&e.jsxs(L,{children:[!y&&e.jsx(ye,{name:"questionExpired"}),e.jsx(B,{children:h})]}),!h&&u&&e.jsxs(L,{children:[!y&&e.jsx(U,{children:e.jsx($.B1,{name:"questionExpired"})}),e.jsxs("div",{children:[e.jsx(G,{children:e.jsx(B,{children:"Question Expired"})}),e.jsx(ne,{children:"You can still answer to see if you're correct, but no points are awarded for expired questions."})]})]}),!h&&m&&e.jsxs(L,{className:s.cx_default(pe),children:[e.jsx(U,{children:e.jsx($.B1,{name:"questionExpired"})}),e.jsxs("div",{children:[e.jsx(G,{children:e.jsx(B,{children:"Question Closed"})}),e.jsx(ne,{children:"This question was answered after the moderator closed the question. So the points for this answer won’t tally."})]})]}),q&&e.jsxs(L,{children:[!y&&e.jsx(U,{children:e.jsx($.B1,{name:"questionExpired"})}),e.jsxs("div",{children:[e.jsx(G,{children:e.jsx(B,{children:y?r?"The results are already in!":"Question is Closed":"Question Closed"})}),e.jsx(ne,{children:y?e.jsx($s,{children:r?`Correct: ${_==null?void 0:_.text}`:"Event affecting the outcome has occurred."}):"This event has already taken place, so the ability to make a prediction on its outcome is no longer available."})]})]}),!h&&Q&&e.jsxs(L,{children:[!y&&e.jsx(ye,{name:"icon-prediction"}),e.jsxs(vs,{children:["Your pick has been recorded. ",e.jsx(Cs,{children:"We’ll notify you of the result."})]})]}),!h&&R&&e.jsxs(L,{children:[!y&&e.jsx(U,{"data-feedback-type":"correct",children:e.jsx($.B1,{name:"correct"})}),e.jsx(B,{children:"Thanks for answering. Please stay tuned for the next question."})]}),!h&&(S||w)&&e.jsxs(L,{className:s.cx_default(m&&pe),children:[!y&&e.jsx(U,{"data-feedback-type":f,children:e.jsx($.B1,{name:f})}),e.jsx("div",{children:e.jsxs(G,{children:[y?e.jsx(xs,{children:f==="incorrect"?e.jsxs(e.Fragment,{children:[e.jsx("div",{children:"So close!"}),e.jsx("div",{children:"Better luck next time"})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{children:"That’s correct!"}),e.jsx("div",{children:"You chose wisely."})]})}):e.jsx(fs,{"data-feedback-type":f,children:k==null?void 0:k.title}),y?e.jsxs(Is,{children:[e.jsxs("div",{children:["Your pick: ",I==null?void 0:I.text]}),e.jsx("div",{children:f==="incorrect"?`Correct: ${_==null?void 0:_.text}`:""})]}):e.jsx(As,{children:k==null?void 0:k.description})]})})]})]})}):null},Es=s.styled_default("div")({name:"Container",class:"c1hygj0s",propsAsIs:!1}),bs=s.styled_default("div")({name:"Title",class:"t1r84tez",propsAsIs:!1}),gs=s.styled_default("div")({name:"Description",class:"d1aj1a7k",propsAsIs:!1}),ws=s.styled_default("div")({name:"AdditionalDescription",class:"ax09ezs",propsAsIs:!1}),_s=()=>$.B1,Ps=s.styled_default(_s())({name:"Icon",class:"inkrac",propsAsIs:!0}),Qs=({icon:t,title:i,description:o,additionalDescription:c})=>e.jsxs(Es,{children:[t&&e.jsx(Ps,{name:t}),e.jsx(bs,{children:i}),e.jsx(gs,{children:o}),c&&e.jsx(ws,{children:c})]}),Ae=s.styled_default("div")({name:"Container",class:"c14ielyq",propsAsIs:!1}),Rs=()=>je,qs=s.styled_default(Rs())({name:"QuestionScrollContainer",class:"q1tlqx57",propsAsIs:!0}),Ss=s.styled_default("div")({name:"TopShadow",class:"t1hq58md",propsAsIs:!1}),ks=s.styled_default("div")({name:"BottomShadow",class:"b1c8nxcx",propsAsIs:!1}),Ds=s.styled_default("div")({name:"SponsorLogo",class:"siozuc3",propsAsIs:!1}),Ce=s.styled_default("div")({name:"Content",class:"cpnc44r",propsAsIs:!1}),Os=s.styled_default("div")({name:"Title",class:"tq7p3w0",propsAsIs:!1}),Ns=s.styled_default("div")({name:"OptionsWrap",class:"o1jlfj9g",propsAsIs:!1}),$e=s.styled_default("div")({name:"Options",class:"o84pmnd",propsAsIs:!1}),Vs=()=>re,he=s.styled_default(Vs())({name:"AlertContainer",class:"a1dybjw9",propsAsIs:!0}),Ls=s.styled_default("div")({name:"EarlyPrediction",class:"e1l05ict",propsAsIs:!1}),Bs=()=>$.B1,Fs=s.styled_default(Bs())({name:"EarlyPredictionIcon",class:"ez9juex",propsAsIs:!0}),Ws=()=>$.B1,Ms=s.styled_default(Ws())({name:"SponsorIcon",class:"s8p4aob",propsAsIs:!0}),Ys=s.styled_default("button")({name:"ButtonContainer",class:"b1b6dl8t",propsAsIs:!1}),zs=s.styled_default("div")({name:"ButtonPctWrap",class:"b4iik8i",propsAsIs:!1}),Us=s.styled_default("div")({name:"ButtonPct",class:"b1gq1lnf",propsAsIs:!1}),Ks=s.styled_default("span")({name:"ButtonBody",class:"b1j65z51",propsAsIs:!1}),Hs=s.styled_default("div")({name:"IconContainer",class:"i19tpfua",propsAsIs:!1}),Gs=s.styled_default("div")({name:"IconWrap",class:"i1tubmma",propsAsIs:!1}),Ee=s.styled_default("img")({name:"Icon",class:"i1grrgwj",propsAsIs:!1}),Js=()=>Ee,Xs=s.styled_default(Js())({name:"IconDefault",class:"ibemyq8",propsAsIs:!0}),Zs=()=>Ee,et=s.styled_default(Zs())({name:"IconCircle",class:"i1dceht",propsAsIs:!0}),st=s.styled_default("span")({name:"Title",class:"t116q4vq",propsAsIs:!1}),tt=s.styled_default("span")({name:"Indicators",class:"i17ajcu2",propsAsIs:!1}),nt=s.styled_default("div")({name:"PtsWrap",class:"pu9kmlb",propsAsIs:!1}),it=s.styled_default("span")({name:"Pts",class:"p1j2j0s0",propsAsIs:!1}),ot=s.styled_default("span")({name:"Percentage",class:"p1mzj1sj",propsAsIs:!1}),rt=()=>$.B1,at=s.styled_default(rt())({name:"CheckIcon",class:"cichgz8",propsAsIs:!0}),fe={[n.QuestionImages.CENTERED]:t=>e.jsx(Xs,{"data-testid":"vote-icon",alt:"option-icon",src:t}),[n.QuestionImages.TRANSPARENT]:t=>e.jsx(Hs,{"data-testid":"vote-icon",children:e.jsx(Gs,{style:{backgroundImage:`url(${t})`}})}),[n.QuestionImages.ROUNDED]:t=>e.jsx(et,{"data-testid":"vote-icon",alt:"option-icon",src:t}),[n.QuestionImages.NONE]:()=>null,[n.QuestionImages.UNSET]:()=>null},dt=({questionType:t,hasCorrectAnswer:i,correct:o,youVoted:c,questionVoted:r})=>{if(t===n.QuestionType.POLL&&c)return"voted";if(t===n.QuestionType.PREDICTION){if(!i&&r)return c?"voted":"unset";if(i&&r)return c?o?"correct":"incorrect":"unset";if(c)return"correct"}return t===n.QuestionType.TRIVIA&&r&&c?o?"correct":"incorrect":"unset"},lt=({questionType:t,questionVoted:i,correct:o,hasCorrectAnswer:c,questionStatus:r})=>t===n.QuestionType.TRIVIA?i&&o:t===n.QuestionType.PREDICTION?i&&o&&c||r===n.QuestionStatus.RESOLVED&&o:!1,ct=xe.O(Ys),ut=t=>{var i;const{id:o,icon:c,text:r,percentageDecimal:u,points:m,onVote:j,markThatVoted:b,firstOption:h,onPercentsAnimated:d,youSelected:g,youVoted:C,questionVoted:I,imageMode:y,answerTimeExpired:_,questionStatus:P,isLoading:E,questionType:T,correct:q,hasCorrectAnswer:Q,marketClosed:S,isEarlyPrediction:w,isAd:R,webos:f}=t,[k,F]=a.useState(0),Y=dt(t),K=lt({questionType:T,questionVoted:I,correct:q,hasCorrectAnswer:Q,questionStatus:P}),D=S&&T===n.QuestionType.PREDICTION,O=I||D,J=T===n.QuestionType.PREDICTION&&!I&&!S&&!R,N=I&&!g&&Y!=="incorrect"&&!C;return a.useLayoutEffect(()=>{F(0),requestAnimationFrame(()=>{F(u)})},[u]),e.jsxs(ct,{value:o,webos:f,autoFocus:h,"data-selected":g,"data-answer-state":Y,disabled:I||E||_||D,"data-is-not-checked":N,"data-a":"intr",onClick:H=>{b(T===n.QuestionType.PREDICTION?S:P===n.QuestionStatus.RESOLVED),j(H)},"data-is-ad":R,children:[e.jsx(zs,{children:e.jsx(Us,{"data-answer-state":Y,"data-is-not-checked":N,style:{width:`${O?k:0}%`},onTransitionEnd:()=>{D||d==null||d()},"data-is-ad":R})}),e.jsxs(Ks,{"data-a":"intr",children:[c&&y&&((i=fe[y])==null?void 0:i.call(fe,c)),e.jsx(st,{"data-a":"intr",children:r}),J&&e.jsxs(nt,{children:[m,e.jsx(it,{children:"pts"})]}),O&&e.jsxs(tt,{children:[K&&e.jsx(at,{name:w?"selectedBetPack":"selected"}),e.jsx(ot,{children:e.jsx(Ie.d,{value:u,suffix:"%"})})]})]})]})},pt=()=>Te,yt=s.styled_default(pt())({name:"ShowInContainer",class:"sie6cqo",propsAsIs:!0}),mt=s.styled_default("div")({name:"WinBarContainer",class:"wgizw4u",propsAsIs:!1}),ht=s.styled_default("div")({name:"Content",class:"c1l3ucjp",propsAsIs:!1}),ft=s.styled_default("div")({name:"Title",class:"tx7j799",propsAsIs:!1}),xt=()=>$.B1,It=s.styled_default(xt())({name:"WinIcon",class:"w4lwuj0",propsAsIs:!0}),jt=s.styled_default("div")({name:"Points",class:"po9i64o",propsAsIs:!1}),vt=s.styled_default("span")({name:"PointsCount",class:"pe5g05h",propsAsIs:!1}),Tt=s.styled_default("span")({name:"PointsUnits",class:"p1hdtpmb",propsAsIs:!1}),At=({title:t,points:i,isPlayingTimer:o,isTimer:c,animatePoints:r,questionType:u,timerDuration:m,votedInCurrentRender:j,percentsAnimated:b,onTimerExpired:h})=>e.jsx(yt,{enabled:u===n.QuestionType.PREDICTION&&j,animate:b,children:e.jsxs(mt,{style:{justifyContent:u===n.QuestionType.PREDICTION?"center":"space-between"},children:[e.jsxs(ht,{children:[t&&e.jsx(ft,{children:t}),i!==void 0&&u!==n.QuestionType.POLL&&e.jsxs(e.Fragment,{children:[e.jsx(It,{name:"icon-trophy"}),e.jsxs(jt,{children:[e.jsx(vt,{children:r?e.jsx(Ie.d,{value:i,delay:.3}):i}),e.jsx(Tt,{children:"PTS"})]})]})]}),c&&u!==n.QuestionType.PREDICTION&&e.jsx(xe.L,{isPlaying:o,onTimerExpired:h,duration:m})]})}),Ct=(t,i)=>{switch(t){case"already_voted":return i===n.QuestionType.POLL?"You’ve already answered this question on another device.":"You’ve already answered this question on another device. So the points for this answer won't tally.";default:return"Something went wrong, please try again"}},$t=()=>e.jsx(Ae,{children:e.jsxs(Ce,{children:[e.jsx(te.i,{loading:!0,style:{height:"40px",borderRadius:"100px"}}),e.jsx(te.i,{loading:!0,style:{height:"24px",margin:"16px 0"}}),e.jsx($e,{children:Array.from({length:5}).map((t,i)=>e.jsx(te.i,{loading:!0,style:{height:"44px"}},i))})]})}),Et=({openedQuestion:t,isLoading:i,vote:o,close:c,isEarlyPrediction:r,mastersApp:u,webos:m})=>{var j,b;const h=t.subject,d=t.type,g=t.status,C=(j=t.options)==null?void 0:j.options,I=t.marketClosed,y=t.id,_=a.useRef(),P=a.useRef(),E=u?!1:(t==null?void 0:t.adUnit)===n.AdUnit.STANDART,[T,q]=a.useState(!1),[Q,S]=a.useState(!1),[w,R]=a.useState(!0),[f,k]=a.useState(!1),[F,Y]=a.useState(!1),[K,D]=a.useState(""),[O,J]=a.useState(""),[N,H]=a.useState(!1),[be,ge]=a.useState(!1),[ae,we]=a.useState(!1),{runAnimation:W,finished:de}=ve();a.useEffect(()=>{de&&c(y)},[c,de]),a.useEffect(()=>{d===n.QuestionType.PREDICTION?I&&R(!1):g===n.QuestionStatus.RESOLVED&&R(!1)},[]);const _e=a.useCallback(p=>{S(p),q(!0)},[]),Pe=a.useCallback(()=>{r&&q(!1)},[r]),X=a.useRef(!1),le=a.useCallback(()=>{P.current&&clearTimeout(P.current),P.current=setTimeout(()=>{we(!0),W({delay:5500})},4e3)},[W]),ce=a.useCallback(async p=>{if(!X.current&&(X.current=!0,y)){const A=p.currentTarget.value;D(A);try{await o(y,A),E&&le()}catch(M){J(Ct(M.message,d)),D(""),console.error("Error while voting",M),X.current=!1}}},[d,y,D,o,E,le]),Qe=a.useCallback(()=>{k(!0),W({delay:3500})},[W]),Re=a.useCallback(()=>{Y(!0),W({delay:3500})},[W]),l=t==null?void 0:t.answers.find(p=>p.youVoted===!0),v=a.useMemo(()=>!!(t!=null&&t.answers.find(p=>p.correct===!0)),[t]),x=a.useMemo(()=>t==null?void 0:t.answers.find(p=>p.correct===!0),[t]);a.useEffect(()=>{l&&T&&!be&&(_.current=setTimeout(Re,1e4),ge(!0))},[l]),a.useEffect(()=>()=>{clearTimeout(_.current),clearTimeout(P.current)},[]);const Z=a.useMemo(()=>t?t.answers.map(p=>{var A;return{...p,questionVoted:!!l,youSelected:K===p.id,isLoading:i,hasCorrectAnswer:v,questionType:t.type,answerTimeExpired:f,questionStatus:g,imageMode:(A=t.appearance)==null?void 0:A.images,onVote:ce}}):[],[v,f,i,t,l,g,ce,K]);a.useEffect(()=>{const p=Z.some(({percentageDecimal:M})=>M!==0),A=l&&d===n.QuestionType.PREDICTION;O&&(r||!p||I&&A)&&H(!0)},[Z,O,r,I,d,l]);const ue=C&&(C.case==="trivia"||C.case==="prediction")?C.value:void 0,V=g===n.QuestionStatus.RESOLVED&&d===n.QuestionType.TRIVIA&&!l&&!w,ee=d===n.QuestionType.TRIVIA&&Q,se=a.useMemo(()=>E?!1:d===n.QuestionType.PREDICTION?r?!1:!!(l&&!v||l&&v&&x!=null&&x.youVoted):!0,[d,l,v,x,r,E]),qe=a.useMemo(()=>{if(d===n.QuestionType.PREDICTION&&l&&(!v||v&&x!=null&&x.youVoted))return l.points;if(!(V||f))return l?l.correct?l.pointsEarned:0:x==null?void 0:x.points},[f,l,x,V,d,v]),Se=a.useMemo(()=>d===n.QuestionType.PREDICTION&&l?v?v&&x!=null&&x.youVoted?"You won":"":"To win":V||f?"Time expired":d===n.QuestionType.POLL?"Time remaining":l?"You won":"To win",[f,d,l,V,v,x]),ke=!se||se&&d===n.QuestionType.PREDICTION&&T&&!N,De=(d===n.QuestionType.TRIVIA||d===n.QuestionType.PREDICTION)&&l&&v&&(x==null?void 0:x.youVoted),Oe=l||V||ee||d===n.QuestionType.TRIVIA&&g===n.QuestionStatus.RESOLVED&&w,Ne=!r&&(f||F)||ae,Ve=()=>{const p=()=>d===n.QuestionType.TRIVIA?l!=null&&l.correct?`That's correct!
2
+ You chose wisely.`:`So close!
3
+ Better luck next time.`:d===n.QuestionType.POLL?`Thanks for answering.
4
+ Please stay tuned for the next question.`:d===n.QuestionType.PREDICTION?"Stay tuned to see if your prediction was correct.":"",A=()=>d===n.QuestionType.TRIVIA?`Your Pick: ${x==null?void 0:x.text}`:d===n.QuestionType.POLL||d===n.QuestionType.PREDICTION?`Your Pick: ${l==null?void 0:l.text}`:"",M=()=>d===n.QuestionType.TRIVIA&&(C==null?void 0:C.case)==="trivia"?C==null?void 0:C.value.explanation:d===n.QuestionType.PREDICTION?h:"";return ae?e.jsx(he,{children:e.jsx(Qs,{title:p(),description:A(),...l!=null&&l.correct||d===n.QuestionType.POLL||d===n.QuestionType.PREDICTION?{icon:"icon-correct"}:{},...d===n.QuestionType.TRIVIA||d===n.QuestionType.PREDICTION?{additionalDescription:M()}:{}})}):!r&&(f||F)?e.jsx(he,{children:e.jsx(us,{icon:"icon-check-circle",title:"More to come...",description:F?e.jsxs(e.Fragment,{children:["Stay tuned for more questions ",e.jsx("br",{})," and insights."]}):e.jsxs(e.Fragment,{children:["Watch for additional enhanced stream ",e.jsx("br",{})," interactive experience."]})})}):null};return e.jsxs(qs,{children:[r&&e.jsx(Ss,{}),e.jsx(Ae,{style:r?{marginTop:"-40px"}:{},children:e.jsxs(Ce,{children:[!r&&!E&&e.jsx(me,{feedbackMessages:ue,questionVoted:!!l,questionVotedCorrectly:l==null?void 0:l.correct,questionType:d,hasCorrectAnswer:v,showExpiredNotification:V,showClosedNotificationTrivia:ee,votedInCurrentRender:T,votedAfterQuestionClosed:Q,enteredAnActiveQuestion:w,marketClosed:I,percentsAnimated:N,voteErrorMessage:O,votedAnswer:l}),se&&e.jsx(At,{title:Se,points:qe,onTimerExpired:Qe,questionType:t.type,isTimer:!i,isPlayingTimer:!l,animatePoints:De,timerDuration:Oe?0:Number(((b=t==null?void 0:t.appearance)==null?void 0:b.autoHideInterval)||"30"),votedInCurrentRender:T,percentsAnimated:N}),Ne?Ve():e.jsxs(e.Fragment,{children:[r&&e.jsxs(Ls,{children:[e.jsx(Fs,{name:"iconEarlyPrediction"}),"EARLY PREDICTION"]}),e.jsx(Os,{style:ke?{marginTop:0}:{},children:h}),r&&e.jsx(me,{feedbackMessages:ue,questionVoted:!!l,questionVotedCorrectly:l==null?void 0:l.correct,questionType:d,hasCorrectAnswer:v,showExpiredNotification:V,showClosedNotificationTrivia:ee,votedInCurrentRender:T,votedAfterQuestionClosed:Q,enteredAnActiveQuestion:w,marketClosed:I,percentsAnimated:N,voteErrorMessage:O,isEarlyPrediction:r,correctAnswer:x,votedAnswer:l,onAnimationEnd:Pe}),e.jsxs(Ns,{children:[e.jsx($e,{children:Z.sort((p,A)=>p.id>A.id?1:-1).map((p,A)=>e.jsx(ut,{...p,firstOption:A===0,markThatVoted:_e,onPercentsAnimated:()=>H(!0),votedAfterQuestionClosed:Q,enteredAnActiveQuestion:w,marketClosed:I,isEarlyPrediction:r,isAd:E,webos:m},p.id))}),r&&e.jsxs(e.Fragment,{children:[e.jsx(ks,{}),e.jsx(Ds,{children:e.jsx(Ms,{name:"mastersLogoWhite"})})]})]})]})]})})]})};exports.C=ze;exports.S=Ke;exports.S$1=ve;exports.a=oe;exports.c=je;exports.d=He;exports.ee=Et;exports.f=re;exports.l=Me;exports.m=We;exports.n=ie;exports.p=Le;exports.te=$t;
@@ -1,5 +1,5 @@
1
- "use strict";var i2=Object.defineProperty;var a2=(s,t,i)=>t in s?i2(s,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):s[t]=i;var w=(s,t,i)=>a2(s,typeof t!="symbol"?t+"":t,i);const h=require("react"),z=require("./hooks-B0Qttldg.js"),e=require("react/jsx-runtime"),x=require("./useStreamLayerApp2.js"),q=require("./index7.js"),n=require("./sl-types.js"),$=require("./index13.js"),T=require("./index3.js"),r2=require("nanostores"),se=require("lodash.throttle"),Pe=require("./index-DSi8Qgfs.js"),Z=require("./analytics.js"),H=require("./Question.js"),R=require("./index8.js"),E=require("./index12.js"),G=require("react-dom"),l2=require("./utils.js"),A=require("./index5.js"),o2=require("react-infinite-scroller"),D=require("./notification2.js"),Ue=require("./index9.js");require("uuid");require("@nanostores/query");const d2=require("./index4.js"),We=s=>r2.atom(s),c2=s=>{const t=n.useStore(s.getActiveFeature()),i=n.useStore(s.streamStore()),[a,r]=h.useState(null);return h.useEffect(()=>{const l=s.getFeatures();if(!t)r(null);else for(const[d,o]of l)d===t?(o.status.get()===T.FeatureStatus.Suspended&&o.enable(),r(o)):o.status.get()===T.FeatureStatus.Ready&&o.disable();return()=>{for(const[,d]of l)d.status.get()===T.FeatureStatus.Ready&&d.disable()}},[t,s,i]),[t,a]},le=Object.keys(n.A),oe=()=>{const s=window.innerWidth;let t="sm";for(let i=le.length-1;i>0;i--){const a=le[i];if(!(s<n.A[a])&&s>=n.A[a]){t=a;break}}return{name:t,size:n.A[t]}},de=s=>{var t;return(((t=s.current)==null?void 0:t.getBoundingClientRect().y)||0)<-68},K=()=>window.matchMedia("(orientation: landscape)").matches,u2=s=>{const[t]=h.useState(()=>Pe.i({screen:oe(),sdkInView:de(s),sdkInDesktopView:K()}));return h.useEffect(()=>{const i=se(()=>{t.setKey("sdkInView",de(s))},200),a=se(()=>{const r=oe();t.setKey("screen",r),t.setKey("sdkInDesktopView",K())},200);return window.addEventListener("scroll",i),window.addEventListener("resize",a),()=>{window.removeEventListener("scroll",i),window.removeEventListener("resize",a)}},[t,s]),[t]},ae=(s,t,i)=>{const a=t>=n.A.lg&&t<n.A.xl?75:52;s.current&&window.scrollTo({top:s.current.offsetTop-a,...i})},p2=15,h2=(s,t)=>{const i=h.useRef(null),a=h.useRef(0),[r]=h.useState(Pe.i({scrollPosition:0,tabsShown:!0,scrollDirection:"forward"})),l=n.useStore(t);return h.useEffect(()=>{const d=K()?i.current:window;if(!d)return()=>{};const o=se(c=>{var p;const f=c.target;if(!f)return;let m=0;K()?m=f.scrollTop:m=((p=s.current)==null?void 0:p.getBoundingClientRect().y)||0;const u=a.current-m;if(p2>Math.abs(u))return;const v=a.current<m?"forward":"backward";a.current=m,r.set({scrollPosition:Math.round(m),scrollDirection:v,tabsShown:r.get().tabsShown})},200);return d.addEventListener("scroll",o),()=>{d.removeEventListener("scroll",o)}},[r,s,l.screen]),[i,r]},J=n.styled_default("div")({name:"LoadingContainer",class:"lclc0ej",propsAsIs:!1}),m2=({feature:s,sdk:t,children:i,className:a,noWait:r})=>{const l=n.useStore(s.status),d=n.useStore(t.sdkStore.slStreamId);if(!r){if(d!=null&&d.loading&&!d.data)return e.jsx(J,{className:a,children:"Event is loading..."});if(!(d!=null&&d.data))return e.jsx(J,{className:a,children:"Event is forbidden..."});if(l!==T.FeatureStatus.Ready)return e.jsx(J,{className:a,children:"Wait feature..."})}return i},f2=n.styled_default("div")({name:"Container",class:"c1zy8a",propsAsIs:!1}),v2=n.styled_default("div")({name:"Title",class:"t1vih9p5",propsAsIs:!1}),C2=n.styled_default("div")({name:"Indicator",class:"i1fbnvpb",propsAsIs:!1}),ce=({indicator:s,title:t})=>e.jsxs(f2,{children:[e.jsx(v2,{children:t}),e.jsx(C2,{children:s})]}),g2=n.styled_default("div")({name:"Container",class:"ctmhwyc",propsAsIs:!1}),x2=n.styled_default("div")({name:"Indicator",class:"i1jri200",propsAsIs:!1}),y2=n.styled_default("div")({name:"Title",class:"t8s05oq",propsAsIs:!1}),P=({indicator:s,title:t})=>e.jsxs(g2,{children:[e.jsx(x2,{children:s}),e.jsx(y2,{children:t})]}),_2=n.styled_default("div")({name:"Container",class:"c1yrpn9o",propsAsIs:!1}),I2=n.styled_default("div")({name:"TopInfo",class:"t17fwahh",propsAsIs:!1}),j2=n.styled_default("div")({name:"BottomInfo",class:"by6w7e9",propsAsIs:!1}),b2=n.styled_default("div")({name:"User",class:"u1g7arbm",propsAsIs:!1}),A2=n.styled_default("img")({name:"Avatar",class:"a1ldeata",propsAsIs:!1}),w2=n.styled_default("div")({name:"UserInfo",class:"u10d4koz",propsAsIs:!1}),$2=n.styled_default("div")({name:"UserName",class:"u1q6roj0",propsAsIs:!1}),k2=n.styled_default("div")({name:"UserRating",class:"ui0m425",propsAsIs:!1}),L2=n.styled_default("img")({name:"TrophyIcon",class:"t1el3mrn",propsAsIs:!1}),S2=n.styled_default("div")({name:"RtsContainer",class:"r2vgnxv",propsAsIs:!1}),T2=n.styled_default("div")({name:"RtsDivider",class:"roqn06j",propsAsIs:!1}),N2=n.styled_default("div")({name:"Rts",class:"r15adx7c",propsAsIs:!1}),ue=n.styled_default("div")({name:"RtsIndicator",class:"rv59lta",propsAsIs:!1}),pe=n.styled_default("div")({name:"RtsLabel",class:"r55lotb",propsAsIs:!1}),E2=n.styled_default("div")({name:"Divider",class:"d1knfgqt",propsAsIs:!1}),R2=n.styled_default("div")({name:"Ranks",class:"r1mqo824",propsAsIs:!1}),V2=n.styled_default("div")({name:"Statistics",class:"sxareh6",propsAsIs:!1}),H2=n.styled_default("div")({name:"AvatarPlaceholder",class:"amcu48h",propsAsIs:!1}),z2=n.styled_default("button")({name:"UserAccountBtn",class:"u32nfkp",propsAsIs:!1}),M2="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",Qe=({loading:s,hideFriendsRank:t,avatar:i,name:a,points:r,friendsRank:l,rank:d,streak:o,correct:c,incorrect:p,inTop:f,successRate:m})=>e.jsxs(_2,{"data-loading":s,children:[e.jsx(I2,{children:e.jsx(R.i,{loading:s,children:e.jsxs(b2,{children:[e.jsxs(z2,{children:[i&&e.jsx(A2,{alt:"avatar",src:i}),!i&&e.jsx(H2,{children:E.I(a||"")})]}),e.jsxs(w2,{children:[e.jsx($2,{children:a}),e.jsxs(k2,{children:[e.jsxs(S2,{children:[e.jsxs(N2,{children:[e.jsx(L2,{alt:"rank-icon",src:M2}),e.jsxs(ue,{children:[E.s(r),e.jsx(pe,{children:"PTS"})]})]}),t&&e.jsxs(ue,{children:[e.jsx(T2,{}),d||0,e.jsx(pe,{children:"global rank"})]})]}),!t&&e.jsxs(e.Fragment,{children:[e.jsx(E2,{}),e.jsxs("div",{children:["TOP ",f||0,"%"]})]})]})]})]})})}),e.jsxs(j2,{children:[!t&&e.jsxs(R2,{children:[e.jsx(R.i,{loading:s,style:{width:"100%"},children:e.jsx(ce,{indicator:l||0,title:"Friends rank"})}),e.jsx(R.i,{loading:s,style:{width:"100%"},children:e.jsx(ce,{indicator:d||0,title:"Global rank"})})]}),e.jsx(R.i,{loading:s,children:e.jsxs(V2,{children:[e.jsx(P,{indicator:o||0,title:"Win streak"}),e.jsx(P,{indicator:c||0,title:"Correct"}),e.jsx(P,{indicator:p||0,title:"Incorrect"}),e.jsx(P,{indicator:`${m||0}%`,title:"Succ. rate"})]})})]})]}),O2=n.styled_default("div")({name:"StaticContainer",class:"svm502q",propsAsIs:!1}),q2=`
1
+ "use strict";var n2=Object.defineProperty;var i2=(s,t,i)=>t in s?n2(s,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):s[t]=i;var w=(s,t,i)=>i2(s,typeof t!="symbol"?t+"":t,i);const h=require("react"),z=require("./hooks-B0Qttldg.js"),e=require("react/jsx-runtime"),y=require("./useStreamLayerApp2.js"),q=require("./index5.js"),n=require("./sl-types.js"),$=require("./index12.js"),T=require("./index7.js"),a2=require("nanostores"),se=require("lodash.throttle"),F=require("./analytics.js"),H=require("./Question.js"),R=require("./index6.js"),E=require("./index11.js"),Q=require("react-dom"),r2=require("./utils.js"),A=require("./index4.js"),l2=require("react-infinite-scroller"),P=require("./notification2.js"),Pe=require("./index8.js");require("uuid");require("@nanostores/query");const o2=require("./index3.js"),Ue=s=>a2.atom(s),d2=s=>{const t=n.useStore(s.getActiveFeature()),i=n.useStore(s.streamStore()),[a,r]=h.useState(null);return h.useEffect(()=>{const l=s.getFeatures();if(!t)r(null);else for(const[d,o]of l)d===t?(o.status.get()===T.FeatureStatus.Suspended&&o.enable(),r(o)):o.status.get()===T.FeatureStatus.Ready&&o.disable();return()=>{for(const[,d]of l)d.status.get()===T.FeatureStatus.Ready&&d.disable()}},[t,s,i]),[t,a]},le=Object.keys(n.A),oe=()=>{const s=window.innerWidth;let t="sm";for(let i=le.length-1;i>0;i--){const a=le[i];if(!(s<n.A[a])&&s>=n.A[a]){t=a;break}}return{name:t,size:n.A[t]}},de=s=>{var t;return(((t=s.current)==null?void 0:t.getBoundingClientRect().y)||0)<-68},K=()=>window.matchMedia("(orientation: landscape)").matches,c2=s=>{const[t]=h.useState(()=>F.f({screen:oe(),sdkInView:de(s),sdkInDesktopView:K()}));return h.useEffect(()=>{const i=se(()=>{t.setKey("sdkInView",de(s))},200),a=se(()=>{const r=oe();t.setKey("screen",r),t.setKey("sdkInDesktopView",K())},200);return window.addEventListener("scroll",i),window.addEventListener("resize",a),()=>{window.removeEventListener("scroll",i),window.removeEventListener("resize",a)}},[t,s]),[t]},ae=(s,t,i)=>{const a=t>=n.A.lg&&t<n.A.xl?75:52;s.current&&window.scrollTo({top:s.current.offsetTop-a,...i})},u2=15,p2=(s,t)=>{const i=h.useRef(null),a=h.useRef(0),[r]=h.useState(F.f({scrollPosition:0,tabsShown:!0,scrollDirection:"forward"})),l=n.useStore(t);return h.useEffect(()=>{const d=K()?i.current:window;if(!d)return()=>{};const o=se(c=>{var p;const f=c.target;if(!f)return;let m=0;K()?m=f.scrollTop:m=((p=s.current)==null?void 0:p.getBoundingClientRect().y)||0;const u=a.current-m;if(u2>Math.abs(u))return;const v=a.current<m?"forward":"backward";a.current=m,r.set({scrollPosition:Math.round(m),scrollDirection:v,tabsShown:r.get().tabsShown})},200);return d.addEventListener("scroll",o),()=>{d.removeEventListener("scroll",o)}},[r,s,l.screen]),[i,r]},J=n.styled_default("div")({name:"LoadingContainer",class:"lclc0ej",propsAsIs:!1}),h2=({feature:s,sdk:t,children:i,className:a,noWait:r})=>{const l=n.useStore(s.status),d=n.useStore(t.sdkStore.slStreamId);if(!r){if(d!=null&&d.loading&&!d.data)return e.jsx(J,{className:a,children:"Event is loading..."});if(!(d!=null&&d.data))return e.jsx(J,{className:a,children:"Event is forbidden..."});if(l!==T.FeatureStatus.Ready)return e.jsx(J,{className:a,children:"Wait feature..."})}return i},m2=n.styled_default("div")({name:"Container",class:"c1zy8a",propsAsIs:!1}),f2=n.styled_default("div")({name:"Title",class:"t1vih9p5",propsAsIs:!1}),v2=n.styled_default("div")({name:"Indicator",class:"i1fbnvpb",propsAsIs:!1}),ce=({indicator:s,title:t})=>e.jsxs(m2,{children:[e.jsx(f2,{children:t}),e.jsx(v2,{children:s})]}),C2=n.styled_default("div")({name:"Container",class:"ctmhwyc",propsAsIs:!1}),g2=n.styled_default("div")({name:"Indicator",class:"i1jri200",propsAsIs:!1}),y2=n.styled_default("div")({name:"Title",class:"t8s05oq",propsAsIs:!1}),U=({indicator:s,title:t})=>e.jsxs(C2,{children:[e.jsx(g2,{children:s}),e.jsx(y2,{children:t})]}),x2=n.styled_default("div")({name:"Container",class:"c1yrpn9o",propsAsIs:!1}),_2=n.styled_default("div")({name:"TopInfo",class:"t17fwahh",propsAsIs:!1}),I2=n.styled_default("div")({name:"BottomInfo",class:"by6w7e9",propsAsIs:!1}),j2=n.styled_default("div")({name:"User",class:"u1g7arbm",propsAsIs:!1}),b2=n.styled_default("img")({name:"Avatar",class:"a1ldeata",propsAsIs:!1}),A2=n.styled_default("div")({name:"UserInfo",class:"u10d4koz",propsAsIs:!1}),w2=n.styled_default("div")({name:"UserName",class:"u1q6roj0",propsAsIs:!1}),$2=n.styled_default("div")({name:"UserRating",class:"ui0m425",propsAsIs:!1}),k2=n.styled_default("img")({name:"TrophyIcon",class:"t1el3mrn",propsAsIs:!1}),L2=n.styled_default("div")({name:"RtsContainer",class:"r2vgnxv",propsAsIs:!1}),S2=n.styled_default("div")({name:"RtsDivider",class:"roqn06j",propsAsIs:!1}),T2=n.styled_default("div")({name:"Rts",class:"r15adx7c",propsAsIs:!1}),ue=n.styled_default("div")({name:"RtsIndicator",class:"rv59lta",propsAsIs:!1}),pe=n.styled_default("div")({name:"RtsLabel",class:"r55lotb",propsAsIs:!1}),N2=n.styled_default("div")({name:"Divider",class:"d1knfgqt",propsAsIs:!1}),E2=n.styled_default("div")({name:"Ranks",class:"r1mqo824",propsAsIs:!1}),R2=n.styled_default("div")({name:"Statistics",class:"sxareh6",propsAsIs:!1}),V2=n.styled_default("div")({name:"AvatarPlaceholder",class:"amcu48h",propsAsIs:!1}),H2=n.styled_default("button")({name:"UserAccountBtn",class:"u32nfkp",propsAsIs:!1}),z2="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",We=({loading:s,hideFriendsRank:t,avatar:i,name:a,points:r,friendsRank:l,rank:d,streak:o,correct:c,incorrect:p,inTop:f,successRate:m})=>e.jsxs(x2,{"data-loading":s,children:[e.jsx(_2,{children:e.jsx(R.i,{loading:s,children:e.jsxs(j2,{children:[e.jsxs(H2,{children:[i&&e.jsx(b2,{alt:"avatar",src:i}),!i&&e.jsx(V2,{children:E.I(a||"")})]}),e.jsxs(A2,{children:[e.jsx(w2,{children:a}),e.jsxs($2,{children:[e.jsxs(L2,{children:[e.jsxs(T2,{children:[e.jsx(k2,{alt:"rank-icon",src:z2}),e.jsxs(ue,{children:[E.s(r),e.jsx(pe,{children:"PTS"})]})]}),t&&e.jsxs(ue,{children:[e.jsx(S2,{}),d||0,e.jsx(pe,{children:"global rank"})]})]}),!t&&e.jsxs(e.Fragment,{children:[e.jsx(N2,{}),e.jsxs("div",{children:["TOP ",f||0,"%"]})]})]})]})]})})}),e.jsxs(I2,{children:[!t&&e.jsxs(E2,{children:[e.jsx(R.i,{loading:s,style:{width:"100%"},children:e.jsx(ce,{indicator:l||0,title:"Friends rank"})}),e.jsx(R.i,{loading:s,style:{width:"100%"},children:e.jsx(ce,{indicator:d||0,title:"Global rank"})})]}),e.jsx(R.i,{loading:s,children:e.jsxs(R2,{children:[e.jsx(U,{indicator:o||0,title:"Win streak"}),e.jsx(U,{indicator:c||0,title:"Correct"}),e.jsx(U,{indicator:p||0,title:"Incorrect"}),e.jsx(U,{indicator:`${m||0}%`,title:"Succ. rate"})]})})]})]}),M2=n.styled_default("div")({name:"StaticContainer",class:"svm502q",propsAsIs:!1}),O2=`
2
2
  .sl-pill-button {
3
3
  display: none !important;
4
4
  }
5
- `,Ze=()=>window.innerWidth>=n.A.md&&window.innerWidth<n.A.lg?76:53,he=s=>{var t;const i=Ze();return Math.round((((t=s.current)==null?void 0:t.getBoundingClientRect().y)||0)-i)<=0},Ge=({children:s,container:t,useContainer:i,staticStyles:a})=>{const[r]=h.useState(()=>he(t)),[l,d]=h.useState(!1);return h.useEffect(()=>{if(!t.current||!r)return d(!0),()=>{};const o=window.scrollY;return d(!0),()=>{he(t)&&window.scrollTo({top:o,behavior:"instant"})}},[]),h.useEffect(()=>{if(l&&t.current&&r){const o=Ze();window.scrollTo({top:t.current.offsetTop-o,behavior:"instant"})}},[l]),!t.current||!l?null:i?G.createPortal(e.jsxs(O2,{className:"StaticContainer",children:[s,e.jsx("style",{children:l2.u}),e.jsx("style",{children:q2})]}),t.current,"modal-node"):G.createPortal(e.jsxs(e.Fragment,{children:[s,e.jsx("style",{children:a})]}),t.current,"modal-node")},F2=n.styled_default("div")({name:"Container",class:"c115qtkr",propsAsIs:!1}),B2=n.styled_default("div")({name:"STabs",class:"sxnslc8",propsAsIs:!1}),D2=n.styled_default("button")({name:"Button",class:"b1umzux0",propsAsIs:!1}),P2=n.styled_default("span")({name:"Title",class:"tspsaas",propsAsIs:!1});var F=(s=>(s.HOME="home",s.LEADERBOARD="leaderboard",s))(F||{});const me=({title:s,active:t,onClick:i})=>e.jsx(D2,{"data-a":"intr",onClick:i,"data-selected":t,children:e.jsx(P2,{"data-a":"intr",children:s})}),U2=({activePage:s="home",toggleActivePage:t})=>e.jsx(F2,{children:e.jsxs(B2,{"data-position":s==="home"?"left":"right",children:[e.jsx(me,{title:"Home",active:s==="home",onClick:()=>t("home")}),e.jsx(me,{title:"Friends",active:s==="leaderboard",onClick:()=>t("leaderboard")})]})}),W2=n.styled_default("button")({name:"Container",class:"cpjnajb",propsAsIs:!1}),Q2=n.styled_default("div")({name:"Content",class:"c4m6kaz",propsAsIs:!1}),Z2=n.styled_default("span")({name:"Title",class:"t1h8t9cc",propsAsIs:!1}),G2=()=>e.jsx(W2,{children:e.jsxs(Q2,{children:[e.jsx(A.B1,{name:"iconCopySuccess"}),e.jsx(Z2,{children:"Link Copied to Clipboard"})]})}),Ke=s=>{const t=h.useRef(),[i,a]=h.useState(null),r=h.useCallback(async l=>{var d;if(l&&(d=navigator==null?void 0:navigator.clipboard)!=null&&d.writeText){t.current&&(clearTimeout(t.current),a(null));try{await navigator.clipboard.writeText(l),s.current&&(a(G.createPortal(e.jsx(G2,{}),s.current)),t.current=setTimeout(()=>{a(null)},1e3))}catch(o){console.error("Unable to copy to clipboard",o)}}},[s]);return h.useEffect(()=>()=>{clearTimeout(t.current)},[]),[r,i]},K2=n.styled_default("div")({name:"Container",class:"c1ux29ft",propsAsIs:!1}),Y2=()=>A.B1,J2=n.styled_default(Y2())({name:"FriendsIcon",class:"f10ncfg2",propsAsIs:!0}),X2=n.styled_default("div")({name:"Content",class:"c1yc07bd",propsAsIs:!1}),es=n.styled_default("div")({name:"Title",class:"tj6cq7w",propsAsIs:!1}),ss=n.styled_default("div")({name:"Description",class:"d1ag78xo",propsAsIs:!1}),ts=()=>A.B1,ns=n.styled_default(ts())({name:"ArrowInviteIcon",class:"awohrz6",propsAsIs:!0}),is=({title:s,description:t,onClick:i,className:a})=>{const[r]=Z.f({type:"invitation",action:"sent",payload:{from:x.InvitationFrom.TITLE_CARD}});return e.jsxs(K2,{"data-a":"intr",onClick:r(i),className:a,children:[e.jsx(J2,{name:"icon-friends"}),e.jsxs(X2,{children:[e.jsx(es,{children:s}),e.jsx(ss,{children:t})]}),e.jsx(ns,{name:"icon-copy"})]})};let S;typeof window<"u"?S=window:typeof self<"u"?S=self:S=x.global;let te=null,ne=null;const fe=20,X=S.clearTimeout,ve=S.setTimeout,ee=S.cancelAnimationFrame||S.mozCancelAnimationFrame||S.webkitCancelAnimationFrame,Ce=S.requestAnimationFrame||S.mozRequestAnimationFrame||S.webkitRequestAnimationFrame;ee==null||Ce==null?(te=X,ne=function(t){return ve(t,fe)}):(te=function([t,i]){ee(t),X(i)},ne=function(t){const i=Ce(function(){X(a),t()}),a=ve(function(){ee(i),t()},fe);return[i,a]});function as(s){let t,i,a,r,l,d,o;const c=typeof document<"u"&&document.attachEvent;if(!c){d=function(I){const _=I.__resizeTriggers__,b=_.firstElementChild,j=_.lastElementChild,L=b.firstElementChild;j.scrollLeft=j.scrollWidth,j.scrollTop=j.scrollHeight,L.style.width=b.offsetWidth+1+"px",L.style.height=b.offsetHeight+1+"px",b.scrollLeft=b.scrollWidth,b.scrollTop=b.scrollHeight},l=function(I){return I.offsetWidth!==I.__resizeLast__.width||I.offsetHeight!==I.__resizeLast__.height},o=function(I){if(I.target.className&&typeof I.target.className.indexOf=="function"&&I.target.className.indexOf("contract-trigger")<0&&I.target.className.indexOf("expand-trigger")<0)return;const _=this;d(this),this.__resizeRAF__&&te(this.__resizeRAF__),this.__resizeRAF__=ne(function(){l(_)&&(_.__resizeLast__.width=_.offsetWidth,_.__resizeLast__.height=_.offsetHeight,_.__resizeListeners__.forEach(function(L){L.call(_,I)}))})};let u=!1,v="";a="animationstart";const g="Webkit Moz O ms".split(" ");let y="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),C="";{const I=document.createElement("fakeelement");if(I.style.animationName!==void 0&&(u=!0),u===!1){for(let _=0;_<g.length;_++)if(I.style[g[_]+"AnimationName"]!==void 0){C=g[_],v="-"+C.toLowerCase()+"-",a=y[_],u=!0;break}}}i="resizeanim",t="@"+v+"keyframes "+i+" { from { opacity: 0; } to { opacity: 0; } } ",r=v+"animation: 1ms "+i+"; "}const p=function(u){if(!u.getElementById("detectElementResize")){const v=(t||"")+".resize-triggers { "+(r||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',g=u.head||u.getElementsByTagName("head")[0],y=u.createElement("style");y.id="detectElementResize",y.type="text/css",s!=null&&y.setAttribute("nonce",s),y.styleSheet?y.styleSheet.cssText=v:y.appendChild(u.createTextNode(v)),g.appendChild(y)}};return{addResizeListener:function(u,v){if(c)u.attachEvent("onresize",v);else{if(!u.__resizeTriggers__){const g=u.ownerDocument,y=S.getComputedStyle(u);y&&y.position==="static"&&(u.style.position="relative"),p(g),u.__resizeLast__={},u.__resizeListeners__=[],(u.__resizeTriggers__=g.createElement("div")).className="resize-triggers";const C=g.createElement("div");C.className="expand-trigger",C.appendChild(g.createElement("div"));const I=g.createElement("div");I.className="contract-trigger",u.__resizeTriggers__.appendChild(C),u.__resizeTriggers__.appendChild(I),u.appendChild(u.__resizeTriggers__),d(u),u.addEventListener("scroll",o,!0),a&&(u.__resizeTriggers__.__animationListener__=function(b){b.animationName===i&&d(u)},u.__resizeTriggers__.addEventListener(a,u.__resizeTriggers__.__animationListener__))}u.__resizeListeners__.push(v)}},removeResizeListener:function(u,v){if(c)u.detachEvent("onresize",v);else if(u.__resizeListeners__.splice(u.__resizeListeners__.indexOf(v),1),!u.__resizeListeners__.length){u.removeEventListener("scroll",o,!0),u.__resizeTriggers__.__animationListener__&&(u.__resizeTriggers__.removeEventListener(a,u.__resizeTriggers__.__animationListener__),u.__resizeTriggers__.__animationListener__=null);try{u.__resizeTriggers__=!u.removeChild(u.__resizeTriggers__)}catch{}}}}}class rs extends h.Component{constructor(...t){super(...t),this.state={height:this.props.defaultHeight||0,scaledHeight:this.props.defaultHeight||0,scaledWidth:this.props.defaultWidth||0,width:this.props.defaultWidth||0},this._autoSizer=null,this._detectElementResize=null,this._parentNode=null,this._resizeObserver=null,this._timeoutId=null,this._onResize=()=>{this._timeoutId=null;const{disableHeight:i,disableWidth:a,onResize:r}=this.props;if(this._parentNode){const l=window.getComputedStyle(this._parentNode)||{},d=parseFloat(l.paddingLeft||"0"),o=parseFloat(l.paddingRight||"0"),c=parseFloat(l.paddingTop||"0"),p=parseFloat(l.paddingBottom||"0"),f=this._parentNode.getBoundingClientRect(),m=f.height-c-p,u=f.width-d-o,v=this._parentNode.offsetHeight-c-p,g=this._parentNode.offsetWidth-d-o;(!i&&(this.state.height!==v||this.state.scaledHeight!==m)||!a&&(this.state.width!==g||this.state.scaledWidth!==u))&&(this.setState({height:v,width:g,scaledHeight:m,scaledWidth:u}),typeof r=="function"&&r({height:v,scaledHeight:m,scaledWidth:u,width:g}))}},this._setRef=i=>{this._autoSizer=i}}componentDidMount(){const{nonce:t}=this.props,i=this._autoSizer?this._autoSizer.parentNode:null;if(i!=null&&i.ownerDocument&&i.ownerDocument.defaultView&&i instanceof i.ownerDocument.defaultView.HTMLElement){this._parentNode=i;const a=i.ownerDocument.defaultView.ResizeObserver;a!=null?(this._resizeObserver=new a(()=>{this._timeoutId=setTimeout(this._onResize,0)}),this._resizeObserver.observe(i)):(this._detectElementResize=as(t),this._detectElementResize.addResizeListener(i,this._onResize)),this._onResize()}}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),this._timeoutId!==null&&clearTimeout(this._timeoutId),this._resizeObserver&&this._resizeObserver.disconnect())}render(){const{children:t,defaultHeight:i,defaultWidth:a,disableHeight:r=!1,disableWidth:l=!1,doNotBailOutOnEmptyChildren:d=!1,nonce:o,onResize:c,style:p={},tagName:f="div",...m}=this.props,{height:u,scaledHeight:v,scaledWidth:g,width:y}=this.state,C={overflow:"visible"},I={};let _=!1;return r||(u===0&&(_=!0),C.height=0,I.height=u,I.scaledHeight=v),l||(y===0&&(_=!0),C.width=0,I.width=y,I.scaledWidth=g),d&&(_=!1),h.createElement(f,{ref:this._setRef,style:{...C,...p},...m},!_&&t(I))}}function ls(s){var t=s.lastRenderedStartIndex,i=s.lastRenderedStopIndex,a=s.startIndex,r=s.stopIndex;return!(a>i||r<t)}function os(s){for(var t=s.isItemLoaded,i=s.itemCount,a=s.minimumBatchSize,r=s.startIndex,l=s.stopIndex,d=[],o=null,c=null,p=r;p<=l;p++){var f=t(p);f?c!==null&&(d.push(o,c),o=c=null):(c=p,o===null&&(o=p))}if(c!==null){for(var m=Math.min(Math.max(c,o+a-1),i-1),u=c+1;u<=m&&!t(u);u++)c=u;d.push(o,c)}if(d.length)for(;d[1]-d[0]+1<a&&d[0]>0;){var v=d[0]-1;if(!t(v))d[0]=v;else break}return d}var ds=function(s,t){if(!(s instanceof t))throw new TypeError("Cannot call a class as a function")},cs=function(){function s(t,i){for(var a=0;a<i.length;a++){var r=i[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,i,a){return i&&s(t.prototype,i),a&&s(t,a),t}}(),us=function(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);s.prototype=Object.create(t&&t.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(s,t):s.__proto__=t)},ge=function(s,t){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:s};(function(s){us(t,s);function t(){var i,a,r,l;ds(this,t);for(var d=arguments.length,o=Array(d),c=0;c<d;c++)o[c]=arguments[c];return l=(a=(r=ge(this,(i=t.__proto__||Object.getPrototypeOf(t)).call.apply(i,[this].concat(o))),r),r._lastRenderedStartIndex=-1,r._lastRenderedStopIndex=-1,r._memoizedUnloadedRanges=[],r._onItemsRendered=function(p){var f=p.visibleStartIndex,m=p.visibleStopIndex;r._lastRenderedStartIndex=f,r._lastRenderedStopIndex=m,r._ensureRowsLoaded(f,m)},r._setRef=function(p){r._listRef=p},a),ge(r,l)}return cs(t,[{key:"resetloadMoreItemsCache",value:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this._memoizedUnloadedRanges=[],a&&this._ensureRowsLoaded(this._lastRenderedStartIndex,this._lastRenderedStopIndex)}},{key:"componentDidMount",value:function(){}},{key:"render",value:function(){var a=this.props.children;return a({onItemsRendered:this._onItemsRendered,ref:this._setRef})}},{key:"_ensureRowsLoaded",value:function(a,r){var l=this.props,d=l.isItemLoaded,o=l.itemCount,c=l.minimumBatchSize,p=c===void 0?10:c,f=l.threshold,m=f===void 0?15:f,u=os({isItemLoaded:d,itemCount:o,minimumBatchSize:p,startIndex:Math.max(0,a-m),stopIndex:Math.min(o-1,r+m)});(this._memoizedUnloadedRanges.length!==u.length||this._memoizedUnloadedRanges.some(function(v,g){return u[g]!==v}))&&(this._memoizedUnloadedRanges=u,this._loadUnloadedRanges(u))}},{key:"_loadUnloadedRanges",value:function(a){for(var r=this,l=this.props.loadMoreItems||this.props.loadMoreRows,d=function(p){var f=a[p],m=a[p+1],u=l(f,m);u!=null&&u.then(function(){if(ls({lastRenderedStartIndex:r._lastRenderedStartIndex,lastRenderedStopIndex:r._lastRenderedStopIndex,startIndex:f,stopIndex:m})){if(r._listRef==null)return;typeof r._listRef.resetAfterIndex=="function"?r._listRef.resetAfterIndex(f,!0):(typeof r._listRef._getItemStyleCache=="function"&&r._listRef._getItemStyleCache(-1),r._listRef.forceUpdate())}})},o=0;o<a.length;o+=2)d(o)}}]),t})(h.PureComponent);const ps=n.styled_default("div")({name:"Container",class:"culdu4a",propsAsIs:!1}),hs=n.styled_default("div")({name:"Position",class:"pwf8e69",propsAsIs:!1}),ms=n.styled_default("img")({name:"Avatar",class:"atf4yh4",propsAsIs:!1}),fs=n.styled_default("div")({name:"AvatarPlaceholder",class:"a1dg29ja",propsAsIs:!1}),vs=n.styled_default("div")({name:"Content",class:"c10a68rc",propsAsIs:!1}),Cs=n.styled_default("div")({name:"NameContainer",class:"nc4kck5",propsAsIs:!1}),gs=n.styled_default("span")({name:"Name",class:"njsrqgr",propsAsIs:!1}),xs=()=>A.B1,ys=n.styled_default(xs())({name:"CurrentUserBadge",class:"c17uc4zr",propsAsIs:!0}),_s=({friendsRank:s,avatar:t,name:i,userId:a,points:r,isCurrentUser:l,style:d})=>e.jsxs(ps,{"data-name":a,style:d,children:[e.jsx(hs,{children:s||0}),e.jsxs(vs,{children:[t?e.jsx(ms,{alt:"leaderboard-item-avatar",src:t}):e.jsx(fs,{children:E.I(i||"")}),e.jsxs(Cs,{children:[e.jsx(gs,{children:i||""}),l&&e.jsx(ys,{name:"icon-star"})]})]}),e.jsx("div",{children:E.s(r)})]}),Is=n.styled_default("div")({name:"Container",class:"c16btbfp",propsAsIs:!1}),js=({items:s,currentUserId:t,openItemDetail:i,fetchMore:a,scrollNode:r,hasMore:l})=>{const d=h.useCallback(o=>{const c=o.target.getAttribute("data-name");c&&i(c)},[i]);return e.jsx(o2,{loadMore:a,initialLoad:!1,hasMore:l,useWindow:!1,getScrollParent:()=>r.current,children:e.jsx(Is,{"data-a":"intr",onClick:d,children:s.map(o=>e.jsx(_s,{...o,isCurrentUser:!!t&&t===o.userId},o.userId))})})},bs=n.styled_default("div")({name:"Container",class:"c1itm4k7",propsAsIs:!1}),As=n.styled_default("div")({name:"IconContainer",class:"i1w4fsni",propsAsIs:!1}),ws=()=>A.B1,$s=n.styled_default(ws())({name:"InviteGameIcon",class:"i19m85r1",propsAsIs:!0}),ks=n.styled_default("div")({name:"Content",class:"c1mbu204",propsAsIs:!1}),Ls=n.styled_default("div")({name:"Heading",class:"h1amdqtv",propsAsIs:!1}),Ss=n.styled_default("div")({name:"Subtext",class:"s1lhlj9j",propsAsIs:!1}),Ts=n.styled_default("div")({name:"LinkContainer",class:"l1wot35e",propsAsIs:!1}),Ns=n.styled_default("div")({name:"LinkInfo",class:"l1jdw39q",propsAsIs:!1}),Es=n.styled_default("span")({name:"LinkTitle",class:"l1cr5mk",propsAsIs:!1}),Rs=n.styled_default("span")({name:"LinkAddress",class:"lvi87q4",propsAsIs:!1}),Vs=()=>A.B1,Hs=n.styled_default(Vs())({name:"LinkIcon",class:"l1pqlvw3",propsAsIs:!0}),Ye=({inviteLink:s,inviteCardTitle:t,inviteCardSubtext:i,primaryColor:a,className:r})=>{const l=h.useRef(null),[d,o]=Ke(l),[c]=Z.f({type:"invitation",action:"sent",payload:{from:x.InvitationFrom.MENU}});return e.jsxs(bs,{className:r,children:[e.jsx(As,{style:{backgroundColor:a},children:e.jsx($s,{name:"invite-game-icon"})}),e.jsxs(ks,{children:[e.jsx(Ls,{children:t||""}),e.jsx(Ss,{children:i||""})]}),s&&e.jsxs(Ts,{ref:l,"data-a":"intr",onClick:c(()=>d(s)),children:[e.jsxs(Ns,{children:[e.jsx(Es,{children:"Invite link"}),e.jsx(Rs,{children:s})]}),e.jsx(Hs,{name:"icon-copy"})]}),o]})},zs=n.styled_default("div")({name:"InviteFriendsContainer",class:"i1c9dygq",propsAsIs:!1}),Ms=({deepLink:s})=>e.jsx(zs,{children:e.jsx(Ye,{inviteLink:s,inviteCardTitle:"It’s More Fun With Friends",inviteCardSubtext:"Invite and compete against your friends for the top spot on the leaderboard."})}),Os=n.styled_default("div")({name:"InviteLinkContainer",class:"i1odbhm4",propsAsIs:!1}),qs=({gamification:s,scrollNode:t,scrollStore:i,leaderboardList:a})=>{const r=h.useRef(null),{data:l,hasMore:d,loading:o,key:c}=n.useStore(a.$store),{data:p}=n.useStore(s.deepLink.$store),[f,m]=Ke(r);return!l.length&&!o?e.jsx(Ms,{deepLink:p}):e.jsxs(e.Fragment,{children:[e.jsx(js,{items:l,scrollNode:t,scrollStore:i,fetchMore:a.fetchMore,hasMore:d,openItemDetail:s.openUser,currentUserId:s.currentUserId.get()},c),p&&e.jsx(Os,{ref:r,children:e.jsx(is,{"data-a":"intr",onClick:()=>f(p),title:"Invite Friends",description:"Challenge them now!"})}),m]})},Fs=({gamification:s,scrollNode:t,scrollStore:i})=>s.leaderboardList?e.jsx(qs,{leaderboardList:s.leaderboardList,gamification:s,scrollNode:t,scrollStore:i}):null,Bs=()=>D.r,Ds=n.styled_default(Bs())({name:"Container",class:"cll3md7",propsAsIs:!0}),Ps=()=>D.S,Us=n.styled_default(Ps())({name:"ActionBtn",class:"a10g1iik",propsAsIs:!0}),Ws=({questionId:s,...t})=>e.jsxs(Ds,{"data-a":"intr","data-name":s,children:[e.jsx(H.O,{questionId:s,...t}),e.jsx(Us,{"data-a":"intr","data-name":s,children:"View Insight"})]}),Qs=()=>D.r,Zs=n.styled_default(Qs())({name:"Container",class:"cl56x6b",propsAsIs:!0}),Gs=n.styled_default("button")({name:"ActionButton",class:"a11pzf92",propsAsIs:!1}),Ks=n.styled_default("blockquote")({name:"Quote",class:"q1hbaleq",propsAsIs:!1}),Ys=({...s})=>e.jsxs(Zs,{"data-a":"intr","data-name":s.tweetId,children:[s.title&&e.jsx(Ks,{children:s.title}),e.jsx(E.b,{...s}),e.jsx(Gs,{"data-a":"intr","data-name":s.tweetId,children:"View Insight"})]}),xe=n.styled_default("div")({name:"QuestionsContainer",class:"qvghv3l",propsAsIs:!1}),Js=({questions:s,openQuestion:t,controlVideo:i})=>{const a=r=>{const l=r.target.getAttribute("data-name");l&&(Ue.wt(),t(l,{openedFrom:"list"}))};return s?e.jsx(xe,{"data-a":"intr",onClick:a,children:s==null?void 0:s.map(r=>{var l,d,o;if(r.type==="question"&&((l=r.attributes)==null?void 0:l.attributes.case)==="question"){const c=r.attributes.attributes.value;return e.jsx(D.R,{...c},c.questionId)}if(r.type==="insight"&&((d=r.attributes)==null?void 0:d.attributes.case)==="insight"){const c=r.attributes.attributes.value;return e.jsx(Ws,{controlVideo:i,...c},c.questionId)}if(r.type==="tweet"&&((o=r.attributes)==null?void 0:o.attributes.case)==="tweet"){const c=r.attributes.attributes.value,p=r.attributes.id;return e.jsx(Ys,{controlVideo:i,...c,tweetId:p},p)}return null})}):e.jsx(xe,{children:Array.from({length:5}).map((r,l)=>e.jsx(D.D,{},l))})},Xs=({store:s,openQuestion:t})=>{const{sdk:i}=H.p(),a=n.useStore(s);return e.jsx(Js,{openQuestion:t,questions:a.data,controlVideo:i==null?void 0:i.controlVideoPlayer})},et=({userSummary:s})=>{var t;const[i,a]=h.useState(void 0);return h.useEffect(()=>{const r=s.$store.subscribe(l=>{l&&a(l)});return()=>{r()}},[s]),e.jsx(Qe,{loading:!(i!=null&&i.summary),...i==null?void 0:i.summary,successRate:(t=i==null?void 0:i.percentage)==null?void 0:t.correct})},st=({gamification:s,className:t,scrollStore:i,scrollNode:a,appNode:r,style:l,responsiveStore:d})=>{const{tabsShown:o}=n.useStore(i,{keys:["tabsShown"]}),c=n.useStore(s.friendsTabEnabled),[p,f]=h.useState(F.HOME),[,m]=n.useTransition(),{sdkInDesktopView:u,screen:v}=n.useStore(d,{keys:["sdkInDesktopView"]}),g=C=>{m(()=>{var I;f(C),u===!1&&(((I=r.current)==null?void 0:I.getBoundingClientRect().y)||0)<0&&ae(r,v.size,{behavior:"instant"})})};h.useEffect(()=>i.subscribe(C=>{if(C.scrollPosition===0){i.setKey("tabsShown",!0);return}d.get().sdkInDesktopView?i.setKey("tabsShown",C.scrollDirection==="backward"):i.setKey("tabsShown",C.scrollDirection==="forward")}),[i,d]),h.useEffect(()=>{c||f(F.HOME)},[c]);let y="0px";return u?y=o?"0px":"calc(0px - var(--header-height))":y=o?"var(--header-height)":"0px",e.jsxs($.l,{className:n.cx_default(t,"SL-Tabs","sl-hide-on-modal"),style:l,children:[c&&e.jsx($.S,{style:{top:y},children:e.jsx(U2,{activePage:p,toggleActivePage:g})}),p===F.HOME&&e.jsxs(e.Fragment,{children:[e.jsx($.m,{children:e.jsx($.d,{children:e.jsx(et,{userSummary:s.userSummary})})}),e.jsx($.n,{style:{flex:1},children:e.jsx(Xs,{openQuestion:s.openQuestion,store:s.feedList.getStore()})})]}),p===F.LEADERBOARD&&e.jsx($.C,{children:e.jsx(Fs,{scrollStore:i,scrollNode:a,gamification:s})})]})},tt=()=>$.f,ye=n.styled_default(tt())({name:"OpenedContainer",class:"ouvguos",propsAsIs:!0}),_e="t1eu4lbg",nt=n.styled_default("div")({name:"UserContainer",class:"uuv2xqo",propsAsIs:!1}),it=({correct:s,incorrect:t})=>{const i=s+t;return i===0?0:Math.round(s/i*100)},at=({gamification:s,scrollStore:t,className:i,appNode:a,scrollNode:r,responsiveStore:l})=>e.jsx(st,{appNode:a,scrollStore:t,scrollNode:r,className:i,gamification:s,responsiveStore:l}),rt=({gamification:s,muted:t,sdk:i,className:a,appNode:r,responsiveStore:l})=>{const{topNavigation:d}=H.p(),o=n.useStore(s.openedQuestionId),c=n.useStore(s.openedQuestion.$store),p=n.useStore(s.openedUser||We(void 0)),{sdkInDesktopView:f}=n.useStore(l,{keys:["sdkInDesktopView"]}),{hiding:m,onAnimationEnd:u}=$.S$1();if(!o&&!p)return null;const v=c?e.jsx(ye,{className:n.cx_default(a,!d&&_e),hiding:m,onAnimationEnd:u,children:e.jsx(H.ht,{muted:t,sdk:i,gamification:s})}):p?e.jsx(ye,{className:n.cx_default(a,!d&&_e),hiding:m,onAnimationEnd:u,children:e.jsxs(nt,{children:[e.jsx(H.y,{label:"Friend's Rank",close:s.closeUser}),e.jsx($.a,{children:e.jsx(Qe,{...p,successRate:it(p)})})]})}):null;return e.jsx(Ge,{container:r,useContainer:!f,children:v})},lt=h.lazy(()=>Promise.resolve().then(()=>require("./gamification-feature.js"))),ot=({sdk:s,feature:t,className:i,scrollStore:a,appNode:r,scrollNode:l,responsiveStore:d})=>{const o=h.useMemo(()=>t&&t.featureConfig.get().type===x.SdkOverlayType.GAMES?e.jsx(m2,{className:i,sdk:s,feature:t,children:e.jsx(lt,{appNode:r,scrollStore:a,scrollNode:l,className:i,responsiveStore:d,gamification:t})}):null,[s,t,i,d,a,l,r]);return e.jsx(h.Suspense,{fallback:e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},children:"page loading..."}),children:o})},dt=({feature:s,sdk:t,muted:i,className:a,appNode:r,responsiveStore:l})=>s&&s.featureConfig.get().type===x.SdkOverlayType.GAMES?e.jsx(rt,{className:a,appNode:r,muted:i,sdk:t,responsiveStore:l,gamification:s}):null;window.dispatchEvent(new CustomEvent("grpc_devtools_loaded"));function ct(s){return s instanceof DOMException&&(s.code===22||s.code===1014||s.name==="QuotaExceededError"||s.name==="NS_ERROR_DOM_QUOTA_REACHED")}class ut{constructor(t="main",i=window.localStorage){w(this,"delimiter",":");w(this,"prefix");w(this,"storage");w(this,"clear",()=>{for(const t in window.localStorage)t.startsWith(this.prefix)&&this.storage.removeItem(t)});w(this,"generateKey",t=>`${this.prefix}${this.delimiter}${t.join(this.delimiter)}`);w(this,"write",(...t)=>{const i=t.pop()||"",a=this.generateKey(t);try{this.storage.setItem(a,i)}catch(r){ct(r)&&this.storage===window.sessionStorage&&(window.sessionStorage.removeItem("slstreamlogs"),this.storage.setItem(a,i))}});w(this,"read",(...t)=>{const i=this.storage.getItem(this.generateKey(t));return i===null?void 0:i});w(this,"remove",(...t)=>{this.storage.removeItem(this.generateKey(t))});this.prefix=`sl-sdk${this.delimiter}${t}`,this.storage=i}}var Ie;(function(s){s.Init="init",s.Ready="ready",s.Connecting="connecting",s.Connected="connected",s.Disconnected="disconnected",s.Failed="failed",s.Reconnect="reconnect",s.Reconnecting="reconnecting"})(Ie||(Ie={}));T.createLogger("grpc:stream");x.Code.Unknown,x.Code.Internal,x.Code.DeadlineExceeded,x.Code.ResourceExhausted,x.Code.FailedPrecondition,x.Code.Unavailable,x.Code.DataLoss;T.createLogger("grpc:retry");x.createContextKey(10,{description:"Number of attempts to retry"}),x.createContextKey(3e4,{description:"Max delay between retries in milliseconds"});var N;(function(s){s.SCHEMA="schema",s.EXTERNAL_TOKEN="eToken",s.TOKEN="token"})(N||(N={}));class pt extends ut{constructor(){super("user");w(this,"setSchema",i=>{this.write(N.SCHEMA,i)});w(this,"getSchema",()=>this.read(N.SCHEMA));w(this,"setToken",i=>{this.write(N.TOKEN,i)});w(this,"getToken",()=>this.read(N.TOKEN));w(this,"setExternalToken",i=>{this.write(N.EXTERNAL_TOKEN,i)});w(this,"getExternalToken",()=>this.read(N.EXTERNAL_TOKEN));w(this,"removeToken",()=>{this.remove(N.TOKEN)})}}var je;(function(s){s.DISABLED="disabled",s.INITIALIZATION="initialization",s.READY="ready",s.FAILED="failed",s.SUSPENDED="suspended"})(je||(je={}));var be;(function(s){s.SHOWED="showed",s.EVENT="ev"})(be||(be={}));var Ae;(function(s){s.ONBOARDING="onboarding",s.ONBOARDING_IO="onboarding_io",s.QUESTION_RECEIVED="q-received",s.QUESTION_OPENED="q-opened"})(Ae||(Ae={}));var we;(function(s){s.ALLOWED="allowed",s.DISALLOWED="disallowed"})(we||(we={}));var $e;(function(s){s.UNKNOWN="unknown",s.ALREADY_VOTED="already_voted"})($e||($e={}));T.createLogger("deep_link");T.createLogger("bypass");new pt;T.createLogger("video_player");x.QuestionType.FACTOID+"",x.QuestionType.POLL+"",x.QuestionType.TRIVIA+"",x.QuestionType.PREDICTION+"",x.QuestionType.TWEET+"";var ke;(function(s){s.Unset="unset",s.Required="required",s.Optional="optional",s.Completed="completed",s.Disabled="disabled",s.Unavailable="unavailable"})(ke||(ke={}));x.QuestionType.POLL,x.QuestionType.PREDICTION,x.QuestionType.TRIVIA;const ht={[x.SdkOverlayType.GAMES]:!0},mt=n.styled_default("div")({name:"Buttons",class:"b5o8qbl",propsAsIs:!1}),ft=({children:s,className:t})=>e.jsx(mt,{className:t,children:s}),Je=n.styled_default("div")({name:"Navigation",class:"n6tbwuy",propsAsIs:!1}),vt=()=>ft,Le=n.styled_default(vt())({name:"NavigationItems",class:"n1up4z7v",propsAsIs:!0}),Ct=n.styled_default("button")({name:"SButton",class:"sxxa0c",propsAsIs:!1}),gt=n.styled_default("span")({name:"ButtonIcon",class:"b193dcyu",propsAsIs:!1}),xt=n.styled_default("span")({name:"ButtonLabel",class:"b40tuix",propsAsIs:!1}),yt="s14xk0af",_t="ha3mg7c",It="h103yr45",U=({disabled:s,active:t,onClick:i,label:a,icon:r,id:l})=>e.jsx(Ct,{onClick:i,"data-a":"intr",disabled:s,className:n.cx_default(t&&yt,!t&&(l==="channels"||l==="featuredGroups")&&_t,!t&&l==="leaderboard"&&It),children:e.jsxs(e.Fragment,{children:[r&&e.jsx(gt,{children:r}),e.jsx(xt,{children:a})]})}),jt=()=>A.B1,bt=n.styled_default(jt())({name:"ButtonIcon",class:"b11wpe79",propsAsIs:!0}),At=n.styled_default("div")({name:"Container",class:"calnblm",propsAsIs:!1}),wt=n.styled_default("div")({name:"Title",class:"t1438p52",propsAsIs:!1}),$t=n.styled_default("div")({name:"CloseIconWrap",class:"c17srj38",propsAsIs:!1}),kt=()=>A.B1,Lt=n.styled_default(kt())({name:"CloseIcon",class:"clqia8k",propsAsIs:!0}),St=()=>A.B1,Tt=n.styled_default(St())({name:"DashboardIcon",class:"df5w958",propsAsIs:!0}),Nt="h12x6aiv",Et=h.forwardRef(({sdk:s,className:t},i)=>{const a=()=>{s.closeFeature()};return e.jsxs(Je,{className:n.cx_default(t,Nt),children:[e.jsxs(At,{children:[e.jsxs(wt,{children:[e.jsx(Tt,{name:"dashboard"}),"Dashboard"]}),e.jsx($t,{"data-a":"intr",onClick:a,children:e.jsx(Lt,{name:"icon-cross"})})]}),e.jsx("div",{ref:i})]})}),Rt=h.forwardRef(({sdk:s,className:t},i)=>{const a=n.useStore(s.sdkStore.organizationSettings),r=n.useStore(s.sdkStore.streamSettings),l=n.useStore(s.getActiveFeature()),d=h.useMemo(()=>{const c=(r==null?void 0:r.data)||(a==null?void 0:a.data);return c!=null&&c.overlays?c.overlays:[]},[a,r]),o=h.useMemo(()=>[...d.filter(({enableSdkButton:c,type:p})=>p===x.SdkOverlayType.GAMES||c).map(c=>({id:c.type,onClick:()=>s.openFeature(c.type),disabled:!(c.type in ht),label:c.name,icon:e.jsx("img",{src:c.icon,alt:""}),position:c.position*10}))].sort((c,p)=>c.position-p.position),[d,s]);return e.jsxs(Je,{className:t,children:[o.length!==0&&e.jsx(Le,{children:[e.jsx(U,{id:"Channels",onClick:()=>s.closeFeature(),label:"Channels",active:l===0},"Channels"),...o.map(c=>c.id===x.SdkOverlayType.GAMES?e.jsx(U,{...c,active:c.id===l,label:"StreamLayer +",id:"featuredGroups",icon:e.jsx(bt,{name:"icon-btn-feature-groups","data-selected":c.id===l})},c.id):e.jsx(U,{...c,icon:void 0,active:c.id===l},c.id))]}),!o.length&&e.jsx(Le,{children:[e.jsx(U,{id:"empty",label:"No Features...",active:!1,disabled:!0},"empty")]}),e.jsx("div",{ref:i})]})}),Vt=n.styled_default("div")({name:"InsightContainer",class:"i1pqqgpo",propsAsIs:!1}),Ht=n.styled_default("img")({name:"Image",class:"igj7luu",propsAsIs:!1}),zt=n.styled_default("div")({name:"ImageContainer",class:"i1qne9g6",propsAsIs:!1}),Mt=n.styled_default("div")({name:"InsightContent",class:"itpr98r",propsAsIs:!1}),Ot=n.styled_default("h3")({name:"Title",class:"t17iaqp8",propsAsIs:!1}),qt=n.styled_default("div")({name:"Description",class:"d16t3y7s",propsAsIs:!1}),Ft=n.styled_default("button")({name:"ActionBtn",class:"a12495er",propsAsIs:!1}),Bt=({video:s,image:t,imageMode:i,heading:a,body:r,action:l,controlVideo:d})=>e.jsxs(Vt,{children:[(s==null?void 0:s.url)&&e.jsx(Ue.Et,{source:s.url,poster:s.thumbnailUrl,controlVideo:d}),t&&!(s!=null&&s.url)&&e.jsx(zt,{"data-rounded":i===x.QuestionImages.ROUNDED,children:e.jsx(Ht,{src:t,alt:a})}),e.jsxs(Mt,{children:[e.jsx(Ot,{children:a}),e.jsx(qt,{children:r}),l&&e.jsx(Ft,{onClick:l,children:"View Insight"})]})]}),Dt=n.styled_default("div")({name:"Container",class:"c1eptrjd",propsAsIs:!1}),Pt=n.styled_default("div")({name:"CloseIconWrap",class:"crylm65",propsAsIs:!1}),Ut=()=>A.B1,Wt=n.styled_default(Ut())({name:"CloseIcon",class:"c9mrcz7",propsAsIs:!0}),Qt=n.styled_default("div")({name:"Header",class:"hw3lzv4",propsAsIs:!1}),Zt=()=>A.B1,Gt=n.styled_default(Zt())({name:"TypeIcon",class:"t1rrb3kf",propsAsIs:!0}),Kt=n.styled_default("span")({name:"TypeName",class:"t1ydnjov",propsAsIs:!1}),Yt=n.styled_default("div")({name:"Question",class:"qlf90cl",propsAsIs:!1}),Jt=n.styled_default("button")({name:"AnswerButton",class:"a1e0nhcl",propsAsIs:!1}),Xt=n.styled_default("div")({name:"Container",class:"c1t4f0x4",propsAsIs:!1}),e0=n.styled_default("button")({name:"ActionBtn",class:"a16w1nl6",propsAsIs:!1}),s0=n.styled_default("div")({name:"QuoteWrap",class:"q14u54rf",propsAsIs:!1}),t0=n.styled_default("blockquote")({name:"Quote",class:"q1hxm6zo",propsAsIs:!1}),n0=({action:s,...t})=>e.jsxs(Xt,{children:[t.title&&e.jsx(s0,{children:e.jsx(t0,{children:t.title})}),e.jsx(E.b,{...t}),s&&e.jsx(e0,{onClick:s,children:"View Insight"})]}),Se=({close:s,action:t,controlVideo:i,data:{questionType:a,question:r,insight:l,tweet:d}})=>{const o=E.e[a];return o?e.jsxs(Dt,{onClick:t,style:a===x.QuestionType.TWEET?{paddingTop:"12px"}:{},children:[e.jsx(Pt,{"data-a":"intr",onClick:c=>{c.stopPropagation(),s&&s(c)},children:e.jsx(Wt,{name:"icon-cross"})}),a!==x.QuestionType.TWEET&&e.jsxs(Qt,{children:[e.jsx(Gt,{"data-type-trivia":a===x.QuestionType.TRIVIA,"data-type-poll":a===x.QuestionType.POLL,name:o.iconName}),e.jsx(Kt,{children:o.label})]}),a===x.QuestionType.FACTOID&&l&&e.jsx(Bt,{...l,action:t,controlVideo:i}),a===x.QuestionType.TWEET&&d&&e.jsx(n0,{...d,action:t,controlVideo:i}),a!==x.QuestionType.FACTOID&&a!==x.QuestionType.TWEET&&e.jsxs(e.Fragment,{children:[e.jsx(Yt,{children:r==null?void 0:r.title}),e.jsx(Jt,{children:"Answer"})]})]}):null},M=n.styled_default("div")({name:"BGWrap",class:"b1dqe0sz",propsAsIs:!1}),k=n.styled_default("div")({name:"BGLineBase",class:"b1v6w7ni",propsAsIs:!1}),i0=()=>k,a0=n.styled_default(i0())({name:"BGOneLineOne",class:"b2nqb1p",propsAsIs:!0}),r0=()=>k,l0=n.styled_default(r0())({name:"BGOneLineTwo",class:"b1xxgmbk",propsAsIs:!0}),o0=()=>k,d0=n.styled_default(o0())({name:"BGOneLineThree",class:"b63lwcb",propsAsIs:!0}),c0=()=>k,Te=n.styled_default(c0())({name:"BGTwoLineOne",class:"b2iah4",propsAsIs:!0}),u0=()=>k,Ne=n.styled_default(u0())({name:"BGTwoLineTwo",class:"b1xezvf6",propsAsIs:!0}),p0=()=>k,Ee=n.styled_default(p0())({name:"BGTwoLineThree",class:"b1jz1hg0",propsAsIs:!0}),h0=()=>k,Re=n.styled_default(h0())({name:"BGThreeLineOne",class:"b18ho1tk",propsAsIs:!0}),m0=()=>k,Ve=n.styled_default(m0())({name:"BGThreeLineTwo",class:"b14uvjfm",propsAsIs:!0}),f0=()=>k,He=n.styled_default(f0())({name:"BGThreeLineThree",class:"b11c3ns7",propsAsIs:!0}),v0=()=>k,ze=n.styled_default(v0())({name:"BGThreeLineFour",class:"b1bqhhet",propsAsIs:!0}),C0=()=>k,g0=n.styled_default(C0())({name:"BGFourLineOne",class:"b1xyzi7o",propsAsIs:!0}),x0=()=>k,y0=n.styled_default(x0())({name:"BGFourLineTwo",class:"byo0rup",propsAsIs:!0}),_0=()=>k,I0=n.styled_default(_0())({name:"BGFourLineThree",class:"b1oyiqgv",propsAsIs:!0}),j0=()=>k,b0=n.styled_default(j0())({name:"BGFourLineFour",class:"bx3ddqw",propsAsIs:!0}),A0=({step:s,correct:t})=>e.jsxs(e.Fragment,{children:[e.jsxs(M,{"data-active":s===1,"data-first-screen":"true",children:[e.jsx(a0,{}),e.jsx(l0,{}),e.jsx(d0,{})]}),e.jsxs(M,{"data-active":s===2,children:[e.jsx(Te,{}),e.jsx(Ne,{}),e.jsx(Ee,{})]}),e.jsxs(M,{"data-active":s===3,children:[e.jsx(Te,{}),e.jsx(Ne,{}),e.jsx(Ee,{})]}),t?e.jsxs(e.Fragment,{children:[e.jsxs(M,{"data-active":s===4,"data-correct":"true",children:[e.jsx(Re,{}),e.jsx(Ve,{}),e.jsx(He,{}),e.jsx(ze,{})]}),e.jsxs(M,{"data-active":s===5,"data-correct":"true",children:[e.jsx(Re,{}),e.jsx(Ve,{}),e.jsx(He,{}),e.jsx(ze,{})]})]}):e.jsxs(M,{"data-active":s===4,"data-correct":"false",children:[e.jsx(g0,{}),e.jsx(y0,{}),e.jsx(I0,{}),e.jsx(b0,{})]})]}),w0=118,$0=()=>$.f,k0=n.styled_default($0())({name:"Container",class:"c10131zw",propsAsIs:!0}),L0=n.styled_default("div")({name:"InnerContainer",class:"ir6k2eo",propsAsIs:!1}),V=n.styled_default("div")({name:"Content",class:"c1hwoq9l",propsAsIs:!1}),B=n.styled_default("div")({name:"Title",class:"t4ujo4g",propsAsIs:!1}),S0=()=>B,T0=n.styled_default(S0())({name:"PointsTitle",class:"p1pjil1h",propsAsIs:!0}),W=n.styled_default("div")({name:"Subtitle",class:"s1iorwr9",propsAsIs:!1}),Me=n.styled_default("div")({name:"SubtitleFG",class:"s51sv9d",propsAsIs:!1}),Q=n.styled_default("div")({name:"AnswerText",class:"a1lbk2ye",propsAsIs:!1}),N0=()=>A.B1,Xe=n.styled_default(N0())({name:"FeedbackIcon",class:"frcvk3t",propsAsIs:!0}),E0=()=>Xe,Oe=n.styled_default(E0())({name:"FeedbackIconCorrect",class:"f33p82r",propsAsIs:!0}),R0=()=>Xe,V0=n.styled_default(R0())({name:"FeedbackIconIncorrect",class:"f12r9net",propsAsIs:!0}),qe=n.styled_default("div")({name:"CloseIconWrap",class:"c1fw6699",propsAsIs:!1}),H0=()=>A.B1,Fe=n.styled_default(H0())({name:"CloseIcon",class:"c115o126",propsAsIs:!0}),z0="data:image/svg+xml,%3csvg%20width='154'%20height='37'%20viewBox='0%200%20154%2037'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M70.9776%2030.8796L74.668%2018.1381C75.0696%2016.7473%2076.1186%2015.6318%2077.4936%2015.1371L77.5928%2014.7217H72.466L63.7623%2024.9662L60.431%2014.7217H55.7389L55.6255%2015.1371C56.4288%2015.5291%2056.8683%2016.7052%2056.8683%2017.662V17.7227C56.8683%2023.1787%2052.781%2032.5598%2047.0352%2032.5598C44.8002%2032.5598%2043.6425%2031.0009%2043.6425%2029.7035C43.6425%2028.1306%2044.975%2027.0105%2046.3831%2027.0105C47.744%2027.0105%2047.9519%2027.5099%2048.741%2027.5099C49.2182%2027.5099%2049.6766%2027.2672%2049.9081%2026.8518C50.2672%2026.1984%2049.9931%2025.4049%2049.3363%2025.0922L48.9772%2024.9242C45.6271%2023.3327%2041.7383%2025.7457%2041.7383%2029.4188V29.4701C41.7383%2032.1444%2043.8646%2034.38%2046.5674%2034.4733C53.5417%2034.716%2058.2055%2025.4236%2058.9473%2018.6188L59.486%2020.4577L62.2313%2028.5927H63.2709L71.8518%2018.4741L68.2512%2030.8936C67.8401%2032.3171%2066.6966%2033.4232%2065.2412%2033.7966L65.142%2034.212H72.0408L72.1542%2033.7966C71.1383%2033.2039%2070.6516%2032.0044%2070.9776%2030.8796Z'%20fill='white'/%3e%3cpath%20d='M88.2952%2021.6521H88.2385C85.016%2021.6568%2081.5571%2021.9648%2079.7143%2027.1361C78.1692%2031.4813%2077.7487%2033.2828%2076.539%2033.2828C75.7641%2033.2828%2075.9531%2031.794%2074.7954%2031.794C74.2709%2031.794%2073.7275%2032.2094%2073.6897%2032.8068C73.6236%2033.8429%2075.0317%2034.4683%2076.0949%2034.4683C79.3316%2034.4683%2080.5696%2032.1347%2080.9759%2031.0472C81.0279%2030.9072%2081.3162%2030.1371%2081.6517%2029.2317H85.0538L84.4773%2031.3273C84.1749%2032.4334%2083.5464%2033.3388%2082.488%2033.8009L82.3982%2034.2163H87.9597L88.0637%2033.8009C87.3124%2033.1848%2086.9816%2032.2%2087.2273%2031.2853L89.3206%2023.4257C89.4812%2022.8236%2089.9018%2022.3242%2090.4783%2022.0628L90.568%2021.6475H88.7536H88.2952V21.6521ZM85.3231%2028.2189H82.0202C82.3935%2027.2108%2082.7526%2026.2493%2082.8755%2025.9366C83.7118%2023.757%2085.2995%2022.8749%2086.8399%2022.7536L86.8257%2022.7676L85.3231%2028.2189Z'%20fill='white'/%3e%3cpath%20d='M116.358%2022.5486C116.538%2022.2545%20116.708%2021.8112%20116.708%2021.5591C116.732%2021.0877%20116.297%2020.7237%20115.829%2020.8217C115.456%2020.9011%20115.187%2021.2324%20115.191%2021.6058C115.196%2021.9978%20115.12%2022.4226%20114.95%2022.6279C114.558%2023.104%20113.934%2023.062%20111.062%2022.2452V22.2405C110.797%2022.1659%20110.509%2022.0819%20110.206%2021.9978C110.187%2021.9932%20110.173%2021.9885%20110.159%2021.9838C108.723%2021.6011%20106.941%2021.2464%20105.774%2021.8205C105.765%2021.8252%20105.755%2021.8298%20105.746%2021.8345C104.602%2022.3992%20103.808%2023.4727%20103.567%2024.7142C103.53%2024.8962%20103.506%2025.0455%20103.501%2025.0969C103.468%2025.7456%20104.068%2026.2544%20104.711%2026.1143C105.235%2026.0023%20105.604%2025.5403%20105.59%2025.0129C105.58%2024.4808%20105.472%2023.7667%20105.765%2023.286C106.237%2022.6279%20106.729%2022.5812%20108.935%2023.3047L106.544%2031.323C106.214%2032.4291%20105.406%2033.3345%20104.338%2033.7966L104.238%2034.212H109.961L110.074%2033.7966C109.337%2033.1852%20109.03%2032.1957%20109.299%2031.2809L111.392%2024.0561C112.309%2024.2428%20113.24%2024.2941%20114.147%2024.0374L114.473%2023.9441C115.196%2023.7527%20115.943%2023.2347%20116.358%2022.5486Z'%20fill='white'/%3e%3cpath%20d='M118.649%2021.6523L118.536%2022.0677C119.245%2022.5531%20119.561%2023.4259%20119.335%2024.2427L117.208%2031.3228C116.877%2032.429%20116.069%2033.3344%20115.002%2033.7964L114.902%2034.2118H117.931H118.21H125.18L126.101%2030.8934H125.666L125.51%2031.2108C124.934%2032.3963%20123.72%2033.1524%20122.382%2033.1524H119.429L121.003%2027.5937H122.259C123.105%2027.5937%20123.743%2028.3545%20123.582%2029.1759H124.012L125.043%2025.4188H124.613C124.362%2026.1142%20123.696%2026.5763%20122.949%2026.5809H121.291L122.382%2022.7258L125.515%2022.7211C126.536%2022.7211%20127.301%2023.6452%20127.098%2024.6347H127.528L128.35%2021.6523H118.649Z'%20fill='white'/%3e%3cpath%20d='M138.251%2021.6582H131.333L131.22%2022.0736C131.881%2022.5263%20132.207%2023.3197%20132.056%2024.0898L129.892%2031.324C129.561%2032.4301%20128.753%2033.3356%20127.685%2033.7976L127.586%2034.213H133.303L133.417%2033.7976C132.68%2033.1862%20132.373%2032.2014%20132.637%2031.282L133.686%2027.5949H134.126C134.787%2027.5949%20135.34%2028.085%20135.416%2028.7337C135.439%2028.9437%20135.77%2031.506%20136.035%2032.3881C136.379%2033.5409%20136.833%2034.213%20137.868%2034.213H140.453L140.552%2033.7976L140.183%2033.5829C139.451%2033.1536%20138.922%2032.4908%20138.685%2031.6087C138.463%2030.7779%20138.043%2029.2284%20137.84%2028.4117C137.736%2027.9916%20137.202%2027.5996%20136.654%2027.5996H137.523C139.087%2027.5996%20140.457%2026.5681%20140.878%2025.0839C141.365%2023.3617%20140.056%2021.6582%20138.251%2021.6582ZM138.369%2024.6872C138.029%2025.812%20136.98%2026.5868%20135.789%2026.5868H133.974L135.071%2022.7317H136.89C137.925%2022.727%20138.662%2023.7118%20138.369%2024.6872Z'%20fill='white'/%3e%3cpath%20d='M100.265%2022.2961C100.081%2022.2961%2099.6794%2022.1701%2099.0651%2021.9181C98.4508%2021.6661%2097.8318%2021.54%2097.2034%2021.54C95.904%2021.54%2094.8219%2021.9554%2093.9336%2022.8422C93.1964%2023.5796%2092.8704%2024.401%2092.8704%2025.1105C92.8704%2025.8665%2093.3193%2026.7533%2094.2124%2027.4721C95.0582%2028.1488%2095.937%2028.8022%2096.8206%2029.465C97.7468%2030.1977%2098.2098%2030.8745%2098.2098%2031.4252C98.2098%2032.634%2097.416%2033.2828%2095.7669%2033.2828C94.0942%2033.2828%2092.9366%2032.074%2092.568%2029.8057H92.1144L90.8008%2034.2162H91.226C91.7694%2033.8382%2092.1569%2033.6001%2092.946%2033.6001C93.6973%2033.6001%2094.5006%2034.4729%2096.2158%2034.4729C97.5814%2034.4729%2098.6682%2034.1929%2099.5943%2033.2781C100.383%2032.4753%20100.776%2031.3552%20100.776%2030.4404C100.776%2029.591%20100.237%2028.6062%2099.2966%2027.8921C98.4886%2027.2807%2097.6286%2026.7347%2096.7923%2026.1419C95.8898%2025.4792%2095.4362%2024.9144%2095.4362%2024.2937C95.4362%2023.9483%2095.611%2023.6076%2095.9559%2023.2622C96.3954%2022.8282%2096.986%2022.7302%2097.7751%2022.7302C99.3581%2022.7302%20100.464%2023.5983%20100.558%2025.4325H100.974L102.08%2021.5447H101.664C101.215%2022.0441%20100.752%2022.2961%20100.265%2022.2961Z'%20fill='white'/%3e%3cpath%20d='M149.201%2022.7304C150.784%2022.7304%20151.89%2023.6032%20151.984%2025.4327H152.4L153.501%2021.5449H153.085C152.646%2022.049%20152.182%2022.301%20151.696%2022.301C151.512%2022.301%20151.11%2022.175%20150.496%2021.923C149.881%2021.6709%20149.262%2021.5449%20148.634%2021.5449C147.334%2021.5449%20146.252%2021.9603%20145.364%2022.8471C144.627%2023.5845%20144.296%2024.4059%20144.296%2025.1153C144.296%2025.8714%20144.745%2026.7582%20145.638%2027.477C146.484%2028.1537%20147.363%2028.8071%20148.246%2029.4699C149.173%2030.2026%20149.636%2030.8794%20149.636%2031.4301C149.636%2032.6389%20148.842%2033.2876%20147.193%2033.2876C145.52%2033.2876%20144.362%2032.0788%20143.994%2029.8106H143.54L142.227%2034.2211H142.642C143.186%2033.843%20143.573%2033.605%20144.358%2033.605C145.109%2033.605%20145.912%2034.4778%20147.627%2034.4778C148.993%2034.4778%20150.075%2034.1978%20151.006%2033.283C151.795%2032.4802%20152.187%2031.3601%20152.187%2030.4453C152.187%2029.6005%20151.649%2028.6111%20150.708%2027.897C149.9%2027.2856%20149.04%2026.7395%20148.204%2026.1468C147.301%2025.4841%20146.848%2024.9193%20146.848%2024.2986C146.848%2023.9532%20147.023%2023.6125%20147.368%2023.2671C147.826%2022.8237%20148.412%2022.7304%20149.201%2022.7304Z'%20fill='white'/%3e%3cpath%20d='M26.5433%202.60035C26.0377%202.44633%2025.5321%202.72169%2025.0265%203.00173C24.8469%203.09974%2024.7194%203.27243%2024.6768%203.46845L23.883%207.13222C23.8547%207.26757%2023.9775%207.38891%2024.1145%207.36091C24.9509%207.17422%2025.7447%206.4508%2026.5811%206.70283C27.5167%206.98753%2028.4522%205.81606%2029.3878%205.83006V1.60156C28.4475%201.60623%2027.4789%202.88505%2026.5433%202.60035Z'%20fill='white'/%3e%3cpath%20d='M38.4856%2013.8398C38.2871%2013.7044%2038.1643%2013.4851%2038.1643%2013.2471V12.5796C38.1643%2011.9822%2037.6729%2011.4922%2037.0633%2011.4922H36.6239C36.0994%2011.4922%2035.6174%2011.7536%2035.3339%2012.1876L33.9164%2014.3485C33.7746%2014.5632%2033.5383%2014.6892%2033.2832%2014.6892H32.3287C31.8562%2014.6892%2031.4215%2014.9459%2031.1947%2015.3566C30.9631%2015.7814%2030.552%2016.0754%2030.0843%2016.1734V1.1403C30.0843%200.94894%2029.9283%200.794922%2029.7346%200.794922C29.5409%200.794922%2029.3849%200.94894%2029.3849%201.1403V1.60702V5.83552V16.1827C28.9171%2016.0847%2028.506%2015.7907%2028.2745%2015.3613C28.0524%2014.9506%2027.6177%2014.6939%2027.1405%2014.6939H26.4979C25.9875%2014.6939%2025.5292%2014.9879%2025.3213%2015.45L24.7873%2016.6308C24.7023%2016.8175%2024.5133%2016.9388%2024.3054%2016.9388C24.0975%2016.9388%2023.9085%2016.8175%2023.8234%2016.6308L23.2895%2015.45C23.0816%2014.9926%2022.6232%2014.6939%2022.1129%2014.6939H4.00135C3.85487%2014.6939%203.73674%2014.8106%203.73674%2014.9553C3.73674%2015.2633%203.48158%2015.5107%203.17444%2015.5107H2.39007C2.24359%2015.5107%202.12546%2015.6273%202.12546%2015.772V16.6728C2.12546%2017.5176%201.96008%2018.339%201.62931%2019.1184L1.15207%2020.2526C0.707907%2021.3027%200.5%2022.3901%200.5%2023.4589V26.0726C0.5%2026.7773%200.603954%2027.4914%200.811861%2028.1868C1.39306%2030.1377%202.7161%2031.7339%204.53529%2032.6767L7.43182%2034.1842C7.46962%2034.2029%207.51214%2034.2122%207.55467%2034.2122L9.69517%2034.2309C10.196%2034.2355%2010.6875%2034.3616%2011.1269%2034.6043L12.2751%2035.239C12.3129%2035.2623%2012.3602%2035.2717%2012.4074%2035.2717H13.9431C14.4818%2035.2717%2015.0157%2035.4163%2015.474%2035.6917C15.474%2035.6917%2016.2253%2036.1444%2016.4805%2036.2891C16.8869%2036.5225%2017.3783%2036.7465%2018.2335%2036.7932C18.4273%2036.8025%2018.621%2036.7325%2018.7675%2036.5972C18.9092%2036.4618%2018.9943%2036.2704%2018.9943%2036.0791V35.0616C18.9943%2034.3242%2019.4337%2033.6521%2020.1189%2033.3581L22.4673%2032.3406C22.7886%2032.2006%2023.1477%2032.1773%2023.4832%2032.28L24.3621%2032.5367C24.7354%2032.644%2025.1323%2032.6487%2025.5056%2032.5367L27.5846%2031.9253C27.8587%2031.8459%2028.1517%2031.8459%2028.4304%2031.9299L29.2763%2032.1633C29.6684%2032.2706%2029.9472%2032.6347%2029.9472%2033.0361V35.071C29.9472%2036.0184%2030.7269%2036.7932%2031.6861%2036.7932C32.4043%2036.7932%2033.0328%2036.3405%2033.2501%2035.6637C33.6423%2034.4456%2033.8408%2033.1761%2033.8408%2031.8973V31.0292C33.8408%2030.4131%2034.1006%2029.8204%2034.5543%2029.3956L35.419%2028.5882C36.0002%2028.0421%2036.3356%2027.2674%2036.3356%2026.474V21.6481C36.3356%2020.9013%2036.5625%2020.1779%2036.9972%2019.5618C37.0302%2019.5198%2037.0444%2019.4638%2037.0444%2019.4125V18.2737C37.0444%2017.5316%2037.2712%2016.8128%2037.6965%2016.2014L38.5517%2014.9739C38.5848%2014.9319%2038.599%2014.8806%2038.599%2014.8246V14.0545C38.6037%2013.9098%2038.5139%2013.8585%2038.4856%2013.8398ZM30.0843%2025.2838C30.6654%2025.3725%2031.1002%2025.6665%2031.1002%2026.0212C31.1002%2026.3759%2030.6702%2026.67%2030.0843%2026.7587V25.2838ZM5.22516%2032.4433L4.78572%2032.2146C3.59026%2031.5939%202.63577%2030.6698%201.9837%2029.545V28.1355C2.73028%2029.2043%203.74619%2030.1144%204.98891%2030.7631L5.22516%2030.8845V32.4433ZM7.43654%2033.5961L6.2647%2032.9894V31.4305L7.43182%2032.0373H7.43654V33.5961ZM12.3129%2034.6556L11.3868%2034.1422C10.8812%2033.8622%2010.3142%2033.7128%209.73297%2033.7035V32.0793C10.2197%2032.0886%2010.7016%2032.2146%2011.1269%2032.448L12.2751%2033.0827C12.2846%2033.0874%2012.2987%2033.0874%2012.3129%2033.0921V34.6556ZM18.4603%2035.0616V35.8551V36.0791C18.4603%2036.1304%2018.4367%2036.1818%2018.3989%2036.2191C18.3611%2036.2564%2018.3139%2036.2705%2018.2619%2036.2705C17.52%2036.2331%2017.0948%2036.0418%2016.7498%2035.8411C16.4994%2035.6964%2015.7528%2035.2483%2015.7481%2035.2483C15.2803%2034.9683%2014.7511%2034.8143%2014.2077%2034.7723V33.1387C14.6519%2033.1808%2015.0866%2033.3114%2015.474%2033.5401L16.1214%2033.9228C16.8302%2034.3429%2017.6382%2034.5809%2018.4603%2034.6276V35.0616ZM24.8582%2032.0886C24.7448%2032.084%2024.6267%2032.0653%2024.5133%2032.0326L23.6344%2031.7713C23.4454%2031.7152%2023.2517%2031.6966%2023.0579%2031.6966V30.0677C23.1997%2030.0677%2023.3414%2030.0817%2023.4832%2030.1237L24.3621%2030.3804C24.5227%2030.4271%2024.6928%2030.4504%2024.8582%2030.4598V32.0886ZM30.363%2032.4807C30.1929%2032.0886%2029.8574%2031.7759%2029.4275%2031.6592L28.5864%2031.4259C28.3879%2031.3652%2028.18%2031.3419%2027.9721%2031.3419V29.7177C28.1328%2029.713%2028.2934%2029.7317%2028.4493%2029.783L29.1392%2029.9977C29.8716%2030.2264%2030.363%2030.8891%2030.363%2031.6452V32.4807ZM32.787%2035.365C32.7729%2035.4117%2032.7634%2035.4584%2032.7492%2035.505C32.6028%2035.9624%2032.1775%2036.2658%2031.6955%2036.2658C31.653%2036.2658%2031.6105%2036.2564%2031.568%2036.2518V34.6323C31.601%2034.6369%2031.6294%2034.6416%2031.6625%2034.6416C32.135%2034.6416%2032.565%2034.3802%2032.7918%2033.9835V35.365H32.787ZM37.3232%2015.0486C36.794%2015.8047%2036.5152%2016.6915%2036.5152%2017.6109V18.4137L36.1041%2019.0017C35.5702%2019.7625%2035.2867%2020.6539%2035.2867%2021.578V25.6245C35.2867%2026.2779%2035.0126%2026.9173%2034.5306%2027.3654L33.6659%2028.1775C33.0847%2028.7236%2032.7634%2029.489%2032.787%2030.2824L32.7918%2030.4644C32.8248%2031.5146%2032.6878%2032.56%2032.3901%2033.5681C32.2956%2033.8902%2031.9932%2034.1142%2031.6577%2034.1142C31.2372%2034.1142%2030.8923%2033.7782%2030.8923%2033.3581V31.6452C30.8923%2030.6558%2030.2496%2029.7923%2029.2952%2029.4983L28.6053%2029.2836C28.2225%2029.1669%2027.8209%2029.1623%2027.4334%2029.2743L25.3544%2029.881C25.0803%2029.9604%2024.7873%2029.9604%2024.5133%2029.881L23.6344%2029.6243C23.1808%2029.489%2022.6894%2029.5217%2022.2547%2029.7083L20.4071%2030.5111C19.2258%2031.0245%2018.4651%2032.1773%2018.4651%2033.4515V34.1095C17.7374%2034.0675%2017.0286%2033.8528%2016.4002%2033.4795L15.7528%2033.0967C15.2047%2032.7747%2014.581%2032.602%2013.9431%2032.602H12.4736L11.3868%2031.9999C10.8717%2031.7152%2010.2905%2031.5659%209.69989%2031.5612L7.62082%2031.5472L5.23461%2030.3057C1.61514%2028.4249%200.0700101%2024.1917%201.64349%2020.4579L2.12073%2019.3238C2.47512%2018.4837%202.6594%2017.5922%202.6594%2016.6775V16.0427H3.17444C3.68476%2016.0427%204.11948%2015.6927%204.2376%2015.2213H22.1176C22.4153%2015.2213%2022.6894%2015.394%2022.8075%2015.6647L23.3414%2016.8455C23.5115%2017.2235%2023.8896%2017.4662%2024.3101%2017.4662C24.7259%2017.4662%2025.1087%2017.2235%2025.2788%2016.8455L25.8127%2015.66C25.9356%2015.3893%2026.2049%2015.2166%2026.5026%2015.2166H27.1452C27.424%2015.2166%2027.6791%2015.366%2027.8114%2015.6087C28.1375%2016.2061%2028.7234%2016.6075%2029.3897%2016.7148V24.145C28.317%2024.2617%2027.4949%2024.8918%2027.4949%2025.6572C27.4949%2026.5066%2028.4966%2027.1927%2029.7346%2027.1927C30.9726%2027.1927%2031.9743%2026.5066%2031.9743%2025.6572C31.9743%2024.8918%2031.1521%2024.257%2030.0795%2024.145V16.7101C30.7458%2016.6028%2031.3317%2016.2014%2031.6577%2015.604C31.79%2015.3613%2032.0452%2015.212%2032.324%2015.212H33.2785C33.7179%2015.212%2034.1195%2014.9926%2034.3605%2014.6286L35.7781%2012.4676C35.9624%2012.1829%2036.2789%2012.0149%2036.6239%2012.0149H37.0633C37.3752%2012.0149%2037.6303%2012.2669%2037.6303%2012.575V13.2424C37.6303%2013.5644%2037.7579%2013.8725%2037.98%2014.1012L37.3232%2015.0486ZM29.3849%2025.2838V26.7587C28.8037%2026.67%2028.3737%2026.3759%2028.3737%2026.0212C28.3737%2025.6665%2028.8037%2025.3678%2029.3849%2025.2838Z'%20fill='white'/%3e%3c/svg%3e",M0="data:image/svg+xml,%3csvg%20width='159'%20height='28'%20viewBox='0%200%20159%2028'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_6919_71839)'%3e%3cpath%20d='M4.13243%2025.9198C5.34921%2026.9052%207.05161%2027.0267%208.39597%2026.224L22.9838%2017.5138C25.4013%2016.0703%2025.4117%2012.5721%2023.0028%2011.1144L17.4686%207.76522C15.4767%206.55981%2012.8918%207.10053%2011.5501%209.00325L3.27399%2020.7399C2.14132%2022.3462%202.44805%2024.5556%203.97544%2025.7926L4.13243%2025.9198Z'%20stroke='white'%20style='stroke:white;stroke-opacity:1;'%20stroke-width='2.33333'/%3e%3cpath%20d='M4.11673%202.57147C5.33939%201.58127%207.0516%201.46387%208.39797%202.27791L22.9843%2011.0971C25.3835%2012.5477%2025.3874%2016.0265%2022.9914%2017.4824L17.5405%2020.7946C15.5485%2022.005%2012.9594%2021.4661%2011.6157%2019.5615L3.27518%207.7386C2.142%206.1323%202.44856%203.92248%203.97619%202.68529L4.11673%202.57147Z'%20stroke='white'%20style='stroke:white;stroke-opacity:1;'%20stroke-width='2.33333'/%3e%3cpath%20d='M49.8088%2020.0063C47.924%2020.0063%2046.7521%2018.7437%2046.7521%2016.6748V13.1359H50.1977V10.9296H46.7521V7.34668L44.2736%209.18483V10.9271H42.8892V13.1333H44.2736V16.6515C44.2736%2020.2137%2046.3632%2022.4174%2049.8321%2022.4174H50.361V20.0063H49.8088Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M30.4704%2019.5631L32.6818%2017.8339C33.6722%2019.4231%2035.01%2020.2761%2036.7159%2020.2761C38.5826%2020.2761%2039.757%2019.0783%2039.757%2017.5798C39.757%2015.8505%2037.9137%2015.2983%2035.977%2014.6761C33.6956%2013.9398%2031.23%2013.0168%2031.23%209.92907C31.23%207.37018%2033.5115%205.34277%2036.6226%205.34277C39.1815%205.34277%2040.7707%206.33314%2042.0618%207.83166L40.0111%209.35351C39.2515%208.17907%2038.1211%207.55685%2036.6226%207.55685C34.9167%207.55685%2033.8096%208.57055%2033.8096%209.88499C33.8096%2011.4976%2035.5856%2012.0291%2037.5196%2012.6746C39.8244%2013.4576%2042.3367%2014.4506%2042.3367%2017.585C42.3367%2020.1672%2040.2159%2022.6328%2036.7367%2022.6328C33.8563%2022.6328%2031.8963%2021.4117%2030.4678%2019.5683L30.4704%2019.5631Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M58.9189%2016.7007C58.9189%2013.3225%2061.5141%2010.6807%2064.8923%2010.6807C68.2704%2010.6807%2070.7982%2013.1384%2070.7982%2016.5399V17.5044H61.286C61.6075%2019.2725%2062.9867%2020.4444%2064.9856%2020.4444C66.5489%2020.4444%2067.7441%2019.6173%2068.3404%2018.3755L70.3627%2019.5007C69.3515%2021.3855%2067.5367%2022.6247%2064.9856%2022.6247C61.356%2022.6247%2058.9189%2020.0296%2058.9189%2016.6981V16.7007ZM61.4001%2015.4147H68.2938C67.9256%2013.7607%2066.663%2012.8403%2064.8923%2012.8403C63.1215%2012.8403%2061.8589%2013.8981%2061.4001%2015.4147Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M51.8955%2016.6752C51.8955%2013.113%2053.9851%2010.9326%2057.454%2010.9326H58.5559V13.323H57.4307C55.5459%2013.323%2054.33%2014.6322%2054.3533%2016.7011V22.423H51.8955V16.6804V16.6752Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M72.0138%2016.6774C72.0138%2013.3226%2074.6557%2010.7041%2077.9638%2010.7041C81.272%2010.7041%2083.8672%2013.3226%2083.8672%2016.6774V22.42H81.456V20.9267C80.6523%2022.0052%2079.4105%2022.6274%2077.8938%2022.6274C74.609%2022.6274%2072.0112%2020.0556%2072.0112%2016.6774H72.0138ZM81.5027%2016.6774C81.5027%2014.6319%2079.9394%2013.0011%2077.9638%2013.0011C75.9883%2013.0011%2074.4249%2014.6319%2074.4249%2016.6774C74.4249%2018.723%2075.9649%2020.3537%2077.9638%2020.3537C79.9627%2020.3537%2081.5027%2018.6997%2081.5027%2016.6774Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M85.4155%2015.978C85.4155%2012.9214%2087.5052%2010.6943%2090.6085%2010.6943C92.3766%2010.6943%2093.8026%2011.4073%2094.697%2012.6025C95.5474%2011.4073%2096.9266%2010.6943%2098.6948%2010.6943C101.819%2010.6943%20104.002%2012.8773%20104.002%2015.978V22.4103H101.544V16.0014C101.544%2014.2566%20100.372%2013.038%2098.6948%2013.038C97.0174%2013.038%2095.9155%2014.2799%2095.9389%2015.934V22.4129H93.4811V16.004C93.4811%2014.2592%2092.2859%2013.0406%2090.6085%2013.0406C88.9311%2013.0406%2087.8526%2014.2825%2087.8733%2015.9366V22.4154H85.4155V15.9832V15.978Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M105.578%205.6416H108.082V20.0227H114.859V22.4131H105.578V5.6416Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M138.483%2016.7007C138.483%2013.3225%20141.078%2010.6807%20144.456%2010.6807C147.834%2010.6807%20150.362%2013.1384%20150.362%2016.5399V17.5044H140.85C141.171%2019.2725%20142.551%2020.4444%20144.55%2020.4444C146.113%2020.4444%20147.308%2019.6173%20147.904%2018.3755L149.927%2019.5007C148.916%2021.3855%20147.101%2022.6247%20144.55%2022.6247C140.92%2022.6247%20138.483%2020.0296%20138.483%2016.6981V16.7007ZM140.964%2015.4147H147.858C147.49%2013.7607%20146.227%2012.8403%20144.456%2012.8403C142.685%2012.8403%20141.423%2013.8981%20140.964%2015.4147Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M115.269%2016.6774C115.269%2013.3226%20117.911%2010.7041%20121.219%2010.7041C124.527%2010.7041%20127.122%2013.3226%20127.122%2016.6774V22.42H124.711V20.9267C123.907%2022.0052%20122.665%2022.6274%20121.149%2022.6274C117.864%2022.6274%20115.266%2020.0556%20115.266%2016.6774H115.269ZM124.758%2016.6774C124.758%2014.6319%20123.194%2013.0011%20121.219%2013.0011C119.243%2013.0011%20117.68%2014.6319%20117.68%2016.6774C117.68%2018.723%20119.22%2020.3537%20121.219%2020.3537C123.218%2020.3537%20124.758%2018.6997%20124.758%2016.6774Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M131.67%2021.8547L126.915%2010.9658H129.557L132.912%2018.938L136.082%2010.9658H138.678L131.74%2027.7606H129.212L131.67%2021.8573V21.8547Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M151.897%2016.6674C151.897%2013.1052%20153.987%2010.9248%20157.455%2010.9248H158.557V13.3152H157.432C155.547%2013.3152%20154.331%2014.6244%20154.355%2016.6933V22.4152H151.897V16.6726V16.6674Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_6919_71839'%3e%3crect%20width='158.12'%20height='28'%20fill='white'%20style='fill:white;fill-opacity:1;'%20transform='translate(0.44043)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",O0=(s,t,i)=>s===t?"translateY(0px)":s>t?`translateY(${i}px)`:"translateY(-100%)",q0=({close:s,votedAnswer:t,mastersApp:i,correct:a,correctAnswerTitle:r,questionTitle:l,saveHeight:d,style:o,hiding:c})=>{const[p,f]=h.useState(1),m=h.useRef({});h.useEffect(()=>{const y=setInterval(()=>{f(C=>a&&C>4||!a&&C>3?C:++C)},3e3);return()=>clearInterval(y)},[a]),h.useEffect(()=>{var y,C;m.current[p]&&d(((C=(y=m.current[p])==null?void 0:y.getBoundingClientRect())==null?void 0:C.height)||w0)},[p,d]);const u=y=>C=>{m.current&&(m.current[y]=C)},v=y=>({transform:O0(y,p,o.height)}),g={...o};return i&&g.height&&typeof g.height=="number"&&(g.height+=32),e.jsx(k0,{style:o.height?g:{...o,paddingTop:0,paddingBottom:0},hiding:c,children:e.jsxs(L0,{style:{height:o.height,minHeight:o.height,backgroundColor:p>3?a?"var(--color-sdk-prediction-result-success-bg)":"var(--color-sdk-prediction-result-incorrect-bg)":"var(--color-primary-1)"},children:[e.jsx(A0,{step:p,correct:a}),i&&e.jsxs(V,{ref:u(1),style:v(1),children:[e.jsx("img",{alt:"sponsor-logo",src:z0}),e.jsx(Me,{children:"Featured Groups +"})]}),!i&&e.jsx(V,{ref:u(1),style:v(1),children:e.jsx("img",{alt:"sponsor-logo",src:M0})}),e.jsxs(V,{ref:u(2),style:v(2),children:[e.jsx(B,{children:"Prediction results are in!"}),i&&e.jsx(Me,{children:"Featured Groups +"})]}),e.jsxs(V,{ref:u(3),style:v(3),children:[e.jsx(B,{children:l}),e.jsx(W,{children:e.jsxs(Q,{children:[e.jsx("span",{children:"Your Pick:"})," ",t==null?void 0:t.title]})})]}),a?e.jsxs(e.Fragment,{children:[e.jsxs(V,{ref:u(4),style:{...v(4),color:"var(--color-sdk-prediction-result-success-text)"},children:[e.jsxs(B,{children:["Congratulations!",e.jsx("br",{}),"You answered correctly."]}),e.jsxs(W,{children:[e.jsx(Oe,{name:"selected"}),e.jsxs(Q,{children:[e.jsx("span",{children:"Your Pick:"})," ",t==null?void 0:t.title]})]})]}),e.jsxs(V,{ref:u(5),style:{...v(5),color:"var(--color-sdk-prediction-result-success-text)"},children:[e.jsx(T0,{children:p===5&&e.jsx(d2.d,{delay:.5,prefix:"+",suffix:" points",value:t==null?void 0:t.points})}),e.jsxs(W,{children:[e.jsx(Oe,{name:"selected"}),e.jsxs(Q,{children:[e.jsx("span",{children:"Your Pick:"})," ",t==null?void 0:t.title]})]}),e.jsx(qe,{"data-a":"intr",onClick:s,children:e.jsx(Fe,{name:"icon-cross"})})]})]}):e.jsxs(V,{ref:u(4),style:v(4),children:[e.jsxs(B,{style:{color:"var(--color-sdk-prediction-result-error-title)"},children:["Better luck next time!",e.jsx("br",{}),"Correct: ",r,"."]}),e.jsxs(W,{style:{color:"var(--color-sdk-prediction-result-error-subtitle)"},children:[e.jsx(V0,{name:"circleClose"}),e.jsxs(Q,{children:[e.jsx("span",{children:"Your Pick:"})," ",t==null?void 0:t.title]})]}),e.jsx(qe,{"data-a":"intr",onClick:s,children:e.jsx(Fe,{name:"icon-cross"})})]})]})})},F0=s=>{const[t,i]=h.useState(!1),[a,r]=h.useState(!1),l=h.useRef(null),d=h.useCallback(()=>{r(!0),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{r(!1)},1e3)},[]),o=h.useCallback(async c=>{i(!0);const p=c.map(f=>new Promise((m,u)=>{const v=new Image;v.onload=()=>m(f),v.onerror=()=>u(),v.src=f}));await Promise.allSettled(p),i(!1)},[]);return h.useEffect(()=>{s&&(d(),o(s))},[s,d,o]),{loading:t,throttled:a}},B0=n.styled_default("div")({name:"Container",class:"cl51m2q",propsAsIs:!1}),D0=n.styled_default("img")({name:"Avatar",class:"a2yhhhr",propsAsIs:!1}),P0=n.styled_default("div")({name:"AvatarPlaceholder",class:"a1dtxxlr",propsAsIs:!1}),U0=n.styled_default("div")({name:"Content",class:"c12clm3w",propsAsIs:!1}),W0=n.styled_default("span")({name:"Name",class:"n14lctn7",propsAsIs:!1}),Q0=({avatar:s,name:t})=>e.jsxs(B0,{children:[s&&e.jsx(D0,{src:s}),!s&&e.jsx(P0,{children:E.I(t||"")}),e.jsxs(U0,{children:[e.jsxs(W0,{children:[t," "]}),"is waiting for you!"]})]}),Z0=n.styled_default("div")({name:"Container",class:"c1htq1lb",propsAsIs:!1}),G0=n.styled_default("div")({name:"Graphic",class:"gjyzpp7",propsAsIs:!1}),K0=n.styled_default("img")({name:"GraphicImage",class:"g16mldgz",propsAsIs:!1}),Y0=n.styled_default("div")({name:"Headline",class:"h69js65",propsAsIs:!1}),J0=n.styled_default("div")({name:"TaglineContainer",class:"tmm7qmo",propsAsIs:!1}),X0=n.styled_default("div")({name:"Tagline",class:"t17knuw2",propsAsIs:!1}),en=n.styled_default("div")({name:"Content",class:"c1b74psg",propsAsIs:!1}),sn=n.styled_default("div")({name:"StepsContainer",class:"s1y99ug7",propsAsIs:!1}),tn=n.styled_default("span")({name:"StepIndicator",class:"sgf3v5n",propsAsIs:!1}),nn=n.styled_default("div")({name:"InvitingUserWrap",class:"i1sj6gn8",propsAsIs:!1}),an=({loading:s,steps:t,currentStep:i,inviterName:a})=>{const{headline:r,tagline:l}=t[i];return e.jsxs(Z0,{children:[l&&e.jsx(J0,{children:e.jsx(R.i,{loading:s,children:e.jsx(X0,{children:l})})}),e.jsxs(en,{"data-welcome-screen":i===0,children:[e.jsx(G0,{children:e.jsx(R.i,{loading:s,children:t.map(({graphicSrc:d},o)=>e.jsx(K0,{src:d,"data-active":i===o}))})}),r&&e.jsx(R.i,{loading:s,children:e.jsx(Y0,{children:r})})]}),a&&i===0&&e.jsx(nn,{children:e.jsx(Q0,{name:a})}),e.jsx(sn,{style:s?{visibility:"hidden"}:{},children:Array.from({length:t.length}).map((d,o)=>e.jsx(tn,{"data-active":i===o},o))})]})},rn=n.styled_default("div")({name:"Container",class:"cm0bev",propsAsIs:!1}),ln=n.styled_default("div")({name:"Content",class:"ce7x737",propsAsIs:!1}),on=n.styled_default("div")({name:"Title",class:"tc2tor6",propsAsIs:!1}),dn=n.styled_default("div")({name:"RulesList",class:"r1k5klql",propsAsIs:!1}),cn=n.styled_default("div")({name:"RulesItem",class:"r1tf3ft2",propsAsIs:!1}),un=n.styled_default("div")({name:"RuleIcon",class:"rwpvg1k",propsAsIs:!1}),pn=n.styled_default("div")({name:"RuleText",class:"rbxiag0",propsAsIs:!1}),hn=n.styled_default("button")({name:"TermsButton",class:"t6cyrry",propsAsIs:!1}),mn=({rules:s,rulesTitle:t,termsText:i,primaryColor:a,openTerms:r})=>e.jsxs(rn,{children:[e.jsxs(ln,{children:[e.jsx(on,{children:t}),e.jsx(dn,{children:s==null?void 0:s.map(({label:l,icon:d},o)=>e.jsxs(cn,{children:[d&&e.jsx(un,{style:{backgroundColor:a},children:e.jsx(A.B1,{name:d,"data-icon":d})}),e.jsx(pn,{children:l})]},o))})]}),i&&e.jsx(hn,{"data-a":"intr",onClick:r,children:"See Terms and Conditions"})]}),fn=n.styled_default("div")({name:"Container",class:"cj0g35h",propsAsIs:!1}),vn=n.styled_default("div")({name:"Content",class:"c1xkhrbn",propsAsIs:!1}),Cn=n.styled_default("div")({name:"Title",class:"tifzb8b",propsAsIs:!1}),gn=n.styled_default("div")({name:"ScrollingText",class:"stduw5c",propsAsIs:!1}),xn=({termsTitle:s,termsText:t})=>e.jsx(fn,{children:e.jsxs(vn,{children:[e.jsx(Cn,{children:s}),e.jsx(gn,{children:t})]})}),yn=n.styled_default("button")({name:"SButton",class:"s1nve60q",propsAsIs:!1}),_n=n.styled_default("span")({name:"ButtonLabel",class:"b1xoswwx",propsAsIs:!1}),In=({disabled:s,variant:t="primary",onClick:i,children:a,...r})=>e.jsx(yn,{"data-a":"intr",onClick:i,disabled:s,"data-variant":t,...r,children:e.jsx(_n,{children:a})}),jn=n.styled_default("div")({name:"Container",class:"c18uddbs",propsAsIs:!1}),bn=n.styled_default("div")({name:"Content",class:"cvcfjf6",propsAsIs:!1}),An=n.styled_default("div")({name:"OnboardingHeader",class:"o1ie27lw",propsAsIs:!1}),wn=n.styled_default("button")({name:"CloseBtn",class:"c15cjkwi",propsAsIs:!1}),$n=()=>A.B1,kn=n.styled_default($n())({name:"IconClose",class:"i1mavjt2",propsAsIs:!0}),Ln=n.styled_default("div")({name:"OnboardingFooter",class:"o1x0dyzv",propsAsIs:!1}),Sn=()=>In,Tn=n.styled_default(Sn())({name:"OnboardingActionBtn",class:"o1jfi9c3",propsAsIs:!0}),O={steps:!1,rules:!1,inviteCard:!1},Nn=({gamification:s,steps:t,rules:i,rulesBtnLabel:a,rulesTitle:r,termsTitle:l,termsText:d,primaryColor:o,inviteLink:c,inviteCardTitle:p,inviteCardSubtext:f,inviteCardBtnLabel:m,loading:u,inviterName:v,sdk:g,onClose:y})=>{const[C,I]=h.useState(0),[_,b]=h.useState(!1),[j,L]=h.useState(O);h.useEffect(()=>{t!=null&&t.length?L({...O,steps:!0}):i!=null&&i.length?L({...O,rules:!0}):L({...O,inviteCard:!0})},[]);const s2=h.useMemo(()=>j.steps&&C===0?"Continue":j.rules?_||!a?"Got it":a:j.inviteCard?m||"Play Now":"Next",[j,C,_,a,m]),t2=h.useCallback(()=>{t!=null&&t.length&&C<t.length-1?I(Y=>++Y):i!=null&&i.length&&j.steps?L({...O,rules:!0}):j.rules&&L({...O,inviteCard:!0})},[C,t==null?void 0:t.length,i==null?void 0:i.length,j,I,L]),n2=async()=>{j.inviteCard?await s.onboardingStatus.submitInplay():j.rules&&_?b(!1):t2()};return h.useEffect(()=>{!u&&v&&g.inviteDisplayed()},[u,v,g]),e.jsx(rs,{children:({width:Y,height:re})=>e.jsxs(jn,{style:{width:Y,height:re,maxHeight:re},children:[e.jsx(An,{children:e.jsx(wn,{"data-a":"intr",onClick:y,children:e.jsx(kn,{name:"icon-close-btn-gray"})})}),e.jsxs(bn,{children:[j.steps&&(t==null?void 0:t.length)&&e.jsx(an,{loading:u,steps:t,currentStep:C,inviterName:v}),j.rules&&!_&&e.jsx(mn,{rules:i,rulesTitle:r,termsText:d,primaryColor:o,openTerms:()=>b(!0)}),j.rules&&_&&e.jsx(xn,{termsTitle:l,termsText:d}),j.inviteCard&&e.jsx(Ye,{inviteLink:c,inviteCardTitle:p,inviteCardSubtext:f,primaryColor:o})]}),e.jsx(Ln,{children:e.jsx(R.i,{loading:u,style:{width:"100%"},children:e.jsx(Tn,{"data-a":"intr",onClick:n2,children:s2})})})]})})},En=n.styled_default("div")({name:"Container",class:"c1qjj4d4",propsAsIs:!1}),Rn=n.styled_default("div")({name:"CloseIconWrap",class:"c1lg6b8a",propsAsIs:!1}),Vn=()=>A.B1,Hn=n.styled_default(Vn())({name:"CloseIcon",class:"c159el66",propsAsIs:!0}),zn=n.styled_default("div")({name:"Title",class:"t16xmufv",propsAsIs:!1}),Mn=n.styled_default("img")({name:"SponsorLogo",class:"s83lc21",propsAsIs:!1}),On=n.styled_default("div")({name:"PresentsTitle",class:"p1p7igia",propsAsIs:!1}),qn=n.styled_default("div")({name:"Subtitle",class:"s1eftsbu",propsAsIs:!1}),Fn=n.styled_default("div")({name:"Description",class:"d8uezec",propsAsIs:!1}),Bn=n.styled_default("button")({name:"ActionButton",class:"a1h1bk90",propsAsIs:!1}),Be=({close:s,action:t,onboarding:i})=>{var a,r,l,d,o,c,p,f;return e.jsxs(En,{children:[e.jsx(Rn,{"data-a":"intr",onClick:s,children:e.jsx(Hn,{name:"icon-cross"})}),((r=(a=i==null?void 0:i.titleCard)==null?void 0:a.media)==null?void 0:r.sponsorLogo)&&e.jsxs(zn,{children:[e.jsx(Mn,{alt:"sponsor-logo",src:(d=(l=i==null?void 0:i.titleCard)==null?void 0:l.media)==null?void 0:d.sponsorLogo}),e.jsx(On,{children:"PRESENTS"})]}),((o=i==null?void 0:i.titleCard)==null?void 0:o.title)&&e.jsx(qn,{children:(c=i==null?void 0:i.titleCard)==null?void 0:c.title}),((p=i==null?void 0:i.titleCard)==null?void 0:p.subtitle)&&e.jsx(Fn,{children:(f=i==null?void 0:i.titleCard)==null?void 0:f.subtitle}),e.jsx(Bn,{"data-a":"intr",onClick:t,children:"Play Now"})]})},ie=[{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/dark/step_1.png",tagline:"",headline:e.jsxs(e.Fragment,{children:["Welcome to ",e.jsx("br",{})," Live Challenge"]})},{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/dark/step_2.png",headline:"Live insights, polls, trivia and predictions."},{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/dark/step_3.png",headline:"Win points and play against friends."}],Dn=n.styled_default("div")({name:"OnboardingContainer",class:"o1xni1kr",propsAsIs:!1}),Pn=()=>$.f,Un=n.styled_default(Pn())({name:"OnboardingNotificationContainer",class:"o1vnouv7",propsAsIs:!0}),De=n.styled_default("div")({name:"InnerContainer",class:"i59uefw",propsAsIs:!1}),Wn=n.styled_default("div")({name:"OnboardingOverlap",class:"ovnr8ov",propsAsIs:!1}),Qn=({deepLink:s,onboardingOpts:t,notification:i,gamification:a,loading:r,sdk:l,throttled:d})=>{var o,c,p,f,m,u,v;const g=n.useStore(a.friends?a.friends.getStore():We({data:[]})),[y,C]=h.useState(void 0),I=h.useMemo(()=>{var _,b;const j=l.getInviter();return j?(b=(_=g.data)==null?void 0:_.find(({slId:L})=>L===j))==null?void 0:b.name:""},[g.data,l]);return h.useEffect(()=>{const _=s.$store.subscribe(b=>{b&&C(b.data)});return()=>{_()}},[s.$store]),e.jsxs(Dn,{children:[e.jsx(Nn,{loading:r,rules:[{label:"Answer as many questions as you like.",icon:"icon-btn-feature-groups"},{label:"Win points for each correct trivia or prediction answer.",icon:"icon-thumb-up"},{label:"Top the leader board and best your friends.",icon:"icon-trophy"}],rulesBtnLabel:(o=t.rules)==null?void 0:o.buttonLabel,rulesTitle:(c=t.rules)==null?void 0:c.heading,termsTitle:"Terms and Conditions",termsText:(p=t.rules)==null?void 0:p.terms,steps:ie,primaryColor:(f=t.inviteCard)==null?void 0:f.iconColor,inviteLink:y,inviteCardTitle:(m=t.inviteCard)==null?void 0:m.heading,inviteCardSubtext:(u=t.inviteCard)==null?void 0:u.subtext,inviteCardBtnLabel:(v=t.inviteCard)==null?void 0:v.buttonLabel,onClose:()=>{var _;(_=i.close)==null||_.call(i)},gamification:a,sdk:l,inviterName:I}),d&&e.jsx(Wn,{})]})},Zn=({sdk:s,notification:t,saveHeight:i,style:a,appNode:r,sdkInDesktopView:l,responsiveStore:d})=>{const o=h.useRef(null),c=t.data.onboarding,[p,f]=h.useState(c==null?void 0:c.instantOpen),m=s.getFeature(x.SdkOverlayType.GAMES),u=h.useMemo(()=>ie==null?void 0:ie.map(({graphicSrc:C})=>C),[]),{screen:v}=n.useStore(d,{keys:["screen"]});h.useLayoutEffect(()=>{var C;i(((C=o.current)==null?void 0:C.getBoundingClientRect().height)||0)},[i]);const{loading:g,throttled:y}=F0(u);return p&&m&&c&&r.current?e.jsx(Ge,{container:r,useContainer:!l,children:e.jsx(Qn,{throttled:y,notification:t,setOpened:f,gamification:m,onboardingOpts:c,deepLink:m.deepLink,loading:g,renderToNode:r,sdk:s})}):e.jsxs(e.Fragment,{children:[e.jsx(De,{ref:o,style:{position:"absolute",visibility:"hidden"},children:e.jsx(Be,{close:()=>{},action:()=>{},onboarding:c})}),e.jsx(Un,{style:a,hiding:t.hiding,children:e.jsx(De,{children:e.jsx(Be,{close:t.close,action:()=>{var C;f(!0),(((C=r.current)==null?void 0:C.getBoundingClientRect().y)||0)<0&&ae(r,v.size,{behavior:"smooth"})},onboarding:c})})})]})},Gn=n.styled_default("button")({name:"Container",class:"crkmfw1",propsAsIs:!1}),Kn=n.styled_default("div")({name:"Content",class:"c11awpy4",propsAsIs:!1}),Yn=n.styled_default("span")({name:"Title",class:"t154z7mh",propsAsIs:!1}),Jn=({title:s,onClick:t,className:i,style:a})=>e.jsx(Gn,{"data-a":"intr",onClick:t,className:i,style:a,children:e.jsxs(Kn,{"data-a":"intr",children:[e.jsx(A.B1,{"data-a":"intr",name:"iconUp"}),s&&e.jsx(Yn,{"data-a":"intr",children:s})]})}),Xn=()=>$.f,ei=n.styled_default(Xn())({name:"Container",class:"c8ol1ve",propsAsIs:!0}),e2=n.styled_default("div")({name:"InnerContainer",class:"iqfywam",propsAsIs:!1}),si=()=>e2,ti=n.styled_default(si())({name:"HiddenContainer",class:"hokmtod",propsAsIs:!0}),ni=n.styled_default("div")({name:"NotificationRefreshing",class:"n192d1q8",propsAsIs:!1}),ii=()=>Jn,ai=n.styled_default(ii())({name:"Pill",class:"p1lha68t",propsAsIs:!0}),ri=s=>{const[t,i]=h.useState(0),a=h.useRef(null),r=h.useMemo(()=>new ResizeObserver(o=>{window.requestAnimationFrame(()=>{var c;if(Array.isArray(o)){for(const p of o)if(p.contentBoxSize){const f=(c=a.current)==null?void 0:c.getBoundingClientRect();f&&i(f.height)}}})}),[]),l=h.useCallback(o=>{a.current=o},[]),d=h.useCallback(o=>{i(o)},[]);return h.useEffect(()=>{const o=a.current;return o?(r.observe(o),()=>{r.unobserve(o)}):()=>{}},[s]),h.useEffect(()=>()=>{r.disconnect()}),[l,t,d]},li=({sdk:s,notification:t,appNode:i,responsiveStore:a,hasActiveFeature:r})=>{var l,d;const{sdkInDesktopView:o}=n.useStore(a,{keys:["sdkInDesktopView"]}),{sdk:c}=H.p(),[p,f,m]=ri(t.id);let u=f;return r||(u="auto"),t.type===n.NotificationType.QUESTION?e.jsxs(e.Fragment,{children:[e.jsx(ti,{ref:p,children:e.jsx(Se,{...t})}),e.jsxs(ei,{style:{height:t.hiding?0:u},hiding:t.hiding,children:[e.jsx(e2,{style:{height:"100%"},children:e.jsx(Se,{...t,controlVideo:c==null?void 0:c.controlVideoPlayer})}),e.jsx(ni,{},t.id)]})]}):t.type===n.NotificationType.QUESTION_RESOLVED&&(d=(l=t.data)==null?void 0:l.question)!=null&&d.predictionResult?e.jsx(q0,{style:{height:t.hiding?0:f},saveHeight:m,close:t.close,hiding:t.hiding,...t.data.question}):t.type===n.NotificationType.ONBOARDING?e.jsx(Zn,{style:{height:t.hiding?0:u},saveHeight:m,sdk:s,notification:t,sdkInDesktopView:o,appNode:i,responsiveStore:a}):null},oi="p7vfi6t",di=({pill:s,setPill:t,appNode:i,headerNode:a,scrollNode:r,responsiveStore:l,scrollStore:d})=>{var o,c;const{screen:p}=n.useStore(l,{keys:["screen"]}),{tabsShown:f,scrollPosition:m}=n.useStore(d,{keys:["tabsShown","scrollPosition"]});h.useEffect(()=>{l.get().sdkInDesktopView?m<50&&t(null):m>-50&&t(null)},[m,l,t]);const u=l.get().sdkInDesktopView?i:a;return!s||!u.current?null:G.createPortal(e.jsx(ai,{title:s.type===n.NotificationType.QUESTION_RESOLVED?"Prediction result":`New ${((c=E.e[(o=s.data)==null?void 0:o.questionType])==null?void 0:c.label)||"notification"}`,"data-a":"intr",onClick:()=>{var v;l.get().sdkInDesktopView?(v=r.current)==null||v.scrollTo({top:0,behavior:"smooth"}):ae(i,p.size,{behavior:"smooth"}),t(null)},className:n.cx_default(f&&oi,"sl-pill-button")}),u.current)},ci=({sdk:s,headerNode:t,scrollNode:i,responsiveStore:a,appNode:r,scrollStore:l,hasActiveFeature:d})=>{const[o]=h.useState(s.getNotificationsStore()),c=n.useStore(o),[p,f]=h.useState(null),m=h.useMemo(()=>s.getActiveNotification(),[s,c]);return h.useEffect(()=>{m&&T.eventBus.emit("notification",{action:"rendered",payload:{questionId:m.data.questionId,questionType:m.data.questionType}})},[m]),h.useEffect(()=>{const{sdkInDesktopView:u,sdkInView:v}=a.get();m&&(u||v)&&(!u&&v&&f(m),u&&window.requestAnimationFrame(()=>{l.get().scrollPosition!==0&&f(m)}))},[m]),h.useEffect(()=>{m||f(null)},[m]),e.jsxs(e.Fragment,{children:[!p&&m&&e.jsx(li,{appNode:r,sdk:s,hasActiveFeature:d,notification:m,responsiveStore:a}),p&&e.jsx(di,{pill:p,setPill:f,appNode:r,notification:m,headerNode:t,scrollNode:i,scrollStore:l,responsiveStore:a})]})},ui=s=>{const t=n.useStore(s.status),i=n.useStore(s.sdkStore.slStreamId),a=n.useStore(s.userId()),r=n.useStore(s.getActiveFeature()),l=t==="ready"&&!!i.data;return h.useEffect(()=>{const d=s.getFeature(x.SdkOverlayType.GAMES);d&&r!==x.SdkOverlayType.GAMES&&(d.closeQuestion(),d.closeUser()),d==null||d.openedQuestionId.subscribe(o=>{o&&r!==x.SdkOverlayType.GAMES&&s.openFeature(x.SdkOverlayType.GAMES)})},[r,s]),{sdkReady:l,activeFeature:r,isLogged:!!a}},pi=({sdk:s,className:t,scrollStore:i,appNode:a,scrollNode:r,responsiveStore:l})=>{const[,d]=c2(s);return e.jsx(ot,{className:t,scrollNode:r,appNode:a,scrollStore:i,feature:d,responsiveStore:l,sdk:s})},hi=({sdk:s,muted:t,className:i,appNode:a,responsiveStore:r})=>{const l=n.useStore(s.featuresList.getStore());return l?Array.from(l,d=>{const o=s.getFeature(d);return o?e.jsx(dt,{className:i,muted:t,appNode:a,feature:o,responsiveStore:r,sdk:s},d):null}):null},mi=({sdk:s,muted:t,topNavigation:i})=>{const[a,r]=h.useState(!0),l=h.useRef(null),d=n.useStore(s.uiState),o=h.useRef(null),[c]=u2(l),[p,f]=h2(l,c),{sdkReady:m,activeFeature:u,isLogged:v}=ui(s),g=!!m;Z.b(l,{enabled:g,event:"click",listener:Z.A});const y=h.useMemo(()=>({sdk:s,topNavigation:i}),[s,i]);return h.useEffect(()=>{Promise.resolve().then(()=>require("./gamification-feature.js"))},[]),e.jsx(H.e.Provider,{value:y,children:e.jsxs($.p,{ref:C=>{l.current=C,r(!!C)},className:i?"":"c10llmat",children:[g&&i&&d.app&&e.jsx(Rt,{className:n.cx_default(q.m,"sl-hide-on-modal"),sdk:s,ref:o}),g&&!i&&!!u&&d.app&&e.jsx(Et,{className:n.cx_default(q.m,"sl-hide-on-modal"),sdk:s,ref:o}),e.jsxs($.c,{className:"sl-hide-on-modal",ref:p,"data-nav":(!!u&&g).toString(),children:[g&&d.app&&e.jsx(ci,{sdk:s,scrollNode:p,headerNode:o,appNode:l,scrollStore:f,responsiveStore:c,hasActiveFeature:!!u}),g&&d.app&&e.jsx(pi,{scrollStore:f,responsiveStore:c,scrollNode:p,appNode:l,className:q.m,sdk:s}),g&&a&&e.jsx(hi,{muted:t,responsiveStore:c,appNode:l,className:q.m,sdk:s})]}),g&&!v&&a&&d.app&&e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},children:"You are not logged in."})]})})},fi=({event:s,topNavigation:t,theme:i,muted:a,withSidebarNotification:r=!0})=>{const{sdk:l,status:d}=h.useContext(z.c),o=z.F(),c=z.z(),{event:p}=h.useContext(z.c);if(d===z.Y.UNSET)throw new Error("Wrap app in `StreamLayerProvider`");return d===z.Y.CONNECTED?e.jsx("div",{className:"StreamLayerSDK",children:"wait"}):l===null?e.jsx("div",{className:"StreamLayerSDK",children:"sdk not initialized"}):!o.app&&!o.appNotification&&!o.appSidebar||!o.app&&!o.appSidebar&&o.appNotification&&!r?null:e.jsx("div",{className:"StreamLayerSDK",children:e.jsx(q.h,{customTheme:i??c.theme,themeMode:c.themeMode,children:e.jsx(mi,{sdk:l,muted:a,event:(p==null?void 0:p.current)||s,topNavigation:t})})})};exports.B=at;exports.b=fi;
5
+ `,Ze=()=>window.innerWidth>=n.A.md&&window.innerWidth<n.A.lg?76:53,he=s=>{var t;const i=Ze();return Math.round((((t=s.current)==null?void 0:t.getBoundingClientRect().y)||0)-i)<=0},Ge=({children:s,container:t,useContainer:i,staticStyles:a})=>{const[r]=h.useState(()=>he(t)),[l,d]=h.useState(!1);return h.useEffect(()=>{if(!t.current||!r)return d(!0),()=>{};const o=window.scrollY;return d(!0),()=>{he(t)&&window.scrollTo({top:o,behavior:"instant"})}},[]),h.useEffect(()=>{if(l&&t.current&&r){const o=Ze();window.scrollTo({top:t.current.offsetTop-o,behavior:"instant"})}},[l]),!t.current||!l?null:i?Q.createPortal(e.jsxs(M2,{className:"StaticContainer",children:[s,e.jsx("style",{children:r2.u}),e.jsx("style",{children:O2})]}),t.current,"modal-node"):Q.createPortal(e.jsxs(e.Fragment,{children:[s,e.jsx("style",{children:a})]}),t.current,"modal-node")},F2=n.styled_default("div")({name:"Container",class:"c115qtkr",propsAsIs:!1}),q2=n.styled_default("div")({name:"STabs",class:"sxnslc8",propsAsIs:!1}),B2=n.styled_default("button")({name:"Button",class:"b1umzux0",propsAsIs:!1}),D2=n.styled_default("span")({name:"Title",class:"tspsaas",propsAsIs:!1});var B=(s=>(s.HOME="home",s.LEADERBOARD="leaderboard",s))(B||{});const me=({title:s,active:t,onClick:i})=>e.jsx(B2,{"data-a":"intr",onClick:i,"data-selected":t,children:e.jsx(D2,{"data-a":"intr",children:s})}),P2=({activePage:s="home",toggleActivePage:t})=>e.jsx(F2,{children:e.jsxs(q2,{"data-position":s==="home"?"left":"right",children:[e.jsx(me,{title:"Home",active:s==="home",onClick:()=>t("home")}),e.jsx(me,{title:"Friends",active:s==="leaderboard",onClick:()=>t("leaderboard")})]})}),U2=n.styled_default("button")({name:"Container",class:"cpjnajb",propsAsIs:!1}),W2=n.styled_default("div")({name:"Content",class:"c4m6kaz",propsAsIs:!1}),Z2=n.styled_default("span")({name:"Title",class:"t1h8t9cc",propsAsIs:!1}),G2=()=>e.jsx(U2,{children:e.jsxs(W2,{children:[e.jsx(A.B1,{name:"iconCopySuccess"}),e.jsx(Z2,{children:"Link Copied to Clipboard"})]})}),Qe=s=>{const t=h.useRef(),[i,a]=h.useState(null),r=h.useCallback(async l=>{var d;if(l&&(d=navigator==null?void 0:navigator.clipboard)!=null&&d.writeText){t.current&&(clearTimeout(t.current),a(null));try{await navigator.clipboard.writeText(l),s.current&&(a(Q.createPortal(e.jsx(G2,{}),s.current)),t.current=setTimeout(()=>{a(null)},1e3))}catch(o){console.error("Unable to copy to clipboard",o)}}},[s]);return h.useEffect(()=>()=>{clearTimeout(t.current)},[]),[r,i]},Q2=n.styled_default("div")({name:"Container",class:"c1ux29ft",propsAsIs:!1}),K2=()=>A.B1,Y2=n.styled_default(K2())({name:"FriendsIcon",class:"f10ncfg2",propsAsIs:!0}),J2=n.styled_default("div")({name:"Content",class:"c1yc07bd",propsAsIs:!1}),X2=n.styled_default("div")({name:"Title",class:"tj6cq7w",propsAsIs:!1}),es=n.styled_default("div")({name:"Description",class:"d1ag78xo",propsAsIs:!1}),ss=()=>A.B1,ts=n.styled_default(ss())({name:"ArrowInviteIcon",class:"awohrz6",propsAsIs:!0}),ns=({title:s,description:t,onClick:i,className:a})=>{const[r]=F.f$1({type:"invitation",action:"sent",payload:{from:y.InvitationFrom.TITLE_CARD}});return e.jsxs(Q2,{"data-a":"intr",onClick:r(i),className:a,children:[e.jsx(Y2,{name:"icon-friends"}),e.jsxs(J2,{children:[e.jsx(X2,{children:s}),e.jsx(es,{children:t})]}),e.jsx(ts,{name:"icon-copy"})]})};let S;typeof window<"u"?S=window:typeof self<"u"?S=self:S=y.global;let te=null,ne=null;const fe=20,X=S.clearTimeout,ve=S.setTimeout,ee=S.cancelAnimationFrame||S.mozCancelAnimationFrame||S.webkitCancelAnimationFrame,Ce=S.requestAnimationFrame||S.mozRequestAnimationFrame||S.webkitRequestAnimationFrame;ee==null||Ce==null?(te=X,ne=function(t){return ve(t,fe)}):(te=function([t,i]){ee(t),X(i)},ne=function(t){const i=Ce(function(){X(a),t()}),a=ve(function(){ee(i),t()},fe);return[i,a]});function is(s){let t,i,a,r,l,d,o;const c=typeof document<"u"&&document.attachEvent;if(!c){d=function(I){const _=I.__resizeTriggers__,b=_.firstElementChild,j=_.lastElementChild,L=b.firstElementChild;j.scrollLeft=j.scrollWidth,j.scrollTop=j.scrollHeight,L.style.width=b.offsetWidth+1+"px",L.style.height=b.offsetHeight+1+"px",b.scrollLeft=b.scrollWidth,b.scrollTop=b.scrollHeight},l=function(I){return I.offsetWidth!==I.__resizeLast__.width||I.offsetHeight!==I.__resizeLast__.height},o=function(I){if(I.target.className&&typeof I.target.className.indexOf=="function"&&I.target.className.indexOf("contract-trigger")<0&&I.target.className.indexOf("expand-trigger")<0)return;const _=this;d(this),this.__resizeRAF__&&te(this.__resizeRAF__),this.__resizeRAF__=ne(function(){l(_)&&(_.__resizeLast__.width=_.offsetWidth,_.__resizeLast__.height=_.offsetHeight,_.__resizeListeners__.forEach(function(L){L.call(_,I)}))})};let u=!1,v="";a="animationstart";const g="Webkit Moz O ms".split(" ");let x="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),C="";{const I=document.createElement("fakeelement");if(I.style.animationName!==void 0&&(u=!0),u===!1){for(let _=0;_<g.length;_++)if(I.style[g[_]+"AnimationName"]!==void 0){C=g[_],v="-"+C.toLowerCase()+"-",a=x[_],u=!0;break}}}i="resizeanim",t="@"+v+"keyframes "+i+" { from { opacity: 0; } to { opacity: 0; } } ",r=v+"animation: 1ms "+i+"; "}const p=function(u){if(!u.getElementById("detectElementResize")){const v=(t||"")+".resize-triggers { "+(r||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',g=u.head||u.getElementsByTagName("head")[0],x=u.createElement("style");x.id="detectElementResize",x.type="text/css",s!=null&&x.setAttribute("nonce",s),x.styleSheet?x.styleSheet.cssText=v:x.appendChild(u.createTextNode(v)),g.appendChild(x)}};return{addResizeListener:function(u,v){if(c)u.attachEvent("onresize",v);else{if(!u.__resizeTriggers__){const g=u.ownerDocument,x=S.getComputedStyle(u);x&&x.position==="static"&&(u.style.position="relative"),p(g),u.__resizeLast__={},u.__resizeListeners__=[],(u.__resizeTriggers__=g.createElement("div")).className="resize-triggers";const C=g.createElement("div");C.className="expand-trigger",C.appendChild(g.createElement("div"));const I=g.createElement("div");I.className="contract-trigger",u.__resizeTriggers__.appendChild(C),u.__resizeTriggers__.appendChild(I),u.appendChild(u.__resizeTriggers__),d(u),u.addEventListener("scroll",o,!0),a&&(u.__resizeTriggers__.__animationListener__=function(b){b.animationName===i&&d(u)},u.__resizeTriggers__.addEventListener(a,u.__resizeTriggers__.__animationListener__))}u.__resizeListeners__.push(v)}},removeResizeListener:function(u,v){if(c)u.detachEvent("onresize",v);else if(u.__resizeListeners__.splice(u.__resizeListeners__.indexOf(v),1),!u.__resizeListeners__.length){u.removeEventListener("scroll",o,!0),u.__resizeTriggers__.__animationListener__&&(u.__resizeTriggers__.removeEventListener(a,u.__resizeTriggers__.__animationListener__),u.__resizeTriggers__.__animationListener__=null);try{u.__resizeTriggers__=!u.removeChild(u.__resizeTriggers__)}catch{}}}}}class as extends h.Component{constructor(...t){super(...t),this.state={height:this.props.defaultHeight||0,scaledHeight:this.props.defaultHeight||0,scaledWidth:this.props.defaultWidth||0,width:this.props.defaultWidth||0},this._autoSizer=null,this._detectElementResize=null,this._parentNode=null,this._resizeObserver=null,this._timeoutId=null,this._onResize=()=>{this._timeoutId=null;const{disableHeight:i,disableWidth:a,onResize:r}=this.props;if(this._parentNode){const l=window.getComputedStyle(this._parentNode)||{},d=parseFloat(l.paddingLeft||"0"),o=parseFloat(l.paddingRight||"0"),c=parseFloat(l.paddingTop||"0"),p=parseFloat(l.paddingBottom||"0"),f=this._parentNode.getBoundingClientRect(),m=f.height-c-p,u=f.width-d-o,v=this._parentNode.offsetHeight-c-p,g=this._parentNode.offsetWidth-d-o;(!i&&(this.state.height!==v||this.state.scaledHeight!==m)||!a&&(this.state.width!==g||this.state.scaledWidth!==u))&&(this.setState({height:v,width:g,scaledHeight:m,scaledWidth:u}),typeof r=="function"&&r({height:v,scaledHeight:m,scaledWidth:u,width:g}))}},this._setRef=i=>{this._autoSizer=i}}componentDidMount(){const{nonce:t}=this.props,i=this._autoSizer?this._autoSizer.parentNode:null;if(i!=null&&i.ownerDocument&&i.ownerDocument.defaultView&&i instanceof i.ownerDocument.defaultView.HTMLElement){this._parentNode=i;const a=i.ownerDocument.defaultView.ResizeObserver;a!=null?(this._resizeObserver=new a(()=>{this._timeoutId=setTimeout(this._onResize,0)}),this._resizeObserver.observe(i)):(this._detectElementResize=is(t),this._detectElementResize.addResizeListener(i,this._onResize)),this._onResize()}}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),this._timeoutId!==null&&clearTimeout(this._timeoutId),this._resizeObserver&&this._resizeObserver.disconnect())}render(){const{children:t,defaultHeight:i,defaultWidth:a,disableHeight:r=!1,disableWidth:l=!1,doNotBailOutOnEmptyChildren:d=!1,nonce:o,onResize:c,style:p={},tagName:f="div",...m}=this.props,{height:u,scaledHeight:v,scaledWidth:g,width:x}=this.state,C={overflow:"visible"},I={};let _=!1;return r||(u===0&&(_=!0),C.height=0,I.height=u,I.scaledHeight=v),l||(x===0&&(_=!0),C.width=0,I.width=x,I.scaledWidth=g),d&&(_=!1),h.createElement(f,{ref:this._setRef,style:{...C,...p},...m},!_&&t(I))}}function rs(s){var t=s.lastRenderedStartIndex,i=s.lastRenderedStopIndex,a=s.startIndex,r=s.stopIndex;return!(a>i||r<t)}function ls(s){for(var t=s.isItemLoaded,i=s.itemCount,a=s.minimumBatchSize,r=s.startIndex,l=s.stopIndex,d=[],o=null,c=null,p=r;p<=l;p++){var f=t(p);f?c!==null&&(d.push(o,c),o=c=null):(c=p,o===null&&(o=p))}if(c!==null){for(var m=Math.min(Math.max(c,o+a-1),i-1),u=c+1;u<=m&&!t(u);u++)c=u;d.push(o,c)}if(d.length)for(;d[1]-d[0]+1<a&&d[0]>0;){var v=d[0]-1;if(!t(v))d[0]=v;else break}return d}var os=function(s,t){if(!(s instanceof t))throw new TypeError("Cannot call a class as a function")},ds=function(){function s(t,i){for(var a=0;a<i.length;a++){var r=i[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,i,a){return i&&s(t.prototype,i),a&&s(t,a),t}}(),cs=function(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);s.prototype=Object.create(t&&t.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(s,t):s.__proto__=t)},ge=function(s,t){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:s};(function(s){cs(t,s);function t(){var i,a,r,l;os(this,t);for(var d=arguments.length,o=Array(d),c=0;c<d;c++)o[c]=arguments[c];return l=(a=(r=ge(this,(i=t.__proto__||Object.getPrototypeOf(t)).call.apply(i,[this].concat(o))),r),r._lastRenderedStartIndex=-1,r._lastRenderedStopIndex=-1,r._memoizedUnloadedRanges=[],r._onItemsRendered=function(p){var f=p.visibleStartIndex,m=p.visibleStopIndex;r._lastRenderedStartIndex=f,r._lastRenderedStopIndex=m,r._ensureRowsLoaded(f,m)},r._setRef=function(p){r._listRef=p},a),ge(r,l)}return ds(t,[{key:"resetloadMoreItemsCache",value:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this._memoizedUnloadedRanges=[],a&&this._ensureRowsLoaded(this._lastRenderedStartIndex,this._lastRenderedStopIndex)}},{key:"componentDidMount",value:function(){}},{key:"render",value:function(){var a=this.props.children;return a({onItemsRendered:this._onItemsRendered,ref:this._setRef})}},{key:"_ensureRowsLoaded",value:function(a,r){var l=this.props,d=l.isItemLoaded,o=l.itemCount,c=l.minimumBatchSize,p=c===void 0?10:c,f=l.threshold,m=f===void 0?15:f,u=ls({isItemLoaded:d,itemCount:o,minimumBatchSize:p,startIndex:Math.max(0,a-m),stopIndex:Math.min(o-1,r+m)});(this._memoizedUnloadedRanges.length!==u.length||this._memoizedUnloadedRanges.some(function(v,g){return u[g]!==v}))&&(this._memoizedUnloadedRanges=u,this._loadUnloadedRanges(u))}},{key:"_loadUnloadedRanges",value:function(a){for(var r=this,l=this.props.loadMoreItems||this.props.loadMoreRows,d=function(p){var f=a[p],m=a[p+1],u=l(f,m);u!=null&&u.then(function(){if(rs({lastRenderedStartIndex:r._lastRenderedStartIndex,lastRenderedStopIndex:r._lastRenderedStopIndex,startIndex:f,stopIndex:m})){if(r._listRef==null)return;typeof r._listRef.resetAfterIndex=="function"?r._listRef.resetAfterIndex(f,!0):(typeof r._listRef._getItemStyleCache=="function"&&r._listRef._getItemStyleCache(-1),r._listRef.forceUpdate())}})},o=0;o<a.length;o+=2)d(o)}}]),t})(h.PureComponent);const us=n.styled_default("div")({name:"Container",class:"culdu4a",propsAsIs:!1}),ps=n.styled_default("div")({name:"Position",class:"pwf8e69",propsAsIs:!1}),hs=n.styled_default("img")({name:"Avatar",class:"atf4yh4",propsAsIs:!1}),ms=n.styled_default("div")({name:"AvatarPlaceholder",class:"a1dg29ja",propsAsIs:!1}),fs=n.styled_default("div")({name:"Content",class:"c10a68rc",propsAsIs:!1}),vs=n.styled_default("div")({name:"NameContainer",class:"nc4kck5",propsAsIs:!1}),Cs=n.styled_default("span")({name:"Name",class:"njsrqgr",propsAsIs:!1}),gs=()=>A.B1,ys=n.styled_default(gs())({name:"CurrentUserBadge",class:"c17uc4zr",propsAsIs:!0}),xs=({friendsRank:s,avatar:t,name:i,userId:a,points:r,isCurrentUser:l,style:d})=>e.jsxs(us,{"data-name":a,style:d,children:[e.jsx(ps,{children:s||0}),e.jsxs(fs,{children:[t?e.jsx(hs,{alt:"leaderboard-item-avatar",src:t}):e.jsx(ms,{children:E.I(i||"")}),e.jsxs(vs,{children:[e.jsx(Cs,{children:i||""}),l&&e.jsx(ys,{name:"icon-star"})]})]}),e.jsx("div",{children:E.s(r)})]}),_s=n.styled_default("div")({name:"Container",class:"c16btbfp",propsAsIs:!1}),Is=({items:s,currentUserId:t,openItemDetail:i,fetchMore:a,scrollNode:r,hasMore:l})=>{const d=h.useCallback(o=>{const c=o.target.getAttribute("data-name");c&&i(c)},[i]);return e.jsx(l2,{loadMore:a,initialLoad:!1,hasMore:l,useWindow:!1,getScrollParent:()=>r.current,children:e.jsx(_s,{"data-a":"intr",onClick:d,children:s.map(o=>e.jsx(xs,{...o,isCurrentUser:!!t&&t===o.userId},o.userId))})})},js=n.styled_default("div")({name:"Container",class:"c1itm4k7",propsAsIs:!1}),bs=n.styled_default("div")({name:"IconContainer",class:"i1w4fsni",propsAsIs:!1}),As=()=>A.B1,ws=n.styled_default(As())({name:"InviteGameIcon",class:"i19m85r1",propsAsIs:!0}),$s=n.styled_default("div")({name:"Content",class:"c1mbu204",propsAsIs:!1}),ks=n.styled_default("div")({name:"Heading",class:"h1amdqtv",propsAsIs:!1}),Ls=n.styled_default("div")({name:"Subtext",class:"s1lhlj9j",propsAsIs:!1}),Ss=n.styled_default("div")({name:"LinkContainer",class:"l1wot35e",propsAsIs:!1}),Ts=n.styled_default("div")({name:"LinkInfo",class:"l1jdw39q",propsAsIs:!1}),Ns=n.styled_default("span")({name:"LinkTitle",class:"l1cr5mk",propsAsIs:!1}),Es=n.styled_default("span")({name:"LinkAddress",class:"lvi87q4",propsAsIs:!1}),Rs=()=>A.B1,Vs=n.styled_default(Rs())({name:"LinkIcon",class:"l1pqlvw3",propsAsIs:!0}),Ke=({inviteLink:s,inviteCardTitle:t,inviteCardSubtext:i,primaryColor:a,className:r})=>{const l=h.useRef(null),[d,o]=Qe(l),[c]=F.f$1({type:"invitation",action:"sent",payload:{from:y.InvitationFrom.MENU}});return e.jsxs(js,{className:r,children:[e.jsx(bs,{style:{backgroundColor:a},children:e.jsx(ws,{name:"invite-game-icon"})}),e.jsxs($s,{children:[e.jsx(ks,{children:t||""}),e.jsx(Ls,{children:i||""})]}),s&&e.jsxs(Ss,{ref:l,"data-a":"intr",onClick:c(()=>d(s)),children:[e.jsxs(Ts,{children:[e.jsx(Ns,{children:"Invite link"}),e.jsx(Es,{children:s})]}),e.jsx(Vs,{name:"icon-copy"})]}),o]})},Hs=n.styled_default("div")({name:"InviteFriendsContainer",class:"i1c9dygq",propsAsIs:!1}),zs=({deepLink:s})=>e.jsx(Hs,{children:e.jsx(Ke,{inviteLink:s,inviteCardTitle:"It’s More Fun With Friends",inviteCardSubtext:"Invite and compete against your friends for the top spot on the leaderboard."})}),Ms=n.styled_default("div")({name:"InviteLinkContainer",class:"i1odbhm4",propsAsIs:!1}),Os=({gamification:s,scrollNode:t,scrollStore:i,leaderboardList:a})=>{const r=h.useRef(null),{data:l,hasMore:d,loading:o,key:c}=n.useStore(a.$store),{data:p}=n.useStore(s.deepLink.$store),[f,m]=Qe(r);return!l.length&&!o?e.jsx(zs,{deepLink:p}):e.jsxs(e.Fragment,{children:[e.jsx(Is,{items:l,scrollNode:t,scrollStore:i,fetchMore:a.fetchMore,hasMore:d,openItemDetail:s.openUser,currentUserId:s.currentUserId.get()},c),p&&e.jsx(Ms,{ref:r,children:e.jsx(ns,{"data-a":"intr",onClick:()=>f(p),title:"Invite Friends",description:"Challenge them now!"})}),m]})},Fs=({gamification:s,scrollNode:t,scrollStore:i})=>s.leaderboardList?e.jsx(Os,{leaderboardList:s.leaderboardList,gamification:s,scrollNode:t,scrollStore:i}):null,qs=()=>P.r,Bs=n.styled_default(qs())({name:"Container",class:"cll3md7",propsAsIs:!0}),Ds=()=>P.S,Ps=n.styled_default(Ds())({name:"ActionBtn",class:"a10g1iik",propsAsIs:!0}),Us=({questionId:s,...t})=>e.jsxs(Bs,{"data-a":"intr","data-name":s,children:[e.jsx(H.O,{questionId:s,...t}),e.jsx(Ps,{"data-a":"intr","data-name":s,children:"View Insight"})]}),Ws=()=>P.r,Zs=n.styled_default(Ws())({name:"Container",class:"cl56x6b",propsAsIs:!0}),Gs=n.styled_default("button")({name:"ActionButton",class:"a11pzf92",propsAsIs:!1}),Qs=n.styled_default("blockquote")({name:"Quote",class:"q1hbaleq",propsAsIs:!1}),Ks=({...s})=>e.jsxs(Zs,{"data-a":"intr","data-name":s.tweetId,children:[s.title&&e.jsx(Qs,{children:s.title}),e.jsx(E.b,{...s}),e.jsx(Gs,{"data-a":"intr","data-name":s.tweetId,children:"View Insight"})]}),ye=n.styled_default("div")({name:"QuestionsContainer",class:"qvghv3l",propsAsIs:!1}),Ys=({questions:s,openQuestion:t,controlVideo:i})=>{const a=r=>{const l=r.target.getAttribute("data-name");l&&(Pe.wt(),t(l,{openedFrom:"list"}))};return s?e.jsx(ye,{"data-a":"intr",onClick:a,children:s==null?void 0:s.map(r=>{var l,d,o;if(r.type==="question"&&((l=r.attributes)==null?void 0:l.attributes.case)==="question"){const c=r.attributes.attributes.value;return e.jsx(P.R,{...c},c.questionId)}if(r.type==="insight"&&((d=r.attributes)==null?void 0:d.attributes.case)==="insight"){const c=r.attributes.attributes.value;return e.jsx(Us,{controlVideo:i,...c},c.questionId)}if(r.type==="tweet"&&((o=r.attributes)==null?void 0:o.attributes.case)==="tweet"){const c=r.attributes.attributes.value,p=r.attributes.id;return e.jsx(Ks,{controlVideo:i,...c,tweetId:p},p)}return null})}):e.jsx(ye,{children:Array.from({length:5}).map((r,l)=>e.jsx(P.D,{},l))})},Js=({store:s,openQuestion:t})=>{const{sdk:i}=H.p(),a=n.useStore(s);return e.jsx(Ys,{openQuestion:t,questions:a.data,controlVideo:i==null?void 0:i.controlVideoPlayer})},Xs=({userSummary:s})=>{var t;const[i,a]=h.useState(void 0);return h.useEffect(()=>{const r=s.$store.subscribe(l=>{l&&a(l)});return()=>{r()}},[s]),e.jsx(We,{loading:!(i!=null&&i.summary),...i==null?void 0:i.summary,successRate:(t=i==null?void 0:i.percentage)==null?void 0:t.correct})},et=({gamification:s,className:t,scrollStore:i,scrollNode:a,appNode:r,style:l,responsiveStore:d})=>{const{tabsShown:o}=n.useStore(i,{keys:["tabsShown"]}),c=n.useStore(s.friendsTabEnabled),[p,f]=h.useState(B.HOME),[,m]=n.useTransition(),{sdkInDesktopView:u,screen:v}=n.useStore(d,{keys:["sdkInDesktopView"]}),g=C=>{m(()=>{var I;f(C),u===!1&&(((I=r.current)==null?void 0:I.getBoundingClientRect().y)||0)<0&&ae(r,v.size,{behavior:"instant"})})};h.useEffect(()=>i.subscribe(C=>{if(C.scrollPosition===0){i.setKey("tabsShown",!0);return}d.get().sdkInDesktopView?i.setKey("tabsShown",C.scrollDirection==="backward"):i.setKey("tabsShown",C.scrollDirection==="forward")}),[i,d]),h.useEffect(()=>{c||f(B.HOME)},[c]);let x="0px";return u?x=o?"0px":"calc(0px - var(--header-height))":x=o?"var(--header-height)":"0px",e.jsxs($.l,{className:n.cx_default(t,"SL-Tabs","sl-hide-on-modal"),style:l,children:[c&&e.jsx($.S,{style:{top:x},children:e.jsx(P2,{activePage:p,toggleActivePage:g})}),p===B.HOME&&e.jsxs(e.Fragment,{children:[e.jsx($.m,{children:e.jsx($.d,{children:e.jsx(Xs,{userSummary:s.userSummary})})}),e.jsx($.n,{style:{flex:1},children:e.jsx(Js,{openQuestion:s.openQuestion,store:s.feedList.getStore()})})]}),p===B.LEADERBOARD&&e.jsx($.C,{children:e.jsx(Fs,{scrollStore:i,scrollNode:a,gamification:s})})]})},st=()=>$.f,xe=n.styled_default(st())({name:"OpenedContainer",class:"ouvguos",propsAsIs:!0}),_e="t1eu4lbg",tt=n.styled_default("div")({name:"UserContainer",class:"uuv2xqo",propsAsIs:!1}),nt=({correct:s,incorrect:t})=>{const i=s+t;return i===0?0:Math.round(s/i*100)},it=({gamification:s,scrollStore:t,className:i,appNode:a,scrollNode:r,responsiveStore:l})=>e.jsx(et,{appNode:a,scrollStore:t,scrollNode:r,className:i,gamification:s,responsiveStore:l}),at=({gamification:s,muted:t,sdk:i,className:a,appNode:r,responsiveStore:l})=>{const{topNavigation:d}=H.p(),o=n.useStore(s.openedQuestionId),c=n.useStore(s.openedQuestion.$store),p=n.useStore(s.openedUser||Ue(void 0)),{sdkInDesktopView:f}=n.useStore(l,{keys:["sdkInDesktopView"]}),{hiding:m,onAnimationEnd:u}=$.S$1();if(!o&&!p)return null;const v=c?e.jsx(xe,{className:n.cx_default(a,!d&&_e),hiding:m,onAnimationEnd:u,children:e.jsx(H.ht,{muted:t,sdk:i,gamification:s})}):p?e.jsx(xe,{className:n.cx_default(a,!d&&_e),hiding:m,onAnimationEnd:u,children:e.jsxs(tt,{children:[e.jsx(H.y,{label:"Friend's Rank",close:s.closeUser}),e.jsx($.a,{children:e.jsx(We,{...p,successRate:nt(p)})})]})}):null;return e.jsx(Ge,{container:r,useContainer:!f,children:v})},rt=h.lazy(()=>Promise.resolve().then(()=>require("./gamification-feature.js"))),lt=({sdk:s,feature:t,className:i,scrollStore:a,appNode:r,scrollNode:l,responsiveStore:d})=>{const o=h.useMemo(()=>t&&t.featureConfig.get().type===y.SdkOverlayType.GAMES?e.jsx(h2,{className:i,sdk:s,feature:t,children:e.jsx(rt,{appNode:r,scrollStore:a,scrollNode:l,className:i,responsiveStore:d,gamification:t})}):null,[s,t,i,d,a,l,r]);return e.jsx(h.Suspense,{fallback:e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},children:"page loading..."}),children:o})},ot=({feature:s,sdk:t,muted:i,className:a,appNode:r,responsiveStore:l})=>s&&s.featureConfig.get().type===y.SdkOverlayType.GAMES?e.jsx(at,{className:a,appNode:r,muted:i,sdk:t,responsiveStore:l,gamification:s}):null;window.dispatchEvent(new CustomEvent("grpc_devtools_loaded"));function dt(s){return s instanceof DOMException&&(s.code===22||s.code===1014||s.name==="QuotaExceededError"||s.name==="NS_ERROR_DOM_QUOTA_REACHED")}class ct{constructor(t="main",i=window.localStorage){w(this,"delimiter",":");w(this,"prefix");w(this,"storage");w(this,"clear",()=>{for(const t in window.localStorage)t.startsWith(this.prefix)&&this.storage.removeItem(t)});w(this,"generateKey",t=>`${this.prefix}${this.delimiter}${t.join(this.delimiter)}`);w(this,"write",(...t)=>{const i=t.pop()||"",a=this.generateKey(t);try{this.storage.setItem(a,i)}catch(r){dt(r)&&this.storage===window.sessionStorage&&(window.sessionStorage.removeItem("slstreamlogs"),this.storage.setItem(a,i))}});w(this,"read",(...t)=>{const i=this.storage.getItem(this.generateKey(t));return i===null?void 0:i});w(this,"remove",(...t)=>{this.storage.removeItem(this.generateKey(t))});this.prefix=`sl-sdk${this.delimiter}${t}`,this.storage=i}}var Ie;(function(s){s.Init="init",s.Ready="ready",s.Connecting="connecting",s.Connected="connected",s.Disconnected="disconnected",s.Failed="failed",s.Reconnect="reconnect",s.Reconnecting="reconnecting"})(Ie||(Ie={}));T.createLogger("grpc:stream");y.Code.Unknown,y.Code.Internal,y.Code.DeadlineExceeded,y.Code.ResourceExhausted,y.Code.FailedPrecondition,y.Code.Unavailable,y.Code.DataLoss;T.createLogger("grpc:retry");y.createContextKey(10,{description:"Number of attempts to retry"}),y.createContextKey(3e4,{description:"Max delay between retries in milliseconds"});var N;(function(s){s.SCHEMA="schema",s.EXTERNAL_TOKEN="eToken",s.TOKEN="token"})(N||(N={}));class ut extends ct{constructor(){super("user");w(this,"setSchema",i=>{this.write(N.SCHEMA,i)});w(this,"getSchema",()=>this.read(N.SCHEMA));w(this,"setToken",i=>{this.write(N.TOKEN,i)});w(this,"getToken",()=>this.read(N.TOKEN));w(this,"setExternalToken",i=>{this.write(N.EXTERNAL_TOKEN,i)});w(this,"getExternalToken",()=>this.read(N.EXTERNAL_TOKEN));w(this,"removeToken",()=>{this.remove(N.TOKEN)})}}var je;(function(s){s.DISABLED="disabled",s.INITIALIZATION="initialization",s.READY="ready",s.FAILED="failed",s.SUSPENDED="suspended"})(je||(je={}));var be;(function(s){s.SHOWED="showed",s.EVENT="ev"})(be||(be={}));var Ae;(function(s){s.ONBOARDING="onboarding",s.ONBOARDING_IO="onboarding_io",s.QUESTION_RECEIVED="q-received",s.QUESTION_OPENED="q-opened"})(Ae||(Ae={}));var we;(function(s){s.ALLOWED="allowed",s.DISALLOWED="disallowed"})(we||(we={}));var $e;(function(s){s.UNKNOWN="unknown",s.ALREADY_VOTED="already_voted"})($e||($e={}));T.createLogger("deep_link");T.createLogger("bypass");new ut;T.createLogger("video_player");y.QuestionType.FACTOID+"",y.QuestionType.POLL+"",y.QuestionType.TRIVIA+"",y.QuestionType.PREDICTION+"",y.QuestionType.TWEET+"";var ke;(function(s){s.Unset="unset",s.Required="required",s.Optional="optional",s.Completed="completed",s.Disabled="disabled",s.Unavailable="unavailable"})(ke||(ke={}));y.QuestionType.POLL,y.QuestionType.PREDICTION,y.QuestionType.TRIVIA;const pt={[y.SdkOverlayType.GAMES]:!0},ht=n.styled_default("div")({name:"Buttons",class:"b5o8qbl",propsAsIs:!1}),mt=({children:s,className:t})=>e.jsx(ht,{className:t,children:s}),Ye=n.styled_default("div")({name:"Navigation",class:"n6tbwuy",propsAsIs:!1}),ft=()=>mt,Le=n.styled_default(ft())({name:"NavigationItems",class:"n1up4z7v",propsAsIs:!0}),vt=n.styled_default("button")({name:"SButton",class:"sxxa0c",propsAsIs:!1}),Ct=n.styled_default("span")({name:"ButtonIcon",class:"b193dcyu",propsAsIs:!1}),gt=n.styled_default("span")({name:"ButtonLabel",class:"b40tuix",propsAsIs:!1}),yt="s14xk0af",xt="ha3mg7c",_t="h103yr45",W=({disabled:s,active:t,onClick:i,label:a,icon:r,id:l})=>e.jsx(vt,{onClick:i,"data-a":"intr",disabled:s,className:n.cx_default(t&&yt,!t&&(l==="channels"||l==="featuredGroups")&&xt,!t&&l==="leaderboard"&&_t),children:e.jsxs(e.Fragment,{children:[r&&e.jsx(Ct,{children:r}),e.jsx(gt,{children:a})]})}),It=()=>A.B1,jt=n.styled_default(It())({name:"ButtonIcon",class:"b11wpe79",propsAsIs:!0}),bt=n.styled_default("div")({name:"Container",class:"calnblm",propsAsIs:!1}),At=n.styled_default("div")({name:"Title",class:"t1438p52",propsAsIs:!1}),wt=n.styled_default("div")({name:"CloseIconWrap",class:"c17srj38",propsAsIs:!1}),$t=()=>A.B1,kt=n.styled_default($t())({name:"CloseIcon",class:"clqia8k",propsAsIs:!0}),Lt=()=>A.B1,St=n.styled_default(Lt())({name:"DashboardIcon",class:"df5w958",propsAsIs:!0}),Tt="h12x6aiv",Nt=h.forwardRef(({sdk:s,className:t},i)=>{const a=()=>{s.closeFeature()};return e.jsxs(Ye,{className:n.cx_default(t,Tt),children:[e.jsxs(bt,{children:[e.jsxs(At,{children:[e.jsx(St,{name:"dashboard"}),"Dashboard"]}),e.jsx(wt,{"data-a":"intr",onClick:a,children:e.jsx(kt,{name:"icon-cross"})})]}),e.jsx("div",{ref:i})]})}),Et=h.forwardRef(({sdk:s,className:t},i)=>{const a=n.useStore(s.sdkStore.organizationSettings),r=n.useStore(s.sdkStore.streamSettings),l=n.useStore(s.getActiveFeature()),d=h.useMemo(()=>{const c=(r==null?void 0:r.data)||(a==null?void 0:a.data);return c!=null&&c.overlays?c.overlays:[]},[a,r]),o=h.useMemo(()=>[...d.filter(({enableSdkButton:c,type:p})=>p===y.SdkOverlayType.GAMES||c).map(c=>({id:c.type,onClick:()=>s.openFeature(c.type),disabled:!(c.type in pt),label:c.name,icon:e.jsx("img",{src:c.icon,alt:""}),position:c.position*10}))].sort((c,p)=>c.position-p.position),[d,s]);return e.jsxs(Ye,{className:t,children:[o.length!==0&&e.jsx(Le,{children:[e.jsx(W,{id:"Channels",onClick:()=>s.closeFeature(),label:"Channels",active:l===0},"Channels"),...o.map(c=>c.id===y.SdkOverlayType.GAMES?e.jsx(W,{...c,active:c.id===l,label:"StreamLayer +",id:"featuredGroups",icon:e.jsx(jt,{name:"icon-btn-feature-groups","data-selected":c.id===l})},c.id):e.jsx(W,{...c,icon:void 0,active:c.id===l},c.id))]}),!o.length&&e.jsx(Le,{children:[e.jsx(W,{id:"empty",label:"No Features...",active:!1,disabled:!0},"empty")]}),e.jsx("div",{ref:i})]})}),Rt=n.styled_default("div")({name:"InsightContainer",class:"i1pqqgpo",propsAsIs:!1}),Vt=n.styled_default("img")({name:"Image",class:"igj7luu",propsAsIs:!1}),Ht=n.styled_default("div")({name:"ImageContainer",class:"i1qne9g6",propsAsIs:!1}),zt=n.styled_default("div")({name:"InsightContent",class:"itpr98r",propsAsIs:!1}),Mt=n.styled_default("h3")({name:"Title",class:"t17iaqp8",propsAsIs:!1}),Ot=n.styled_default("div")({name:"Description",class:"d16t3y7s",propsAsIs:!1}),Ft=n.styled_default("button")({name:"ActionBtn",class:"a12495er",propsAsIs:!1}),qt=({video:s,image:t,imageMode:i,heading:a,body:r,action:l,controlVideo:d})=>e.jsxs(Rt,{children:[(s==null?void 0:s.url)&&e.jsx(Pe.Et,{source:s.url,poster:s.thumbnailUrl,controlVideo:d}),t&&!(s!=null&&s.url)&&e.jsx(Ht,{"data-rounded":i===y.QuestionImages.ROUNDED,children:e.jsx(Vt,{src:t,alt:a})}),e.jsxs(zt,{children:[e.jsx(Mt,{children:a}),e.jsx(Ot,{children:r}),l&&e.jsx(Ft,{onClick:l,children:"View Insight"})]})]}),Bt=n.styled_default("div")({name:"Container",class:"c1eptrjd",propsAsIs:!1}),Dt=n.styled_default("div")({name:"CloseIconWrap",class:"crylm65",propsAsIs:!1}),Pt=()=>A.B1,Ut=n.styled_default(Pt())({name:"CloseIcon",class:"c9mrcz7",propsAsIs:!0}),Wt=n.styled_default("div")({name:"Header",class:"hw3lzv4",propsAsIs:!1}),Zt=()=>A.B1,Gt=n.styled_default(Zt())({name:"TypeIcon",class:"t1rrb3kf",propsAsIs:!0}),Qt=n.styled_default("span")({name:"TypeName",class:"t1ydnjov",propsAsIs:!1}),Kt=n.styled_default("div")({name:"Question",class:"qlf90cl",propsAsIs:!1}),Yt=n.styled_default("button")({name:"AnswerButton",class:"a1e0nhcl",propsAsIs:!1}),Jt=n.styled_default("div")({name:"Container",class:"c1t4f0x4",propsAsIs:!1}),Xt=n.styled_default("button")({name:"ActionBtn",class:"a16w1nl6",propsAsIs:!1}),e0=n.styled_default("div")({name:"QuoteWrap",class:"q14u54rf",propsAsIs:!1}),s0=n.styled_default("blockquote")({name:"Quote",class:"q1hxm6zo",propsAsIs:!1}),t0=({action:s,...t})=>e.jsxs(Jt,{children:[t.title&&e.jsx(e0,{children:e.jsx(s0,{children:t.title})}),e.jsx(E.b,{...t}),s&&e.jsx(Xt,{onClick:s,children:"View Insight"})]}),Se=({close:s,action:t,controlVideo:i,data:{questionType:a,question:r,insight:l,tweet:d}})=>{const o=E.e[a];return o?e.jsxs(Bt,{onClick:t,style:a===y.QuestionType.TWEET?{paddingTop:"12px"}:{},children:[e.jsx(Dt,{"data-a":"intr",onClick:c=>{c.stopPropagation(),s&&s(c)},children:e.jsx(Ut,{name:"icon-cross"})}),a!==y.QuestionType.TWEET&&e.jsxs(Wt,{children:[e.jsx(Gt,{"data-type-trivia":a===y.QuestionType.TRIVIA,"data-type-poll":a===y.QuestionType.POLL,name:o.iconName}),e.jsx(Qt,{children:o.label})]}),a===y.QuestionType.FACTOID&&l&&e.jsx(qt,{...l,action:t,controlVideo:i}),a===y.QuestionType.TWEET&&d&&e.jsx(t0,{...d,action:t,controlVideo:i}),a!==y.QuestionType.FACTOID&&a!==y.QuestionType.TWEET&&e.jsxs(e.Fragment,{children:[e.jsx(Kt,{children:r==null?void 0:r.title}),e.jsx(Yt,{children:"Answer"})]})]}):null},M=n.styled_default("div")({name:"BGWrap",class:"b1dqe0sz",propsAsIs:!1}),k=n.styled_default("div")({name:"BGLineBase",class:"b1v6w7ni",propsAsIs:!1}),n0=()=>k,i0=n.styled_default(n0())({name:"BGOneLineOne",class:"b2nqb1p",propsAsIs:!0}),a0=()=>k,r0=n.styled_default(a0())({name:"BGOneLineTwo",class:"b1xxgmbk",propsAsIs:!0}),l0=()=>k,o0=n.styled_default(l0())({name:"BGOneLineThree",class:"b63lwcb",propsAsIs:!0}),d0=()=>k,Te=n.styled_default(d0())({name:"BGTwoLineOne",class:"b2iah4",propsAsIs:!0}),c0=()=>k,Ne=n.styled_default(c0())({name:"BGTwoLineTwo",class:"b1xezvf6",propsAsIs:!0}),u0=()=>k,Ee=n.styled_default(u0())({name:"BGTwoLineThree",class:"b1jz1hg0",propsAsIs:!0}),p0=()=>k,Re=n.styled_default(p0())({name:"BGThreeLineOne",class:"b18ho1tk",propsAsIs:!0}),h0=()=>k,Ve=n.styled_default(h0())({name:"BGThreeLineTwo",class:"b14uvjfm",propsAsIs:!0}),m0=()=>k,He=n.styled_default(m0())({name:"BGThreeLineThree",class:"b11c3ns7",propsAsIs:!0}),f0=()=>k,ze=n.styled_default(f0())({name:"BGThreeLineFour",class:"b1bqhhet",propsAsIs:!0}),v0=()=>k,C0=n.styled_default(v0())({name:"BGFourLineOne",class:"b1xyzi7o",propsAsIs:!0}),g0=()=>k,y0=n.styled_default(g0())({name:"BGFourLineTwo",class:"byo0rup",propsAsIs:!0}),x0=()=>k,_0=n.styled_default(x0())({name:"BGFourLineThree",class:"b1oyiqgv",propsAsIs:!0}),I0=()=>k,j0=n.styled_default(I0())({name:"BGFourLineFour",class:"bx3ddqw",propsAsIs:!0}),b0=({step:s,correct:t})=>e.jsxs(e.Fragment,{children:[e.jsxs(M,{"data-active":s===1,"data-first-screen":"true",children:[e.jsx(i0,{}),e.jsx(r0,{}),e.jsx(o0,{})]}),e.jsxs(M,{"data-active":s===2,children:[e.jsx(Te,{}),e.jsx(Ne,{}),e.jsx(Ee,{})]}),e.jsxs(M,{"data-active":s===3,children:[e.jsx(Te,{}),e.jsx(Ne,{}),e.jsx(Ee,{})]}),t?e.jsxs(e.Fragment,{children:[e.jsxs(M,{"data-active":s===4,"data-correct":"true",children:[e.jsx(Re,{}),e.jsx(Ve,{}),e.jsx(He,{}),e.jsx(ze,{})]}),e.jsxs(M,{"data-active":s===5,"data-correct":"true",children:[e.jsx(Re,{}),e.jsx(Ve,{}),e.jsx(He,{}),e.jsx(ze,{})]})]}):e.jsxs(M,{"data-active":s===4,"data-correct":"false",children:[e.jsx(C0,{}),e.jsx(y0,{}),e.jsx(_0,{}),e.jsx(j0,{})]})]}),A0=118,w0=()=>$.f,$0=n.styled_default(w0())({name:"Container",class:"c10131zw",propsAsIs:!0}),k0=n.styled_default("div")({name:"InnerContainer",class:"ir6k2eo",propsAsIs:!1}),V=n.styled_default("div")({name:"Content",class:"c1hwoq9l",propsAsIs:!1}),D=n.styled_default("div")({name:"Title",class:"t4ujo4g",propsAsIs:!1}),L0=()=>D,S0=n.styled_default(L0())({name:"PointsTitle",class:"p1pjil1h",propsAsIs:!0}),Z=n.styled_default("div")({name:"Subtitle",class:"s1iorwr9",propsAsIs:!1}),Me=n.styled_default("div")({name:"SubtitleFG",class:"s51sv9d",propsAsIs:!1}),G=n.styled_default("div")({name:"AnswerText",class:"a1lbk2ye",propsAsIs:!1}),T0=()=>A.B1,Je=n.styled_default(T0())({name:"FeedbackIcon",class:"frcvk3t",propsAsIs:!0}),N0=()=>Je,Oe=n.styled_default(N0())({name:"FeedbackIconCorrect",class:"f33p82r",propsAsIs:!0}),E0=()=>Je,R0=n.styled_default(E0())({name:"FeedbackIconIncorrect",class:"f12r9net",propsAsIs:!0}),Fe=n.styled_default("div")({name:"CloseIconWrap",class:"c1fw6699",propsAsIs:!1}),V0=()=>A.B1,qe=n.styled_default(V0())({name:"CloseIcon",class:"c115o126",propsAsIs:!0}),H0="data:image/svg+xml,%3csvg%20width='154'%20height='37'%20viewBox='0%200%20154%2037'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M70.9776%2030.8796L74.668%2018.1381C75.0696%2016.7473%2076.1186%2015.6318%2077.4936%2015.1371L77.5928%2014.7217H72.466L63.7623%2024.9662L60.431%2014.7217H55.7389L55.6255%2015.1371C56.4288%2015.5291%2056.8683%2016.7052%2056.8683%2017.662V17.7227C56.8683%2023.1787%2052.781%2032.5598%2047.0352%2032.5598C44.8002%2032.5598%2043.6425%2031.0009%2043.6425%2029.7035C43.6425%2028.1306%2044.975%2027.0105%2046.3831%2027.0105C47.744%2027.0105%2047.9519%2027.5099%2048.741%2027.5099C49.2182%2027.5099%2049.6766%2027.2672%2049.9081%2026.8518C50.2672%2026.1984%2049.9931%2025.4049%2049.3363%2025.0922L48.9772%2024.9242C45.6271%2023.3327%2041.7383%2025.7457%2041.7383%2029.4188V29.4701C41.7383%2032.1444%2043.8646%2034.38%2046.5674%2034.4733C53.5417%2034.716%2058.2055%2025.4236%2058.9473%2018.6188L59.486%2020.4577L62.2313%2028.5927H63.2709L71.8518%2018.4741L68.2512%2030.8936C67.8401%2032.3171%2066.6966%2033.4232%2065.2412%2033.7966L65.142%2034.212H72.0408L72.1542%2033.7966C71.1383%2033.2039%2070.6516%2032.0044%2070.9776%2030.8796Z'%20fill='white'/%3e%3cpath%20d='M88.2952%2021.6521H88.2385C85.016%2021.6568%2081.5571%2021.9648%2079.7143%2027.1361C78.1692%2031.4813%2077.7487%2033.2828%2076.539%2033.2828C75.7641%2033.2828%2075.9531%2031.794%2074.7954%2031.794C74.2709%2031.794%2073.7275%2032.2094%2073.6897%2032.8068C73.6236%2033.8429%2075.0317%2034.4683%2076.0949%2034.4683C79.3316%2034.4683%2080.5696%2032.1347%2080.9759%2031.0472C81.0279%2030.9072%2081.3162%2030.1371%2081.6517%2029.2317H85.0538L84.4773%2031.3273C84.1749%2032.4334%2083.5464%2033.3388%2082.488%2033.8009L82.3982%2034.2163H87.9597L88.0637%2033.8009C87.3124%2033.1848%2086.9816%2032.2%2087.2273%2031.2853L89.3206%2023.4257C89.4812%2022.8236%2089.9018%2022.3242%2090.4783%2022.0628L90.568%2021.6475H88.7536H88.2952V21.6521ZM85.3231%2028.2189H82.0202C82.3935%2027.2108%2082.7526%2026.2493%2082.8755%2025.9366C83.7118%2023.757%2085.2995%2022.8749%2086.8399%2022.7536L86.8257%2022.7676L85.3231%2028.2189Z'%20fill='white'/%3e%3cpath%20d='M116.358%2022.5486C116.538%2022.2545%20116.708%2021.8112%20116.708%2021.5591C116.732%2021.0877%20116.297%2020.7237%20115.829%2020.8217C115.456%2020.9011%20115.187%2021.2324%20115.191%2021.6058C115.196%2021.9978%20115.12%2022.4226%20114.95%2022.6279C114.558%2023.104%20113.934%2023.062%20111.062%2022.2452V22.2405C110.797%2022.1659%20110.509%2022.0819%20110.206%2021.9978C110.187%2021.9932%20110.173%2021.9885%20110.159%2021.9838C108.723%2021.6011%20106.941%2021.2464%20105.774%2021.8205C105.765%2021.8252%20105.755%2021.8298%20105.746%2021.8345C104.602%2022.3992%20103.808%2023.4727%20103.567%2024.7142C103.53%2024.8962%20103.506%2025.0455%20103.501%2025.0969C103.468%2025.7456%20104.068%2026.2544%20104.711%2026.1143C105.235%2026.0023%20105.604%2025.5403%20105.59%2025.0129C105.58%2024.4808%20105.472%2023.7667%20105.765%2023.286C106.237%2022.6279%20106.729%2022.5812%20108.935%2023.3047L106.544%2031.323C106.214%2032.4291%20105.406%2033.3345%20104.338%2033.7966L104.238%2034.212H109.961L110.074%2033.7966C109.337%2033.1852%20109.03%2032.1957%20109.299%2031.2809L111.392%2024.0561C112.309%2024.2428%20113.24%2024.2941%20114.147%2024.0374L114.473%2023.9441C115.196%2023.7527%20115.943%2023.2347%20116.358%2022.5486Z'%20fill='white'/%3e%3cpath%20d='M118.649%2021.6523L118.536%2022.0677C119.245%2022.5531%20119.561%2023.4259%20119.335%2024.2427L117.208%2031.3228C116.877%2032.429%20116.069%2033.3344%20115.002%2033.7964L114.902%2034.2118H117.931H118.21H125.18L126.101%2030.8934H125.666L125.51%2031.2108C124.934%2032.3963%20123.72%2033.1524%20122.382%2033.1524H119.429L121.003%2027.5937H122.259C123.105%2027.5937%20123.743%2028.3545%20123.582%2029.1759H124.012L125.043%2025.4188H124.613C124.362%2026.1142%20123.696%2026.5763%20122.949%2026.5809H121.291L122.382%2022.7258L125.515%2022.7211C126.536%2022.7211%20127.301%2023.6452%20127.098%2024.6347H127.528L128.35%2021.6523H118.649Z'%20fill='white'/%3e%3cpath%20d='M138.251%2021.6582H131.333L131.22%2022.0736C131.881%2022.5263%20132.207%2023.3197%20132.056%2024.0898L129.892%2031.324C129.561%2032.4301%20128.753%2033.3356%20127.685%2033.7976L127.586%2034.213H133.303L133.417%2033.7976C132.68%2033.1862%20132.373%2032.2014%20132.637%2031.282L133.686%2027.5949H134.126C134.787%2027.5949%20135.34%2028.085%20135.416%2028.7337C135.439%2028.9437%20135.77%2031.506%20136.035%2032.3881C136.379%2033.5409%20136.833%2034.213%20137.868%2034.213H140.453L140.552%2033.7976L140.183%2033.5829C139.451%2033.1536%20138.922%2032.4908%20138.685%2031.6087C138.463%2030.7779%20138.043%2029.2284%20137.84%2028.4117C137.736%2027.9916%20137.202%2027.5996%20136.654%2027.5996H137.523C139.087%2027.5996%20140.457%2026.5681%20140.878%2025.0839C141.365%2023.3617%20140.056%2021.6582%20138.251%2021.6582ZM138.369%2024.6872C138.029%2025.812%20136.98%2026.5868%20135.789%2026.5868H133.974L135.071%2022.7317H136.89C137.925%2022.727%20138.662%2023.7118%20138.369%2024.6872Z'%20fill='white'/%3e%3cpath%20d='M100.265%2022.2961C100.081%2022.2961%2099.6794%2022.1701%2099.0651%2021.9181C98.4508%2021.6661%2097.8318%2021.54%2097.2034%2021.54C95.904%2021.54%2094.8219%2021.9554%2093.9336%2022.8422C93.1964%2023.5796%2092.8704%2024.401%2092.8704%2025.1105C92.8704%2025.8665%2093.3193%2026.7533%2094.2124%2027.4721C95.0582%2028.1488%2095.937%2028.8022%2096.8206%2029.465C97.7468%2030.1977%2098.2098%2030.8745%2098.2098%2031.4252C98.2098%2032.634%2097.416%2033.2828%2095.7669%2033.2828C94.0942%2033.2828%2092.9366%2032.074%2092.568%2029.8057H92.1144L90.8008%2034.2162H91.226C91.7694%2033.8382%2092.1569%2033.6001%2092.946%2033.6001C93.6973%2033.6001%2094.5006%2034.4729%2096.2158%2034.4729C97.5814%2034.4729%2098.6682%2034.1929%2099.5943%2033.2781C100.383%2032.4753%20100.776%2031.3552%20100.776%2030.4404C100.776%2029.591%20100.237%2028.6062%2099.2966%2027.8921C98.4886%2027.2807%2097.6286%2026.7347%2096.7923%2026.1419C95.8898%2025.4792%2095.4362%2024.9144%2095.4362%2024.2937C95.4362%2023.9483%2095.611%2023.6076%2095.9559%2023.2622C96.3954%2022.8282%2096.986%2022.7302%2097.7751%2022.7302C99.3581%2022.7302%20100.464%2023.5983%20100.558%2025.4325H100.974L102.08%2021.5447H101.664C101.215%2022.0441%20100.752%2022.2961%20100.265%2022.2961Z'%20fill='white'/%3e%3cpath%20d='M149.201%2022.7304C150.784%2022.7304%20151.89%2023.6032%20151.984%2025.4327H152.4L153.501%2021.5449H153.085C152.646%2022.049%20152.182%2022.301%20151.696%2022.301C151.512%2022.301%20151.11%2022.175%20150.496%2021.923C149.881%2021.6709%20149.262%2021.5449%20148.634%2021.5449C147.334%2021.5449%20146.252%2021.9603%20145.364%2022.8471C144.627%2023.5845%20144.296%2024.4059%20144.296%2025.1153C144.296%2025.8714%20144.745%2026.7582%20145.638%2027.477C146.484%2028.1537%20147.363%2028.8071%20148.246%2029.4699C149.173%2030.2026%20149.636%2030.8794%20149.636%2031.4301C149.636%2032.6389%20148.842%2033.2876%20147.193%2033.2876C145.52%2033.2876%20144.362%2032.0788%20143.994%2029.8106H143.54L142.227%2034.2211H142.642C143.186%2033.843%20143.573%2033.605%20144.358%2033.605C145.109%2033.605%20145.912%2034.4778%20147.627%2034.4778C148.993%2034.4778%20150.075%2034.1978%20151.006%2033.283C151.795%2032.4802%20152.187%2031.3601%20152.187%2030.4453C152.187%2029.6005%20151.649%2028.6111%20150.708%2027.897C149.9%2027.2856%20149.04%2026.7395%20148.204%2026.1468C147.301%2025.4841%20146.848%2024.9193%20146.848%2024.2986C146.848%2023.9532%20147.023%2023.6125%20147.368%2023.2671C147.826%2022.8237%20148.412%2022.7304%20149.201%2022.7304Z'%20fill='white'/%3e%3cpath%20d='M26.5433%202.60035C26.0377%202.44633%2025.5321%202.72169%2025.0265%203.00173C24.8469%203.09974%2024.7194%203.27243%2024.6768%203.46845L23.883%207.13222C23.8547%207.26757%2023.9775%207.38891%2024.1145%207.36091C24.9509%207.17422%2025.7447%206.4508%2026.5811%206.70283C27.5167%206.98753%2028.4522%205.81606%2029.3878%205.83006V1.60156C28.4475%201.60623%2027.4789%202.88505%2026.5433%202.60035Z'%20fill='white'/%3e%3cpath%20d='M38.4856%2013.8398C38.2871%2013.7044%2038.1643%2013.4851%2038.1643%2013.2471V12.5796C38.1643%2011.9822%2037.6729%2011.4922%2037.0633%2011.4922H36.6239C36.0994%2011.4922%2035.6174%2011.7536%2035.3339%2012.1876L33.9164%2014.3485C33.7746%2014.5632%2033.5383%2014.6892%2033.2832%2014.6892H32.3287C31.8562%2014.6892%2031.4215%2014.9459%2031.1947%2015.3566C30.9631%2015.7814%2030.552%2016.0754%2030.0843%2016.1734V1.1403C30.0843%200.94894%2029.9283%200.794922%2029.7346%200.794922C29.5409%200.794922%2029.3849%200.94894%2029.3849%201.1403V1.60702V5.83552V16.1827C28.9171%2016.0847%2028.506%2015.7907%2028.2745%2015.3613C28.0524%2014.9506%2027.6177%2014.6939%2027.1405%2014.6939H26.4979C25.9875%2014.6939%2025.5292%2014.9879%2025.3213%2015.45L24.7873%2016.6308C24.7023%2016.8175%2024.5133%2016.9388%2024.3054%2016.9388C24.0975%2016.9388%2023.9085%2016.8175%2023.8234%2016.6308L23.2895%2015.45C23.0816%2014.9926%2022.6232%2014.6939%2022.1129%2014.6939H4.00135C3.85487%2014.6939%203.73674%2014.8106%203.73674%2014.9553C3.73674%2015.2633%203.48158%2015.5107%203.17444%2015.5107H2.39007C2.24359%2015.5107%202.12546%2015.6273%202.12546%2015.772V16.6728C2.12546%2017.5176%201.96008%2018.339%201.62931%2019.1184L1.15207%2020.2526C0.707907%2021.3027%200.5%2022.3901%200.5%2023.4589V26.0726C0.5%2026.7773%200.603954%2027.4914%200.811861%2028.1868C1.39306%2030.1377%202.7161%2031.7339%204.53529%2032.6767L7.43182%2034.1842C7.46962%2034.2029%207.51214%2034.2122%207.55467%2034.2122L9.69517%2034.2309C10.196%2034.2355%2010.6875%2034.3616%2011.1269%2034.6043L12.2751%2035.239C12.3129%2035.2623%2012.3602%2035.2717%2012.4074%2035.2717H13.9431C14.4818%2035.2717%2015.0157%2035.4163%2015.474%2035.6917C15.474%2035.6917%2016.2253%2036.1444%2016.4805%2036.2891C16.8869%2036.5225%2017.3783%2036.7465%2018.2335%2036.7932C18.4273%2036.8025%2018.621%2036.7325%2018.7675%2036.5972C18.9092%2036.4618%2018.9943%2036.2704%2018.9943%2036.0791V35.0616C18.9943%2034.3242%2019.4337%2033.6521%2020.1189%2033.3581L22.4673%2032.3406C22.7886%2032.2006%2023.1477%2032.1773%2023.4832%2032.28L24.3621%2032.5367C24.7354%2032.644%2025.1323%2032.6487%2025.5056%2032.5367L27.5846%2031.9253C27.8587%2031.8459%2028.1517%2031.8459%2028.4304%2031.9299L29.2763%2032.1633C29.6684%2032.2706%2029.9472%2032.6347%2029.9472%2033.0361V35.071C29.9472%2036.0184%2030.7269%2036.7932%2031.6861%2036.7932C32.4043%2036.7932%2033.0328%2036.3405%2033.2501%2035.6637C33.6423%2034.4456%2033.8408%2033.1761%2033.8408%2031.8973V31.0292C33.8408%2030.4131%2034.1006%2029.8204%2034.5543%2029.3956L35.419%2028.5882C36.0002%2028.0421%2036.3356%2027.2674%2036.3356%2026.474V21.6481C36.3356%2020.9013%2036.5625%2020.1779%2036.9972%2019.5618C37.0302%2019.5198%2037.0444%2019.4638%2037.0444%2019.4125V18.2737C37.0444%2017.5316%2037.2712%2016.8128%2037.6965%2016.2014L38.5517%2014.9739C38.5848%2014.9319%2038.599%2014.8806%2038.599%2014.8246V14.0545C38.6037%2013.9098%2038.5139%2013.8585%2038.4856%2013.8398ZM30.0843%2025.2838C30.6654%2025.3725%2031.1002%2025.6665%2031.1002%2026.0212C31.1002%2026.3759%2030.6702%2026.67%2030.0843%2026.7587V25.2838ZM5.22516%2032.4433L4.78572%2032.2146C3.59026%2031.5939%202.63577%2030.6698%201.9837%2029.545V28.1355C2.73028%2029.2043%203.74619%2030.1144%204.98891%2030.7631L5.22516%2030.8845V32.4433ZM7.43654%2033.5961L6.2647%2032.9894V31.4305L7.43182%2032.0373H7.43654V33.5961ZM12.3129%2034.6556L11.3868%2034.1422C10.8812%2033.8622%2010.3142%2033.7128%209.73297%2033.7035V32.0793C10.2197%2032.0886%2010.7016%2032.2146%2011.1269%2032.448L12.2751%2033.0827C12.2846%2033.0874%2012.2987%2033.0874%2012.3129%2033.0921V34.6556ZM18.4603%2035.0616V35.8551V36.0791C18.4603%2036.1304%2018.4367%2036.1818%2018.3989%2036.2191C18.3611%2036.2564%2018.3139%2036.2705%2018.2619%2036.2705C17.52%2036.2331%2017.0948%2036.0418%2016.7498%2035.8411C16.4994%2035.6964%2015.7528%2035.2483%2015.7481%2035.2483C15.2803%2034.9683%2014.7511%2034.8143%2014.2077%2034.7723V33.1387C14.6519%2033.1808%2015.0866%2033.3114%2015.474%2033.5401L16.1214%2033.9228C16.8302%2034.3429%2017.6382%2034.5809%2018.4603%2034.6276V35.0616ZM24.8582%2032.0886C24.7448%2032.084%2024.6267%2032.0653%2024.5133%2032.0326L23.6344%2031.7713C23.4454%2031.7152%2023.2517%2031.6966%2023.0579%2031.6966V30.0677C23.1997%2030.0677%2023.3414%2030.0817%2023.4832%2030.1237L24.3621%2030.3804C24.5227%2030.4271%2024.6928%2030.4504%2024.8582%2030.4598V32.0886ZM30.363%2032.4807C30.1929%2032.0886%2029.8574%2031.7759%2029.4275%2031.6592L28.5864%2031.4259C28.3879%2031.3652%2028.18%2031.3419%2027.9721%2031.3419V29.7177C28.1328%2029.713%2028.2934%2029.7317%2028.4493%2029.783L29.1392%2029.9977C29.8716%2030.2264%2030.363%2030.8891%2030.363%2031.6452V32.4807ZM32.787%2035.365C32.7729%2035.4117%2032.7634%2035.4584%2032.7492%2035.505C32.6028%2035.9624%2032.1775%2036.2658%2031.6955%2036.2658C31.653%2036.2658%2031.6105%2036.2564%2031.568%2036.2518V34.6323C31.601%2034.6369%2031.6294%2034.6416%2031.6625%2034.6416C32.135%2034.6416%2032.565%2034.3802%2032.7918%2033.9835V35.365H32.787ZM37.3232%2015.0486C36.794%2015.8047%2036.5152%2016.6915%2036.5152%2017.6109V18.4137L36.1041%2019.0017C35.5702%2019.7625%2035.2867%2020.6539%2035.2867%2021.578V25.6245C35.2867%2026.2779%2035.0126%2026.9173%2034.5306%2027.3654L33.6659%2028.1775C33.0847%2028.7236%2032.7634%2029.489%2032.787%2030.2824L32.7918%2030.4644C32.8248%2031.5146%2032.6878%2032.56%2032.3901%2033.5681C32.2956%2033.8902%2031.9932%2034.1142%2031.6577%2034.1142C31.2372%2034.1142%2030.8923%2033.7782%2030.8923%2033.3581V31.6452C30.8923%2030.6558%2030.2496%2029.7923%2029.2952%2029.4983L28.6053%2029.2836C28.2225%2029.1669%2027.8209%2029.1623%2027.4334%2029.2743L25.3544%2029.881C25.0803%2029.9604%2024.7873%2029.9604%2024.5133%2029.881L23.6344%2029.6243C23.1808%2029.489%2022.6894%2029.5217%2022.2547%2029.7083L20.4071%2030.5111C19.2258%2031.0245%2018.4651%2032.1773%2018.4651%2033.4515V34.1095C17.7374%2034.0675%2017.0286%2033.8528%2016.4002%2033.4795L15.7528%2033.0967C15.2047%2032.7747%2014.581%2032.602%2013.9431%2032.602H12.4736L11.3868%2031.9999C10.8717%2031.7152%2010.2905%2031.5659%209.69989%2031.5612L7.62082%2031.5472L5.23461%2030.3057C1.61514%2028.4249%200.0700101%2024.1917%201.64349%2020.4579L2.12073%2019.3238C2.47512%2018.4837%202.6594%2017.5922%202.6594%2016.6775V16.0427H3.17444C3.68476%2016.0427%204.11948%2015.6927%204.2376%2015.2213H22.1176C22.4153%2015.2213%2022.6894%2015.394%2022.8075%2015.6647L23.3414%2016.8455C23.5115%2017.2235%2023.8896%2017.4662%2024.3101%2017.4662C24.7259%2017.4662%2025.1087%2017.2235%2025.2788%2016.8455L25.8127%2015.66C25.9356%2015.3893%2026.2049%2015.2166%2026.5026%2015.2166H27.1452C27.424%2015.2166%2027.6791%2015.366%2027.8114%2015.6087C28.1375%2016.2061%2028.7234%2016.6075%2029.3897%2016.7148V24.145C28.317%2024.2617%2027.4949%2024.8918%2027.4949%2025.6572C27.4949%2026.5066%2028.4966%2027.1927%2029.7346%2027.1927C30.9726%2027.1927%2031.9743%2026.5066%2031.9743%2025.6572C31.9743%2024.8918%2031.1521%2024.257%2030.0795%2024.145V16.7101C30.7458%2016.6028%2031.3317%2016.2014%2031.6577%2015.604C31.79%2015.3613%2032.0452%2015.212%2032.324%2015.212H33.2785C33.7179%2015.212%2034.1195%2014.9926%2034.3605%2014.6286L35.7781%2012.4676C35.9624%2012.1829%2036.2789%2012.0149%2036.6239%2012.0149H37.0633C37.3752%2012.0149%2037.6303%2012.2669%2037.6303%2012.575V13.2424C37.6303%2013.5644%2037.7579%2013.8725%2037.98%2014.1012L37.3232%2015.0486ZM29.3849%2025.2838V26.7587C28.8037%2026.67%2028.3737%2026.3759%2028.3737%2026.0212C28.3737%2025.6665%2028.8037%2025.3678%2029.3849%2025.2838Z'%20fill='white'/%3e%3c/svg%3e",z0="data:image/svg+xml,%3csvg%20width='159'%20height='28'%20viewBox='0%200%20159%2028'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_6919_71839)'%3e%3cpath%20d='M4.13243%2025.9198C5.34921%2026.9052%207.05161%2027.0267%208.39597%2026.224L22.9838%2017.5138C25.4013%2016.0703%2025.4117%2012.5721%2023.0028%2011.1144L17.4686%207.76522C15.4767%206.55981%2012.8918%207.10053%2011.5501%209.00325L3.27399%2020.7399C2.14132%2022.3462%202.44805%2024.5556%203.97544%2025.7926L4.13243%2025.9198Z'%20stroke='white'%20style='stroke:white;stroke-opacity:1;'%20stroke-width='2.33333'/%3e%3cpath%20d='M4.11673%202.57147C5.33939%201.58127%207.0516%201.46387%208.39797%202.27791L22.9843%2011.0971C25.3835%2012.5477%2025.3874%2016.0265%2022.9914%2017.4824L17.5405%2020.7946C15.5485%2022.005%2012.9594%2021.4661%2011.6157%2019.5615L3.27518%207.7386C2.142%206.1323%202.44856%203.92248%203.97619%202.68529L4.11673%202.57147Z'%20stroke='white'%20style='stroke:white;stroke-opacity:1;'%20stroke-width='2.33333'/%3e%3cpath%20d='M49.8088%2020.0063C47.924%2020.0063%2046.7521%2018.7437%2046.7521%2016.6748V13.1359H50.1977V10.9296H46.7521V7.34668L44.2736%209.18483V10.9271H42.8892V13.1333H44.2736V16.6515C44.2736%2020.2137%2046.3632%2022.4174%2049.8321%2022.4174H50.361V20.0063H49.8088Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M30.4704%2019.5631L32.6818%2017.8339C33.6722%2019.4231%2035.01%2020.2761%2036.7159%2020.2761C38.5826%2020.2761%2039.757%2019.0783%2039.757%2017.5798C39.757%2015.8505%2037.9137%2015.2983%2035.977%2014.6761C33.6956%2013.9398%2031.23%2013.0168%2031.23%209.92907C31.23%207.37018%2033.5115%205.34277%2036.6226%205.34277C39.1815%205.34277%2040.7707%206.33314%2042.0618%207.83166L40.0111%209.35351C39.2515%208.17907%2038.1211%207.55685%2036.6226%207.55685C34.9167%207.55685%2033.8096%208.57055%2033.8096%209.88499C33.8096%2011.4976%2035.5856%2012.0291%2037.5196%2012.6746C39.8244%2013.4576%2042.3367%2014.4506%2042.3367%2017.585C42.3367%2020.1672%2040.2159%2022.6328%2036.7367%2022.6328C33.8563%2022.6328%2031.8963%2021.4117%2030.4678%2019.5683L30.4704%2019.5631Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M58.9189%2016.7007C58.9189%2013.3225%2061.5141%2010.6807%2064.8923%2010.6807C68.2704%2010.6807%2070.7982%2013.1384%2070.7982%2016.5399V17.5044H61.286C61.6075%2019.2725%2062.9867%2020.4444%2064.9856%2020.4444C66.5489%2020.4444%2067.7441%2019.6173%2068.3404%2018.3755L70.3627%2019.5007C69.3515%2021.3855%2067.5367%2022.6247%2064.9856%2022.6247C61.356%2022.6247%2058.9189%2020.0296%2058.9189%2016.6981V16.7007ZM61.4001%2015.4147H68.2938C67.9256%2013.7607%2066.663%2012.8403%2064.8923%2012.8403C63.1215%2012.8403%2061.8589%2013.8981%2061.4001%2015.4147Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M51.8955%2016.6752C51.8955%2013.113%2053.9851%2010.9326%2057.454%2010.9326H58.5559V13.323H57.4307C55.5459%2013.323%2054.33%2014.6322%2054.3533%2016.7011V22.423H51.8955V16.6804V16.6752Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M72.0138%2016.6774C72.0138%2013.3226%2074.6557%2010.7041%2077.9638%2010.7041C81.272%2010.7041%2083.8672%2013.3226%2083.8672%2016.6774V22.42H81.456V20.9267C80.6523%2022.0052%2079.4105%2022.6274%2077.8938%2022.6274C74.609%2022.6274%2072.0112%2020.0556%2072.0112%2016.6774H72.0138ZM81.5027%2016.6774C81.5027%2014.6319%2079.9394%2013.0011%2077.9638%2013.0011C75.9883%2013.0011%2074.4249%2014.6319%2074.4249%2016.6774C74.4249%2018.723%2075.9649%2020.3537%2077.9638%2020.3537C79.9627%2020.3537%2081.5027%2018.6997%2081.5027%2016.6774Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M85.4155%2015.978C85.4155%2012.9214%2087.5052%2010.6943%2090.6085%2010.6943C92.3766%2010.6943%2093.8026%2011.4073%2094.697%2012.6025C95.5474%2011.4073%2096.9266%2010.6943%2098.6948%2010.6943C101.819%2010.6943%20104.002%2012.8773%20104.002%2015.978V22.4103H101.544V16.0014C101.544%2014.2566%20100.372%2013.038%2098.6948%2013.038C97.0174%2013.038%2095.9155%2014.2799%2095.9389%2015.934V22.4129H93.4811V16.004C93.4811%2014.2592%2092.2859%2013.0406%2090.6085%2013.0406C88.9311%2013.0406%2087.8526%2014.2825%2087.8733%2015.9366V22.4154H85.4155V15.9832V15.978Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M105.578%205.6416H108.082V20.0227H114.859V22.4131H105.578V5.6416Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M138.483%2016.7007C138.483%2013.3225%20141.078%2010.6807%20144.456%2010.6807C147.834%2010.6807%20150.362%2013.1384%20150.362%2016.5399V17.5044H140.85C141.171%2019.2725%20142.551%2020.4444%20144.55%2020.4444C146.113%2020.4444%20147.308%2019.6173%20147.904%2018.3755L149.927%2019.5007C148.916%2021.3855%20147.101%2022.6247%20144.55%2022.6247C140.92%2022.6247%20138.483%2020.0296%20138.483%2016.6981V16.7007ZM140.964%2015.4147H147.858C147.49%2013.7607%20146.227%2012.8403%20144.456%2012.8403C142.685%2012.8403%20141.423%2013.8981%20140.964%2015.4147Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M115.269%2016.6774C115.269%2013.3226%20117.911%2010.7041%20121.219%2010.7041C124.527%2010.7041%20127.122%2013.3226%20127.122%2016.6774V22.42H124.711V20.9267C123.907%2022.0052%20122.665%2022.6274%20121.149%2022.6274C117.864%2022.6274%20115.266%2020.0556%20115.266%2016.6774H115.269ZM124.758%2016.6774C124.758%2014.6319%20123.194%2013.0011%20121.219%2013.0011C119.243%2013.0011%20117.68%2014.6319%20117.68%2016.6774C117.68%2018.723%20119.22%2020.3537%20121.219%2020.3537C123.218%2020.3537%20124.758%2018.6997%20124.758%2016.6774Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M131.67%2021.8547L126.915%2010.9658H129.557L132.912%2018.938L136.082%2010.9658H138.678L131.74%2027.7606H129.212L131.67%2021.8573V21.8547Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M151.897%2016.6674C151.897%2013.1052%20153.987%2010.9248%20157.455%2010.9248H158.557V13.3152H157.432C155.547%2013.3152%20154.331%2014.6244%20154.355%2016.6933V22.4152H151.897V16.6726V16.6674Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_6919_71839'%3e%3crect%20width='158.12'%20height='28'%20fill='white'%20style='fill:white;fill-opacity:1;'%20transform='translate(0.44043)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",M0=(s,t,i)=>s===t?"translateY(0px)":s>t?`translateY(${i}px)`:"translateY(-100%)",O0=({close:s,votedAnswer:t,mastersApp:i,correct:a,correctAnswerTitle:r,questionTitle:l,saveHeight:d,style:o,hiding:c})=>{const[p,f]=h.useState(1),m=h.useRef({});h.useEffect(()=>{const x=setInterval(()=>{f(C=>a&&C>4||!a&&C>3?C:++C)},3e3);return()=>clearInterval(x)},[a]),h.useEffect(()=>{var x,C;m.current[p]&&d(((C=(x=m.current[p])==null?void 0:x.getBoundingClientRect())==null?void 0:C.height)||A0)},[p,d]);const u=x=>C=>{m.current&&(m.current[x]=C)},v=x=>({transform:M0(x,p,o.height)}),g={...o};return i&&g.height&&typeof g.height=="number"&&(g.height+=32),e.jsx($0,{style:o.height?g:{...o,paddingTop:0,paddingBottom:0},hiding:c,children:e.jsxs(k0,{style:{height:o.height,minHeight:o.height,backgroundColor:p>3?a?"var(--color-sdk-prediction-result-success-bg)":"var(--color-sdk-prediction-result-incorrect-bg)":"var(--color-primary-1)"},children:[e.jsx(b0,{step:p,correct:a}),i&&e.jsxs(V,{ref:u(1),style:v(1),children:[e.jsx("img",{alt:"sponsor-logo",src:H0}),e.jsx(Me,{children:"Featured Groups +"})]}),!i&&e.jsx(V,{ref:u(1),style:v(1),children:e.jsx("img",{alt:"sponsor-logo",src:z0})}),e.jsxs(V,{ref:u(2),style:v(2),children:[e.jsx(D,{children:"Prediction results are in!"}),i&&e.jsx(Me,{children:"Featured Groups +"})]}),e.jsxs(V,{ref:u(3),style:v(3),children:[e.jsx(D,{children:l}),e.jsx(Z,{children:e.jsxs(G,{children:[e.jsx("span",{children:"Your Pick:"})," ",t==null?void 0:t.title]})})]}),a?e.jsxs(e.Fragment,{children:[e.jsxs(V,{ref:u(4),style:{...v(4),color:"var(--color-sdk-prediction-result-success-text)"},children:[e.jsxs(D,{children:["Congratulations!",e.jsx("br",{}),"You answered correctly."]}),e.jsxs(Z,{children:[e.jsx(Oe,{name:"selected"}),e.jsxs(G,{children:[e.jsx("span",{children:"Your Pick:"})," ",t==null?void 0:t.title]})]})]}),e.jsxs(V,{ref:u(5),style:{...v(5),color:"var(--color-sdk-prediction-result-success-text)"},children:[e.jsx(S0,{children:p===5&&e.jsx(o2.d,{delay:.5,prefix:"+",suffix:" points",value:t==null?void 0:t.points})}),e.jsxs(Z,{children:[e.jsx(Oe,{name:"selected"}),e.jsxs(G,{children:[e.jsx("span",{children:"Your Pick:"})," ",t==null?void 0:t.title]})]}),e.jsx(Fe,{"data-a":"intr",onClick:s,children:e.jsx(qe,{name:"icon-cross"})})]})]}):e.jsxs(V,{ref:u(4),style:v(4),children:[e.jsxs(D,{style:{color:"var(--color-sdk-prediction-result-error-title)"},children:["Better luck next time!",e.jsx("br",{}),"Correct: ",r,"."]}),e.jsxs(Z,{style:{color:"var(--color-sdk-prediction-result-error-subtitle)"},children:[e.jsx(R0,{name:"circleClose"}),e.jsxs(G,{children:[e.jsx("span",{children:"Your Pick:"})," ",t==null?void 0:t.title]})]}),e.jsx(Fe,{"data-a":"intr",onClick:s,children:e.jsx(qe,{name:"icon-cross"})})]})]})})},F0=s=>{const[t,i]=h.useState(!1),[a,r]=h.useState(!1),l=h.useRef(null),d=h.useCallback(()=>{r(!0),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{r(!1)},1e3)},[]),o=h.useCallback(async c=>{i(!0);const p=c.map(f=>new Promise((m,u)=>{const v=new Image;v.onload=()=>m(f),v.onerror=()=>u(),v.src=f}));await Promise.allSettled(p),i(!1)},[]);return h.useEffect(()=>{s&&(d(),o(s))},[s,d,o]),{loading:t,throttled:a}},q0=n.styled_default("div")({name:"Container",class:"cl51m2q",propsAsIs:!1}),B0=n.styled_default("img")({name:"Avatar",class:"a2yhhhr",propsAsIs:!1}),D0=n.styled_default("div")({name:"AvatarPlaceholder",class:"a1dtxxlr",propsAsIs:!1}),P0=n.styled_default("div")({name:"Content",class:"c12clm3w",propsAsIs:!1}),U0=n.styled_default("span")({name:"Name",class:"n14lctn7",propsAsIs:!1}),W0=({avatar:s,name:t})=>e.jsxs(q0,{children:[s&&e.jsx(B0,{src:s}),!s&&e.jsx(D0,{children:E.I(t||"")}),e.jsxs(P0,{children:[e.jsxs(U0,{children:[t," "]}),"is waiting for you!"]})]}),Z0=n.styled_default("div")({name:"Container",class:"c1htq1lb",propsAsIs:!1}),G0=n.styled_default("div")({name:"Graphic",class:"gjyzpp7",propsAsIs:!1}),Q0=n.styled_default("img")({name:"GraphicImage",class:"g16mldgz",propsAsIs:!1}),K0=n.styled_default("div")({name:"Headline",class:"h69js65",propsAsIs:!1}),Y0=n.styled_default("div")({name:"TaglineContainer",class:"tmm7qmo",propsAsIs:!1}),J0=n.styled_default("div")({name:"Tagline",class:"t17knuw2",propsAsIs:!1}),X0=n.styled_default("div")({name:"Content",class:"c1b74psg",propsAsIs:!1}),en=n.styled_default("div")({name:"StepsContainer",class:"s1y99ug7",propsAsIs:!1}),sn=n.styled_default("span")({name:"StepIndicator",class:"sgf3v5n",propsAsIs:!1}),tn=n.styled_default("div")({name:"InvitingUserWrap",class:"i1sj6gn8",propsAsIs:!1}),nn=({loading:s,steps:t,currentStep:i,inviterName:a})=>{const{headline:r,tagline:l}=t[i];return e.jsxs(Z0,{children:[l&&e.jsx(Y0,{children:e.jsx(R.i,{loading:s,children:e.jsx(J0,{children:l})})}),e.jsxs(X0,{"data-welcome-screen":i===0,children:[e.jsx(G0,{children:e.jsx(R.i,{loading:s,children:t.map(({graphicSrc:d},o)=>e.jsx(Q0,{src:d,"data-active":i===o}))})}),r&&e.jsx(R.i,{loading:s,children:e.jsx(K0,{children:r})})]}),a&&i===0&&e.jsx(tn,{children:e.jsx(W0,{name:a})}),e.jsx(en,{style:s?{visibility:"hidden"}:{},children:Array.from({length:t.length}).map((d,o)=>e.jsx(sn,{"data-active":i===o},o))})]})},an=n.styled_default("div")({name:"Container",class:"cm0bev",propsAsIs:!1}),rn=n.styled_default("div")({name:"Content",class:"ce7x737",propsAsIs:!1}),ln=n.styled_default("div")({name:"Title",class:"tc2tor6",propsAsIs:!1}),on=n.styled_default("div")({name:"RulesList",class:"r1k5klql",propsAsIs:!1}),dn=n.styled_default("div")({name:"RulesItem",class:"r1tf3ft2",propsAsIs:!1}),cn=n.styled_default("div")({name:"RuleIcon",class:"rwpvg1k",propsAsIs:!1}),un=n.styled_default("div")({name:"RuleText",class:"rbxiag0",propsAsIs:!1}),pn=n.styled_default("button")({name:"TermsButton",class:"t6cyrry",propsAsIs:!1}),hn=({rules:s,rulesTitle:t,termsText:i,primaryColor:a,openTerms:r})=>e.jsxs(an,{children:[e.jsxs(rn,{children:[e.jsx(ln,{children:t}),e.jsx(on,{children:s==null?void 0:s.map(({label:l,icon:d},o)=>e.jsxs(dn,{children:[d&&e.jsx(cn,{style:{backgroundColor:a},children:e.jsx(A.B1,{name:d,"data-icon":d})}),e.jsx(un,{children:l})]},o))})]}),i&&e.jsx(pn,{"data-a":"intr",onClick:r,children:"See Terms and Conditions"})]}),mn=n.styled_default("div")({name:"Container",class:"cj0g35h",propsAsIs:!1}),fn=n.styled_default("div")({name:"Content",class:"c1xkhrbn",propsAsIs:!1}),vn=n.styled_default("div")({name:"Title",class:"tifzb8b",propsAsIs:!1}),Cn=n.styled_default("div")({name:"ScrollingText",class:"stduw5c",propsAsIs:!1}),gn=({termsTitle:s,termsText:t})=>e.jsx(mn,{children:e.jsxs(fn,{children:[e.jsx(vn,{children:s}),e.jsx(Cn,{children:t})]})}),yn=n.styled_default("button")({name:"SButton",class:"s1nve60q",propsAsIs:!1}),xn=n.styled_default("span")({name:"ButtonLabel",class:"b1xoswwx",propsAsIs:!1}),_n=({disabled:s,variant:t="primary",onClick:i,children:a,...r})=>e.jsx(yn,{"data-a":"intr",onClick:i,disabled:s,"data-variant":t,...r,children:e.jsx(xn,{children:a})}),In=n.styled_default("div")({name:"Container",class:"c18uddbs",propsAsIs:!1}),jn=n.styled_default("div")({name:"Content",class:"cvcfjf6",propsAsIs:!1}),bn=n.styled_default("div")({name:"OnboardingHeader",class:"o1ie27lw",propsAsIs:!1}),An=n.styled_default("button")({name:"CloseBtn",class:"c15cjkwi",propsAsIs:!1}),wn=()=>A.B1,$n=n.styled_default(wn())({name:"IconClose",class:"i1mavjt2",propsAsIs:!0}),kn=n.styled_default("div")({name:"OnboardingFooter",class:"o1x0dyzv",propsAsIs:!1}),Ln=()=>_n,Sn=n.styled_default(Ln())({name:"OnboardingActionBtn",class:"o1jfi9c3",propsAsIs:!0}),O={steps:!1,rules:!1,inviteCard:!1},Tn=({gamification:s,steps:t,rules:i,rulesBtnLabel:a,rulesTitle:r,termsTitle:l,termsText:d,primaryColor:o,inviteLink:c,inviteCardTitle:p,inviteCardSubtext:f,inviteCardBtnLabel:m,loading:u,inviterName:v,sdk:g,onClose:x})=>{const[C,I]=h.useState(0),[_,b]=h.useState(!1),[j,L]=h.useState(O);h.useEffect(()=>{t!=null&&t.length?L({...O,steps:!0}):i!=null&&i.length?L({...O,rules:!0}):L({...O,inviteCard:!0})},[]);const e2=h.useMemo(()=>j.steps&&C===0?"Continue":j.rules?_||!a?"Got it":a:j.inviteCard?m||"Play Now":"Next",[j,C,_,a,m]),s2=h.useCallback(()=>{t!=null&&t.length&&C<t.length-1?I(Y=>++Y):i!=null&&i.length&&j.steps?L({...O,rules:!0}):j.rules&&L({...O,inviteCard:!0})},[C,t==null?void 0:t.length,i==null?void 0:i.length,j,I,L]),t2=async()=>{j.inviteCard?await s.onboardingStatus.submitInplay():j.rules&&_?b(!1):s2()};return h.useEffect(()=>{!u&&v&&g.inviteDisplayed()},[u,v,g]),e.jsx(as,{children:({width:Y,height:re})=>e.jsxs(In,{style:{width:Y,height:re,maxHeight:re},children:[e.jsx(bn,{children:e.jsx(An,{"data-a":"intr",onClick:x,children:e.jsx($n,{name:"icon-close-btn-gray"})})}),e.jsxs(jn,{children:[j.steps&&(t==null?void 0:t.length)&&e.jsx(nn,{loading:u,steps:t,currentStep:C,inviterName:v}),j.rules&&!_&&e.jsx(hn,{rules:i,rulesTitle:r,termsText:d,primaryColor:o,openTerms:()=>b(!0)}),j.rules&&_&&e.jsx(gn,{termsTitle:l,termsText:d}),j.inviteCard&&e.jsx(Ke,{inviteLink:c,inviteCardTitle:p,inviteCardSubtext:f,primaryColor:o})]}),e.jsx(kn,{children:e.jsx(R.i,{loading:u,style:{width:"100%"},children:e.jsx(Sn,{"data-a":"intr",onClick:t2,children:e2})})})]})})},Nn=n.styled_default("div")({name:"Container",class:"c1qjj4d4",propsAsIs:!1}),En=n.styled_default("div")({name:"CloseIconWrap",class:"c1lg6b8a",propsAsIs:!1}),Rn=()=>A.B1,Vn=n.styled_default(Rn())({name:"CloseIcon",class:"c159el66",propsAsIs:!0}),Hn=n.styled_default("div")({name:"Title",class:"t16xmufv",propsAsIs:!1}),zn=n.styled_default("img")({name:"SponsorLogo",class:"s83lc21",propsAsIs:!1}),Mn=n.styled_default("div")({name:"PresentsTitle",class:"p1p7igia",propsAsIs:!1}),On=n.styled_default("div")({name:"Subtitle",class:"s1eftsbu",propsAsIs:!1}),Fn=n.styled_default("div")({name:"Description",class:"d8uezec",propsAsIs:!1}),qn=n.styled_default("button")({name:"ActionButton",class:"a1h1bk90",propsAsIs:!1}),Be=({close:s,action:t,onboarding:i})=>{var a,r,l,d,o,c,p,f;return e.jsxs(Nn,{children:[e.jsx(En,{"data-a":"intr",onClick:s,children:e.jsx(Vn,{name:"icon-cross"})}),((r=(a=i==null?void 0:i.titleCard)==null?void 0:a.media)==null?void 0:r.sponsorLogo)&&e.jsxs(Hn,{children:[e.jsx(zn,{alt:"sponsor-logo",src:(d=(l=i==null?void 0:i.titleCard)==null?void 0:l.media)==null?void 0:d.sponsorLogo}),e.jsx(Mn,{children:"PRESENTS"})]}),((o=i==null?void 0:i.titleCard)==null?void 0:o.title)&&e.jsx(On,{children:(c=i==null?void 0:i.titleCard)==null?void 0:c.title}),((p=i==null?void 0:i.titleCard)==null?void 0:p.subtitle)&&e.jsx(Fn,{children:(f=i==null?void 0:i.titleCard)==null?void 0:f.subtitle}),e.jsx(qn,{"data-a":"intr",onClick:t,children:"Play Now"})]})},ie=[{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/dark/step_1.png",tagline:"",headline:e.jsxs(e.Fragment,{children:["Welcome to ",e.jsx("br",{})," Live Challenge"]})},{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/dark/step_2.png",headline:"Live insights, polls, trivia and predictions."},{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/dark/step_3.png",headline:"Win points and play against friends."}],Bn=n.styled_default("div")({name:"OnboardingContainer",class:"o1xni1kr",propsAsIs:!1}),Dn=()=>$.f,Pn=n.styled_default(Dn())({name:"OnboardingNotificationContainer",class:"o1vnouv7",propsAsIs:!0}),De=n.styled_default("div")({name:"InnerContainer",class:"i59uefw",propsAsIs:!1}),Un=n.styled_default("div")({name:"OnboardingOverlap",class:"ovnr8ov",propsAsIs:!1}),Wn=({deepLink:s,onboardingOpts:t,notification:i,gamification:a,loading:r,sdk:l,throttled:d})=>{var o,c,p,f,m,u,v;const g=n.useStore(a.friends?a.friends.getStore():Ue({data:[]})),[x,C]=h.useState(void 0),I=h.useMemo(()=>{var _,b;const j=l.getInviter();return j?(b=(_=g.data)==null?void 0:_.find(({slId:L})=>L===j))==null?void 0:b.name:""},[g.data,l]);return h.useEffect(()=>{const _=s.$store.subscribe(b=>{b&&C(b.data)});return()=>{_()}},[s.$store]),e.jsxs(Bn,{children:[e.jsx(Tn,{loading:r,rules:[{label:"Answer as many questions as you like.",icon:"icon-btn-feature-groups"},{label:"Win points for each correct trivia or prediction answer.",icon:"icon-thumb-up"},{label:"Top the leader board and best your friends.",icon:"icon-trophy"}],rulesBtnLabel:(o=t.rules)==null?void 0:o.buttonLabel,rulesTitle:(c=t.rules)==null?void 0:c.heading,termsTitle:"Terms and Conditions",termsText:(p=t.rules)==null?void 0:p.terms,steps:ie,primaryColor:(f=t.inviteCard)==null?void 0:f.iconColor,inviteLink:x,inviteCardTitle:(m=t.inviteCard)==null?void 0:m.heading,inviteCardSubtext:(u=t.inviteCard)==null?void 0:u.subtext,inviteCardBtnLabel:(v=t.inviteCard)==null?void 0:v.buttonLabel,onClose:()=>{var _;(_=i.close)==null||_.call(i)},gamification:a,sdk:l,inviterName:I}),d&&e.jsx(Un,{})]})},Zn=({sdk:s,notification:t,saveHeight:i,style:a,appNode:r,sdkInDesktopView:l,responsiveStore:d})=>{const o=h.useRef(null),c=t.data.onboarding,[p,f]=h.useState(c==null?void 0:c.instantOpen),m=s.getFeature(y.SdkOverlayType.GAMES),u=h.useMemo(()=>ie==null?void 0:ie.map(({graphicSrc:C})=>C),[]),{screen:v}=n.useStore(d,{keys:["screen"]});h.useLayoutEffect(()=>{var C;i(((C=o.current)==null?void 0:C.getBoundingClientRect().height)||0)},[i]);const{loading:g,throttled:x}=F0(u);return p&&m&&c&&r.current?e.jsx(Ge,{container:r,useContainer:!l,children:e.jsx(Wn,{throttled:x,notification:t,setOpened:f,gamification:m,onboardingOpts:c,deepLink:m.deepLink,loading:g,renderToNode:r,sdk:s})}):e.jsxs(e.Fragment,{children:[e.jsx(De,{ref:o,style:{position:"absolute",visibility:"hidden"},children:e.jsx(Be,{close:()=>{},action:()=>{},onboarding:c})}),e.jsx(Pn,{style:a,hiding:t.hiding,children:e.jsx(De,{children:e.jsx(Be,{close:t.close,action:()=>{var C;f(!0),(((C=r.current)==null?void 0:C.getBoundingClientRect().y)||0)<0&&ae(r,v.size,{behavior:"smooth"})},onboarding:c})})})]})},Gn=n.styled_default("button")({name:"Container",class:"crkmfw1",propsAsIs:!1}),Qn=n.styled_default("div")({name:"Content",class:"c11awpy4",propsAsIs:!1}),Kn=n.styled_default("span")({name:"Title",class:"t154z7mh",propsAsIs:!1}),Yn=({title:s,onClick:t,className:i,style:a})=>e.jsx(Gn,{"data-a":"intr",onClick:t,className:i,style:a,children:e.jsxs(Qn,{"data-a":"intr",children:[e.jsx(A.B1,{"data-a":"intr",name:"iconUp"}),s&&e.jsx(Kn,{"data-a":"intr",children:s})]})}),Jn=()=>$.f,Xn=n.styled_default(Jn())({name:"Container",class:"c8ol1ve",propsAsIs:!0}),Xe=n.styled_default("div")({name:"InnerContainer",class:"iqfywam",propsAsIs:!1}),ei=()=>Xe,si=n.styled_default(ei())({name:"HiddenContainer",class:"hokmtod",propsAsIs:!0}),ti=n.styled_default("div")({name:"NotificationRefreshing",class:"n192d1q8",propsAsIs:!1}),ni=()=>Yn,ii=n.styled_default(ni())({name:"Pill",class:"p1lha68t",propsAsIs:!0}),ai=s=>{const[t,i]=h.useState(0),a=h.useRef(null),r=h.useMemo(()=>new ResizeObserver(o=>{window.requestAnimationFrame(()=>{var c;if(Array.isArray(o)){for(const p of o)if(p.contentBoxSize){const f=(c=a.current)==null?void 0:c.getBoundingClientRect();f&&i(f.height)}}})}),[]),l=h.useCallback(o=>{a.current=o},[]),d=h.useCallback(o=>{i(o)},[]);return h.useEffect(()=>{const o=a.current;return o?(r.observe(o),()=>{r.unobserve(o)}):()=>{}},[s]),h.useEffect(()=>()=>{r.disconnect()}),[l,t,d]},ri=({sdk:s,notification:t,appNode:i,responsiveStore:a,hasActiveFeature:r})=>{var l,d;const{sdkInDesktopView:o}=n.useStore(a,{keys:["sdkInDesktopView"]}),{sdk:c}=H.p(),[p,f,m]=ai(t.id);let u=f;return r||(u="auto"),t.type===n.NotificationType.QUESTION?e.jsxs(e.Fragment,{children:[e.jsx(si,{ref:p,children:e.jsx(Se,{...t})}),e.jsxs(Xn,{style:{height:t.hiding?0:u},hiding:t.hiding,children:[e.jsx(Xe,{style:{height:"100%"},children:e.jsx(Se,{...t,controlVideo:c==null?void 0:c.controlVideoPlayer})}),e.jsx(ti,{},t.id)]})]}):t.type===n.NotificationType.QUESTION_RESOLVED&&(d=(l=t.data)==null?void 0:l.question)!=null&&d.predictionResult?e.jsx(O0,{style:{height:t.hiding?0:f},saveHeight:m,close:t.close,hiding:t.hiding,...t.data.question}):t.type===n.NotificationType.ONBOARDING?e.jsx(Zn,{style:{height:t.hiding?0:u},saveHeight:m,sdk:s,notification:t,sdkInDesktopView:o,appNode:i,responsiveStore:a}):null},li="p7vfi6t",oi=({pill:s,setPill:t,appNode:i,headerNode:a,scrollNode:r,responsiveStore:l,scrollStore:d})=>{var o,c;const{screen:p}=n.useStore(l,{keys:["screen"]}),{tabsShown:f,scrollPosition:m}=n.useStore(d,{keys:["tabsShown","scrollPosition"]});h.useEffect(()=>{l.get().sdkInDesktopView?m<50&&t(null):m>-50&&t(null)},[m,l,t]);const u=l.get().sdkInDesktopView?i:a;return!s||!u.current?null:Q.createPortal(e.jsx(ii,{title:s.type===n.NotificationType.QUESTION_RESOLVED?"Prediction result":`New ${((c=E.e[(o=s.data)==null?void 0:o.questionType])==null?void 0:c.label)||"notification"}`,"data-a":"intr",onClick:()=>{var v;l.get().sdkInDesktopView?(v=r.current)==null||v.scrollTo({top:0,behavior:"smooth"}):ae(i,p.size,{behavior:"smooth"}),t(null)},className:n.cx_default(f&&li,"sl-pill-button")}),u.current)},di=({sdk:s,headerNode:t,scrollNode:i,responsiveStore:a,appNode:r,scrollStore:l,hasActiveFeature:d})=>{const[o]=h.useState(s.getNotificationsStore()),c=n.useStore(o),[p,f]=h.useState(null),m=h.useMemo(()=>s.getActiveNotification(),[s,c]);return h.useEffect(()=>{m&&T.eventBus.emit("notification",{action:"rendered",payload:{questionId:m.data.questionId,questionType:m.data.questionType}})},[m]),h.useEffect(()=>{const{sdkInDesktopView:u,sdkInView:v}=a.get();m&&(u||v)&&(!u&&v&&f(m),u&&window.requestAnimationFrame(()=>{l.get().scrollPosition!==0&&f(m)}))},[m]),h.useEffect(()=>{m||f(null)},[m]),e.jsxs(e.Fragment,{children:[!p&&m&&e.jsx(ri,{appNode:r,sdk:s,hasActiveFeature:d,notification:m,responsiveStore:a}),p&&e.jsx(oi,{pill:p,setPill:f,appNode:r,notification:m,headerNode:t,scrollNode:i,scrollStore:l,responsiveStore:a})]})},ci=s=>{const t=n.useStore(s.status),i=n.useStore(s.sdkStore.slStreamId),a=n.useStore(s.userId()),r=n.useStore(s.getActiveFeature()),l=t==="ready"&&!!i.data;return h.useEffect(()=>{const d=s.getFeature(y.SdkOverlayType.GAMES);d&&r!==y.SdkOverlayType.GAMES&&(d.closeQuestion(),d.closeUser()),d==null||d.openedQuestionId.subscribe(o=>{o&&r!==y.SdkOverlayType.GAMES&&s.openFeature(y.SdkOverlayType.GAMES)})},[r,s]),{sdkReady:l,activeFeature:r,isLogged:!!a}},ui=({sdk:s,className:t,scrollStore:i,appNode:a,scrollNode:r,responsiveStore:l})=>{const[,d]=d2(s);return e.jsx(lt,{className:t,scrollNode:r,appNode:a,scrollStore:i,feature:d,responsiveStore:l,sdk:s})},pi=({sdk:s,muted:t,className:i,appNode:a,responsiveStore:r})=>{const l=n.useStore(s.featuresList.getStore());return l?Array.from(l,d=>{const o=s.getFeature(d);return o?e.jsx(ot,{className:i,muted:t,appNode:a,feature:o,responsiveStore:r,sdk:s},d):null}):null},hi=({sdk:s,muted:t,topNavigation:i})=>{const[a,r]=h.useState(!0),l=h.useRef(null),d=n.useStore(s.uiState),o=h.useRef(null),[c]=c2(l),[p,f]=p2(l,c),{sdkReady:m,activeFeature:u,isLogged:v}=ci(s),g=!!m;F.b(l,{enabled:g,event:"click",listener:F.A});const x=h.useMemo(()=>({sdk:s,topNavigation:i}),[s,i]);return h.useEffect(()=>{Promise.resolve().then(()=>require("./gamification-feature.js"))},[]),e.jsx(H.e.Provider,{value:x,children:e.jsxs($.p,{ref:C=>{l.current=C,r(!!C)},className:i?"":"c10llmat",children:[g&&i&&d.app&&e.jsx(Et,{className:n.cx_default(q.m,"sl-hide-on-modal"),sdk:s,ref:o}),g&&!i&&!!u&&d.app&&e.jsx(Nt,{className:n.cx_default(q.m,"sl-hide-on-modal"),sdk:s,ref:o}),e.jsxs($.c,{className:"sl-hide-on-modal",ref:p,"data-nav":(!!u&&g).toString(),children:[g&&d.app&&e.jsx(di,{sdk:s,scrollNode:p,headerNode:o,appNode:l,scrollStore:f,responsiveStore:c,hasActiveFeature:!!u}),g&&d.app&&e.jsx(ui,{scrollStore:f,responsiveStore:c,scrollNode:p,appNode:l,className:q.m,sdk:s}),g&&a&&e.jsx(pi,{muted:t,responsiveStore:c,appNode:l,className:q.m,sdk:s})]}),g&&!v&&a&&d.app&&e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},children:"You are not logged in."})]})})},mi=({event:s,topNavigation:t,theme:i,muted:a,withSidebarNotification:r=!0})=>{const{sdk:l,status:d}=h.useContext(z.c),o=z.F(),c=z.z(),{event:p}=h.useContext(z.c);if(d===z.Y.UNSET)throw new Error("Wrap app in `StreamLayerProvider`");return d===z.Y.CONNECTED?e.jsx("div",{className:"StreamLayerSDK",children:"wait"}):l===null?e.jsx("div",{className:"StreamLayerSDK",children:"sdk not initialized"}):!o.app&&!o.appNotification&&!o.appSidebar||!o.app&&!o.appSidebar&&o.appNotification&&!r?null:e.jsx("div",{className:"StreamLayerSDK",children:e.jsx(q.h,{customTheme:i??c.theme,themeMode:c.themeMode,children:e.jsx(hi,{sdk:l,muted:a,event:(p==null?void 0:p.current)||s,topNavigation:t})})})};exports.B=it;exports.b=mi;
@@ -1 +1 @@
1
- "use strict";var d=Object.defineProperty;var l=(t,e,s)=>e in t?d(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var n=(t,e,s)=>l(t,typeof e!="symbol"?e+"":e,s);const u=require("pino");require("./sl-types.js");require("nanostores");const i=require("./useStreamLayerApp2.js"),c=u.pino({level:"trace",enabled:typeof window<"u"&&!!window.localStorage.getItem("SL_DEBUG"),browser:{write:t=>{console.log(t)}}}),a=(t,e)=>c.child({name:t},e);class v extends Event{constructor(s,r){super(s);n(this,"slEventBus");this.slEventBus=r}}const w=a("event-bus");class E{constructor(e="sl-event-bus"){n(this,"name");n(this,"listeners");n(this,"emit",(e,s)=>{const r=new v(this.name,{...s,type:e});w.debug(r,"Emitting event"),window.dispatchEvent(r)});n(this,"destroy",()=>{this.listeners.forEach(e=>{window.removeEventListener(this.name,e),this.listeners.delete(e)}),this.listeners.clear()});this.name=e,this.listeners=new Set}listen(e){return window.addEventListener(this.name,e),this.listeners.add(e),()=>{this.off(e)}}off(e){window.removeEventListener(this.name,e),this.listeners.delete(e)}}window.slStore=Object.create(null);var o;(function(t){t.ORGANIZATION="ORGANIZATION",t.STREAM="STREAM"})(o||(o={}));i.SdkOverlayType.BETTING+"",i.SdkOverlayType.GAMES+"",i.SdkOverlayType.PUBLIC_CHAT+"",i.SdkOverlayType.TWITTER+"";exports.FeatureStatus=void 0;(function(t){t.Ready="ready",t.Suspended="suspended"})(exports.FeatureStatus||(exports.FeatureStatus={}));const h=new E;exports.createLogger=a;exports.eventBus=h;
1
+ "use strict";const u=require("react/jsx-runtime"),o=require("react-countup"),a=({value:e=0,decimals:t,duration:s=1,preserveValue:i=!0,...l})=>{const[,r]=e.toString().split("."),n=t??((r==null?void 0:r.length)||0);return u.jsx(o,{end:e,...l,duration:s,decimals:n,enableScrollSpy:!1,preserveValue:i})};exports.d=a;